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

shape problem #4

Open
seogihyun opened this issue Oct 25, 2021 · 5 comments
Open

shape problem #4

seogihyun opened this issue Oct 25, 2021 · 5 comments

Comments

@seogihyun
Copy link

seogihyun commented Oct 25, 2021

캡처

I got a model_baddy.h5 file from weekenddeeplearning because your model.1 file does not operate.
However there is other problem "Cannot assign to variable conv2d/kernel:0 due to variable shape (3, 3, 3, 64) and value shape (64, 9, 3, 3) are incompatible".

I want to fix the shape.
Please let me know.

@seogihyun seogihyun changed the title Could not open yolov3.weights shape problem Oct 25, 2021
@Yasminbr
Copy link

Yasminbr commented Dec 9, 2021

Hey im isuuimg the same problem in my code too .
image

@Q2Learn
Copy link

Q2Learn commented Dec 14, 2021

I had the same problem and I had to check all the file names because some were Capital and some we Non Capital. Also some folder names had a '/' in front of it so if you're in working directory and not root directory than make sure your directory location is good as well as the file and folder names.

For example some files were Yolov3 instead of the yolov3 and '/VideoOutput' instead of 'video_output':

After changing my files and folders I have it working with:

!python3 "predict_video.py" --save_weights_path="weights_tracknet/model.1" --input_video_path="VideoInput/video_cut.mp4" --output_video_path="VideoOutput/video_output_MyTest.avi" --n_classes=256 --path_yolo_classes="yolov3/yolov3.txt" --path_yolo_weights="yolov3/yolov3.weights" --path_yolo_config="yolov3/yolov3.cfg"

Also check in file predict_video.py on line 66 that it's 'modelFN = trackNet' and not 'modelFN = tracknet'

@Gi-gigi
Copy link

Gi-gigi commented May 2, 2022

Hi @Q2Learn friend, I updated my path, but also ocurred:

`Traceback (most recent call last):
  File "tennis_tracking/predict_video.py", line 109, in <module>outs = net.forward(get_output_layers(net))
  File "tennis_tracking/TrackPlayers/trackplayers.py", line 10, in get_output_layers output_layers = [layer_names[i[0] - 1] 
for i in net.getUnconnectedOutLayers()]
  File "tennis_tracking/TrackPlayers/trackplayers.py", line 10, in <listcomp>
    output_layers = [layer_names[i[0] - 1] for i in net.getUnconnectedOutLayers()]

IndexError: invalid index to scalar variable.`

can u help me how to fix it? thank u~

@Q2Learn
Copy link

Q2Learn commented May 2, 2022

Hey,

I’m not sure. I haven’t worked with this algorithm in a while. And I’m not familiar with it. But check all your paths are correct in the code base because it’s looking for the model weights in specific locations. That’s how I got it to work anyhow.

@Gi-gigi
Copy link

Gi-gigi commented May 3, 2022

Hey friend @Q2Learn.
One more question, do u run this project on google colab? or personal PC?

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

4 participants