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

How to modify the image_size in the ssd/config directory #22

Closed
wangnamu opened this issue Dec 6, 2018 · 7 comments
Closed

How to modify the image_size in the ssd/config directory #22

wangnamu opened this issue Dec 6, 2018 · 7 comments

Comments

@wangnamu
Copy link

wangnamu commented Dec 6, 2018

Hello @qfgaohao , I want to reduce the image_size in the mobilenetv1_ssd_config.py file, such as from 300 to 100, if you adjust this, you do not need to modify specs = [
     SSDSpec(19, 16, SSDBoxSizes(60, 105), [2, 3]),
     SSDSpec(10, 32, SSDBoxSizes(105, 150), [2, 3]),
     SSDSpec(5, 64, SSDBoxSizes(150, 195), [2, 3]),
     SSDSpec(3, 100, SSDBoxSizes(195, 240), [2, 3]),
     SSDSpec(2, 150, SSDBoxSizes(240, 285), [2, 3]),
     SSDSpec(1, 300, SSDBoxSizes(285, 330), [2, 3])
],Thank you

@wangnamu
Copy link
Author

wangnamu commented Dec 6, 2018

:)

@qfgaohao
Copy link
Owner

qfgaohao commented Dec 6, 2018

Hi @wangnamu , you can modify mobilenetv1_ssd_config.py and mobilenetv1_ssd.py to use a new size. It's not very straightforward at the moment, as you have to coordinate the generated anchors/priors and the classification head. Understanding the process of anchor/prior generation can also help. Btw, if you aim to increase the speed, using a lighter base net might be easier and better than using smaller input. For example, using a mobile net with width_multi 0.5 will significantly increase the speed.

@wangnamu
Copy link
Author

wangnamu commented Dec 7, 2018

I will try a lighter base network, thank you very much.

@wangnamu wangnamu closed this as completed Dec 7, 2018
@jperezrua
Copy link

jperezrua commented Feb 26, 2019

@qfgaohao Hello there!
I am actually interested in trying input images of size 512x512. Can you please point me out in the rigth direction to achieve this?

I am currently using mobile_net_v2 by the way

Thanks a lot!

@HongChow
Copy link

HongChow commented Sep 18, 2019

Hi @wangnamu , you can modify mobilenetv1_ssd_config.py and mobilenetv1_ssd.py to use a new size. It's not very straightforward at the moment, as you have to coordinate the generated anchors/priors and the classification head. Understanding the process of anchor/prior generation can also help. Btw, if you aim to increase the speed, using a lighter base net might be easier and better than using smaller input. For example, using a mobile net with width_multi 0.5 will significantly increase the speed.

@qfgaohao hi, may I ask a stupid question: could we use the pretrained model if we used a total different image_size such as 900*900?

@qfgaohao
Copy link
Owner

@HongChow It may still help, even not as much as using pretrained models with similar data. As far as I know, transfer learning in computer vision is not working as well as in Natural Language Processing. Pretrained models mainly help weight intialization rather than final representation learning.

@phamkhactu
Copy link

Hi @qfgaohao I want to change config for car detection, I know that the config has used for 21 classifications, but i train the model again with car UA-Detrac. The model shows bad. such as: one car have 2 or 3 anchors predictions, not well to catch car. Thanks in adavance.

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