Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Error while using your weights as pretrained weights #5

Open
Deadpool5549 opened this issue Jan 26, 2022 · 0 comments
Open

Error while using your weights as pretrained weights #5

Deadpool5549 opened this issue Jan 26, 2022 · 0 comments

Comments

@Deadpool5549
Copy link

Deadpool5549 commented Jan 26, 2022

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant