├── .gitignore ├── LICENSE ├── README.md ├── configs ├── Base-RCNN-C4.yaml ├── Base-RCNN-DilatedC5.yaml ├── Base-RCNN-FPN.yaml ├── Base-RetinaNet.yaml └── Distillation │ ├── FCOS │ ├── fcos_R_101_2xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistilIters=30k_preFreezeStudentBackboneIters=20k.yaml │ ├── fcos_R_101_dcnv2_2xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistilIters=30k_postNondistillIters=50k_preFreezeStudentBackboneIters=20k.yaml │ ├── fcos_R_50_2xMS_stuGuided_addCtxBox=NO_detachAppearanceEmbed=NO_preNondistilIters=30k_preFreezeStudentBackboneIters=20k.yaml │ └── fcos_X_101_dcnv2_2xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistilIters=30k_postNondistillIters=50k_preFreezeStudentBackboneIters=20k.yaml │ ├── FasterRCNN │ ├── faster_rcnn_R_101_2xMS_stuGuided_addCtxBox=NO_detachAppearanceEmbed=YES_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml │ ├── faster_rcnn_R_101_dcnv2_2xMS_stuGuided_addCtxBox=NO_detachAppearanceEmbed=YES_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml │ ├── faster_rcnn_R_50_2xMS_stuGuided_addCtxBox=NO_detachAppearanceEmbed=YES_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml │ └── faster_rcnn_X_101_dcnv2_2xMS_stuGuided_addCtxBox=NO_detachAppearanceEmbed=YES_preNondistillIters=30k_postNondistillIters=50k_preFreezeStudentBackboneIters=20k.yaml │ ├── MaskRCNN │ └── mask_rcnn_Swin_Tiny_3xMS_stuGuided_addCtxBox=NO_detachAppearanceEmbed=YES_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml │ └── RetinaNet │ ├── retinanet_R_101_2xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml │ ├── retinanet_R_101_dcnv2_2xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml │ ├── retinanet_R_50_2xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml │ ├── retinanet_Swin_Tiny_3xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml │ └── retinanet_X_101_dcnv2_2xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistillIters=30k_postNonDistillIters=50k_preFreezeStudentBackboneIters=20k.yaml ├── datasets ├── coco └── crowdHuman ├── models ├── adapters │ ├── __init__.py │ ├── build.py │ └── sequential_convs.py ├── base_distillator.py ├── customized_detectors │ ├── __init__.py │ ├── atss.py │ ├── build.py │ ├── dynamic_teacher │ │ ├── __init__.py │ │ ├── dynamic_teacher.py │ │ ├── label_encoder.py │ │ ├── layers.py │ │ ├── spatial_transformer.py │ │ └── utils.py │ ├── fcos.py │ ├── frcnn.py │ ├── poto.py │ ├── retinanet.py │ └── thirdparty_heads │ │ ├── __init__.py │ │ ├── atss.py │ │ ├── fcos.py │ │ ├── poto.py │ │ └── scale.py ├── distillator.py └── thirdparty_backbones │ ├── __init__.py │ └── swint │ ├── __init__.py │ ├── config.py │ └── swin_transformer.py ├── poster.png ├── requirements.txt ├── train.py └── utils ├── build.py └── dataset_mapper.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/README.md -------------------------------------------------------------------------------- /configs/Base-RCNN-C4.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/configs/Base-RCNN-C4.yaml -------------------------------------------------------------------------------- /configs/Base-RCNN-DilatedC5.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/configs/Base-RCNN-DilatedC5.yaml -------------------------------------------------------------------------------- /configs/Base-RCNN-FPN.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/configs/Base-RCNN-FPN.yaml -------------------------------------------------------------------------------- /configs/Base-RetinaNet.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/configs/Base-RetinaNet.yaml -------------------------------------------------------------------------------- /configs/Distillation/FCOS/fcos_R_101_2xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistilIters=30k_preFreezeStudentBackboneIters=20k.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/configs/Distillation/FCOS/fcos_R_101_2xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistilIters=30k_preFreezeStudentBackboneIters=20k.yaml -------------------------------------------------------------------------------- /configs/Distillation/FCOS/fcos_R_101_dcnv2_2xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistilIters=30k_postNondistillIters=50k_preFreezeStudentBackboneIters=20k.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/configs/Distillation/FCOS/fcos_R_101_dcnv2_2xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistilIters=30k_postNondistillIters=50k_preFreezeStudentBackboneIters=20k.yaml -------------------------------------------------------------------------------- /configs/Distillation/FCOS/fcos_R_50_2xMS_stuGuided_addCtxBox=NO_detachAppearanceEmbed=NO_preNondistilIters=30k_preFreezeStudentBackboneIters=20k.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/configs/Distillation/FCOS/fcos_R_50_2xMS_stuGuided_addCtxBox=NO_detachAppearanceEmbed=NO_preNondistilIters=30k_preFreezeStudentBackboneIters=20k.yaml -------------------------------------------------------------------------------- /configs/Distillation/FCOS/fcos_X_101_dcnv2_2xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistilIters=30k_postNondistillIters=50k_preFreezeStudentBackboneIters=20k.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/configs/Distillation/FCOS/fcos_X_101_dcnv2_2xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistilIters=30k_postNondistillIters=50k_preFreezeStudentBackboneIters=20k.yaml -------------------------------------------------------------------------------- /configs/Distillation/FasterRCNN/faster_rcnn_R_101_2xMS_stuGuided_addCtxBox=NO_detachAppearanceEmbed=YES_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/configs/Distillation/FasterRCNN/faster_rcnn_R_101_2xMS_stuGuided_addCtxBox=NO_detachAppearanceEmbed=YES_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml -------------------------------------------------------------------------------- /configs/Distillation/FasterRCNN/faster_rcnn_R_101_dcnv2_2xMS_stuGuided_addCtxBox=NO_detachAppearanceEmbed=YES_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/configs/Distillation/FasterRCNN/faster_rcnn_R_101_dcnv2_2xMS_stuGuided_addCtxBox=NO_detachAppearanceEmbed=YES_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml -------------------------------------------------------------------------------- /configs/Distillation/FasterRCNN/faster_rcnn_R_50_2xMS_stuGuided_addCtxBox=NO_detachAppearanceEmbed=YES_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/configs/Distillation/FasterRCNN/faster_rcnn_R_50_2xMS_stuGuided_addCtxBox=NO_detachAppearanceEmbed=YES_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml -------------------------------------------------------------------------------- /configs/Distillation/FasterRCNN/faster_rcnn_X_101_dcnv2_2xMS_stuGuided_addCtxBox=NO_detachAppearanceEmbed=YES_preNondistillIters=30k_postNondistillIters=50k_preFreezeStudentBackboneIters=20k.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/configs/Distillation/FasterRCNN/faster_rcnn_X_101_dcnv2_2xMS_stuGuided_addCtxBox=NO_detachAppearanceEmbed=YES_preNondistillIters=30k_postNondistillIters=50k_preFreezeStudentBackboneIters=20k.yaml -------------------------------------------------------------------------------- /configs/Distillation/MaskRCNN/mask_rcnn_Swin_Tiny_3xMS_stuGuided_addCtxBox=NO_detachAppearanceEmbed=YES_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/configs/Distillation/MaskRCNN/mask_rcnn_Swin_Tiny_3xMS_stuGuided_addCtxBox=NO_detachAppearanceEmbed=YES_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml -------------------------------------------------------------------------------- /configs/Distillation/RetinaNet/retinanet_R_101_2xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/configs/Distillation/RetinaNet/retinanet_R_101_2xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml -------------------------------------------------------------------------------- /configs/Distillation/RetinaNet/retinanet_R_101_dcnv2_2xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/configs/Distillation/RetinaNet/retinanet_R_101_dcnv2_2xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml -------------------------------------------------------------------------------- /configs/Distillation/RetinaNet/retinanet_R_50_2xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/configs/Distillation/RetinaNet/retinanet_R_50_2xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml -------------------------------------------------------------------------------- /configs/Distillation/RetinaNet/retinanet_Swin_Tiny_3xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/configs/Distillation/RetinaNet/retinanet_Swin_Tiny_3xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistillIters=30k_preFreezeStudentBackboneIters=20k.yaml -------------------------------------------------------------------------------- /configs/Distillation/RetinaNet/retinanet_X_101_dcnv2_2xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistillIters=30k_postNonDistillIters=50k_preFreezeStudentBackboneIters=20k.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/configs/Distillation/RetinaNet/retinanet_X_101_dcnv2_2xMS_stuGuided_addCtxBox=YES_detachAppearanceEmbed=NO_preNondistillIters=30k_postNonDistillIters=50k_preFreezeStudentBackboneIters=20k.yaml -------------------------------------------------------------------------------- /datasets/coco: -------------------------------------------------------------------------------- 1 | /data/Dataset/MSCOCO/ -------------------------------------------------------------------------------- /datasets/crowdHuman: -------------------------------------------------------------------------------- 1 | /data/Dataset/CrowdHuman/ -------------------------------------------------------------------------------- /models/adapters/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/adapters/__init__.py -------------------------------------------------------------------------------- /models/adapters/build.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/adapters/build.py -------------------------------------------------------------------------------- /models/adapters/sequential_convs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/adapters/sequential_convs.py -------------------------------------------------------------------------------- /models/base_distillator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/base_distillator.py -------------------------------------------------------------------------------- /models/customized_detectors/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/customized_detectors/__init__.py -------------------------------------------------------------------------------- /models/customized_detectors/atss.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/customized_detectors/atss.py -------------------------------------------------------------------------------- /models/customized_detectors/build.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/customized_detectors/build.py -------------------------------------------------------------------------------- /models/customized_detectors/dynamic_teacher/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/customized_detectors/dynamic_teacher/__init__.py -------------------------------------------------------------------------------- /models/customized_detectors/dynamic_teacher/dynamic_teacher.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/customized_detectors/dynamic_teacher/dynamic_teacher.py -------------------------------------------------------------------------------- /models/customized_detectors/dynamic_teacher/label_encoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/customized_detectors/dynamic_teacher/label_encoder.py -------------------------------------------------------------------------------- /models/customized_detectors/dynamic_teacher/layers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/customized_detectors/dynamic_teacher/layers.py -------------------------------------------------------------------------------- /models/customized_detectors/dynamic_teacher/spatial_transformer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/customized_detectors/dynamic_teacher/spatial_transformer.py -------------------------------------------------------------------------------- /models/customized_detectors/dynamic_teacher/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/customized_detectors/dynamic_teacher/utils.py -------------------------------------------------------------------------------- /models/customized_detectors/fcos.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/customized_detectors/fcos.py -------------------------------------------------------------------------------- /models/customized_detectors/frcnn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/customized_detectors/frcnn.py -------------------------------------------------------------------------------- /models/customized_detectors/poto.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/customized_detectors/poto.py -------------------------------------------------------------------------------- /models/customized_detectors/retinanet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/customized_detectors/retinanet.py -------------------------------------------------------------------------------- /models/customized_detectors/thirdparty_heads/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/customized_detectors/thirdparty_heads/__init__.py -------------------------------------------------------------------------------- /models/customized_detectors/thirdparty_heads/atss.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/customized_detectors/thirdparty_heads/atss.py -------------------------------------------------------------------------------- /models/customized_detectors/thirdparty_heads/fcos.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/customized_detectors/thirdparty_heads/fcos.py -------------------------------------------------------------------------------- /models/customized_detectors/thirdparty_heads/poto.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/customized_detectors/thirdparty_heads/poto.py -------------------------------------------------------------------------------- /models/customized_detectors/thirdparty_heads/scale.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/customized_detectors/thirdparty_heads/scale.py -------------------------------------------------------------------------------- /models/distillator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/distillator.py -------------------------------------------------------------------------------- /models/thirdparty_backbones/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/thirdparty_backbones/__init__.py -------------------------------------------------------------------------------- /models/thirdparty_backbones/swint/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/thirdparty_backbones/swint/__init__.py -------------------------------------------------------------------------------- /models/thirdparty_backbones/swint/config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/thirdparty_backbones/swint/config.py -------------------------------------------------------------------------------- /models/thirdparty_backbones/swint/swin_transformer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/models/thirdparty_backbones/swint/swin_transformer.py -------------------------------------------------------------------------------- /poster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/poster.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/requirements.txt -------------------------------------------------------------------------------- /train.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/train.py -------------------------------------------------------------------------------- /utils/build.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/utils/build.py -------------------------------------------------------------------------------- /utils/dataset_mapper.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megvii-research/LGD/HEAD/utils/dataset_mapper.py --------------------------------------------------------------------------------