MuhammadMoinFaisal / YOLOv8-DeepSORT-Object-Tracking

YOLOv8 Object Tracking using PyTorch, OpenCV and DeepSORT
807 stars 222 forks source link

yolov8自己训练的模型,需要在ultralytics 8.0.3版本下训练才可以吗? #22

Open Chris-R-U opened 1 year ago

Chris-R-U commented 1 year ago

File "predict.py", line 253, in predict predictor() File "/home/wr/miniconda3/envs/yolov8_py38/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 26, in decorate_context return func(*args, kwargs) File "/home/wr/deepsort_python/YOLOv8-DeepSORT-Object-Tracking/ultralytics/yolo/engine/predictor.py", line 164, in call model = self.model if self.done_setup else self.setup(source, model) File "/home/wr/deepsort_python/YOLOv8-DeepSORT-Object-Tracking/ultralytics/yolo/engine/predictor.py", line 121, in setup model = AutoBackend(model, device=device, dnn=self.args.dnn, fp16=self.args.half) File "/home/wr/deepsort_python/YOLOv8-DeepSORT-Object-Tracking/ultralytics/nn/autobackend.py", line 73, in init model = attempt_load_weights(weights if isinstance(weights, list) else w, File "/home/wr/deepsort_python/YOLOv8-DeepSORT-Object-Tracking/ultralytics/nn/tasks.py", line 303, in attempt_load_weights ckpt = torch.load(attempt_download(w), map_location='cpu') # load File "/home/wr/miniconda3/envs/yolov8_py38/lib/python3.8/site-packages/torch/serialization.py", line 594, in load return _load(opened_zipfile, map_location, pickle_module, pickle_load_args) File "/home/wr/miniconda3/envs/yolov8_py38/lib/python3.8/site-packages/torch/serialization.py", line 853, in _load result = unpickler.load() ModuleNotFoundError: No module named 'ultralytics.nn.modules.conv'; 'ultralytics.nn.modules' is not a package

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

我更换了我自己训练的模型,在ultralytics 8.0.15环境下训练的yolov8s模型,但是替换后,报错上面

imbiganna commented 1 year ago

要在8.0.0上面訓練才可以動

Liuchuang-alt commented 1 year ago

Which platform are you running under ? linux or windows?

Chris-R-U commented 1 year ago

ubuntu18.04

Chris-R-U commented 1 year ago

要在8.0.0上面訓練才可以動

thanks ,我尝试一下

5858785 commented 1 year ago

I have the same problem. Have you solved it?

wzh195879702 commented 12 months ago

该怎么做呢,必须在8.0.0上吗

imbiganna commented 12 months ago

8.0.0上面訓練才可以用,不過現在的yolov8有tracking的算法了,沒有一定要用deepsort的話可以直接用官方的tracking就行了