About the errors found in the Demo YOLOv5 project and the corresponding solutions

Problem 1: There is no solution for PyCharm code editing prompts

(82 messages) No code prompt after importing Opencv, solved in 1 second! _Living with a pig head.'s blog-CSDN blog_opencv has no code prompts

问题2: RuntimeError: result type Float can't be cast to the desired output type long int

(82 messages) One-step solution to RuntimeError: result type Float can't be cast to the desired output type long int_LANPangpang▸'s Blog-CSDN Blog

Question 3: Entering our \yolov5-4.0\runs\detect\exp folder, you can see that although there are result pictures, the recognition results are not framed.

(82 messages) Yolov5 can see that although there is a result picture, the recognition result is not framed_Mzgg's Blog-CSDN Blog_yolov5 has no frame

But the detection speed will be slower

问题4:RuntimeError: The size of tensor a (60) must match the size of tensor b (56) at non-singLeton dimension 3

(82 messages) RuntimeError reported in Pytorch: The size of tensor a (60) must match the size of tensor b (56)_Tingting's Programmer Station's Blog-CSDN Blog

This error occurs because you add the v6.1 SPPF class to common.py under the models file and add the import warnings package . This solution will cause the above error.

The basic method is:

Re-download the yolov5s.pt weight file

Download address: https://github.com/ultralytics/yolov5/releases/download/v5.0/yolov5s.pt

问题5:AttributeError: Can't get attribute 'SPPF' on <module 'models.common' from 'C:\\Users\\Administrator\\Desktop\\yolov5\\yolov5-5.0\\models\\common.py'>

(82 messages) YOLOv5-5.0 learning process - detect.py running error_Learning Notebook Blog-CSDN Blog_detect.py running

Re-download the yolov5s.pt weight file

Download address: https://github.com/ultralytics/yolov5/releases/download/v5.0/yolov5s.pt

Question 6: In project yolo v5, an AttributeError error occurs when the terminal executes the detect.py file.

(82 messages) [Resolved] AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'_Colynn Johnson's Blog-CSDN Blog

Guess you like

Origin blog.csdn.net/ggbb_4/article/details/127184967