WongKinYiu / yolov9

Implementation of paper - YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information
GNU General Public License v3.0
9.04k stars 1.44k forks source link

Error reported when running detect.py with parameter augment=True #76

Open Yoki185 opened 9 months ago

Yoki185 commented 9 months ago

Traceback (most recent call last): File "D:/project/yolov9-main/detect.py", line 232, in main(opt) File "D:/project/yolov9-main/detect.py", line 227, in main run(vars(opt)) File "D:\project\yolov7-main\venv\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(*args, *kwargs) File "D:/project/yolov9-main/detect.py", line 98, in run pred = model(im, augment=augment, visualize=visualize) File "D:\project\yolov7-main\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl return forward_call(args, kwargs) File "D:\project\yolov9-main\models\common.py", line 854, in forward y = self.model(im, augment=augment, visualize=visualize) if augment or visualize else self.model(im) File "D:\project\yolov7-main\venv\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl return forward_call(*args, **kwargs) File "D:\project\yolov9-main\models\yolo.py", line 578, in forward return self._forward_augment(x) # augmented inference, None File "D:\project\yolov9-main\models\yolo.py", line 590, in _forward_augment yi = self._descale_pred(yi, fi, si, img_size) File "D:\project\yolov9-main\models\yolo.py", line 598, in _descale_pred p[..., :4] /= scale # de-scale TypeError: list indices must be integers or slices, not tuple

alexHxun commented 9 months ago

I got the same problem

yazheng0307 commented 7 months ago

你好,这个问题解决了吗

KAKAROT12419 commented 7 months ago

anybody resolved this problem?