Skip to content

Commit

Permalink
Merge pull request leggedrobotics#73 from leggedrobotics/fix/weights
Browse files Browse the repository at this point in the history
Fix/weights
  • Loading branch information
mbjelonic authored Apr 5, 2018
2 parents 2e636e9 + 5e4a6a9 commit b0a9e28
Show file tree
Hide file tree
Showing 22 changed files with 146 additions and 10,197 deletions.
24 changes: 5 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The YOLO packages have been tested under ROS Kinetic and Ubuntu 16.04. This is r

**Affiliation: Robotic Systems Lab, ETH Zurich**

![Darknet Ros example: Detection image](darknet_ros/doc/test_detection.png)

## Citing

Expand Down Expand Up @@ -52,23 +53,11 @@ This means that you need to check the compute capability (version) of your GPU.

### Download weights

The yolo-voc.weights and tiny-yolo-voc.weights are downloaded automatically in the CMakeLists.txt file. If you need to download them again, go into the weights folder and download the two pre-trained weights from the VOC data set:
The yolo-voc.weights and tiny-yolo-voc.weights are downloaded automatically in the CMakeLists.txt file. If you need to download them again, go into the weights folder and download the two pre-trained weights from the COCO data set:

cd catkin_workspace/src/darknet_ros/darknet_ros/yolo_network_config/weights/
wget http://pjreddie.com/media/files/yolo-voc.weights
wget http://pjreddie.com/media/files/tiny-yolo-voc.weights


To use the COCO detection objects, you can download the following weights:

cd catkin_workspace/src/darknet_ros/darknet_ros/yolo_network_config/weights/
wget http://pjreddie.com/media/files/yolo.weights
wget http://pjreddie.com/media/files/tiny-yolo.weights

To use the YOLO9000 detection objects, you can download the following weights:

cd catkin_workspace/src/darknet_ros/darknet_ros/yolo_network_config/weights/
wget http://pjreddie.com/media/files/yolo9000.weights
wget http://pjreddie.com/media/files/yolov2.weights
wget http://pjreddie.com/media/files/yolov2-tiny.weights

### Use your own detection objects

Expand All @@ -91,10 +80,7 @@ Run the unit tests using the [Catkin Command Line Tools](http://catkin-tools.rea

catkin build darknet_ros --no-deps --verbose --catkin-make-args run_tests

You will see the following two figures popping up :

![Darknet Ros example: Detection image 1](darknet_ros/doc/dog.png)
![Darknet Ros example: Detection image 2](darknet_ros/doc/person.png)
You will see the image above popping up.

## Basic Usage

Expand Down
16 changes: 8 additions & 8 deletions darknet_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -231,27 +231,27 @@ install(
FILES_MATCHING PATTERN "*.h"
)

# Download tiny-yolo-voc.weights
# Download yolov2-tiny.weights
set(PATH "${CMAKE_CURRENT_SOURCE_DIR}/yolo_network_config/weights")
set(FILE "${PATH}/tiny-yolo-voc.weights")
message(STATUS "Checking and downloading tiny-yolo-voc.weights if needed ...")
set(FILE "${PATH}/yolov2-tiny.weights")
message(STATUS "Checking and downloading yolov2-tiny.weights if needed ...")
if (NOT EXISTS "${FILE}")
message(STATUS "... file does not exist. Downloading now ...")
execute_process(COMMAND wget http://pjreddie.com/media/files/tiny-yolo-voc.weights -P ${PATH})
execute_process(COMMAND wget http://pjreddie.com/media/files/yolov2-tiny.weights -P ${PATH})
endif()

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

if(CATKIN_ENABLE_TESTING)
# Download yolo-voc.weights
# Download yolov2.weights
set(PATH "${CMAKE_CURRENT_SOURCE_DIR}/yolo_network_config/weights")
set(FILE "${PATH}/yolo-voc.weights")
message(STATUS "Checking and downloading yolo-voc.weights if needed ...")
set(FILE "${PATH}/yolov2.weights")
message(STATUS "Checking and downloading yolov2.weights if needed ...")
if (NOT EXISTS "${FILE}")
message(STATUS "... file does not exist. Downloading now ...")
execute_process(COMMAND wget http://pjreddie.com/media/files/yolo-voc.weights -P ${PATH})
execute_process(COMMAND wget http://pjreddie.com/media/files/yolov2.weights -P ${PATH})
endif()

find_package(rostest REQUIRED)
Expand Down
30 changes: 0 additions & 30 deletions darknet_ros/config/tiny_yolo_voc.yaml

This file was deleted.

Loading

0 comments on commit b0a9e28

Please sign in to comment.