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

low fps and no bounding box on Tensorflow 2 #773

Open
sachinkmohan opened this issue Apr 25, 2022 · 5 comments
Open

low fps and no bounding box on Tensorflow 2 #773

sachinkmohan opened this issue Apr 25, 2022 · 5 comments

Comments

@sachinkmohan
Copy link

I was testing this repository https://github.com/susnato/keras-yolo3 by @susnato on Tensorflow 2.6.0

But when I run the below

python yolo_video.py --model model_data/yolo.h5  --input /home/mohan/git/backups/drive.mp4 --anchors model_data/yolo_anchors.txt --classes model_data/coco_classes.txt

I am getting low fps and no bounding boxes are generated too. Can someone please help.

I was getting the below error when running the inference before

ValueError: Subshape must have computed start >= end since stride is negative, but is 0 and 2 

So I applied the fix given here -> https://stackoverflow.com/questions/57558476/training-a-keras-model-yields-multiple-optimizer-errors

Now my output looks like the below.

low_fps_no_bounding_boxes_3-2022-04-25_20.22.42.mp4
@susnato
Copy link

susnato commented Apr 25, 2022

Hi @sachinkmohan , can you please provide some additional information about how to reproduce this issue? Any Colab notebook or something would be useful.
Actually I created TF 2.6 version of this repo a long time ago and don't remember the steps but will look for the cause of this issue and try to fix it.

@sachinkmohan
Copy link
Author

sachinkmohan commented Apr 26, 2022

Thanks @susnato for writing back! :)

I made a fork of your repository -> https://github.com/sachinkmohan/keras-yolo3
Make sure you checkout the tf_2.x_compatible branch to see the updated README file and commits.

Once you have everything in place just execute the below. Please make sure you convert and generate yolo.h5 file as given in the old README.

python yolo_video.py --model model_data/yolo.h5  --input /home/mohan/git/backups/drive.mp4 --anchors model_data/yolo_anchors.txt --classes model_data/coco_classes.txt

@ksk0629
Copy link

ksk0629 commented Sep 27, 2022

Did anyone solve this issue? I have the same issue. The prediction results look like it correctly found objects, but every bounding box is located left-top of the image.

@hv0905
Copy link

hv0905 commented Nov 19, 2022

Same problem, looking for the latest update of this issue

@ksk0629
Copy link

ksk0629 commented Nov 19, 2022

I figured out the problem was due to the shape.

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