Skip to content

Commit b0b9e89

Browse files
authored
Merge pull request #481 from Nuzhny007/master
New video
2 parents 8cf6c98 + 6a35dd8 commit b0b9e89

26 files changed

+359
-68
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626

2727
# New videos!
2828

29+
* 4-in-1 latest SOTA detectors in one video: YOLOv11, YOLOv12, RF-DETR, D-FINE
30+
31+
[![4-in-1 latest SOTA detectors:](https://img.youtube.com/vi/Pb_HnejRpY4/0.jpg)](https://youtu.be/Pb_HnejRpY4)
32+
2933
* YOLOv8-obb detection with rotated boxes (DOTA v1.0 trained)
3034

3135
[![YOLOv8-obb detection:](https://img.youtube.com/vi/1e6ur57Fhzs/0.jpg)](https://youtu.be/1e6ur57Fhzs)

data/settings_dfine.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ocv_dnn_backend = DNN_BACKEND_OPENCV
2929
#-----------------------------
3030
nn_weights = C:/work/home/mtracker/Multitarget-tracker/data/coco/dfine_m_obj2coco.onnx
3131
nn_config = C:/work/home/mtracker/Multitarget-tracker/data/coco/dfine_m_obj2coco.onnx
32-
class_names = C:/work/home/mtracker/Multitarget-tracker/data/coco/coco_91.names
32+
class_names = C:/work/home/mtracker/Multitarget-tracker/data/coco/coco.names
3333

3434
#-----------------------------
3535
confidence_threshold = 0.5

data/settings_yolov11.ini

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ ocv_dnn_target = DNN_TARGET_CPU
2727
ocv_dnn_backend = DNN_BACKEND_OPENCV
2828

2929
#-----------------------------
30-
nn_weights = C:/work/home/mtracker/Multitarget-tracker/data/coco/yolo11s.onnx
31-
nn_config = C:/work/home/mtracker/Multitarget-tracker/data/coco/yolo11s.onnx
30+
nn_weights = C:/work/home/mtracker/Multitarget-tracker/data/coco/yolo11m.onnx
31+
nn_config = C:/work/home/mtracker/Multitarget-tracker/data/coco/yolo11m.onnx
3232
class_names = C:/work/home/mtracker/Multitarget-tracker/data/coco/coco.names
3333

3434
#-----------------------------

data/settings_yolov11_seg.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# opencv_dnn = 12
55
# darknet_cudnn = 10
66
# tensorrt = 11
7-
detector_backend = 12
7+
detector_backend = 11
88

99
#-----------------------------
1010
# Target and backend for opencv_dnn detector

data/settings_yolov12.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ nn_config = C:/work/home/mtracker/Multitarget-tracker/data/coco/yolov12m.onnx
3232
class_names = C:/work/home/mtracker/Multitarget-tracker/data/coco/coco.names
3333

3434
#-----------------------------
35-
confidence_threshold = 0.4
35+
confidence_threshold = 0.5
3636

3737
max_crop_ratio = 0
3838
max_batch = 1

data/settings_yolov5.ini

+142
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
[detection]
2+
3+
#-----------------------------
4+
# opencv_dnn = 12
5+
# darknet_cudnn = 10
6+
# tensorrt = 11
7+
detector_backend = 11
8+
9+
#-----------------------------
10+
# Target and backend for opencv_dnn detector
11+
# DNN_TARGET_CPU
12+
# DNN_TARGET_OPENCL
13+
# DNN_TARGET_OPENCL_FP16
14+
# DNN_TARGET_MYRIAD
15+
# DNN_TARGET_CUDA
16+
# DNN_TARGET_CUDA_FP16
17+
ocv_dnn_target = DNN_TARGET_CPU
18+
19+
# DNN_BACKEND_DEFAULT
20+
# DNN_BACKEND_HALIDE
21+
# DNN_BACKEND_INFERENCE_ENGINE
22+
# DNN_BACKEND_OPENCV
23+
# DNN_BACKEND_VKCOM
24+
# DNN_BACKEND_CUDA
25+
# DNN_BACKEND_INFERENCE_ENGINE_NGRAPH
26+
# DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019
27+
ocv_dnn_backend = DNN_BACKEND_OPENCV
28+
29+
#-----------------------------
30+
nn_weights = C:/work/home/mtracker/Multitarget-tracker/data/coco/yolov5m.onnx
31+
nn_config = C:/work/home/mtracker/Multitarget-tracker/data/coco/yolov5m.onnx
32+
class_names = C:/work/home/mtracker/Multitarget-tracker/data/coco/coco.names
33+
34+
#-----------------------------
35+
confidence_threshold = 0.5
36+
37+
max_crop_ratio = 1.5
38+
max_batch = 1
39+
gpu_id = 0
40+
41+
#-----------------------------
42+
# YOLOV3
43+
# YOLOV4
44+
# YOLOV5
45+
net_type = YOLOV5
46+
47+
#-----------------------------
48+
# INT8
49+
# FP16
50+
# FP32
51+
inference_precision = FP16
52+
53+
54+
[tracking]
55+
56+
#-----------------------------
57+
# DistCenters = 0 // Euclidean distance between centers, pixels
58+
# DistRects = 1 // Euclidean distance between bounding rectangles, pixels
59+
# DistJaccard = 2 // Intersection over Union, IoU, [0, 1]
60+
# DistHist = 3 // Bhatacharia distance between histograms, [0, 1]
61+
62+
distance_type = 0
63+
64+
#-----------------------------
65+
# KalmanLinear = 0
66+
# KalmanUnscented = 1
67+
68+
kalman_type = 0
69+
70+
#-----------------------------
71+
# FilterCenter = 0
72+
# FilterRect = 1
73+
# FilterRRect = 2
74+
75+
filter_goal = 0
76+
77+
#-----------------------------
78+
# TrackNone = 0
79+
# TrackKCF = 1
80+
# TrackMIL = 2
81+
# TrackMedianFlow = 3
82+
# TrackGOTURN = 4
83+
# TrackMOSSE = 5
84+
# TrackCSRT = 6
85+
# TrackDAT = 7
86+
# TrackSTAPLE = 8
87+
# TrackLDES = 9
88+
# TrackDaSiamRPN = 10
89+
# Used if filter_goal == FilterRect
90+
91+
lost_track_type = 0
92+
93+
#-----------------------------
94+
# MatchHungrian = 0
95+
# MatchBipart = 1
96+
97+
match_type = 0
98+
99+
#-----------------------------
100+
# Use constant acceleration motion model:
101+
# 0 - unused (stable)
102+
# 1 - use acceleration in Kalman filter (experimental)
103+
use_aceleration = 0
104+
105+
#-----------------------------
106+
# Delta time for Kalman filter
107+
delta_time = 0.4
108+
109+
#-----------------------------
110+
# Accel noise magnitude for Kalman filter
111+
accel_noise = 0.2
112+
113+
#-----------------------------
114+
# Distance threshold between region and object on two frames
115+
dist_thresh = 0.8
116+
117+
#-----------------------------
118+
# If this value > 0 than will be used circle with this radius
119+
# If this value <= 0 than will be used ellipse with size (3*vx, 3*vy), vx and vy - horizontal and vertical speed in pixelsa
120+
min_area_radius_pix = -1
121+
122+
#-----------------------------
123+
# Minimal area radius in ration for object size. Used if min_area_radius_pix < 0
124+
min_area_radius_k = 0.8
125+
126+
#-----------------------------
127+
# If the object do not assignment more than this frames then it will be removed
128+
max_skip_frames = 50
129+
130+
#-----------------------------
131+
# The maximum trajectory length
132+
max_trace_len = 50
133+
134+
#-----------------------------
135+
# Detection abandoned objects
136+
detect_abandoned = 0
137+
# After this time (in seconds) the object is considered abandoned
138+
min_static_time = 5
139+
# After this time (in seconds) the abandoned object will be removed
140+
max_static_time = 25
141+
# Speed in pixels. If speed of object is more that this value than object is non static
142+
max_speed_for_static = 10

data/settings_yolov6.ini

+142
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
[detection]
2+
3+
#-----------------------------
4+
# opencv_dnn = 12
5+
# darknet_cudnn = 10
6+
# tensorrt = 11
7+
detector_backend = 11
8+
9+
#-----------------------------
10+
# Target and backend for opencv_dnn detector
11+
# DNN_TARGET_CPU
12+
# DNN_TARGET_OPENCL
13+
# DNN_TARGET_OPENCL_FP16
14+
# DNN_TARGET_MYRIAD
15+
# DNN_TARGET_CUDA
16+
# DNN_TARGET_CUDA_FP16
17+
ocv_dnn_target = DNN_TARGET_CPU
18+
19+
# DNN_BACKEND_DEFAULT
20+
# DNN_BACKEND_HALIDE
21+
# DNN_BACKEND_INFERENCE_ENGINE
22+
# DNN_BACKEND_OPENCV
23+
# DNN_BACKEND_VKCOM
24+
# DNN_BACKEND_CUDA
25+
# DNN_BACKEND_INFERENCE_ENGINE_NGRAPH
26+
# DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019
27+
ocv_dnn_backend = DNN_BACKEND_OPENCV
28+
29+
#-----------------------------
30+
nn_weights = C:/work/home/mtracker/Multitarget-tracker/data/coco/yolov6m.onnx
31+
nn_config = C:/work/home/mtracker/Multitarget-tracker/data/coco/yolov6m.onnx
32+
class_names = C:/work/home/mtracker/Multitarget-tracker/data/coco/coco.names
33+
34+
#-----------------------------
35+
confidence_threshold = 0.5
36+
37+
max_crop_ratio = 1.5
38+
max_batch = 1
39+
gpu_id = 0
40+
41+
#-----------------------------
42+
# YOLOV3
43+
# YOLOV4
44+
# YOLOV5
45+
net_type = YOLOV6
46+
47+
#-----------------------------
48+
# INT8
49+
# FP16
50+
# FP32
51+
inference_precision = FP16
52+
53+
54+
[tracking]
55+
56+
#-----------------------------
57+
# DistCenters = 0 // Euclidean distance between centers, pixels
58+
# DistRects = 1 // Euclidean distance between bounding rectangles, pixels
59+
# DistJaccard = 2 // Intersection over Union, IoU, [0, 1]
60+
# DistHist = 3 // Bhatacharia distance between histograms, [0, 1]
61+
62+
distance_type = 0
63+
64+
#-----------------------------
65+
# KalmanLinear = 0
66+
# KalmanUnscented = 1
67+
68+
kalman_type = 0
69+
70+
#-----------------------------
71+
# FilterCenter = 0
72+
# FilterRect = 1
73+
# FilterRRect = 2
74+
75+
filter_goal = 0
76+
77+
#-----------------------------
78+
# TrackNone = 0
79+
# TrackKCF = 1
80+
# TrackMIL = 2
81+
# TrackMedianFlow = 3
82+
# TrackGOTURN = 4
83+
# TrackMOSSE = 5
84+
# TrackCSRT = 6
85+
# TrackDAT = 7
86+
# TrackSTAPLE = 8
87+
# TrackLDES = 9
88+
# TrackDaSiamRPN = 10
89+
# Used if filter_goal == FilterRect
90+
91+
lost_track_type = 0
92+
93+
#-----------------------------
94+
# MatchHungrian = 0
95+
# MatchBipart = 1
96+
97+
match_type = 0
98+
99+
#-----------------------------
100+
# Use constant acceleration motion model:
101+
# 0 - unused (stable)
102+
# 1 - use acceleration in Kalman filter (experimental)
103+
use_aceleration = 0
104+
105+
#-----------------------------
106+
# Delta time for Kalman filter
107+
delta_time = 0.4
108+
109+
#-----------------------------
110+
# Accel noise magnitude for Kalman filter
111+
accel_noise = 0.2
112+
113+
#-----------------------------
114+
# Distance threshold between region and object on two frames
115+
dist_thresh = 0.8
116+
117+
#-----------------------------
118+
# If this value > 0 than will be used circle with this radius
119+
# If this value <= 0 than will be used ellipse with size (3*vx, 3*vy), vx and vy - horizontal and vertical speed in pixelsa
120+
min_area_radius_pix = -1
121+
122+
#-----------------------------
123+
# Minimal area radius in ration for object size. Used if min_area_radius_pix < 0
124+
min_area_radius_k = 0.8
125+
126+
#-----------------------------
127+
# If the object do not assignment more than this frames then it will be removed
128+
max_skip_frames = 50
129+
130+
#-----------------------------
131+
# The maximum trajectory length
132+
max_trace_len = 50
133+
134+
#-----------------------------
135+
# Detection abandoned objects
136+
detect_abandoned = 0
137+
# After this time (in seconds) the object is considered abandoned
138+
min_static_time = 5
139+
# After this time (in seconds) the abandoned object will be removed
140+
max_static_time = 25
141+
# Speed in pixels. If speed of object is more that this value than object is non static
142+
max_speed_for_static = 10

example/examples.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -893,13 +893,13 @@ class YoloTensorRTExample final : public VideoExample
893893
averFps = 1000.f / currTime;
894894
else
895895
averFps = 0.9f * averFps + 0.1f * (1000.f / currTime);
896-
cv::putText(frame, std::to_string(cvRound(averFps)) + " fps", cv::Point(10, 20), cv::FONT_HERSHEY_TRIPLEX, 0.8, cv::Scalar(255, 0, 255));
896+
cv::putText(frame, std::to_string(cvRound(averFps)) + " fps", cv::Point(10, 40), cv::FONT_HERSHEY_TRIPLEX, 1.5, cv::Scalar(255, 0, 255));
897897

898898
for (const auto& track : tracks)
899899
{
900900
if (track.IsRobust(2, // Minimal trajectory size
901901
0.5f, // Minimal ratio raw_trajectory_points / trajectory_lenght
902-
cv::Size2f(0.1f, 8.0f))) // Min and max ratio: width / height
902+
cv::Size2f(0.1f, 8.0f), 2)) // Min and max ratio: width / height
903903
{
904904
DrawTrack(frame, track, true, framesCounter);
905905

src/Detector/tensorrt_yolo/DFINE_bb.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class DFINE_bb_onnx : public YoloONNX
4242
auto boxes = outputs[1];
4343
auto scores = outputs[2];
4444

45-
for (size_t i = 0; i < m_outpuDims[0].d[1]; ++i)
45+
for (size_t i = 0; i < static_cast<int>(m_outpuDims[0].d[1]); ++i)
4646
{
4747
float classConf = scores[i];
4848
int64_t classId = labels[i];

0 commit comments

Comments
 (0)