Skip to content

Commit ea6439f

Browse files
YoheiMishinawep21kenji-miyaketkimura4kmiya
authoredDec 3, 2021
feat: add tensorrt yolo package (autowarefoundation#102)
* Ros2 v0.8.0 tensorrt yolo (autowarefoundation#301) * Rename ROS-related .yaml to .param.yaml (autowarefoundation#352) * Rename ROS-related .yaml to .param.yaml Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Remove prefix 'default_' of yaml files Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Rename vehicle_info.yaml to vehicle_info.param.yaml Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Rename diagnostic_aggregator's param files Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix overlooked parameters Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * add use_sim-time option (autowarefoundation#454) * Unify Apache-2.0 license name (autowarefoundation#1242) * Remove use_sim_time for set_parameter (autowarefoundation#1260) Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp> * Add pre-commit (autowarefoundation#1560) * add pre-commit * add pre-commit-config * add additional settings for private repository * use default pre-commit-config * update pre-commit setting * Ignore whitespace for line breaks in markdown * Update .github/workflows/pre-commit.yml Co-authored-by: Kazuki Miyahara <kmiya@outlook.com> * exclude svg * remove pretty-format-json * add double-quote-string-fixer * consider COLCON_IGNORE file when seaching modified package * format file * pre-commit fixes * Update pre-commit.yml * Update .pre-commit-config.yaml Co-authored-by: Kazuki Miyahara <kmiya@outlook.com> Co-authored-by: pre-commit <pre-commit@example.com> Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> * Fix build error with TensorRT v8 (autowarefoundation#1612) * Fix build error with TensorRT v8 Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp> * Fix typo Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp> * Add markdownlint and prettier (autowarefoundation#1661) * Add markdownlint and prettier Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Ignore .param.yaml Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Apply format Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * suppress warnings for tensorrt yolo (autowarefoundation#1759) * add Werror * fix unused-parameter * Fix -Wunused-parameter (autowarefoundation#1836) * Fix -Wunused-parameter Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix mistake Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * fix spell * Fix lint issues Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Ignore flake8 warnings Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> Co-authored-by: Hiroki OTA <hiroki.ota@tier4.jp> * Fix compiler warnings (autowarefoundation#1837) * Fix -Wunused-private-field Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix -Wunused-variable Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix -Wformat-security Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix -Winvalid-constexpr Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix -Wdelete-non-abstract-non-virtual-dtor Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix -Wdelete-abstract-non-virtual-dtor Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix -Winconsistent-missing-override Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix -Wrange-loop-construct Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix "invalid application of 'sizeof' to an incomplete type" Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Ignore -Wgnu-anonymous-struct and -Wnested-anon-types Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix lint Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Ignore -Wno-deprecated-declarations in CUDA-related packages Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix mistake Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix -Wunused-parameter Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Feature/tiny yolov4 (autowarefoundation#2193) * Add param for tiny yolov4 Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp> * Fix missing install Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp> * Download tiny yolov4 model Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp> * Change formatter to clang-format and black (autowarefoundation#2332) * Revert "Temporarily comment out pre-commit hooks" This reverts commit 748e9cdb145ce12f8b520bcbd97f5ff899fc28a3. * Replace ament_lint_common with autoware_lint_common Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Remove ament_cmake_uncrustify and ament_clang_format Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Apply Black Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Apply clang-format Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix build errors Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix for cpplint * Fix include double quotes to angle brackets Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Apply clang-format Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix build errors Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Add COLCON_IGNORE (autowarefoundation#500) Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Port tensorrt yolo to .auto (autowarefoundation#569) Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp> * Update document for tensorrt yolo (autowarefoundation#619) * Update document for tensorrt yolo Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp> * Update perception/object_recognition/detection/tensorrt_yolo/README.md * Update perception/object_recognition/detection/tensorrt_yolo/README.md * Update perception/object_recognition/detection/tensorrt_yolo/README.md * Address review: Fix citation style Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp> * Fix build failure on jetson (autowarefoundation#638) * Fix invalid vector access (autowarefoundation#648) * Fix invalid vector access * Run pre-cmmoit Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp> * set image subscription qos as SensorDataQoS() explicitly (autowarefoundation#718) Co-authored-by: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com> Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Co-authored-by: tkimura4 <tomoya.kimura@tier4.jp> Co-authored-by: Kazuki Miyahara <kmiya@outlook.com> Co-authored-by: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> Co-authored-by: pre-commit <pre-commit@example.com> Co-authored-by: Hiroki OTA <hiroki.ota@tier4.jp> Co-authored-by: Satoshi OTA <44889564+satoshi-ota@users.noreply.github.com>
1 parent 09cb841 commit ea6439f

31 files changed

+3425
-0
lines changed
 

‎perception/tensorrt_yolo/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
data/
2+
calib_image/
+272
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,272 @@
1+
cmake_minimum_required(VERSION 3.5)
2+
project(tensorrt_yolo)
3+
4+
if(NOT CMAKE_CXX_STANDARD)
5+
set(CMAKE_CXX_STANDARD 17)
6+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
7+
set(CMAKE_CXX_EXTENSIONS OFF)
8+
endif()
9+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
10+
add_compile_options(-Wall -Wextra -Wpedantic -Wno-deprecated-declarations -Werror)
11+
endif()
12+
13+
option(CUDA_VERBOSE "Verbose output of CUDA modules" OFF)
14+
15+
find_package(ament_cmake_auto REQUIRED)
16+
ament_auto_find_build_dependencies()
17+
18+
find_package(OpenCV REQUIRED)
19+
20+
# set flags for CUDA availability
21+
option(CUDA_AVAIL "CUDA available" OFF)
22+
find_package(CUDA)
23+
if(CUDA_FOUND)
24+
find_library(CUBLAS_LIBRARIES cublas HINTS
25+
${CUDA_TOOLKIT_ROOT_DIR}/lib64
26+
${CUDA_TOOLKIT_ROOT_DIR}/lib
27+
)
28+
if(CUDA_VERBOSE)
29+
message(STATUS "CUDA is available!")
30+
message(STATUS "CUDA Libs: ${CUDA_LIBRARIES}")
31+
message(STATUS "CUDA Headers: ${CUDA_INCLUDE_DIRS}")
32+
endif()
33+
set(CUDA_AVAIL ON)
34+
else()
35+
message("CUDA NOT FOUND")
36+
set(CUDA_AVAIL OFF)
37+
endif()
38+
39+
# set flags for TensorRT availability
40+
option(TRT_AVAIL "TensorRT available" OFF)
41+
# try to find the tensorRT modules
42+
find_library(NVINFER NAMES nvinfer)
43+
find_library(NVONNXPARSER nvonnxparser)
44+
find_library(NVINFER_PLUGIN NAMES nvinfer_plugin)
45+
if(NVINFER AND NVONNXPARSER AND NVINFER_PLUGIN)
46+
if(CUDA_VERBOSE)
47+
message(STATUS "TensorRT is available!")
48+
message(STATUS "NVINFER: ${NVINFER}")
49+
message(STATUS "NVPARSERS: ${NVPARSERS}")
50+
message(STATUS "NVINFER_PLUGIN: ${NVINFER_PLUGIN}")
51+
message(STATUS "NVONNXPARSER: ${NVONNXPARSER}")
52+
endif()
53+
set(TRT_AVAIL ON)
54+
else()
55+
message("TensorRT is NOT Available")
56+
set(TRT_AVAIL OFF)
57+
endif()
58+
59+
# set flags for CUDNN availability
60+
option(CUDNN_AVAIL "CUDNN available" OFF)
61+
# try to find the CUDNN module
62+
find_library(CUDNN_LIBRARY
63+
NAMES libcudnn.so${__cudnn_ver_suffix} libcudnn${__cudnn_ver_suffix}.dylib ${__cudnn_lib_win_name}
64+
PATHS $ENV{LD_LIBRARY_PATH} ${__libpath_cudart} ${CUDNN_ROOT_DIR} ${PC_CUDNN_LIBRARY_DIRS} ${CMAKE_INSTALL_PREFIX}
65+
PATH_SUFFIXES lib lib64 bin
66+
DOC "CUDNN library."
67+
)
68+
if(CUDNN_LIBRARY)
69+
if(CUDA_VERBOSE)
70+
message(STATUS "CUDNN is available!")
71+
message(STATUS "CUDNN_LIBRARY: ${CUDNN_LIBRARY}")
72+
endif()
73+
set(CUDNN_AVAIL ON)
74+
else()
75+
message("CUDNN is NOT Available")
76+
set(CUDNN_AVAIL OFF)
77+
endif()
78+
79+
# Download onnx
80+
find_program(GDOWN_AVAIL "gdown")
81+
if(NOT GDOWN_AVAIL)
82+
message("gdown: command not found. External files could not be downloaded.")
83+
endif()
84+
set(PATH "${CMAKE_CURRENT_SOURCE_DIR}/data")
85+
if(NOT EXISTS "${PATH}")
86+
execute_process(COMMAND mkdir -p ${PATH})
87+
endif()
88+
# yolov3
89+
set(FILE "${PATH}/yolov3.onnx")
90+
message(STATUS "Checking and downloading yolov3.onnx")
91+
if(NOT EXISTS "${FILE}")
92+
message(STATUS "... file does not exist. Downloading now ...")
93+
execute_process(
94+
COMMAND gdown "https://drive.google.com/uc?id=1ZYoBqVynmO5kKntyN56GEbELRpuXG8Ym" -O ${PATH}/yolov3.onnx
95+
ERROR_QUIET
96+
)
97+
endif()
98+
99+
# yolov4
100+
set(FILE "${PATH}/yolov4.onnx")
101+
message(STATUS "Checking and downloading yolov4.onnx")
102+
if(NOT EXISTS "${FILE}")
103+
message(STATUS "... file does not exist. Downloading now ...")
104+
execute_process(
105+
COMMAND gdown "https://drive.google.com//uc?id=1vkNmSwcIpTkJ_-BrKhxtit0PBJeJYTVX" -O ${PATH}/yolov4.onnx
106+
ERROR_QUIET
107+
)
108+
endif()
109+
110+
# yolov4-tiny
111+
set(FILE "${PATH}/yolov4-tiny.onnx")
112+
message(STATUS "Checking and downloading yolov4.onnx")
113+
if(NOT EXISTS "${FILE}")
114+
message(STATUS "... file does not exist. Downloading now ...")
115+
execute_process(
116+
COMMAND gdown "https://drive.google.com/uc?id=1rUHjV_JfkmlVFgb20XXrOMWo_HZAjrFh" -O ${PATH}/yolov4-tiny.onnx
117+
ERROR_QUIET
118+
)
119+
endif()
120+
121+
# yolov5s
122+
set(FILE "${PATH}/yolov5s.onnx")
123+
message(STATUS "Checking and downloading yolov5s.onnx")
124+
if(NOT EXISTS "${FILE}")
125+
message(STATUS "... file does not exist. Downloading now ...")
126+
execute_process(
127+
COMMAND gdown "https://drive.google.com//uc?id=1CF21nQWigwCPTr5psQZXg6cBQIOYKbad" -O ${PATH}/yolov5s.onnx
128+
ERROR_QUIET
129+
)
130+
endif()
131+
132+
# yolov5m
133+
set(FILE "${PATH}/yolov5m.onnx")
134+
message(STATUS "Checking and downloading yolov5m.onnx")
135+
if(NOT EXISTS "${FILE}")
136+
message(STATUS "... file does not exist. Downloading now ...")
137+
execute_process(
138+
COMMAND gdown "https://drive.google.com//uc?id=1a1h50KJH6slwmjKZpPlS-errukF-BrgG" -O ${PATH}/yolov5m.onnx
139+
ERROR_QUIET
140+
)
141+
endif()
142+
143+
# yolov5l
144+
set(FILE "${PATH}/yolov5l.onnx")
145+
message(STATUS "Checking and downloading yolov5l.onnx")
146+
if(NOT EXISTS "${FILE}")
147+
message(STATUS "... file does not exist. Downloading now ...")
148+
execute_process(
149+
COMMAND gdown "https://drive.google.com/uc?id=1xO8S92Cq7qrmx93UHHyA7Cd7-dJsBDP8" -O ${PATH}/yolov5l.onnx
150+
ERROR_QUIET
151+
)
152+
endif()
153+
154+
# yolov5x
155+
set(FILE "${PATH}/yolov5x.onnx")
156+
message(STATUS "Checking and downloading yolov5x.onnx")
157+
if(NOT EXISTS "${FILE}")
158+
message(STATUS "... file does not exist. Downloading now ...")
159+
execute_process(
160+
COMMAND gdown "https://drive.google.com/uc?id=1kAHuNJUCxpD-yWrS6t95H3zbAPfClLxI" -O ${PATH}/yolov5x.onnx
161+
ERROR_QUIET
162+
)
163+
endif()
164+
165+
set(FILE "${PATH}/coco.names")
166+
message(STATUS "Checking and downloading coco.names")
167+
if(NOT EXISTS "${FILE}")
168+
message(STATUS "... file does not exist. Downloading now ...")
169+
execute_process(
170+
COMMAND gdown "https://drive.google.com/uc?id=19wXD23PE16kJDkZ7j2W3Ijvx5I1kO9kJ" -O ${PATH}/coco.names
171+
ERROR_QUIET
172+
)
173+
endif()
174+
175+
# create calib image directory for int8 calibration
176+
set(CALIB_IMAGE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/calib_image")
177+
if(NOT EXISTS "${CALIB_IMAGE_PATH}")
178+
execute_process(COMMAND mkdir -p ${CALIB_IMAGE_PATH})
179+
endif()
180+
181+
if(TRT_AVAIL AND CUDA_AVAIL AND CUDNN_AVAIL)
182+
include_directories(
183+
include
184+
lib/include
185+
${OpenCV_INCLUDE_DIRS}
186+
${CUDA_INCLUDE_DIRS}
187+
)
188+
189+
190+
### yolo ###
191+
cuda_add_library(mish_plugin SHARED
192+
lib/src/plugins/mish.cu
193+
lib/src/plugins/mish_plugin.cpp
194+
)
195+
196+
cuda_add_library(yolo_layer_plugin SHARED
197+
lib/src/plugins/yolo_layer.cu
198+
lib/src/plugins/yolo_layer_plugin.cpp
199+
)
200+
201+
cuda_add_library(nms_plugin SHARED
202+
lib/src/plugins/nms.cu
203+
lib/src/plugins/nms_plugin.cpp
204+
)
205+
206+
ament_auto_add_library(yolo SHARED
207+
lib/src/trt_yolo.cpp
208+
)
209+
210+
target_include_directories(yolo PUBLIC
211+
lib/include
212+
)
213+
214+
target_link_libraries(yolo
215+
${NVINFER}
216+
${NVONNXPARSER}
217+
${NVINFER_PLUGIN}
218+
${CUDA_LIBRARIES}
219+
${CUBLAS_LIBRARIES}
220+
${CUDA_curand_LIBRARY}
221+
${CUDNN_LIBRARY}
222+
mish_plugin
223+
yolo_layer_plugin
224+
nms_plugin
225+
)
226+
227+
ament_auto_add_library(tensorrt_yolo_nodelet SHARED
228+
src/nodelet.cpp
229+
)
230+
231+
target_link_libraries(tensorrt_yolo_nodelet
232+
${OpenCV_LIBS}
233+
yolo
234+
mish_plugin
235+
yolo_layer_plugin
236+
nms_plugin
237+
)
238+
239+
rclcpp_components_register_node(tensorrt_yolo_nodelet
240+
PLUGIN "object_recognition::TensorrtYoloNodelet"
241+
EXECUTABLE tensorrt_yolo_node
242+
)
243+
244+
if(BUILD_TESTING)
245+
find_package(ament_lint_auto REQUIRED)
246+
ament_lint_auto_find_test_dependencies()
247+
endif()
248+
249+
ament_auto_package(INSTALL_TO_SHARE
250+
config
251+
data
252+
launch
253+
)
254+
255+
install(
256+
TARGETS
257+
mish_plugin
258+
yolo_layer_plugin
259+
nms_plugin
260+
LIBRARY DESTINATION lib
261+
ARCHIVE DESTINATION lib
262+
RUNTIME DESTINATION bin
263+
)
264+
265+
else()
266+
message("TensorrtYolo won't be built, CUDA and/or TensorRT were not found.")
267+
ament_auto_package(INSTALL_TO_SHARE
268+
config
269+
data
270+
launch
271+
)
272+
endif()

‎perception/tensorrt_yolo/README.md

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# tensorrt_yolo
2+
3+
## Purpose
4+
5+
This package detects 2D bounding boxes for target objects e.g., cars, trucks, bicycles, and pedestrians on a image based on YOLO(You only look once) model.
6+
7+
## Inner-workings / Algorithms
8+
9+
### Cite
10+
11+
yolov3
12+
13+
Redmon, J., & Farhadi, A. (2018). Yolov3: An incremental improvement. arXiv preprint arXiv:1804.02767.
14+
15+
yolov4
16+
17+
Bochkovskiy, A., Wang, C. Y., & Liao, H. Y. M. (2020). Yolov4: Optimal speed and accuracy of object detection. arXiv preprint arXiv:2004.10934.
18+
19+
yolov5
20+
21+
Jocher, G., et al. (2021). ultralytics/yolov5: v6.0 - YOLOv5n 'Nano' models, Roboflow integration, TensorFlow export, OpenCV DNN support (v6.0). Zenodo. <https://doi.org/10.5281/zenodo.5563715>
22+
23+
## Inputs / Outputs
24+
25+
### Input
26+
27+
| Name | Type | Description |
28+
| ---------- | ------------------- | --------------- |
29+
| `in/image` | `sensor_msgs/Image` | The input image |
30+
31+
### Output
32+
33+
| Name | Type | Description |
34+
| ------------- | ----------------------------------------------------- | -------------------------------------------------- |
35+
| `out/objects` | `autoware_perception_msgs/DetectedObjectsWithFeature` | The detected objects with 2D bounding boxes |
36+
| `out/image` | `sensor_msgs/Image` | The image with 2D bounding boxes for visualization |
37+
38+
## Parameters
39+
40+
### Core Parameters
41+
42+
| Name | Type | Default Value | Description |
43+
| ------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------- |
44+
| `anchors` | double array | [10.0, 13.0, 16.0, 30.0, 33.0, 23.0, 30.0, 61.0, 62.0, 45.0, 59.0, 119.0, 116.0, 90.0, 156.0, 198.0, 373.0, 326.0] | The anchors to create bounding box candidates |
45+
| `scale_x_y` | double array | [1.0, 1.0, 1.0] | The scale parameter to eliminate grid sensitivity |
46+
| `score_thresh` | double | 0.1 | If the objectness score is less than this value, the object is ignored in yolo layer. |
47+
| `iou_thresh` | double | 0.45 | The iou threshold for NMS method |
48+
| `detections_per_im` | int | 100 | The maximum detection number for one frame |
49+
| `use_darknet_layer` | bool | true | The flag to use yolo layer in darknet |
50+
| `ignore_thresh` | double | 0.5 | If the output score is less than this value, ths object is ignored. |
51+
52+
### Node Parameters
53+
54+
| Name | Type | Default Value | Description |
55+
| ----------------------- | ------ | ------------- | ------------------------------------------------------------------ |
56+
| `onnx_file` | string | "" | The onnx file name for yolo model |
57+
| `engine_file` | string | "" | The tensorrt engine file name for yolo model |
58+
| `label_file` | string | "" | The label file with label names for detected objects written on it |
59+
| `calib_image_directory` | string | "" | The directory name including calibration images for int8 inference |
60+
| `calib_cache_file` | string | "" | The calibration cache file for int8 inference |
61+
| `mode` | string | "FP32" | The inference mode: "FP32", "FP16", "INT8" |
62+
63+
## Assumptions / Known limits
64+
65+
This package includes multiple licenses.
66+
67+
## Onnx model
68+
69+
### YOLOv3
70+
71+
[YOLOv3](https://drive.google.com/uc?id=1ZYoBqVynmO5kKntyN56GEbELRpuXG8Ym "YOLOv3"): Converted from darknet [weight file](https://pjreddie.com/media/files/yolov3.weights "weight file") and [conf file](https://github.com/pjreddie/darknet/blob/master/cfg/yolov3.cfg "conf file").
72+
73+
### YOLOv4
74+
75+
[YOLOv4](https://drive.google.com//uc?id=1vkNmSwcIpTkJ_-BrKhxtit0PBJeJYTVX "YOLOv4"): Converted from darknet [weight file](https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.weights "weight file") and [conf file](https://github.com/AlexeyAB/darknet/blob/master/cfg/yolov4.cfg "conf file").
76+
77+
### YOLOv5
78+
79+
Refer to [this guide](https://github.com/ultralytics/yolov5/issues/251 "guide")
80+
81+
- [YOLOv5s](https://drive.google.com//uc?id=1CF21nQWigwCPTr5psQZXg6cBQIOYKbad "YOLOv5s")
82+
83+
- [YOLOv5m](https://drive.google.com//uc?id=1a1h50KJH6slwmjKZpPlS-errukF-BrgG "YOLOv5m")
84+
85+
- [YOLOv5l](https://drive.google.com/uc?id=1xO8S92Cq7qrmx93UHHyA7Cd7-dJsBDP8 "YOLOv5l")
86+
87+
- [YOLOv5x](https://drive.google.com/uc?id=1kAHuNJUCxpD-yWrS6t95H3zbAPfClLxI "YOLOv5x")
88+
89+
## Reference repositories
90+
91+
- <https://github.com/pjreddie/darknet>
92+
93+
- <https://github.com/AlexeyAB/darknet>
94+
95+
- <https://github.com/ultralytics/yolov5>
96+
97+
- <https://github.com/wang-xinyu/tensorrtx>
98+
99+
- <https://github.com/NVIDIA/retinanet-examples>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**:
2+
ros__parameters:
3+
num_anchors: 3
4+
anchors: [116.0, 90.0, 156.0, 198.0, 373.0, 326.0, 30.0, 61.0, 62.0, 45.0, 59.0, 119.0, 10.0, 13.0, 16.0, 30.0, 33.0, 23.0]
5+
scale_x_y: [1.0, 1.0, 1.0]
6+
score_threshold: 0.1
7+
iou_thresh: 0.45
8+
detections_per_im: 100
9+
use_darknet_layer: true
10+
ignore_thresh: 0.5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**:
2+
ros__parameters:
3+
num_anchors: 3
4+
anchors: [81.0, 82.0, 135.0, 169.0, 344.0, 319.0, 23.0, 27.0, 37.0, 58.0, 81.0, 82.0]
5+
scale_x_y: [1.05, 1.05]
6+
score_threshold: 0.1
7+
iou_thresh: 0.45
8+
detections_per_im: 100
9+
use_darknet_layer: true
10+
ignore_thresh: 0.5

0 commit comments

Comments
 (0)
Please sign in to comment.