Basic Inference
-
Perform a health check on the gRPC endpoint.
-
Install
grpcurlfrom github.com/fullstorydev/grpcurl/releases.Example commands to run on Ubuntu:
-
Download the health checking proto:
-
Run the health check:
-
If the service is ready, you get a response similar to the following:
For using grpcurl with an SSL enabled server, avoid using the
--plaintextargument, and use--cacertwith a CA certificate,--keywith a private key, or--certwith a certificate file. For more details, refer togrpcurl --help. -
-
Download the Eye Contact Python client code by cloning the gRPC Client repository:
-
Install the required dependencies:
Compile the Protos (Optional)
If you want to use the client code provided in the github Client repository, you can skip this step.
The proto files are available in the eye-contact/protos folder. You can compile them to generate client interfaces in your preferred programming language. For more details, refer to Supported languages in the gRPC documentation.
Here is an example of how to compile the protos for Python on Linux and Windows.
The grpcio version needed for compilation can be referred from requirements.txt
To compile protos on Linux, run:
To compile protos on Windows, run:
Input and Output
The input and output of the NVIDIA Eye Contact NIM are mp4 files. The input file must use the H.264 codec for video and can include audio. The output video file also uses the H.264 codec for video and contains the same audio as the input video file.
Running Inference via Script
You can use the sample client script in the Eye Contact GitHub repo to send a gRPC request to the hosted NIM server:
Go to the scripts directory
Run the command to send gRPC request
For more details on the command-line arguments, refer to the Feature Parameters section.
The first inference is not indicative of the model’s actual performance because it includes the time taken by the Triton Inference Server to load the models in addition to the time required to process the inference request.
Usage for Preview API Request
To view details of command-line arguments, run this command:
You will get a response similar to the following.
If the command-line arguments are not passed, the script takes the following default values:
targetis127.0.0.1:8001.inputis../assets/sample_input.mp4.outputisoutput.mp4in the current directory.ssl-modeisDISABLED(no SSL).ssl-keyis../ssl_key/ssl_key_client.pem. Used only ifssl-modeisMTLS.ssl-certis../ssl_key/ssl_cert_client.pem. Used only ifssl-modeisMTLS.ssl-root-certis../ssl_key/ssl_ca_cert.pem. Used only ifssl-modeisMTLSorTLS.