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

model detects a lot of object classes where there are none #456

Open
Marianoxis opened this issue Jul 5, 2022 · 1 comment
Open

model detects a lot of object classes where there are none #456

Marianoxis opened this issue Jul 5, 2022 · 1 comment

Comments

@Marianoxis
Copy link

Helo Bro! The yolov4.weights file in your github is down. I use the file from darknet (https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.weights), but the recognicion from the model detects a lot of object classes where there are none

Convert darknet weights to tensorflow

yolov4

python save_model.py --weights ./data/yolov4.weights --output ./checkpoints/yolov4-416 --input_size 416 --model yolov4

Run demo tensorflow

python detect.py --weights ./checkpoints/yolov4-416 --size 416 --model yolov4 --image ./data/kite.jpg

detection1

@Mercurise
Copy link

Hi @Marianoxis

I got the same mess detection issue yesterday. In my case, I used different cmd for model saving.

  • I added the extra --framework tf and --tiny False
  • For the weights, I also downloaded them from AB's repo and worked fine locally.

The issue is fixed by replacing --tiny False with --tiny=False. (the repo's demo cmd is correct).

For your case, I'd recommend to double check whether your saved model is valid w.r.t. number of layers, parameters, etc. It should have 110 conv2d layers and 602 layers in total.

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