• Cheng-Yang Fu's avatar
    Add RetinaNet Implementation (#102) · 6b1ab017
    Cheng-Yang Fu authored
    * Add RetinetNet parameters in cfg.
    
    * hot fix.
    
    * Add the retinanet head module now.
    
    * Add the function to generate the anchors for RetinaNet.
    
    * Add the SigmoidFocalLoss cuda operator.
    
    * Fix the bug in the extra layers.
    
    * Change the normalizer for SigmoidFocalLoss
    
    * Support multiscale in training.
    
    * Add retinannet  training script.
    
    * Add the inference part of RetinaNet.
    
    * Fix the bug when building the extra layers in retinanet.
    Update the matching part in retinanet_loss.
    
    * Add the first version of the inference of RetinaNet.
    Need to check it again to see if is there any room for speed
    improvement.
    
    * Remove the  retinanet_R-50-FPN_2x.yaml first.
    
    * Optimize the retinanet postprocessing.
    
    * quick fix.
    
    * Add script for training RetinaNet with ResNet101 backbone.
    
    * Move cfg.RETINANET to cfg.MODEL.RETINANET
    
    * Remove the variables which are not used.
    
    * revert boxlist_ops.
    Generate Empty BoxLists instead of [] in retinanet_infer
    
    * Remove the not used commented lines.
    Add NUM_DETECTIONS_PER_IMAGE
    
    * remove the not used codes.
    
    * Move retinanet related files under Modeling/rpn/retinanet
    
    * Add retinanet_X_101_32x8d_FPN_1x.yaml script.
    This model is not fully validated. I only trained it around 5000
    iterations and everything is fine.
    
    * set RETINANET.PRE_NMS_TOP_N as 0 in level5 (p7), because previous setting may generate zero detections and could cause
    the program break.
    This part is used in original Detectron setting.
    
    * Fix the rpn only bug when the training ends.
    
    * Minor improvements
    
    * Comments and add Python-only implementation
    
    * Bugfix and remove commented code
    
    * keep the generalized_rcnn same.
    Move the build_retinanet inside build_rpn.
    
    * Add USE_C5 in the MODEL.RETINANET
    
    * Add two configs using P5 to generate P6.
    
    * fix the bug when loading the Caffe2 ImageNet pretrained model.
    
    * Reduce the code depulication of RPN loss and RetinaNet loss.
    
    * Remove the comment which is not used.
    
    * Remove the hard coded number of classes.
    
    * share the foward part of rpn inference.
    
    * fix the bug in rpn inference.
    
    * Remove the conditional part in the inference.
    
    * Bug fix: add the utils file for permute and flatten of the box
    prediction layers.
    
    * Update the comment.
    
    * quick fix. Adding import cat.
    
    * quick fix: forget including import.
    
    * Adjust the normalization part according to Detectron's setting.
    
    * Use the bbox reg normalization term.
    
    * Clean the code according to recent review.
    
    * Using CUDA version for training now. And the python version for training
    on cpu.
    
    * rename the directory to retinanet.
    
    * Make the train and val datasets are consistent with mask r-cnn setting.
    
    * add comment.
    6b1ab017