Skip to content

Commit

Permalink
An initial yolov8-obb support
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuzhny007 committed Aug 9, 2024
1 parent da4467c commit a29bfaa
Show file tree
Hide file tree
Showing 16 changed files with 663 additions and 6 deletions.
1 change: 1 addition & 0 deletions combined/combined.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ bool CombinedDetector::InitDetector(cv::UMat frame)
YOLOv7Mask,
YOLOv8,
YOLOv8Mask,
YOLOV8_OBB,
YOLOv9
};
YOLOModels usedModel = YOLOModels::YOLOv8;
Expand Down
15 changes: 15 additions & 0 deletions data/DOTA.names
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name_1
name_2
name_3
name_4
name_5
name_6
name_7
name_8
name_9
name_10
name_11
name_12
name_13
name_14
name_15
80 changes: 80 additions & 0 deletions data/coco/full.names
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
person
bicycle
car
motorbike
aeroplane
bus
train
truck
boat
traffic light
fire hydrant
stop sign
parking meter
bench
bird
cat
dog
horse
sheep
cow
elephant
bear
zebra
giraffe
backpack
umbrella
handbag
tie
suitcase
frisbee
skis
snowboard
sports ball
kite
baseball bat
baseball glove
skateboard
surfboard
tennis racket
bottle
wine glass
cup
fork
knife
spoon
bowl
banana
apple
sandwich
orange
broccoli
carrot
hot dog
pizza
donut
cake
chair
sofa
pottedplant
bed
diningtable
toilet
tvmonitor
laptop
mouse
remote
keyboard
cell phone
microwave
oven
toaster
sink
refrigerator
book
clock
vase
scissors
teddy bear
hair drier
toothbrush
142 changes: 142 additions & 0 deletions data/settings_yolov10.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
[detection]

#-----------------------------
# opencv_dnn = 12
# darknet_cudnn = 10
# tensorrt = 11
detector_backend = 12

#-----------------------------
# Target and backend for opencv_dnn detector
# DNN_TARGET_CPU
# DNN_TARGET_OPENCL
# DNN_TARGET_OPENCL_FP16
# DNN_TARGET_MYRIAD
# DNN_TARGET_CUDA
# DNN_TARGET_CUDA_FP16
ocv_dnn_target = DNN_TARGET_CPU

# DNN_BACKEND_DEFAULT
# DNN_BACKEND_HALIDE
# DNN_BACKEND_INFERENCE_ENGINE
# DNN_BACKEND_OPENCV
# DNN_BACKEND_VKCOM
# DNN_BACKEND_CUDA
# DNN_BACKEND_INFERENCE_ENGINE_NGRAPH
# DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019
ocv_dnn_backend = DNN_BACKEND_OPENCV

#-----------------------------
nn_weights = C:/work/home/mtracker/Multitarget-tracker/data/coco/yolov10s.onnx
nn_config = C:/work/home/mtracker/Multitarget-tracker/data/coco/yolov10s.onnx
class_names = C:/work/home/mtracker/Multitarget-tracker/data/coco/coco.names

#-----------------------------
confidence_threshold = 0.3

max_crop_ratio = 0
max_batch = 1
gpu_id = 0

#-----------------------------
# YOLOV3
# YOLOV4
# YOLOV5
net_type = YOLOV10

#-----------------------------
# INT8
# FP16
# FP32
inference_precision = FP16


[tracking]

#-----------------------------
# DistCenters = 0 // Euclidean distance between centers, pixels
# DistRects = 1 // Euclidean distance between bounding rectangles, pixels
# DistJaccard = 2 // Intersection over Union, IoU, [0, 1]
# DistHist = 3 // Bhatacharia distance between histograms, [0, 1]

distance_type = 0

#-----------------------------
# KalmanLinear = 0
# KalmanUnscented = 1

kalman_type = 0

#-----------------------------
# FilterCenter = 0
# FilterRect = 1
# FilterRRect = 2

filter_goal = 0

#-----------------------------
# TrackNone = 0
# TrackKCF = 1
# TrackMIL = 2
# TrackMedianFlow = 3
# TrackGOTURN = 4
# TrackMOSSE = 5
# TrackCSRT = 6
# TrackDAT = 7
# TrackSTAPLE = 8
# TrackLDES = 9
# TrackDaSiamRPN = 10
# Used if filter_goal == FilterRect

lost_track_type = 0

#-----------------------------
# MatchHungrian = 0
# MatchBipart = 1

match_type = 0

#-----------------------------
# Use constant acceleration motion model:
# 0 - unused (stable)
# 1 - use acceleration in Kalman filter (experimental)
use_aceleration = 0

#-----------------------------
# Delta time for Kalman filter
delta_time = 0.4

#-----------------------------
# Accel noise magnitude for Kalman filter
accel_noise = 0.2

#-----------------------------
# Distance threshold between region and object on two frames
dist_thresh = 0.8

#-----------------------------
# If this value > 0 than will be used circle with this radius
# If this value <= 0 than will be used ellipse with size (3*vx, 3*vy), vx and vy - horizontal and vertical speed in pixelsa
min_area_radius_pix = -1

#-----------------------------
# Minimal area radius in ration for object size. Used if min_area_radius_pix < 0
min_area_radius_k = 0.8

#-----------------------------
# If the object do not assignment more than this frames then it will be removed
max_skip_frames = 50

#-----------------------------
# The maximum trajectory length
max_trace_len = 50

#-----------------------------
# Detection abandoned objects
detect_abandoned = 0
# After this time (in seconds) the object is considered abandoned
min_static_time = 5
# After this time (in seconds) the abandoned object will be removed
max_static_time = 25
# Speed in pixels. If speed of object is more that this value than object is non static
max_speed_for_static = 10
142 changes: 142 additions & 0 deletions data/settings_yolov8_obb.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
[detection]

#-----------------------------
# opencv_dnn = 12
# darknet_cudnn = 10
# tensorrt = 11
detector_backend = 11

#-----------------------------
# Target and backend for opencv_dnn detector
# DNN_TARGET_CPU
# DNN_TARGET_OPENCL
# DNN_TARGET_OPENCL_FP16
# DNN_TARGET_MYRIAD
# DNN_TARGET_CUDA
# DNN_TARGET_CUDA_FP16
ocv_dnn_target = DNN_TARGET_CPU

# DNN_BACKEND_DEFAULT
# DNN_BACKEND_HALIDE
# DNN_BACKEND_INFERENCE_ENGINE
# DNN_BACKEND_OPENCV
# DNN_BACKEND_VKCOM
# DNN_BACKEND_CUDA
# DNN_BACKEND_INFERENCE_ENGINE_NGRAPH
# DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019
ocv_dnn_backend = DNN_BACKEND_OPENCV

#-----------------------------
nn_weights = C:/work/home/mtracker/Multitarget-tracker/data/yolov8s-obb.onnx
nn_config = C:/work/home/mtracker/Multitarget-tracker/data/yolov8s-obb.onnx
class_names = C:/work/home/mtracker/Multitarget-tracker/data/DOTA.names

#-----------------------------
confidence_threshold = 0.5

max_crop_ratio = 0
max_batch = 1
gpu_id = 0

#-----------------------------
# YOLOV3
# YOLOV4
# YOLOV5
net_type = YOLOV8_OBB

#-----------------------------
# INT8
# FP16
# FP32
inference_precision = FP16


[tracking]

#-----------------------------
# DistCenters = 0 // Euclidean distance between centers, pixels
# DistRects = 1 // Euclidean distance between bounding rectangles, pixels
# DistJaccard = 2 // Intersection over Union, IoU, [0, 1]
# DistHist = 3 // Bhatacharia distance between histograms, [0, 1]

distance_type = 0

#-----------------------------
# KalmanLinear = 0
# KalmanUnscented = 1

kalman_type = 0

#-----------------------------
# FilterCenter = 0
# FilterRect = 1
# FilterRRect = 2

filter_goal = 0

#-----------------------------
# TrackNone = 0
# TrackKCF = 1
# TrackMIL = 2
# TrackMedianFlow = 3
# TrackGOTURN = 4
# TrackMOSSE = 5
# TrackCSRT = 6
# TrackDAT = 7
# TrackSTAPLE = 8
# TrackLDES = 9
# TrackDaSiamRPN = 10
# Used if filter_goal == FilterRect

lost_track_type = 0

#-----------------------------
# MatchHungrian = 0
# MatchBipart = 1

match_type = 0

#-----------------------------
# Use constant acceleration motion model:
# 0 - unused (stable)
# 1 - use acceleration in Kalman filter (experimental)
use_aceleration = 0

#-----------------------------
# Delta time for Kalman filter
delta_time = 0.4

#-----------------------------
# Accel noise magnitude for Kalman filter
accel_noise = 0.2

#-----------------------------
# Distance threshold between region and object on two frames
dist_thresh = 0.8

#-----------------------------
# If this value > 0 than will be used circle with this radius
# If this value <= 0 than will be used ellipse with size (3*vx, 3*vy), vx and vy - horizontal and vertical speed in pixelsa
min_area_radius_pix = -1

#-----------------------------
# Minimal area radius in ration for object size. Used if min_area_radius_pix < 0
min_area_radius_k = 0.8

#-----------------------------
# If the object do not assignment more than this frames then it will be removed
max_skip_frames = 50

#-----------------------------
# The maximum trajectory length
max_trace_len = 50

#-----------------------------
# Detection abandoned objects
detect_abandoned = 0
# After this time (in seconds) the object is considered abandoned
min_static_time = 5
# After this time (in seconds) the abandoned object will be removed
max_static_time = 25
# Speed in pixels. If speed of object is more that this value than object is non static
max_speed_for_static = 10
Loading

0 comments on commit a29bfaa

Please sign in to comment.