Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run detect.py #11

Closed
anujdutt9 opened this issue Nov 26, 2022 · 6 comments
Closed

Unable to run detect.py #11

anujdutt9 opened this issue Nov 26, 2022 · 6 comments

Comments

@anujdutt9
Copy link

Hi I am trying to run detect.py file using image as well as camera as input source, but in both cases I get this error:

Using CPU

Fusing layers...
Model Summary: 152 layers, 3.20299e+07 parameters, 0 gradients
image 1/1 /Users/user/Downloads/Temporal_YOLOv5/dataset/HGP/images/val2017/V00000118.png: Traceback (most recent call last):
  File "detect.py", line 170, in <module>
    detect()
  File "detect.py", line 73, in detect
    pred = model(img, augment=opt.augment)[0]
  File "/Users/user/miniconda3/envs/TYOLO/lib/python3.8/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/Users/user/Downloads/Temporal_YOLOv5/TYolov5/1 SConvLSTM/yolov5/models/yolo.py", line 186, in forward
    return self.forward_once(x, masksOP, profile)  # single-scale inference, train
  File "/Users/user/Downloads/Temporal_YOLOv5/TYolov5/1 SConvLSTM/yolov5/models/yolo.py", line 207, in forward_once
    x = m(x, masksOP)
  File "/Users/user/miniconda3/envs/TYOLO/lib/python3.8/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/Users/user/Downloads/Temporal_YOLOv5/TYolov5/1 SConvLSTM/yolov5/models/yolo.py", line 98, in forward
    cx = x[i].view(-1, self.sl, x[i].shape[1], x[i].shape[2], x[i].shape[3])
RuntimeError: shape '[-1, 2, 128, 80, 80]' is invalid for input of size 819200

I got this error running detect.py from both SConvLSTM as well as SQRNN folders.
I tried running this code with both PyTorch=1.6.0 / 1.7.1, but still the same issue.
Thanks.

@cccc18
Copy link

cccc18 commented Dec 15, 2023

Hello. I also encountered this problem. Have you solved it?

@anujdutt9
Copy link
Author

No, I was not able to solve it. But instead I created my own version of this from YOLOv5 v6.2 and was able to train a model successfully.

@cccc18
Copy link

cccc18 commented Jan 2, 2024

No, I was not able to solve it. But instead I created my own version of this from YOLOv5 v6.2 and was able to train a model successfully.

Hi Anuj. First of all, congratulations on reproducing the code. You are really awesome. I still haven't been able to solve this problem. I wonder if you can share it with me? I really want to learn this.

@anujdutt9
Copy link
Author

@cccc18 Yes, I am working on a Open version of that code. I'll make the repo public soon with the initial weights after testing for working and sanity, hopefully in the coming weeks.

@cccc18
Copy link

cccc18 commented Jan 2, 2024

@cccc18 Yes, I am working on a Open version of that code. I'll make the repo public soon with the initial weights after testing for working and sanity, hopefully in the coming weeks.

I'm glad to hear this and waiting for your open source code. My emails : doqi_huang@163.com. I hope you can contact me easily when you disclose the code. It doesn’t matter if you don’t contact me. I have already followed you and I will always pay attention to your github.Good luck!!

@cccc18
Copy link

cccc18 commented Feb 26, 2024

Hi Anuj. How are you recently? I wonder if you have successfully run this model? Looking forward to your open source code. good luck!

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

No branches or pull requests

2 participants