Welcome to Jetson Orin NANO Developer Kit repository
08.Person feature extraction and matching (ReID)
TAO ReIdentificationNet Person Feature Extraction and Matching
TAO ReIdentificationNet Person Feature Extraction and Matching1. Case Goal and Processing Flow2. Pre-Run Checks3. Starting Feature Extraction4. USB Camera Real-Time Detection4.1 Direct Run4.2 Common Parameters5. CSI Camera Real-Time Detection5.1 Direct Run5.2 Common Parameters6. Common Issues
Applicable environment: Jetson Orin Nano, JetPack 7.2.1, DeepStream 9.1
After setting the power mode to MAXN, running the case may pop up an over-current warning; just ignore it.
1. Case Goal and Processing Flow
PeopleNet Transformer detects persons, the NvDCF Tracker generates track IDs for the current video, and ReIdentificationNet extracts 256-dimensional appearance features for person crops.
video/USB/CSI → person detection → Tracker → ReIdentificationNet ├→ annotated preview/video output └→ JSONL embeddings associated with track IDs2. Pre-Run Checks
xxxxxxxxxxcd ~/DeepStream/tao-toolkit-shell-demols -lh video_in/bodypose.mp4ls -ld video_outConfirm the input and output directories are available. Running USB/CSI requires the graphical desktop/VNC and a connected camera.
3. Starting Feature Extraction
xxxxxxxxxx./run_video.sh mdx --people
Input video_in/bodypose.mp4; video output video_out/out_reid.mp4; feature records video_out/mdx_people_reid_embeddings.jsonl. After waiting for EOS, you can check:
xxxxxxxxxxgst-discoverer-1.0 video_out/out_reid.mp4head -n 1 video_out/mdx_people_reid_embeddings.jsonlConfirm the record structure and that the embedding length is 256. The Tracker ID is the track number of the current video, not a person's real identity.
Replacing the test video: replace the material at the video_in/bodypose.mp4 path referenced by the configuration, or check the configuration and then change the source. The new material should contain visible persons and be decodable by the Jetson; keep the original file before replacing. Rename old MP4/JSONL first when they need to be retained.
4. USB Camera Real-Time Detection
4.1 Direct Run
The MDX person entry supports USB. After checking the node and formats, run:
xxxxxxxxxxls -l /dev/video*cd ~/DeepStream/tao-toolkit-shell-demo./run_usb.sh mdx --peopleUSB mode is for live preview; do not assume the video mode's MP4/JSONL paths will also generate camera files. If the teaching goal includes writing vectors to disk, first verify the corresponding camera branch configuration.

To stop, press Ctrl+C once, wait for the pipeline to finish, and release the device.
4.2 Common Parameters
Before running, you can check the formats, resolutions, and frame rates supported by the camera:
xxxxxxxxxxv4l2-ctl -d /dev/video0 --list-formats-ext
Note: the USB pipeline of Object Embedding Vector Generation is fixed to YUY2, so among the parameters below, choose the YUY2 parameters
x# View all parameters./run_usb.sh mdx --people --help
# Use another video device./run_usb.sh mdx --people --device /dev/video1
# Choose from the configurations found above that the camera supports; here we use 1280×720, 9FPS./run_usb.sh mdx --people --width 1280 --height 720 --fps 95. CSI Camera Real-Time Detection
5.1 Direct Run
The course CSI entry supports live preview. Connect a compatible camera, confirm the driver and Argus service are working, then run the corresponding command in a Jetson desktop/VNC graphical terminal:
xxxxxxxxxxcd ~/DeepStream/tao-toolkit-shell-demo./run_csi.sh mdx --peopleCSI mode supports live preview; whether embeddings are written to disk should be checked against the camera branch configuration, not inferred from the offline mode.

5.2 Common Parameters
Before running, you can check the formats, resolutions, and frame rates supported by the camera; this must be run in a graphical interface:
xxxxxxxxxxgst-launch-1.0 nvarguscamerasrc
xxxxxxxxxx# View all parameters./run_csi.sh mdx --people --help
# Use the second CSI camera./run_csi.sh mdx --people --sensor-id 1
# Adjust input size and frame rate./run_csi.sh mdx --people --width 1920 --height 1080 --fps 306. Common Issues
| Symptom | Check and Handling |
|---|---|
| No embeddings | Confirm each stage and model have run in the order of detection, Tracker, ReID, then check the JSONL path. |
| IDs change frequently | Occlusion, crossing, or detection loss affects the tracker; IDs are only meaningful within the current video. |
| Vector length mismatch | Verify the ReIdentificationNet version and output fields; the course configuration is 256 dimensions. |
| No USB/CSI image | Check the device/Argus, format, permissions, occupancy, and graphical session. |
| No JSONL in camera mode | Verify whether the corresponding camera configuration enables file writing; do not infer from video mode results. |