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

darknet_ros node crashes with a single channel (mono / grayscale) image input [exit code -11] #422

Open
nickyblanch opened this issue Jan 26, 2024 · 0 comments
Labels

Comments

@nickyblanch
Copy link

Describe the bug
When the darknet_ros node is fed an image topic that is single-channel, it instantly reaches a segmentation fault. The fault originates from the rgbgr_image() function inside of image.c. (first and second screenshots below)

If that function is not used, more errors arise (third screenshot below).

YoloObjectDetector.cpp appears to have some functionality for handling mono images (fourth screenshot below).

Is there any way that grayscale images can be fed in for YOLOv3 object detection? I've changed channels=3 to channels=1 to in yolov3.cfg and provided weights for a custom trained YOLOv3 model that was trained on the same mono/grayscale image format.

To Reproduce
Steps to reproduce the behavior:

  1. Build darknet_ros.
  2. Set up custom weights and change params to search for those weights.
  3. Play a rosbag file including a grayscale sensor_msgs/Image topic.
  4. Launch darknet_ros_gdb.launch and see segementation fault.

Expected behavior
darknet_ros node should continue executing after subscribing to the sensor_msgs/Image topic.

Screenshots
image
image

image

image

System (please complete the following information):

  • OS: Ubuntu 20.04
  • ROS version: ROS Noetic
  • YOLOv3 Running on CPU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant