Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Initial release of Yolo v3 node #1202

Merged
merged 3 commits into from
Apr 9, 2018
Merged

[feature] Initial release of Yolo v3 node #1202

merged 3 commits into from
Apr 9, 2018

Conversation

amc-nu
Copy link
Member

@amc-nu amc-nu commented Apr 6, 2018

Status

PRODUCTION / DEVELOPMENT

Description

This nodes implements yolo v3 in Autoware. autowarefoundation/autoware_ai#116

Todos

  • Tests
    • CUDA 8.0
    • CUDA 9.0
  • Documentation

Steps to Test or Reproduce

  1. Checkout this branch.
  2. Follow instruction in README.md in the package.
  3. Compile ./catkin_make_release
  4. Download the pretrained model
  5. Pretrained model will be searched by default inside /darknet/data/ folder in the package. If the file is located in a different path, use the pretrained_model_file param in the launch file. Or select it using RTM
  6. Launch the node
  7. Play a rosbag with image data
  8. Open RVIZ and add Image Viewer
  9. Detections are published in /obj_car/image_obj and /obj_person/image_obj

Yolo v3 Autoware

@amc-nu amc-nu requested review from aohsato and kitsukawa April 6, 2018 13:30
@amc-nu amc-nu changed the title Initial release of Yolo v3 node [feature] Initial release of Yolo v3 node Apr 6, 2018
@kitsukawa
Copy link

@amc-nu Where can I get the model file for Yolo V3?

@amc-nu
Copy link
Member Author

amc-nu commented Apr 9, 2018

@kitsukawa
From the original author website:
https://pjreddie.com/media/files/yolov3.weights

@kitsukawa
Copy link

kitsukawa commented Apr 9, 2018

@amc-nu When launching the node, the error CUDA Error: unknown error: Permission denied occurs. Do you know the solution for this?

@amc-nu
Copy link
Member Author

amc-nu commented Apr 9, 2018

what cuda version are you using?
can you run nvidia-smi?

@kitsukawa
Copy link

CUDA 8.0

Mon Apr  9 13:49:12 2018       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.25                 Driver Version: 390.25                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX TIT...  Off  | 00000000:01:00.0  On |                  N/A |
| 28%   41C    P8    30W / 250W |    580MiB /  6074MiB |     15%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1093      G   /usr/bin/X                                   389MiB |
|    0      2244      G   compiz                                        99MiB |
|    0      4016      G   ...-token=E8C11D28B4461DB4E08B5771EBF6C094    54MiB |
|    0      4989      G   /opt/ros/indigo/lib/rviz/rviz                 30MiB |

@amc-nu
Copy link
Member Author

amc-nu commented Apr 9, 2018

can you also try to run deviceQuery app from CUDA examples?

@kitsukawa
Copy link

./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "GeForce GTX TITAN Black"
  CUDA Driver Version / Runtime Version          9.1 / 8.0
  CUDA Capability Major/Minor version number:    3.5
  Total amount of global memory:                 6075 MBytes (6369771520 bytes)
  (15) Multiprocessors, (192) CUDA Cores/MP:     2880 CUDA Cores
  GPU Max Clock rate:                            980 MHz (0.98 GHz)
  Memory Clock rate:                             3500 Mhz
  Memory Bus Width:                              384-bit
  L2 Cache Size:                                 1572864 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)
  Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 65536
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  2048
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 1 copy engine(s)
  Run time limit on kernels:                     Yes
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device PCI Domain ID / Bus ID / location ID:   0 / 1 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 9.1, CUDA Runtime Version = 8.0, NumDevs = 1, Device0 = GeForce GTX TITAN Black
Result = PASS

@amc-nu
Copy link
Member Author

amc-nu commented Apr 9, 2018

can you please show the error log after launching the node?

@kitsukawa
Copy link

['roslaunch', 'yolo3_detector', 'yolo3.launch', 'score_threshold:=0.5', 'nms_threshold:=0.45', 'image_src:=/image_raw', 'network_definition_file:=/home/kitsukawa/Autoware/ros/src/computing/perception/detection/packages/yolo3_detector/darknet/cfg/yolov3.cfg', 'pretrained_model_file:=/home/kitsukawa/Autoware/ros/src/computing/perception/detection/packages/yolo3_detector/darknet/data/yolov3.weights', 'gpu_device_id:=0', 'camera_id:=']
pid=9701
sched policy=OTHER prio=0
... logging to /home/kitsukawa/.ros/log/37bcbb22-3bae-11e8-9cb3-d0509946b845/roslaunch-lab-9701.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://lab:49728/

SUMMARY
========

PARAMETERS
* /rosdistro: indigo
* /rosversion: 1.11.21
* /yolo3_detector/gpu_device_id: 0
* /yolo3_detector/image_raw_node: //image_raw
* /yolo3_detector/network_definition_file: /home/kitsukawa/A...
* /yolo3_detector/nms_threshold: 0.45
* /yolo3_detector/pretrained_model_file: /home/kitsukawa/A...
* /yolo3_detector/score_threshold: 0.5

NODES
/
yolo3_detector (yolo3_detector/yolo3_detector)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
layer     filters    size              input                output
0 CUDA Error: unknown error: Permission denied
[ INFO] [1523249751.328316972]: Setting image node to //image_raw
[ INFO] [1523249751.328619999]: Network Definition File (Config): /home/kitsukawa/Autoware/ros/src/computing/perception/detection/packages/yolo3_detector/darknet/cfg/yolov3.cfg
[ INFO] [1523249751.328973700]: Pretrained Model File (Weights): /home/kitsukawa/Autoware/ros/src/computing/perception/detection/packages/yolo3_detector/darknet/data/yolov3.weights
[ INFO] [1523249751.329615928]: [yolo3_detector] score_threshold: 0.500000
[ INFO] [1523249751.330281136]: [yolo3_detector] nms_threshold: 0.450000
[ INFO] [1523249751.330293774]: Initializing Yolo3 on Darknet...
CUDA Error: unknown error
[yolo3_detector-1] process has died [pid 9758, exit code 255, cmd /home/kitsukawa/Autoware/ros/devel/lib/yolo3_detector/yolo3_detector __name:=yolo3_detector __log:=/home/kitsukawa/.ros/log/37bcbb22-3bae-11e8-9cb3-d0509946b845/yolo3_detector-1.log].
log file: /home/kitsukawa/.ros/log/37bcbb22-3bae-11e8-9cb3-d0509946b845/yolo3_detector-1*.log
process[yolo3_detector-1]: started with pid [9758]
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

@amc-nu amc-nu merged commit 962dd47 into develop Apr 9, 2018
@amc-nu amc-nu deleted the feature/yolo3 branch April 9, 2018 13:12
@Mor-harry
Copy link

@kitsukawa @amc-nu launching the node, the error CUDA Error: unknown error: Permission denied occurs. Do you know the solution for this?I still have this problem, in the latest version of 1.7.0.

anubhavashok pushed a commit to NuronLabs/autoware.ai that referenced this pull request Sep 7, 2021
* Initial release of Yolo v3 node

* Added extra documentation

* * Missing header include
@mitsudome-r mitsudome-r added the version:autoware-ai Autoware.AI label Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants