yolov5训练数据集,获取源超时

使用yolov5训练自己的数据集时,出现‘Command 'git fetch origin' timed out after 5 seconds’,请问各位朋友知道什么原因吗?

D:\Anaconda\python.exe D:/yolov5/train.py
train: weights=yolov5s.pt, cfg=models/yolov5s.yaml, data=data\face_reco.yaml, hyp=data\hyps\hyp.scratch-low.yaml, epochs=5, batch_size=2, imgsz=640, rect=False, resume=False, nosave=False, noval=False, noautoanchor=False, noplots=False, evolve=None, bucket=, cache=None, image_weights=False, device=, multi_scale=False, single_cls=False, optimizer=SGD, sync_bn=False, workers=4, project=runs\train, name=exp, exist_ok=False, quad=False, cos_lr=False, label_smoothing=0.0, patience=100, freeze=[0], save_period=-1, seed=0, local_rank=-1, entity=None, upload_dataset=False, bbox_interval=-1, artifact_alias=latest
fatal: unable to access 'https://github.com/ultralytics/yolov5/': Recv failure: Connection was reset
Command 'git fetch origin' timed out after 5 seconds
YOLOv5  v7.0-163-g016e046 Python-3.9.13 torch-1.13.1+cpu CPU

hyperparameters: lr0=0.01, lrf=0.01, 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.5, cls_pw=1.0, obj=1.0, 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.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0, copy_paste=0.0
ClearML: run 'pip install clearml' to automatically track, visualize and remotely train YOLOv5  in ClearML
Comet: run 'pip install comet_ml' to automatically track and visualize YOLOv5  runs in Comet
TensorBoard: Start with 'tensorboard --logdir runs\train', view at http://localhost:6006/

Dataset not found , missing paths ['D:\\olov5\\face_reco\\val\\images']
Traceback (most recent call last):
  File "D:\yolov5\train.py", line 643, in <module>
    main(opt)
  File "D:\yolov5\train.py", line 532, in main
    train(opt.hyp, opt, device, callbacks)
  File "D:\yolov5\train.py", line 113, in train
    data_dict = data_dict or check_dataset(data)  # check if None
  File "D:\yolov5\utils\general.py", line 567, in check_dataset
    raise Exception('Dataset not found ❌')
Exception: Dataset not found ❌

进程已结束,退出代码为 1


不知道你这个问题是否已经解决, 如果还没有解决的话:
  • 以下回答来自chatgpt:

    这可能是由于访问网络不稳定或者Git源的延迟导致的。可以尝试以下几个解决方案:

    1. 延长超时时间 在终端中使用下面的命令将超时时间延长到60秒:
    git config --global http.postBuffer 524288000
    git config --global http.timeout 60
    

    这里将超时时间设置为了60秒。如果还是超时的话,可以适当地修改这个值。

    1. 优化Git源 可以尝试换一个速度较快的Git源,比如使用GitHub Mirror镜像:
    git clone https://hub.fastgit.org/username/repo.git
    

    这里,将https://github.com/替换为https://hub.fastgit.org/,可以加速Git的下载速度。如果还是超时的话,可以试试其他的Git镜像。

    1. 检查网络连接 如果网络不稳定或者连接不畅,会导致下载时间过长或者失败。可以检查一下自己的网络连接是否正常,可以使用ping或者traceroute命令来测试网络连接状况。

    如果以上方法都没有解决问题,可能出现了其他错误,请详细查看错误提示,并搜索相关解决方案。


如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^

10s时间太短了。或者你环境不通。
https://blog.csdn.net/aduocd/article/details/54315824