weixin_48115164 2022-10-07 15:16 采纳率: 66.7%
浏览 884
已结题

训练yolov7遇上的问题

在pycharm上配置好yolov7的环境后,尝试运行时,出现了问题:
YOLOR 2022-10-6 torch 1.8.0+cpu CPU

Namespace(adam=False, artifact_alias='latest', batch_size=16, bbox_interval=-1, bucket='', cache_images=False, cfg='', data='data/coco.yaml', device='', entity=None, epochs=300, evolve=False, exist_ok=False, freeze=[0], global_rank=-1, hyp='data/hyp.scratch.p5.yaml', image_weights=False, img_size=[640, 640], label_smoothing=0.0, linear_lr=False, local_rank=-1, multi_scale=False, name='exp', noautoanchor=False, nosave=False, notest=False, project='runs/train', quad=False, rect=False, resume=False, save_dir='runs\train\exp4', save_period=-1, single_cls=False, sync_bn=False, total_batch_size=16, upload_dataset=False, v5_metric=False, weights='yolo7.pt', workers=8, world_size=1)
tensorboard: Start with 'tensorboard --logdir runs/train', view at http://localhost:6006/
2022-10-07 14:53:27.447945: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2022-10-07 14:53:27.448237: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
hyperparameters: lr0=0.01, lrf=0.1, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=0.05, cls=0.3, cls_pw=1.0, obj=0.7, obj_pw=1.0, iou_t=0.2, anchor_t=4.0, fl_gamma=0.0, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.2, scale=0.9, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.15, copy_paste=0.0, paste_in=0.15, loss_ota=1
wandb: Install Weights & Biases for YOLOR logging with 'pip install wandb' (recommended)

Traceback (most recent call last):
File "D:\毕业论文\yolov7-main\utils\google_utils.py", line 26, in attempt_download
assets = [x['name'] for x in response['assets']] # release assets
KeyError: 'assets'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:/毕业论文/yolov7-main/train.py", line 616, in
train(hyp, opt, device, tb_writer)
File "D:/毕业论文/yolov7-main/train.py", line 86, in train
attempt_download(weights) # download if not found locally
File "D:\毕业论文\yolov7-main\utils\google_utils.py", line 31, in attempt_download
tag = subprocess.check_output('git tag', shell=True).decode().split()[-1]
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 512, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'git tag' returned non-zero exit status 1.

  • 写回答

4条回答 默认 最新

  • 咿喃小记 2022-10-07 20:19
    关注

    应该是你没有提前下载好预训练权重放在本地,导致脚本使用git命令下载时连接超时。所以提前下载好对应网络结构的预训练权重应该就行了。此外,根据提示执行pip install wandb,以及配置一下可以调用cuda的tensorflow,不然炼的会特别慢的。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

问题事件

  • 系统已结题 10月16日
  • 已采纳回答 10月8日
  • 创建了问题 10月7日

悬赏问题

  • ¥15 状态机/汽车转向灯/Sateflow
  • ¥15 这个有点复杂 有没有人看看
  • ¥15 用python如何确定子孙元素在父元素中的位置
  • ¥15 obj文件滤除异常高程
  • ¥15 用mathematicas或者matlab计算三重积分
  • ¥15 Loop unrolling的runtime计算
  • ¥100 NVMe-oF的Target端,开启attr_offload后,测试失败。
  • ¥100 有偿照片马赛克去掉,保留原始数据
  • ¥15 c# winform http报错,如何解决?
  • ¥15 统计软件及应用-r软件