dongdv95 / yolov5

61 stars 64 forks source link

error on executing track.py #2

Open s-4-m-a-n opened 2 years ago

s-4-m-a-n commented 2 years ago

deep_sort/deep/reid/torchreid/metrics/rank.py:11: UserWarning: Cython evaluation (very fast so highly recommended) is unavailable, now use python evaluation. warnings.warn( Successfully loaded imagenet pretrained weights from "/home/suman/.cache/torch/checkpoints/osnet_x0_25_imagenet.pth" Selected model type: osnet_x0_25 YOLOv5 🚀 2022-3-29 torch 1.11.0+cu102 CPU

YOLOv5 🚀 2022-3-29 torch 1.11.0+cu102 CPU

Fusing layers... Model Summary: 213 layers, 1867405 parameters, 0 gradients Traceback (most recent call last): File "/home/suman/Desktop/zummit projects/object detection/yolov5_deepsort/yolov5/Yolov5_DeepSort_Pytorch/track.py", line 278, in detect(opt) File "/home/suman/Desktop/zummit projects/object detection/yolov5_deepsort/yolov5/Yolov5_DeepSort_Pytorch/track.py", line 122, in detect pred = model(img, augment=opt.augment, visualize=visualize) File "/home/suman/.local/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, kwargs) File "/home/suman/Desktop/zummit projects/object detection/yolov5_deepsort/yolov5/Yolov5_DeepSort_Pytorch/yolov5/models/common.py", line 384, in forward y = self.model(im) if self.jit else self.model(im, augment=augment, visualize=visualize) File "/home/suman/.local/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, *kwargs) File "./yolov5/models/yolo.py", line 126, in forward return self._forward_once(x, profile, visualize) # single-scale inference, train File "./yolov5/models/yolo.py", line 149, in _forward_once x = m(x) # run File "/home/suman/.local/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(input, kwargs) File "/home/suman/.local/lib/python3.9/site-packages/torch/nn/modules/upsampling.py", line 154, in forward recompute_scale_factor=self.recompute_scale_factor) File "/home/suman/.local/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1185, in getattr raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'

s-4-m-a-n commented 2 years ago

Issue solved. "yolov5" folder needs to be updated. This issue is basically exist inside yolov5.

link to the yolov5 repo : https://github.com/ultralytics/yolov5

onagan5 commented 2 years ago

Hey man,I have the same problem as yours can u explain to me what to do exactly?

s-4-m-a-n commented 2 years ago

Hey man,I have the same problem as yours can u explain to me what to do exactly?

onagan5 commented 2 years ago

Thank you so much that really helped man.

On Tue, 5 Apr 2022 at 16:16, Suman @.***> wrote:

Hey man,I have the same problem as yours can u explain to me what to do exactly?

  • Clone this yolov5 repo https://github.com/ultralytics/yolov5
  • replace the yolov5 folder of this repo by the yolov5 folder you just cloned. You basically updating the outdated yolov5 model.

— Reply to this email directly, view it on GitHub https://github.com/dongdv95/yolov5/issues/2#issuecomment-1088850864, or unsubscribe https://github.com/notifications/unsubscribe-auth/AX5BYTPVWA5B6P2WQ7MBJVLVDRKMTANCNFSM5R47Y23Q . You are receiving this because you commented.Message ID: @.***>

pulkitv52 commented 1 year ago

ost recent call last): File "track.py", line 278, in detect(opt) File "track.py", line 110, in detect for frame_idx, (path, img, im0s, vid_cap, s) in enumerate(dataset): ValueError: not enough values to unpack (expected 5, got 4)

i am having this error while executing track.py please help