### Example Output of Docker PS Command Source: https://docs.nvidia.com/jetson/jps/setup/quick-start A sample output demonstrating the typical information displayed by the `sudo docker ps` command, including container IDs, images, commands, creation time, status, ports, and names for various JPS components. ```Shell CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 6d6a957df18f nvcr.io/nvidia/jps/sdr:2.2-8-14-v1 "sh -c '/wdm/dist/sd…" 2 minutes ago Up 11 seconds sdr-emdx 2dc2840ccf67 nvcr.io/nvidia/jps/sdr:2.2-8-14-v1 "sh -c '/wdm/dist/sd…" 2 minutes ago Up 47 seconds sdr 36dac91b2e5b nvcr.io/nvidia/jps/deepstream:7.1-public-v1 "sh -c '/opt/nvidia/…" 2 minutes ago Up About a minute deepstream 1f2e8412e073 nvcr.io/nvidia/jps/emdx-analytics:jps_v1.2.9 "python3 gunicorn --…" 2 minutes ago Up 34 seconds emdx-analytics-01 05e915e18a24 nvcr.io/nvidia/jps/emdx-analytics:jps_v1.2.9 "python3 gunicorn --…" 2 minutes ago Up 34 seconds emdx-analytics-02 eb002baae110 nvcr.io/nvidia/jps/sdr-reprovision-controller:2.2-8-14-v1 "/bin/sh -c ./entryp…" 2 minutes ago Up 2 minutes sdr-reprovision-controller d4ad544c3f30 nvcr.io/nvidia/jps/sdr-alertmanager-controller:2.3.1 "/bin/sh -c ./entryp…" 2 minutes ago Up 2 minutes sdr-alertmanager-controller c9b0827df768 nvcr.io/nvidia/jps/sdr-proxy-controller:2.2-8-14-v1 "/bin/sh -c ./entryp…" 2 minutes ago Up 2 minutes sdr-proxy-controller 91fe3402c601 nvcr.io/nvidia/jps/emdx-analytics-web-api:jps_v1.2.9 "python3 gunicorn --…" 2 minutes ago Up 2 minutes emdx-webapi e0d36b930796 redisfab/redistimeseries:master-arm64v8-jammy "docker-entrypoint.s…" 8 minutes ago Up 7 minutes redis 6d105f6613a8 nvcr.io/nvidia/jps/vst:1.3.0-24.07.1-aarch64 "sh -c '/opt/vst_rel…" 5 minutes ago Up 3 minutes vst 23a2b8b3f92e nvcr.io/nvidia/jps/vst:1.3.0-24.08.1-aarch64 "sh -c '/opt/vst_rel…" 10 minutes ago Up 8 minutes nvstreamer 4b9b02b5947f nvcr.io/nvidia/jps/ialpha-ingress-arm64v8:0.12 "sh -c '/nginx.sh 2>…" 7 minutes ago Up 6 minutes ingress ``` -------------------------------- ### Start Core Jetson JPS Services Source: https://docs.nvidia.com/jetson/jps/setup/quick-start Commands to initiate the essential Redis, Ingress, and VST services required for the Intelligent Video Analytics (IVA) application. These services are managed via `systemctl`. ```Bash sudo systemctl start jetson-redis sudo systemctl start jetson-ingress sudo systemctl start jetson-vst ``` -------------------------------- ### Install Jetson Flash Prerequisites Source: https://docs.nvidia.com/jetson/jps/setup/quick-start Installs all necessary packages and dependencies on the host system required for flashing the Jetson device, using the provided L4T flash prerequisites script. ```bash sudo ./tools/l4t_flash_prerequisites.sh ``` -------------------------------- ### Start IVA Application using Docker Compose Source: https://docs.nvidia.com/jetson/jps/setup/quick-start Commands to launch the IVA application using Docker Compose, with specific configurations for different NVIDIA Jetson Orin models. The `--force-recreate` flag ensures that containers are rebuilt and started fresh. ```Bash cd ai_nvr sudo docker compose -f compose_agx.yaml up -d --force-recreate ``` ```Bash cd ai_nvr sudo docker compose -f compose_nx16.yaml up -d --force-recreate ``` ```Bash cd ai_nvr sudo docker compose -f compose_nx8.yaml up -d --force-recreate ``` ```Bash cd ai_nvr sudo docker compose -f compose_nano.yaml up -d --force-recreate ``` -------------------------------- ### Launch NVIDIA SDK Manager Source: https://docs.nvidia.com/jetson/jps/setup/quick-start Launches the NVIDIA SDK Manager application on the host system to facilitate automated installation of Jetson components and software. ```bash sdkmanager ``` -------------------------------- ### Install NVIDIA Jetson Foundation Services via APT Source: https://docs.nvidia.com/jetson/jps/setup/quick-start Updates the package list for the system's APT repositories and then installs the latest foundation services Debian package from the Jetson APT repository. This command automatically handles all dependencies. ```bash sudo apt update sudo apt install nvidia-jetson-services ``` -------------------------------- ### Apply Jetson Linux Binaries Source: https://docs.nvidia.com/jetson/jps/setup/quick-start Navigates into the extracted Linux_for_Tegra directory and executes the `apply_binaries.sh` script to integrate the necessary binaries for the Jetson platform into the root filesystem. ```bash cd Linux_for_Tegra sudo ./apply_binaries.sh ``` -------------------------------- ### Example Output of jetson-storage Service Status Source: https://docs.nvidia.com/jetson/jps/platform-services/storage An example of the expected output when checking the `jetson-storage` service status, indicating it is active but exited. This state might require a reboot for full encryption setup. ```bash ubuntu@tegra-ubuntu:~$ systemctl status jetson-storage ● jetson-storage.service - Jetson storage service Loaded: loaded (/lib/systemd/system/jetson-storage.service; enabled; vendor preset: enabled) Active: active (exited) since Thu 2023-11-23 02:49:37 UTC; 4 days ago Process: 4315 ExecStart=/opt/nvidia/jetson/services/storage/bin/jetson-storage-setup init (code=exited, status=0/SUCCESS) Main PID: 4315 (code=exited, status=0/SUCCESS) CPU: 597ms ``` -------------------------------- ### Example: Retrieve ROI Total Counts HTTP GET Request Source: https://docs.nvidia.com/jetson/jps/emdx/roi Provides a concrete example of an HTTP GET request to the `/api/v2/metrics/occupancy/roi/count` endpoint with specific query parameters. ```HTTP /api/v2/metrics/occupancy/roi/count?sensorId=Amcrest_3&roiId=checkout_1&fromTimestamp=2020-10-30T20:00:00.000Z&toTimestamp=2020-10-30T20:05:00.000Z ``` -------------------------------- ### GDINO Container Startup Logs Source: https://docs.nvidia.com/jetson/jps/inference-services/gdino Example log output indicating that the GDINO service within the Docker container has successfully started and is ready to accept connections on the specified port. ```plaintext }Starting inference server INFO: Started server process [627] INFO: Waiting for application startup. INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit) ``` -------------------------------- ### HTTP Request to Get Alerts by Time Range Source: https://docs.nvidia.com/jetson/jps/emdx/alerts Example HTTP GET request URL demonstrating how to retrieve all alerts for a specific sensor within a defined start and end timestamp. ```HTTP /api/v2/alerts?sensorId=Amcrest_3&fromTimestamp=2021-09-16T06:06:00.000Z&toTimestamp=2021-09-16T06:07:00.000Z ``` -------------------------------- ### Launch Zero Shot Detection Workflow Source: https://docs.nvidia.com/jetson/jps/workflows/zero_shot_detection_workflow Navigate to the example directory and use Docker Compose to start the Zero Shot Detection service along with its dependencies, including SDR, for automated stream management. ```bash cd ~/zero_shot_detection/example_2 sudo docker compose up ``` -------------------------------- ### Download and Extract VLM Resources Source: https://docs.nvidia.com/jetson/jps/inference-services/vlm These commands navigate to the home directory, extract the VLM resource bundle from the downloaded tar.gz file, and then change into the example directory, preparing the environment for VLM AI service setup. ```bash cd ~/ tar -xvf vlm-2.0.0.tar.gz cd ~/vlm/example_1 ``` -------------------------------- ### Verify Running Docker Containers Source: https://docs.nvidia.com/jetson/jps/setup/quick-start Command to list all currently running Docker containers and their status. This is essential for confirming that all components of the IVA application are active and operational. ```Bash sudo docker ps ``` -------------------------------- ### API: Example Query for FOV Histogram Source: https://docs.nvidia.com/jetson/jps/emdx/fov An example HTTP GET request to retrieve FOV counts for a 5-minute range, aggregated into 10-second non-overlapping fixed intervals. ```HTTP GET /api/v2/metrics/occupancy/fov/histogram?sensorId=Amcrest_1&fromTimestamp=2020-10-30T20:00:00.000Z&toTimestamp=2020-10-30T20:05:00.000Z&fixedInterval=10 ``` -------------------------------- ### Start Jetson Foundation Service Source: https://docs.nvidia.com/jetson/jps/platform-services/overview Initiates a specified NVIDIA Jetson foundation service. Ensure all hardware and software prerequisites are met. The storage service should be started first if used by other services. ```Linux Shell sudo systemctl start ``` ```Linux Shell sudo systemctl start jetson-redis ``` -------------------------------- ### Extract AI-NVR Application Bundle Source: https://docs.nvidia.com/jetson/jps/setup/quick-start Extracts the downloaded AI-NVR application bundle files on the Jetson device. This snippet provides commands for both direct ZIP file downloads and tar.gz archive extractions. ```bash unzip files.zip ``` ```bash tar -xvf ai_nvr-2.0.1.tar.gz ``` -------------------------------- ### Copy AI NVR Nginx Configuration File Source: https://docs.nvidia.com/jetson/jps/setup/quick-start Copies the AI NVR Nginx configuration file from the downloaded reference workflow directory to the system's ingress configuration directory, requiring superuser privileges to ensure proper placement for the application's web server. ```bash sudo cp ai_nvr/config/ai-nvr-nginx.conf /opt/nvidia/jetson/services/ingress/config/ ``` -------------------------------- ### Stop Core Jetson JPS Services Source: https://docs.nvidia.com/jetson/jps/setup/quick-start Commands to terminate the essential Redis, Ingress, and VST services. This is useful for cleanup, maintenance, or restarting the environment. ```Bash sudo systemctl stop jetson-redis sudo systemctl stop jetson-ingress sudo systemctl stop jetson-vst ``` -------------------------------- ### Enable jetson-storage Systemd Service Source: https://docs.nvidia.com/jetson/jps/platform-services/storage Command to enable the `jetson-storage` service, ensuring it starts automatically on boot. This service manages disk encryption and storage setup on Jetson devices. ```bash sudo systemctl enable jetson-storage ``` -------------------------------- ### Check Jetson BSP Version Source: https://docs.nvidia.com/jetson/jps/setup/quick-start To verify the installed Board Support Package (BSP) version and Jetpack release on a NVIDIA Jetson device, inspect the contents of the `nv_tegra_release` file. This file provides details about the current software configuration, including the BSP R version. ```Shell cat /etc/nv_tegra_release ``` -------------------------------- ### Example: Retrieve Tripwire Alerts HTTP Request Source: https://docs.nvidia.com/jetson/jps/emdx/tripwire An example HTTP GET request URL demonstrating how to query tripwire alerts with all common parameters, including sensor ID, timestamp range, and limit. ```HTTP Request /api/v2/alerts/tripwire?sensorId=Amcrest_1&fromTimestamp=2021-09-16T06:06:00.000Z&toTimestamp=2021-09-16T06:07:00.000Z&limit=10 ``` -------------------------------- ### Example API Request Body for Occupancy Threshold Switch Alert Source: https://docs.nvidia.com/jetson/jps/emdx/roi Provides a complete JSON request body example for the `/api/v2/config/rule/alerts/roi` endpoint, demonstrating how to configure an 'occupancy_threshold_switch' alert with a sensor ID and a detailed rule object including specific parameters. ```JSON { "sensorId": "Amcrest_1", "rules": [ { "ruleId": "ae511b25-a57d-483f-b4c5-c30e039cc375", "id": "checkout_1", "type": "roi", "ruleType": "occupancy_threshold_switch", "timeInterval": 1, "countThreshold": 1, "parameters": [ { "name":"time_interval_up", "value":1 }, { "name":"time_interval_down", "value":2 } ] } ] } ``` -------------------------------- ### Enable Jetson Foundation Service for Auto-Start Source: https://docs.nvidia.com/jetson/jps/platform-services/overview Configures a specified NVIDIA Jetson foundation service to start automatically at system boot. The "--now" flag immediately starts the service without waiting for a reboot. ```Linux Shell sudo systemctl enable --now ``` ```Linux Shell sudo systemctl enable jetson-storage --now ``` -------------------------------- ### Flash Jetson Device Image Source: https://docs.nvidia.com/jetson/jps/setup/quick-start Flashes the prepared Linux image onto the specified Jetson device. The command varies based on the specific Jetson model (AGX Orin, Orin NX/Nano, or Orin Nano Super). Ensure the device is in recovery mode before executing. ```bash sudo ./flash.sh jetson-agx-orin-devkit internal ``` ```bash sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -p "-c ./bootloader/generic/cfg/flash_t234_qspi.xml" -c ./tools/kernel_flash/flash_l4t_t234_nvme.xml --showlogs --network usb0 jetson-orin-nano-devkit internal ``` ```bash sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -p "-c ./bootloader/generic/cfg/flash_t234_qspi.xml" -c ./tools/kernel_flash/flash_l4t_t234_nvme.xml --showlogs --network usb0 jetson-orin-nano-devkit-super internal ``` -------------------------------- ### Install CoTURN Server for WebRTC Streaming Source: https://docs.nvidia.com/jetson/jps/vst/VST_Config Command to install the CoTURN server, a popular open-source TURN/STUN server, on a Debian-based system. ```bash sudo apt-get install coturn ``` -------------------------------- ### Extract Jetson Linux BSP and Root Filesystem Source: https://docs.nvidia.com/jetson/jps/setup/quick-start Extracts the downloaded Jetson Linux Board Support Package (BSP) and the Tegra Linux sample root filesystem archives. Ensure the filenames match the downloaded files, as they might be lowercase depending on the download method. ```bash tar xf Jetson_Linux_R36.4.3_aarch64.tbz2 sudo tar xpf Tegra_Linux_Sample-Root-Filesystem_R36.4.3_aarch64.tbz2 -C Linux_for_Tegra/rootfs/ ``` -------------------------------- ### Configure Default User for Jetson Device Source: https://docs.nvidia.com/jetson/jps/setup/quick-start Sets up a default user with a specified username and password on the Jetson device. This user can be used for login after the device is flashed and booted. The command requires accepting a license agreement in a pop-up window. ```bash sudo ./tools/l4t_create_default_user.sh -u -p -a ``` -------------------------------- ### Start Application and Ingress Services Source: https://docs.nvidia.com/jetson/jps/setup/ai-nvr These commands start the application service using Docker Compose, forcing a recreation of containers, and then restart the `jetson-ingress` system service to apply new configurations and ensure the application is accessible. ```bash cd test-app sudo docker compose -f compose.yaml up -d --force-recreate sudo systemctl restart jetson-ingress ``` -------------------------------- ### API Reference: Get Tripwire Alerts Source: https://docs.nvidia.com/jetson/jps/emdx/tripwire Comprehensive documentation for the GET /api/v2/alerts/tripwire endpoint, detailing mandatory and optional query parameters, their types, descriptions, and examples. Also includes information on response body attributes and possible error codes. ```APIDOC Endpoint: GET /api/v2/alerts/tripwire Mandatory Query Parameters: sensorId: description: Sensor for which Tripwire alerts need to be returned. type: string example: Amcrest_11 fromTimestamp: description: lower bound of the timestamp for which tripwire alert needs to be returned type: UTC / GMT timestamp string example: 2020-10-30T20:00:00.000Z toTimestamp: description: Upper bound of timestamp for which tripwire alert needs to be returned. If Not specified defaults to UTC.NOW on the server type: UTC / GMT timestamp string example: 2020-10-30T20:05:00.000Z Optional Query Parameters: limit: description: Max number of alerts to be returned. It follows Time based simple pagination. type: integer Response Body Attributes: Alerts of type increment also has in it’s attributes section the list of objects which resulted in those alerts. Each object is represented by it’s id and type. e.g id=100, type=Person. Error Responses: 422: No Tripwire alerts found for the requested sensorId,tripwireId and time range 500: Internal server error ``` -------------------------------- ### Start Required Jetson Foundation Services Source: https://docs.nvidia.com/jetson/jps/setup/ai-nvr Commands to enable and start the essential Jetson foundation services required for the AI-NVR application, including storage, networking, Redis, monitoring components, ingress, and VST. ```bash sudo systemctl enable jetson-storage --now sudo systemctl enable jetson-networking --now sudo systemctl enable jetson-redis --now sudo systemctl enable jetson-monitoring --now sudo systemctl enable jetson-sys-monitoring --now sudo systemctl enable jetson-gpu-monitoring --now sudo systemctl enable jetson-ingress --now sudo systemctl enable jetson-vst --now ``` -------------------------------- ### Example Parameters Array for Occupancy Threshold Switch Rule Source: https://docs.nvidia.com/jetson/jps/emdx/roi Illustrates the JSON structure for the 'parameters' array when configuring an 'occupancy_threshold_switch' alert type, showing how 'time_interval_up' and 'time_interval_down' are specified. ```JSON { "parameters": [ { "name":"time_interval_up", "value":1 }, { "name":"time_interval_down", "value":2 } ] } ``` -------------------------------- ### Example Mounted Encrypted Storage Status Source: https://docs.nvidia.com/jetson/jps/platform-services/storage An example of the console output showing the status of the mounted encrypted storage, including mount point, path, and filesystem details. This confirms successful encryption and mounting. ```bash CURRENT STORAGE STATUS ON JETSON: * Mount Point: /data * Mount Path: /dev/mapper/jetson-enc-nvme0n1 Filesystem Size Used Avail Use% Mounted on /dev/mapper/jetson-enc-nvme0n1 1.9T 48K 1.8T 1% /data ``` -------------------------------- ### Start NVIDIA Jetson Monitoring and Ingress Services Source: https://docs.nvidia.com/jetson/jps/platform-services/monitoring This snippet provides the `systemctl` commands to activate the core monitoring services (jetson-monitoring, jetson-sys-monitoring, jetson-gpu-monitoring) and the ingress service on NVIDIA Jetson devices. Ensure the platform ingress config file (`/opt/nvidia/jetson/services/ingress/config/platform-nginx.conf`) is correctly configured before starting the ingress service. ```Bash sudo systemctl start jetson-monitoring sudo systemctl start jetson-sys-monitoring sudo systemctl start jetson-gpu-monitoring sudo systemctl start jetson-ingress ``` -------------------------------- ### Check Available Disk Space on Linux Source: https://docs.nvidia.com/jetson/jps/setup/quick-start Displays information about disk space usage of file systems in a human-readable format. This command is useful for determining available storage before setting video storage limits for applications like VST (Video Storage Toolkit). ```bash df -h ``` -------------------------------- ### Optimize NVIDIA Jetson Performance and Network Buffers Source: https://docs.nvidia.com/jetson/jps/setup/quick-start Configures the Jetson device for maximum power and clock speed, and tweaks kernel parameters to optimize network socket receive buffers. These settings are crucial for achieving high performance in video streaming and AI NVR applications by ensuring efficient data handling. ```bash sudo nvpmodel -m 0 ``` ```bash sudo jetson_clocks ``` ```bash sudo sysctl -w net.core.rmem_default=2129920 ``` ```bash sudo sysctl -w net.core.rmem_max=10000000 ``` -------------------------------- ### Start Jetson Redis Platform Service Source: https://docs.nvidia.com/jetson/jps/inference-services/video_summarization This command initializes and starts the Redis service, which is a prerequisite for the video summarization service to function correctly. Redis is used for inter-service communication and data streaming within the Jetson Platform Services ecosystem. ```bash $ sudo systemctl start jetson-redis ``` -------------------------------- ### Update System Packages and Install v4l-utils Source: https://docs.nvidia.com/jetson/jps/vst/VST_Config Commands to update the package list and install 'v4l-utils', a set of utilities for working with Video4Linux devices, necessary for camera detection. ```bash sudo apt-get update sudo apt-get install v4l-utils ``` -------------------------------- ### Successful Metadata API Response Example Source: https://docs.nvidia.com/jetson/jps/emdx/metadata This JSON object illustrates the structure of a successful response from the Metadata API. It includes a list of frames, each containing a timestamp, version, ID, sensor ID, and a list of detected objects with their type and bounding box coordinates. ```JSON { "frames": [ { "timestamp": "2022-08-09T21:25:13.208Z", "version": 4.0, "id": 4508668, "sensorId": "Amcrest_3", "objects": [ { "id": 899, "type": "Person", "bbox": { "leftX": 1075.61, "topY": 364.011, "rightX": 1230.41, "bottomY": 754.086 } } ] } ] } ``` -------------------------------- ### Zero Shot Detection Service main_config.json Example Source: https://docs.nvidia.com/jetson/jps/inference-services/zero_shot_detection An example JSON configuration for the Zero Shot Detection Service's main pipeline, specifying API server port, RTSP stream output, Redis connection details, and logging level. ```json { "api_server_port": 5010, "stream_output": "rtsp://0.0.0.0:5011/out", "redis_host": "0.0.0.0", "redis_port": 6379, "redis_stream": "owl", "redis_output_interval": 60, "log_level": "INFO" } ``` -------------------------------- ### API: Example Query for FOV Total Counts Source: https://docs.nvidia.com/jetson/jps/emdx/fov An example HTTP GET request to retrieve the total FOV count for a specified sensor and time range. ```HTTP GET /api/v2/metrics/occupancy/fov/count?sensorId=Amcrest_1&fromTimestamp=2020-10-30T20:00:00.000Z&toTimestamp=2020-10-31T01:00:00.000Z ``` -------------------------------- ### Custom Docker Compose Service Configuration Example Source: https://docs.nvidia.com/jetson/jps/setup/ai-nvr This YAML configuration provides a template for integrating a new custom application service into an existing Docker Compose stack. It defines the Docker Compose version, service name (`test-app`), image, user, host network mode, environment variables (e.g., `APP-PORT`), volume mounts for application configuration, restart policy, container name, and a custom command to start the application. ```YAML version: '2' services: test-app: image: remove-repository-image:v1.0 user: "0:0" network_mode: "host" environment: APP-PORT: 8080 volumes: - ./config/test-app/app.cfg:/opt/test-app/config/app.cfg restart: always container_name: test-app command: sh -c '/opt/test-app/start.sh' deploy: Restart_policy: condition: always ``` -------------------------------- ### Start Jetson Foundation Services Source: https://docs.nvidia.com/jetson/jps/inference-services/zero_shot_detection Start the `jetson-ingress` and `jetson-redis` foundation services. These services are required for the Zero Shot Detection AI service to function correctly. Use 'restart' instead of 'start' if services were previously running. ```bash sudo systemctl start jetson-ingress sudo systemctl start jetson-redis ``` -------------------------------- ### HTTP Request to Get Latest Alerts After Timestamp Source: https://docs.nvidia.com/jetson/jps/emdx/alerts Example HTTP GET request URL to fetch the most recent 10 alerts for a sensor that occurred after a specified timestamp, using 'fromTimestamp' and 'limit'. ```HTTP /api/v2/alerts?sensorId=Amcrest_3&fromTimestamp=2021-09-16T06:07:00.000Z&limit=10 ``` -------------------------------- ### Example: Create ROI Occupancy Alert Rule Request Body Source: https://docs.nvidia.com/jetson/jps/emdx/roi Provides a sample JSON request body for creating an occupancy alert rule, including `sensorId` and `rules` array with `ruleId`, `id`, `type`, `ruleType`, `name`, `timeInterval`, and `countThreshold`. ```JSON { "sensorId": "Amcrest_1", "rules": [ { "ruleId": "d8f0484f-b464-4a92-a5a9-649a14160b53", "id": "checkout_1", "type": "roi", "ruleType": "occupancy", "name": "Overcrowding scenario rule", "timeInterval": 10, "countThreshold": 100 } ] } ``` -------------------------------- ### HTTP Request to Get Latest Alerts Before Timestamp Source: https://docs.nvidia.com/jetson/jps/emdx/alerts Example HTTP GET request URL to fetch the most recent 10 alerts for a sensor that occurred before a specified timestamp, using 'toTimestamp' and 'limit'. ```HTTP /api/v2/alerts?sensorId=Amcrest_3&toTimestamp=2021-09-16T06:07:00.000Z&limit=10 ``` -------------------------------- ### Retrieve Behaviors by Time Range and Sensor (v2) Source: https://docs.nvidia.com/jetson/jps/emdx/behavior Example HTTP GET request to retrieve all vision behaviors for a specific sensor within a defined time range using the Behavior API v2 endpoint. ```HTTP /api/v2/behavior?sensorId=Amcrest_3&fromTimestamp=2020-10-30T20:00:00.000Z&toTimestamp=2020-10-31T01:00:00.000Z ``` -------------------------------- ### Example API Request to VST via Ingress Source: https://docs.nvidia.com/jetson/jps/platform-services/ingress Demonstrates how to make a sample API request to the Video Storage Toolkit (VST) service through the Ingress API Gateway using the 'curl' command. This illustrates the basic interaction with a service exposed via Ingress. ```bash curl localhost:30080/vst/api/device/list ``` -------------------------------- ### API Endpoint: Retrieve ROI Alerts Source: https://docs.nvidia.com/jetson/jps/emdx/roi Documents the HTTP GET endpoint for retrieving ROI alerts. It specifies mandatory and optional query parameters, their types, and examples for filtering alerts by sensor, time range, and limiting results. ```APIDOC HTTP GET /api/v2/alerts/roi Mandatory Query Parameters: sensorId: description: Sensor for which ROI alerts need to be returned. type: string example: Amcrest_1 fromTimestamp: description: lower bound of the timestamp for which ROI alert needs to be returned type: UTC / GMT timestamp string example: 2020-10-30T20:00:00.000Z toTimestamp: description: Upper bound of timestamp for which ROI alert needs to be returned. If Not specified defaults to UTC. NOW on the server type: UTC / GMT timestamp string example: 2020-10-30T20:05:00.000Z Optional Query Parameters: limit: description: Max number of alerts to be returned. It follows Time based simple pagination. type: integer Response Body Attributes: alerts: array of alert objects Each alert object contains: count, description, duration, endTimestamp, id, ruleId, ruleType, sensorId, startTimestamp, type, direction (optional), attributes. For 'increment' and 'occupancy' types, 'attributes' includes 'objects' with 'id' and 'type' (e.g., Person). Error Responses: 422: No ROI alerts found for the requested sensorId,roiId and time range 500: Internal server error Example Usage: /api/v2/alerts/roi?sensorId=Amcrest_1&fromTimestamp=2021-09-16T06:06:00.000Z&toTimestamp=2021-09-16T06:07:00.000Z&limit=10 ``` -------------------------------- ### Metropolis Analytics Module API Guides Reference Source: https://docs.nvidia.com/jetson/jps/emdx/overview This snippet lists the available API documentation guides for various Metropolis Analytics modules, providing an overview of their respective functionalities and API specifications. ```APIDOC API Guides Available: - Field of view (FOV) API Guide: FOV overview and API Guide. - Tripwire API Guide: Tripwire overview and API Guide. - Region of Interest (ROI) API Guide: Region of Interest (ROI) overview and API Guide. - Alerts API Guide: Alerts overview and API Guide. - Metadata API Guide: Perception metadata overview and API Guide. - Behaviors API Guide: Behavior (trajectory) overview and API Guide. - API Specification: General API Specification. ``` -------------------------------- ### Start Jetson Foundation Services Source: https://docs.nvidia.com/jetson/jps/inference-services/vlm These commands initiate the essential Jetson Platform Services, including ingress, monitoring, system monitoring, and GPU monitoring. These services are prerequisites for deploying and running the VLM AI service successfully. ```bash sudo systemctl start jetson-ingress sudo systemctl start jetson-monitoring sudo systemctl start jetson-sys-monitoring sudo systemctl start jetson-gpu-monitoring ``` -------------------------------- ### Example HTTP GET Request for Tripwire Total Counts API Source: https://docs.nvidia.com/jetson/jps/emdx/tripwire This example demonstrates a complete HTTP GET request URL for retrieving tripwire total counts. It includes mandatory parameters like `sensorId`, `tripwireId`, `fromTimestamp`, and `toTimestamp` to specify the query. ```HTTP /api/v2/metrics/tripwire/count?sensorId=Amcrest_3&tripwireId=door1&fromTimestamp=2020-10-30T20:00:00.000Z&toTimestamp=2020-10-30T20:05:00.000Z ``` -------------------------------- ### API Documentation for main_config.json Parameters Source: https://docs.nvidia.com/jetson/jps/inference-services/vlm Detailed documentation for the configuration parameters within `main_config.json`, including key names, value types, examples, and descriptions of their function. ```APIDOC "api_server_port": Type: int Example: 5010 Description: port the main pipeline will expose its REST APIs for stream and model control "prometheus_port": Type: int Example: 5012 Description: port the alert metrics for prometheus are available "websocket_server_port": Type: int Example: 5016 Description: port the websocket for alert events will be available "stream_output": Type: str Example: "rtsp://0.0.0.0:5011/out" Description: output URI of the RTSP stream generated by the AI service. "chat_server": Type: str Example: "http://0.0.0.0:5015/out" Description: URI of the internal chat server for the main pipeline to access the VLM "alert_system_prompt": Type: str Example: "You are an AI assistant whose job is to evaluate a yes/no question on an image. " Description: The VLM system prompt to be used when evaluating alert rules ``` -------------------------------- ### Monitor Video Summarization Service Startup Logs Source: https://docs.nvidia.com/jetson/jps/inference-services/video_summarization This snippet shows typical log output indicating the successful startup of the video summarization service. Monitoring these logs helps confirm that the Uvicorn server is running and ready to accept API requests. Initial startup may involve downloading model files, which can take some time. ```text INFO: Started server process [1] INFO: Waiting for application startup. INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:19000 (Press CTRL+C to quit) ``` -------------------------------- ### API: FOV Histogram Endpoint Example Response Source: https://docs.nvidia.com/jetson/jps/emdx/fov An example JSON response body returned by the FOV histogram API, showing the structure of the historical occupancy data. ```JSON { "bucketSizeInSec": "1", "histogram": [ { "end": "2020-01-26T19:16:30.000Z", "start": "2020-01-26T19:16:29.000Z", "objects": [ { "type": "Person", "avgCount": 1, "minCount": 0, "maxCount": 2 }, { "type": "Vehicle", "avgCount": 1, "minCount": 1, "maxCount": 4 } ] }, { "end": "2020-01-26T19:16:29.000Z", "start": "2020-01-26T19:16:28.000Z", "objects": [ { "type": "Person", "avgCount": 1, "minCount": 0, "maxCount": 2 }, { "type": "Vehicle", "avgCount": 1, "minCount": 1, "maxCount": 4 } ] } ] } ``` -------------------------------- ### Retrieve FOV Alerts via HTTP GET Source: https://docs.nvidia.com/jetson/jps/emdx/fov Demonstrates an HTTP GET request to fetch the latest FOV alerts for a specific sensor within a given time range, with a defined limit on the number of results. ```HTTP GET /api/v2/alerts/fov?sensorId=Amcrest_1&fromTimestamp=2021-09-16T06:06:00.000Z&toTimestamp=2021-09-16T06:07:00.000Z&limit=10 ``` -------------------------------- ### Configure Increment Alert Rule API Request Source: https://docs.nvidia.com/jetson/jps/emdx/roi Details the HTTP POST endpoint and provides an example JSON request body for configuring ROI alert rules of type 'increment'. The example includes multiple rules for both entry and exit directions within a single request. ```APIDOC HTTP POST /api/v2/config/rule/alerts/roi ``` ```JSON { "sensorId": "Amcrest_1", "rules": [ { "ruleId": "fb298ea4-30aa-4085-b860-42e37c5bf8d1", "id": "checkout_1", "type": "roi", "ruleType": "increment", "timeInterval": 1, "countThreshold": 1, "direction": "entry" }, { "ruleId": "9c5632af-ba68-46bc-a997-858bdadc6856", "id": "checkout_1", "type": "roi", "ruleType": "increment", "timeInterval": 5, "countThreshold": 10, "direction": "exit" } ] } ``` -------------------------------- ### Example: Retrieve FOV Alerts Source: https://docs.nvidia.com/jetson/jps/emdx/fov Demonstrates how to retrieve FOV alerts using the API with sensor ID and time range filters. ```APIDOC /api/v2/alerts/fov?sensorId=Amcrest_1&fromTimestamp=2021-09-16T06:06:00.000Z&toTimestamp=2021-09-16T06:07:00.000Z ``` -------------------------------- ### API Query Parameters for Alert Retrieval Source: https://docs.nvidia.com/jetson/jps/emdx/alerts Defines the mandatory query parameters used for filtering and paginating alert data from the API, including their types and examples. ```APIDOC Query Parameters: sensorId: description: Sensors for which alerts need to be returned. type: string example: Amcrest_1 fromTimestamp: description: Lower bound of the timestamp for which alerts needs to be returned. type: UTC / GMT timestamp string example: 2020-10-30T20:00:00.000Z toTimestamp: description: Upper bound of timestamp for which alert needs to be returned. If Not specified defaults to UTC.NOW on the server. type: UTC / GMT timestamp string example: 2020-10-30T20:05:00.000Z limit: description: Max number of alerts to be returned. type: integer example: 100 ``` -------------------------------- ### Example Response for ROI Counts Histogram API Source: https://docs.nvidia.com/jetson/jps/emdx/roi This JSON example illustrates the structure of the response body returned by the 'Retrieve ROI Counts Histogram' API endpoint. It shows how the histogram data is organized, including bucket size, ROI IDs, time intervals, and object counts broken down by type. ```json { "bucketSizeInSec": "1", "rois": [ { "id": "checkout_1", "histogram": [ { "end": "2020-01-26T19:16:30.000Z", "start": "2020-01-26T19:16:29.000Z", "objects": [ { "type": "Person", "avgCount": 1, "minCount": 0, "maxCount": 2 }, { "type": "Box", "avgCount": 1, "minCount": 1, "maxCount": 4 } ] }, { "end": "2020-01-26T19:16:29.000Z", "start": "2020-01-26T19:16:28.000Z", "objects": [ { "type": "Person", "avgCount": 1, "minCount": 0, "maxCount": 2 }, { "type": "Box", "avgCount": 1, "minCount": 1, "maxCount": 4 } ] } ] } ] } ``` -------------------------------- ### Example: Query FOV Occupancy Count Source: https://docs.nvidia.com/jetson/jps/emdx/fov Demonstrates how to query the FOV occupancy count API endpoint with specific sensor ID and time range. ```APIDOC /api/v2/metrics/occupancy/fov/count?sensorId=Amcrest_1&fromTimestamp=2020-10-30T20:00:00.000Z&toTimestamp=2020-10-30T20:05:00.000Z ``` -------------------------------- ### Create Configuration File for Video Summarization Service Source: https://docs.nvidia.com/jetson/jps/inference-services/video_summarization This JSON configuration file defines critical parameters for the video summarization service, including network ports, Redis host details, logging level, and the OpenAI API key. The "openai_api_key" field must be updated with a valid key for the summarization functionality to work. Other paths and ports can be customized as needed. ```json { "api_server_port": 19000, "redis_host": "localhost", "redis_port": 6379, "redis_stream": "test", "redis_output_interval": 60, "log_level": "INFO", "jetson_ip": "localhost", "video_port": 81, "max_images": 8, "ingress_port": 30080, "streamer_port": 31000, "segment_time": 20, "openai_api_key": "key" } ``` -------------------------------- ### Example JSON Response for Alert Retrieval Source: https://docs.nvidia.com/jetson/jps/emdx/alerts Illustrative JSON response structure for the alert retrieval API, showing various alert properties, nested attributes, and object details. ```JSON { "alerts": [ { "count": 10, "description": "10 people entered fov", "duration": 0.734, "endTimestamp": "2021-09-16T06:07:00.534Z", "id": "unique-alert-id", "rule_type": "increment", "sensorId": "Amcrest_3", "startTimestamp": "2021-09-16T06:06:59.800Z", "type": "fov", "direction": "entry", "attributes": [ { "name": "objects", "value": [ { "id": "1186", "type": "Person" } ] } ] }, { "count": 1, "description": "more than 1 ppl continuously present in FOV for longer than 10 seconds", "duration": 10.734, "endTimestamp": "2021-09-16T06:07:00.534Z", "id": "unique-alert-id", "rule_type": "occupancy", "sensorId": "Amcrest_3", "startTimestamp": "2021-09-16T06:06:59.800Z", "type": "fov", "attributes": [ { "name": "objects", "value": [ { "id": "1186", "type": "Person" } ] } ] }, { "count": 5, "description": "FOV occupancy count greater than 5", "duration": 10.734, "endTimestamp": "2021-09-16T06:07:00.534Z", "id": "unique-alert-id", "rule_type": "occupancy_threshold_switch", "sensorId": "Amcrest_3", "startTimestamp": "2021-09-16T06:06:59.800Z", "type": "fov", "direction": "up", "attributes": [] } ] } ``` -------------------------------- ### Pull and Run NVIDIA VLM Summarization Docker Container Source: https://docs.nvidia.com/jetson/jps/inference-services/video_summarization These commands pull the latest "vlm_summarization" Docker image from NVIDIA's container registry and then run it. The "docker run" command sets up the container with necessary runtime privileges, network configuration, and volume mounts for the configuration file, input videos, and Hugging Face cache. Users should adjust volume paths ("/data/vsm-videos/", "/data/vsm-cache/") to match their local storage. ```bash $ sudo docker pull nvcr.io/nvidia/jps/vlm_summarization:2.0.9 $ sudo docker run -itd --runtime nvidia --network host -v ./config/main_config.json:/configs/main_config.json -v /data/vsm-videos/:/data/videos/ -v /data/vsm-cache/:/root/.cache/huggingface/ -e CONFIG_PATH="/configs/main_config.json" nvcr.io/nvidia/jps/vlm_summarization:2.0.9 ``` -------------------------------- ### Jetson Storage Service Configuration Options Source: https://docs.nvidia.com/jetson/jps/platform-services/storage This snippet shows example configuration options from `/opt/nvidia/jetson-configs/jetson-storage.conf`. It allows customization of LVM and encryption settings, and defines a list of storage devices for the service to manage. ```Configuration LVM_ENABLED=1 ENCRYPTION_ENABLED=0 # User defined storage list, ex: ("/dev/sda" "/dev/nvme0n1" "dev/sdb") ```