版本:yolov5-v5.0
环境:python3.8+anaconda3_2020.7+cuda10.1.105
数据集:FLIR_ADAS_1_3.tar
1、问题:ImportError: The _imagingft C module is not installed
在测试YOLO v5时出现错误提示:
ImportError: The _imagingft C module is not installed
经查是pillow库的问题
解决
windows系统
卸载pillow,重新安装
pip uninstall pillow
pip3 install pillow
加上 --no-cache-dir参数:
pip3 install pillow --no-cache-dir
Ubuntu系统
卸载同上
然后安装devel
sudo apt-get install libtiff-devel libjpeg-devel libzip-devel freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel
最后重新安装。
注:适用于代码中导入语句为:
from PIL import ImageFont
2、问题:train: Scanning ‘data\labels\train.cache’ images and labels… 0 found, 1000 missing, 0 empty, 0 corrupted: 100%

解决
(1)数据集格式不对
正确voc格式如下:train文件夹含images和labels两个文件夹,同样的,valid文件夹、test文件夹也都含images和labels两个文件夹

(2)yolov5数据集格式的label要求txt格式。

本文详细讲述了在使用YOLOv5进行开发时遇到的常见问题,包括解决Pillow库的imagingftC模块缺失、调整数据集格式、适配不同环境的torch和依赖包版本,以及下载和配置权重文件。通过实例和解决方案,帮助读者顺利运行YOLOv5。

3807

被折叠的 条评论
为什么被折叠?



