ilyasmg / sort-deepsort-yolov3-ROS

Tracker ROS node (sort and deep sort) using darknet_ros (YOLOv3)
GNU General Public License v3.0
62 stars 23 forks source link

NameError: name 'detections' is not defined #12

Open xiaoleitongxue opened 2 years ago

xiaoleitongxue commented 2 years ago

I got a error NameError: name 'detections' is not defined I checked the track.py line 58, The detections was defined as global variable. I did't kown what cause this issue.

[ERROR] [1662190947.981701]: bad callback: <function callback_image at 0xffff93023310>
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "/home/nx/portable/catkin_workspace/src/sort-deepsort-yolov3-ROS-ros-noetic/sort_track/src/track.py", line 58, in callback_image
    cv2.rectangle(cv_rgb, (int(detections[0][0]), int(detections[0][1])), (int(detections[0][2]), int(detections[0][3])), (100, 255, 50), 1)
NameError: name 'detections' is not defined
losingby commented 2 years ago

maybe you can open video stream and darknet node

GiovanniBenitez commented 1 year ago

Running into the same error @xiaoleitongxue. Were you able to figure it out?