Maxine Eye Contact (Latest)
Maxine Eye Contact (Latest)

Running Inference

  1. Perform a health check on the gRPC endpoint.

    • Install grpcurl from here

      Example commands to run on Ubuntu:

      Copy
      Copied!
                  

      $ wget https://github.com/fullstorydev/grpcurl/releases/download/v1.9.1/grpcurl_1.9.1_linux_amd64.deb $ sudo dpkg -i grpcurl_1.9.1_linux_amd64.deb

    • Download the health checking proto:

      Copy
      Copied!
                  

      $ wget https://raw.githubusercontent.com/grpc/grpc/master/src/proto/grpc/health/v1/health.proto

    • Run the health check:

      Copy
      Copied!
                  

      $ grpcurl --plaintext --proto health.proto localhost:8004 grpc.health.v1.Health/Check

    • If the service is ready, you will get a response similar to the following:

      Copy
      Copied!
                  

      { "status": "SERVING" }

  2. Download the Maxine Eye Contact Python client code by cloning the gRPC Client Repository:

    Copy
    Copied!
                

    git clone https://github.com/NVIDIA-Maxine/nim-clients.git // Go to the 'eye-contact' folder cd nim-clients/eye-contact/

You can use the sample client script in the Maxine Eye Contact GitHub repo to send a gRPC request to the hosted NIM server:

Go to the scripts directory

Copy
Copied!
            

cd scripts

Run the command to send gRPC request

Copy
Copied!
            

python eye-contact.py --target <server_ip:port> --input <input file path> --output <output file path along with file name>

To view details of command line arguments run this command

Copy
Copied!
            

python eye-contact.py -h

You will get a response similar to the following.

Copy
Copied!
            

usage: eye-contact.py [-h] [--target TARGET] [--input INPUT] [--output OUTPUT] Process mp4 video files using gRPC and apply Gaze-redirection. options: -h, --help show this help message and exit --target TARGET The target gRPC server address. --input INPUT The path to the input video file. --output OUTPUT The path for the output video file.

If the command line arguments are not passed, the script will take the following default values:

  • target is 127.0.0.1:8004

  • input is ../assets/sample_input.mp4

  • output will be the current directory with name output.mp4

Previous Getting Started
Next Advanced Usage
© Copyright © 2024, NVIDIA Corporation. Last updated on Oct 1, 2024.