Decoupled-Classification-Refinement icon indicating copy to clipboard operation
Decoupled-Classification-Refinement copied to clipboard

Can you give a detailed explaination about DCR-v1 ? Especially the two .py codes in ./dcr_v1/.

Open KimSoybean opened this issue 7 years ago • 15 comments

KimSoybean avatar Oct 08 '18 02:10 KimSoybean

DCR-v1 is a stand-alone classification network aiming to suppress (hard) false positives in object detection. You can think DCR-v1 as a classifier and we use ResNet-152 in our paper. The input to DCR-v1 is a batch of images with size 3x224x224. Each image is a cropped proposal of base detector's output.

./dcr_v1/train_rcnn.py is used to train DCR-v1.
./dcr_v1/rcnn_rescore_combined_fast.py is used to combine DCR-v1 results with base detector's classification results (by simply multiplying two scores).

bowenc0221 avatar Oct 08 '18 03:10 bowenc0221

Hi @bowenc0221 ,

Can you please give me some ideas about how to process the different size ROI? Thz

0xTechSavvy avatar Oct 08 '18 04:10 0xTechSavvy

Thank you! I want to apply DCR-v1 on one-stage detector. Do you have some ideas about that?

KimSoybean avatar Oct 08 '18 04:10 KimSoybean

Hi @hongdayu ,

ROIs are first cropped on the original image and resized to 224x224. You may find this code helpful.

bowenc0221 avatar Oct 08 '18 05:10 bowenc0221

Hi @KimSoybean ,

Since one-stage detectors produces much more boxes than two-stage detectors (typically 300 for Faster RCNN), you may need decide a trade-off on how many boxes you want to process and how to select these boxes.

bowenc0221 avatar Oct 08 '18 05:10 bowenc0221

Thank you!@bowenc0221

KimSoybean avatar Oct 08 '18 07:10 KimSoybean

Hi @hongdayu ,

ROIs are first cropped on the original image and resized to 224x224. You may find this code helpful.

Thank you !!!

0xTechSavvy avatar Oct 09 '18 05:10 0xTechSavvy

In sampling strategies, some pad_indexes are randomly sampled in all boxes or null ( pad_indexes=[] ). This causes there are same samples in positive and negative samples. Do i misunderstand that?

KimSoybean avatar Oct 11 '18 09:10 KimSoybean

@KimSoybean The padding is needed to form a fixed-size batch. For example, if batchsize=32 but we only sampled 30 boxes, then we just pad it to 32 boxes and assign label -1 (ignored during training) for the padded boxes.

bowenc0221 avatar Oct 11 '18 14:10 bowenc0221

I see. Thank you. @bowenc0221

KimSoybean avatar Oct 12 '18 03:10 KimSoybean

Why you multiply two scores? This makes the original score become lower or do I misunderstand that?

KimSoybean avatar Oct 29 '18 07:10 KimSoybean

@KimSoybean

The reason is that the new classifier (DCR) is trained without location information. If we only use the scores from DCR, we observe very poor performance (DCR becomes RCNN in this case, due to different sampling strategy, it performs worse than RCNN when used along).

Yes, multiplying two scores will make the final score become lower. However, it is a reranking process. DCR decreases scores of False Positives (FPs) by a larger amount than True Positives (TPs). This makes the relative ranking changes and more FPs are suppressed by a predefined threshold. In the final evaluation process, only the relative ranking matters.

bowenc0221 avatar Oct 29 '18 14:10 bowenc0221

Thanks! @bowenc0221. Have you trained DCR for more than 9 epochs ? Will the over-fitting happen? I want to know more details because I'm using DCR for one-stage face detection.

KimSoybean avatar Nov 05 '18 03:11 KimSoybean

@KimSoybean I haven't trained it for more epochs. I simply trained the same number of epochs as used for training Faster RCNN and it might not be the optimal setting. However, I think overfitting might happen if you do not use any data augmentation. (one-stage detectors are trained for longer epochs because they have strong data augmentation)

bowenc0221 avatar Nov 05 '18 04:11 bowenc0221

Hi, I got another question for u~? how do you assign labels for the images handing to stage2 DCR model? (v1) is that exactly same as the standard of stage1?

emergencyd avatar May 21 '19 11:05 emergencyd