AICamera is a high-performance, real-time object detection and tracking system built as part of a larger Computer Vision pipeline during a project at ExaWizards Inc. It focuses on accurate person detection and tracking, optimized for deployment on NVIDIA GPUs using TensorRT. The system leverages the speed and accuracy of YOLOv8 for detection and combines it with DeepSORT for robust multi-object tracking.
This submodule was designed to act as a core engine in downstream applications such as real-time surveillance, retail analytics, and smart camera systems โ with a strong emphasis on efficiency, modularity, and real-world deployability.
Tracking (DeepSORT + TensorRT ReID):
NVIDIA Stack:
trtexec
is available)git clone https://github.com/abdur75648/AI-Camera.git
cd AI-Camera
Ensure you have the NVIDIA driver, CUDA, cuDNN, and TensorRT installed. You can check if they are installed correctly by running:
nvidia-smi
This should show your GPU information.
Follow NVIDIAโs official documentation for installing the driver, CUDA, cuDNN, and TensorRT, if not already installed.
Ensure:
nvcc --version
trtexec --help
pip install --upgrade pip
pip install -r requirements.txt
bash scripts/download_models.sh
bash scripts/export_trt_engines.sh
This creates:
models/detection/yolov8n.engine
models/reid/deepsort_reid.engine
Run on a video file:
python3 -m src.aicamera_tracker --input sample_input/sample_video.mp4 --show_display
Run on webcam:
python3 -m src.aicamera_tracker --webcam_id 0 --output_filename outputs/webcam_run.mp4 --show_display
Run with custom confidence threshold:
python3 -m src.aicamera_tracker --input video.mp4 --conf_thresh 0.4
Argument | Description |
---|---|
--input |
Path to input video file |
--webcam_id |
Webcam ID (default: 0) |
--output_dir |
Output directory (default: outputs/ ) |
--output_filename |
Output filename (auto-generated if not set) |
--show_display |
Show live OpenCV display |
--no_save |
Skip saving output video |
--yolo_engine |
Path to YOLOv8 TensorRT engine |
--reid_engine |
Path to ReID TensorRT engine |
--conf_thresh |
Confidence threshold for detections |
--device |
Inference device (default: cuda:0 ) |
Component | Raw Engine Speed (GTX 1660Ti) | Notes |
---|---|---|
YOLOv8n (TRT) | ~400+ FPS | Highly optimized inference |
ReID (TRT) | ~600+ FPS | Fast identity embedding |
End-to-End Pipeline | ~30 FPS | Varies by resolution, #objects |
โ ๏ธ Enabling
--show_display
may reduce FPS due to rendering overhead. Disable for benchmarking.
Update src/config.py
to modify:
Paths:
YOLO_ENGINE_PATH
, REID_ENGINE_PATH
YOLO Settings:
YOLO_INPUT_SHAPE
, YOLO_CONF_THRESHOLD
DeepSORT Settings:
DEEPSORT_MAX_DIST
, DEEPSORT_MAX_AGE
, etc.Classes to Track:
CLASSES_TO_TRACK = {'person'}
AICamera/
โโโ assets/ # Demo assets
โโโ models/ # Pretrained models (.onnx, .engine)
โ โโโ detection/
โ โโโ reid/
โโโ scripts/ # Scripts for model setup
โโโ sample_input/ # Sample videos/images
โโโ src/
โ โโโ aicamera_tracker.py
โ โโโ config.py
โ โโโ detector/ # YOLOv8 wrapper
โ โโโ tracker/ # DeepSORT tracker
โ โ โโโ core/ # Core DeepSORT logic
โ โโโ utils/ # Helper utilities
โ โโโ trt_utils/ # TensorRT engine handling
โโโ requirements.txt
Licensed under the MIT License. Youโre free to use, modify, and distribute with attribution.