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

Training a 512x512 coco detector #2

Open
JimKlingshirn opened this issue Jun 17, 2019 · 2 comments
Open

Training a 512x512 coco detector #2

JimKlingshirn opened this issue Jun 17, 2019 · 2 comments

Comments

@JimKlingshirn
Copy link

I successfully trained a 512x512 resnet101 detector on coco, using your code, and Torch version 4.1 (python 2.7, cuda 10). It needed a couple of minor changes to the source code. In particular, the loss calculation in arm_loss.py and odm_loss.py requires division by float, instead of integer.

-        loss_l /= total_num
-        loss_c /= total_num
+        loss_l /= total_num.float()
+        loss_c /= total_num.float()

Using 4 GPUS and a batch size of 24, the ARM_conf_loss oscillated for several hundred iterations, but then it calmed down and trained normally. The final accuracy after 120K iterations is pretty good:

 Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.333
 Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.542
 Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = 0.358
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.153
 Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.385
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.476
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = 0.288
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = 0.444
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.472
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.257
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.535
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.636

Thanks for sharing your code.

@dd604
Copy link
Owner

dd604 commented Jun 18, 2019

That's great! Thank you too.

@dd604
Copy link
Owner

dd604 commented Apr 19, 2020

Now,the problem of oscillated loss has been solved ! Hope it will help.

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