colab找不到YOLOv3的重量文件

时间:2019-08-27 08:50:59

标签: deep-learning google-colaboratory yolo

我想用colab训练我的yolo3模型,

我将所有yolo3 git文件上传到了我的Google驱动器中,

然后我将google驱动器安装到colab, 之后,我创建了一个jupyter文件并编写了以下命令:

! python /content/drive/My\ Drive/Colab_Notebooks/yolo3/yolov3/train.py --data /content/drive/My\ Drive/Colab_Notebooks/yolo3/yolov3/data/captcha_data.data

但是我得到了这个错误:

Namespace(accumulate=2, batch_size=32, bucket='', cache_images=False, cfg='/content/drive/My Drive/Colab_Notebooks/yolo3/yolov3/cfg/yolov3-spp.cfg', data='/content/drive/My Drive/Colab_Notebooks/yolo3/yolov3/data/captcha_data.data', epochs=273, evolve=False, img_size=416, img_weights=False, multi_scale=False, nosave=False, notest=False, rect=False, resume=False, transfer=False)
Using CPU

data is  weights/darknet53.conv.74
Downloading https://pjreddie.com/media/files/darknet53.conv.74
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to create the file weights/darknet53.conv.74: No such file or 
Warning: directory
  0  154M    0 16077    0     0  41542      0  1:05:11 --:--:--  1:05:11 41542
curl: (23) Failed writing body (0 != 16077)
Traceback (most recent call last):
  File "/content/drive/My Drive/Colab_Notebooks/yolo3/yolov3/train.py", line 396, in <module>
    accumulate=opt.accumulate)
  File "/content/drive/My Drive/Colab_Notebooks/yolo3/yolov3/train.py", line 147, in train
    cutoff = load_darknet_weights(model, weights + 'darknet53.conv.74')
  File "/content/drive/My Drive/Colab_Notebooks/yolo3/yolov3/models.py", line 297, in load_darknet_weights

AssertionError: weights/darknet53.conv.74 missing, download from https://drive.google.com/drive/folders/1uxgUBemJVw9wZsdpboYbzUN4bcRhsuAI

在其中有一个名为weights的文件夹时,

  

darknet53.conv.74

我该如何解决?

1 个答案:

答案 0 :(得分:0)

您应该能够运行此程序并从pjreddie下载权重:

wget https://pjreddie.com/media/files/yolov3.weights