yolov5 yolov8 yolov10 Ultralytics 奇奇怪怪的错误汇总:【版本兼容,模型训练,数据加载,模型加速】

文章大纲

  • ultralytics YOLO 最新版本问题
    • Numpy is not available
  • 不同小版本的网络不兼容问题
    • RuntimeError: The expanded size of the tensor (1) must match...
    • RuntimeError: torch.cat(): Sizes of tensors must match except in dimension 1. Got 24 and 23 in dimension 2 (The offending index is 1)
    • YOLOv5 升级为 YOLOv6.1 支持 多格式模型文件推理 DetectMultiBackend
  • 训练技巧问题
    • 如何获取最好的训练结果,Tips for Best YOLO Training Results
    • multi-scale
    • windows 下 yolov5 OSError: [WinError ] The paging file is too small for this operation to complete.
    • windows 下 训练时候卡住不动的问题
    • 训练过程中,box,obj,cls 变为nan,Labels ,P,R 变为0
    • 训练最后出现:RuntimeError: CUDA error: CUBLAS_STATUS_NOT_INITIALIZED when calling cublasCreate(handle)
    • return F.conv2d(input, weight, bias, self.stride,RuntimeError: Unable to find a valid cuDNN algorithm to run convolution
    • 训练过程中:RuntimeError: Unable to find a valid cuDNN algorithm to run convolution
    • 自动化 batch size
  • 模型加载问题
    • DetectMultiBackend 部分 权重 跑到cpu 上去了
    • 单个GPU 推理多个不同版本的模型
    • AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'
    • onnx 动态 batch_size index: 0 Got: 2 Expected: 1
    • onnx 加速效果不如 pt
  • 模型推理问题与改进
    • cannot pickle 'cv2.VideoCapture' object
    • 提升小目标检测精度
    • ONNX 推理报错:ImportError: DLL load failed while importing onnxruntime_pybind11_state: A dynamic link library (DLL) initialization routine failed.
    • 剪枝、蒸馏、量化
  • 数据抓取与摄像头相关问题
    • 报错:[ WARN:[email protected]] global cap_msmf.cpp (1752) CvCapture_MSMF::grabFrame videoio(MSMF): can't grab frame.
    • RTSP 流 花屏,报错,[hevc @ 0x7ffea0a9c800] Could not find ref with POC
  • 配置参数相关问题
    • 日志
  • 参考文献与学习路径


最近用完yolov5给我的体验就是:

  1. 代码各个小版本都不相互兼容
  2. 上github 给提issue ,作者反应倒是很快,但是基本都是机器人回复
  3. 非常非常多的训练技巧,一不注意就掉坑里

ultralytics YOLO 最新版本问题

Numpy is not available


pip uninstall numpy

pip install "numpy<2"

https://stackoverflow.com/questions/71689095/how-to-solve-the-pytorch-runtimeerror-numpy-is-not-available-without-upgrading


不同小版本的网络不兼容问题

RuntimeError: The expanded

你可能感兴趣的:(人工智能系统解决方案与技术架构,深度学习,python,pytorch,yolov5)