tried to run yolov5 "detect.py" with pretrained model yolov8x.pt and xView.yaml #13291
Open
2 tasks done
Labels
bug
Something isn't working
Search before asking
YOLOv5 Component
No response
Bug
///////////////////////////////////////////////////////////////
My results 👍
//////////////////////////////////////////////////////////////
detect: weights=yolov8x.pt, source=E:\IA\splitting_3, data=data\xView.yaml, imgsz=[1024, 1024], conf_thres=0.25, iou_thres=0.45, max_det=1000, device=, view_img=False, save_txt=False, save_format=0, save_csv=False, save_conf=False, save_crop=False, nosave=False, classes=None, agnostic_nms=False, augment=False, visualize=False, update=False, project=runs\detect, name=exp, exist_ok=False, line_thickness=3, hide_labels=False, hide_conf=False, half=False, dnn=False, vid_stride=1
YOLOv5 2024-8-28 Python-3.9.7 torch-2.4.0+cpu CPU
Traceback (most recent call last):
File "I:\pythonProject5\detect.py", line 442, in
main(opt)
File "I:\pythonProject5\detect.py", line 437, in main
run(**vars(opt))
File "I:\pythonProject5.venv\lib\site-packages\torch\utils_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "I:\pythonProject5\detect.py", line 168, in run
model = DetectMultiBackend(weights, device=device, dnn=dnn, data=data, fp16=half)
File "I:\pythonProject5\models\common.py", line 489, in init
model = attempt_load(weights if isinstance(weights, list) else w, device=device, inplace=True, fuse=fuse)
File "I:\pythonProject5\models\experimental.py", line 98, in attempt_load
ckpt = torch.load(attempt_download(w), map_location="cpu") # load
File "I:\pythonProject5.venv\lib\site-packages\ultralytics\utils\patches.py", line 86, in torch_load
return _torch_load(*args, **kwargs)
File "I:\pythonProject5.venv\lib\site-packages\torch\serialization.py", line 1065, in load
with _open_file_like(f, 'rb') as opened_file:
File "I:\pythonProject5.venv\lib\site-packages\torch\serialization.py", line 468, in _open_file_like
return _open_file(name_or_buffer, mode)
File "I:\pythonProject5.venv\lib\site-packages\torch\serialization.py", line 449, in init
super().init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'yolov8x.pt'
Environment
No response
Minimal Reproducible Example
my changes in the default code :
parser.add_argument("--weights", nargs="+", type=str, default=ROOT / "yolov8x.pt", help="model path or triton URL")
#parser.add_argument("--source", type=str, default=ROOT / "data/images", help="file/dir/URL/glob/screen/0(webcam)")
parser.add_argument("--source", type=str, default= "E:\IA\splitting_3", help="file/dir/URL/glob/screen/0(webcam)")
parser.add_argument("--data", type=str, default=ROOT / "data/xView.yaml", help="(optional) dataset.yaml path")
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: