Skip to content

Commit

Permalink
added new weights
Browse files Browse the repository at this point in the history
  • Loading branch information
alexperez33 committed Mar 14, 2022
1 parent bbb353f commit e5cc36f
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 34 deletions.
2 changes: 1 addition & 1 deletion darknet
Submodule darknet updated 1 files
+2 −4 src/image.c
46 changes: 23 additions & 23 deletions darknet_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -232,35 +232,35 @@ set(FILE "${PATH}/yolov4-tiny.weights")
message(STATUS "Checking and downloading yolov4-tiny.weights if needed ...")
if (NOT EXISTS "${FILE}")
message(STATUS "... file does not exist. Downloading now ...")
execute_process(COMMAND wget -q https://github.com/uf-mil/darknet_ros/releases/download/1.0.0/yolov4-tiny.weights -P ${PATH})
execute_process(COMMAND wget -q https://github.com/uf-mil/darknet_ros/releases/download/1.0.1/yolov4-tiny.weights -P ${PATH})
endif()

#############
## Testing ##
#############

if(CATKIN_ENABLE_TESTING)
# Download yolov4-tiny.weights
set(PATH "${CMAKE_CURRENT_SOURCE_DIR}/yolo_network_config/weights")
set(FILE "${PATH}/yolov4-tiny.weights")
message(STATUS "Checking and downloading yolov4-tiny.weights if needed ...")
if (NOT EXISTS "${FILE}")
message(STATUS "... file does not exist. Downloading now ...")
execute_process(COMMAND wget -q https://github.com/uf-mil/darknet_ros/releases/download/1.0.0/yolov4-tiny.weights -P ${PATH})
endif()

find_package(rostest REQUIRED)

# Object detection in images.
add_rostest_gtest(${PROJECT_NAME}_object_detection-test
test/object_detection.test
test/test_main.cpp
test/ObjectDetection.cpp
)
target_link_libraries(${PROJECT_NAME}_object_detection-test
${catkin_LIBRARIES}
)
endif()
#if(CATKIN_ENABLE_TESTING)
# # Download yolov4-tiny.weights
# set(PATH "${CMAKE_CURRENT_SOURCE_DIR}/yolo_network_config/weights")
# set(FILE "${PATH}/yolov4-tiny.weights")
# message(STATUS "Checking and downloading yolov4-tiny.weights if needed ...")
# if (NOT EXISTS "${FILE}")
# message(STATUS "... file does not exist. Downloading now ...")
# execute_process(COMMAND wget -q https://github.com/uf-mil/darknet_ros/releases/download/1.0.0/yolov4-tiny.weights -P ${PATH})
# endif()
#
# find_package(rostest REQUIRED)
#
# # Object detection in images.
# add_rostest_gtest(${PROJECT_NAME}_object_detection-test
# test/object_detection.test
# test/test_main.cpp
# test/ObjectDetection.cpp
# )
# target_link_libraries(${PROJECT_NAME}_object_detection-test
# ${catkin_LIBRARIES}
# )
#endif()

#########################
### CLANG TOOLING ###
Expand Down
13 changes: 9 additions & 4 deletions darknet_ros/config/yolov4-tiny.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ yolo_model:
value: 0.3
detection_classes:
names:
- mb_marker_buoy_black
- mb_marker_buoy_green
- mb_marker_buoy_red
- black
- blue
- green
- mb_marker_buoy_black
- mb_marker_buoy_green
- mb_marker_buoy_red
- mb_marker_buoy_white
- mb_round_buoy_black
- mb_round_buoy_orange
- mb_round_buoy_orange
- red
- yellow
12 changes: 6 additions & 6 deletions darknet_ros/yolo_network_config/cfg/yolov4-tiny.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ hue=.1

learning_rate=0.00261
burn_in=1000
max_batches = 6000
max_batches = 22000
policy=steps
steps=4800,5400
steps=17600.0,19800.0
scales=.1,.1

[convolutional]
Expand Down Expand Up @@ -209,15 +209,15 @@ activation=leaky
size=1
stride=1
pad=1
filters=33
filters=48
activation=linear



[yolo]
mask = 3,4,5
anchors = 10,14, 23,27, 37,58, 81,82, 135,169, 344,319
classes=6
classes=11
num=6
jitter=.3
scale_x_y = 1.05
Expand Down Expand Up @@ -259,13 +259,13 @@ activation=leaky
size=1
stride=1
pad=1
filters=33
filters=48
activation=linear

[yolo]
mask = 1,2,3
anchors = 10,14, 23,27, 37,58, 81,82, 135,169, 344,319
classes=6
classes=11
num=6
jitter=.3
scale_x_y = 1.05
Expand Down

0 comments on commit e5cc36f

Please sign in to comment.