YOLOv7检测视频报错解决-module ‘cv2.cv2‘ has no attribute ‘CAP_PROP_ORIENTATION_META‘

项目地址:https://github.com/ultralytics/yolov5/releases

报错信息:
module ‘cv2.cv2’ has no attribute ‘CAP_PROP_ORIENTATION_META’

解决方法:
YOLOv7检测视频报错解决-module ‘cv2.cv2‘ has no attribute ‘CAP_PROP_ORIENTATION_META‘_第1张图片
跳转到dataloader.py文件夹,把原始的值改成48
# self.orientation = int(self.cap.get(cv2.CAP_PROP_ORIENTATION_META)) # rotation degrees

self.orientation = int(self.cap.get(48)) # 替换

你可能感兴趣的:(报错解决,YOLO,python,开发语言)