kuangliu / pytorch-retinanet

RetinaNet in PyTorch
993 stars 249 forks source link

Issue collection #11

Open kuangliu opened 7 years ago

kuangliu commented 7 years ago

Hey guys, I'm super busy the two weeks. Finally I get some time working on this. For now, let's fix the issue one by one.

@njtuzzy:

@kuangliu @Mendel1 In the encoder file, the output of "get_anchor_boxes" is the "xcenter,ycenter, xwidth, ywidth" format, it seems that it does not need to change to xxwh(I guess you mean xywh) using change_box_order function?

anchor_boxes is ordered as xywh, boxes is changed from xyxy to xywh with change_box_order:

boxes = change_box_order(boxes, 'xyxy2xywh')

Now they are both xywh. Any problems?

c0nn3r commented 7 years ago

I do you think you should look at my original list of issues, but I do understand too many comments were made.

Mendel1 commented 7 years ago

@kuangliu Can you upload your test result?Could your net predict correctly?

kuangliu commented 7 years ago

No. I know the loss is not working. I would like to know is there any bug in the encoder first.

Mendel1 commented 7 years ago

I think decode is wrong.At least it's not the way the paper indicates.

njtuzzy commented 7 years ago

@kuangliu yes you are correct !

kuangliu commented 7 years ago

Cool. I update the loss function. I'm still testing it. The loss vibrates. Not sure what's going wrong.

njtuzzy commented 7 years ago

@kuangliu may i ask the class label is from 0 to 20 for voc? 0 means background?

kuangliu commented 7 years ago

Yeah. Just as Faster RCNN.

njtuzzy commented 7 years ago

@kuangliu did you initalize the bias of final cov-layer as section 4.1 mentioned?

philokey commented 7 years ago

@kuangliu the latest code will get nan in training processing.

xueeinstein commented 7 years ago

@kuangliu the loss explodes while training like this:

image

If it works for you now, please publish a detection demo, if possible, with a available pytorch model. Thanks in advance!

kobehuai commented 6 years ago

the function encoder.decode is work? I try to run the test.py after training but find the score is null after score, labels = cls_preds.sigmoid().max(1), I guess the gt is encoded and the cls_preds and loc_preds don't need decode when training, so it works well. But something go wrong in the test process when the preds output need decode, are there something wrong in the encoder.decode func?

dami23 commented 6 years ago

@kuangliu Dear Kuangliu, where can I download the pretrained model metioned in the code? Could you give the address of the pretrained model? Thank you very much!!

kehaozhe commented 6 years ago

@kobehuai hi, have you solve this problems? I am working with the same question. thank you if you can share you solution.

kobehuai commented 6 years ago

@kehaozhe I find there are some nan samples in the cls_preds, so before the sigmoid, I set all the nan to -1: cls_preds[torch.isnan(cls_preds)] = -1 But the fundamental problem is that the network should not output nan, I still have not solved this problem.