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

General question #11

Open
jcgarciaca opened this issue Dec 13, 2017 · 1 comment
Open

General question #11

jcgarciaca opened this issue Dec 13, 2017 · 1 comment

Comments

@jcgarciaca
Copy link

Hello,
I am training YOLO with my own data. I started with some available examples and they worked well. Nevertheless, when using my data set the network doesn't find any object (although loss value is around 0.06). Since my images have big size with small objects, I read that anchor values must be adjusted, although it is not clear how to do it.

Then, I actually did the following:

  1. Get image width and size
  2. Get every object width and size in any image
  3. Calculate ratio object_width / image_width and object_height / image_height (here all values are less than 1)
  4. Calculate k-means clustering for those ratios
  5. Multiply the values by 13 (grid cell number) and use the values as anchors [w1, h1, w2, h2, ... w5, h5]

Is this process OK?

Thank you.

@Jumabek
Copy link
Owner

Jumabek commented Jan 21, 2018

Hi @jcgarciaca , sorry for late response.
assuming by size you refer to image height, your steps from 1-4 are correct.
However, step 5 is tricky part.
The number 13 comes from 416/32.
32 is downsampling factor and always stays same (unless you remove or add new conv layers).
416 is the height and width of the network input size

originally YOLO uses 416x416 input size. However, lets say you have 416x640 (width x height), then
your multiplication values should be
416/32 for width
640/32 for height

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