AssertionError: File not found: data\hyps\hyp.scratch.yaml

D:\programfiles\miniconda\envs\py38torch_gpu\python.exe G:/spd-yolov5/SPD-Conv-main/YOLOv5-SPD/train.py --data ../air-filter/data.yaml --cfg models/space_depth_s.yaml --batch-size 32
train: weights=yolov5s.pt, cfg=models/space_depth_s.yaml, data=../air-filter/data.yaml, hyp=data\hyps\hyp.scratch.yaml, epochs=100, batch_size=32, imgsz=640, rect=False, resume=False, nosave=False, noval=False, noautoanchor=False, evolve=None, bucket=, cache=None, image_weights=False, device=, multi_scale=False, single_cls=False, adam=False, sync_bn=False, workers=0, project=runs\train, name=exp, exist_ok=False, quad=False, linear_lr=False, label_smoothing=0.0, patience=100, freeze=0, save_period=-1, local_rank=-1, entity=None, upload_dataset=False, bbox_interval=-1, artifact_alias=latest
github: skipping check (not a git repository), for updates see https://github.com/ultralytics/yolov5
requirements: tqdm>=4.64.0 not found and is required by YOLOv5, attempting auto-update...
WARNING: Ignoring invalid distribution -pencv-contrib-python (d:\programfiles\miniconda\envs\py38torch_gpu\lib\site-packages)
ERROR: Invalid requirement: "'tqdm"
WARNING: Ignoring invalid distribution -pencv-contrib-python (d:\programfiles\miniconda\envs\py38torch_gpu\lib\site-packages)
WARNING: Ignoring invalid distribution -pencv-contrib-python (d:\programfiles\miniconda\envs\py38torch_gpu\lib\site-packages)
WARNING: Ignoring invalid distribution -pencv-contrib-python (d:\programfiles\miniconda\envs\py38torch_gpu\lib\site-packages)
requirements: Command 'pip install 'tqdm>=4.64.0'' returned non-zero exit status 1.
requirements: tqdm>=4.64.0 not found and is required by YOLOv5, attempting auto-update...
WARNING: Ignoring invalid distribution -pencv-contrib-python (d:\programfiles\miniconda\envs\py38torch_gpu\lib\site-packages)
ERROR: Invalid requirement: "'tqdm"
WARNING: Ignoring invalid distribution -pencv-contrib-python (d:\programfiles\miniconda\envs\py38torch_gpu\lib\site-packages)
WARNING: Ignoring invalid distribution -pencv-contrib-python (d:\programfiles\miniconda\envs\py38torch_gpu\lib\site-packages)
WARNING: Ignoring invalid distribution -pencv-contrib-python (d:\programfiles\miniconda\envs\py38torch_gpu\lib\site-packages)

requirements: Command 'pip install 'tqdm>=4.64.0'' returned non-zero exit status 1.
file found
file found
file found

Traceback (most recent call last):
  File "G:/spd-yolov5/SPD-Conv-main/YOLOv5-SPD/train.py", line 632, in <module>
    main(opt)
  File "G:/spd-yolov5/SPD-Conv-main/YOLOv5-SPD/train.py", line 505, in main
    check_file(opt.data), check_yaml(opt.cfg), check_yaml(opt.hyp), str(opt.weights), str(opt.project)  # checks
  File "G:\spd-yolov5\SPD-Conv-main\YOLOv5-SPD\utils\general.py", line 306, in check_yaml
    return check_file(file, suffix)
  File "G:\spd-yolov5\SPD-Conv-main\YOLOv5-SPD\utils\general.py", line 327, in check_file
    assert len(files), f'File not found: {file}'  # assert file was found

AssertionError: File not found: data\hyps\hyp.scratch.yaml

 requirements: Command 'pip install 'tqdm>=4.64.0'' returned non-zero exit status 1.

 file found
file found
file found

在train.py文件同级目录下,缺少相应的requirements.txt文件,需要补充相应requirements.txt文件

 AssertionError: File not found: data\hyps\hyp.scratch.yaml

在对应的文件夹下,缺少相应的文件,可以重新命名一个或者直接在train.py文件中修改

 

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
AssertionError: image not found 是一个错误提示,意思是找不到图片。 这个错误通常发生在程序中需要加载图片文件的地方,但是找不到指定的图片文件导致加载失败。 出现这个错误的原因可能有以下几种: 1. 图片文件路径错误:程序中使用的图片文件路径指向的文件不存在或者路径错误,需要检查图片文件的路径是否正确。 2. 图片文件被移动/删除:如果图片文件被移动或者删除,那么加载图片时就会找不到文件,需要确认图片文件是否存在,并重新指定正确的路径。 3. 图片文件格式不受支持:如果程序中使用的图片文件格式不受支持,加载时就会失败。需要检查图片文件的格式,确保程序支持该格式。 4. 其他问题:还有一些其他可能的问题,比如文件权限问题、文件名大小写问题等,都可能导致图片加载失败。 为了解决这个问题,我们可以尝试以下几个步骤: 1. 检查图片文件路径是否正确,是否指向正确的文件。 2. 确认图片文件是否存在,如果不存在需要重新指定路径或者重新添加文件。 3. 检查图片文件格式是否受支持,如果不受支持可以尝试将图片文件转换为支持的格式。 4. 确认程序对图片文件的访问权限,如果没有权限需要修改文件权限。 5. 如果以上步骤均无效,可以尝试重新安装程序或者更新程序版本,以确保程序能正确加载图片。 综上所述,AssertionError: image not found 错误是由于找不到指定的图片文件导致加载失败所引起的。需要检查图片文件路径、存在性、格式以及访问权限等问题,并进行相应的调整和修复。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

长沙有肥鱼

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值