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

CFG file input dimension [advice] #44

Open
juanmed opened this issue Apr 21, 2019 · 4 comments
Open

CFG file input dimension [advice] #44

juanmed opened this issue Apr 21, 2019 · 4 comments

Comments

@juanmed
Copy link

juanmed commented Apr 21, 2019

Hello everyone,
First thanks to @ayooshkathuria for such a nice tutorial. Second I would like to point out that the input dimensions in the current version of the yolov3.cfg file from yolo repository (the one recommended to download in the tutorial part 2) contains a height = 608, width = 608. So you might encounter an error like this at some point:

RuntimeError: shape '[1, 255, 3025]' is invalid for input of size 689520

My suggestion is to change the yolov3.cfg to height=416, width = 416 as those are the dimensions used in the tutorial, particularly in line 14. Another solution is to resize the image to height = 608 and width = 608 when reading it, in the same line. A more general solution would be to read whatever dimensions are in the yolov3.cfg file and resize the image with those dimensions.

Cheers!

@kHarshit
Copy link

Thanks @juanmed You saved the day!

@SambhaviPD
Copy link

Many thanks to @ayooshkathuria for such a detailed and brilliantly explained tutorial.

@juanmed, Really nice of you to point out the config change. Was useful to me and to many others too I guess!

@aimxu
Copy link

aimxu commented Feb 29, 2020

Thank to the great and selfless tutorial by @ayooshkathuria and @juanmed, you save many people like us

@sisrfeng
Copy link

https://github.com/ayooshkathuria/pytorch-yolo-v3/blob/fbb4ef98d5a598f4c8eded6d618a599b7d289e2f/cfg/yolov3.cfg#L8
with=320


width=416

should width for training imgs be 320, 416 or 608?
Thanks!

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

5 participants