mgonzs13 / yolo_ros

Ultralytics YOLOv8, YOLOv9, YOLOv10, YOLOv11 for ROS 2
GNU General Public License v3.0
336 stars 89 forks source link

[debug_node-3] AttributeError: module 'cv2' has no attribute 'Mat' #9

Closed mzahana closed 11 months ago

mzahana commented 1 year ago

Hi @mgonzs13 Thanks for the great repo.

I am using your latest main branch inside a docker container on Jetson Orin Nx with Ros2 container.

My Opncv version is 4.5.0

The debug_node throws the following error.

[debug_node-3] AttributeError: module 'cv2' has no attribute 'Mat'

Any idea what could be the issue ?

mgonzs13 commented 1 year ago

Hi @mzahana, I am using OpenCV 4.5.4 and opencv-python 4.8.0.76. Verify your opencv-python version, upgrading might be necessary.

raniaa03 commented 1 year ago

I am running into the same issue and have opencv-python 4.8.0.76 installed. Was there a fix found?

mgonzs13 commented 1 year ago

I have replaced cv2.Mat with np.array. This should solve it.