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

Detection with aspect ratio change #131

Closed
fishman2008 opened this issue Jul 19, 2017 · 1 comment
Closed

Detection with aspect ratio change #131

fishman2008 opened this issue Jul 19, 2017 · 1 comment

Comments

@fishman2008
Copy link

For instance, the input image has a resolution of 1600900. When it is resized to 416416 or other larger sizes, the detection will almost fail. One solution is to crop overlapped images to perform detection separately and then merge the results. Any better solutions available? Would it be possible to add the aspect ratio change to data augmentation?

@AlexeyAB
Copy link
Owner

The problem is not in the aspect ratio, but in low resolution. If the 1600 x 900 image has small objects, and if this image is resized to 416 x 416 then even a human will not be able to see these small objects.

The best solution is to set a higher network resolution, but not higher than image/video resolution. You can change random=0, width=736 and height=416 or better set random=0, width=800 and height=800 in the cfg-file and train your model for this aspect ratio. Then for detection use the same width=736 and height=416 in cfg file.


During training, when the image have been loaded - the augumentation occurs :


But you should know:

  1. First of all, the high network resolution is important (the higher - the better). I.e. 800 x 800 will be better than 736 x 416, even if your input image 1600 x 900.
  2. And only In second place in importance is the aspect ratio.

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