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

Light architectures for object detection #53

Closed
valery-kustov opened this issue Nov 19, 2020 · 5 comments
Closed

Light architectures for object detection #53

valery-kustov opened this issue Nov 19, 2020 · 5 comments

Comments

@valery-kustov
Copy link

Hi, Markus,

Cool repo for detection models.
I'm interested in more light architectures for object detection and tried to change VGG16 (SSD512_body and SSD300_body) to mobile_net or mobile_net_v2.
But I can't get an adequate quality for them on VOC dataset.
Metrics on 30 epoch:
loss 4.34212 conf_loss 0.02317 loc_loss 2.02536
precision 0.54101 recall 0.17049 fmeasure 0.25575 accuracy 0.86921
val_loss 4.28855 val_conf_loss 0.02258 val_loc_loss 2.03045
val_precision 0.49608 val_recall 0.16673 val_fmeasure 0.24578 val_accuracy 0.87617

Probably it's due to new feature maps or incompatibility between backbone and extra blocks or something in training pipeline.
Did you try to do the same? If yes, could you give your contact to discuss how to use these architectures in your repo?

Best Wishes,
Valery

@mvoelk
Copy link
Owner

mvoelk commented Nov 20, 2020

I haven't spent that much time training SSD. As far as I know, the VGG16 models are pre-trained on ImageNet. you could try the backbone in ssd_model_separable.py, with more features and more training data (MS COCO for instance.). I'm also not sure which parameters for data augmentation are best.

@mvoelk
Copy link
Owner

mvoelk commented Nov 20, 2020

See also #21 #37 I posted some lightweight architectures there.

@valery-kustov
Copy link
Author

Thank you. I'll train some models within few days and inform you about results.

@valery-kustov
Copy link
Author

Hi,

When you change backbone neural network to mobile net v1 (as an example) PriorUtil.encode() starts to exclude some initial samples (line 548 PriorUtil.encode(y) from ssd_data.Input_Generator). Therefore the network could not be trained correctly.
The reason is in iou function, overlap threshold and priors_norm, even with threshold==0.01 we lose some samples.

But I don't know the full logic of PriorMap and PriorUtil to understand, what's wrong.
I tested your realisation of the network from #21 (comment)
the error is kept.

For SSD300, SSD512, ssd_model_separable PriorUtil.encode() works well.

Could you support?

@mvoelk
Copy link
Owner

mvoelk commented Nov 30, 2020

Okay, this is known issue to me. I'm not sure what's wrong with the original assignment (ground truth to prior boxes). I investigated different assignment methods, which led to the condition in line 405.

You can set model.ssd_assignment = False or pass ssd_assignment=False to the PriorUtil.

I used the plot_assignment method to debug this behavior.

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