Edge Pig Counting
Turn live video into a reliable count.
Detection, tracking, and region-crossing analytics running on NVIDIA Jetson devices.
- Role
- Computer vision & edge engineering
- When
- Jan 2023 – Feb 2024
- Stack
- NVIDIA Jetson, PyTorch, YOLOv8, TensorRT, ONNX, ByteTrack, OpenCV, Label Studio, FastAPI
- 2Concurrent RTSP streamsMulti-stream inference on NVIDIA Jetson in the January 2023–February 2024 project.
- 10 FPSReported video-pipeline throughputReal-time inference in the two-stream Jetson pipeline.
- 2.5 GBRuntime RAM footprintMemory footprint reported for the edge inference pipeline.
YOLOv8 detections connect to ByteTrack identities across camera frames.
What I built
I worked on a real-time pig-counting system for edge devices. The project combined dataset preparation, object detection, multi-object tracking, and stream processing, with attention to the memory, power, and thermal constraints of NVIDIA Jetson hardware.
Detection and tracking
Built automated labeling and self-correction workflows with Label Studio, fine-tuned YOLOv8, and connected ByteTrack to counting logic for user-defined regions.
Independent video streams
Used multiprocessing and isolated message queues to keep RTSP streams and background tasks from blocking one another.
Inference on the edge
Converted models to TensorRT, tuned Jetson and OpenCV pipelines, and exposed analytics through FastAPI.
Historical DeepStream evaluation
Investigated NVIDIA DeepStream for future multi-stream inference and orchestration, benchmarking its tradeoffs against the custom pipeline.
Engineering decisions
The problem, what I chose, and what it changed.
Keep streams independent on limited hardware
- Problem
- Concurrent video streams must avoid blocking one another within Jetson memory, power, and thermal limits.
- Decision
- Isolated workers with multiprocessing queues, optimized YOLOv8 through TensorRT, and paired ByteTrack with region-crossing logic.
- Result
- Live counts across two RTSP streams with a FastAPI analytics interface and a CV-reported 2.5 GB RAM footprint.