
nvidia/eyecontact
RUN ANYWHEREEstimate gaze angles of a person in a video and redirect to make it frontal.
Getting Started
NVIDIA Maxine Eye Contact NIM uses gRPC APIs for inferencing requests. Following instructions demonstrate the usage of Maxine Eye Contact NIM model using Python client.
Prerequisites
You will need a system with git
and Python 3.10+
installed.
Download the NVIDIA Maxine Eye Contact Python client
Download code by cloning the gRPC Client Repository:
git clone https://github.com/NVIDIA-Maxine/nim-clients.git cd nim-clients/eye-contact/
Install the dependencies for the NVIDIA Maxine Eye Contact Python client:
sudo apt-get install python3-pip pip install -r requirements.txt
Run Python Client
Navigate to the scripts directory
cd scripts
Send gRPC request
python eye-contact.py --preview-mode \ --target grpc.nvcf.nvidia.com:443 \ --function-id 15c6f1a0-3843-4cde-b5bc-803a4966fbb6 \ --api-key $API_KEY_REQUIRED_IF_EXECUTING_OUTSIDE_NGC \ --input <input file path> \ --output <output file path and the file name>
Note the requirements for input file:
- The supported file type is mp4.
- The size limit for input file is 1 GB.
- The duration limit for input file is 3 min.
- It can take up to 10 mins to process large input files.
Command line arguments
-h, --help
show this help message and exit--preview-mode
Flag to send request to preview NVCF NIM server on https://build.nvidia.com/nvidia/eyecontact/api.--ssl-mode
{DISABLED,MTLS,TLS} Flag to set SSL mode, default is DISABLED--ssl-key
The path to ssl private key.--ssl-cert
The path to ssl certificate chain.--ssl-root-cert
The path to ssl root certificate.--target
IPof gRPC service, when hosted locally. Use grpc.nvcf.nvidia.com:443 when hosted on NVCF. --input
The path to the input video file.--output
The path for the output video file.--api-key
NGC API key required for authentication, utilized when using TRY API ignored otherwise--function-id
NVCF function ID for the service, utilized when using TRY API ignored otherwise
Refer this documentation for more information.