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

demo.py predict NO BBox on the 2 image in this repo #75

Open
Yeeesir opened this issue May 27, 2020 · 6 comments
Open

demo.py predict NO BBox on the 2 image in this repo #75

Yeeesir opened this issue May 27, 2020 · 6 comments

Comments

@Yeeesir
Copy link

Yeeesir commented May 27, 2020

python3 ./demo.py ./cfg/yolov4-custom.cfg ./weight/yolov4.pth ./data/dog.jpg
这是我用您给出的weight和cfg文件进行inference的命令,您看一下有什么问题吗?

顺便问一句,cfg/里面不同的配置文件的区别是什么,和weight文件有对应关系吗?需要配套使用吗?

@love2learn-7179
Copy link

love2learn-7179 commented May 27, 2020

@Dylanbron I think we need to use yolov4.weights instead of yolov4.pth for weightfile. For ./data/dog.jpg, I got below.

data/dog.jpg: Predicted in 0.207703 seconds.
truck: 0.925689
dog: 0.999999
bicycle: 1.000000
save plot results to predictions.jpg

@Yeeesir
Copy link
Author

Yeeesir commented May 28, 2020

Thank you! I find the weight file on the google drive

@Yeeesir
Copy link
Author

Yeeesir commented May 28, 2020

Have you trained the model by yourself? I'm wondering how to get .weights file from checkpoints.pth.

@love2learn-7179
Copy link

yes, I fine-tuned the model little bit to get updated .pth, then I used the updated .pth in models.py for inference.

@Yeeesir
Copy link
Author

Yeeesir commented May 29, 2020

Ok, I find that the model used in demo and evaluate_on_coco is darknet, and the model in train and model is Yolov4. Pretrained and checkpoints (pth) file should be used in Yolov4 model. I hope that this info can be updated in README, there may be some people who have not noticed like @Tianxiaomo

@yxwsfz
Copy link

yxwsfz commented Jun 25, 2020

@Dylanbron I think we need to use yolov4.weights instead of yolov4.pth for weightfile. For ./data/dog.jpg, I got below.

data/dog.jpg: Predicted in 0.207703 seconds.
truck: 0.925689
dog: 0.999999
bicycle: 1.000000
save plot results to predictions.jpg

您好,我下载了作者提供的参数文件,想运行demo.py 设置了和你说的相同的参数,但是没有结果,我打印了一下中间过程,在model(image)的输出结果就是nan,所以没有输出结果,想问下是什么原因,除了demo.py还有什么其他的地方需要修改吗?

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

3 participants