nvidia /

eyecontact

RUN ANYWHERE

Estimate 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 --use-ssl \
--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

  • --use-ssl - Flag to control SSL/TLS encryption enablement.
  • --target - The gRPC proxy host. It's value is grpc.nvcf.nvidia.com:443 for this service.
  • --api-key - NGC API key to authenticate user.
  • --function-id - Function ID for the feature.
  • --input - Input file to apply effect, default value is ../assets/sample_input.mp4
  • --output - Output file name and path, default is current directory (scripts) with name output.mp4

Refer this documentation for more information.