ros_openvino icon indicating copy to clipboard operation
ros_openvino copied to clipboard

Unable to use YOLOv3 model

Open Thomas-Merlet opened this issue 5 years ago • 11 comments

I'm trying to change the model used from MobileNet SSD to YOLOv3. I am using the Intel RealSense Camera D435 on Ubuntu 16.04 (LTS).

Steps taken:

  • Download tensorflow YOLOv3 here
  • Use the Model Optimizer to convert the model to IR representation (following this guide)
  • Place the IR in the models - folder
  • Change the launch file to use the models

Issue:

Terminal output as follows:

[object_detection-4] process has died [pid 20105, exit code 255, cmd /home/USERNAME/catkin_ws/devel/lib/ros_openvino/object_detection /object_detection/input_image:=/camera/color/image_raw /object_detection/input_depth:=/camera/aligned_depth_to_color/image_raw /object_detection/camera_info:=/camera/aligned_depth_to_color/camera_info __name:=object_detection __log:=/home/USERNAME/.ros/log/da83b362-b530-11ea-87a9-e454e8a1df6c/object_detection-4.log].

No output image is visible with boxes.

Best regards, Thomas

Thomas-Merlet avatar Jun 25 '20 10:06 Thomas-Merlet

Hi Thomas, could be this issue related?

gbr1 avatar Jun 25 '20 14:06 gbr1

Hi Giovanni,

Yes, might be a similar issue. I think this issue is related as well. YOLOv3 has 3 output layers which is not the current network output size.

Thomas-Merlet avatar Jun 26 '20 08:06 Thomas-Merlet

@Thomas-Merlet I think that the best way to preceed is to create a new node, called yolo3 to improve the performance

gbr1 avatar Jun 26 '20 13:06 gbr1

Hi, @Thomas-Merlet , I'm also interested in making this work. Did you fixed it?

Thanks

ajtudela avatar Jul 06 '20 15:07 ajtudela

Hi @ajtudela, the best way would be indeed to create a new detection node for YOLOv3, unfortunately I had no time to look at it yet.

Thomas-Merlet avatar Jul 16 '20 08:07 Thomas-Merlet

@ajtudela @Thomas-Merlet , probably in August I will have free time to work on it. I would also rearrange sources file creating some common interfaces/libraries.

N.B. If you are using only 1 myriad 2 or 1 myriad x chip, yolo v3 will be at slow fps. It is suggested to use one of the AAEON PCI board with more myriad x chip.

gbr1 avatar Jul 16 '20 08:07 gbr1

Hi, thanks @gbr1 ! I have one NCS2, it will go faster on a cpu rather than iin the myriad? Also, how the fps would be if using tiny-yolo v3?

ajtudela avatar Jul 27 '20 10:07 ajtudela

@ajtudela I used only mobilenet-ssd. With only 2d analysis I reach about 30fps on 800x600, if I remeber correctly. Obviously if you have a good cpu, it will be better. NCS2 is good for embedded. For example on Erwhi I used a Myriad X to not use CPU time for object detection.

gbr1 avatar Jul 27 '20 10:07 gbr1

Hi @gbr1 , about this, do you have a way to make sure it runs on NCS2? I don't see much difference in performance when changing the target, ant the top command gives the same usage.

Thomas-Merlet avatar Jul 28 '20 12:07 Thomas-Merlet

@Thomas-Merlet uhm, probably you need to ask on OpenVINO forum. My package runs only on VPU (or GPU) so you can be sure that it isn't running on CPU.

Note: CPU need FP32 models, Myriad FP16 models.

gbr1 avatar Jul 28 '20 12:07 gbr1

Not sure if you are still having issues, but YoloV3 is now fully supported by OpenVINO. But the best news is that they have included the conversion utility <converter.py> that will run all the downloads (eg darknet etc) and patches to TensorFlow to get it working. Have a look at the latest OpenVINO model Zoo, (and see the yaml file for details) https://github.com/openvinotoolkit/open_model_zoo/blob/master/models/public/yolo-v3-tf/model.yml Yolov4 is also available now.

IoTman avatar May 13 '21 21:05 IoTman