mats-robotics / yolov5_ros

A complete ROS interface for running YOLOv5 inference
GNU General Public License v3.0
220 stars 64 forks source link

report errors #7

Closed 1158138425 closed 1 year ago

1158138425 commented 2 years ago

My operation reported an error. Please help me find out the reason?

Traceback (most recent call last): File "/home/user/yolo_v5/devel/lib/yolov5_ros/detect.py", line 15, in exec(compile(fh.read(), python_script, 'exec'), context) File "/home/user/yolo_v5/src/yolov5_ros/src/detect.py", line 198, in detector = Yolov5Detector() File "/home/user/.local/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context return func(*args, *kwargs) File "/home/user/yolo_v5/src/yolov5_ros/src/detect.py", line 75, in init self.model.warmup(imgsz=(1 if self.pt else bs, 3, self.img_size), half=self.half) # warmup
TypeError: warmup() got an unexpected keyword argument 'half' [detect-1] process has died [pid 20159, exit code 1, cmd /home/user/yolo_v5/devel/lib/yolov5_ros/detect.py name:=detect log:=/home/user/.ros/log/e0f91f2a-0646-11ed-a3ff-c5becdac043e/detect-1.log]. log file: /home/user/.ros/log/e0f91f2a-0646-11ed-a3ff-c5becdac043e/detect-1*.log

nhatleminh1997 commented 2 years ago

Hi, please give more details on how to reproduce this error.

CaioRovetta15 commented 2 years ago

Just edit the detect.py file and remove everything inside the warmup brackets, like this: self.model.warmup()

nhatleminh1997 commented 1 year ago

@CaioRovetta15 's PR fixed it