fcos-gluon-cv icon indicating copy to clipboard operation
fcos-gluon-cv copied to clipboard

Getting Zeros from target generator for cls_targets, ctr_targets and box_targets

Open wms2537 opened this issue 5 years ago • 5 comments

[0. 0. 0. ... 0. 0. 0.] <NDArray 20938 @cpu(0)> [0. 0. 0. ... 0. 0. 0.] <NDArray 20938 @cpu(0)> [[0. 0. 0. 0.] [0. 0. 0. 0.] [0. 0. 0. 0.] ... [0. 0. 0. 0.] [0. 0. 0. 0.] [0. 0. 0. 0.]] <NDArray 20938x4 @cpu(0)> [[ 0. 0.] [128. 0.] [256. 0.] ... [976. 992.] [984. 992.] [992. 992.]] <NDArray 20938x2 @cpu(0)> I'm getting this from the target generator for cls_targets, ctr_targets, box_targets, cor_targets. My input image is (1000, 1000, 3) and the boxes are [291, 114, 901, 778, 60], [504, 263, 780, 490, 15], [461, 222, 829, 579, 20], [ 24, 205, 389, 800, 15] What is the possible cause for this? I'm using resnet50 as the base.

wms2537 avatar May 27 '19 10:05 wms2537

Hi, did you mean all zeros for the cls_targets, we follow your settings and run the following code, and the result seems normal.

img = nd.zeros(shape=(1000, 1000, 3))                    
boxes = nd.array([[291, 114, 901, 778, 60], [504, 263, 780, 490, 15],              
                             [461, 222, 829, 579, 20],  [24, 205, 389, 800, 15]], ctx=mx.cpu())                                                    
target_generator = FCOSTargetGenerator()                 
cls_targets, ctr_targets, box_targets, cor_targets = target_generator.generate_targets(img, boxes) 
print((cls_targets != 0).sum()) # 101
print((ctr_targets != 0).sum()) # 101

Angzz avatar May 27 '19 11:05 Angzz

But the model does not seem to converge after a few epochs. The mAp stays at around 0.001

wms2537 avatar May 27 '19 11:05 wms2537

we only train the model on coco dataset, and the results are slightly lower than the official version, for other datasets, you can change the warm iter, and dd you use the GN version? we find it make the training process more stable.

wms2537 [email protected] 于2019年5月27日周一 下午7:46写道:

But the model does not seem to converge after a few epochs. The mAp stays at around 0.001

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Angzz/fcos-gluon-cv/issues/2?email_source=notifications&email_token=AIHPPCA6KRTGPGGNJOKTMVDPXPCZZA5CNFSM4HP2VXV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWJS4FQ#issuecomment-496184854, or mute the thread https://github.com/notifications/unsubscribe-auth/AIHPPCB3JL3NKVDH4JE5NN3PXPCZZANCNFSM4HP2VXVQ .

Angzz avatar May 27 '19 11:05 Angzz

May I know what is the initial loss of your model? Or could you post your training plot ?

wms2537 avatar May 31 '19 10:05 wms2537

hi, here is my training loss. [image: image.png]

wms2537 [email protected] 于2019年5月31日周五 下午6:13写道:

May I know what is the initial loss of your model? Or could you post your training plot ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Angzz/fcos-gluon-cv/issues/2?email_source=notifications&email_token=AIHPPCB4WWXKLKFMO3TQUWTPYD26DA5CNFSM4HP2VXV2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWU2K2Y#issuecomment-497657195, or mute the thread https://github.com/notifications/unsubscribe-auth/AIHPPCCX6NU4J2KJFEJXI3DPYD26DANCNFSM4HP2VXVQ .

Angzz avatar Jun 01 '19 08:06 Angzz