This project began with a Jetson Nano, a USB webcam, and NVIDIA’s jetson-inference examples. The original demonstrations below are from that setup.

Hardware and software context

Use a Nano-compatible power supply, microSD image, display or headless output, and a data-capable USB connection. The original shopping receipts and delivery prices are not current hardware recommendations. Follow the Nano setup guide for the exact board.

The Nano/JetPack 4 generation and newer Jetson/JetPack releases are different targets. Record board, JetPack, CUDA/TensorRT, Python, and jetson-inference commit together. Do not install a newer board’s image on a Nano merely because both are called Jetson.

Check the camera first

sudo apt install v4l-utils
v4l2-ctl --list-devices

Choose the actual device reported on the board. Follow the matching jetson-inference build instructions, then record git rev-parse HEAD. The code below uses that project’s jetson_inference and jetson_utils Python bindings and an SSD MobileNet model supported by the installed build.

Detect a person and perform a local action

Save as detect_people.py on the configured Jetson. This script has been syntax-checked; its GPU/camera path must be tested on the board.

import argparse
from jetson_inference import detectNet
from jetson_utils import videoSource, videoOutput

parser = argparse.ArgumentParser()
parser.add_argument("--input", default="/dev/video0")
parser.add_argument("--output", default="display://0")
args = parser.parse_args()
net = detectNet("ssd-mobilenet-v2", threshold=0.5)
camera = videoSource(args.input)
display = videoOutput(args.output)
try:
    while camera.IsStreaming() and display.IsStreaming():
        frame = camera.Capture()
        if frame is None:
            continue
        detections = net.Detect(frame)
        for detection in detections:
            if net.GetClassDesc(detection.ClassID) == "person":
                print("Detected a person")
        display.Render(frame)
        display.SetStatus("Object detection | {:.0f} network FPS".format(
            net.GetNetworkFPS()))
finally:
    camera.Close()
    display.Close()

Run python3 detect_people.py --input /dev/video0. A matching detection prints the message. Repeated detections across frames are not a count of unique people; add tracking and an explicit event policy before publishing counts.

Camera detection and application actions

Conceptual illustration; labels describe responsibilities, not a deployment specification.

Original demonstrations

Open the original detection demonstration.

Open the original custom-action demonstration.

Custom models and cloud integration

A custom checkpoint needs compatible labels, input/output names, preprocessing, and engine support. Follow the project’s SSD training/export exercise as one versioned workflow.

The model forward pass computes output scores. Softmax transforms scores into normalized values; it is not the whole inference operation. Classification and detection also have different output structures.

For cloud actions, enqueue an event rather than blocking every frame on a network request. Define retries, deduplication, buffering limits, and what happens offline. Container emulation on x86 can help inspect or build some ARM software; it does not turn an x86 cloud VM into a Jetson GPU or validate camera/TensorRT behavior.

DeepStream is a separate video-analytics path to evaluate for multi-stream tracking. Choose a board-supported release and test a small pipeline before integrating external actions.