DeepPlastic icon indicating copy to clipboard operation
DeepPlastic copied to clipboard

Error while using your weights as pretrained weights

Open Deadpool5549 opened this issue 3 years ago • 0 comments

Hi @gautamtata , I have used your yolov5s weights and code in colab notebook, but while running train.py or detect.py, I got the following error !python train.py --img 416 --batch 10 --epochs 10 --data '/content/data.yaml' --cfg ./models/custom_yolov5s.yaml --weights /content/best.pt --cache val: data=../data.yaml, weights=['/content/last.pt'], batch_size=32, imgsz=416, conf_thres=0.001, iou_thres=0.6, task=val, device=, workers=8, single_cls=False, augment=False, verbose=False, save_txt=False, save_hybrid=False, save_conf=False, save_json=False, project=runs/val, name=exp, exist_ok=False, half=True, dnn=False YOLOv5 🚀 v6.0-213-gd5966c9 torch 1.10.0+cu102 CUDA:0 (Tesla T4, 15110MiB)

Traceback (most recent call last): File "val.py", line 382, in main(opt) File "val.py", line 355, in main run(**vars(opt)) File "/usr/local/lib/python3.7/dist-packages/torch/autograd/grad_mode.py", line 28, in decorate_context return func(*args, **kwargs) File "val.py", line 139, in run model = DetectMultiBackend(weights, device=device, dnn=dnn, data=data) File "/content/yolov5/models/common.py", line 308, in init model = attempt_load(weights if isinstance(weights, list) else w, map_location=device) File "/content/yolov5/models/experimental.py", line 96, in attempt_load ckpt = torch.load(attempt_download(w), map_location=map_location) # load File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 600, in load with _open_zipfile_reader(opened_file) as opened_zipfile: File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 242, in init super(_open_zipfile_reader, self).init(torch._C.PyTorchFileReader(name_or_buffer)) RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

Deadpool5549 avatar Jan 26 '22 07:01 Deadpool5549