🌐 한국어 버전
yoloTracker extends Darknet (YOLO) with object tracking, multi-camera streaming, and OpenMP-based parallel reception. While the original YOLO only produces per-frame detection results, this repository assigns a persistent ID to each detected object and tracks it across frames.
Detected bounding boxes are matched to the same object in subsequent frames.
opencv_tracker/ keeps IDs stable by combining:
- MOSSE tracker
- ORB feature matching
- Velocity-based position prediction
- History-based correction
Related files: opencv_tracker/tracker_main.cpp, tracking_dot.cpp, orb.cpp, tracker.h
opencv_tracker_mosse/ is a simplified variant that uses only MOSSE.
It shares the same out.txt / out.jpg interface but has a simpler tracking strategy.
Related files: opencv_tracker_mosse/tracker_main.cpp, tracking_dot.cpp
1–4 network streams are merged into a single frame with hconcat / vconcat before being passed to YOLO.
The number of streams is controlled by the STREAM define.
Related files: src/image_opencv.cpp, src/demo.c, include/darknet.h
open_video_stream_cus() receives and decodes JPEG buffers from multiple sockets in parallel.
Enable with OPENMP=1 in the root Makefile.
Related files: Makefile, src/image_opencv.cpp
TCP-based camera send/receive utilities:
videoserver: encodes camera frames as JPEG and streams themvideoclient: receives a single streamvideoclient_4cam: receives four streams
Related files: video_streaming/videoserver.cpp, videoclient.cpp, videoclient_4cam.cpp
ORB/: ORB feature-matching experimentsvideo_maker/: tool for generating result videosnano_cam_on.cpp,nano_cam_on.sh: scripts for launching the streaming server on a remote device (environment-specific)
| Path | Role |
|---|---|
src/ |
Modified Darknet core — multi-stream reception and frame merging |
opencv_tracker/ |
Main tracker combining ORB, MOSSE, and prediction |
opencv_tracker_mosse/ |
Lightweight MOSSE-only tracker |
video_streaming/ |
Camera send/receive utilities |
ORB/ |
ORB matching experiments |
video_maker/ |
Result video generation tool |
videoserverstreams camera frames over the network.- The modified Darknet receives multiple streams and merges them into one frame.
- YOLO detection results are written to
out.jpgandout.txt. opencv_trackeroropencv_tracker_mossereads those files and assigns persistent IDs to each object.- Tracking results are sent to an external server or displayed on screen.
Detection results are handed off to the tracker via files (out.txt / out.jpg), not through a direct API call.
Default Makefile flags:
GPU=1
CUDNN=1
OPENCV=1
OPENMP=1
DEBUG=1makeOutputs: darknet, libdarknet.a, libdarknet.so
cd opencv_tracker && make tracker
cd opencv_tracker_mosse && make tracker
cd video_streaming && make
cd ORB && make tracker#define CAM_NUM 0
#define STREAM 4Set CAM_NUM for local cameras or STREAM for network streams, depending on your setup.
Camera server addresses and ports are hardcoded. Update them to match your environment.
The destination server address for tracking output is also hardcoded.
OpenCV I/O, multi-stream reception and merging, OpenMP parallel receive logic.
Connects the custom input source to the YOLO demo loop, initializes sockets, and writes out.jpg / out.txt.
Converts raw YOLO detections into tracked results: manages per-object tags and miss counts, handles motion prediction and screen-exit logic.
- IP addresses, ports, and server addresses are hardcoded throughout the source.
- The remote camera scripts are tied to a specific development environment.
- YOLO and the tracker communicate through files (
out.txt,out.jpg), not a direct API. DEBUG=1is the default, so the build prioritizes debug convenience over performance.- OpenMP optimization covers only the multi-stream reception path.