SparseR-CNN icon indicating copy to clipboard operation
SparseR-CNN copied to clipboard

When set num_heads = 1, doesnt train

Open abeyang00 opened this issue 3 years ago • 12 comments

First of all, thank you for the wonderful work. I have a quick question though.

I see you have set num_head = 6, meaning you iteratively update bounding box results 6 times before getting final output.

I wanted to see if i can just use 1 iteration so i set cfg.model.sparsercnn.num_heads = 1

But training does not go well and i get following result

Screenshot from 2021-02-22 10-59-26

AP only goes upto 3%...

Any suggestion to what i'm doing wrong? should i also set cfg.model.sparsercnn.deep_supervision = false? even though this is same as setting num_heads = 1?

Thank you!

abeyang00 avatar Feb 22 '21 01:02 abeyang00

Hi~ Do you change any other codes?

PeizeSun avatar Feb 23 '21 07:02 PeizeSun

@PeizeSun no i didnt change anything else. when i set num_heads=6, it trains well.

Its only when i set num_heads=1, it doesnt train well

abeyang00 avatar Feb 23 '21 14:02 abeyang00

when you set num_heads=6, is the final performance the same as our reported performance?

PeizeSun avatar Feb 25 '21 00:02 PeizeSun

In the paper AP is 42.3 but i reproduced 38%. Not the same but close enough.

abeyang00 avatar Feb 25 '21 03:02 abeyang00

Do you train on 8GPUs?

PeizeSun avatar Feb 25 '21 03:02 PeizeSun

No, just 1 gpu.

abeyang00 avatar Feb 25 '21 04:02 abeyang00

I guess only 1 gpu is the reason for 1 head not working.
The first head of proposal box and features is not dependent on input image, later heads are dependent. So only one head needs large batch size to provide statistic information. Usually training is on 8 gpus and batch size 16. If training on 1 gpu, small batch size can't provide effective statistic information.

PeizeSun avatar Feb 25 '21 08:02 PeizeSun

so if i only have 1 gpu and using 1 iteration head, i can't train the network??

abeyang00 avatar Mar 02 '21 07:03 abeyang00

Maybe reducing learning rate could help.

PeizeSun avatar Mar 03 '21 03:03 PeizeSun

thank you, i'll try it.

abeyang00 avatar Mar 04 '21 04:03 abeyang00

First of all, thank you for the wonderful work. I have a quick question though.

I see you have set num_head = 6, meaning you iteratively update bounding box results 6 times before getting final output.

I wanted to see if i can just use 1 iteration so i set cfg.model.sparsercnn.num_heads = 1

But training does not go well and i get following result

Screenshot from 2021-02-22 10-59-26

AP only goes upto 3%...

Any suggestion to what i'm doing wrong? should i also set cfg.model.sparsercnn.deep_supervision = false? even though this is same as setting num_heads = 1?

Thank you!

Hi,

Your plots look really nice and clean. Could you share how you plot the mAP trend from the log, please? Thank you a lot!

QinghangHong1 avatar May 28 '21 06:05 QinghangHong1