Showing preview only (7,082K chars total). Download the full file or copy to clipboard to get everything.
Repository: jbwang1997/CrossKD
Branch: master
Commit: 87e156a46259
Files: 875
Total size: 31.0 MB
Directory structure:
gitextract_igmyqiaa/
├── .circleci/
│ ├── config.yml
│ ├── docker/
│ │ └── Dockerfile
│ └── test.yml
├── .dev_scripts/
│ ├── batch_test_list.py
│ ├── batch_train_list.txt
│ ├── benchmark_filter.py
│ ├── benchmark_full_models.txt
│ ├── benchmark_inference_fps.py
│ ├── benchmark_options.py
│ ├── benchmark_test.py
│ ├── benchmark_test_image.py
│ ├── benchmark_train.py
│ ├── benchmark_train_models.txt
│ ├── benchmark_valid_flops.py
│ ├── check_links.py
│ ├── convert_test_benchmark_script.py
│ ├── convert_train_benchmark_script.py
│ ├── covignore.cfg
│ ├── diff_coverage_test.sh
│ ├── download_checkpoints.py
│ ├── gather_models.py
│ ├── gather_test_benchmark_metric.py
│ ├── gather_train_benchmark_metric.py
│ ├── linter.sh
│ ├── test_benchmark.sh
│ ├── test_init_backbone.py
│ └── train_benchmark.sh
├── .github/
│ ├── CODE_OF_CONDUCT.md
│ ├── CONTRIBUTING.md
│ ├── ISSUE_TEMPLATE/
│ │ ├── config.yml
│ │ ├── error-report.md
│ │ ├── feature_request.md
│ │ ├── general_questions.md
│ │ └── reimplementation_questions.md
│ ├── pull_request_template.md
│ └── workflows/
│ └── deploy.yml
├── .gitignore
├── .owners.yml
├── .pre-commit-config-zh-cn.yaml
├── .pre-commit-config.yaml
├── .readthedocs.yml
├── CITATION.cff
├── LICENSE
├── MANIFEST.in
├── README.md
├── configs/
│ ├── _base_/
│ │ ├── datasets/
│ │ │ ├── cityscapes_detection.py
│ │ │ ├── cityscapes_instance.py
│ │ │ ├── coco_detection.py
│ │ │ ├── coco_instance.py
│ │ │ ├── coco_instance_semantic.py
│ │ │ ├── coco_panoptic.py
│ │ │ ├── deepfashion.py
│ │ │ ├── lvis_v0.5_instance.py
│ │ │ ├── lvis_v1_instance.py
│ │ │ ├── objects365v1_detection.py
│ │ │ ├── objects365v2_detection.py
│ │ │ ├── openimages_detection.py
│ │ │ ├── semi_coco_detection.py
│ │ │ ├── voc0712.py
│ │ │ └── wider_face.py
│ │ ├── default_runtime.py
│ │ ├── models/
│ │ │ ├── cascade-mask-rcnn_r50_fpn.py
│ │ │ ├── cascade-rcnn_r50_fpn.py
│ │ │ ├── fast-rcnn_r50_fpn.py
│ │ │ ├── faster-rcnn_r50-caffe-c4.py
│ │ │ ├── faster-rcnn_r50-caffe-dc5.py
│ │ │ ├── faster-rcnn_r50_fpn.py
│ │ │ ├── mask-rcnn_r50-caffe-c4.py
│ │ │ ├── mask-rcnn_r50_fpn.py
│ │ │ ├── retinanet_r50_fpn.py
│ │ │ ├── rpn_r50-caffe-c4.py
│ │ │ ├── rpn_r50_fpn.py
│ │ │ └── ssd300.py
│ │ └── schedules/
│ │ ├── schedule_1x.py
│ │ ├── schedule_20e.py
│ │ └── schedule_2x.py
│ ├── atss/
│ │ ├── README.md
│ │ ├── atss_r101_fpn_1x_coco.py
│ │ ├── atss_r101_fpn_8xb8-amp-lsj-200e_coco.py
│ │ ├── atss_r18_fpn_8xb8-amp-lsj-200e_coco.py
│ │ ├── atss_r50_fpn_1x_coco.py
│ │ ├── atss_r50_fpn_8xb8-amp-lsj-200e_coco.py
│ │ └── metafile.yml
│ ├── centernet/
│ │ ├── README.md
│ │ ├── centernet-update_r101_fpn_8xb8-amp-lsj-200e_coco.py
│ │ ├── centernet-update_r18_fpn_8xb8-amp-lsj-200e_coco.py
│ │ ├── centernet-update_r50-caffe_fpn_ms-1x_coco.py
│ │ ├── centernet-update_r50_fpn_8xb8-amp-lsj-200e_coco.py
│ │ ├── centernet_r18-dcnv2_8xb16-crop512-140e_coco.py
│ │ ├── centernet_r18_8xb16-crop512-140e_coco.py
│ │ ├── centernet_tta.py
│ │ └── metafile.yml
│ ├── crosskd/
│ │ ├── crosskd_r18_gflv1_r50_fpn_1x_coco.py
│ │ ├── crosskd_r18_retinanet_r50_fpn_1x_coco.py
│ │ ├── crosskd_r50_atss_r101_fpn_1x_coco.py
│ │ ├── crosskd_r50_fcos_r101-2x-ms_caffe_fpn_gn-head_2x_ms_coco.py
│ │ ├── crosskd_r50_gflv1_r101-2x-ms_fpn_1x_coco.py
│ │ ├── crosskd_r50_retinanet_r101_fpn_2x_coco.py
│ │ └── crosskd_r50_retinanet_swint_fpn_1x_coco.py
│ ├── crosskd+pkd/
│ │ ├── crosskd+pkd_r50_atss_r101_fpn_1x_coco.py
│ │ ├── crosskd+pkd_r50_fcos_r101-2x-ms_caffe_fpn_gn-head_2x_ms_coco.py
│ │ ├── crosskd+pkd_r50_gflv1_r101-2x-ms_fpn_1x_coco.py
│ │ └── crosskd+pkd_r50_retinanet_r101_fpn_2x_coco.py
│ ├── fcos/
│ │ ├── README.md
│ │ ├── fcos_r101-caffe_fpn_gn-head-1x_coco.py
│ │ ├── fcos_r101-caffe_fpn_gn-head_ms-640-800-2x_coco.py
│ │ ├── fcos_r101_fpn_gn-head-center-normbbox-centeronreg-giou_8xb8-amp-lsj-200e_coco.py
│ │ ├── fcos_r18_fpn_gn-head-center-normbbox-centeronreg-giou_8xb8-amp-lsj-200e_coco.py
│ │ ├── fcos_r50-caffe_fpn_gn-head-center-normbbox-centeronreg-giou_1x_coco.py
│ │ ├── fcos_r50-caffe_fpn_gn-head-center_1x_coco.py
│ │ ├── fcos_r50-caffe_fpn_gn-head_1x_coco.py
│ │ ├── fcos_r50-caffe_fpn_gn-head_4xb4-1x_coco.py
│ │ ├── fcos_r50-caffe_fpn_gn-head_ms-640-800-2x_coco.py
│ │ ├── fcos_r50-dcn-caffe_fpn_gn-head-center-normbbox-centeronreg-giou_1x_coco.py
│ │ ├── fcos_r50_fpn_gn-head-center-normbbox-centeronreg-giou_8xb8-amp-lsj-200e_coco.py
│ │ ├── fcos_x101-64x4d_fpn_gn-head_ms-640-800-2x_coco.py
│ │ └── metafile.yml
│ ├── gfl/
│ │ ├── README.md
│ │ ├── gfl_r101-dconv-c3-c5_fpn_ms-2x_coco.py
│ │ ├── gfl_r101_fpn_ms-2x_coco.py
│ │ ├── gfl_r50_fpn_1x_coco.py
│ │ ├── gfl_r50_fpn_ms-2x_coco.py
│ │ ├── gfl_x101-32x4d-dconv-c4-c5_fpn_ms-2x_coco.py
│ │ ├── gfl_x101-32x4d_fpn_ms-2x_coco.py
│ │ └── metafile.yml
│ ├── ld/
│ │ ├── README.md
│ │ ├── ld_r101-gflv1-r101-dcn_fpn_2x_coco.py
│ │ ├── ld_r18-gflv1-r101_fpn_1x_coco.py
│ │ ├── ld_r34-gflv1-r101_fpn_1x_coco.py
│ │ ├── ld_r50-gflv1-r101_fpn_1x_coco.py
│ │ └── metafile.yml
│ └── retinanet/
│ ├── README.md
│ ├── metafile.yml
│ ├── retinanet_r101-caffe_fpn_1x_coco.py
│ ├── retinanet_r101-caffe_fpn_ms-3x_coco.py
│ ├── retinanet_r101_fpn_1x_coco.py
│ ├── retinanet_r101_fpn_2x_coco.py
│ ├── retinanet_r101_fpn_8xb8-amp-lsj-200e_coco.py
│ ├── retinanet_r101_fpn_ms-640-800-3x_coco.py
│ ├── retinanet_r18_fpn_1x_coco.py
│ ├── retinanet_r18_fpn_1xb8-1x_coco.py
│ ├── retinanet_r18_fpn_8xb8-amp-lsj-200e_coco.py
│ ├── retinanet_r50-caffe_fpn_1x_coco.py
│ ├── retinanet_r50-caffe_fpn_ms-1x_coco.py
│ ├── retinanet_r50-caffe_fpn_ms-2x_coco.py
│ ├── retinanet_r50-caffe_fpn_ms-3x_coco.py
│ ├── retinanet_r50_fpn_1x_coco.py
│ ├── retinanet_r50_fpn_2x_coco.py
│ ├── retinanet_r50_fpn_8xb8-amp-lsj-200e_coco.py
│ ├── retinanet_r50_fpn_90k_coco.py
│ ├── retinanet_r50_fpn_amp-1x_coco.py
│ ├── retinanet_r50_fpn_ms-640-800-3x_coco.py
│ ├── retinanet_swin-t-p4-w7_fpn_1x_coco.py
│ ├── retinanet_tta.py
│ ├── retinanet_x101-32x4d_fpn_1x_coco.py
│ ├── retinanet_x101-32x4d_fpn_2x_coco.py
│ ├── retinanet_x101-64x4d_fpn_1x_coco.py
│ ├── retinanet_x101-64x4d_fpn_2x_coco.py
│ └── retinanet_x101-64x4d_fpn_ms-640-800-3x_coco.py
├── demo/
│ ├── MMDet_InstanceSeg_Tutorial.ipynb
│ ├── MMDet_Tutorial.ipynb
│ ├── create_result_gif.py
│ ├── image_demo.py
│ ├── inference_demo.ipynb
│ ├── video_demo.py
│ ├── video_gpuaccel_demo.py
│ └── webcam_demo.py
├── docker/
│ ├── Dockerfile
│ ├── serve/
│ │ ├── Dockerfile
│ │ ├── config.properties
│ │ └── entrypoint.sh
│ └── serve_cn/
│ └── Dockerfile
├── mmdet/
│ ├── __init__.py
│ ├── apis/
│ │ ├── __init__.py
│ │ ├── det_inferencer.py
│ │ └── inference.py
│ ├── datasets/
│ │ ├── __init__.py
│ │ ├── api_wrappers/
│ │ │ ├── __init__.py
│ │ │ └── coco_api.py
│ │ ├── base_det_dataset.py
│ │ ├── cityscapes.py
│ │ ├── coco.py
│ │ ├── coco_panoptic.py
│ │ ├── crowdhuman.py
│ │ ├── dataset_wrappers.py
│ │ ├── deepfashion.py
│ │ ├── lvis.py
│ │ ├── objects365.py
│ │ ├── openimages.py
│ │ ├── samplers/
│ │ │ ├── __init__.py
│ │ │ ├── batch_sampler.py
│ │ │ ├── class_aware_sampler.py
│ │ │ └── multi_source_sampler.py
│ │ ├── transforms/
│ │ │ ├── __init__.py
│ │ │ ├── augment_wrappers.py
│ │ │ ├── colorspace.py
│ │ │ ├── formatting.py
│ │ │ ├── geometric.py
│ │ │ ├── instaboost.py
│ │ │ ├── loading.py
│ │ │ ├── transforms.py
│ │ │ └── wrappers.py
│ │ ├── utils.py
│ │ ├── voc.py
│ │ ├── wider_face.py
│ │ └── xml_style.py
│ ├── engine/
│ │ ├── __init__.py
│ │ ├── hooks/
│ │ │ ├── __init__.py
│ │ │ ├── checkloss_hook.py
│ │ │ ├── mean_teacher_hook.py
│ │ │ ├── memory_profiler_hook.py
│ │ │ ├── num_class_check_hook.py
│ │ │ ├── pipeline_switch_hook.py
│ │ │ ├── set_epoch_info_hook.py
│ │ │ ├── sync_norm_hook.py
│ │ │ ├── utils.py
│ │ │ ├── visualization_hook.py
│ │ │ └── yolox_mode_switch_hook.py
│ │ ├── optimizers/
│ │ │ ├── __init__.py
│ │ │ └── layer_decay_optimizer_constructor.py
│ │ ├── runner/
│ │ │ ├── __init__.py
│ │ │ └── loops.py
│ │ └── schedulers/
│ │ ├── __init__.py
│ │ └── quadratic_warmup.py
│ ├── evaluation/
│ │ ├── __init__.py
│ │ ├── functional/
│ │ │ ├── __init__.py
│ │ │ ├── bbox_overlaps.py
│ │ │ ├── class_names.py
│ │ │ ├── mean_ap.py
│ │ │ ├── panoptic_utils.py
│ │ │ └── recall.py
│ │ └── metrics/
│ │ ├── __init__.py
│ │ ├── cityscapes_metric.py
│ │ ├── coco_metric.py
│ │ ├── coco_occluded_metric.py
│ │ ├── coco_panoptic_metric.py
│ │ ├── crowdhuman_metric.py
│ │ ├── dump_det_results.py
│ │ ├── dump_proposals_metric.py
│ │ ├── lvis_metric.py
│ │ ├── openimages_metric.py
│ │ └── voc_metric.py
│ ├── models/
│ │ ├── __init__.py
│ │ ├── backbones/
│ │ │ ├── __init__.py
│ │ │ ├── csp_darknet.py
│ │ │ ├── cspnext.py
│ │ │ ├── darknet.py
│ │ │ ├── detectors_resnet.py
│ │ │ ├── detectors_resnext.py
│ │ │ ├── efficientnet.py
│ │ │ ├── hourglass.py
│ │ │ ├── hrnet.py
│ │ │ ├── mobilenet_v2.py
│ │ │ ├── pvt.py
│ │ │ ├── regnet.py
│ │ │ ├── res2net.py
│ │ │ ├── resnest.py
│ │ │ ├── resnet.py
│ │ │ ├── resnext.py
│ │ │ ├── ssd_vgg.py
│ │ │ ├── swin.py
│ │ │ └── trident_resnet.py
│ │ ├── data_preprocessors/
│ │ │ ├── __init__.py
│ │ │ └── data_preprocessor.py
│ │ ├── dense_heads/
│ │ │ ├── __init__.py
│ │ │ ├── anchor_free_head.py
│ │ │ ├── anchor_head.py
│ │ │ ├── atss_head.py
│ │ │ ├── autoassign_head.py
│ │ │ ├── base_dense_head.py
│ │ │ ├── base_mask_head.py
│ │ │ ├── boxinst_head.py
│ │ │ ├── cascade_rpn_head.py
│ │ │ ├── centernet_head.py
│ │ │ ├── centernet_update_head.py
│ │ │ ├── centripetal_head.py
│ │ │ ├── condinst_head.py
│ │ │ ├── conditional_detr_head.py
│ │ │ ├── corner_head.py
│ │ │ ├── dab_detr_head.py
│ │ │ ├── ddod_head.py
│ │ │ ├── deformable_detr_head.py
│ │ │ ├── dense_test_mixins.py
│ │ │ ├── detr_head.py
│ │ │ ├── dino_head.py
│ │ │ ├── embedding_rpn_head.py
│ │ │ ├── fcos_head.py
│ │ │ ├── fovea_head.py
│ │ │ ├── free_anchor_retina_head.py
│ │ │ ├── fsaf_head.py
│ │ │ ├── ga_retina_head.py
│ │ │ ├── ga_rpn_head.py
│ │ │ ├── gfl_head.py
│ │ │ ├── guided_anchor_head.py
│ │ │ ├── lad_head.py
│ │ │ ├── ld_head.py
│ │ │ ├── mask2former_head.py
│ │ │ ├── maskformer_head.py
│ │ │ ├── nasfcos_head.py
│ │ │ ├── paa_head.py
│ │ │ ├── pisa_retinanet_head.py
│ │ │ ├── pisa_ssd_head.py
│ │ │ ├── reppoints_head.py
│ │ │ ├── retina_head.py
│ │ │ ├── retina_sepbn_head.py
│ │ │ ├── rpn_head.py
│ │ │ ├── rtmdet_head.py
│ │ │ ├── rtmdet_ins_head.py
│ │ │ ├── sabl_retina_head.py
│ │ │ ├── solo_head.py
│ │ │ ├── solov2_head.py
│ │ │ ├── ssd_head.py
│ │ │ ├── tood_head.py
│ │ │ ├── vfnet_head.py
│ │ │ ├── yolact_head.py
│ │ │ ├── yolo_head.py
│ │ │ ├── yolof_head.py
│ │ │ └── yolox_head.py
│ │ ├── detectors/
│ │ │ ├── __init__.py
│ │ │ ├── atss.py
│ │ │ ├── autoassign.py
│ │ │ ├── base.py
│ │ │ ├── base_detr.py
│ │ │ ├── boxinst.py
│ │ │ ├── cascade_rcnn.py
│ │ │ ├── centernet.py
│ │ │ ├── condinst.py
│ │ │ ├── conditional_detr.py
│ │ │ ├── cornernet.py
│ │ │ ├── crosskd_atss.py
│ │ │ ├── crosskd_fcos.py
│ │ │ ├── crosskd_gfl.py
│ │ │ ├── crosskd_retinanet.py
│ │ │ ├── crosskd_single_stage.py
│ │ │ ├── crowddet.py
│ │ │ ├── d2_wrapper.py
│ │ │ ├── dab_detr.py
│ │ │ ├── ddod.py
│ │ │ ├── deformable_detr.py
│ │ │ ├── detr.py
│ │ │ ├── dino.py
│ │ │ ├── fast_rcnn.py
│ │ │ ├── faster_rcnn.py
│ │ │ ├── fcos.py
│ │ │ ├── fovea.py
│ │ │ ├── fsaf.py
│ │ │ ├── gfl.py
│ │ │ ├── grid_rcnn.py
│ │ │ ├── htc.py
│ │ │ ├── kd_one_stage.py
│ │ │ ├── lad.py
│ │ │ ├── mask2former.py
│ │ │ ├── mask_rcnn.py
│ │ │ ├── mask_scoring_rcnn.py
│ │ │ ├── maskformer.py
│ │ │ ├── nasfcos.py
│ │ │ ├── paa.py
│ │ │ ├── panoptic_fpn.py
│ │ │ ├── panoptic_two_stage_segmentor.py
│ │ │ ├── point_rend.py
│ │ │ ├── queryinst.py
│ │ │ ├── reppoints_detector.py
│ │ │ ├── retinanet.py
│ │ │ ├── rpn.py
│ │ │ ├── rtmdet.py
│ │ │ ├── scnet.py
│ │ │ ├── semi_base.py
│ │ │ ├── single_stage.py
│ │ │ ├── single_stage_instance_seg.py
│ │ │ ├── soft_teacher.py
│ │ │ ├── solo.py
│ │ │ ├── solov2.py
│ │ │ ├── sparse_rcnn.py
│ │ │ ├── tood.py
│ │ │ ├── trident_faster_rcnn.py
│ │ │ ├── two_stage.py
│ │ │ ├── vfnet.py
│ │ │ ├── yolact.py
│ │ │ ├── yolo.py
│ │ │ ├── yolof.py
│ │ │ └── yolox.py
│ │ ├── layers/
│ │ │ ├── __init__.py
│ │ │ ├── activations.py
│ │ │ ├── bbox_nms.py
│ │ │ ├── brick_wrappers.py
│ │ │ ├── conv_upsample.py
│ │ │ ├── csp_layer.py
│ │ │ ├── dropblock.py
│ │ │ ├── ema.py
│ │ │ ├── inverted_residual.py
│ │ │ ├── matrix_nms.py
│ │ │ ├── msdeformattn_pixel_decoder.py
│ │ │ ├── normed_predictor.py
│ │ │ ├── pixel_decoder.py
│ │ │ ├── positional_encoding.py
│ │ │ ├── res_layer.py
│ │ │ ├── se_layer.py
│ │ │ └── transformer/
│ │ │ ├── __init__.py
│ │ │ ├── conditional_detr_layers.py
│ │ │ ├── dab_detr_layers.py
│ │ │ ├── deformable_detr_layers.py
│ │ │ ├── detr_layers.py
│ │ │ ├── dino_layers.py
│ │ │ ├── mask2former_layers.py
│ │ │ └── utils.py
│ │ ├── losses/
│ │ │ ├── __init__.py
│ │ │ ├── accuracy.py
│ │ │ ├── ae_loss.py
│ │ │ ├── balanced_l1_loss.py
│ │ │ ├── cross_entropy_loss.py
│ │ │ ├── dice_loss.py
│ │ │ ├── focal_loss.py
│ │ │ ├── gaussian_focal_loss.py
│ │ │ ├── gfocal_loss.py
│ │ │ ├── ghm_loss.py
│ │ │ ├── iou_loss.py
│ │ │ ├── kd_loss.py
│ │ │ ├── mse_loss.py
│ │ │ ├── pisa_loss.py
│ │ │ ├── pkd_loss.py
│ │ │ ├── seesaw_loss.py
│ │ │ ├── smooth_l1_loss.py
│ │ │ ├── utils.py
│ │ │ └── varifocal_loss.py
│ │ ├── necks/
│ │ │ ├── __init__.py
│ │ │ ├── bfp.py
│ │ │ ├── channel_mapper.py
│ │ │ ├── cspnext_pafpn.py
│ │ │ ├── ct_resnet_neck.py
│ │ │ ├── dilated_encoder.py
│ │ │ ├── dyhead.py
│ │ │ ├── fpg.py
│ │ │ ├── fpn.py
│ │ │ ├── fpn_carafe.py
│ │ │ ├── hrfpn.py
│ │ │ ├── nas_fpn.py
│ │ │ ├── nasfcos_fpn.py
│ │ │ ├── pafpn.py
│ │ │ ├── rfp.py
│ │ │ ├── ssd_neck.py
│ │ │ ├── ssh.py
│ │ │ ├── yolo_neck.py
│ │ │ └── yolox_pafpn.py
│ │ ├── roi_heads/
│ │ │ ├── __init__.py
│ │ │ ├── base_roi_head.py
│ │ │ ├── bbox_heads/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── bbox_head.py
│ │ │ │ ├── convfc_bbox_head.py
│ │ │ │ ├── dii_head.py
│ │ │ │ ├── double_bbox_head.py
│ │ │ │ ├── multi_instance_bbox_head.py
│ │ │ │ ├── sabl_head.py
│ │ │ │ └── scnet_bbox_head.py
│ │ │ ├── cascade_roi_head.py
│ │ │ ├── double_roi_head.py
│ │ │ ├── dynamic_roi_head.py
│ │ │ ├── grid_roi_head.py
│ │ │ ├── htc_roi_head.py
│ │ │ ├── mask_heads/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── coarse_mask_head.py
│ │ │ │ ├── dynamic_mask_head.py
│ │ │ │ ├── fcn_mask_head.py
│ │ │ │ ├── feature_relay_head.py
│ │ │ │ ├── fused_semantic_head.py
│ │ │ │ ├── global_context_head.py
│ │ │ │ ├── grid_head.py
│ │ │ │ ├── htc_mask_head.py
│ │ │ │ ├── mask_point_head.py
│ │ │ │ ├── maskiou_head.py
│ │ │ │ ├── scnet_mask_head.py
│ │ │ │ └── scnet_semantic_head.py
│ │ │ ├── mask_scoring_roi_head.py
│ │ │ ├── multi_instance_roi_head.py
│ │ │ ├── pisa_roi_head.py
│ │ │ ├── point_rend_roi_head.py
│ │ │ ├── roi_extractors/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── base_roi_extractor.py
│ │ │ │ ├── generic_roi_extractor.py
│ │ │ │ └── single_level_roi_extractor.py
│ │ │ ├── scnet_roi_head.py
│ │ │ ├── shared_heads/
│ │ │ │ ├── __init__.py
│ │ │ │ └── res_layer.py
│ │ │ ├── sparse_roi_head.py
│ │ │ ├── standard_roi_head.py
│ │ │ ├── test_mixins.py
│ │ │ └── trident_roi_head.py
│ │ ├── seg_heads/
│ │ │ ├── __init__.py
│ │ │ ├── base_semantic_head.py
│ │ │ ├── panoptic_fpn_head.py
│ │ │ └── panoptic_fusion_heads/
│ │ │ ├── __init__.py
│ │ │ ├── base_panoptic_fusion_head.py
│ │ │ ├── heuristic_fusion_head.py
│ │ │ └── maskformer_fusion_head.py
│ │ ├── task_modules/
│ │ │ ├── __init__.py
│ │ │ ├── assigners/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── approx_max_iou_assigner.py
│ │ │ │ ├── assign_result.py
│ │ │ │ ├── atss_assigner.py
│ │ │ │ ├── base_assigner.py
│ │ │ │ ├── center_region_assigner.py
│ │ │ │ ├── dynamic_soft_label_assigner.py
│ │ │ │ ├── grid_assigner.py
│ │ │ │ ├── hungarian_assigner.py
│ │ │ │ ├── iou2d_calculator.py
│ │ │ │ ├── match_cost.py
│ │ │ │ ├── max_iou_assigner.py
│ │ │ │ ├── multi_instance_assigner.py
│ │ │ │ ├── point_assigner.py
│ │ │ │ ├── region_assigner.py
│ │ │ │ ├── sim_ota_assigner.py
│ │ │ │ ├── task_aligned_assigner.py
│ │ │ │ └── uniform_assigner.py
│ │ │ ├── builder.py
│ │ │ ├── coders/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── base_bbox_coder.py
│ │ │ │ ├── bucketing_bbox_coder.py
│ │ │ │ ├── delta_xywh_bbox_coder.py
│ │ │ │ ├── distance_point_bbox_coder.py
│ │ │ │ ├── legacy_delta_xywh_bbox_coder.py
│ │ │ │ ├── pseudo_bbox_coder.py
│ │ │ │ ├── tblr_bbox_coder.py
│ │ │ │ └── yolo_bbox_coder.py
│ │ │ ├── prior_generators/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── anchor_generator.py
│ │ │ │ ├── point_generator.py
│ │ │ │ └── utils.py
│ │ │ └── samplers/
│ │ │ ├── __init__.py
│ │ │ ├── base_sampler.py
│ │ │ ├── combined_sampler.py
│ │ │ ├── instance_balanced_pos_sampler.py
│ │ │ ├── iou_balanced_neg_sampler.py
│ │ │ ├── mask_pseudo_sampler.py
│ │ │ ├── mask_sampling_result.py
│ │ │ ├── multi_instance_random_sampler.py
│ │ │ ├── multi_instance_sampling_result.py
│ │ │ ├── ohem_sampler.py
│ │ │ ├── pseudo_sampler.py
│ │ │ ├── random_sampler.py
│ │ │ ├── sampling_result.py
│ │ │ └── score_hlr_sampler.py
│ │ ├── test_time_augs/
│ │ │ ├── __init__.py
│ │ │ ├── det_tta.py
│ │ │ └── merge_augs.py
│ │ └── utils/
│ │ ├── __init__.py
│ │ ├── gaussian_target.py
│ │ ├── make_divisible.py
│ │ ├── misc.py
│ │ ├── panoptic_gt_processing.py
│ │ └── point_sample.py
│ ├── registry.py
│ ├── structures/
│ │ ├── __init__.py
│ │ ├── bbox/
│ │ │ ├── __init__.py
│ │ │ ├── base_boxes.py
│ │ │ ├── bbox_overlaps.py
│ │ │ ├── box_type.py
│ │ │ ├── horizontal_boxes.py
│ │ │ └── transforms.py
│ │ ├── det_data_sample.py
│ │ └── mask/
│ │ ├── __init__.py
│ │ ├── mask_target.py
│ │ ├── structures.py
│ │ └── utils.py
│ ├── testing/
│ │ ├── __init__.py
│ │ ├── _fast_stop_training_hook.py
│ │ └── _utils.py
│ ├── utils/
│ │ ├── __init__.py
│ │ ├── benchmark.py
│ │ ├── collect_env.py
│ │ ├── compat_config.py
│ │ ├── contextmanagers.py
│ │ ├── dist_utils.py
│ │ ├── logger.py
│ │ ├── memory.py
│ │ ├── misc.py
│ │ ├── profiling.py
│ │ ├── replace_cfg_vals.py
│ │ ├── setup_env.py
│ │ ├── split_batch.py
│ │ ├── typing_utils.py
│ │ ├── util_mixins.py
│ │ └── util_random.py
│ ├── version.py
│ └── visualization/
│ ├── __init__.py
│ ├── local_visualizer.py
│ └── palette.py
├── model-index.yml
├── projects/
│ ├── ConvNeXt-V2/
│ │ ├── README.md
│ │ └── configs/
│ │ └── mask-rcnn_convnext-v2-b_fpn_lsj-3x-fcmae_coco.py
│ ├── Detic/
│ │ ├── README.md
│ │ ├── configs/
│ │ │ └── detic_centernet2_swin-b_fpn_4x_lvis-coco-in21k.py
│ │ ├── demo.py
│ │ └── detic/
│ │ ├── __init__.py
│ │ ├── centernet_rpn_head.py
│ │ ├── detic_bbox_head.py
│ │ ├── detic_roi_head.py
│ │ ├── text_encoder.py
│ │ ├── utils.py
│ │ └── zero_shot_classifier.py
│ ├── DiffusionDet/
│ │ ├── README.md
│ │ ├── configs/
│ │ │ └── diffusiondet_r50_fpn_500-proposals_1-step_crop-ms-480-800-450k_coco.py
│ │ ├── diffusiondet/
│ │ │ ├── __init__.py
│ │ │ ├── diffusiondet.py
│ │ │ ├── head.py
│ │ │ └── loss.py
│ │ └── model_converters/
│ │ └── diffusiondet_resnet_to_mmdet.py
│ ├── EfficientDet/
│ │ ├── README.md
│ │ ├── configs/
│ │ │ └── efficientdet_effb0_bifpn_16xb8-crop512-300e_coco.py
│ │ ├── convert_tf_to_pt.py
│ │ └── efficientdet/
│ │ ├── __init__.py
│ │ ├── anchor_generator.py
│ │ ├── api_wrappers/
│ │ │ ├── __init__.py
│ │ │ └── coco_api.py
│ │ ├── bifpn.py
│ │ ├── coco_90class.py
│ │ ├── coco_90metric.py
│ │ ├── efficientdet.py
│ │ ├── efficientdet_head.py
│ │ ├── trans_max_iou_assigner.py
│ │ ├── utils.py
│ │ └── yxyx_bbox_coder.py
│ ├── SparseInst/
│ │ ├── README.md
│ │ ├── configs/
│ │ │ └── sparseinst_r50_iam_8xb8-ms-270k_coco.py
│ │ └── sparseinst/
│ │ ├── __init__.py
│ │ ├── decoder.py
│ │ ├── encoder.py
│ │ ├── loss.py
│ │ └── sparseinst.py
│ └── example_project/
│ ├── README.md
│ ├── configs/
│ │ └── faster-rcnn_dummy-resnet_fpn_1x_coco.py
│ └── dummy/
│ ├── __init__.py
│ └── dummy_resnet.py
├── pytest.ini
├── requirements/
│ ├── albu.txt
│ ├── build.txt
│ ├── docs.txt
│ ├── mminstall.txt
│ ├── optional.txt
│ ├── readthedocs.txt
│ ├── runtime.txt
│ └── tests.txt
├── requirements.txt
├── setup.cfg
├── setup.py
├── tests/
│ ├── test_apis/
│ │ ├── test_det_inferencer.py
│ │ └── test_inference.py
│ ├── test_datasets/
│ │ ├── test_cityscapes.py
│ │ ├── test_coco.py
│ │ ├── test_coco_api_wrapper.py
│ │ ├── test_coco_panoptic.py
│ │ ├── test_crowdhuman.py
│ │ ├── test_lvis.py
│ │ ├── test_objects365.py
│ │ ├── test_openimages.py
│ │ ├── test_pascal_voc.py
│ │ ├── test_samplers/
│ │ │ ├── test_batch_sampler.py
│ │ │ └── test_multi_source_sampler.py
│ │ ├── test_transforms/
│ │ │ ├── __init__.py
│ │ │ ├── test_augment_wrappers.py
│ │ │ ├── test_colorspace.py
│ │ │ ├── test_formatting.py
│ │ │ ├── test_geometric.py
│ │ │ ├── test_instaboost.py
│ │ │ ├── test_loading.py
│ │ │ ├── test_transforms.py
│ │ │ ├── test_wrappers.py
│ │ │ └── utils.py
│ │ └── test_tta.py
│ ├── test_engine/
│ │ ├── __init__.py
│ │ ├── test_hooks/
│ │ │ ├── test_checkloss_hook.py
│ │ │ ├── test_mean_teacher_hook.py
│ │ │ ├── test_memory_profiler_hook.py
│ │ │ ├── test_num_class_check_hook.py
│ │ │ ├── test_sync_norm_hook.py
│ │ │ ├── test_visualization_hook.py
│ │ │ └── test_yolox_mode_switch_hook.py
│ │ ├── test_optimizers/
│ │ │ ├── __init__.py
│ │ │ └── test_layer_decay_optimizer_constructor.py
│ │ ├── test_runner/
│ │ │ └── test_loops.py
│ │ └── test_schedulers/
│ │ └── test_quadratic_warmup.py
│ ├── test_evaluation/
│ │ └── test_metrics/
│ │ ├── __init__.py
│ │ ├── test_cityscapes_metric.py
│ │ ├── test_coco_metric.py
│ │ ├── test_coco_occluded_metric.py
│ │ ├── test_coco_panoptic_metric.py
│ │ ├── test_crowdhuman_metric.py
│ │ ├── test_dump_det_results.py
│ │ ├── test_lvis_metric.py
│ │ └── test_openimages_metric.py
│ ├── test_models/
│ │ ├── test_backbones/
│ │ │ ├── __init__.py
│ │ │ ├── test_csp_darknet.py
│ │ │ ├── test_detectors_resnet.py
│ │ │ ├── test_efficientnet.py
│ │ │ ├── test_hourglass.py
│ │ │ ├── test_hrnet.py
│ │ │ ├── test_mobilenet_v2.py
│ │ │ ├── test_pvt.py
│ │ │ ├── test_regnet.py
│ │ │ ├── test_renext.py
│ │ │ ├── test_res2net.py
│ │ │ ├── test_resnest.py
│ │ │ ├── test_resnet.py
│ │ │ ├── test_swin.py
│ │ │ ├── test_trident_resnet.py
│ │ │ └── utils.py
│ │ ├── test_data_preprocessors/
│ │ │ ├── test_batch_resize.py
│ │ │ ├── test_boxinst_preprocessor.py
│ │ │ └── test_data_preprocessor.py
│ │ ├── test_dense_heads/
│ │ │ ├── test_anchor_head.py
│ │ │ ├── test_atss_head.py
│ │ │ ├── test_autoassign_head.py
│ │ │ ├── test_boxinst_head.py
│ │ │ ├── test_cascade_rpn_head.py
│ │ │ ├── test_centernet_head.py
│ │ │ ├── test_centernet_update_head.py
│ │ │ ├── test_centripetal_head.py
│ │ │ ├── test_condinst_head.py
│ │ │ ├── test_corner_head.py
│ │ │ ├── test_ddod_head.py
│ │ │ ├── test_embedding_rpn_head.py
│ │ │ ├── test_fcos_head.py
│ │ │ ├── test_fovea_head.py
│ │ │ ├── test_free_anchor_head.py
│ │ │ ├── test_fsaf_head.py
│ │ │ ├── test_ga_retina_head.py
│ │ │ ├── test_ga_rpn_head.py
│ │ │ ├── test_gfl_head.py
│ │ │ ├── test_guided_anchor_head.py
│ │ │ ├── test_lad_head.py
│ │ │ ├── test_ld_head.py
│ │ │ ├── test_nasfcos_head.py
│ │ │ ├── test_paa_head.py
│ │ │ ├── test_pisa_retinanet_head.py
│ │ │ ├── test_pisa_ssd_head.py
│ │ │ ├── test_reppoints_head.py
│ │ │ ├── test_retina_sepBN_head.py
│ │ │ ├── test_rpn_head.py
│ │ │ ├── test_sabl_retina_head.py
│ │ │ ├── test_solo_head.py
│ │ │ ├── test_solov2_head.py
│ │ │ ├── test_ssd_head.py
│ │ │ ├── test_tood_head.py
│ │ │ ├── test_vfnet_head.py
│ │ │ ├── test_yolo_head.py
│ │ │ ├── test_yolof_head.py
│ │ │ └── test_yolox_head.py
│ │ ├── test_detectors/
│ │ │ ├── test_conditional_detr.py
│ │ │ ├── test_cornernet.py
│ │ │ ├── test_dab_detr.py
│ │ │ ├── test_deformable_detr.py
│ │ │ ├── test_detr.py
│ │ │ ├── test_dino.py
│ │ │ ├── test_kd_single_stage.py
│ │ │ ├── test_maskformer.py
│ │ │ ├── test_panoptic_two_stage_segmentor.py
│ │ │ ├── test_rpn.py
│ │ │ ├── test_semi_base.py
│ │ │ ├── test_single_stage.py
│ │ │ ├── test_single_stage_instance_seg.py
│ │ │ └── test_two_stage.py
│ │ ├── test_layers/
│ │ │ ├── __init__.py
│ │ │ ├── test_brick_wrappers.py
│ │ │ ├── test_conv_upsample.py
│ │ │ ├── test_ema.py
│ │ │ ├── test_inverted_residual.py
│ │ │ ├── test_plugins.py
│ │ │ ├── test_position_encoding.py
│ │ │ ├── test_se_layer.py
│ │ │ └── test_transformer.py
│ │ ├── test_losses/
│ │ │ ├── test_gaussian_focal_loss.py
│ │ │ └── test_loss.py
│ │ ├── test_necks/
│ │ │ ├── test_ct_resnet_neck.py
│ │ │ └── test_necks.py
│ │ ├── test_roi_heads/
│ │ │ ├── test_bbox_heads/
│ │ │ │ ├── test_bbox_head.py
│ │ │ │ ├── test_double_bbox_head.py
│ │ │ │ ├── test_multi_instance_bbox_head.py
│ │ │ │ ├── test_sabl_bbox_head.py
│ │ │ │ └── test_scnet_bbox_head.py
│ │ │ ├── test_cascade_roi_head.py
│ │ │ ├── test_dynamic_roi_head.py
│ │ │ ├── test_grid_roi_head.py
│ │ │ ├── test_htc_roi_head.py
│ │ │ ├── test_mask_heads/
│ │ │ │ ├── test_coarse_mask_head.py
│ │ │ │ ├── test_fcn_mask_head.py
│ │ │ │ ├── test_feature_relay_head.py
│ │ │ │ ├── test_fused_semantic_head.py
│ │ │ │ ├── test_global_context_head.py
│ │ │ │ ├── test_grid_head.py
│ │ │ │ ├── test_htc_mask_head.py
│ │ │ │ ├── test_maskiou_head.py
│ │ │ │ ├── test_scnet_mask_head.py
│ │ │ │ └── test_scnet_semantic_head.py
│ │ │ ├── test_mask_scoring_roI_head.py
│ │ │ ├── test_multi_instance_roi_head.py
│ │ │ ├── test_pisa_roi_head.py
│ │ │ ├── test_point_rend_roi_head.py
│ │ │ ├── test_roi_extractors/
│ │ │ │ ├── test_generic_roi_extractor.py
│ │ │ │ └── test_single_level_roi_extractor.py
│ │ │ ├── test_scnet_roi_head.py
│ │ │ ├── test_sparse_roi_head.py
│ │ │ ├── test_standard_roi_head.py
│ │ │ └── test_trident_roi_head.py
│ │ ├── test_seg_heads/
│ │ │ ├── test_heuristic_fusion_head.py
│ │ │ ├── test_maskformer_fusion_head.py
│ │ │ └── test_panoptic_fpn_head.py
│ │ ├── test_task_modules/
│ │ │ ├── __init__.py
│ │ │ ├── test_assigners/
│ │ │ │ ├── test_approx_max_iou_assigner.py
│ │ │ │ ├── test_atss_assigner.py
│ │ │ │ ├── test_center_region_assigner.py
│ │ │ │ ├── test_dynamic_soft_label_assigner.py
│ │ │ │ ├── test_grid_assigner.py
│ │ │ │ ├── test_hungarian_assigner.py
│ │ │ │ ├── test_max_iou_assigner.py
│ │ │ │ ├── test_point_assigner.py
│ │ │ │ ├── test_region_assigner.py
│ │ │ │ ├── test_simota_assigner.py
│ │ │ │ ├── test_task_aligned_assigner.py
│ │ │ │ └── test_task_uniform_assigner.py
│ │ │ ├── test_coder/
│ │ │ │ └── test_delta_xywh_bbox_coder.py
│ │ │ ├── test_iou2d_calculator.py
│ │ │ ├── test_prior_generators/
│ │ │ │ └── test_anchor_generator.py
│ │ │ └── test_samplers/
│ │ │ └── test_pesudo_sampler.py
│ │ ├── test_tta/
│ │ │ └── test_det_tta.py
│ │ └── test_utils/
│ │ ├── test_misc.py
│ │ └── test_model_misc.py
│ ├── test_structures/
│ │ ├── __init__.py
│ │ ├── test_bbox/
│ │ │ ├── __init__.py
│ │ │ ├── test_base_boxes.py
│ │ │ ├── test_box_type.py
│ │ │ ├── test_horizontal_boxes.py
│ │ │ └── utils.py
│ │ ├── test_det_data_sample.py
│ │ └── test_mask/
│ │ └── test_mask_structures.py
│ ├── test_utils/
│ │ ├── test_benchmark.py
│ │ ├── test_memory.py
│ │ ├── test_replace_cfg_vals.py
│ │ └── test_setup_env.py
│ └── test_visualization/
│ ├── test_local_visualizer.py
│ └── test_palette.py
└── tools/
├── analysis_tools/
│ ├── analyze_logs.py
│ ├── analyze_results.py
│ ├── benchmark.py
│ ├── browse_dataset.py
│ ├── coco_error_analysis.py
│ ├── coco_occluded_separated_recall.py
│ ├── confusion_matrix.py
│ ├── eval_metric.py
│ ├── get_flops.py
│ ├── optimize_anchors.py
│ ├── robustness_eval.py
│ └── test_robustness.py
├── dataset_converters/
│ ├── cityscapes.py
│ ├── images2coco.py
│ └── pascal_voc.py
├── deployment/
│ ├── mmdet2torchserve.py
│ ├── mmdet_handler.py
│ └── test_torchserver.py
├── dist_test.sh
├── dist_train.sh
├── misc/
│ ├── download_dataset.py
│ ├── gen_coco_panoptic_test_info.py
│ ├── get_crowdhuman_id_hw.py
│ ├── get_image_metas.py
│ ├── print_config.py
│ └── split_coco.py
├── model_converters/
│ ├── detectron2_to_mmdet.py
│ ├── detectron2pytorch.py
│ ├── publish_model.py
│ ├── regnet2mmdet.py
│ ├── selfsup2mmdet.py
│ ├── upgrade_model_version.py
│ └── upgrade_ssd_version.py
├── slurm_test.sh
├── slurm_train.sh
├── test.py
└── train.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .circleci/config.yml
================================================
version: 2.1
# this allows you to use CircleCI's dynamic configuration feature
setup: true
# the path-filtering orb is required to continue a pipeline based on
# the path of an updated fileset
orbs:
path-filtering: circleci/path-filtering@0.1.2
workflows:
# the always-run workflow is always triggered, regardless of the pipeline parameters.
always-run:
jobs:
# the path-filtering/filter job determines which pipeline
# parameters to update.
- path-filtering/filter:
name: check-updated-files
# 3-column, whitespace-delimited mapping. One mapping per
# line:
# <regex path-to-test> <parameter-to-set> <value-of-pipeline-parameter>
mapping: |
mmdet/.* lint_only false
requirements/.* lint_only false
tests/.* lint_only false
tools/.* lint_only false
configs/.* lint_only false
.circleci/.* lint_only false
base-revision: dev-3.x
# this is the path of the configuration we should trigger once
# path filtering and pipeline parameter value updates are
# complete. In this case, we are using the parent dynamic
# configuration itself.
config-path: .circleci/test.yml
================================================
FILE: .circleci/docker/Dockerfile
================================================
ARG PYTORCH="1.8.1"
ARG CUDA="10.2"
ARG CUDNN="7"
FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel
# To fix GPG key error when running apt-get update
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
RUN apt-get update && apt-get install -y ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 libgl1-mesa-glx
================================================
FILE: .circleci/test.yml
================================================
version: 2.1
# the default pipeline parameters, which will be updated according to
# the results of the path-filtering orb
parameters:
lint_only:
type: boolean
default: true
jobs:
lint:
docker:
- image: cimg/python:3.7.4
steps:
- checkout
- run:
name: Install pre-commit hook
command: |
pip install pre-commit
pre-commit install
- run:
name: Linting
command: pre-commit run --all-files
- run:
name: Check docstring coverage
command: |
pip install interrogate
interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-magic --ignore-regex "__repr__" --fail-under 85 mmdet
build_cpu:
parameters:
# The python version must match available image tags in
# https://circleci.com/developer/images/image/cimg/python
python:
type: string
torch:
type: string
torchvision:
type: string
docker:
- image: cimg/python:<< parameters.python >>
resource_class: large
steps:
- checkout
- run:
name: Install Libraries
command: |
sudo apt-get update
sudo apt-get install -y ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 libgl1-mesa-glx libjpeg-dev zlib1g-dev libtinfo-dev libncurses5
- run:
name: Configure Python & pip
command: |
pip install --upgrade pip
pip install wheel
- run:
name: Install PyTorch
command: |
python -V
python -m pip install torch==<< parameters.torch >>+cpu torchvision==<< parameters.torchvision >>+cpu -f https://download.pytorch.org/whl/torch_stable.html
- when:
condition:
equal: ["3.9.0", << parameters.python >>]
steps:
- run: pip install "protobuf <= 3.20.1" && sudo apt-get update && sudo apt-get -y install libprotobuf-dev protobuf-compiler cmake
- run:
name: Install mmdet dependencies
# numpy may be downgraded after building pycocotools, which causes `ImportError: numpy.core.multiarray failed to import`
# force reinstall pycocotools to ensure pycocotools being built under the currenct numpy
command: |
python -m pip install git+ssh://git@github.com/open-mmlab/mmengine.git@main
pip install -U openmim
mim install 'mmcv >= 2.0.0rc4'
pip install -r requirements/tests.txt -r requirements/optional.txt
pip install --force-reinstall pycocotools
pip install albumentations>=0.3.2 --no-binary imgaug,albumentations
pip install git+https://github.com/cocodataset/panopticapi.git
- run:
name: Build and install
command: |
pip install -e .
- run:
name: Run unittests
command: |
python -m coverage run --branch --source mmdet -m pytest tests/
python -m coverage xml
python -m coverage report -m
build_cuda:
parameters:
torch:
type: string
cuda:
type: enum
enum: ["10.1", "10.2", "11.1"]
cudnn:
type: integer
default: 7
machine:
image: ubuntu-2004-cuda-11.4:202110-01
# docker_layer_caching: true
resource_class: gpu.nvidia.small
steps:
- checkout
- run:
# CLoning repos in VM since Docker doesn't have access to the private key
name: Clone Repos
command: |
git clone -b main --depth 1 ssh://git@github.com/open-mmlab/mmengine.git /home/circleci/mmengine
- run:
name: Build Docker image
command: |
docker build .circleci/docker -t mmdetection:gpu --build-arg PYTORCH=<< parameters.torch >> --build-arg CUDA=<< parameters.cuda >> --build-arg CUDNN=<< parameters.cudnn >>
docker run --gpus all -t -d -v /home/circleci/project:/mmdetection -v /home/circleci/mmengine:/mmengine -w /mmdetection --name mmdetection mmdetection:gpu
docker exec mmdetection apt-get install -y git
- run:
name: Install mmdet dependencies
command: |
docker exec mmdetection pip install -e /mmengine
docker exec mmdetection pip install -U openmim
docker exec mmdetection mim install 'mmcv >= 2.0.0rc4'
docker exec mmdetection pip install -r requirements/tests.txt -r requirements/optional.txt
docker exec mmdetection pip install pycocotools
docker exec mmdetection pip install albumentations>=0.3.2 --no-binary imgaug,albumentations
docker exec mmdetection pip install git+https://github.com/cocodataset/panopticapi.git
docker exec mmdetection python -c 'import mmcv; print(mmcv.__version__)'
- run:
name: Build and install
command: |
docker exec mmdetection pip install -e .
- run:
name: Run unittests
command: |
docker exec mmdetection python -m pytest tests/
workflows:
pr_stage_lint:
when: << pipeline.parameters.lint_only >>
jobs:
- lint:
name: lint
filters:
branches:
ignore:
- dev-3.x
pr_stage_test:
when:
not: << pipeline.parameters.lint_only >>
jobs:
- lint:
name: lint
filters:
branches:
ignore:
- dev-3.x
- build_cpu:
name: minimum_version_cpu
torch: 1.6.0
torchvision: 0.7.0
python: 3.7.4 # The lowest python 3.7.x version available on CircleCI images
requires:
- lint
- build_cpu:
name: maximum_version_cpu
torch: 1.13.0
torchvision: 0.14.0
python: 3.9.0
requires:
- minimum_version_cpu
- hold:
type: approval
requires:
- maximum_version_cpu
- build_cuda:
name: mainstream_version_gpu
torch: 1.8.1
# Use double quotation mark to explicitly specify its type
# as string instead of number
cuda: "10.2"
requires:
- hold
merge_stage_test:
when:
not: << pipeline.parameters.lint_only >>
jobs:
- build_cuda:
name: minimum_version_gpu
torch: 1.6.0
cuda: "10.1"
filters:
branches:
only:
- dev-3.x
================================================
FILE: .dev_scripts/batch_test_list.py
================================================
# Copyright (c) OpenMMLab. All rights reserved.
# missing wider_face/timm_example/strong_baselines/simple_copy_paste/
# selfsup_pretrain/seesaw_loss/pascal_voc/openimages/lvis/ld/lad/cityscapes/deepfashion
# yapf: disable
atss = dict(
config='configs/atss/atss_r50_fpn_1x_coco.py',
checkpoint='atss_r50_fpn_1x_coco_20200209-985f7bd0.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/atss/atss_r50_fpn_1x_coco/atss_r50_fpn_1x_coco_20200209-985f7bd0.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=39.4),
)
autoassign = dict(
config='configs/autoassign/autoassign_r50-caffe_fpn_1x_coco.py',
checkpoint='auto_assign_r50_fpn_1x_coco_20210413_115540-5e17991f.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/autoassign/auto_assign_r50_fpn_1x_coco/auto_assign_r50_fpn_1x_coco_20210413_115540-5e17991f.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=40.4),
)
carafe = dict(
config='configs/carafe/faster-rcnn_r50_fpn-carafe_1x_coco.py',
checkpoint='faster_rcnn_r50_fpn_carafe_1x_coco_bbox_mAP-0.386_20200504_175733-385a75b7.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/carafe/faster_rcnn_r50_fpn_carafe_1x_coco/faster_rcnn_r50_fpn_carafe_1x_coco_bbox_mAP-0.386_20200504_175733-385a75b7.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=38.6),
)
cascade_rcnn = [
dict(
config='configs/cascade_rcnn/cascade-rcnn_r50_fpn_1x_coco.py',
checkpoint='cascade_rcnn_r50_fpn_1x_coco_20200316-3dc56deb.pth',
eval='bbox',
url='https://download.openmmlab.com/mmdetection/v2.0/cascade_rcnn/cascade_rcnn_r50_fpn_1x_coco/cascade_rcnn_r50_fpn_1x_coco_20200316-3dc56deb.pth', # noqa
metric=dict(bbox_mAP=40.3),
),
dict(
config='configs/cascade_rcnn/cascade-mask-rcnn_r50_fpn_1x_coco.py',
checkpoint='cascade_mask_rcnn_r50_fpn_1x_coco_20200203-9d4dcb24.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/cascade_rcnn/cascade_mask_rcnn_r50_fpn_1x_coco/cascade_mask_rcnn_r50_fpn_1x_coco_20200203-9d4dcb24.pth', # noqa
eval=['bbox', 'segm'],
metric=dict(bbox_mAP=41.2, segm_mAP=35.9),
),
]
cascade_rpn = dict(
config='configs/cascade_rpn/cascade-rpn_faster-rcnn_r50-caffe_fpn_1x_coco.py', # noqa
checkpoint='crpn_faster_rcnn_r50_caffe_fpn_1x_coco-c8283cca.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/cascade_rpn/crpn_faster_rcnn_r50_caffe_fpn_1x_coco/crpn_faster_rcnn_r50_caffe_fpn_1x_coco-c8283cca.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=40.4),
)
centernet = dict(
config='configs/centernet/centernet_r18-dcnv2_8xb16-crop512-140e_coco.py',
checkpoint='centernet_resnet18_dcnv2_140e_coco_20210702_155131-c8cd631f.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/centernet/centernet_resnet18_dcnv2_140e_coco/centernet_resnet18_dcnv2_140e_coco_20210702_155131-c8cd631f.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=29.5),
)
centripetalnet = dict(
config='configs/centripetalnet/centripetalnet_hourglass104_16xb6-crop511-210e-mstest_coco.py', # noqa
checkpoint='centripetalnet_hourglass104_mstest_16x6_210e_coco_20200915_204804-3ccc61e5.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/centripetalnet/centripetalnet_hourglass104_mstest_16x6_210e_coco/centripetalnet_hourglass104_mstest_16x6_210e_coco_20200915_204804-3ccc61e5.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=44.7),
)
convnext = dict(
config='configs/convnext/cascade-mask-rcnn_convnext-s-p4-w7_fpn_4conv1fc-giou_amp-ms-crop-3x_coco.py', # noqa
checkpoint='cascade_mask_rcnn_convnext-s_p4_w7_fpn_giou_4conv1f_fp16_ms-crop_3x_coco_20220510_201004-3d24f5a4.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/convnext/cascade_mask_rcnn_convnext-s_p4_w7_fpn_giou_4conv1f_fp16_ms-crop_3x_coco/cascade_mask_rcnn_convnext-s_p4_w7_fpn_giou_4conv1f_fp16_ms-crop_3x_coco_20220510_201004-3d24f5a4.pth', # noqa
eval=['bbox', 'segm'],
metric=dict(bbox_mAP=51.8, segm_mAP=44.8),
)
cornernet = dict(
config='configs/cornernet/cornernet_hourglass104_8xb6-210e-mstest_coco.py',
checkpoint='cornernet_hourglass104_mstest_8x6_210e_coco_20200825_150618-79b44c30.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/cornernet/cornernet_hourglass104_mstest_8x6_210e_coco/cornernet_hourglass104_mstest_8x6_210e_coco_20200825_150618-79b44c30.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=41.2),
)
dcn = dict(
config='configs/dcn/faster-rcnn_r50-dconv-c3-c5_fpn_1x_coco.py',
checkpoint='faster_rcnn_r50_fpn_dconv_c3-c5_1x_coco_20200130-d68aed1e.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/dcn/faster_rcnn_r50_fpn_dconv_c3-c5_1x_coco/faster_rcnn_r50_fpn_dconv_c3-c5_1x_coco_20200130-d68aed1e.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=41.3),
)
dcnv2 = dict(
config='configs/dcnv2/faster-rcnn_r50_fpn_mdpool_1x_coco.py',
checkpoint='faster_rcnn_r50_fpn_mdpool_1x_coco_20200307-c0df27ff.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/dcn/faster_rcnn_r50_fpn_mdpool_1x_coco/faster_rcnn_r50_fpn_mdpool_1x_coco_20200307-c0df27ff.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=38.7),
)
ddod = dict(
config='configs/ddod/ddod_r50_fpn_1x_coco.py',
checkpoint='ddod_r50_fpn_1x_coco_20220523_223737-29b2fc67.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/ddod/ddod_r50_fpn_1x_coco/ddod_r50_fpn_1x_coco_20220523_223737-29b2fc67.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=41.7),
)
deformable_detr = dict(
config='configs/deformable_detr/deformable-detr_r50_16xb2-50e_coco.py',
checkpoint='deformable_detr_r50_16x2_50e_coco_20210419_220030-a12b9512.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/deformable_detr/deformable_detr_r50_16x2_50e_coco/deformable_detr_r50_16x2_50e_coco_20210419_220030-a12b9512.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=44.5),
)
detectors = dict(
config='configs/detectors/detectors_htc-r50_1x_coco.py',
checkpoint='detectors_htc_r50_1x_coco-329b1453.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/detectors/detectors_htc_r50_1x_coco/detectors_htc_r50_1x_coco-329b1453.pth', # noqa
eval=['bbox', 'segm'],
metric=dict(bbox_mAP=49.1, segm_mAP=42.6),
)
detr = dict(
config='configs/detr/detr_r50_8xb2-150e_coco.py',
checkpoint='detr_r50_8x2_150e_coco_20201130_194835-2c4b8974.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/detr/detr_r50_8x2_150e_coco/detr_r50_8x2_150e_coco_20201130_194835-2c4b8974.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=40.1),
)
double_heads = dict(
config='configs/double_heads/dh-faster-rcnn_r50_fpn_1x_coco.py',
checkpoint='dh_faster_rcnn_r50_fpn_1x_coco_20200130-586b67df.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/double_heads/dh_faster_rcnn_r50_fpn_1x_coco/dh_faster_rcnn_r50_fpn_1x_coco_20200130-586b67df.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=40.0),
)
dyhead = dict(
config='configs/dyhead/atss_r50_fpn_dyhead_1x_coco.py',
checkpoint='atss_r50_fpn_dyhead_4x4_1x_coco_20211219_023314-eaa620c6.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/dyhead/atss_r50_fpn_dyhead_4x4_1x_coco/atss_r50_fpn_dyhead_4x4_1x_coco_20211219_023314-eaa620c6.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=43.3),
)
dynamic_rcnn = dict(
config='configs/dynamic_rcnn/dynamic-rcnn_r50_fpn_1x_coco.py',
checkpoint='dynamic_rcnn_r50_fpn_1x-62a3f276.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/dynamic_rcnn/dynamic_rcnn_r50_fpn_1x/dynamic_rcnn_r50_fpn_1x-62a3f276.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=38.9),
)
efficientnet = dict(
config='configs/efficientnet/retinanet_effb3_fpn_8xb4-crop896-1x_coco.py',
checkpoint='retinanet_effb3_fpn_crop896_8x4_1x_coco_20220322_234806-615a0dda.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/efficientnet/retinanet_effb3_fpn_crop896_8x4_1x_coco/retinanet_effb3_fpn_crop896_8x4_1x_coco_20220322_234806-615a0dda.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=40.5),
)
empirical_attention = dict(
config='configs/empirical_attention/faster-rcnn_r50-attn1111_fpn_1x_coco.py', # noqa
checkpoint='faster_rcnn_r50_fpn_attention_1111_1x_coco_20200130-403cccba.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/empirical_attention/faster_rcnn_r50_fpn_attention_1111_1x_coco/faster_rcnn_r50_fpn_attention_1111_1x_coco_20200130-403cccba.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=40.0),
)
faster_rcnn = dict(
config='configs/faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py',
checkpoint='faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_1x_coco/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=37.4),
)
fcos = dict(
config='configs/fcos/fcos_r50-caffe_fpn_gn-head-center-normbbox-centeronreg-giou_1x_coco.py', # noqa
checkpoint='fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_1x_coco-0a0d75a8.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/fcos/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_1x_coco/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_1x_coco-0a0d75a8.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=38.7),
)
foveabox = dict(
config='configs/foveabox/fovea_r50_fpn_gn-head-align_4xb4-2x_coco.py',
checkpoint='fovea_align_r50_fpn_gn-head_4x4_2x_coco_20200203-8987880d.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/foveabox/fovea_align_r50_fpn_gn-head_4x4_2x_coco/fovea_align_r50_fpn_gn-head_4x4_2x_coco_20200203-8987880d.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=37.9),
)
fpg = dict(
config='configs/fpg/mask-rcnn_r50_fpg_crop640-50e_coco.py',
checkpoint='mask_rcnn_r50_fpg_crop640_50e_coco_20220311_011857-233b8334.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/fpg/mask_rcnn_r50_fpg_crop640_50e_coco/mask_rcnn_r50_fpg_crop640_50e_coco_20220311_011857-233b8334.pth', # noqa
eval=['bbox', 'segm'],
metric=dict(bbox_mAP=43.0, segm_mAP=38.1),
)
free_anchor = dict(
config='configs/free_anchor/freeanchor_r50_fpn_1x_coco.py',
checkpoint='retinanet_free_anchor_r50_fpn_1x_coco_20200130-0f67375f.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/free_anchor/retinanet_free_anchor_r50_fpn_1x_coco/retinanet_free_anchor_r50_fpn_1x_coco_20200130-0f67375f.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=38.7),
)
fsaf = dict(
config='configs/fsaf/fsaf_r50_fpn_1x_coco.py',
checkpoint='fsaf_r50_fpn_1x_coco-94ccc51f.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/fsaf/fsaf_r50_fpn_1x_coco/fsaf_r50_fpn_1x_coco-94ccc51f.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=37.4),
)
gcnet = dict(
config='configs/gcnet/mask-rcnn_r50-syncbn-gcb-r16-c3-c5_fpn_1x_coco.py', # noqa
checkpoint='mask_rcnn_r50_fpn_syncbn-backbone_r16_gcb_c3-c5_1x_coco_20200202-587b99aa.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/gcnet/mask_rcnn_r50_fpn_syncbn-backbone_r16_gcb_c3-c5_1x_coco/mask_rcnn_r50_fpn_syncbn-backbone_r16_gcb_c3-c5_1x_coco_20200202-587b99aa.pth', # noqa
eval=['bbox', 'segm'],
metric=dict(bbox_mAP=40.4, segm_mAP=36.2),
)
gfl = dict(
config='configs/gfl/gfl_r50_fpn_1x_coco.py',
checkpoint='gfl_r50_fpn_1x_coco_20200629_121244-25944287.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/gfl/gfl_r50_fpn_1x_coco/gfl_r50_fpn_1x_coco_20200629_121244-25944287.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=40.2),
)
ghm = dict(
config='configs/ghm/retinanet_r50_fpn_ghm-1x_coco.py',
checkpoint='retinanet_ghm_r50_fpn_1x_coco_20200130-a437fda3.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/ghm/retinanet_ghm_r50_fpn_1x_coco/retinanet_ghm_r50_fpn_1x_coco_20200130-a437fda3.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=37.0),
)
gn = dict(
config='configs/gn/mask-rcnn_r50_fpn_gn-all_2x_coco.py',
checkpoint='mask_rcnn_r50_fpn_gn-all_2x_coco_20200206-8eee02a6.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/gn/mask_rcnn_r50_fpn_gn-all_2x_coco/mask_rcnn_r50_fpn_gn-all_2x_coco_20200206-8eee02a6.pth', # noqa
eval=['bbox', 'segm'],
metric=dict(bbox_mAP=40.1, segm_mAP=36.4),
)
gn_ws = dict(
config='configs/gn+ws/faster-rcnn_r50_fpn_gn-ws-all_1x_coco.py',
checkpoint='faster_rcnn_r50_fpn_gn_ws-all_1x_coco_20200130-613d9fe2.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/gn%2Bws/faster_rcnn_r50_fpn_gn_ws-all_1x_coco/faster_rcnn_r50_fpn_gn_ws-all_1x_coco_20200130-613d9fe2.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=39.7),
)
grid_rcnn = dict(
config='configs/grid_rcnn/grid-rcnn_r50_fpn_gn-head_2x_coco.py',
checkpoint='grid_rcnn_r50_fpn_gn-head_2x_coco_20200130-6cca8223.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/grid_rcnn/grid_rcnn_r50_fpn_gn-head_2x_coco/grid_rcnn_r50_fpn_gn-head_2x_coco_20200130-6cca8223.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=40.4),
)
groie = dict(
config='configs/groie/faste-rcnn_r50_fpn_groie_1x_coco.py',
checkpoint='faster_rcnn_r50_fpn_groie_1x_coco_20200604_211715-66ee9516.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/groie/faster_rcnn_r50_fpn_groie_1x_coco/faster_rcnn_r50_fpn_groie_1x_coco_20200604_211715-66ee9516.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=38.3),
)
guided_anchoring = dict(
config='configs/guided_anchoring/ga-retinanet_r50-caffe_fpn_1x_coco.py', # noqa
checkpoint='ga_retinanet_r50_caffe_fpn_1x_coco_20201020-39581c6f.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/guided_anchoring/ga_retinanet_r50_caffe_fpn_1x_coco/ga_retinanet_r50_caffe_fpn_1x_coco_20201020-39581c6f.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=36.9),
)
hrnet = dict(
config='configs/hrnet/faster-rcnn_hrnetv2p-w18-1x_coco.py',
checkpoint='faster_rcnn_hrnetv2p_w18_1x_coco_20200130-56651a6d.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/hrnet/faster_rcnn_hrnetv2p_w18_1x_coco/faster_rcnn_hrnetv2p_w18_1x_coco_20200130-56651a6d.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=36.9),
)
htc = dict(
config='configs/htc/htc_r50_fpn_1x_coco.py',
checkpoint='htc_r50_fpn_1x_coco_20200317-7332cf16.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/htc/htc_r50_fpn_1x_coco/htc_r50_fpn_1x_coco_20200317-7332cf16.pth', # noqa
eval=['bbox', 'segm'],
metric=dict(bbox_mAP=42.3, segm_mAP=37.4),
)
instaboost = dict(
config='configs/instaboost/mask-rcnn_r50_fpn_instaboost-4x_coco.py',
checkpoint='mask_rcnn_r50_fpn_instaboost_4x_coco_20200307-d025f83a.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/instaboost/mask_rcnn_r50_fpn_instaboost_4x_coco/mask_rcnn_r50_fpn_instaboost_4x_coco_20200307-d025f83a.pth', # noqa
eval=['bbox', 'segm'],
metric=dict(bbox_mAP=40.6, segm_mAP=36.6),
)
libra_rcnn = dict(
config='configs/libra_rcnn/libra-faster-rcnn_r50_fpn_1x_coco.py',
checkpoint='libra_faster_rcnn_r50_fpn_1x_coco_20200130-3afee3a9.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/libra_rcnn/libra_faster_rcnn_r50_fpn_1x_coco/libra_faster_rcnn_r50_fpn_1x_coco_20200130-3afee3a9.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=38.3),
)
mask2former = dict(
config='configs/mask2former/mask2former_r50_8xb2-lsj-50e_coco-panoptic.py',
checkpoint='mask2former_r50_lsj_8x2_50e_coco-panoptic_20220326_224516-11a44721.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/mask2former/mask2former_r50_lsj_8x2_50e_coco-panoptic/mask2former_r50_lsj_8x2_50e_coco-panoptic_20220326_224516-11a44721.pth', # noqa
eval=['bbox', 'segm', 'PQ'],
metric=dict(PQ=51.9, bbox_mAP=44.8, segm_mAP=41.9),
)
mask_rcnn = dict(
config='configs/mask_rcnn/mask-rcnn_r50_fpn_1x_coco.py',
checkpoint='mask_rcnn_r50_fpn_1x_coco_20200205-d4b0c5d6.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/mask_rcnn/mask_rcnn_r50_fpn_1x_coco/mask_rcnn_r50_fpn_1x_coco_20200205-d4b0c5d6.pth', # noqa
eval=['bbox', 'segm'],
metric=dict(bbox_mAP=38.2, segm_mAP=34.7),
)
maskformer = dict(
config='configs/maskformer/maskformer_r50_ms-16xb1-75e_coco.py',
checkpoint='maskformer_r50_mstrain_16x1_75e_coco_20220221_141956-bc2699cb.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/maskformer/maskformer_r50_mstrain_16x1_75e_coco/maskformer_r50_mstrain_16x1_75e_coco_20220221_141956-bc2699cb.pth', # noqa
eval='PQ',
metric=dict(PQ=46.9),
)
ms_rcnn = dict(
config='configs/ms_rcnn/ms-rcnn_r50-caffe_fpn_1x_coco.py',
checkpoint='ms_rcnn_r50_caffe_fpn_1x_coco_20200702_180848-61c9355e.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/ms_rcnn/ms_rcnn_r50_caffe_fpn_1x_coco/ms_rcnn_r50_caffe_fpn_1x_coco_20200702_180848-61c9355e.pth', # noqa
eval=['bbox', 'segm'],
metric=dict(bbox_mAP=38.2, segm_mAP=36.0),
)
nas_fcos = dict(
config='configs/nas_fcos/nas-fcos_r50-caffe_fpn_nashead-gn-head_4xb4-1x_coco.py', # noqa
checkpoint='nas_fcos_nashead_r50_caffe_fpn_gn-head_4x4_1x_coco_20200520-1bdba3ce.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/nas_fcos/nas_fcos_nashead_r50_caffe_fpn_gn-head_4x4_1x_coco/nas_fcos_nashead_r50_caffe_fpn_gn-head_4x4_1x_coco_20200520-1bdba3ce.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=39.4),
)
nas_fpn = dict(
config='configs/nas_fpn/retinanet_r50_nasfpn_crop640-50e_coco.py',
checkpoint='retinanet_r50_nasfpn_crop640_50e_coco-0ad1f644.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/nas_fpn/retinanet_r50_nasfpn_crop640_50e_coco/retinanet_r50_nasfpn_crop640_50e_coco-0ad1f644.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=40.5),
)
paa = dict(
config='configs/paa/paa_r50_fpn_1x_coco.py',
checkpoint='paa_r50_fpn_1x_coco_20200821-936edec3.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/paa/paa_r50_fpn_1x_coco/paa_r50_fpn_1x_coco_20200821-936edec3.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=40.4),
)
pafpn = dict(
config='configs/pafpn/faster-rcnn_r50_pafpn_1x_coco.py',
checkpoint='faster_rcnn_r50_pafpn_1x_coco_bbox_mAP-0.375_20200503_105836-b7b4b9bd.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/pafpn/faster_rcnn_r50_pafpn_1x_coco/faster_rcnn_r50_pafpn_1x_coco_bbox_mAP-0.375_20200503_105836-b7b4b9bd.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=37.5),
)
panoptic_fpn = dict(
config='configs/panoptic_fpn/panoptic-fpn_r50_fpn_1x_coco.py',
checkpoint='panoptic_fpn_r50_fpn_1x_coco_20210821_101153-9668fd13.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/panoptic_fpn/panoptic_fpn_r50_fpn_1x_coco/panoptic_fpn_r50_fpn_1x_coco_20210821_101153-9668fd13.pth', # noqa
eval='PQ',
metric=dict(PQ=40.2),
)
pisa = dict(
config='configs/pisa/faster-rcnn_r50_fpn_pisa_1x_coco.py',
checkpoint='pisa_faster_rcnn_r50_fpn_1x_coco-dea93523.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/pisa/pisa_faster_rcnn_r50_fpn_1x_coco/pisa_faster_rcnn_r50_fpn_1x_coco-dea93523.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=38.4),
)
point_rend = dict(
config='configs/point_rend/point-rend_r50-caffe_fpn_ms-1x_coco.py',
checkpoint='point_rend_r50_caffe_fpn_mstrain_1x_coco-1bcb5fb4.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/point_rend/point_rend_r50_caffe_fpn_mstrain_1x_coco/point_rend_r50_caffe_fpn_mstrain_1x_coco-1bcb5fb4.pth', # noqa
eval=['bbox', 'segm'],
metric=dict(bbox_mAP=38.4, segm_mAP=36.3),
)
pvt = dict(
config='configs/pvt/retinanet_pvt-s_fpn_1x_coco.py',
checkpoint='retinanet_pvt-s_fpn_1x_coco_20210906_142921-b6c94a5b.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/pvt/retinanet_pvt-s_fpn_1x_coco/retinanet_pvt-s_fpn_1x_coco_20210906_142921-b6c94a5b.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=40.4),
)
queryinst = dict(
config='configs/queryinst/queryinst_r50_fpn_1x_coco.py',
checkpoint='queryinst_r50_fpn_1x_coco_20210907_084916-5a8f1998.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/queryinst/queryinst_r50_fpn_1x_coco/queryinst_r50_fpn_1x_coco_20210907_084916-5a8f1998.pth', # noqa
eval=['bbox', 'segm'],
metric=dict(bbox_mAP=42.0, segm_mAP=37.5),
)
regnet = dict(
config='configs/regnet/mask-rcnn_regnetx-3.2GF_fpn_1x_coco.py',
checkpoint='mask_rcnn_regnetx-3.2GF_fpn_1x_coco_20200520_163141-2a9d1814.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/regnet/mask_rcnn_regnetx-3.2GF_fpn_1x_coco/mask_rcnn_regnetx-3.2GF_fpn_1x_coco_20200520_163141-2a9d1814.pth', # noqa
eval=['bbox', 'segm'],
metric=dict(bbox_mAP=40.4, segm_mAP=36.7),
)
reppoints = dict(
config='configs/reppoints/reppoints-moment_r50_fpn_1x_coco.py',
checkpoint='reppoints_moment_r50_fpn_1x_coco_20200330-b73db8d1.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/reppoints/reppoints_moment_r50_fpn_1x_coco/reppoints_moment_r50_fpn_1x_coco_20200330-b73db8d1.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=37.0),
)
res2net = dict(
config='configs/res2net/faster-rcnn_res2net-101_fpn_2x_coco.py',
checkpoint='faster_rcnn_r2_101_fpn_2x_coco-175f1da6.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/res2net/faster_rcnn_r2_101_fpn_2x_coco/faster_rcnn_r2_101_fpn_2x_coco-175f1da6.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=43.0),
)
resnest = dict(
config='configs/resnest/faster-rcnn_s50_fpn_syncbn-backbone+head_ms-range-1x_coco.py', # noqa
checkpoint='faster_rcnn_s50_fpn_syncbn-backbone+head_mstrain-range_1x_coco_20200926_125502-20289c16.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/resnest/faster_rcnn_s50_fpn_syncbn-backbone%2Bhead_mstrain-range_1x_coco/faster_rcnn_s50_fpn_syncbn-backbone%2Bhead_mstrain-range_1x_coco_20200926_125502-20289c16.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=42.0),
)
resnet_strikes_back = dict(
config='configs/resnet_strikes_back/mask-rcnn_r50-rsb-pre_fpn_1x_coco.py', # noqa
checkpoint='mask_rcnn_r50_fpn_rsb-pretrain_1x_coco_20220113_174054-06ce8ba0.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/resnet_strikes_back/mask_rcnn_r50_fpn_rsb-pretrain_1x_coco/mask_rcnn_r50_fpn_rsb-pretrain_1x_coco_20220113_174054-06ce8ba0.pth', # noqa
eval=['bbox', 'segm'],
metric=dict(bbox_mAP=41.2, segm_mAP=38.2),
)
retinanet = dict(
config='configs/retinanet/retinanet_r50_fpn_1x_coco.py',
checkpoint='retinanet_r50_fpn_1x_coco_20200130-c2398f9e.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/retinanet/retinanet_r50_fpn_1x_coco/retinanet_r50_fpn_1x_coco_20200130-c2398f9e.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=36.5),
)
rpn = dict(
config='configs/rpn/rpn_r50_fpn_1x_coco.py',
checkpoint='rpn_r50_fpn_1x_coco_20200218-5525fa2e.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/rpn/rpn_r50_fpn_1x_coco/rpn_r50_fpn_1x_coco_20200218-5525fa2e.pth', # noqa
eval='proposal_fast',
metric=dict(AR_1000=58.2),
)
sabl = [
dict(
config='configs/sabl/sabl-retinanet_r50_fpn_1x_coco.py',
checkpoint='sabl_retinanet_r50_fpn_1x_coco-6c54fd4f.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/sabl/sabl_retinanet_r50_fpn_1x_coco/sabl_retinanet_r50_fpn_1x_coco-6c54fd4f.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=37.7),
),
dict(
config='configs/sabl/sabl-faster-rcnn_r50_fpn_1x_coco.py',
checkpoint='sabl_faster_rcnn_r50_fpn_1x_coco-e867595b.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/sabl/sabl_faster_rcnn_r50_fpn_1x_coco/sabl_faster_rcnn_r50_fpn_1x_coco-e867595b.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=39.9),
),
]
scnet = dict(
config='configs/scnet/scnet_r50_fpn_1x_coco.py',
checkpoint='scnet_r50_fpn_1x_coco-c3f09857.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/scnet/scnet_r50_fpn_1x_coco/scnet_r50_fpn_1x_coco-c3f09857.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=43.5),
)
scratch = dict(
config='configs/scratch/mask-rcnn_r50-scratch_fpn_gn-all_6x_coco.py',
checkpoint='scratch_mask_rcnn_r50_fpn_gn_6x_bbox_mAP-0.412__segm_mAP-0.374_20200201_193051-1e190a40.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/scratch/mask_rcnn_r50_fpn_gn-all_scratch_6x_coco/scratch_mask_rcnn_r50_fpn_gn_6x_bbox_mAP-0.412__segm_mAP-0.374_20200201_193051-1e190a40.pth', # noqa
eval=['bbox', 'segm'],
metric=dict(bbox_mAP=41.2, segm_mAP=37.4),
)
solo = dict(
config='configs/solo/decoupled-solo_r50_fpn_1x_coco.py',
checkpoint='decoupled_solo_r50_fpn_1x_coco_20210820_233348-6337c589.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/solo/decoupled_solo_r50_fpn_1x_coco/decoupled_solo_r50_fpn_1x_coco_20210820_233348-6337c589.pth', # noqa
eval='segm',
metric=dict(segm_mAP=33.9),
)
solov2 = dict(
config='configs/solov2/solov2_r50_fpn_1x_coco.py',
checkpoint='solov2_r50_fpn_1x_coco_20220512_125858-a357fa23.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/solov2/solov2_r50_fpn_1x_coco/solov2_r50_fpn_1x_coco_20220512_125858-a357fa23.pth', # noqa
eval='segm',
metric=dict(segm_mAP=34.8),
)
sparse_rcnn = dict(
config='configs/sparse_rcnn/sparse-rcnn_r50_fpn_1x_coco.py',
checkpoint='sparse_rcnn_r50_fpn_1x_coco_20201222_214453-dc79b137.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/sparse_rcnn/sparse_rcnn_r50_fpn_1x_coco/sparse_rcnn_r50_fpn_1x_coco_20201222_214453-dc79b137.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=37.9),
)
ssd = [
dict(
config='configs/ssd/ssd300_coco.py',
checkpoint='ssd300_coco_20210803_015428-d231a06e.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/ssd/ssd300_coco/ssd300_coco_20210803_015428-d231a06e.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=25.5),
),
dict(
config='configs/ssd/ssdlite_mobilenetv2-scratch_8xb24-600e_coco.py',
checkpoint='ssdlite_mobilenetv2_scratch_600e_coco_20210629_110627-974d9307.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/ssd/ssdlite_mobilenetv2_scratch_600e_coco/ssdlite_mobilenetv2_scratch_600e_coco_20210629_110627-974d9307.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=21.3),
),
]
swin = dict(
config='configs/swin/mask-rcnn_swin-t-p4-w7_fpn_1x_coco.py',
checkpoint='mask_rcnn_swin-t-p4-w7_fpn_1x_coco_20210902_120937-9d6b7cfa.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/swin/mask_rcnn_swin-t-p4-w7_fpn_1x_coco/mask_rcnn_swin-t-p4-w7_fpn_1x_coco_20210902_120937-9d6b7cfa.pth', # noqa
eval=['bbox', 'segm'],
metric=dict(bbox_mAP=42.7, segm_mAP=39.3),
)
tood = dict(
config='configs/tood/tood_r50_fpn_1x_coco.py',
checkpoint='tood_r50_fpn_1x_coco_20211210_103425-20e20746.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/tood/tood_r50_fpn_1x_coco/tood_r50_fpn_1x_coco_20211210_103425-20e20746.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=42.4),
)
tridentnet = dict(
config='configs/tridentnet/tridentnet_r50-caffe_1x_coco.py',
checkpoint='tridentnet_r50_caffe_1x_coco_20201230_141838-2ec0b530.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/tridentnet/tridentnet_r50_caffe_1x_coco/tridentnet_r50_caffe_1x_coco_20201230_141838-2ec0b530.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=37.6),
)
vfnet = dict(
config='configs/vfnet/vfnet_r50_fpn_1x_coco.py',
checkpoint='vfnet_r50_fpn_1x_coco_20201027-38db6f58.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/vfnet/vfnet_r50_fpn_1x_coco/vfnet_r50_fpn_1x_coco_20201027-38db6f58.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=41.6),
)
yolact = dict(
config='configs/yolact/yolact_r50_1xb8-55e_coco.py',
checkpoint='yolact_r50_1x8_coco_20200908-f38d58df.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/yolact/yolact_r50_1x8_coco/yolact_r50_1x8_coco_20200908-f38d58df.pth', # noqa
eval=['bbox', 'segm'],
metric=dict(bbox_mAP=31.2, segm_mAP=29.0),
)
yolo = dict(
config='configs/yolo/yolov3_d53_8xb8-320-273e_coco.py',
checkpoint='yolov3_d53_320_273e_coco-421362b6.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/yolo/yolov3_d53_320_273e_coco/yolov3_d53_320_273e_coco-421362b6.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=27.9),
)
yolof = dict(
config='configs/yolof/yolof_r50-c5_8xb8-1x_coco.py',
checkpoint='yolof_r50_c5_8x8_1x_coco_20210425_024427-8e864411.pth',
url='https://download.openmmlab.com/mmdetection/v2.0/yolof/yolof_r50_c5_8x8_1x_coco/yolof_r50_c5_8x8_1x_coco_20210425_024427-8e864411.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=37.5),
)
yolox = dict(
config='configs/yolox/yolox_tiny_8xb8-300e_coco.py',
checkpoint='yolox_tiny_8x8_300e_coco_20211124_171234-b4047906.pth', # noqa
url='https://download.openmmlab.com/mmdetection/v2.0/yolox/yolox_tiny_8x8_300e_coco/yolox_tiny_8x8_300e_coco_20211124_171234-b4047906.pth', # noqa
eval='bbox',
metric=dict(bbox_mAP=31.8),
)
# yapf: enable
================================================
FILE: .dev_scripts/batch_train_list.txt
================================================
configs/albu_example/mask-rcnn_r50_fpn_albu_1x_coco.py
configs/atss/atss_r50_fpn_1x_coco.py
configs/autoassign/autoassign_r50-caffe_fpn_1x_coco.py
configs/carafe/faster-rcnn_r50_fpn-carafe_1x_coco.py
configs/cascade_rcnn/cascade-rcnn_r50_fpn_1x_coco.py
configs/cascade_rcnn/cascade-mask-rcnn_r50_fpn_1x_coco.py
configs/cascade_rpn/cascade-rpn_faster-rcnn_r50-caffe_fpn_1x_coco.py
configs/centernet/centernet_r18-dcnv2_8xb16-crop512-140e_coco.py
configs/centernet/centernet-update_r50-caffe_fpn_ms-1x_coco.py
configs/centripetalnet/centripetalnet_hourglass104_16xb6-crop511-210e-mstest_coco.py
configs/cornernet/cornernet_hourglass104_8xb6-210e-mstest_coco.py
configs/convnext/mask-rcnn_convnext-t-p4-w7_fpn_amp-ms-crop-3x_coco.py
configs/dcn/faster-rcnn_r50-dconv-c3-c5_fpn_1x_coco.py
configs/dcnv2/faster-rcnn_r50_fpn_mdpool_1x_coco.py
configs/ddod/ddod_r50_fpn_1x_coco.py
configs/detectors/detectors_htc-r50_1x_coco.py
configs/deformable_detr/deformable-detr_r50_16xb2-50e_coco.py
configs/detr/detr_r50_8xb2-150e_coco.py
configs/double_heads/dh-faster-rcnn_r50_fpn_1x_coco.py
configs/dynamic_rcnn/dynamic-rcnn_r50_fpn_1x_coco.py
configs/dyhead/atss_r50_fpn_dyhead_1x_coco.py
configs/efficientnet/retinanet_effb3_fpn_8xb4-crop896-1x_coco.py
configs/empirical_attention/faster-rcnn_r50-attn1111_fpn_1x_coco.py
configs/faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py
configs/faster_rcnn/faster-rcnn_r50-caffe-dc5_ms-1x_coco.py
configs/fcos/fcos_r50-caffe_fpn_gn-head-center-normbbox-centeronreg-giou_1x_coco.py
configs/foveabox/fovea_r50_fpn_gn-head-align_4xb4-2x_coco.py
configs/fpg/mask-rcnn_r50_fpg_crop640-50e_coco.py
configs/free_anchor/freeanchor_r50_fpn_1x_coco.py
configs/fsaf/fsaf_r50_fpn_1x_coco.py
configs/gcnet/mask-rcnn_r50-syncbn-gcb-r16-c3-c5_fpn_1x_coco.py
configs/gfl/gfl_r50_fpn_1x_coco.py
configs/ghm/retinanet_r50_fpn_ghm-1x_coco.py
configs/gn/mask-rcnn_r50_fpn_gn-all_2x_coco.py
configs/gn+ws/faster-rcnn_r50_fpn_gn-ws-all_1x_coco.py
configs/grid_rcnn/grid-rcnn_r50_fpn_gn-head_2x_coco.py
configs/groie/faste-rcnn_r50_fpn_groie_1x_coco.py
configs/guided_anchoring/ga-retinanet_r50-caffe_fpn_1x_coco.py
configs/hrnet/faster-rcnn_hrnetv2p-w18-1x_coco.py
configs/htc/htc_r50_fpn_1x_coco.py
configs/instaboost/mask-rcnn_r50_fpn_instaboost-4x_coco.py
configs/lad/lad_r50-paa-r101_fpn_2xb8_coco_1x.py
configs/ld/ld_r18-gflv1-r101_fpn_1x_coco.py
configs/libra_rcnn/libra-faster-rcnn_r50_fpn_1x_coco.py
configs/mask2former/mask2former_r50_8xb2-lsj-50e_coco-panoptic.py
configs/mask_rcnn/mask-rcnn_r50_fpn_1x_coco.py
configs/maskformer/maskformer_r50_ms-16xb1-75e_coco.py
configs/ms_rcnn/ms-rcnn_r50-caffe_fpn_1x_coco.py
configs/nas_fcos/nas-fcos_r50-caffe_fpn_nashead-gn-head_4xb4-1x_coco.py
configs/nas_fpn/retinanet_r50_nasfpn_crop640-50e_coco.py
configs/paa/paa_r50_fpn_1x_coco.py
configs/pafpn/faster-rcnn_r50_pafpn_1x_coco.py
configs/panoptic_fpn/panoptic-fpn_r50_fpn_1x_coco.py
configs/pisa/mask-rcnn_r50_fpn_pisa_1x_coco.py
configs/point_rend/point-rend_r50-caffe_fpn_ms-1x_coco.py
configs/pvt/retinanet_pvt-t_fpn_1x_coco.py
configs/queryinst/queryinst_r50_fpn_1x_coco.py
configs/regnet/retinanet_regnetx-800MF_fpn_1x_coco.py
configs/reppoints/reppoints-moment_r50_fpn_1x_coco.py
configs/res2net/faster-rcnn_res2net-101_fpn_2x_coco.py
configs/resnest/faster-rcnn_s50_fpn_syncbn-backbone+head_ms-range-1x_coco.py
configs/resnet_strikes_back/retinanet_r50-rsb-pre_fpn_1x_coco.py
configs/retinanet/retinanet_r50-caffe_fpn_1x_coco.py
configs/rpn/rpn_r50_fpn_1x_coco.py
configs/sabl/sabl-retinanet_r50_fpn_1x_coco.py
configs/scnet/scnet_r50_fpn_1x_coco.py
configs/scratch/faster-rcnn_r50-scratch_fpn_gn-all_6x_coco.py
configs/solo/solo_r50_fpn_1x_coco.py
configs/solov2/solov2_r50_fpn_1x_coco.py
configs/sparse_rcnn/sparse-rcnn_r50_fpn_1x_coco.py
configs/ssd/ssd300_coco.py
configs/ssd/ssdlite_mobilenetv2-scratch_8xb24-600e_coco.py
configs/swin/mask-rcnn_swin-t-p4-w7_fpn_1x_coco.py
configs/tood/tood_r50_fpn_1x_coco.py
'configs/tridentnet/tridentnet_r50-caffe_1x_coco.py
configs/vfnet/vfnet_r50_fpn_1x_coco.py
configs/yolact/yolact_r50_8xb8-55e_coco.py
configs/yolo/yolov3_d53_8xb8-320-273e_coco.py
configs/yolof/yolof_r50-c5_8xb8-1x_coco.py
configs/yolox/yolox_tiny_8xb8-300e_coco.py
================================================
FILE: .dev_scripts/benchmark_filter.py
================================================
# Copyright (c) OpenMMLab. All rights reserved.
import argparse
import os
import os.path as osp
def parse_args():
parser = argparse.ArgumentParser(description='Filter configs to train')
parser.add_argument(
'--basic-arch',
action='store_true',
help='to train models in basic arch')
parser.add_argument(
'--datasets', action='store_true', help='to train models in dataset')
parser.add_argument(
'--data-pipeline',
action='store_true',
help='to train models related to data pipeline, e.g. augmentations')
parser.add_argument(
'--nn-module',
action='store_true',
help='to train models related to neural network modules')
parser.add_argument(
'--model-options',
nargs='+',
help='custom options to special model benchmark')
parser.add_argument(
'--out',
type=str,
default='batch_train_list.txt',
help='output path of gathered metrics to be stored')
args = parser.parse_args()
return args
basic_arch_root = [
'atss', 'autoassign', 'cascade_rcnn', 'cascade_rpn', 'centripetalnet',
'cornernet', 'detectors', 'deformable_detr', 'detr', 'double_heads',
'dynamic_rcnn', 'faster_rcnn', 'fcos', 'foveabox', 'fp16', 'free_anchor',
'fsaf', 'gfl', 'ghm', 'grid_rcnn', 'guided_anchoring', 'htc', 'ld',
'libra_rcnn', 'mask_rcnn', 'ms_rcnn', 'nas_fcos', 'paa', 'pisa',
'point_rend', 'reppoints', 'retinanet', 'rpn', 'sabl', 'ssd', 'tridentnet',
'vfnet', 'yolact', 'yolo', 'sparse_rcnn', 'scnet', 'yolof', 'centernet'
]
datasets_root = [
'wider_face', 'pascal_voc', 'cityscapes', 'lvis', 'deepfashion'
]
data_pipeline_root = ['albu_example', 'instaboost']
nn_module_root = [
'carafe', 'dcn', 'empirical_attention', 'gcnet', 'gn', 'gn+ws', 'hrnet',
'pafpn', 'nas_fpn', 'regnet', 'resnest', 'res2net', 'groie'
]
benchmark_pool = [
'configs/albu_example/mask_rcnn_r50_fpn_albu_1x_coco.py',
'configs/atss/atss_r50_fpn_1x_coco.py',
'configs/autoassign/autoassign_r50_fpn_8x2_1x_coco.py',
'configs/carafe/mask_rcnn_r50_fpn_carafe_1x_coco.py',
'configs/cascade_rcnn/cascade_mask_rcnn_r50_fpn_1x_coco.py',
'configs/cascade_rpn/crpn_faster_rcnn_r50_caffe_fpn_1x_coco.py',
'configs/centernet/centernet_resnet18_dcnv2_140e_coco.py',
'configs/centripetalnet/'
'centripetalnet_hourglass104_mstest_16x6_210e_coco.py',
'configs/cityscapes/mask_rcnn_r50_fpn_1x_cityscapes.py',
'configs/cornernet/'
'cornernet_hourglass104_mstest_8x6_210e_coco.py',
'configs/dcn/mask_rcnn_r50_fpn_mdconv_c3-c5_1x_coco.py',
'configs/dcn/faster_rcnn_r50_fpn_dpool_1x_coco.py',
'configs/dcn/faster_rcnn_r50_fpn_mdpool_1x_coco.py',
'configs/dcn/mask_rcnn_r50_fpn_dconv_c3-c5_1x_coco.py',
'configs/deformable_detr/deformable_detr_r50_16x2_50e_coco.py',
'configs/detectors/detectors_htc_r50_1x_coco.py',
'configs/detr/detr_r50_8x2_150e_coco.py',
'configs/double_heads/dh_faster_rcnn_r50_fpn_1x_coco.py',
'configs/dynamic_rcnn/dynamic_rcnn_r50_fpn_1x_coco.py',
'configs/empirical_attention/faster_rcnn_r50_fpn_attention_1111_dcn_1x_coco.py', # noqa
'configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py',
'configs/faster_rcnn/faster_rcnn_r50_fpn_ohem_1x_coco.py',
'configs/faster_rcnn/faster_rcnn_r50_caffe_fpn_1x_coco.py',
'configs/faster_rcnn/faster_rcnn_r50_caffe_fpn_mstrain_1x_coco.py',
'configs/faster_rcnn/faster_rcnn_r50_caffe_dc5_mstrain_1x_coco.py',
'configs/fcos/fcos_center_r50_caffe_fpn_gn-head_4x4_1x_coco.py',
'configs/foveabox/fovea_align_r50_fpn_gn-head_4x4_2x_coco.py',
'configs/retinanet/retinanet_r50_fpn_fp16_1x_coco.py',
'configs/mask_rcnn/mask_rcnn_r50_fpn_fp16_1x_coco.py',
'configs/free_anchor/retinanet_free_anchor_r50_fpn_1x_coco.py',
'configs/fsaf/fsaf_r50_fpn_1x_coco.py',
'configs/gcnet/mask_rcnn_r50_fpn_r4_gcb_c3-c5_1x_coco.py',
'configs/gfl/gfl_r50_fpn_1x_coco.py',
'configs/ghm/retinanet_ghm_r50_fpn_1x_coco.py',
'configs/gn/mask_rcnn_r50_fpn_gn-all_2x_coco.py',
'configs/gn+ws/mask_rcnn_r50_fpn_gn_ws-all_2x_coco.py',
'configs/grid_rcnn/grid_rcnn_r50_fpn_gn-head_2x_coco.py',
'configs/groie/faster_rcnn_r50_fpn_groie_1x_coco.py',
'configs/guided_anchoring/ga_faster_r50_caffe_fpn_1x_coco.py',
'configs/hrnet/mask_rcnn_hrnetv2p_w18_1x_coco.py',
'configs/htc/htc_r50_fpn_1x_coco.py',
'configs/instaboost/mask_rcnn_r50_fpn_instaboost_4x_coco.py',
'configs/ld/ld_r18_gflv1_r101_fpn_coco_1x.py',
'configs/libra_rcnn/libra_faster_rcnn_r50_fpn_1x_coco.py',
'configs/lvis/mask_rcnn_r50_fpn_sample1e-3_mstrain_1x_lvis_v1.py',
'configs/mask_rcnn/mask_rcnn_r50_caffe_fpn_mstrain-poly_1x_coco.py',
'configs/ms_rcnn/ms_rcnn_r50_caffe_fpn_1x_coco.py',
'configs/nas_fcos/nas_fcos_nashead_r50_caffe_fpn_gn-head_4x4_1x_coco.py',
'configs/nas_fpn/retinanet_r50_nasfpn_crop640_50e_coco.py',
'configs/paa/paa_r50_fpn_1x_coco.py',
'configs/pafpn/faster_rcnn_r50_pafpn_1x_coco.py',
'configs/pisa/pisa_mask_rcnn_r50_fpn_1x_coco.py',
'configs/point_rend/point_rend_r50_caffe_fpn_mstrain_1x_coco.py',
'configs/regnet/mask_rcnn_regnetx-3.2GF_fpn_1x_coco.py',
'configs/reppoints/reppoints_moment_r50_fpn_gn-neck+head_1x_coco.py',
'configs/res2net/faster_rcnn_r2_101_fpn_2x_coco.py',
'configs/resnest/'
'mask_rcnn_s50_fpn_syncbn-backbone+head_mstrain_1x_coco.py',
'configs/retinanet/retinanet_r50_caffe_fpn_1x_coco.py',
'configs/rpn/rpn_r50_fpn_1x_coco.py',
'configs/sabl/sabl_retinanet_r50_fpn_1x_coco.py',
'configs/ssd/ssd300_coco.py',
'configs/tridentnet/tridentnet_r50_caffe_1x_coco.py',
'configs/vfnet/vfnet_r50_fpn_1x_coco.py',
'configs/yolact/yolact_r50_1x8_coco.py',
'configs/yolo/yolov3_d53_320_273e_coco.py',
'configs/sparse_rcnn/sparse_rcnn_r50_fpn_1x_coco.py',
'configs/scnet/scnet_r50_fpn_1x_coco.py',
'configs/yolof/yolof_r50_c5_8x8_1x_coco.py',
]
def main():
args = parse_args()
benchmark_type = []
if args.basic_arch:
benchmark_type += basic_arch_root
if args.datasets:
benchmark_type += datasets_root
if args.data_pipeline:
benchmark_type += data_pipeline_root
if args.nn_module:
benchmark_type += nn_module_root
special_model = args.model_options
if special_model is not None:
benchmark_type += special_model
config_dpath = 'configs/'
benchmark_configs = []
for cfg_root in benchmark_type:
cfg_dir = osp.join(config_dpath, cfg_root)
configs = os.scandir(cfg_dir)
for cfg in configs:
config_path = osp.join(cfg_dir, cfg.name)
if (config_path in benchmark_pool
and config_path not in benchmark_configs):
benchmark_configs.append(config_path)
print(f'Totally found {len(benchmark_configs)} configs to benchmark')
with open(args.out, 'w') as f:
for config in benchmark_configs:
f.write(config + '\n')
if __name__ == '__main__':
main()
================================================
FILE: .dev_scripts/benchmark_full_models.txt
================================================
albu_example/mask-rcnn_r50_fpn_albu_1x_coco.py
atss/atss_r50_fpn_1x_coco.py
autoassign/autoassign_r50-caffe_fpn_1x_coco.py
boxinst/boxinst_r50_fpn_ms-90k_coco.py
carafe/faster-rcnn_r50_fpn-carafe_1x_coco.py
cascade_rcnn/cascade-rcnn_r50_fpn_1x_coco.py
cascade_rcnn/cascade-mask-rcnn_r50_fpn_1x_coco.py
cascade_rpn/cascade-rpn_faster-rcnn_r50-caffe_fpn_1x_coco.py
centernet/centernet-update_r50-caffe_fpn_ms-1x_coco.py
centripetalnet/centripetalnet_hourglass104_16xb6-crop511-210e-mstest_coco.py
condinst/condinst_r50_fpn_ms-poly-90k_coco_instance.py
conditional_detr/conditional-detr_r50_8xb2-50e_coco.py
convnext/mask-rcnn_convnext-t-p4-w7_fpn_amp-ms-crop-3x_coco.py
cornernet/cornernet_hourglass104_8xb6-210e-mstest_coco.py
dab_detr/dab-detr_r50_8xb2-50e_coco.py
dcn/mask-rcnn_r50-dconv-c3-c5_fpn_1x_coco.py
dcnv2/faster-rcnn_r50_fpn_mdpool_1x_coco.py
ddod/ddod_r50_fpn_1x_coco.py
deformable_detr/deformable-detr_r50_16xb2-50e_coco.py
detectors/detectors_htc-r50_1x_coco.py
detr/detr_r50_8xb2-150e_coco.py
dino/dino-4scale_r50_8xb2-12e_coco.py
double_heads/dh-faster-rcnn_r50_fpn_1x_coco.py
dyhead/atss_r50_fpn_dyhead_1x_coco.py
dynamic_rcnn/dynamic-rcnn_r50_fpn_1x_coco.py
efficientnet/retinanet_effb3_fpn_8xb4-crop896-1x_coco.py
empirical_attention/faster-rcnn_r50-attn0010-dcn_fpn_1x_coco.py
faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py
fcos/fcos_r50-caffe_fpn_gn-head-center-normbbox-centeronreg-giou_1x_coco.py
foveabox/fovea_r50_fpn_gn-head-align_4xb4-2x_coco.py
fpg/retinanet_r50_fpg_crop640_50e_coco.py
free_anchor/freeanchor_r50_fpn_1x_coco.py
fsaf/fsaf_r50_fpn_1x_coco.py
gcnet/mask-rcnn_r50-gcb-r4-c3-c5_fpn_1x_coco.py
gfl/gfl_r50_fpn_1x_coco.py
ghm/retinanet_r50_fpn_ghm-1x_coco.py
gn/mask-rcnn_r50_fpn_gn-all_2x_coco.py
gn+ws/faster-rcnn_r50_fpn_gn-ws-all_1x_coco.py
grid_rcnn/grid-rcnn_r50_fpn_gn-head_1x_coco.py
groie/faste-rcnn_r50_fpn_groie_1x_coco.py
guided_anchoring/ga-faster-rcnn_r50_fpn_1x_coco.py
hrnet/htc_hrnetv2p-w18_20e_coco.py
htc/htc_r50_fpn_1x_coco.py
instaboost/mask-rcnn_r50_fpn_instaboost-4x_coco.py
lad/lad_r50-paa-r101_fpn_2xb8_coco_1x.py
ld/ld_r18-gflv1-r101_fpn_1x_coco.py
libra_rcnn/libra-faster-rcnn_r50_fpn_1x_coco.py
lvis/mask-rcnn_r50_fpn_sample1e-3_ms-1x_lvis-v1.py
mask2former/mask2former_r50_8xb2-lsj-50e_coco.py
mask2former/mask2former_r50_8xb2-lsj-50e_coco-panoptic.py
mask_rcnn/mask-rcnn_r50_fpn_1x_coco.py
maskformer/maskformer_r50_ms-16xb1-75e_coco.py
ms_rcnn/ms-rcnn_r50_fpn_1x_coco.py
nas_fcos/nas-fcos_r50-caffe_fpn_nashead-gn-head_4xb4-1x_coco.py
nas_fpn/retinanet_r50_nasfpn_crop640-50e_coco.py
paa/paa_r50_fpn_1x_coco.py
pafpn/faster-rcnn_r50_pafpn_1x_coco.py
panoptic_fpn/panoptic-fpn_r50_fpn_1x_coco.py
pisa/faster-rcnn_r50_fpn_pisa_1x_coco.py
point_rend/point-rend_r50-caffe_fpn_ms-1x_coco.py
pvt/retinanet_pvtv2-b0_fpn_1x_coco.py
queryinst/queryinst_r50_fpn_1x_coco.py
regnet/mask-rcnn_regnetx-3.2GF_fpn_1x_coco.py
reppoints/reppoints-moment_r50_fpn-gn_head-gn_1x_coco.py
res2net/faster-rcnn_res2net-101_fpn_2x_coco.py
resnest/mask-rcnn_s50_fpn_syncbn-backbone+head_ms-1x_coco.py
resnet_strikes_back/faster-rcnn_r50-rsb-pre_fpn_1x_coco.py
retinanet/retinanet_r50_fpn_1x_coco.py
rpn/rpn_r50_fpn_1x_coco.py
rtmdet/rtmdet_s_8xb32-300e_coco.py
rtmdet/rtmdet-ins_s_8xb32-300e_coco.py
sabl/sabl-retinanet_r50_fpn_1x_coco.py
scnet/scnet_r50_fpn_1x_coco.py
scratch/faster-rcnn_r50-scratch_fpn_gn-all_6x_coco.py
seesaw_loss/mask-rcnn_r50_fpn_seesaw-loss_random-ms-2x_lvis-v1.py
simple_copy_paste/mask-rcnn_r50_fpn_rpn-2conv_4conv1fc_syncbn-all_32xb2-ssj-scp-90k_coco.py
soft_teacher/soft-teacher_faster-rcnn_r50-caffe_fpn_180k_semi-0.1-coco.py
solo/solo_r50_fpn_1x_coco.py
solov2/solov2_r50_fpn_1x_coco.py
sparse_rcnn/sparse-rcnn_r50_fpn_1x_coco.py
ssd/ssd300_coco.py
strong_baselines/mask-rcnn_r50-caffe_fpn_rpn-2conv_4conv1fc_syncbn-all_amp-lsj-100e_coco.py
swin/mask-rcnn_swin-t-p4-w7_fpn_1x_coco.py
timm_example/retinanet_timm-tv-resnet50_fpn_1x_coco.py
tood/tood_r50_fpn_1x_coco.py
tridentnet/tridentnet_r50-caffe_1x_coco.py
vfnet/vfnet_r50_fpn_1x_coco.py
yolact/yolact_r50_8xb8-55e_coco.py
yolo/yolov3_d53_8xb8-320-273e_coco.py
yolof/yolof_r50-c5_8xb8-1x_coco.py
yolox/yolox_s_8xb8-300e_coco.py
================================================
FILE: .dev_scripts/benchmark_inference_fps.py
================================================
# Copyright (c) OpenMMLab. All rights reserved.
import argparse
import os
import os.path as osp
from mmengine.config import Config, DictAction
from mmengine.dist import init_dist
from mmengine.fileio import dump
from mmengine.utils import mkdir_or_exist
from terminaltables import GithubFlavoredMarkdownTable
from tools.analysis_tools.benchmark import repeat_measure_inference_speed
def parse_args():
parser = argparse.ArgumentParser(
description='MMDet benchmark a model of FPS')
parser.add_argument('config', help='test config file path')
parser.add_argument('checkpoint_root', help='Checkpoint file root path')
parser.add_argument(
'--round-num',
type=int,
default=1,
help='round a number to a given precision in decimal digits')
parser.add_argument(
'--repeat-num',
type=int,
default=1,
help='number of repeat times of measurement for averaging the results')
parser.add_argument(
'--out', type=str, help='output path of gathered fps to be stored')
parser.add_argument(
'--max-iter', type=int, default=2000, help='num of max iter')
parser.add_argument(
'--log-interval', type=int, default=50, help='interval of logging')
parser.add_argument(
'--fuse-conv-bn',
action='store_true',
help='Whether to fuse conv and bn, this will slightly increase'
'the inference speed')
parser.add_argument(
'--cfg-options',
nargs='+',
action=DictAction,
help='override some settings in the used config, the key-value pair '
'in xxx=yyy format will be merged into config file. If the value to '
'be overwritten is a list, it should be like key="[a,b]" or key=a,b '
'It also allows nested list/tuple values, e.g. key="[(a,b),(c,d)]" '
'Note that the quotation marks are necessary and that no white space '
'is allowed.')
parser.add_argument(
'--launcher',
choices=['none', 'pytorch', 'slurm', 'mpi'],
default='none',
help='job launcher')
parser.add_argument('--local_rank', type=int, default=0)
args = parser.parse_args()
if 'LOCAL_RANK' not in os.environ:
os.environ['LOCAL_RANK'] = str(args.local_rank)
return args
def results2markdown(result_dict):
table_data = []
is_multiple_results = False
for cfg_name, value in result_dict.items():
name = cfg_name.replace('configs/', '')
fps = value['fps']
ms_times_pre_image = value['ms_times_pre_image']
if isinstance(fps, list):
is_multiple_results = True
mean_fps = value['mean_fps']
mean_times_pre_image = value['mean_times_pre_image']
fps_str = ','.join([str(s) for s in fps])
ms_times_pre_image_str = ','.join(
[str(s) for s in ms_times_pre_image])
table_data.append([
name, fps_str, mean_fps, ms_times_pre_image_str,
mean_times_pre_image
])
else:
table_data.append([name, fps, ms_times_pre_image])
if is_multiple_results:
table_data.insert(0, [
'model', 'fps', 'mean_fps', 'times_pre_image(ms)',
'mean_times_pre_image(ms)'
])
else:
table_data.insert(0, ['model', 'fps', 'times_pre_image(ms)'])
table = GithubFlavoredMarkdownTable(table_data)
print(table.table, flush=True)
if __name__ == '__main__':
args = parse_args()
assert args.round_num >= 0
assert args.repeat_num >= 1
config = Config.fromfile(args.config)
if args.launcher == 'none':
raise NotImplementedError('Only supports distributed mode')
else:
init_dist(args.launcher)
result_dict = {}
for model_key in config:
model_infos = config[model_key]
if not isinstance(model_infos, list):
model_infos = [model_infos]
for model_info in model_infos:
record_metrics = model_info['metric']
cfg_path = model_info['config'].strip()
cfg = Config.fromfile(cfg_path)
checkpoint = osp.join(args.checkpoint_root,
model_info['checkpoint'].strip())
try:
fps = repeat_measure_inference_speed(cfg, checkpoint,
args.max_iter,
args.log_interval,
args.fuse_conv_bn,
args.repeat_num)
if args.repeat_num > 1:
fps_list = [round(fps_, args.round_num) for fps_ in fps]
times_pre_image_list = [
round(1000 / fps_, args.round_num) for fps_ in fps
]
mean_fps = round(
sum(fps_list) / len(fps_list), args.round_num)
mean_times_pre_image = round(
sum(times_pre_image_list) / len(times_pre_image_list),
args.round_num)
print(
f'{cfg_path} '
f'Overall fps: {fps_list}[{mean_fps}] img / s, '
f'times per image: '
f'{times_pre_image_list}[{mean_times_pre_image}] '
f'ms / img',
flush=True)
result_dict[cfg_path] = dict(
fps=fps_list,
mean_fps=mean_fps,
ms_times_pre_image=times_pre_image_list,
mean_times_pre_image=mean_times_pre_image)
else:
print(
f'{cfg_path} fps : {fps:.{args.round_num}f} img / s, '
f'times per image: {1000 / fps:.{args.round_num}f} '
f'ms / img',
flush=True)
result_dict[cfg_path] = dict(
fps=round(fps, args.round_num),
ms_times_pre_image=round(1000 / fps, args.round_num))
except Exception as e:
print(f'{cfg_path} error: {repr(e)}')
if args.repeat_num > 1:
result_dict[cfg_path] = dict(
fps=[0],
mean_fps=0,
ms_times_pre_image=[0],
mean_times_pre_image=0)
else:
result_dict[cfg_path] = dict(fps=0, ms_times_pre_image=0)
if args.out:
mkdir_or_exist(args.out)
dump(result_dict, osp.join(args.out, 'batch_inference_fps.json'))
results2markdown(result_dict)
================================================
FILE: .dev_scripts/benchmark_options.py
================================================
# Copyright (c) OpenMMLab. All rights reserved.
third_part_libs = [
'pip install -r ../requirements/albu.txt',
'pip install instaboostfast',
'pip install git+https://github.com/cocodataset/panopticapi.git',
'pip install timm',
'pip install mmcls>=1.0.0rc0',
'pip install git+https://github.com/lvis-dataset/lvis-api.git',
]
default_floating_range = 0.5
model_floating_ranges = {'atss/atss_r50_fpn_1x_coco.py': 0.3}
================================================
FILE: .dev_scripts/benchmark_test.py
================================================
# Copyright (c) OpenMMLab. All rights reserved.
import logging
import os
import os.path as osp
from argparse import ArgumentParser
from mmengine.config import Config, DictAction
from mmengine.logging import MMLogger
from mmengine.registry import RUNNERS
from mmengine.runner import Runner
from mmdet.testing import replace_to_ceph
from mmdet.utils import register_all_modules, replace_cfg_vals
def parse_args():
parser = ArgumentParser()
parser.add_argument('config', help='test config file path')
parser.add_argument('checkpoint_root', help='Checkpoint file root path')
parser.add_argument('--work-dir', help='the dir to save logs')
parser.add_argument('--ceph', action='store_true')
parser.add_argument(
'--cfg-options',
nargs='+',
action=DictAction,
help='override some settings in the used config, the key-value pair '
'in xxx=yyy format will be merged into config file. If the value to '
'be overwritten is a list, it should be like key="[a,b]" or key=a,b '
'It also allows nested list/tuple values, e.g. key="[(a,b),(c,d)]" '
'Note that the quotation marks are necessary and that no white space '
'is allowed.')
parser.add_argument(
'--launcher',
choices=['none', 'pytorch', 'slurm', 'mpi'],
default='none',
help='job launcher')
parser.add_argument('--local_rank', type=int, default=0)
args = parser.parse_args()
if 'LOCAL_RANK' not in os.environ:
os.environ['LOCAL_RANK'] = str(args.local_rank)
args = parser.parse_args()
return args
# TODO: Need to refactor test.py so that it can be reused.
def fast_test_model(config_name, checkpoint, args, logger=None):
cfg = Config.fromfile(config_name)
cfg = replace_cfg_vals(cfg)
cfg.launcher = args.launcher
if args.cfg_options is not None:
cfg.merge_from_dict(args.cfg_options)
# work_dir is determined in this priority: CLI > segment in file > filename
if args.work_dir is not None:
# update configs according to CLI args if args.work_dir is not None
cfg.work_dir = osp.join(args.work_dir,
osp.splitext(osp.basename(config_name))[0])
elif cfg.get('work_dir', None) is None:
# use config filename as default work_dir if cfg.work_dir is None
cfg.work_dir = osp.join('./work_dirs',
osp.splitext(osp.basename(config_name))[0])
if args.ceph:
replace_to_ceph(cfg)
cfg.load_from = checkpoint
# TODO: temporary plan
if 'visualizer' in cfg:
if 'name' in cfg.visualizer:
del cfg.visualizer.name
# build the runner from config
if 'runner_type' not in cfg:
# build the default runner
runner = Runner.from_cfg(cfg)
else:
# build customized runner from the registry
# if 'runner_type' is set in the cfg
runner = RUNNERS.build(cfg)
runner.test()
# Sample test whether the inference code is correct
def main(args):
# register all modules in mmdet into the registries
register_all_modules(init_default_scope=False)
config = Config.fromfile(args.config)
# test all model
logger = MMLogger.get_instance(
name='MMLogger',
log_file='benchmark_test.log',
log_level=logging.ERROR)
for model_key in config:
model_infos = config[model_key]
if not isinstance(model_infos, list):
model_infos = [model_infos]
for model_info in model_infos:
print('processing: ', model_info['config'], flush=True)
config_name = model_info['config'].strip()
checkpoint = osp.join(args.checkpoint_root,
model_info['checkpoint'].strip())
try:
fast_test_model(config_name, checkpoint, args, logger)
except Exception as e:
logger.error(f'{config_name} " : {repr(e)}')
if __name__ == '__main__':
args = parse_args()
main(args)
================================================
FILE: .dev_scripts/benchmark_test_image.py
================================================
# Copyright (c) OpenMMLab. All rights reserved.
import logging
import os.path as osp
from argparse import ArgumentParser
import mmcv
from mmengine.config import Config
from mmengine.logging import MMLogger
from mmengine.utils import mkdir_or_exist
from mmdet.apis import inference_detector, init_detector
from mmdet.registry import VISUALIZERS
from mmdet.utils import register_all_modules
def parse_args():
parser = ArgumentParser()
parser.add_argument('config', help='test config file path')
parser.add_argument('checkpoint_root', help='Checkpoint file root path')
parser.add_argument('--img', default='demo/demo.jpg', help='Image file')
parser.add_argument('--aug', action='store_true', help='aug test')
parser.add_argument('--model-name', help='model name to inference')
parser.add_argument('--show', action='store_true', help='show results')
parser.add_argument('--out-dir', default=None, help='Dir to output file')
parser.add_argument(
'--wait-time',
type=float,
default=1,
help='the interval of show (s), 0 is block')
parser.add_argument(
'--device', default='cuda:0', help='Device used for inference')
parser.add_argument(
'--palette',
default='coco',
choices=['coco', 'voc', 'citys', 'random'],
help='Color palette used for visualization')
parser.add_argument(
'--score-thr', type=float, default=0.3, help='bbox score threshold')
args = parser.parse_args()
return args
def inference_model(config_name, checkpoint, visualizer, args, logger=None):
cfg = Config.fromfile(config_name)
if args.aug:
raise NotImplementedError()
model = init_detector(
cfg, checkpoint, palette=args.palette, device=args.device)
visualizer.dataset_meta = model.dataset_meta
# test a single image
result = inference_detector(model, args.img)
# show the results
if args.show or args.out_dir is not None:
img = mmcv.imread(args.img)
img = mmcv.imconvert(img, 'bgr', 'rgb')
out_file = None
if args.out_dir is not None:
out_dir = args.out_dir
mkdir_or_exist(out_dir)
out_file = osp.join(
out_dir,
config_name.split('/')[-1].replace('py', 'jpg'))
visualizer.add_datasample(
'result',
img,
data_sample=result,
draw_gt=False,
show=args.show,
wait_time=args.wait_time,
out_file=out_file,
pred_score_thr=args.score_thr)
return result
# Sample test whether the inference code is correct
def main(args):
# register all modules in mmdet into the registries
register_all_modules()
config = Config.fromfile(args.config)
# init visualizer
visualizer_cfg = dict(type='DetLocalVisualizer', name='visualizer')
visualizer = VISUALIZERS.build(visualizer_cfg)
# test single model
if args.model_name:
if args.model_name in config:
model_infos = config[args.model_name]
if not isinstance(model_infos, list):
model_infos = [model_infos]
model_info = model_infos[0]
config_name = model_info['config'].strip()
print(f'processing: {config_name}', flush=True)
checkpoint = osp.join(args.checkpoint_root,
model_info['checkpoint'].strip())
# build the model from a config file and a checkpoint file
inference_model(config_name, checkpoint, visualizer, args)
return
else:
raise RuntimeError('model name input error.')
# test all model
logger = MMLogger.get_instance(
name='MMLogger',
log_file='benchmark_test_image.log',
log_level=logging.ERROR)
for model_key in config:
model_infos = config[model_key]
if not isinstance(model_infos, list):
model_infos = [model_infos]
for model_info in model_infos:
print('processing: ', model_info['config'], flush=True)
config_name = model_info['config'].strip()
checkpoint = osp.join(args.checkpoint_root,
model_info['checkpoint'].strip())
try:
# build the model from a config file and a checkpoint file
inference_model(config_name, checkpoint, visualizer, args,
logger)
except Exception as e:
logger.error(f'{config_name} " : {repr(e)}')
if __name__ == '__main__':
args = parse_args()
main(args)
================================================
FILE: .dev_scripts/benchmark_train.py
================================================
# Copyright (c) OpenMMLab. All rights reserved.
import logging
import os
import os.path as osp
from argparse import ArgumentParser
from mmengine.config import Config, DictAction
from mmengine.logging import MMLogger, print_log
from mmengine.registry import RUNNERS
from mmengine.runner import Runner
from mmdet.testing import replace_to_ceph
from mmdet.utils import register_all_modules, replace_cfg_vals
def parse_args():
parser = ArgumentParser()
parser.add_argument('config', help='test config file path')
parser.add_argument('--work-dir', help='the dir to save logs and models')
parser.add_argument('--ceph', action='store_true')
parser.add_argument('--save-ckpt', action='store_true')
parser.add_argument(
'--amp',
action='store_true',
default=False,
help='enable automatic-mixed-precision training')
parser.add_argument(
'--auto-scale-lr',
action='store_true',
help='enable automatically scaling LR.')
parser.add_argument(
'--resume',
action='store_true',
help='resume from the latest checkpoint in the work_dir automatically')
parser.add_argument(
'--cfg-options',
nargs='+',
action=DictAction,
help='override some settings in the used config, the key-value pair '
'in xxx=yyy format will be merged into config file. If the value to '
'be overwritten is a list, it should be like key="[a,b]" or key=a,b '
'It also allows nested list/tuple values, e.g. key="[(a,b),(c,d)]" '
'Note that the quotation marks are necessary and that no white space '
'is allowed.')
parser.add_argument(
'--launcher',
choices=['none', 'pytorch', 'slurm', 'mpi'],
default='none',
help='job launcher')
parser.add_argument('--local_rank', type=int, default=0)
args = parser.parse_args()
if 'LOCAL_RANK' not in os.environ:
os.environ['LOCAL_RANK'] = str(args.local_rank)
args = parser.parse_args()
return args
# TODO: Need to refactor train.py so that it can be reused.
def fast_train_model(config_name, args, logger=None):
cfg = Config.fromfile(config_name)
cfg = replace_cfg_vals(cfg)
cfg.launcher = args.launcher
if args.cfg_options is not None:
cfg.merge_from_dict(args.cfg_options)
# work_dir is determined in this priority: CLI > segment in file > filename
if args.work_dir is not None:
# update configs according to CLI args if args.work_dir is not None
cfg.work_dir = osp.join(args.work_dir,
osp.splitext(osp.basename(config_name))[0])
elif cfg.get('work_dir', None) is None:
# use config filename as default work_dir if cfg.work_dir is None
cfg.work_dir = osp.join('./work_dirs',
osp.splitext(osp.basename(config_name))[0])
ckpt_hook = cfg.default_hooks.checkpoint
by_epoch = ckpt_hook.get('by_epoch', True)
fast_stop_hook = dict(type='FastStopTrainingHook')
fast_stop_hook['by_epoch'] = by_epoch
if args.save_ckpt:
if by_epoch:
interval = 1
stop_iter_or_epoch = 2
else:
interval = 4
stop_iter_or_epoch = 10
fast_stop_hook['stop_iter_or_epoch'] = stop_iter_or_epoch
fast_stop_hook['save_ckpt'] = True
ckpt_hook.interval = interval
if 'custom_hooks' in cfg:
cfg.custom_hooks.append(fast_stop_hook)
else:
custom_hooks = [fast_stop_hook]
cfg.custom_hooks = custom_hooks
# TODO: temporary plan
if 'visualizer' in cfg:
if 'name' in cfg.visualizer:
del cfg.visualizer.name
# enable automatic-mixed-precision training
if args.amp is True:
optim_wrapper = cfg.optim_wrapper.type
if optim_wrapper == 'AmpOptimWrapper':
print_log(
'AMP training is already enabled in your config.',
logger='current',
level=logging.WARNING)
else:
assert optim_wrapper == 'OptimWrapper', (
'`--amp` is only supported when the optimizer wrapper type is '
f'`OptimWrapper` but got {optim_wrapper}.')
cfg.optim_wrapper.type = 'AmpOptimWrapper'
cfg.optim_wrapper.loss_scale = 'dynamic'
# enable automatically scaling LR
if args.auto_scale_lr:
if 'auto_scale_lr' in cfg and \
'enable' in cfg.auto_scale_lr and \
'base_batch_size' in cfg.auto_scale_lr:
cfg.auto_scale_lr.enable = True
else:
raise RuntimeError('Can not find "auto_scale_lr" or '
'"auto_scale_lr.enable" or '
'"auto_scale_lr.base_batch_size" in your'
' configuration file.')
if args.ceph:
replace_to_ceph(cfg)
cfg.resume = args.resume
# build the runner from config
if 'runner_type' not in cfg:
# build the default runner
runner = Runner.from_cfg(cfg)
else:
# build customized runner from the registry
# if 'runner_type' is set in the cfg
runner = RUNNERS.build(cfg)
runner.train()
# Sample test whether the train code is correct
def main(args):
# register all modules in mmdet into the registries
register_all_modules(init_default_scope=False)
config = Config.fromfile(args.config)
# test all model
logger = MMLogger.get_instance(
name='MMLogger',
log_file='benchmark_train.log',
log_level=logging.ERROR)
for model_key in config:
model_infos = config[model_key]
if not isinstance(model_infos, list):
model_infos = [model_infos]
for model_info in model_infos:
print('processing: ', model_info['config'], flush=True)
config_name = model_info['config'].strip()
try:
fast_train_model(config_name, args, logger)
except RuntimeError as e:
# quick exit is the normal exit message
if 'quick exit' not in repr(e):
logger.error(f'{config_name} " : {repr(e)}')
except Exception as e:
logger.error(f'{config_name} " : {repr(e)}')
if __name__ == '__main__':
args = parse_args()
main(args)
================================================
FILE: .dev_scripts/benchmark_train_models.txt
================================================
atss/atss_r50_fpn_1x_coco.py
faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py
mask_rcnn/mask-rcnn_r50_fpn_1x_coco.py
cascade_rcnn/cascade-mask-rcnn_r50_fpn_1x_coco.py
panoptic_fpn/panoptic-fpn_r50_fpn_1x_coco.py
retinanet/retinanet_r50_fpn_1x_coco.py
rtmdet/rtmdet_s_8xb32-300e_coco.py
rtmdet/rtmdet-ins_s_8xb32-300e_coco.py
deformable_detr/deformable-detr_r50_16xb2-50e_coco.py
fcos/fcos_r50-caffe_fpn_gn-head-center-normbbox-centeronreg-giou_1x_coco.py
centernet/centernet-update_r50-caffe_fpn_ms-1x_coco.py
dino/dino-4scale_r50_8xb2-12e_coco.py
htc/htc_r50_fpn_1x_coco.py
mask2former/mask2former_r50_8xb2-lsj-50e_coco-panoptic.py
swin/mask-rcnn_swin-t-p4-w7_fpn_1x_coco.py
condinst/condinst_r50_fpn_ms-poly-90k_coco_instance.py
lvis/mask-rcnn_r50_fpn_sample1e-3_ms-1x_lvis-v1.py
convnext/mask-rcnn_convnext-t-p4-w7_fpn_amp-ms-crop-3x_coco.py
================================================
FILE: .dev_scripts/benchmark_valid_flops.py
================================================
import logging
import re
import tempfile
from argparse import ArgumentParser
from collections import OrderedDict
from functools import partial
from pathlib import Path
import numpy as np
import pandas as pd
import torch
from mmengine import Config, DictAction
from mmengine.analysis import get_model_complexity_info
from mmengine.analysis.print_helper import _format_size
from mmengine.fileio import FileClient
from mmengine.logging import MMLogger
from mmengine.model import revert_sync_batchnorm
from mmengine.runner import Runner
from modelindex.load_model_index import load
from rich.console import Console
from rich.table import Table
from rich.text import Text
from tqdm import tqdm
from mmdet.registry import MODELS
from mmdet.utils import register_all_modules
console = Console()
MMDET_ROOT = Path(__file__).absolute().parents[1]
def parse_args():
parser = ArgumentParser(description='Valid all models in model-index.yml')
parser.add_argument(
'--shape',
type=int,
nargs='+',
default=[1280, 800],
help='input image size')
parser.add_argument(
'--checkpoint_root',
help='Checkpoint file root path. If set, load checkpoint before test.')
parser.add_argument('--img', default='demo/demo.jpg', help='Image file')
parser.add_argument('--models', nargs='+', help='models name to inference')
parser.add_argument(
'--batch-size',
type=int,
default=1,
help='The batch size during the inference.')
parser.add_argument(
'--flops', action='store_true', help='Get Flops and Params of models')
parser.add_argument(
'--flops-str',
action='store_true',
help='Output FLOPs and params counts in a string form.')
parser.add_argument(
'--cfg-options',
nargs='+',
action=DictAction,
help='override some settings in the used config, the key-value pair '
'in xxx=yyy format will be merged into config file. If the value to '
'be overwritten is a list, it should be like key="[a,b]" or key=a,b '
'It also allows nested list/tuple values, e.g. key="[(a,b),(c,d)]" '
'Note that the quotation marks are necessary and that no white space '
'is allowed.')
parser.add_argument(
'--size_divisor',
type=int,
default=32,
help='Pad the input image, the minimum size that is divisible '
'by size_divisor, -1 means do not pad the image.')
args = parser.parse_args()
return args
def inference(config_file, checkpoint, work_dir, args, exp_name):
logger = MMLogger.get_instance(name='MMLogger')
logger.warning('if you want test flops, please make sure torch>=1.12')
cfg = Config.fromfile(config_file)
cfg.work_dir = work_dir
cfg.load_from = checkpoint
cfg.log_level = 'WARN'
cfg.experiment_name = exp_name
if args.cfg_options is not None:
cfg.merge_from_dict(args.cfg_options)
# forward the model
result = {'model': config_file.stem}
if args.flops:
if len(args.shape) == 1:
h = w = args.shape[0]
elif len(args.shape) == 2:
h, w = args.shape
else:
raise ValueError('invalid input shape')
divisor = args.size_divisor
if divisor > 0:
h = int(np.ceil(h / divisor)) * divisor
w = int(np.ceil(w / divisor)) * divisor
input_shape = (3, h, w)
result['resolution'] = input_shape
try:
cfg = Config.fromfile(config_file)
if hasattr(cfg, 'head_norm_cfg'):
cfg['head_norm_cfg'] = dict(type='SyncBN', requires_grad=True)
cfg['model']['roi_head']['bbox_head']['norm_cfg'] = dict(
type='SyncBN', requires_grad=True)
cfg['model']['roi_head']['mask_head']['norm_cfg'] = dict(
type='SyncBN', requires_grad=True)
if args.cfg_options is not None:
cfg.merge_from_dict(args.cfg_options)
model = MODELS.build(cfg.model)
input = torch.rand(1, *input_shape)
if torch.cuda.is_available():
model.cuda()
input = input.cuda()
model = revert_sync_batchnorm(model)
inputs = (input, )
model.eval()
outputs = get_model_complexity_info(
model, input_shape, inputs, show_table=False, show_arch=False)
flops = outputs['flops']
params = outputs['params']
activations = outputs['activations']
result['Get Types'] = 'direct'
except: # noqa 772
logger = MMLogger.get_instance(name='MMLogger')
logger.warning(
'Direct get flops failed, try to get flops with data')
cfg = Config.fromfile(config_file)
if hasattr(cfg, 'head_norm_cfg'):
cfg['head_norm_cfg'] = dict(type='SyncBN', requires_grad=True)
cfg['model']['roi_head']['bbox_head']['norm_cfg'] = dict(
type='SyncBN', requires_grad=True)
cfg['model']['roi_head']['mask_head']['norm_cfg'] = dict(
type='SyncBN', requires_grad=True)
data_loader = Runner.build_dataloader(cfg.val_dataloader)
data_batch = next(iter(data_loader))
model = MODELS.build(cfg.model)
if torch.cuda.is_available():
model = model.cuda()
model = revert_sync_batchnorm(model)
model.eval()
_forward = model.forward
data = model.data_preprocessor(data_batch)
del data_loader
model.forward = partial(
_forward, data_samples=data['data_samples'])
outputs = get_model_complexity_info(
model,
input_shape,
data['inputs'],
show_table=False,
show_arch=False)
flops = outputs['flops']
params = outputs['params']
activations = outputs['activations']
result['Get Types'] = 'dataloader'
if args.flops_str:
flops = _format_size(flops)
params = _format_size(params)
activations = _format_size(activations)
result['flops'] = flops
result['params'] = params
return result
def show_summary(summary_data, args):
table = Table(title='Validation Benchmark Regression Summary')
table.add_column('Model')
table.add_column('Validation')
table.add_column('Resolution (c, h, w)')
if args.flops:
table.add_column('Flops', justify='right', width=11)
table.add_column('Params', justify='right')
for model_name, summary in summary_data.items():
row = [model_name]
valid = summary['valid']
color = 'green' if valid == 'PASS' else 'red'
row.append(f'[{color}]{valid}[/{color}]')
if valid == 'PASS':
row.append(str(summary['resolution']))
if args.flops:
row.append(str(summary['flops']))
row.append(str(summary['params']))
table.add_row(*row)
console.print(table)
table_data = {
x.header: [Text.from_markup(y).plain for y in x.cells]
for x in table.columns
}
table_pd = pd.DataFrame(table_data)
table_pd.to_csv('./mmdetection_flops.csv')
# Sample test whether the inference code is correct
def main(args):
register_all_modules()
model_index_file = MMDET_ROOT / 'model-index.yml'
model_index = load(str(model_index_file))
model_index.build_models_with_collections()
models = OrderedDict({model.name: model for model in model_index.models})
logger = MMLogger(
'validation',
logger_name='validation',
log_file='benchmark_test_image.log',
log_level=logging.INFO)
if args.models:
patterns = [
re.compile(pattern.replace('+', '_')) for pattern in args.models
]
filter_models = {}
for k, v in models.items():
k = k.replace('+', '_')
if any([re.match(pattern, k) for pattern in patterns]):
filter_models[k] = v
if len(filter_models) == 0:
print('No model found, please specify models in:')
print('\n'.join(models.keys()))
return
models = filter_models
summary_data = {}
tmpdir = tempfile.TemporaryDirectory()
for model_name, model_info in tqdm(models.items()):
if model_info.config is None:
continue
model_info.config = model_info.config.replace('%2B', '+')
config = Path(model_info.config)
try:
config.exists()
except: # noqa 722
logger.error(f'{model_name}: {config} not found.')
continue
logger.info(f'Processing: {model_name}')
http_prefix = 'https://download.openmmlab.com/mmdetection/'
if args.checkpoint_root is not None:
root = args.checkpoint_root
if 's3://' in args.checkpoint_root:
from petrel_client.common.exception import AccessDeniedError
file_client = FileClient.infer_client(uri=root)
checkpoint = file_client.join_path(
root, model_info.weights[len(http_prefix):])
try:
exists = file_client.exists(checkpoint)
except AccessDeniedError:
exists = False
else:
checkpoint = Path(root) / model_info.weights[len(http_prefix):]
exists = checkpoint.exists()
if exists:
checkpoint = str(checkpoint)
else:
print(f'WARNING: {model_name}: {checkpoint} not found.')
checkpoint = None
else:
checkpoint = None
try:
# build the model from a config file and a checkpoint file
result = inference(MMDET_ROOT / config, checkpoint, tmpdir.name,
args, model_name)
result['valid'] = 'PASS'
except Exception: # noqa 722
import traceback
logger.error(f'"{config}" :\n{traceback.format_exc()}')
result = {'valid': 'FAIL'}
summary_data[model_name] = result
tmpdir.cleanup()
show_summary(summary_data, args)
if __name__ == '__main__':
args = parse_args()
main(args)
================================================
FILE: .dev_scripts/check_links.py
================================================
# Modified from:
# https://github.com/allenai/allennlp/blob/main/scripts/check_links.py
import argparse
import logging
import os
import pathlib
import re
import sys
from multiprocessing.dummy import Pool
from typing import NamedTuple, Optional, Tuple
import requests
from mmengine.logging import MMLogger
def parse_args():
parser = argparse.ArgumentParser(
description='Goes through all the inline-links '
'in markdown files and reports the breakages')
parser.add_argument(
'--num-threads',
type=int,
default=100,
help='Number of processes to confirm the link')
parser.add_argument('--https-proxy', type=str, help='https proxy')
parser.add_argument(
'--out',
type=str,
default='link_reports.txt',
help='output path of reports')
args = parser.parse_args()
return args
OK_STATUS_CODES = (
200,
401, # the resource exists but may require some sort of login.
403, # ^ same
405, # HEAD method not allowed.
# the resource exists, but our default 'Accept-' header may not
# match what the server can provide.
406,
)
class MatchTuple(NamedTuple):
source: str
name: str
link: str
def check_link(
match_tuple: MatchTuple,
http_session: requests.Session,
logger: logging = None) -> Tuple[MatchTuple, bool, Optional[str]]:
reason: Optional[str] = None
if match_tuple.link.startswith('http'):
result_ok, reason = check_url(match_tuple, http_session)
else:
result_ok = check_path(match_tuple)
if logger is None:
print(f" {'✓' if result_ok else '✗'} {match_tuple.link}")
else:
logger.info(f" {'✓' if result_ok else '✗'} {match_tuple.link}")
return match_tuple, result_ok, reason
def check_url(match_tuple: MatchTuple,
http_session: requests.Session) -> Tuple[bool, str]:
"""Check if a URL is reachable."""
try:
result = http_session.head(
match_tuple.link, timeout=5, allow_redirects=True)
return (
result.ok or result.status_code in OK_STATUS_CODES,
f'status code = {result.status_code}',
)
except (requests.ConnectionError, requests.Timeout):
return False, 'connection error'
def check_path(match_tuple: MatchTuple) -> bool:
"""Check if a file in this repository exists."""
relative_path = match_tuple.link.split('#')[0]
full_path = os.path.join(
os.path.dirname(str(match_tuple.source)), relative_path)
return os.path.exists(full_path)
def main():
args = parse_args()
# setup logger
logger = MMLogger.get_instance(name='mmdet', log_file=args.out)
# setup https_proxy
if args.https_proxy:
os.environ['https_proxy'] = args.https_proxy
# setup http_session
http_session = requests.Session()
for resource_prefix in ('http://', 'https://'):
http_session.mount(
resource_prefix,
requests.adapters.HTTPAdapter(
max_retries=5,
pool_connections=20,
pool_maxsize=args.num_threads),
)
logger.info('Finding all markdown files in the current directory...')
project_root = (pathlib.Path(__file__).parent / '..').resolve()
markdown_files = project_root.glob('**/*.md')
all_matches = set()
url_regex = re.compile(r'\[([^!][^\]]+)\]\(([^)(]+)\)')
for markdown_file in markdown_files:
with open(markdown_file) as handle:
for line in handle.readlines():
matches = url_regex.findall(line)
for name, link in matches:
if 'localhost' not in link:
all_matches.add(
MatchTuple(
source=str(markdown_file),
name=name,
link=link))
logger.info(f' {len(all_matches)} markdown files found')
logger.info('Checking to make sure we can retrieve each link...')
with Pool(processes=args.num_threads) as pool:
results = pool.starmap(check_link, [(match, http_session, logger)
for match in list(all_matches)])
# collect unreachable results
unreachable_results = [(match_tuple, reason)
for match_tuple, success, reason in results
if not success]
if unreachable_results:
logger.info('================================================')
logger.info(f'Unreachable links ({len(unreachable_results)}):')
for match_tuple, reason in unreachable_results:
logger.info(' > Source: ' + match_tuple.source)
logger.info(' Name: ' + match_tuple.name)
logger.info(' Link: ' + match_tuple.link)
if reason is not None:
logger.info(' Reason: ' + reason)
sys.exit(1)
logger.info('No Unreachable link found.')
if __name__ == '__main__':
main()
================================================
FILE: .dev_scripts/convert_test_benchmark_script.py
================================================
# Copyright (c) OpenMMLab. All rights reserved.
import argparse
import os
import os.path as osp
from mmengine import Config
def parse_args():
parser = argparse.ArgumentParser(
description='Convert benchmark model list to script')
parser.add_argument('config', help='test config file path')
parser.add_argument('--port', type=int, default=29666, help='dist port')
parser.add_argument(
'--run', action='store_true', help='run script directly')
parser.add_argument(
'--out', type=str, help='path to save model benchmark script')
args = parser.parse_args()
return args
def process_model_info(model_info, work_dir):
config = model_info['config'].strip()
fname, _ = osp.splitext(osp.basename(config))
job_name = fname
work_dir = '$WORK_DIR/' + fname
checkpoint = model_info['checkpoint'].strip()
return dict(
config=config,
job_name=job_name,
work_dir=work_dir,
checkpoint=checkpoint)
def create_test_bash_info(commands, model_test_dict, port, script_name,
partition):
config = model_test_dict['config']
job_name = model_test_dict['job_name']
checkpoint = model_test_dict['checkpoint']
work_dir = model_test_dict['work_dir']
echo_info = f' \necho \'{config}\' &'
commands.append(echo_info)
commands.append('\n')
command_info = f'GPUS=8 GPUS_PER_NODE=8 ' \
f'CPUS_PER_TASK=$CPUS_PRE_TASK {script_name} '
command_info += f'{partition} '
command_info += f'{job_name} '
command_info += f'{config} '
command_info += f'$CHECKPOINT_DIR/{checkpoint} '
command_info += f'--work-dir {work_dir} '
command_info += f'--cfg-option env_cfg.dist_cfg.port={port} '
command_info += ' &'
commands.append(command_info)
def main():
args = parse_args()
if args.out:
out_suffix = args.out.split('.')[-1]
assert args.out.endswith('.sh'), \
f'Expected out file path suffix is .sh, but get .{out_suffix}'
assert args.out or args.run, \
('Please specify at least one operation (save/run/ the '
'script) with the argument "--out" or "--run"')
commands = []
partition_name = 'PARTITION=$1 '
commands.append(partition_name)
commands.append('\n')
checkpoint_root = 'CHECKPOINT_DIR=$2 '
commands.append(checkpoint_root)
commands.append('\n')
work_dir = 'WORK_DIR=$3 '
commands.append(work_dir)
commands.append('\n')
cpus_pre_task = 'CPUS_PER_TASK=${4:-2} '
commands.append(cpus_pre_task)
commands.append('\n')
script_name = osp.join('tools', 'slurm_test.sh')
port = args.port
cfg = Config.fromfile(args.config)
for model_key in cfg:
model_infos = cfg[model_key]
if not isinstance(model_infos, list):
model_infos = [model_infos]
for model_info in model_infos:
print('processing: ', model_info['config'])
model_test_dict = process_model_info(model_info, work_dir)
create_test_bash_info(commands, model_test_dict, port, script_name,
'$PARTITION')
port += 1
command_str = ''.join(commands)
if args.out:
with open(args.out, 'w') as f:
f.write(command_str)
if args.run:
os.system(command_str)
if __name__ == '__main__':
main()
================================================
FILE: .dev_scripts/convert_train_benchmark_script.py
================================================
# Copyright (c) OpenMMLab. All rights reserved.
import argparse
import os
import os.path as osp
def parse_args():
parser = argparse.ArgumentParser(
description='Convert benchmark model json to script')
parser.add_argument(
'txt_path', type=str, help='txt path output by benchmark_filter')
parser.add_argument(
'--run', action='store_true', help='run script directly')
parser.add_argument(
'--out', type=str, help='path to save model benchmark script')
args = parser.parse_args()
return args
def determine_gpus(cfg_name):
gpus = 8
gpus_pre_node = 8
if cfg_name.find('16x') >= 0:
gpus = 16
elif cfg_name.find('4xb4') >= 0:
gpus = 4
gpus_pre_node = 4
elif 'lad' in cfg_name:
gpus = 2
gpus_pre_node = 2
return gpus, gpus_pre_node
def main():
args = parse_args()
if args.out:
out_suffix = args.out.split('.')[-1]
assert args.out.endswith('.sh'), \
f'Expected out file path suffix is .sh, but get .{out_suffix}'
assert args.out or args.run, \
('Please specify at least one operation (save/run/ the '
'script) with the argument "--out" or "--run"')
root_name = './tools'
train_script_name = osp.join(root_name, 'slurm_train.sh')
commands = []
partition_name = 'PARTITION=$1 '
commands.append(partition_name)
commands.append('\n')
work_dir = 'WORK_DIR=$2 '
commands.append(work_dir)
commands.append('\n')
cpus_pre_task = 'CPUS_PER_TASK=${3:-4} '
commands.append(cpus_pre_task)
commands.append('\n')
commands.append('\n')
with open(args.txt_path, 'r') as f:
model_cfgs = f.readlines()
for i, cfg in enumerate(model_cfgs):
cfg = cfg.strip()
if len(cfg) == 0:
continue
# print cfg name
echo_info = f'echo \'{cfg}\' &'
commands.append(echo_info)
commands.append('\n')
fname, _ = osp.splitext(osp.basename(cfg))
out_fname = '$WORK_DIR/' + fname
gpus, gpus_pre_node = determine_gpus(cfg)
command_info = f'GPUS={gpus} GPUS_PER_NODE={gpus_pre_node} ' \
f'CPUS_PER_TASK=$CPUS_PRE_TASK {train_script_name} '
command_info += '$PARTITION '
command_info += f'{fname} '
command_info += f'{cfg} '
command_info += f'{out_fname} '
command_info += '--cfg-options default_hooks.checkpoint.' \
'max_keep_ckpts=1 '
command_info += '&'
commands.append(command_info)
if i < len(model_cfgs):
commands.append('\n')
command_str = ''.join(commands)
if args.out:
with open(args.out, 'w') as f:
f.write(command_str)
if args.run:
os.system(command_str)
if __name__ == '__main__':
main()
================================================
FILE: .dev_scripts/covignore.cfg
================================================
# Each line should be the relative path to the root directory
# of this repo. Support regular expression as well.
# For example:
.*/__init__.py
================================================
FILE: .dev_scripts/diff_coverage_test.sh
================================================
#!/bin/bash
readarray -t IGNORED_FILES < $( dirname "$0" )/covignore.cfg
REUSE_COVERAGE_REPORT=${REUSE_COVERAGE_REPORT:-0}
REPO=${1:-"origin"}
BRANCH=${2:-"refactor_dev"}
git fetch $REPO $BRANCH
PY_FILES=""
for FILE_NAME in $(git diff --name-only ${REPO}/${BRANCH}); do
# Only test python files in mmdet/ existing in current branch, and not ignored in covignore.cfg
if [ ${FILE_NAME: -3} == ".py" ] && [ ${FILE_NAME:0:6} == "mmdet/" ] && [ -f "$FILE_NAME" ]; then
IGNORED=false
for IGNORED_FILE_NAME in "${IGNORED_FILES[@]}"; do
# Skip blank lines
if [ -z "$IGNORED_FILE_NAME" ]; then
continue
fi
if [ "${IGNORED_FILE_NAME::1}" != "#" ] && [[ "$FILE_NAME" =~ $IGNORED_FILE_NAME ]]; then
echo "Ignoring $FILE_NAME"
IGNORED=true
break
fi
done
if [ "$IGNORED" = false ]; then
PY_FILES="$PY_FILES $FILE_NAME"
fi
fi
done
# Only test the coverage when PY_FILES are not empty, otherwise they will test the entire project
if [ ! -z "${PY_FILES}" ]
then
if [ "$REUSE_COVERAGE_REPORT" == "0" ]; then
coverage run --branch --source mmdet -m pytest tests/
fi
coverage report --fail-under 80 -m $PY_FILES
interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-magic --ignore-regex "__repr__" --fail-under 95 $PY_FILES
fi
================================================
FILE: .dev_scripts/download_checkpoints.py
================================================
# Copyright (c) OpenMMLab. All rights reserved.
import argparse
import math
import os
import os.path as osp
from multiprocessing import Pool
import torch
from mmengine.config import Config
from mmengine.utils import mkdir_or_exist
def download(url, out_file, min_bytes=math.pow(1024, 2), progress=True):
# math.pow(1024, 2) is mean 1 MB
assert_msg = f"Downloaded url '{url}' does not exist " \
f'or size is < min_bytes={min_bytes}'
try:
print(f'Downloading {url} to {out_file}...')
torch.hub.download_url_to_file(url, str(out_file), progress=progress)
assert osp.exists(
out_file) and osp.getsize(out_file) > min_bytes, assert_msg
except Exception as e:
if osp.exists(out_file):
os.remove(out_file)
print(f'ERROR: {e}\nRe-attempting {url} to {out_file} ...')
os.system(f"curl -L '{url}' -o '{out_file}' --retry 3 -C -"
) # curl download, retry and resume on fail
finally:
if osp.exists(out_file) and osp.getsize(out_file) < min_bytes:
os.remove(out_file) # remove partial downloads
if not osp.exists(out_file):
print(f'ERROR: {assert_msg}\n')
print('=========================================\n')
def parse_args():
parser = argparse.ArgumentParser(description='Download checkpoints')
parser.add_argument('config', help='test config file path')
parser.add_argument(
'out', type=str, help='output dir of checkpoints to be stored')
parser.add_argument(
'--nproc', type=int, default=16, help='num of Processes')
parser.add_argument(
'--intranet',
action='store_true',
help='switch to internal network url')
args = parser.parse_args()
return args
if __name__ == '__main__':
args = parse_args()
mkdir_or_exist(args.out)
cfg = Config.fromfile(args.config)
checkpoint_url_list = []
checkpoint_out_list = []
for model in cfg:
model_infos = cfg[model]
if not isinstance(model_infos, list):
model_infos = [model_infos]
for model_info in model_infos:
checkpoint = model_info['checkpoint']
out_file = osp.join(args.out, checkpoint)
if not osp.exists(out_file):
url = model_info['url']
if args.intranet is True:
url = url.replace('.com', '.sensetime.com')
url = url.replace('https', 'http')
checkpoint_url_list.append(url)
checkpoint_out_list.append(out_file)
if len(checkpoint_url_list) > 0:
pool = Pool(min(os.cpu_count(), args.nproc))
pool.starmap(download, zip(checkpoint_url_list, checkpoint_out_list))
else:
print('No files to download!')
================================================
FILE: .dev_scripts/gather_models.py
================================================
# Copyright (c) OpenMMLab. All rights reserved.
import argparse
import glob
import json
import os.path as osp
import shutil
import subprocess
from collections import OrderedDict
import torch
import yaml
from mmengine.config import Config
from mmengine.fileio import dump
from mmengine.utils import mkdir_or_exist, scandir
def ordered_yaml_dump(data, stream=None, Dumper=yaml.SafeDumper, **kwds):
class OrderedDumper(Dumper):
pass
def _dict_representer(dumper, data):
return dumper.represent_mapping(
yaml.resolver.BaseResolver.DEFAULT_MAPPING_TAG, data.items())
OrderedDumper.add_representer(OrderedDict, _dict_representer)
return yaml.dump(data, stream, OrderedDumper, **kwds)
def process_checkpoint(in_file, out_file):
checkpoint = torch.load(in_file, map_location='cpu')
# remove optimizer for smaller file size
if 'optimizer' in checkpoint:
del checkpoint['optimizer']
# remove ema state_dict
for key in list(checkpoint['state_dict']):
if key.startswith('ema_'):
checkpoint['state_dict'].pop(key)
# if it is necessary to remove some sensitive data in checkpoint['meta'],
# add the code here.
if torch.__version__ >= '1.6':
torch.save(checkpoint, out_file, _use_new_zipfile_serialization=False)
else:
torch.save(checkpoint, out_file)
sha = subprocess.check_output(['sha256sum', out_file]).decode()
final_file = out_file.rstrip('.pth') + '-{}.pth'.format(sha[:8])
subprocess.Popen(['mv', out_file, final_file])
return final_file
def is_by_epoch(config):
cfg = Config.fromfile('./configs/' + config)
return cfg.runner.type == 'EpochBasedRunner'
def get_final_epoch_or_iter(config):
cfg = Config.fromfile('./configs/' + config)
if cfg.runner.type == 'EpochBasedRunner':
return cfg.runner.max_epochs
else:
return cfg.runner.max_iters
def get_best_epoch_or_iter(exp_dir):
best_epoch_iter_full_path = list(
sorted(glob.glob(osp.join(exp_dir, 'best_*.pth'))))[-1]
best_epoch_or_iter_model_path = best_epoch_iter_full_path.split('/')[-1]
best_epoch_or_iter = best_epoch_or_iter_model_path.\
split('_')[-1].split('.')[0]
return best_epoch_or_iter_model_path, int(best_epoch_or_iter)
def get_real_epoch_or_iter(config):
cfg = Config.fromfile('./configs/' + config)
if cfg.runner.type == 'EpochBasedRunner':
epoch = cfg.runner.max_epochs
if cfg.data.train.type == 'RepeatDataset':
epoch *= cfg.data.train.times
return epoch
else:
return cfg.runner.max_iters
def get_final_results(log_json_path,
epoch_or_iter,
results_lut,
by_epoch=True):
result_dict = dict()
last_val_line = None
last_train_line = None
last_val_line_idx = -1
last_train_line_idx = -1
with open(log_json_path, 'r') as f:
for i, line in enumerate(f.readlines()):
log_line = json.loads(line)
if 'mode' not in log_line.keys():
continue
if by_epoch:
if (log_line['mode'] == 'train'
and log_line['epoch'] == epoch_or_iter):
result_dict['memory'] = log_line['memory']
if (log_line['mode'] == 'val'
and log_line['epoch'] == epoch_or_iter):
result_dict.update({
key: log_line[key]
for key in results_lut if key in log_line
})
return result_dict
else:
if log_line['mode'] == 'train':
last_train_line_idx = i
last_train_line = log_line
if log_line and log_line['mode'] == 'val':
last_val_line_idx = i
last_val_line = log_line
# bug: max_iters = 768, last_train_line['iter'] = 750
assert last_val_line_idx == last_train_line_idx + 1, \
'Log file is incomplete'
result_dict['memory'] = last_train_line['memory']
result_dict.update({
key: last_val_line[key]
for key in results_lut if key in last_val_line
})
return result_dict
def get_dataset_name(config):
# If there are more dataset, add here.
name_map = dict(
CityscapesDataset='Cityscapes',
CocoDataset='COCO',
CocoPanopticDataset='COCO',
DeepFashionDataset='Deep Fashion',
LVISV05Dataset='LVIS v0.5',
LVISV1Dataset='LVIS v1',
VOCDataset='Pascal VOC',
WIDERFaceDataset='WIDER Face',
OpenImagesDataset='OpenImagesDataset',
OpenImagesChallengeDataset='OpenImagesChallengeDataset',
Objects365V1Dataset='Objects365 v1',
Objects365V2Dataset='Objects365 v2')
cfg = Config.fromfile('./configs/' + config)
return name_map[cfg.dataset_type]
def convert_model_info_to_pwc(model_infos):
pwc_files = {}
for model in model_infos:
cfg_folder_name = osp.split(model['config'])[-2]
pwc_model_info = OrderedDict()
pwc_model_info['Name'] = osp.split(model['config'])[-1].split('.')[0]
pwc_model_info['In Collection'] = 'Please fill in Collection name'
pwc_model_info['Config'] = osp.join('configs', model['config'])
# get metadata
memory = round(model['results']['memory'] / 1024, 1)
meta_data = OrderedDict()
meta_data['Training Memory (GB)'] = memory
if 'epochs' in model:
meta_data['Epochs'] = get_real_epoch_or_iter(model['config'])
else:
meta_data['Iterations'] = get_real_epoch_or_iter(model['config'])
pwc_model_info['Metadata'] = meta_data
# get dataset name
dataset_name = get_dataset_name(model['config'])
# get results
results = []
# if there are more metrics, add here.
if 'bbox_mAP' in model['results']:
metric = round(model['results']['bbox_mAP'] * 100, 1)
results.append(
OrderedDict(
Task='Object Detection',
Dataset=dataset_name,
Metrics={'box AP': metric}))
if 'segm_mAP' in model['results']:
metric = round(model['results']['segm_mAP'] * 100, 1)
results.append(
OrderedDict(
Task='Instance Segmentation',
Dataset=dataset_name,
Metrics={'mask AP': metric}))
if 'PQ' in model['results']:
metric = round(model['results']['PQ'], 1)
results.append(
OrderedDict(
Task='Panoptic Segmentation',
Dataset=dataset_name,
Metrics={'PQ': metric}))
pwc_model_info['Results'] = results
link_string = 'https://download.openmmlab.com/mmdetection/v2.0/'
link_string += '{}/{}'.format(model['config'].rstrip('.py'),
osp.split(model['model_path'])[-1])
pwc_model_info['Weights'] = link_string
if cfg_folder_name in pwc_files:
pwc_files[cfg_folder_name].append(pwc_model_info)
else:
pwc_files[cfg_folder_name] = [pwc_model_info]
return pwc_files
def parse_args():
parser = argparse.ArgumentParser(description='Gather benchmarked models')
parser.add_argument(
'root',
type=str,
help='root path of benchmarked models to be gathered')
parser.add_argument(
'out', type=str, help='output path of gathered models to be stored')
parser.add_argument(
'--best',
action='store_true',
help='whether to gather the best model.')
args = parser.parse_args()
return args
def main():
args = parse_args()
models_root = args.root
models_out = args.out
mkdir_or_exist(models_out)
# find all models in the root directory to be gathered
raw_configs = list(scandir('./configs', '.py', recursive=True))
# filter configs that is not trained in the experiments dir
used_configs = []
for raw_config in raw_configs:
if osp.exists(osp.join(models_root, raw_config)):
used_configs.append(raw_config)
print(f'Find {len(used_configs)} models to be gathered')
# find final_ckpt and log file for trained each config
# and parse the best performance
model_infos = []
for used_config in used_configs:
exp_dir = osp.join(models_root, used_config)
by_epoch = is_by_epoch(used_config)
# check whether the exps is finished
if args.best is True:
final_model, final_epoch_or_iter = get_best_epoch_or_iter(exp_dir)
else:
final_epoch_or_iter = get_final_epoch_or_iter(used_config)
final_model = '{}_{}.pth'.format('epoch' if by_epoch else 'iter',
final_epoch_or_iter)
model_path = osp.join(exp_dir, final_model)
# skip if the model is still training
if not osp.exists(model_path):
continue
# get the latest logs
log_json_path = list(
sorted(glob.glob(osp.join(exp_dir, '*.log.json'))))[-1]
log_txt_path = list(sorted(glob.glob(osp.join(exp_dir, '*.log'))))[-1]
cfg = Config.fromfile('./configs/' + used_config)
results_lut = cfg.evaluation.metric
if not isinstance(results_lut, list):
results_lut = [results_lut]
# case when using VOC, the evaluation key is only 'mAP'
# when using Panoptic Dataset, the evaluation key is 'PQ'.
for i, key in enumerate(results_lut):
if 'mAP' not in key and 'PQ' not in key:
results_lut[i] = key + '_mAP'
model_performance = get_final_results(log_json_path,
final_epoch_or_iter, results_lut,
by_epoch)
if model_performance is None:
continue
model_time = osp.split(log_txt_path)[-1].split('.')[0]
model_info = dict(
config=used_config,
results=model_performance,
model_time=model_time,
final_model=final_model,
log_json_path=osp.split(log_json_path)[-1])
model_info['epochs' if by_epoch else 'iterations'] =\
final_epoch_or_iter
model_infos.append(model_info)
# publish model for each checkpoint
publish_model_infos = []
for model in model_infos:
model_publish_dir = osp.join(models_out, model['config'].rstrip('.py'))
mkdir_or_exist(model_publish_dir)
model_name = osp.split(model['config'])[-1].split('.')[0]
model_name += '_' + model['model_time']
publish_model_path = osp.join(model_publish_dir, model_name)
trained_model_path = osp.join(models_root, model['config'],
model['final_model'])
# convert model
final_model_path = process_checkpoint(trained_model_path,
publish_model_path)
# copy log
shutil.copy(
osp.join(models_root, model['config'], model['log_json_path']),
osp.join(model_publish_dir, f'{model_name}.log.json'))
shutil.copy(
osp.join(models_root, model['config'],
model['log_json_path'].rstrip('.json')),
osp.join(model_publish_dir, f'{model_name}.log'))
# copy config to guarantee reproducibility
config_path = model['config']
config_path = osp.join(
'configs',
config_path) if 'configs' not in config_path else config_path
target_config_path = osp.split(config_path)[-1]
shutil.copy(config_path, osp.join(model_publish_dir,
target_config_path))
model['model_path'] = final_model_path
publish_model_infos.append(model)
models = dict(models=publish_model_infos)
print(f'Totally gathered {len(publish_model_infos)} models')
dump(models, osp.join(models_out, 'model_info.json'))
pwc_files = convert_model_info_to_pwc(publish_model_infos)
for name in pwc_files:
with open(osp.join(models_out, name + '_metafile.yml'), 'w') as f:
ordered_yaml_dump(pwc_files[name], f, encoding='utf-8')
if __name__ == '__main__':
main()
================================================
FILE: .dev_scripts/gather_test_benchmark_metric.py
================================================
# Copyright (c) OpenMMLab. All rights reserved.
import argparse
import glob
import os.path as osp
from mmengine.config import Config
from mmengine.fileio import dump, load
from mmengine.utils import mkdir_or_exist
def parse_args():
parser = argparse.ArgumentParser(
description='Gather benchmarked models metric')
parser.add_argument('config', help='test config file path')
parser.add_argument(
'root',
type=str,
help='root path of benchmarked models to be gathered')
parser.add_argument(
'--out', type=str, help='output path of gathered metrics to be stored')
parser.add_argument(
'--not-show', action='store_true', help='not show metrics')
parser.add_argument(
'--show-all', action='store_true', help='show all model metrics')
args = parser.parse_args()
return args
if __name__ == '__main__':
args = parse_args()
root_path = args.root
metrics_out = args.out
result_dict = {}
cfg = Config.fromfile(args.config)
for model_key in cfg:
model_infos = cfg[model_key]
if not isinstance(model_infos, list):
model_infos = [model_infos]
for model_info in model_infos:
record_metrics = model_info['metric']
config = model_info['config'].strip()
fname, _ = osp.splitext(osp.basename(config))
metric_json_dir = osp.join(root_path, fname)
if osp.exists(metric_json_dir):
json_list = glob.glob(osp.join(metric_json_dir, '*.json'))
if len(json_list) > 0:
log_json_path = list(sorted(json_list))[-1]
metric = load(log_json_path)
if config in metric.get('config', {}):
new_metrics = dict()
for record_metric_key in record_metrics:
record_metric_key_bk = record_metric_key
old_metric = record_metrics[record_metric_key]
if record_metric_key == 'AR_1000':
record_metric_key = 'AR@1000'
if record_metric_key not in metric['metric']:
raise KeyError(
'record_metric_key not exist, please '
'check your config')
new_metric = round(
metric['metric'][record_metric_key] * 100, 1)
new_metrics[record_metric_key_bk] = new_metric
if args.show_all:
result_dict[config] = dict(
before=record_metrics, after=new_metrics)
else:
for record_metric_key in record_metrics:
old_metric = record_metrics[record_metric_key]
new_metric = new_metrics[record_metric_key]
if old_metric != new_metric:
result_dict[config] = dict(
before=record_metrics,
after=new_metrics)
break
else:
print(f'{config} not included in: {log_json_path}')
else:
print(f'{config} not exist file: {metric_json_dir}')
else:
print(f'{config} not exist dir: {metric_json_dir}')
if metrics_out:
mkdir_or_exist(metrics_out)
dump(result_dict, osp.join(metrics_out, 'batch_test_metric_info.json'))
if not args.not_show:
print('===================================')
for config_name, metrics in result_dict.items():
print(config_name, metrics)
print('===================================')
================================================
FILE: .dev_scripts/gather_train_benchmark_metric.py
================================================
# Copyright (c) OpenMMLab. All rights reserved.
import argparse
import glob
import os.path as osp
from gather_models import get_final_results
from mmengine.config import Config
from mmengine.fileio import dump
from mmengine.utils import mkdir_or_exist
try:
import xlrd
except ImportError:
xlrd = None
try:
import xlutils
from xlutils.copy import copy
except ImportError:
xlutils = None
def parse_args():
parser = argparse.ArgumentParser(
description='Gather benchmarked models metric')
parser.add_argument(
'root',
type=str,
help='root path of benchmarked models to be gathered')
parser.add_argument(
'txt_path', type=str, help='txt path output by benchmark_filter')
parser.add_argument(
'--out', type=str, help='output path of gathered metrics to be stored')
parser.add_argument(
'--not-show', action='store_true', help='not show metrics')
parser.add_argument(
'--excel', type=str, help='input path of excel to be recorded')
parser.add_argument(
'--ncol', type=int, help='Number of column to be modified or appended')
args = parser.parse_args()
return args
if __name__ == '__main__':
args = parse_args()
if args.excel:
assert args.ncol, 'Please specify "--excel" and "--ncol" ' \
'at the same time'
if xlrd is None:
raise RuntimeError(
'xlrd is not installed,'
'Please use “pip install xlrd==1.2.0” to install')
if xlutils is None:
raise RuntimeError(
'xlutils is not installed,'
'Please use “pip install xlutils==2.0.0” to install')
readbook = xlrd.open_workbook(args.excel)
sheet = readbook.sheet_by_name('Sheet1')
sheet_info = {}
total_nrows = sheet.nrows
for i in range(3, sheet.nrows):
sheet_info[sheet.row_values(i)[0]] = i
xlrw = copy(readbook)
table = xlrw.get_sheet(0)
root_path = args.root
metrics_out = args.out
result_dict = {}
with open(args.txt_path, 'r') as f:
model_cfgs = f.readlines()
for i, config in enumerate(model_cfgs):
config = config.strip()
if len(config) == 0:
continue
config_name = osp.split(config)[-1]
config_name = osp.splitext(config_name)[0]
result_path = osp.join(root_path, config_name)
if osp.exists(result_path):
# 1 read config
cfg = Config.fromfile(config)
total_epochs = cfg.runner.max_epochs
final_results = cfg.evaluation.metric
if not isinstance(final_results, list):
final_results = [final_results]
final_results_out = []
for key in final_results:
if 'proposal_fast' in key:
final_results_out.append('AR@1000') # RPN
elif 'mAP' not in key:
final_results_out.append(key + '_mAP')
# 2 determine whether total_epochs ckpt exists
ckpt_path = f'epoch_{total_epochs}.pth'
if osp.exists(osp.join(result_path, ckpt_path)):
log_json_path = list(
sorted(glob.glob(osp.join(result_path,
'*.log.json'))))[-1]
# 3 read metric
model_performance = get_final_results(
log_json_path, total_epochs, final_results_out)
if model_performance is None:
print(f'log file error: {log_json_path}')
continue
for performance in model_performance:
if performance in ['AR@1000', 'bbox_mAP', 'segm_mAP']:
metric = round(
model_performance[performance] * 100, 1)
model_performance[performance] = metric
result_dict[config] = model_performance
# update and append excel content
if args.excel:
if 'AR@1000' in model_performance:
metrics = f'{model_performance["AR@1000"]}' \
f'(AR@1000)'
elif 'segm_mAP' in model_performance:
metrics = f'{model_performance["bbox_mAP"]}/' \
f'{model_performance["segm_mAP"]}'
else:
metrics = f'{model_performance["bbox_mAP"]}'
row_num = sheet_info.get(config, None)
if row_num:
table.write(row_num, args.ncol, metrics)
else:
table.write(total_nrows, 0, config)
table.write(total_nrows, args.ncol, metrics)
total_nrows += 1
else:
print(f'{config} not exist: {ckpt_path}')
else:
print(f'not exist: {config}')
# 4 save or print results
if metrics_out:
mkdir_or_exist(metrics_out)
dump(result_dict, osp.join(metrics_out, 'model_metric_info.json'))
if not args.not_show:
print('===================================')
for config_name, metrics in result_dict.items():
print(config_name, metrics)
print('===================================')
if args.excel:
filename, sufflx = osp.splitext(args.excel)
xlrw.save(f'{filename}_o{sufflx}')
print(f'>>> Output {filename}_o{sufflx}')
================================================
FILE: .dev_scripts/linter.sh
================================================
yapf -r -i mmdet/ configs/ tests/ tools/
isort -rc mmdet/ configs/ tests/ tools/
flake8 .
================================================
FILE: .dev_scripts/test_benchmark.sh
================================================
PARTITION=$1
CHECKPOINT_DIR=$2
WORK_DIR=$3
CPUS_PER_TASK=${4:-2}
echo 'configs/atss/atss_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION atss_r50_fpn_1x_coco configs/atss/atss_r50_fpn_1x_coco.py $CHECKPOINT_DIR/atss_r50_fpn_1x_coco_20200209-985f7bd0.pth --work-dir $WORK_DIR/atss_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29666 &
echo 'configs/autoassign/autoassign_r50-caffe_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION autoassign_r50-caffe_fpn_1x_coco configs/autoassign/autoassign_r50-caffe_fpn_1x_coco.py $CHECKPOINT_DIR/auto_assign_r50_fpn_1x_coco_20210413_115540-5e17991f.pth --work-dir $WORK_DIR/autoassign_r50-caffe_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29667 &
echo 'configs/carafe/faster-rcnn_r50_fpn-carafe_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION faster-rcnn_r50_fpn-carafe_1x_coco configs/carafe/faster-rcnn_r50_fpn-carafe_1x_coco.py $CHECKPOINT_DIR/faster_rcnn_r50_fpn_carafe_1x_coco_bbox_mAP-0.386_20200504_175733-385a75b7.pth --work-dir $WORK_DIR/faster-rcnn_r50_fpn-carafe_1x_coco --cfg-option env_cfg.dist_cfg.port=29668 &
echo 'configs/cascade_rcnn/cascade-rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION cascade-rcnn_r50_fpn_1x_coco configs/cascade_rcnn/cascade-rcnn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/cascade_rcnn_r50_fpn_1x_coco_20200316-3dc56deb.pth --work-dir $WORK_DIR/cascade-rcnn_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29669 &
echo 'configs/cascade_rcnn/cascade-mask-rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION cascade-mask-rcnn_r50_fpn_1x_coco configs/cascade_rcnn/cascade-mask-rcnn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/cascade_mask_rcnn_r50_fpn_1x_coco_20200203-9d4dcb24.pth --work-dir $WORK_DIR/cascade-mask-rcnn_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29670 &
echo 'configs/cascade_rpn/cascade-rpn_faster-rcnn_r50-caffe_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION cascade-rpn_faster-rcnn_r50-caffe_fpn_1x_coco configs/cascade_rpn/cascade-rpn_faster-rcnn_r50-caffe_fpn_1x_coco.py $CHECKPOINT_DIR/crpn_faster_rcnn_r50_caffe_fpn_1x_coco-c8283cca.pth --work-dir $WORK_DIR/cascade-rpn_faster-rcnn_r50-caffe_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29671 &
echo 'configs/centernet/centernet_r18-dcnv2_8xb16-crop512-140e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION centernet_r18-dcnv2_8xb16-crop512-140e_coco configs/centernet/centernet_r18-dcnv2_8xb16-crop512-140e_coco.py $CHECKPOINT_DIR/centernet_resnet18_dcnv2_140e_coco_20210702_155131-c8cd631f.pth --work-dir $WORK_DIR/centernet_r18-dcnv2_8xb16-crop512-140e_coco --cfg-option env_cfg.dist_cfg.port=29672 &
echo 'configs/centripetalnet/centripetalnet_hourglass104_16xb6-crop511-210e-mstest_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION centripetalnet_hourglass104_16xb6-crop511-210e-mstest_coco configs/centripetalnet/centripetalnet_hourglass104_16xb6-crop511-210e-mstest_coco.py $CHECKPOINT_DIR/centripetalnet_hourglass104_mstest_16x6_210e_coco_20200915_204804-3ccc61e5.pth --work-dir $WORK_DIR/centripetalnet_hourglass104_16xb6-crop511-210e-mstest_coco --cfg-option env_cfg.dist_cfg.port=29673 &
echo 'configs/convnext/cascade-mask-rcnn_convnext-s-p4-w7_fpn_4conv1fc-giou_amp-ms-crop-3x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION cascade-mask-rcnn_convnext-s-p4-w7_fpn_4conv1fc-giou_amp-ms-crop-3x_coco configs/convnext/cascade-mask-rcnn_convnext-s-p4-w7_fpn_4conv1fc-giou_amp-ms-crop-3x_coco.py $CHECKPOINT_DIR/cascade_mask_rcnn_convnext-s_p4_w7_fpn_giou_4conv1f_fp16_ms-crop_3x_coco_20220510_201004-3d24f5a4.pth --work-dir $WORK_DIR/cascade-mask-rcnn_convnext-s-p4-w7_fpn_4conv1fc-giou_amp-ms-crop-3x_coco --cfg-option env_cfg.dist_cfg.port=29674 &
echo 'configs/cornernet/cornernet_hourglass104_8xb6-210e-mstest_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION cornernet_hourglass104_8xb6-210e-mstest_coco configs/cornernet/cornernet_hourglass104_8xb6-210e-mstest_coco.py $CHECKPOINT_DIR/cornernet_hourglass104_mstest_8x6_210e_coco_20200825_150618-79b44c30.pth --work-dir $WORK_DIR/cornernet_hourglass104_8xb6-210e-mstest_coco --cfg-option env_cfg.dist_cfg.port=29675 &
echo 'configs/dcn/faster-rcnn_r50-dconv-c3-c5_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION faster-rcnn_r50-dconv-c3-c5_fpn_1x_coco configs/dcn/faster-rcnn_r50-dconv-c3-c5_fpn_1x_coco.py $CHECKPOINT_DIR/faster_rcnn_r50_fpn_dconv_c3-c5_1x_coco_20200130-d68aed1e.pth --work-dir $WORK_DIR/faster-rcnn_r50-dconv-c3-c5_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29676 &
echo 'configs/dcnv2/faster-rcnn_r50_fpn_mdpool_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION faster-rcnn_r50_fpn_mdpool_1x_coco configs/dcnv2/faster-rcnn_r50_fpn_mdpool_1x_coco.py $CHECKPOINT_DIR/faster_rcnn_r50_fpn_mdpool_1x_coco_20200307-c0df27ff.pth --work-dir $WORK_DIR/faster-rcnn_r50_fpn_mdpool_1x_coco --cfg-option env_cfg.dist_cfg.port=29677 &
echo 'configs/ddod/ddod_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION ddod_r50_fpn_1x_coco configs/ddod/ddod_r50_fpn_1x_coco.py $CHECKPOINT_DIR/ddod_r50_fpn_1x_coco_20220523_223737-29b2fc67.pth --work-dir $WORK_DIR/ddod_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29678 &
echo 'configs/deformable_detr/deformable-detr_r50_16xb2-50e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION deformable-detr_r50_16xb2-50e_coco configs/deformable_detr/deformable-detr_r50_16xb2-50e_coco.py $CHECKPOINT_DIR/deformable_detr_r50_16x2_50e_coco_20210419_220030-a12b9512.pth --work-dir $WORK_DIR/deformable-detr_r50_16xb2-50e_coco --cfg-option env_cfg.dist_cfg.port=29679 &
echo 'configs/detectors/detectors_htc-r50_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION detectors_htc-r50_1x_coco configs/detectors/detectors_htc-r50_1x_coco.py $CHECKPOINT_DIR/detectors_htc_r50_1x_coco-329b1453.pth --work-dir $WORK_DIR/detectors_htc-r50_1x_coco --cfg-option env_cfg.dist_cfg.port=29680 &
echo 'configs/detr/detr_r50_8xb2-150e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION detr_r50_8xb2-150e_coco configs/detr/detr_r50_8xb2-150e_coco.py $CHECKPOINT_DIR/detr_r50_8x2_150e_coco_20201130_194835-2c4b8974.pth --work-dir $WORK_DIR/detr_r50_8xb2-150e_coco --cfg-option env_cfg.dist_cfg.port=29681 &
echo 'configs/double_heads/dh-faster-rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION dh-faster-rcnn_r50_fpn_1x_coco configs/double_heads/dh-faster-rcnn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/dh_faster_rcnn_r50_fpn_1x_coco_20200130-586b67df.pth --work-dir $WORK_DIR/dh-faster-rcnn_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29682 &
echo 'configs/dyhead/atss_r50_fpn_dyhead_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION atss_r50_fpn_dyhead_1x_coco configs/dyhead/atss_r50_fpn_dyhead_1x_coco.py $CHECKPOINT_DIR/atss_r50_fpn_dyhead_4x4_1x_coco_20211219_023314-eaa620c6.pth --work-dir $WORK_DIR/atss_r50_fpn_dyhead_1x_coco --cfg-option env_cfg.dist_cfg.port=29683 &
echo 'configs/dynamic_rcnn/dynamic-rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION dynamic-rcnn_r50_fpn_1x_coco configs/dynamic_rcnn/dynamic-rcnn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/dynamic_rcnn_r50_fpn_1x-62a3f276.pth --work-dir $WORK_DIR/dynamic-rcnn_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29684 &
echo 'configs/efficientnet/retinanet_effb3_fpn_8xb4-crop896-1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION retinanet_effb3_fpn_8xb4-crop896-1x_coco configs/efficientnet/retinanet_effb3_fpn_8xb4-crop896-1x_coco.py $CHECKPOINT_DIR/retinanet_effb3_fpn_crop896_8x4_1x_coco_20220322_234806-615a0dda.pth --work-dir $WORK_DIR/retinanet_effb3_fpn_8xb4-crop896-1x_coco --cfg-option env_cfg.dist_cfg.port=29685 &
echo 'configs/empirical_attention/faster-rcnn_r50-attn1111_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION faster-rcnn_r50-attn1111_fpn_1x_coco configs/empirical_attention/faster-rcnn_r50-attn1111_fpn_1x_coco.py $CHECKPOINT_DIR/faster_rcnn_r50_fpn_attention_1111_1x_coco_20200130-403cccba.pth --work-dir $WORK_DIR/faster-rcnn_r50-attn1111_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29686 &
echo 'configs/faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION faster-rcnn_r50_fpn_1x_coco configs/faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth --work-dir $WORK_DIR/faster-rcnn_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29687 &
echo 'configs/fcos/fcos_r50-caffe_fpn_gn-head-center-normbbox-centeronreg-giou_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION fcos_r50-caffe_fpn_gn-head-center-normbbox-centeronreg-giou_1x_coco configs/fcos/fcos_r50-caffe_fpn_gn-head-center-normbbox-centeronreg-giou_1x_coco.py $CHECKPOINT_DIR/fcos_center-normbbox-centeronreg-giou_r50_caffe_fpn_gn-head_1x_coco-0a0d75a8.pth --work-dir $WORK_DIR/fcos_r50-caffe_fpn_gn-head-center-normbbox-centeronreg-giou_1x_coco --cfg-option env_cfg.dist_cfg.port=29688 &
echo 'configs/foveabox/fovea_r50_fpn_gn-head-align_4xb4-2x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION fovea_r50_fpn_gn-head-align_4xb4-2x_coco configs/foveabox/fovea_r50_fpn_gn-head-align_4xb4-2x_coco.py $CHECKPOINT_DIR/fovea_align_r50_fpn_gn-head_4x4_2x_coco_20200203-8987880d.pth --work-dir $WORK_DIR/fovea_r50_fpn_gn-head-align_4xb4-2x_coco --cfg-option env_cfg.dist_cfg.port=29689 &
echo 'configs/fpg/mask-rcnn_r50_fpg_crop640-50e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION mask-rcnn_r50_fpg_crop640-50e_coco configs/fpg/mask-rcnn_r50_fpg_crop640-50e_coco.py $CHECKPOINT_DIR/mask_rcnn_r50_fpg_crop640_50e_coco_20220311_011857-233b8334.pth --work-dir $WORK_DIR/mask-rcnn_r50_fpg_crop640-50e_coco --cfg-option env_cfg.dist_cfg.port=29690 &
echo 'configs/free_anchor/freeanchor_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION freeanchor_r50_fpn_1x_coco configs/free_anchor/freeanchor_r50_fpn_1x_coco.py $CHECKPOINT_DIR/retinanet_free_anchor_r50_fpn_1x_coco_20200130-0f67375f.pth --work-dir $WORK_DIR/freeanchor_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29691 &
echo 'configs/fsaf/fsaf_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION fsaf_r50_fpn_1x_coco configs/fsaf/fsaf_r50_fpn_1x_coco.py $CHECKPOINT_DIR/fsaf_r50_fpn_1x_coco-94ccc51f.pth --work-dir $WORK_DIR/fsaf_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29692 &
echo 'configs/gcnet/mask-rcnn_r50-syncbn-gcb-r16-c3-c5_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION mask-rcnn_r50-syncbn-gcb-r16-c3-c5_fpn_1x_coco configs/gcnet/mask-rcnn_r50-syncbn-gcb-r16-c3-c5_fpn_1x_coco.py $CHECKPOINT_DIR/mask_rcnn_r50_fpn_syncbn-backbone_r16_gcb_c3-c5_1x_coco_20200202-587b99aa.pth --work-dir $WORK_DIR/mask-rcnn_r50-syncbn-gcb-r16-c3-c5_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29693 &
echo 'configs/gfl/gfl_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION gfl_r50_fpn_1x_coco configs/gfl/gfl_r50_fpn_1x_coco.py $CHECKPOINT_DIR/gfl_r50_fpn_1x_coco_20200629_121244-25944287.pth --work-dir $WORK_DIR/gfl_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29694 &
echo 'configs/ghm/retinanet_r50_fpn_ghm-1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION retinanet_r50_fpn_ghm-1x_coco configs/ghm/retinanet_r50_fpn_ghm-1x_coco.py $CHECKPOINT_DIR/retinanet_ghm_r50_fpn_1x_coco_20200130-a437fda3.pth --work-dir $WORK_DIR/retinanet_r50_fpn_ghm-1x_coco --cfg-option env_cfg.dist_cfg.port=29695 &
echo 'configs/gn/mask-rcnn_r50_fpn_gn-all_2x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION mask-rcnn_r50_fpn_gn-all_2x_coco configs/gn/mask-rcnn_r50_fpn_gn-all_2x_coco.py $CHECKPOINT_DIR/mask_rcnn_r50_fpn_gn-all_2x_coco_20200206-8eee02a6.pth --work-dir $WORK_DIR/mask-rcnn_r50_fpn_gn-all_2x_coco --cfg-option env_cfg.dist_cfg.port=29696 &
echo 'configs/gn+ws/faster-rcnn_r50_fpn_gn-ws-all_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION faster-rcnn_r50_fpn_gn-ws-all_1x_coco configs/gn+ws/faster-rcnn_r50_fpn_gn-ws-all_1x_coco.py $CHECKPOINT_DIR/faster_rcnn_r50_fpn_gn_ws-all_1x_coco_20200130-613d9fe2.pth --work-dir $WORK_DIR/faster-rcnn_r50_fpn_gn-ws-all_1x_coco --cfg-option env_cfg.dist_cfg.port=29697 &
echo 'configs/grid_rcnn/grid-rcnn_r50_fpn_gn-head_2x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION grid-rcnn_r50_fpn_gn-head_2x_coco configs/grid_rcnn/grid-rcnn_r50_fpn_gn-head_2x_coco.py $CHECKPOINT_DIR/grid_rcnn_r50_fpn_gn-head_2x_coco_20200130-6cca8223.pth --work-dir $WORK_DIR/grid-rcnn_r50_fpn_gn-head_2x_coco --cfg-option env_cfg.dist_cfg.port=29698 &
echo 'configs/groie/faste-rcnn_r50_fpn_groie_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION faste-rcnn_r50_fpn_groie_1x_coco configs/groie/faste-rcnn_r50_fpn_groie_1x_coco.py $CHECKPOINT_DIR/faster_rcnn_r50_fpn_groie_1x_coco_20200604_211715-66ee9516.pth --work-dir $WORK_DIR/faste-rcnn_r50_fpn_groie_1x_coco --cfg-option env_cfg.dist_cfg.port=29699 &
echo 'configs/guided_anchoring/ga-retinanet_r50-caffe_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION ga-retinanet_r50-caffe_fpn_1x_coco configs/guided_anchoring/ga-retinanet_r50-caffe_fpn_1x_coco.py $CHECKPOINT_DIR/ga_retinanet_r50_caffe_fpn_1x_coco_20201020-39581c6f.pth --work-dir $WORK_DIR/ga-retinanet_r50-caffe_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29700 &
echo 'configs/hrnet/faster-rcnn_hrnetv2p-w18-1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION faster-rcnn_hrnetv2p-w18-1x_coco configs/hrnet/faster-rcnn_hrnetv2p-w18-1x_coco.py $CHECKPOINT_DIR/faster_rcnn_hrnetv2p_w18_1x_coco_20200130-56651a6d.pth --work-dir $WORK_DIR/faster-rcnn_hrnetv2p-w18-1x_coco --cfg-option env_cfg.dist_cfg.port=29701 &
echo 'configs/htc/htc_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION htc_r50_fpn_1x_coco configs/htc/htc_r50_fpn_1x_coco.py $CHECKPOINT_DIR/htc_r50_fpn_1x_coco_20200317-7332cf16.pth --work-dir $WORK_DIR/htc_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29702 &
echo 'configs/instaboost/mask-rcnn_r50_fpn_instaboost-4x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION mask-rcnn_r50_fpn_instaboost-4x_coco configs/instaboost/mask-rcnn_r50_fpn_instaboost-4x_coco.py $CHECKPOINT_DIR/mask_rcnn_r50_fpn_instaboost_4x_coco_20200307-d025f83a.pth --work-dir $WORK_DIR/mask-rcnn_r50_fpn_instaboost-4x_coco --cfg-option env_cfg.dist_cfg.port=29703 &
echo 'configs/libra_rcnn/libra-faster-rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION libra-faster-rcnn_r50_fpn_1x_coco configs/libra_rcnn/libra-faster-rcnn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/libra_faster_rcnn_r50_fpn_1x_coco_20200130-3afee3a9.pth --work-dir $WORK_DIR/libra-faster-rcnn_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29704 &
echo 'configs/mask2former/mask2former_r50_8xb2-lsj-50e_coco-panoptic.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION mask2former_r50_8xb2-lsj-50e_coco-panoptic configs/mask2former/mask2former_r50_8xb2-lsj-50e_coco-panoptic.py $CHECKPOINT_DIR/mask2former_r50_lsj_8x2_50e_coco-panoptic_20220326_224516-11a44721.pth --work-dir $WORK_DIR/mask2former_r50_8xb2-lsj-50e_coco-panoptic --cfg-option env_cfg.dist_cfg.port=29705 &
echo 'configs/mask_rcnn/mask-rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION mask-rcnn_r50_fpn_1x_coco configs/mask_rcnn/mask-rcnn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/mask_rcnn_r50_fpn_1x_coco_20200205-d4b0c5d6.pth --work-dir $WORK_DIR/mask-rcnn_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29706 &
echo 'configs/maskformer/maskformer_r50_ms-16xb1-75e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION maskformer_r50_ms-16xb1-75e_coco configs/maskformer/maskformer_r50_ms-16xb1-75e_coco.py $CHECKPOINT_DIR/maskformer_r50_mstrain_16x1_75e_coco_20220221_141956-bc2699cb.pth --work-dir $WORK_DIR/maskformer_r50_ms-16xb1-75e_coco --cfg-option env_cfg.dist_cfg.port=29707 &
echo 'configs/ms_rcnn/ms-rcnn_r50-caffe_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION ms-rcnn_r50-caffe_fpn_1x_coco configs/ms_rcnn/ms-rcnn_r50-caffe_fpn_1x_coco.py $CHECKPOINT_DIR/ms_rcnn_r50_caffe_fpn_1x_coco_20200702_180848-61c9355e.pth --work-dir $WORK_DIR/ms-rcnn_r50-caffe_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29708 &
echo 'configs/nas_fcos/nas-fcos_r50-caffe_fpn_nashead-gn-head_4xb4-1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION nas-fcos_r50-caffe_fpn_nashead-gn-head_4xb4-1x_coco configs/nas_fcos/nas-fcos_r50-caffe_fpn_nashead-gn-head_4xb4-1x_coco.py $CHECKPOINT_DIR/nas_fcos_nashead_r50_caffe_fpn_gn-head_4x4_1x_coco_20200520-1bdba3ce.pth --work-dir $WORK_DIR/nas-fcos_r50-caffe_fpn_nashead-gn-head_4xb4-1x_coco --cfg-option env_cfg.dist_cfg.port=29709 &
echo 'configs/nas_fpn/retinanet_r50_nasfpn_crop640-50e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION retinanet_r50_nasfpn_crop640-50e_coco configs/nas_fpn/retinanet_r50_nasfpn_crop640-50e_coco.py $CHECKPOINT_DIR/retinanet_r50_nasfpn_crop640_50e_coco-0ad1f644.pth --work-dir $WORK_DIR/retinanet_r50_nasfpn_crop640-50e_coco --cfg-option env_cfg.dist_cfg.port=29710 &
echo 'configs/paa/paa_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION paa_r50_fpn_1x_coco configs/paa/paa_r50_fpn_1x_coco.py $CHECKPOINT_DIR/paa_r50_fpn_1x_coco_20200821-936edec3.pth --work-dir $WORK_DIR/paa_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29711 &
echo 'configs/pafpn/faster-rcnn_r50_pafpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION faster-rcnn_r50_pafpn_1x_coco configs/pafpn/faster-rcnn_r50_pafpn_1x_coco.py $CHECKPOINT_DIR/faster_rcnn_r50_pafpn_1x_coco_bbox_mAP-0.375_20200503_105836-b7b4b9bd.pth --work-dir $WORK_DIR/faster-rcnn_r50_pafpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29712 &
echo 'configs/panoptic_fpn/panoptic-fpn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION panoptic-fpn_r50_fpn_1x_coco configs/panoptic_fpn/panoptic-fpn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/panoptic_fpn_r50_fpn_1x_coco_20210821_101153-9668fd13.pth --work-dir $WORK_DIR/panoptic-fpn_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29713 &
echo 'configs/pisa/faster-rcnn_r50_fpn_pisa_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION faster-rcnn_r50_fpn_pisa_1x_coco configs/pisa/faster-rcnn_r50_fpn_pisa_1x_coco.py $CHECKPOINT_DIR/pisa_faster_rcnn_r50_fpn_1x_coco-dea93523.pth --work-dir $WORK_DIR/faster-rcnn_r50_fpn_pisa_1x_coco --cfg-option env_cfg.dist_cfg.port=29714 &
echo 'configs/point_rend/point-rend_r50-caffe_fpn_ms-1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION point-rend_r50-caffe_fpn_ms-1x_coco configs/point_rend/point-rend_r50-caffe_fpn_ms-1x_coco.py $CHECKPOINT_DIR/point_rend_r50_caffe_fpn_mstrain_1x_coco-1bcb5fb4.pth --work-dir $WORK_DIR/point-rend_r50-caffe_fpn_ms-1x_coco --cfg-option env_cfg.dist_cfg.port=29715 &
echo 'configs/pvt/retinanet_pvt-s_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION retinanet_pvt-s_fpn_1x_coco configs/pvt/retinanet_pvt-s_fpn_1x_coco.py $CHECKPOINT_DIR/retinanet_pvt-s_fpn_1x_coco_20210906_142921-b6c94a5b.pth --work-dir $WORK_DIR/retinanet_pvt-s_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29716 &
echo 'configs/queryinst/queryinst_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION queryinst_r50_fpn_1x_coco configs/queryinst/queryinst_r50_fpn_1x_coco.py $CHECKPOINT_DIR/queryinst_r50_fpn_1x_coco_20210907_084916-5a8f1998.pth --work-dir $WORK_DIR/queryinst_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29717 &
echo 'configs/regnet/mask-rcnn_regnetx-3.2GF_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION mask-rcnn_regnetx-3.2GF_fpn_1x_coco configs/regnet/mask-rcnn_regnetx-3.2GF_fpn_1x_coco.py $CHECKPOINT_DIR/mask_rcnn_regnetx-3.2GF_fpn_1x_coco_20200520_163141-2a9d1814.pth --work-dir $WORK_DIR/mask-rcnn_regnetx-3.2GF_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29718 &
echo 'configs/reppoints/reppoints-moment_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION reppoints-moment_r50_fpn_1x_coco configs/reppoints/reppoints-moment_r50_fpn_1x_coco.py $CHECKPOINT_DIR/reppoints_moment_r50_fpn_1x_coco_20200330-b73db8d1.pth --work-dir $WORK_DIR/reppoints-moment_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29719 &
echo 'configs/res2net/faster-rcnn_res2net-101_fpn_2x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION faster-rcnn_res2net-101_fpn_2x_coco configs/res2net/faster-rcnn_res2net-101_fpn_2x_coco.py $CHECKPOINT_DIR/faster_rcnn_r2_101_fpn_2x_coco-175f1da6.pth --work-dir $WORK_DIR/faster-rcnn_res2net-101_fpn_2x_coco --cfg-option env_cfg.dist_cfg.port=29720 &
echo 'configs/resnest/faster-rcnn_s50_fpn_syncbn-backbone+head_ms-range-1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION faster-rcnn_s50_fpn_syncbn-backbone+head_ms-range-1x_coco configs/resnest/faster-rcnn_s50_fpn_syncbn-backbone+head_ms-range-1x_coco.py $CHECKPOINT_DIR/faster_rcnn_s50_fpn_syncbn-backbone+head_mstrain-range_1x_coco_20200926_125502-20289c16.pth --work-dir $WORK_DIR/faster-rcnn_s50_fpn_syncbn-backbone+head_ms-range-1x_coco --cfg-option env_cfg.dist_cfg.port=29721 &
echo 'configs/resnet_strikes_back/mask-rcnn_r50-rsb-pre_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION mask-rcnn_r50-rsb-pre_fpn_1x_coco configs/resnet_strikes_back/mask-rcnn_r50-rsb-pre_fpn_1x_coco.py $CHECKPOINT_DIR/mask_rcnn_r50_fpn_rsb-pretrain_1x_coco_20220113_174054-06ce8ba0.pth --work-dir $WORK_DIR/mask-rcnn_r50-rsb-pre_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29722 &
echo 'configs/retinanet/retinanet_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION retinanet_r50_fpn_1x_coco configs/retinanet/retinanet_r50_fpn_1x_coco.py $CHECKPOINT_DIR/retinanet_r50_fpn_1x_coco_20200130-c2398f9e.pth --work-dir $WORK_DIR/retinanet_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29723 &
echo 'configs/rpn/rpn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION rpn_r50_fpn_1x_coco configs/rpn/rpn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/rpn_r50_fpn_1x_coco_20200218-5525fa2e.pth --work-dir $WORK_DIR/rpn_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29724 &
echo 'configs/sabl/sabl-retinanet_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION sabl-retinanet_r50_fpn_1x_coco configs/sabl/sabl-retinanet_r50_fpn_1x_coco.py $CHECKPOINT_DIR/sabl_retinanet_r50_fpn_1x_coco-6c54fd4f.pth --work-dir $WORK_DIR/sabl-retinanet_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29725 &
echo 'configs/sabl/sabl-faster-rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION sabl-faster-rcnn_r50_fpn_1x_coco configs/sabl/sabl-faster-rcnn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/sabl_faster_rcnn_r50_fpn_1x_coco-e867595b.pth --work-dir $WORK_DIR/sabl-faster-rcnn_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29726 &
echo 'configs/scnet/scnet_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION scnet_r50_fpn_1x_coco configs/scnet/scnet_r50_fpn_1x_coco.py $CHECKPOINT_DIR/scnet_r50_fpn_1x_coco-c3f09857.pth --work-dir $WORK_DIR/scnet_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29727 &
echo 'configs/scratch/mask-rcnn_r50-scratch_fpn_gn-all_6x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION mask-rcnn_r50-scratch_fpn_gn-all_6x_coco configs/scratch/mask-rcnn_r50-scratch_fpn_gn-all_6x_coco.py $CHECKPOINT_DIR/scratch_mask_rcnn_r50_fpn_gn_6x_bbox_mAP-0.412__segm_mAP-0.374_20200201_193051-1e190a40.pth --work-dir $WORK_DIR/mask-rcnn_r50-scratch_fpn_gn-all_6x_coco --cfg-option env_cfg.dist_cfg.port=29728 &
echo 'configs/solo/decoupled-solo_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION decoupled-solo_r50_fpn_1x_coco configs/solo/decoupled-solo_r50_fpn_1x_coco.py $CHECKPOINT_DIR/decoupled_solo_r50_fpn_1x_coco_20210820_233348-6337c589.pth --work-dir $WORK_DIR/decoupled-solo_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29729 &
echo 'configs/solov2/solov2_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION solov2_r50_fpn_1x_coco configs/solov2/solov2_r50_fpn_1x_coco.py $CHECKPOINT_DIR/solov2_r50_fpn_1x_coco_20220512_125858-a357fa23.pth --work-dir $WORK_DIR/solov2_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29730 &
echo 'configs/sparse_rcnn/sparse-rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION sparse-rcnn_r50_fpn_1x_coco configs/sparse_rcnn/sparse-rcnn_r50_fpn_1x_coco.py $CHECKPOINT_DIR/sparse_rcnn_r50_fpn_1x_coco_20201222_214453-dc79b137.pth --work-dir $WORK_DIR/sparse-rcnn_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29731 &
echo 'configs/ssd/ssd300_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION ssd300_coco configs/ssd/ssd300_coco.py $CHECKPOINT_DIR/ssd300_coco_20210803_015428-d231a06e.pth --work-dir $WORK_DIR/ssd300_coco --cfg-option env_cfg.dist_cfg.port=29732 &
echo 'configs/ssd/ssdlite_mobilenetv2-scratch_8xb24-600e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION ssdlite_mobilenetv2-scratch_8xb24-600e_coco configs/ssd/ssdlite_mobilenetv2-scratch_8xb24-600e_coco.py $CHECKPOINT_DIR/ssdlite_mobilenetv2_scratch_600e_coco_20210629_110627-974d9307.pth --work-dir $WORK_DIR/ssdlite_mobilenetv2-scratch_8xb24-600e_coco --cfg-option env_cfg.dist_cfg.port=29733 &
echo 'configs/swin/mask-rcnn_swin-t-p4-w7_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION mask-rcnn_swin-t-p4-w7_fpn_1x_coco configs/swin/mask-rcnn_swin-t-p4-w7_fpn_1x_coco.py $CHECKPOINT_DIR/mask_rcnn_swin-t-p4-w7_fpn_1x_coco_20210902_120937-9d6b7cfa.pth --work-dir $WORK_DIR/mask-rcnn_swin-t-p4-w7_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29734 &
echo 'configs/tood/tood_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION tood_r50_fpn_1x_coco configs/tood/tood_r50_fpn_1x_coco.py $CHECKPOINT_DIR/tood_r50_fpn_1x_coco_20211210_103425-20e20746.pth --work-dir $WORK_DIR/tood_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29735 &
echo 'configs/tridentnet/tridentnet_r50-caffe_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION tridentnet_r50-caffe_1x_coco configs/tridentnet/tridentnet_r50-caffe_1x_coco.py $CHECKPOINT_DIR/tridentnet_r50_caffe_1x_coco_20201230_141838-2ec0b530.pth --work-dir $WORK_DIR/tridentnet_r50-caffe_1x_coco --cfg-option env_cfg.dist_cfg.port=29736 &
echo 'configs/vfnet/vfnet_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION vfnet_r50_fpn_1x_coco configs/vfnet/vfnet_r50_fpn_1x_coco.py $CHECKPOINT_DIR/vfnet_r50_fpn_1x_coco_20201027-38db6f58.pth --work-dir $WORK_DIR/vfnet_r50_fpn_1x_coco --cfg-option env_cfg.dist_cfg.port=29737 &
echo 'configs/yolact/yolact_r50_1xb8-55e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION yolact_r50_1xb8-55e_coco configs/yolact/yolact_r50_1xb8-55e_coco.py $CHECKPOINT_DIR/yolact_r50_1x8_coco_20200908-f38d58df.pth --work-dir $WORK_DIR/yolact_r50_1xb8-55e_coco --cfg-option env_cfg.dist_cfg.port=29738 &
echo 'configs/yolo/yolov3_d53_8xb8-320-273e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION yolov3_d53_8xb8-320-273e_coco configs/yolo/yolov3_d53_8xb8-320-273e_coco.py $CHECKPOINT_DIR/yolov3_d53_320_273e_coco-421362b6.pth --work-dir $WORK_DIR/yolov3_d53_8xb8-320-273e_coco --cfg-option env_cfg.dist_cfg.port=29739 &
echo 'configs/yolof/yolof_r50-c5_8xb8-1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION yolof_r50-c5_8xb8-1x_coco configs/yolof/yolof_r50-c5_8xb8-1x_coco.py $CHECKPOINT_DIR/yolof_r50_c5_8x8_1x_coco_20210425_024427-8e864411.pth --work-dir $WORK_DIR/yolof_r50-c5_8xb8-1x_coco --cfg-option env_cfg.dist_cfg.port=29740 &
echo 'configs/yolox/yolox_tiny_8xb8-300e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK tools/slurm_test.sh $PARTITION yolox_tiny_8xb8-300e_coco configs/yolox/yolox_tiny_8xb8-300e_coco.py $CHECKPOINT_DIR/yolox_tiny_8x8_300e_coco_20211124_171234-b4047906.pth --work-dir $WORK_DIR/yolox_tiny_8xb8-300e_coco --cfg-option env_cfg.dist_cfg.port=29741 &
================================================
FILE: .dev_scripts/test_init_backbone.py
================================================
# Copyright (c) OpenMMLab. All rights reserved.
"""Check out backbone whether successfully load pretrained checkpoint."""
import copy
import os
from os.path import dirname, exists, join
import pytest
from mmengine.config import Config
from mmengine.runner import CheckpointLoader
from mmengine.utils import ProgressBar
from mmdet.registry import MODELS
def _get_config_directory():
"""Find the predefined detector config directory."""
try:
# Assume we are running in the source mmdetection repo
repo_dpath = dirname(dirname(__file__))
except NameError:
# For IPython development when this __file__ is not defined
import mmdet
repo_dpath = dirname(dirname(mmdet.__file__))
config_dpath = join(repo_dpath, 'configs')
if not exists(config_dpath):
raise Exception('Cannot find config path')
return config_dpath
def _get_config_module(fname):
"""Load a configuration as a python module."""
config_dpath = _get_config_directory()
config_fpath = join(config_dpath, fname)
config_mod = Config.fromfile(config_fpath)
return config_mod
def _get_detector_cfg(fname):
"""Grab configs necessary to create a detector.
These are deep copied to allow for safe modification of parameters without
influencing other tests.
"""
config = _get_config_module(fname)
model = copy.deepcopy(config.model)
return model
def _traversed_config_file():
"""We traversed all potential config files under the `config` file. If you
need to print details or debug code, you can use this function.
If the `backbone.init_cfg` is None (do not use `Pretrained` init way), you
need add the folder name in `ignores_folder` (if the config files in this
folder all set backbone.init_cfg is None) or add config name in
`ignores_file` (if the config file set backbone.init_cfg is None)
"""
config_path = _get_config_directory()
check_cfg_names = []
# `base`, `legacy_1.x` and `common` ignored by default.
ignores_folder = ['_base_', 'legacy_1.x', 'common']
# 'ld' need load teacher model, if want to check 'ld',
# please check teacher_config path first.
ignores_folder += ['ld']
# `selfsup_pretrain` need convert model, if want to check this model,
# need to convert the model first.
ignores_folder += ['selfsup_pretrain']
# the `init_cfg` in 'centripetalnet', 'cornernet', 'cityscapes',
# 'scratch' is None.
# the `init_cfg` in ssdlite(`ssdlite_mobilenetv2_scratch_600e_coco.py`)
# is None
# Please confirm `bockbone.init_cfg` is None first.
ignores_folder += ['centripetalnet', 'cornernet', 'cityscapes', 'scratch']
ignores_file = ['ssdlite_mobilenetv2_scratch_600e_coco.py']
for config_file_name in os.listdir(config_path):
if config_file_name not in ignores_folder:
config_file = join(config_path, config_file_name)
if os.path.isdir(config_file):
for config_sub_file in os.listdir(config_file):
if config_sub_file.endswith('py') and \
config_sub_file not in ignores_file:
name = join(config_file, config_sub_file)
check_cfg_names.append(name)
return check_cfg_names
def _check_backbone(config, print_cfg=True):
"""Check out backbone whether successfully load pretrained model, by using
`backbone.init_cfg`.
First, using `CheckpointLoader.load_checkpoint` to load the checkpoint
without loading models.
Then, using `MODELS.build` to build models, and using
`model.init_weights()` to initialize the parameters.
Finally, assert weights and bias of each layer loaded from pretrained
checkpoint are equal to the weights and bias of original checkpoint.
For the convenience of comparison, we sum up weights and bias of
each loaded layer separately.
Args:
config (str): Config file path.
print_cfg (bool): Whether print logger and return the result.
Returns:
results (str or None): If backbone successfully load pretrained
checkpoint, return None; else, return config file path.
"""
if print_cfg:
print('-' * 15 + 'loading ', config)
cfg = Config.fromfile(config)
init_cfg = None
try:
init_cfg = cfg.model.backbone.init_cfg
init_flag = True
except AttributeError:
init_flag = False
if init_cfg is None or init_cfg.get('type') != 'Pretrained':
init_flag = False
if init_flag:
checkpoint = CheckpointLoader.load_checkpoint(init_cfg.checkpoint)
if 'state_dict' in checkpoint:
state_dict = checkpoint['state_dict']
else:
state_dict = checkpoint
model = MODELS.build(cfg.model)
model.init_weights()
checkpoint_layers = state_dict.keys()
for name, value in model.backbone.state_dict().items():
if name in checkpoint_layers:
assert value.equal(state_dict[name])
if print_cfg:
print('-' * 10 + 'Successfully load checkpoint' + '-' * 10 +
'\n', )
return None
else:
if print_cfg:
print(config + '\n' + '-' * 10 +
'config file do not have init_cfg' + '-' * 10 + '\n')
return config
@pytest.mark.parametrize('config', _traversed_config_file())
def test_load_pretrained(config):
"""Check out backbone whether successfully load pretrained model by using
`backbone.init_cfg`.
Details please refer to `_check_backbone`
"""
_check_backbone(config, print_cfg=False)
def _test_load_pretrained():
"""We traversed all potential config files under the `config` file. If you
need to print details or debug code, you can use this function.
Returns:
check_cfg_names (list[str]): Config files that backbone initialized
from pretrained checkpoint might be problematic. Need to recheck
the config file. The output including the config files that the
backbone.init_cfg is None
"""
check_cfg_names = _traversed_config_file()
need_check_cfg = []
prog_bar = ProgressBar(len(check_cfg_names))
for config in check_cfg_names:
init_cfg_name = _check_backbone(config)
if init_cfg_name is not None:
need_check_cfg.append(init_cfg_name)
prog_bar.update()
print('These config files need to be checked again')
print(need_check_cfg)
================================================
FILE: .dev_scripts/train_benchmark.sh
================================================
PARTITION=$1
WORK_DIR=$2
CPUS_PER_TASK=${3:-4}
echo 'configs/albu_example/mask-rcnn_r50_fpn_albu_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION mask-rcnn_r50_fpn_albu_1x_coco configs/albu_example/mask-rcnn_r50_fpn_albu_1x_coco.py $WORK_DIR/mask-rcnn_r50_fpn_albu_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/atss/atss_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION atss_r50_fpn_1x_coco configs/atss/atss_r50_fpn_1x_coco.py $WORK_DIR/atss_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/autoassign/autoassign_r50-caffe_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION autoassign_r50-caffe_fpn_1x_coco configs/autoassign/autoassign_r50-caffe_fpn_1x_coco.py $WORK_DIR/autoassign_r50-caffe_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/carafe/faster-rcnn_r50_fpn-carafe_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION faster-rcnn_r50_fpn-carafe_1x_coco configs/carafe/faster-rcnn_r50_fpn-carafe_1x_coco.py $WORK_DIR/faster-rcnn_r50_fpn-carafe_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/cascade_rcnn/cascade-rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION cascade-rcnn_r50_fpn_1x_coco configs/cascade_rcnn/cascade-rcnn_r50_fpn_1x_coco.py $WORK_DIR/cascade-rcnn_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/cascade_rcnn/cascade-mask-rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION cascade-mask-rcnn_r50_fpn_1x_coco configs/cascade_rcnn/cascade-mask-rcnn_r50_fpn_1x_coco.py $WORK_DIR/cascade-mask-rcnn_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/cascade_rpn/cascade-rpn_faster-rcnn_r50-caffe_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION cascade-rpn_faster-rcnn_r50-caffe_fpn_1x_coco configs/cascade_rpn/cascade-rpn_faster-rcnn_r50-caffe_fpn_1x_coco.py $WORK_DIR/cascade-rpn_faster-rcnn_r50-caffe_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/centernet/centernet_r18-dcnv2_8xb16-crop512-140e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION centernet_r18-dcnv2_8xb16-crop512-140e_coco configs/centernet/centernet_r18-dcnv2_8xb16-crop512-140e_coco.py $WORK_DIR/centernet_r18-dcnv2_8xb16-crop512-140e_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/centernet/centernet-update_r50-caffe_fpn_ms-1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION centernet-update_r50-caffe_fpn_ms-1x_coco configs/centernet/centernet-update_r50-caffe_fpn_ms-1x_coco.py $WORK_DIR/centernet-update_r50-caffe_fpn_ms-1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/centripetalnet/centripetalnet_hourglass104_16xb6-crop511-210e-mstest_coco.py' &
GPUS=16 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION centripetalnet_hourglass104_16xb6-crop511-210e-mstest_coco configs/centripetalnet/centripetalnet_hourglass104_16xb6-crop511-210e-mstest_coco.py $WORK_DIR/centripetalnet_hourglass104_16xb6-crop511-210e-mstest_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/cornernet/cornernet_hourglass104_8xb6-210e-mstest_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION cornernet_hourglass104_8xb6-210e-mstest_coco configs/cornernet/cornernet_hourglass104_8xb6-210e-mstest_coco.py $WORK_DIR/cornernet_hourglass104_8xb6-210e-mstest_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/convnext/mask-rcnn_convnext-t-p4-w7_fpn_amp-ms-crop-3x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION mask-rcnn_convnext-t-p4-w7_fpn_amp-ms-crop-3x_coco configs/convnext/mask-rcnn_convnext-t-p4-w7_fpn_amp-ms-crop-3x_coco.py $WORK_DIR/mask-rcnn_convnext-t-p4-w7_fpn_amp-ms-crop-3x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/dcn/faster-rcnn_r50-dconv-c3-c5_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION faster-rcnn_r50-dconv-c3-c5_fpn_1x_coco configs/dcn/faster-rcnn_r50-dconv-c3-c5_fpn_1x_coco.py $WORK_DIR/faster-rcnn_r50-dconv-c3-c5_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/dcnv2/faster-rcnn_r50_fpn_mdpool_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION faster-rcnn_r50_fpn_mdpool_1x_coco configs/dcnv2/faster-rcnn_r50_fpn_mdpool_1x_coco.py $WORK_DIR/faster-rcnn_r50_fpn_mdpool_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/ddod/ddod_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION ddod_r50_fpn_1x_coco configs/ddod/ddod_r50_fpn_1x_coco.py $WORK_DIR/ddod_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/detectors/detectors_htc-r50_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION detectors_htc-r50_1x_coco configs/detectors/detectors_htc-r50_1x_coco.py $WORK_DIR/detectors_htc-r50_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/deformable_detr/deformable-detr_r50_16xb2-50e_coco.py' &
GPUS=16 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION deformable-detr_r50_16xb2-50e_coco configs/deformable_detr/deformable-detr_r50_16xb2-50e_coco.py $WORK_DIR/deformable-detr_r50_16xb2-50e_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/detr/detr_r50_8xb2-150e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION detr_r50_8xb2-150e_coco configs/detr/detr_r50_8xb2-150e_coco.py $WORK_DIR/detr_r50_8xb2-150e_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/double_heads/dh-faster-rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION dh-faster-rcnn_r50_fpn_1x_coco configs/double_heads/dh-faster-rcnn_r50_fpn_1x_coco.py $WORK_DIR/dh-faster-rcnn_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/dynamic_rcnn/dynamic-rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION dynamic-rcnn_r50_fpn_1x_coco configs/dynamic_rcnn/dynamic-rcnn_r50_fpn_1x_coco.py $WORK_DIR/dynamic-rcnn_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/dyhead/atss_r50_fpn_dyhead_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION atss_r50_fpn_dyhead_1x_coco configs/dyhead/atss_r50_fpn_dyhead_1x_coco.py $WORK_DIR/atss_r50_fpn_dyhead_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/efficientnet/retinanet_effb3_fpn_8xb4-crop896-1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION retinanet_effb3_fpn_8xb4-crop896-1x_coco configs/efficientnet/retinanet_effb3_fpn_8xb4-crop896-1x_coco.py $WORK_DIR/retinanet_effb3_fpn_8xb4-crop896-1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/empirical_attention/faster-rcnn_r50-attn1111_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION faster-rcnn_r50-attn1111_fpn_1x_coco configs/empirical_attention/faster-rcnn_r50-attn1111_fpn_1x_coco.py $WORK_DIR/faster-rcnn_r50-attn1111_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION faster-rcnn_r50_fpn_1x_coco configs/faster_rcnn/faster-rcnn_r50_fpn_1x_coco.py $WORK_DIR/faster-rcnn_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/faster_rcnn/faster-rcnn_r50-caffe-dc5_ms-1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION faster-rcnn_r50-caffe-dc5_ms-1x_coco configs/faster_rcnn/faster-rcnn_r50-caffe-dc5_ms-1x_coco.py $WORK_DIR/faster-rcnn_r50-caffe-dc5_ms-1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/fcos/fcos_r50-caffe_fpn_gn-head-center-normbbox-centeronreg-giou_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION fcos_r50-caffe_fpn_gn-head-center-normbbox-centeronreg-giou_1x_coco configs/fcos/fcos_r50-caffe_fpn_gn-head-center-normbbox-centeronreg-giou_1x_coco.py $WORK_DIR/fcos_r50-caffe_fpn_gn-head-center-normbbox-centeronreg-giou_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/foveabox/fovea_r50_fpn_gn-head-align_4xb4-2x_coco.py' &
GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION fovea_r50_fpn_gn-head-align_4xb4-2x_coco configs/foveabox/fovea_r50_fpn_gn-head-align_4xb4-2x_coco.py $WORK_DIR/fovea_r50_fpn_gn-head-align_4xb4-2x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/fpg/mask-rcnn_r50_fpg_crop640-50e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION mask-rcnn_r50_fpg_crop640-50e_coco configs/fpg/mask-rcnn_r50_fpg_crop640-50e_coco.py $WORK_DIR/mask-rcnn_r50_fpg_crop640-50e_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/free_anchor/freeanchor_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION freeanchor_r50_fpn_1x_coco configs/free_anchor/freeanchor_r50_fpn_1x_coco.py $WORK_DIR/freeanchor_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/fsaf/fsaf_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION fsaf_r50_fpn_1x_coco configs/fsaf/fsaf_r50_fpn_1x_coco.py $WORK_DIR/fsaf_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/gcnet/mask-rcnn_r50-syncbn-gcb-r16-c3-c5_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION mask-rcnn_r50-syncbn-gcb-r16-c3-c5_fpn_1x_coco configs/gcnet/mask-rcnn_r50-syncbn-gcb-r16-c3-c5_fpn_1x_coco.py $WORK_DIR/mask-rcnn_r50-syncbn-gcb-r16-c3-c5_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/gfl/gfl_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION gfl_r50_fpn_1x_coco configs/gfl/gfl_r50_fpn_1x_coco.py $WORK_DIR/gfl_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/ghm/retinanet_r50_fpn_ghm-1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION retinanet_r50_fpn_ghm-1x_coco configs/ghm/retinanet_r50_fpn_ghm-1x_coco.py $WORK_DIR/retinanet_r50_fpn_ghm-1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/gn/mask-rcnn_r50_fpn_gn-all_2x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION mask-rcnn_r50_fpn_gn-all_2x_coco configs/gn/mask-rcnn_r50_fpn_gn-all_2x_coco.py $WORK_DIR/mask-rcnn_r50_fpn_gn-all_2x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/gn+ws/faster-rcnn_r50_fpn_gn-ws-all_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION faster-rcnn_r50_fpn_gn-ws-all_1x_coco configs/gn+ws/faster-rcnn_r50_fpn_gn-ws-all_1x_coco.py $WORK_DIR/faster-rcnn_r50_fpn_gn-ws-all_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/grid_rcnn/grid-rcnn_r50_fpn_gn-head_2x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION grid-rcnn_r50_fpn_gn-head_2x_coco configs/grid_rcnn/grid-rcnn_r50_fpn_gn-head_2x_coco.py $WORK_DIR/grid-rcnn_r50_fpn_gn-head_2x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/groie/faste-rcnn_r50_fpn_groie_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION faste-rcnn_r50_fpn_groie_1x_coco configs/groie/faste-rcnn_r50_fpn_groie_1x_coco.py $WORK_DIR/faste-rcnn_r50_fpn_groie_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/guided_anchoring/ga-retinanet_r50-caffe_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION ga-retinanet_r50-caffe_fpn_1x_coco configs/guided_anchoring/ga-retinanet_r50-caffe_fpn_1x_coco.py $WORK_DIR/ga-retinanet_r50-caffe_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/hrnet/faster-rcnn_hrnetv2p-w18-1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION faster-rcnn_hrnetv2p-w18-1x_coco configs/hrnet/faster-rcnn_hrnetv2p-w18-1x_coco.py $WORK_DIR/faster-rcnn_hrnetv2p-w18-1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/htc/htc_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION htc_r50_fpn_1x_coco configs/htc/htc_r50_fpn_1x_coco.py $WORK_DIR/htc_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/instaboost/mask-rcnn_r50_fpn_instaboost-4x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION mask-rcnn_r50_fpn_instaboost-4x_coco configs/instaboost/mask-rcnn_r50_fpn_instaboost-4x_coco.py $WORK_DIR/mask-rcnn_r50_fpn_instaboost-4x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/lad/lad_r50-paa-r101_fpn_2xb8_coco_1x.py' &
GPUS=2 GPUS_PER_NODE=2 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION lad_r50-paa-r101_fpn_2xb8_coco_1x configs/lad/lad_r50-paa-r101_fpn_2xb8_coco_1x.py $WORK_DIR/lad_r50-paa-r101_fpn_2xb8_coco_1x --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/ld/ld_r18-gflv1-r101_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION ld_r18-gflv1-r101_fpn_1x_coco configs/ld/ld_r18-gflv1-r101_fpn_1x_coco.py $WORK_DIR/ld_r18-gflv1-r101_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/libra_rcnn/libra-faster-rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION libra-faster-rcnn_r50_fpn_1x_coco configs/libra_rcnn/libra-faster-rcnn_r50_fpn_1x_coco.py $WORK_DIR/libra-faster-rcnn_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/mask2former/mask2former_r50_8xb2-lsj-50e_coco-panoptic.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION mask2former_r50_8xb2-lsj-50e_coco-panoptic configs/mask2former/mask2former_r50_8xb2-lsj-50e_coco-panoptic.py $WORK_DIR/mask2former_r50_8xb2-lsj-50e_coco-panoptic --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/mask_rcnn/mask-rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION mask-rcnn_r50_fpn_1x_coco configs/mask_rcnn/mask-rcnn_r50_fpn_1x_coco.py $WORK_DIR/mask-rcnn_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/maskformer/maskformer_r50_ms-16xb1-75e_coco.py' &
GPUS=16 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION maskformer_r50_ms-16xb1-75e_coco configs/maskformer/maskformer_r50_ms-16xb1-75e_coco.py $WORK_DIR/maskformer_r50_ms-16xb1-75e_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/ms_rcnn/ms-rcnn_r50-caffe_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION ms-rcnn_r50-caffe_fpn_1x_coco configs/ms_rcnn/ms-rcnn_r50-caffe_fpn_1x_coco.py $WORK_DIR/ms-rcnn_r50-caffe_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/nas_fcos/nas-fcos_r50-caffe_fpn_nashead-gn-head_4xb4-1x_coco.py' &
GPUS=4 GPUS_PER_NODE=4 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION nas-fcos_r50-caffe_fpn_nashead-gn-head_4xb4-1x_coco configs/nas_fcos/nas-fcos_r50-caffe_fpn_nashead-gn-head_4xb4-1x_coco.py $WORK_DIR/nas-fcos_r50-caffe_fpn_nashead-gn-head_4xb4-1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/nas_fpn/retinanet_r50_nasfpn_crop640-50e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION retinanet_r50_nasfpn_crop640-50e_coco configs/nas_fpn/retinanet_r50_nasfpn_crop640-50e_coco.py $WORK_DIR/retinanet_r50_nasfpn_crop640-50e_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/paa/paa_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION paa_r50_fpn_1x_coco configs/paa/paa_r50_fpn_1x_coco.py $WORK_DIR/paa_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/pafpn/faster-rcnn_r50_pafpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION faster-rcnn_r50_pafpn_1x_coco configs/pafpn/faster-rcnn_r50_pafpn_1x_coco.py $WORK_DIR/faster-rcnn_r50_pafpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/panoptic_fpn/panoptic-fpn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION panoptic-fpn_r50_fpn_1x_coco configs/panoptic_fpn/panoptic-fpn_r50_fpn_1x_coco.py $WORK_DIR/panoptic-fpn_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/pisa/mask-rcnn_r50_fpn_pisa_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION mask-rcnn_r50_fpn_pisa_1x_coco configs/pisa/mask-rcnn_r50_fpn_pisa_1x_coco.py $WORK_DIR/mask-rcnn_r50_fpn_pisa_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/point_rend/point-rend_r50-caffe_fpn_ms-1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION point-rend_r50-caffe_fpn_ms-1x_coco configs/point_rend/point-rend_r50-caffe_fpn_ms-1x_coco.py $WORK_DIR/point-rend_r50-caffe_fpn_ms-1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/pvt/retinanet_pvt-t_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION retinanet_pvt-t_fpn_1x_coco configs/pvt/retinanet_pvt-t_fpn_1x_coco.py $WORK_DIR/retinanet_pvt-t_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/queryinst/queryinst_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION queryinst_r50_fpn_1x_coco configs/queryinst/queryinst_r50_fpn_1x_coco.py $WORK_DIR/queryinst_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/regnet/retinanet_regnetx-800MF_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION retinanet_regnetx-800MF_fpn_1x_coco configs/regnet/retinanet_regnetx-800MF_fpn_1x_coco.py $WORK_DIR/retinanet_regnetx-800MF_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/reppoints/reppoints-moment_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION reppoints-moment_r50_fpn_1x_coco configs/reppoints/reppoints-moment_r50_fpn_1x_coco.py $WORK_DIR/reppoints-moment_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/res2net/faster-rcnn_res2net-101_fpn_2x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION faster-rcnn_res2net-101_fpn_2x_coco configs/res2net/faster-rcnn_res2net-101_fpn_2x_coco.py $WORK_DIR/faster-rcnn_res2net-101_fpn_2x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/resnest/faster-rcnn_s50_fpn_syncbn-backbone+head_ms-range-1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION faster-rcnn_s50_fpn_syncbn-backbone+head_ms-range-1x_coco configs/resnest/faster-rcnn_s50_fpn_syncbn-backbone+head_ms-range-1x_coco.py $WORK_DIR/faster-rcnn_s50_fpn_syncbn-backbone+head_ms-range-1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/resnet_strikes_back/retinanet_r50-rsb-pre_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION retinanet_r50-rsb-pre_fpn_1x_coco configs/resnet_strikes_back/retinanet_r50-rsb-pre_fpn_1x_coco.py $WORK_DIR/retinanet_r50-rsb-pre_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/retinanet/retinanet_r50-caffe_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION retinanet_r50-caffe_fpn_1x_coco configs/retinanet/retinanet_r50-caffe_fpn_1x_coco.py $WORK_DIR/retinanet_r50-caffe_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/rpn/rpn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION rpn_r50_fpn_1x_coco configs/rpn/rpn_r50_fpn_1x_coco.py $WORK_DIR/rpn_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/sabl/sabl-retinanet_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION sabl-retinanet_r50_fpn_1x_coco configs/sabl/sabl-retinanet_r50_fpn_1x_coco.py $WORK_DIR/sabl-retinanet_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/scnet/scnet_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION scnet_r50_fpn_1x_coco configs/scnet/scnet_r50_fpn_1x_coco.py $WORK_DIR/scnet_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/scratch/faster-rcnn_r50-scratch_fpn_gn-all_6x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION faster-rcnn_r50-scratch_fpn_gn-all_6x_coco configs/scratch/faster-rcnn_r50-scratch_fpn_gn-all_6x_coco.py $WORK_DIR/faster-rcnn_r50-scratch_fpn_gn-all_6x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/solo/solo_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION solo_r50_fpn_1x_coco configs/solo/solo_r50_fpn_1x_coco.py $WORK_DIR/solo_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/solov2/solov2_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION solov2_r50_fpn_1x_coco configs/solov2/solov2_r50_fpn_1x_coco.py $WORK_DIR/solov2_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/sparse_rcnn/sparse-rcnn_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION sparse-rcnn_r50_fpn_1x_coco configs/sparse_rcnn/sparse-rcnn_r50_fpn_1x_coco.py $WORK_DIR/sparse-rcnn_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/ssd/ssd300_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION ssd300_coco configs/ssd/ssd300_coco.py $WORK_DIR/ssd300_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/ssd/ssdlite_mobilenetv2-scratch_8xb24-600e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION ssdlite_mobilenetv2-scratch_8xb24-600e_coco configs/ssd/ssdlite_mobilenetv2-scratch_8xb24-600e_coco.py $WORK_DIR/ssdlite_mobilenetv2-scratch_8xb24-600e_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/swin/mask-rcnn_swin-t-p4-w7_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION mask-rcnn_swin-t-p4-w7_fpn_1x_coco configs/swin/mask-rcnn_swin-t-p4-w7_fpn_1x_coco.py $WORK_DIR/mask-rcnn_swin-t-p4-w7_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/tood/tood_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION tood_r50_fpn_1x_coco configs/tood/tood_r50_fpn_1x_coco.py $WORK_DIR/tood_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo ''configs/tridentnet/tridentnet_r50-caffe_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION tridentnet_r50-caffe_1x_coco 'configs/tridentnet/tridentnet_r50-caffe_1x_coco.py $WORK_DIR/tridentnet_r50-caffe_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/vfnet/vfnet_r50_fpn_1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION vfnet_r50_fpn_1x_coco configs/vfnet/vfnet_r50_fpn_1x_coco.py $WORK_DIR/vfnet_r50_fpn_1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/yolact/yolact_r50_8xb8-55e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION yolact_r50_8xb8-55e_coco configs/yolact/yolact_r50_8xb8-55e_coco.py $WORK_DIR/yolact_r50_8xb8-55e_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/yolo/yolov3_d53_8xb8-320-273e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION yolov3_d53_8xb8-320-273e_coco configs/yolo/yolov3_d53_8xb8-320-273e_coco.py $WORK_DIR/yolov3_d53_8xb8-320-273e_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/yolof/yolof_r50-c5_8xb8-1x_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION yolof_r50-c5_8xb8-1x_coco configs/yolof/yolof_r50-c5_8xb8-1x_coco.py $WORK_DIR/yolof_r50-c5_8xb8-1x_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
echo 'configs/yolox/yolox_tiny_8xb8-300e_coco.py' &
GPUS=8 GPUS_PER_NODE=8 CPUS_PER_TASK=$CPUS_PRE_TASK ./tools/slurm_train.sh $PARTITION yolox_tiny_8xb8-300e_coco configs/yolox/yolox_tiny_8xb8-300e_coco.py $WORK_DIR/yolox_tiny_8xb8-300e_coco --cfg-options default_hooks.checkpoint.max_keep_ckpts=1 &
================================================
FILE: .github/CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at chenkaidev@gmail.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
[homepage]: https://www.contributor-covenant.org
================================================
FILE: .github/CONTRIBUTING.md
================================================
We appreciate all contributions to improve MMDetection. Please refer to [CONTRIBUTING.md](https://github.com/open-mmlab/mmcv/blob/master/CONTRIBUTING.md) in MMCV for more details about the contributing guideline.
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
- name: Common Issues
url: https://mmdetection.readthedocs.io/en/latest/faq.html
about: Check if your issue already has solutions
- name: MMDetection Documentation
url: https://mmdetection.readthedocs.io/en/latest/
about: Check if your question is answered in docs
================================================
FILE: .github/ISSUE_TEMPLATE/error-report.md
================================================
---
name: Error report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
Thanks for your error report and we appreciate it a lot.
**Checklist**
1. I have searched related issues but cannot get the expected help.
2. I have read the [FAQ documentation](https://mmdetection.readthedocs.io/en/latest/faq.html) but cannot get the expected help.
3. The bug has not been fixed in the latest version.
**Describe the bug**
A clear and concise description of what the bug is.
**Reproduction**
1. What command or script did you run?
```none
A placeholder for the command.
```
2. Did you make any modifications on the code or config? Did you understand what you have modified?
3. What dataset did you use?
**Environment**
1. Please run `python mmdet/utils/collect_env.py` to collect necessary environment information and paste it here.
2. You may add addition that may be helpful for locating the problem, such as
- How you installed PyTorch \[e.g., pip, conda, source\]
- Other environment variables that may be related (such as `$PATH`, `$LD_LIBRARY_PATH`, `$PYTHONPATH`, etc.)
**Error traceback**
If applicable, paste the error trackback here.
```none
A placeholder for trackback.
```
**Bug fix**
If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Describe the feature**
**Motivation**
A clear and concise description of the motivation of the feature.
Ex1. It is inconvenient when \[....\].
Ex2. There is a recent paper \[....\], which i
gitextract_igmyqiaa/
├── .circleci/
│ ├── config.yml
│ ├── docker/
│ │ └── Dockerfile
│ └── test.yml
├── .dev_scripts/
│ ├── batch_test_list.py
│ ├── batch_train_list.txt
│ ├── benchmark_filter.py
│ ├── benchmark_full_models.txt
│ ├── benchmark_inference_fps.py
│ ├── benchmark_options.py
│ ├── benchmark_test.py
│ ├── benchmark_test_image.py
│ ├── benchmark_train.py
│ ├── benchmark_train_models.txt
│ ├── benchmark_valid_flops.py
│ ├── check_links.py
│ ├── convert_test_benchmark_script.py
│ ├── convert_train_benchmark_script.py
│ ├── covignore.cfg
│ ├── diff_coverage_test.sh
│ ├── download_checkpoints.py
│ ├── gather_models.py
│ ├── gather_test_benchmark_metric.py
│ ├── gather_train_benchmark_metric.py
│ ├── linter.sh
│ ├── test_benchmark.sh
│ ├── test_init_backbone.py
│ └── train_benchmark.sh
├── .github/
│ ├── CODE_OF_CONDUCT.md
│ ├── CONTRIBUTING.md
│ ├── ISSUE_TEMPLATE/
│ │ ├── config.yml
│ │ ├── error-report.md
│ │ ├── feature_request.md
│ │ ├── general_questions.md
│ │ └── reimplementation_questions.md
│ ├── pull_request_template.md
│ └── workflows/
│ └── deploy.yml
├── .gitignore
├── .owners.yml
├── .pre-commit-config-zh-cn.yaml
├── .pre-commit-config.yaml
├── .readthedocs.yml
├── CITATION.cff
├── LICENSE
├── MANIFEST.in
├── README.md
├── configs/
│ ├── _base_/
│ │ ├── datasets/
│ │ │ ├── cityscapes_detection.py
│ │ │ ├── cityscapes_instance.py
│ │ │ ├── coco_detection.py
│ │ │ ├── coco_instance.py
│ │ │ ├── coco_instance_semantic.py
│ │ │ ├── coco_panoptic.py
│ │ │ ├── deepfashion.py
│ │ │ ├── lvis_v0.5_instance.py
│ │ │ ├── lvis_v1_instance.py
│ │ │ ├── objects365v1_detection.py
│ │ │ ├── objects365v2_detection.py
│ │ │ ├── openimages_detection.py
│ │ │ ├── semi_coco_detection.py
│ │ │ ├── voc0712.py
│ │ │ └── wider_face.py
│ │ ├── default_runtime.py
│ │ ├── models/
│ │ │ ├── cascade-mask-rcnn_r50_fpn.py
│ │ │ ├── cascade-rcnn_r50_fpn.py
│ │ │ ├── fast-rcnn_r50_fpn.py
│ │ │ ├── faster-rcnn_r50-caffe-c4.py
│ │ │ ├── faster-rcnn_r50-caffe-dc5.py
│ │ │ ├── faster-rcnn_r50_fpn.py
│ │ │ ├── mask-rcnn_r50-caffe-c4.py
│ │ │ ├── mask-rcnn_r50_fpn.py
│ │ │ ├── retinanet_r50_fpn.py
│ │ │ ├── rpn_r50-caffe-c4.py
│ │ │ ├── rpn_r50_fpn.py
│ │ │ └── ssd300.py
│ │ └── schedules/
│ │ ├── schedule_1x.py
│ │ ├── schedule_20e.py
│ │ └── schedule_2x.py
│ ├── atss/
│ │ ├── README.md
│ │ ├── atss_r101_fpn_1x_coco.py
│ │ ├── atss_r101_fpn_8xb8-amp-lsj-200e_coco.py
│ │ ├── atss_r18_fpn_8xb8-amp-lsj-200e_coco.py
│ │ ├── atss_r50_fpn_1x_coco.py
│ │ ├── atss_r50_fpn_8xb8-amp-lsj-200e_coco.py
│ │ └── metafile.yml
│ ├── centernet/
│ │ ├── README.md
│ │ ├── centernet-update_r101_fpn_8xb8-amp-lsj-200e_coco.py
│ │ ├── centernet-update_r18_fpn_8xb8-amp-lsj-200e_coco.py
│ │ ├── centernet-update_r50-caffe_fpn_ms-1x_coco.py
│ │ ├── centernet-update_r50_fpn_8xb8-amp-lsj-200e_coco.py
│ │ ├── centernet_r18-dcnv2_8xb16-crop512-140e_coco.py
│ │ ├── centernet_r18_8xb16-crop512-140e_coco.py
│ │ ├── centernet_tta.py
│ │ └── metafile.yml
│ ├── crosskd/
│ │ ├── crosskd_r18_gflv1_r50_fpn_1x_coco.py
│ │ ├── crosskd_r18_retinanet_r50_fpn_1x_coco.py
│ │ ├── crosskd_r50_atss_r101_fpn_1x_coco.py
│ │ ├── crosskd_r50_fcos_r101-2x-ms_caffe_fpn_gn-head_2x_ms_coco.py
│ │ ├── crosskd_r50_gflv1_r101-2x-ms_fpn_1x_coco.py
│ │ ├── crosskd_r50_retinanet_r101_fpn_2x_coco.py
│ │ └── crosskd_r50_retinanet_swint_fpn_1x_coco.py
│ ├── crosskd+pkd/
│ │ ├── crosskd+pkd_r50_atss_r101_fpn_1x_coco.py
│ │ ├── crosskd+pkd_r50_fcos_r101-2x-ms_caffe_fpn_gn-head_2x_ms_coco.py
│ │ ├── crosskd+pkd_r50_gflv1_r101-2x-ms_fpn_1x_coco.py
│ │ └── crosskd+pkd_r50_retinanet_r101_fpn_2x_coco.py
│ ├── fcos/
│ │ ├── README.md
│ │ ├── fcos_r101-caffe_fpn_gn-head-1x_coco.py
│ │ ├── fcos_r101-caffe_fpn_gn-head_ms-640-800-2x_coco.py
│ │ ├── fcos_r101_fpn_gn-head-center-normbbox-centeronreg-giou_8xb8-amp-lsj-200e_coco.py
│ │ ├── fcos_r18_fpn_gn-head-center-normbbox-centeronreg-giou_8xb8-amp-lsj-200e_coco.py
│ │ ├── fcos_r50-caffe_fpn_gn-head-center-normbbox-centeronreg-giou_1x_coco.py
│ │ ├── fcos_r50-caffe_fpn_gn-head-center_1x_coco.py
│ │ ├── fcos_r50-caffe_fpn_gn-head_1x_coco.py
│ │ ├── fcos_r50-caffe_fpn_gn-head_4xb4-1x_coco.py
│ │ ├── fcos_r50-caffe_fpn_gn-head_ms-640-800-2x_coco.py
│ │ ├── fcos_r50-dcn-caffe_fpn_gn-head-center-normbbox-centeronreg-giou_1x_coco.py
│ │ ├── fcos_r50_fpn_gn-head-center-normbbox-centeronreg-giou_8xb8-amp-lsj-200e_coco.py
│ │ ├── fcos_x101-64x4d_fpn_gn-head_ms-640-800-2x_coco.py
│ │ └── metafile.yml
│ ├── gfl/
│ │ ├── README.md
│ │ ├── gfl_r101-dconv-c3-c5_fpn_ms-2x_coco.py
│ │ ├── gfl_r101_fpn_ms-2x_coco.py
│ │ ├── gfl_r50_fpn_1x_coco.py
│ │ ├── gfl_r50_fpn_ms-2x_coco.py
│ │ ├── gfl_x101-32x4d-dconv-c4-c5_fpn_ms-2x_coco.py
│ │ ├── gfl_x101-32x4d_fpn_ms-2x_coco.py
│ │ └── metafile.yml
│ ├── ld/
│ │ ├── README.md
│ │ ├── ld_r101-gflv1-r101-dcn_fpn_2x_coco.py
│ │ ├── ld_r18-gflv1-r101_fpn_1x_coco.py
│ │ ├── ld_r34-gflv1-r101_fpn_1x_coco.py
│ │ ├── ld_r50-gflv1-r101_fpn_1x_coco.py
│ │ └── metafile.yml
│ └── retinanet/
│ ├── README.md
│ ├── metafile.yml
│ ├── retinanet_r101-caffe_fpn_1x_coco.py
│ ├── retinanet_r101-caffe_fpn_ms-3x_coco.py
│ ├── retinanet_r101_fpn_1x_coco.py
│ ├── retinanet_r101_fpn_2x_coco.py
│ ├── retinanet_r101_fpn_8xb8-amp-lsj-200e_coco.py
│ ├── retinanet_r101_fpn_ms-640-800-3x_coco.py
│ ├── retinanet_r18_fpn_1x_coco.py
│ ├── retinanet_r18_fpn_1xb8-1x_coco.py
│ ├── retinanet_r18_fpn_8xb8-amp-lsj-200e_coco.py
│ ├── retinanet_r50-caffe_fpn_1x_coco.py
│ ├── retinanet_r50-caffe_fpn_ms-1x_coco.py
│ ├── retinanet_r50-caffe_fpn_ms-2x_coco.py
│ ├── retinanet_r50-caffe_fpn_ms-3x_coco.py
│ ├── retinanet_r50_fpn_1x_coco.py
│ ├── retinanet_r50_fpn_2x_coco.py
│ ├── retinanet_r50_fpn_8xb8-amp-lsj-200e_coco.py
│ ├── retinanet_r50_fpn_90k_coco.py
│ ├── retinanet_r50_fpn_amp-1x_coco.py
│ ├── retinanet_r50_fpn_ms-640-800-3x_coco.py
│ ├── retinanet_swin-t-p4-w7_fpn_1x_coco.py
│ ├── retinanet_tta.py
│ ├── retinanet_x101-32x4d_fpn_1x_coco.py
│ ├── retinanet_x101-32x4d_fpn_2x_coco.py
│ ├── retinanet_x101-64x4d_fpn_1x_coco.py
│ ├── retinanet_x101-64x4d_fpn_2x_coco.py
│ └── retinanet_x101-64x4d_fpn_ms-640-800-3x_coco.py
├── demo/
│ ├── MMDet_InstanceSeg_Tutorial.ipynb
│ ├── MMDet_Tutorial.ipynb
│ ├── create_result_gif.py
│ ├── image_demo.py
│ ├── inference_demo.ipynb
│ ├── video_demo.py
│ ├── video_gpuaccel_demo.py
│ └── webcam_demo.py
├── docker/
│ ├── Dockerfile
│ ├── serve/
│ │ ├── Dockerfile
│ │ ├── config.properties
│ │ └── entrypoint.sh
│ └── serve_cn/
│ └── Dockerfile
├── mmdet/
│ ├── __init__.py
│ ├── apis/
│ │ ├── __init__.py
│ │ ├── det_inferencer.py
│ │ └── inference.py
│ ├── datasets/
│ │ ├── __init__.py
│ │ ├── api_wrappers/
│ │ │ ├── __init__.py
│ │ │ └── coco_api.py
│ │ ├── base_det_dataset.py
│ │ ├── cityscapes.py
│ │ ├── coco.py
│ │ ├── coco_panoptic.py
│ │ ├── crowdhuman.py
│ │ ├── dataset_wrappers.py
│ │ ├── deepfashion.py
│ │ ├── lvis.py
│ │ ├── objects365.py
│ │ ├── openimages.py
│ │ ├── samplers/
│ │ │ ├── __init__.py
│ │ │ ├── batch_sampler.py
│ │ │ ├── class_aware_sampler.py
│ │ │ └── multi_source_sampler.py
│ │ ├── transforms/
│ │ │ ├── __init__.py
│ │ │ ├── augment_wrappers.py
│ │ │ ├── colorspace.py
│ │ │ ├── formatting.py
│ │ │ ├── geometric.py
│ │ │ ├── instaboost.py
│ │ │ ├── loading.py
│ │ │ ├── transforms.py
│ │ │ └── wrappers.py
│ │ ├── utils.py
│ │ ├── voc.py
│ │ ├── wider_face.py
│ │ └── xml_style.py
│ ├── engine/
│ │ ├── __init__.py
│ │ ├── hooks/
│ │ │ ├── __init__.py
│ │ │ ├── checkloss_hook.py
│ │ │ ├── mean_teacher_hook.py
│ │ │ ├── memory_profiler_hook.py
│ │ │ ├── num_class_check_hook.py
│ │ │ ├── pipeline_switch_hook.py
│ │ │ ├── set_epoch_info_hook.py
│ │ │ ├── sync_norm_hook.py
│ │ │ ├── utils.py
│ │ │ ├── visualization_hook.py
│ │ │ └── yolox_mode_switch_hook.py
│ │ ├── optimizers/
│ │ │ ├── __init__.py
│ │ │ └── layer_decay_optimizer_constructor.py
│ │ ├── runner/
│ │ │ ├── __init__.py
│ │ │ └── loops.py
│ │ └── schedulers/
│ │ ├── __init__.py
│ │ └── quadratic_warmup.py
│ ├── evaluation/
│ │ ├── __init__.py
│ │ ├── functional/
│ │ │ ├── __init__.py
│ │ │ ├── bbox_overlaps.py
│ │ │ ├── class_names.py
│ │ │ ├── mean_ap.py
│ │ │ ├── panoptic_utils.py
│ │ │ └── recall.py
│ │ └── metrics/
│ │ ├── __init__.py
│ │ ├── cityscapes_metric.py
│ │ ├── coco_metric.py
│ │ ├── coco_occluded_metric.py
│ │ ├── coco_panoptic_metric.py
│ │ ├── crowdhuman_metric.py
│ │ ├── dump_det_results.py
│ │ ├── dump_proposals_metric.py
│ │ ├── lvis_metric.py
│ │ ├── openimages_metric.py
│ │ └── voc_metric.py
│ ├── models/
│ │ ├── __init__.py
│ │ ├── backbones/
│ │ │ ├── __init__.py
│ │ │ ├── csp_darknet.py
│ │ │ ├── cspnext.py
│ │ │ ├── darknet.py
│ │ │ ├── detectors_resnet.py
│ │ │ ├── detectors_resnext.py
│ │ │ ├── efficientnet.py
│ │ │ ├── hourglass.py
│ │ │ ├── hrnet.py
│ │ │ ├── mobilenet_v2.py
│ │ │ ├── pvt.py
│ │ │ ├── regnet.py
│ │ │ ├── res2net.py
│ │ │ ├── resnest.py
│ │ │ ├── resnet.py
│ │ │ ├── resnext.py
│ │ │ ├── ssd_vgg.py
│ │ │ ├── swin.py
│ │ │ └── trident_resnet.py
│ │ ├── data_preprocessors/
│ │ │ ├── __init__.py
│ │ │ └── data_preprocessor.py
│ │ ├── dense_heads/
│ │ │ ├── __init__.py
│ │ │ ├── anchor_free_head.py
│ │ │ ├── anchor_head.py
│ │ │ ├── atss_head.py
│ │ │ ├── autoassign_head.py
│ │ │ ├── base_dense_head.py
│ │ │ ├── base_mask_head.py
│ │ │ ├── boxinst_head.py
│ │ │ ├── cascade_rpn_head.py
│ │ │ ├── centernet_head.py
│ │ │ ├── centernet_update_head.py
│ │ │ ├── centripetal_head.py
│ │ │ ├── condinst_head.py
│ │ │ ├── conditional_detr_head.py
│ │ │ ├── corner_head.py
│ │ │ ├── dab_detr_head.py
│ │ │ ├── ddod_head.py
│ │ │ ├── deformable_detr_head.py
│ │ │ ├── dense_test_mixins.py
│ │ │ ├── detr_head.py
│ │ │ ├── dino_head.py
│ │ │ ├── embedding_rpn_head.py
│ │ │ ├── fcos_head.py
│ │ │ ├── fovea_head.py
│ │ │ ├── free_anchor_retina_head.py
│ │ │ ├── fsaf_head.py
│ │ │ ├── ga_retina_head.py
│ │ │ ├── ga_rpn_head.py
│ │ │ ├── gfl_head.py
│ │ │ ├── guided_anchor_head.py
│ │ │ ├── lad_head.py
│ │ │ ├── ld_head.py
│ │ │ ├── mask2former_head.py
│ │ │ ├── maskformer_head.py
│ │ │ ├── nasfcos_head.py
│ │ │ ├── paa_head.py
│ │ │ ├── pisa_retinanet_head.py
│ │ │ ├── pisa_ssd_head.py
│ │ │ ├── reppoints_head.py
│ │ │ ├── retina_head.py
│ │ │ ├── retina_sepbn_head.py
│ │ │ ├── rpn_head.py
│ │ │ ├── rtmdet_head.py
│ │ │ ├── rtmdet_ins_head.py
│ │ │ ├── sabl_retina_head.py
│ │ │ ├── solo_head.py
│ │ │ ├── solov2_head.py
│ │ │ ├── ssd_head.py
│ │ │ ├── tood_head.py
│ │ │ ├── vfnet_head.py
│ │ │ ├── yolact_head.py
│ │ │ ├── yolo_head.py
│ │ │ ├── yolof_head.py
│ │ │ └── yolox_head.py
│ │ ├── detectors/
│ │ │ ├── __init__.py
│ │ │ ├── atss.py
│ │ │ ├── autoassign.py
│ │ │ ├── base.py
│ │ │ ├── base_detr.py
│ │ │ ├── boxinst.py
│ │ │ ├── cascade_rcnn.py
│ │ │ ├── centernet.py
│ │ │ ├── condinst.py
│ │ │ ├── conditional_detr.py
│ │ │ ├── cornernet.py
│ │ │ ├── crosskd_atss.py
│ │ │ ├── crosskd_fcos.py
│ │ │ ├── crosskd_gfl.py
│ │ │ ├── crosskd_retinanet.py
│ │ │ ├── crosskd_single_stage.py
│ │ │ ├── crowddet.py
│ │ │ ├── d2_wrapper.py
│ │ │ ├── dab_detr.py
│ │ │ ├── ddod.py
│ │ │ ├── deformable_detr.py
│ │ │ ├── detr.py
│ │ │ ├── dino.py
│ │ │ ├── fast_rcnn.py
│ │ │ ├── faster_rcnn.py
│ │ │ ├── fcos.py
│ │ │ ├── fovea.py
│ │ │ ├── fsaf.py
│ │ │ ├── gfl.py
│ │ │ ├── grid_rcnn.py
│ │ │ ├── htc.py
│ │ │ ├── kd_one_stage.py
│ │ │ ├── lad.py
│ │ │ ├── mask2former.py
│ │ │ ├── mask_rcnn.py
│ │ │ ├── mask_scoring_rcnn.py
│ │ │ ├── maskformer.py
│ │ │ ├── nasfcos.py
│ │ │ ├── paa.py
│ │ │ ├── panoptic_fpn.py
│ │ │ ├── panoptic_two_stage_segmentor.py
│ │ │ ├── point_rend.py
│ │ │ ├── queryinst.py
│ │ │ ├── reppoints_detector.py
│ │ │ ├── retinanet.py
│ │ │ ├── rpn.py
│ │ │ ├── rtmdet.py
│ │ │ ├── scnet.py
│ │ │ ├── semi_base.py
│ │ │ ├── single_stage.py
│ │ │ ├── single_stage_instance_seg.py
│ │ │ ├── soft_teacher.py
│ │ │ ├── solo.py
│ │ │ ├── solov2.py
│ │ │ ├── sparse_rcnn.py
│ │ │ ├── tood.py
│ │ │ ├── trident_faster_rcnn.py
│ │ │ ├── two_stage.py
│ │ │ ├── vfnet.py
│ │ │ ├── yolact.py
│ │ │ ├── yolo.py
│ │ │ ├── yolof.py
│ │ │ └── yolox.py
│ │ ├── layers/
│ │ │ ├── __init__.py
│ │ │ ├── activations.py
│ │ │ ├── bbox_nms.py
│ │ │ ├── brick_wrappers.py
│ │ │ ├── conv_upsample.py
│ │ │ ├── csp_layer.py
│ │ │ ├── dropblock.py
│ │ │ ├── ema.py
│ │ │ ├── inverted_residual.py
│ │ │ ├── matrix_nms.py
│ │ │ ├── msdeformattn_pixel_decoder.py
│ │ │ ├── normed_predictor.py
│ │ │ ├── pixel_decoder.py
│ │ │ ├── positional_encoding.py
│ │ │ ├── res_layer.py
│ │ │ ├── se_layer.py
│ │ │ └── transformer/
│ │ │ ├── __init__.py
│ │ │ ├── conditional_detr_layers.py
│ │ │ ├── dab_detr_layers.py
│ │ │ ├── deformable_detr_layers.py
│ │ │ ├── detr_layers.py
│ │ │ ├── dino_layers.py
│ │ │ ├── mask2former_layers.py
│ │ │ └── utils.py
│ │ ├── losses/
│ │ │ ├── __init__.py
│ │ │ ├── accuracy.py
│ │ │ ├── ae_loss.py
│ │ │ ├── balanced_l1_loss.py
│ │ │ ├── cross_entropy_loss.py
│ │ │ ├── dice_loss.py
│ │ │ ├── focal_loss.py
│ │ │ ├── gaussian_focal_loss.py
│ │ │ ├── gfocal_loss.py
│ │ │ ├── ghm_loss.py
│ │ │ ├── iou_loss.py
│ │ │ ├── kd_loss.py
│ │ │ ├── mse_loss.py
│ │ │ ├── pisa_loss.py
│ │ │ ├── pkd_loss.py
│ │ │ ├── seesaw_loss.py
│ │ │ ├── smooth_l1_loss.py
│ │ │ ├── utils.py
│ │ │ └── varifocal_loss.py
│ │ ├── necks/
│ │ │ ├── __init__.py
│ │ │ ├── bfp.py
│ │ │ ├── channel_mapper.py
│ │ │ ├── cspnext_pafpn.py
│ │ │ ├── ct_resnet_neck.py
│ │ │ ├── dilated_encoder.py
│ │ │ ├── dyhead.py
│ │ │ ├── fpg.py
│ │ │ ├── fpn.py
│ │ │ ├── fpn_carafe.py
│ │ │ ├── hrfpn.py
│ │ │ ├── nas_fpn.py
│ │ │ ├── nasfcos_fpn.py
│ │ │ ├── pafpn.py
│ │ │ ├── rfp.py
│ │ │ ├── ssd_neck.py
│ │ │ ├── ssh.py
│ │ │ ├── yolo_neck.py
│ │ │ └── yolox_pafpn.py
│ │ ├── roi_heads/
│ │ │ ├── __init__.py
│ │ │ ├── base_roi_head.py
│ │ │ ├── bbox_heads/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── bbox_head.py
│ │ │ │ ├── convfc_bbox_head.py
│ │ │ │ ├── dii_head.py
│ │ │ │ ├── double_bbox_head.py
│ │ │ │ ├── multi_instance_bbox_head.py
│ │ │ │ ├── sabl_head.py
│ │ │ │ └── scnet_bbox_head.py
│ │ │ ├── cascade_roi_head.py
│ │ │ ├── double_roi_head.py
│ │ │ ├── dynamic_roi_head.py
│ │ │ ├── grid_roi_head.py
│ │ │ ├── htc_roi_head.py
│ │ │ ├── mask_heads/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── coarse_mask_head.py
│ │ │ │ ├── dynamic_mask_head.py
│ │ │ │ ├── fcn_mask_head.py
│ │ │ │ ├── feature_relay_head.py
│ │ │ │ ├── fused_semantic_head.py
│ │ │ │ ├── global_context_head.py
│ │ │ │ ├── grid_head.py
│ │ │ │ ├── htc_mask_head.py
│ │ │ │ ├── mask_point_head.py
│ │ │ │ ├── maskiou_head.py
│ │ │ │ ├── scnet_mask_head.py
│ │ │ │ └── scnet_semantic_head.py
│ │ │ ├── mask_scoring_roi_head.py
│ │ │ ├── multi_instance_roi_head.py
│ │ │ ├── pisa_roi_head.py
│ │ │ ├── point_rend_roi_head.py
│ │ │ ├── roi_extractors/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── base_roi_extractor.py
│ │ │ │ ├── generic_roi_extractor.py
│ │ │ │ └── single_level_roi_extractor.py
│ │ │ ├── scnet_roi_head.py
│ │ │ ├── shared_heads/
│ │ │ │ ├── __init__.py
│ │ │ │ └── res_layer.py
│ │ │ ├── sparse_roi_head.py
│ │ │ ├── standard_roi_head.py
│ │ │ ├── test_mixins.py
│ │ │ └── trident_roi_head.py
│ │ ├── seg_heads/
│ │ │ ├── __init__.py
│ │ │ ├── base_semantic_head.py
│ │ │ ├── panoptic_fpn_head.py
│ │ │ └── panoptic_fusion_heads/
│ │ │ ├── __init__.py
│ │ │ ├── base_panoptic_fusion_head.py
│ │ │ ├── heuristic_fusion_head.py
│ │ │ └── maskformer_fusion_head.py
│ │ ├── task_modules/
│ │ │ ├── __init__.py
│ │ │ ├── assigners/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── approx_max_iou_assigner.py
│ │ │ │ ├── assign_result.py
│ │ │ │ ├── atss_assigner.py
│ │ │ │ ├── base_assigner.py
│ │ │ │ ├── center_region_assigner.py
│ │ │ │ ├── dynamic_soft_label_assigner.py
│ │ │ │ ├── grid_assigner.py
│ │ │ │ ├── hungarian_assigner.py
│ │ │ │ ├── iou2d_calculator.py
│ │ │ │ ├── match_cost.py
│ │ │ │ ├── max_iou_assigner.py
│ │ │ │ ├── multi_instance_assigner.py
│ │ │ │ ├── point_assigner.py
│ │ │ │ ├── region_assigner.py
│ │ │ │ ├── sim_ota_assigner.py
│ │ │ │ ├── task_aligned_assigner.py
│ │ │ │ └── uniform_assigner.py
│ │ │ ├── builder.py
│ │ │ ├── coders/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── base_bbox_coder.py
│ │ │ │ ├── bucketing_bbox_coder.py
│ │ │ │ ├── delta_xywh_bbox_coder.py
│ │ │ │ ├── distance_point_bbox_coder.py
│ │ │ │ ├── legacy_delta_xywh_bbox_coder.py
│ │ │ │ ├── pseudo_bbox_coder.py
│ │ │ │ ├── tblr_bbox_coder.py
│ │ │ │ └── yolo_bbox_coder.py
│ │ │ ├── prior_generators/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── anchor_generator.py
│ │ │ │ ├── point_generator.py
│ │ │ │ └── utils.py
│ │ │ └── samplers/
│ │ │ ├── __init__.py
│ │ │ ├── base_sampler.py
│ │ │ ├── combined_sampler.py
│ │ │ ├── instance_balanced_pos_sampler.py
│ │ │ ├── iou_balanced_neg_sampler.py
│ │ │ ├── mask_pseudo_sampler.py
│ │ │ ├── mask_sampling_result.py
│ │ │ ├── multi_instance_random_sampler.py
│ │ │ ├── multi_instance_sampling_result.py
│ │ │ ├── ohem_sampler.py
│ │ │ ├── pseudo_sampler.py
│ │ │ ├── random_sampler.py
│ │ │ ├── sampling_result.py
│ │ │ └── score_hlr_sampler.py
│ │ ├── test_time_augs/
│ │ │ ├── __init__.py
│ │ │ ├── det_tta.py
│ │ │ └── merge_augs.py
│ │ └── utils/
│ │ ├── __init__.py
│ │ ├── gaussian_target.py
│ │ ├── make_divisible.py
│ │ ├── misc.py
│ │ ├── panoptic_gt_processing.py
│ │ └── point_sample.py
│ ├── registry.py
│ ├── structures/
│ │ ├── __init__.py
│ │ ├── bbox/
│ │ │ ├── __init__.py
│ │ │ ├── base_boxes.py
│ │ │ ├── bbox_overlaps.py
│ │ │ ├── box_type.py
│ │ │ ├── horizontal_boxes.py
│ │ │ └── transforms.py
│ │ ├── det_data_sample.py
│ │ └── mask/
│ │ ├── __init__.py
│ │ ├── mask_target.py
│ │ ├── structures.py
│ │ └── utils.py
│ ├── testing/
│ │ ├── __init__.py
│ │ ├── _fast_stop_training_hook.py
│ │ └── _utils.py
│ ├── utils/
│ │ ├── __init__.py
│ │ ├── benchmark.py
│ │ ├── collect_env.py
│ │ ├── compat_config.py
│ │ ├── contextmanagers.py
│ │ ├── dist_utils.py
│ │ ├── logger.py
│ │ ├── memory.py
│ │ ├── misc.py
│ │ ├── profiling.py
│ │ ├── replace_cfg_vals.py
│ │ ├── setup_env.py
│ │ ├── split_batch.py
│ │ ├── typing_utils.py
│ │ ├── util_mixins.py
│ │ └── util_random.py
│ ├── version.py
│ └── visualization/
│ ├── __init__.py
│ ├── local_visualizer.py
│ └── palette.py
├── model-index.yml
├── projects/
│ ├── ConvNeXt-V2/
│ │ ├── README.md
│ │ └── configs/
│ │ └── mask-rcnn_convnext-v2-b_fpn_lsj-3x-fcmae_coco.py
│ ├── Detic/
│ │ ├── README.md
│ │ ├── configs/
│ │ │ └── detic_centernet2_swin-b_fpn_4x_lvis-coco-in21k.py
│ │ ├── demo.py
│ │ └── detic/
│ │ ├── __init__.py
│ │ ├── centernet_rpn_head.py
│ │ ├── detic_bbox_head.py
│ │ ├── detic_roi_head.py
│ │ ├── text_encoder.py
│ │ ├── utils.py
│ │ └── zero_shot_classifier.py
│ ├── DiffusionDet/
│ │ ├── README.md
│ │ ├── configs/
│ │ │ └── diffusiondet_r50_fpn_500-proposals_1-step_crop-ms-480-800-450k_coco.py
│ │ ├── diffusiondet/
│ │ │ ├── __init__.py
│ │ │ ├── diffusiondet.py
│ │ │ ├── head.py
│ │ │ └── loss.py
│ │ └── model_converters/
│ │ └── diffusiondet_resnet_to_mmdet.py
│ ├── EfficientDet/
│ │ ├── README.md
│ │ ├── configs/
│ │ │ └── efficientdet_effb0_bifpn_16xb8-crop512-300e_coco.py
│ │ ├── convert_tf_to_pt.py
│ │ └── efficientdet/
│ │ ├── __init__.py
│ │ ├── anchor_generator.py
│ │ ├── api_wrappers/
│ │ │ ├── __init__.py
│ │ │ └── coco_api.py
│ │ ├── bifpn.py
│ │ ├── coco_90class.py
│ │ ├── coco_90metric.py
│ │ ├── efficientdet.py
│ │ ├── efficientdet_head.py
│ │ ├── trans_max_iou_assigner.py
│ │ ├── utils.py
│ │ └── yxyx_bbox_coder.py
│ ├── SparseInst/
│ │ ├── README.md
│ │ ├── configs/
│ │ │ └── sparseinst_r50_iam_8xb8-ms-270k_coco.py
│ │ └── sparseinst/
│ │ ├── __init__.py
│ │ ├── decoder.py
│ │ ├── encoder.py
│ │ ├── loss.py
│ │ └── sparseinst.py
│ └── example_project/
│ ├── README.md
│ ├── configs/
│ │ └── faster-rcnn_dummy-resnet_fpn_1x_coco.py
│ └── dummy/
│ ├── __init__.py
│ └── dummy_resnet.py
├── pytest.ini
├── requirements/
│ ├── albu.txt
│ ├── build.txt
│ ├── docs.txt
│ ├── mminstall.txt
│ ├── optional.txt
│ ├── readthedocs.txt
│ ├── runtime.txt
│ └── tests.txt
├── requirements.txt
├── setup.cfg
├── setup.py
├── tests/
│ ├── test_apis/
│ │ ├── test_det_inferencer.py
│ │ └── test_inference.py
│ ├── test_datasets/
│ │ ├── test_cityscapes.py
│ │ ├── test_coco.py
│ │ ├── test_coco_api_wrapper.py
│ │ ├── test_coco_panoptic.py
│ │ ├── test_crowdhuman.py
│ │ ├── test_lvis.py
│ │ ├── test_objects365.py
│ │ ├── test_openimages.py
│ │ ├── test_pascal_voc.py
│ │ ├── test_samplers/
│ │ │ ├── test_batch_sampler.py
│ │ │ └── test_multi_source_sampler.py
│ │ ├── test_transforms/
│ │ │ ├── __init__.py
│ │ │ ├── test_augment_wrappers.py
│ │ │ ├── test_colorspace.py
│ │ │ ├── test_formatting.py
│ │ │ ├── test_geometric.py
│ │ │ ├── test_instaboost.py
│ │ │ ├── test_loading.py
│ │ │ ├── test_transforms.py
│ │ │ ├── test_wrappers.py
│ │ │ └── utils.py
│ │ └── test_tta.py
│ ├── test_engine/
│ │ ├── __init__.py
│ │ ├── test_hooks/
│ │ │ ├── test_checkloss_hook.py
│ │ │ ├── test_mean_teacher_hook.py
│ │ │ ├── test_memory_profiler_hook.py
│ │ │ ├── test_num_class_check_hook.py
│ │ │ ├── test_sync_norm_hook.py
│ │ │ ├── test_visualization_hook.py
│ │ │ └── test_yolox_mode_switch_hook.py
│ │ ├── test_optimizers/
│ │ │ ├── __init__.py
│ │ │ └── test_layer_decay_optimizer_constructor.py
│ │ ├── test_runner/
│ │ │ └── test_loops.py
│ │ └── test_schedulers/
│ │ └── test_quadratic_warmup.py
│ ├── test_evaluation/
│ │ └── test_metrics/
│ │ ├── __init__.py
│ │ ├── test_cityscapes_metric.py
│ │ ├── test_coco_metric.py
│ │ ├── test_coco_occluded_metric.py
│ │ ├── test_coco_panoptic_metric.py
│ │ ├── test_crowdhuman_metric.py
│ │ ├── test_dump_det_results.py
│ │ ├── test_lvis_metric.py
│ │ └── test_openimages_metric.py
│ ├── test_models/
│ │ ├── test_backbones/
│ │ │ ├── __init__.py
│ │ │ ├── test_csp_darknet.py
│ │ │ ├── test_detectors_resnet.py
│ │ │ ├── test_efficientnet.py
│ │ │ ├── test_hourglass.py
│ │ │ ├── test_hrnet.py
│ │ │ ├── test_mobilenet_v2.py
│ │ │ ├── test_pvt.py
│ │ │ ├── test_regnet.py
│ │ │ ├── test_renext.py
│ │ │ ├── test_res2net.py
│ │ │ ├── test_resnest.py
│ │ │ ├── test_resnet.py
│ │ │ ├── test_swin.py
│ │ │ ├── test_trident_resnet.py
│ │ │ └── utils.py
│ │ ├── test_data_preprocessors/
│ │ │ ├── test_batch_resize.py
│ │ │ ├── test_boxinst_preprocessor.py
│ │ │ └── test_data_preprocessor.py
│ │ ├── test_dense_heads/
│ │ │ ├── test_anchor_head.py
│ │ │ ├── test_atss_head.py
│ │ │ ├── test_autoassign_head.py
│ │ │ ├── test_boxinst_head.py
│ │ │ ├── test_cascade_rpn_head.py
│ │ │ ├── test_centernet_head.py
│ │ │ ├── test_centernet_update_head.py
│ │ │ ├── test_centripetal_head.py
│ │ │ ├── test_condinst_head.py
│ │ │ ├── test_corner_head.py
│ │ │ ├── test_ddod_head.py
│ │ │ ├── test_embedding_rpn_head.py
│ │ │ ├── test_fcos_head.py
│ │ │ ├── test_fovea_head.py
│ │ │ ├── test_free_anchor_head.py
│ │ │ ├── test_fsaf_head.py
│ │ │ ├── test_ga_retina_head.py
│ │ │ ├── test_ga_rpn_head.py
│ │ │ ├── test_gfl_head.py
│ │ │ ├── test_guided_anchor_head.py
│ │ │ ├── test_lad_head.py
│ │ │ ├── test_ld_head.py
│ │ │ ├── test_nasfcos_head.py
│ │ │ ├── test_paa_head.py
│ │ │ ├── test_pisa_retinanet_head.py
│ │ │ ├── test_pisa_ssd_head.py
│ │ │ ├── test_reppoints_head.py
│ │ │ ├── test_retina_sepBN_head.py
│ │ │ ├── test_rpn_head.py
│ │ │ ├── test_sabl_retina_head.py
│ │ │ ├── test_solo_head.py
│ │ │ ├── test_solov2_head.py
│ │ │ ├── test_ssd_head.py
│ │ │ ├── test_tood_head.py
│ │ │ ├── test_vfnet_head.py
│ │ │ ├── test_yolo_head.py
│ │ │ ├── test_yolof_head.py
│ │ │ └── test_yolox_head.py
│ │ ├── test_detectors/
│ │ │ ├── test_conditional_detr.py
│ │ │ ├── test_cornernet.py
│ │ │ ├── test_dab_detr.py
│ │ │ ├── test_deformable_detr.py
│ │ │ ├── test_detr.py
│ │ │ ├── test_dino.py
│ │ │ ├── test_kd_single_stage.py
│ │ │ ├── test_maskformer.py
│ │ │ ├── test_panoptic_two_stage_segmentor.py
│ │ │ ├── test_rpn.py
│ │ │ ├── test_semi_base.py
│ │ │ ├── test_single_stage.py
│ │ │ ├── test_single_stage_instance_seg.py
│ │ │ └── test_two_stage.py
│ │ ├── test_layers/
│ │ │ ├── __init__.py
│ │ │ ├── test_brick_wrappers.py
│ │ │ ├── test_conv_upsample.py
│ │ │ ├── test_ema.py
│ │ │ ├── test_inverted_residual.py
│ │ │ ├── test_plugins.py
│ │ │ ├── test_position_encoding.py
│ │ │ ├── test_se_layer.py
│ │ │ └── test_transformer.py
│ │ ├── test_losses/
│ │ │ ├── test_gaussian_focal_loss.py
│ │ │ └── test_loss.py
│ │ ├── test_necks/
│ │ │ ├── test_ct_resnet_neck.py
│ │ │ └── test_necks.py
│ │ ├── test_roi_heads/
│ │ │ ├── test_bbox_heads/
│ │ │ │ ├── test_bbox_head.py
│ │ │ │ ├── test_double_bbox_head.py
│ │ │ │ ├── test_multi_instance_bbox_head.py
│ │ │ │ ├── test_sabl_bbox_head.py
│ │ │ │ └── test_scnet_bbox_head.py
│ │ │ ├── test_cascade_roi_head.py
│ │ │ ├── test_dynamic_roi_head.py
│ │ │ ├── test_grid_roi_head.py
│ │ │ ├── test_htc_roi_head.py
│ │ │ ├── test_mask_heads/
│ │ │ │ ├── test_coarse_mask_head.py
│ │ │ │ ├── test_fcn_mask_head.py
│ │ │ │ ├── test_feature_relay_head.py
│ │ │ │ ├── test_fused_semantic_head.py
│ │ │ │ ├── test_global_context_head.py
│ │ │ │ ├── test_grid_head.py
│ │ │ │ ├── test_htc_mask_head.py
│ │ │ │ ├── test_maskiou_head.py
│ │ │ │ ├── test_scnet_mask_head.py
│ │ │ │ └── test_scnet_semantic_head.py
│ │ │ ├── test_mask_scoring_roI_head.py
│ │ │ ├── test_multi_instance_roi_head.py
│ │ │ ├── test_pisa_roi_head.py
│ │ │ ├── test_point_rend_roi_head.py
│ │ │ ├── test_roi_extractors/
│ │ │ │ ├── test_generic_roi_extractor.py
│ │ │ │ └── test_single_level_roi_extractor.py
│ │ │ ├── test_scnet_roi_head.py
│ │ │ ├── test_sparse_roi_head.py
│ │ │ ├── test_standard_roi_head.py
│ │ │ └── test_trident_roi_head.py
│ │ ├── test_seg_heads/
│ │ │ ├── test_heuristic_fusion_head.py
│ │ │ ├── test_maskformer_fusion_head.py
│ │ │ └── test_panoptic_fpn_head.py
│ │ ├── test_task_modules/
│ │ │ ├── __init__.py
│ │ │ ├── test_assigners/
│ │ │ │ ├── test_approx_max_iou_assigner.py
│ │ │ │ ├── test_atss_assigner.py
│ │ │ │ ├── test_center_region_assigner.py
│ │ │ │ ├── test_dynamic_soft_label_assigner.py
│ │ │ │ ├── test_grid_assigner.py
│ │ │ │ ├── test_hungarian_assigner.py
│ │ │ │ ├── test_max_iou_assigner.py
│ │ │ │ ├── test_point_assigner.py
│ │ │ │ ├── test_region_assigner.py
│ │ │ │ ├── test_simota_assigner.py
│ │ │ │ ├── test_task_aligned_assigner.py
│ │ │ │ └── test_task_uniform_assigner.py
│ │ │ ├── test_coder/
│ │ │ │ └── test_delta_xywh_bbox_coder.py
│ │ │ ├── test_iou2d_calculator.py
│ │ │ ├── test_prior_generators/
│ │ │ │ └── test_anchor_generator.py
│ │ │ └── test_samplers/
│ │ │ └── test_pesudo_sampler.py
│ │ ├── test_tta/
│ │ │ └── test_det_tta.py
│ │ └── test_utils/
│ │ ├── test_misc.py
│ │ └── test_model_misc.py
│ ├── test_structures/
│ │ ├── __init__.py
│ │ ├── test_bbox/
│ │ │ ├── __init__.py
│ │ │ ├── test_base_boxes.py
│ │ │ ├── test_box_type.py
│ │ │ ├── test_horizontal_boxes.py
│ │ │ └── utils.py
│ │ ├── test_det_data_sample.py
│ │ └── test_mask/
│ │ └── test_mask_structures.py
│ ├── test_utils/
│ │ ├── test_benchmark.py
│ │ ├── test_memory.py
│ │ ├── test_replace_cfg_vals.py
│ │ └── test_setup_env.py
│ └── test_visualization/
│ ├── test_local_visualizer.py
│ └── test_palette.py
└── tools/
├── analysis_tools/
│ ├── analyze_logs.py
│ ├── analyze_results.py
│ ├── benchmark.py
│ ├── browse_dataset.py
│ ├── coco_error_analysis.py
│ ├── coco_occluded_separated_recall.py
│ ├── confusion_matrix.py
│ ├── eval_metric.py
│ ├── get_flops.py
│ ├── optimize_anchors.py
│ ├── robustness_eval.py
│ └── test_robustness.py
├── dataset_converters/
│ ├── cityscapes.py
│ ├── images2coco.py
│ └── pascal_voc.py
├── deployment/
│ ├── mmdet2torchserve.py
│ ├── mmdet_handler.py
│ └── test_torchserver.py
├── dist_test.sh
├── dist_train.sh
├── misc/
│ ├── download_dataset.py
│ ├── gen_coco_panoptic_test_info.py
│ ├── get_crowdhuman_id_hw.py
│ ├── get_image_metas.py
│ ├── print_config.py
│ └── split_coco.py
├── model_converters/
│ ├── detectron2_to_mmdet.py
│ ├── detectron2pytorch.py
│ ├── publish_model.py
│ ├── regnet2mmdet.py
│ ├── selfsup2mmdet.py
│ ├── upgrade_model_version.py
│ └── upgrade_ssd_version.py
├── slurm_test.sh
├── slurm_train.sh
├── test.py
└── train.py
Showing preview only (347K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (4271 symbols across 633 files)
FILE: .dev_scripts/benchmark_filter.py
function parse_args (line 7) | def parse_args():
function main (line 132) | def main():
FILE: .dev_scripts/benchmark_inference_fps.py
function parse_args (line 15) | def parse_args():
function results2markdown (line 63) | def results2markdown(result_dict):
FILE: .dev_scripts/benchmark_test.py
function parse_args (line 16) | def parse_args():
function fast_test_model (line 46) | def fast_test_model(config_name, checkpoint, args, logger=None):
function main (line 86) | def main(args):
FILE: .dev_scripts/benchmark_test_image.py
function parse_args (line 16) | def parse_args():
function inference_model (line 43) | def inference_model(config_name, checkpoint, visualizer, args, logger=No...
function main (line 82) | def main(args):
FILE: .dev_scripts/benchmark_train.py
function parse_args (line 16) | def parse_args():
function fast_train_model (line 59) | def fast_train_model(config_name, args, logger=None):
function main (line 147) | def main(args):
FILE: .dev_scripts/benchmark_valid_flops.py
function parse_args (line 32) | def parse_args():
function inference (line 76) | def inference(config_file, checkpoint, work_dir, args, exp_name):
function show_summary (line 177) | def show_summary(summary_data, args):
function main (line 208) | def main(args):
FILE: .dev_scripts/check_links.py
function parse_args (line 17) | def parse_args():
class MatchTuple (line 47) | class MatchTuple(NamedTuple):
function check_link (line 53) | def check_link(
function check_url (line 69) | def check_url(match_tuple: MatchTuple,
function check_path (line 83) | def check_path(match_tuple: MatchTuple) -> bool:
function main (line 91) | def main():
FILE: .dev_scripts/convert_test_benchmark_script.py
function parse_args (line 9) | def parse_args():
function process_model_info (line 23) | def process_model_info(model_info, work_dir):
function create_test_bash_info (line 36) | def create_test_bash_info(commands, model_test_dict, port, script_name,
function main (line 62) | def main():
FILE: .dev_scripts/convert_train_benchmark_script.py
function parse_args (line 7) | def parse_args():
function determine_gpus (line 21) | def determine_gpus(cfg_name):
function main (line 37) | def main():
FILE: .dev_scripts/download_checkpoints.py
function download (line 14) | def download(url, out_file, min_bytes=math.pow(1024, 2), progress=True):
function parse_args (line 38) | def parse_args():
FILE: .dev_scripts/gather_models.py
function ordered_yaml_dump (line 17) | def ordered_yaml_dump(data, stream=None, Dumper=yaml.SafeDumper, **kwds):
function process_checkpoint (line 30) | def process_checkpoint(in_file, out_file):
function is_by_epoch (line 53) | def is_by_epoch(config):
function get_final_epoch_or_iter (line 58) | def get_final_epoch_or_iter(config):
function get_best_epoch_or_iter (line 66) | def get_best_epoch_or_iter(exp_dir):
function get_real_epoch_or_iter (line 75) | def get_real_epoch_or_iter(config):
function get_final_results (line 86) | def get_final_results(log_json_path,
function get_dataset_name (line 134) | def get_dataset_name(config):
function convert_model_info_to_pwc (line 153) | def convert_model_info_to_pwc(model_infos):
function parse_args (line 212) | def parse_args():
function main (line 229) | def main():
FILE: .dev_scripts/gather_test_benchmark_metric.py
function parse_args (line 11) | def parse_args():
FILE: .dev_scripts/gather_train_benchmark_metric.py
function parse_args (line 22) | def parse_args():
FILE: .dev_scripts/test_init_backbone.py
function _get_config_directory (line 15) | def _get_config_directory():
function _get_config_module (line 30) | def _get_config_module(fname):
function _get_detector_cfg (line 38) | def _get_detector_cfg(fname):
function _traversed_config_file (line 49) | def _traversed_config_file():
function _check_backbone (line 90) | def _check_backbone(config, print_cfg=True):
function test_load_pretrained (line 149) | def test_load_pretrained(config):
function _test_load_pretrained (line 158) | def _test_load_pretrained():
FILE: demo/create_result_gif.py
function parse_args (line 19) | def parse_args():
function _generate_batch_data (line 34) | def _generate_batch_data(sampler, batch_size):
function create_gif (line 45) | def create_gif(frames, gif_name, duration=2):
function create_frame_by_matplotlib (line 60) | def create_frame_by_matplotlib(image_dir,
function main (line 158) | def main():
FILE: demo/image_demo.py
function parse_args (line 32) | def parse_args():
function main (line 99) | def main():
FILE: demo/video_demo.py
function parse_args (line 13) | def parse_args():
function main (line 33) | def main():
FILE: demo/video_gpuaccel_demo.py
function parse_args (line 24) | def parse_args():
function prefetch_batch_input_shape (line 47) | def prefetch_batch_input_shape(model: nn.Module, ori_wh: Tuple[int,
function pack_data (line 60) | def pack_data(frame_resize: np.ndarray, batch_input_shape: Tuple[int, int],
function main (line 77) | def main():
FILE: demo/webcam_demo.py
function parse_args (line 12) | def parse_args():
function main (line 26) | def main():
FILE: mmdet/apis/det_inferencer.py
class DetInferencer (line 44) | class DetInferencer(BaseInferencer):
method __init__ (line 83) | def __init__(self,
method _load_weights_to_model (line 99) | def _load_weights_to_model(self, model: nn.Module,
method _init_pipeline (line 154) | def _init_pipeline(self, cfg: ConfigType) -> Compose:
method _get_transform_idx (line 172) | def _get_transform_idx(self, pipeline_cfg: ConfigType, name: str) -> int:
method _init_visualizer (line 182) | def _init_visualizer(self, cfg: ConfigType) -> Optional[Visualizer]:
method _inputs_to_list (line 195) | def _inputs_to_list(self, inputs: InputsType) -> list:
method preprocess (line 230) | def preprocess(self, inputs: InputsType, batch_size: int = 1, **kwargs):
method _get_chunk_data (line 257) | def _get_chunk_data(self, inputs: Iterable, chunk_size: int):
method __call__ (line 283) | def __call__(self,
method visualize (line 368) | def visualize(self,
method postprocess (line 447) | def postprocess(
method pred2dict (line 513) | def pred2dict(self,
FILE: mmdet/apis/inference.py
function init_detector (line 24) | def init_detector(
function inference_detector (line 117) | def inference_detector(
function async_inference_detector (line 188) | async def async_inference_detector(model, imgs):
FILE: mmdet/datasets/api_wrappers/coco_api.py
class COCO (line 13) | class COCO(_COCO):
method __init__ (line 20) | def __init__(self, annotation_file=None):
method get_ann_ids (line 29) | def get_ann_ids(self, img_ids=[], cat_ids=[], area_rng=[], iscrowd=None):
method get_cat_ids (line 32) | def get_cat_ids(self, cat_names=[], sup_names=[], cat_ids=[]):
method get_img_ids (line 35) | def get_img_ids(self, img_ids=[], cat_ids=[]):
method load_anns (line 38) | def load_anns(self, ids):
method load_cats (line 41) | def load_cats(self, ids):
method load_imgs (line 44) | def load_imgs(self, ids):
class COCOPanoptic (line 52) | class COCOPanoptic(COCO):
method __init__ (line 62) | def __init__(self, annotation_file: Optional[str] = None) -> None:
method createIndex (line 65) | def createIndex(self) -> None:
method load_anns (line 115) | def load_anns(self,
FILE: mmdet/datasets/base_det_dataset.py
class BaseDetDataset (line 13) | class BaseDetDataset(BaseDataset):
method __init__ (line 23) | def __init__(self,
method full_init (line 35) | def full_init(self) -> None:
method load_proposals (line 75) | def load_proposals(self) -> None:
method get_cat_ids (line 103) | def get_cat_ids(self, idx: int) -> List[int]:
FILE: mmdet/datasets/cityscapes.py
class CityscapesDataset (line 12) | class CityscapesDataset(CocoDataset):
method filter_data (line 22) | def filter_data(self) -> List[dict]:
FILE: mmdet/datasets/coco.py
class CocoDataset (line 12) | class CocoDataset(BaseDetDataset):
method load_data_list (line 57) | def load_data_list(self) -> List[dict]:
method parse_data_info (line 99) | def parse_data_info(self, raw_data_info: dict) -> Union[dict, List[dic...
method filter_data (line 158) | def filter_data(self) -> List[dict]:
FILE: mmdet/datasets/coco_panoptic.py
class CocoPanopticDataset (line 11) | class CocoPanopticDataset(CocoDataset):
method __init__ (line 160) | def __init__(self,
method parse_data_info (line 185) | def parse_data_info(self, raw_data_info: dict) -> dict:
method filter_data (line 250) | def filter_data(self) -> List[dict]:
FILE: mmdet/datasets/crowdhuman.py
class CrowdHumanDataset (line 19) | class CrowdHumanDataset(BaseDetDataset):
method __init__ (line 38) | def __init__(self, data_root, ann_file, extra_ann_file=None, **kwargs):
method load_data_list (line 63) | def load_data_list(self) -> List[dict]:
method parse_data_info (line 97) | def parse_data_info(self, raw_data_info: dict) -> Union[dict, List[dic...
FILE: mmdet/datasets/dataset_wrappers.py
class MultiImageMixDataset (line 12) | class MultiImageMixDataset:
method __init__ (line 36) | def __init__(self,
method metainfo (line 81) | def metainfo(self) -> dict:
method full_init (line 89) | def full_init(self):
method get_data_info (line 99) | def get_data_info(self, idx: int) -> dict:
method __len__ (line 111) | def __len__(self):
method __getitem__ (line 114) | def __getitem__(self, idx):
method update_skip_type_keys (line 159) | def update_skip_type_keys(self, skip_type_keys):
FILE: mmdet/datasets/deepfashion.py
class DeepFashionDataset (line 7) | class DeepFashionDataset(CocoDataset):
FILE: mmdet/datasets/lvis.py
class LVISV05Dataset (line 11) | class LVISV05Dataset(CocoDataset):
method load_data_list (line 271) | def load_data_list(self) -> List[dict]:
class LVISV1Dataset (line 332) | class LVISV1Dataset(LVISDataset):
method load_data_list (line 583) | def load_data_list(self) -> List[dict]:
FILE: mmdet/datasets/objects365.py
class Objects365V1Dataset (line 19) | class Objects365V1Dataset(CocoDataset):
method load_data_list (line 99) | def load_data_list(self) -> List[dict]:
class Objects365V2Dataset (line 152) | class Objects365V2Dataset(CocoDataset):
method load_data_list (line 231) | def load_data_list(self) -> List[dict]:
FILE: mmdet/datasets/openimages.py
class OpenImagesDataset (line 16) | class OpenImagesDataset(BaseDetDataset):
method __init__ (line 35) | def __init__(self,
method load_data_list (line 47) | def load_data_list(self) -> List[dict]:
method _parse_label_file (line 156) | def _parse_label_file(self, label_file: str) -> tuple:
method _parse_img_level_ann (line 180) | def _parse_img_level_ann(self,
method _get_relation_matrix (line 218) | def _get_relation_matrix(self, hierarchy_file: str) -> np.ndarray:
method _convert_hierarchy_tree (line 242) | def _convert_hierarchy_tree(self,
method _join_prefix (line 286) | def _join_prefix(self):
class OpenImagesChallengeDataset (line 301) | class OpenImagesChallengeDataset(OpenImagesDataset):
method __init__ (line 310) | def __init__(self, ann_file: str, **kwargs) -> None:
method load_data_list (line 317) | def load_data_list(self) -> List[dict]:
method _parse_label_file (line 402) | def _parse_label_file(self, label_file: str) -> tuple:
method _parse_img_level_ann (line 431) | def _parse_img_level_ann(self, image_level_ann_file):
method _get_relation_matrix (line 470) | def _get_relation_matrix(self, hierarchy_file: str) -> np.ndarray:
FILE: mmdet/datasets/samplers/batch_sampler.py
class AspectRatioBatchSampler (line 11) | class AspectRatioBatchSampler(BatchSampler):
method __init__ (line 23) | def __init__(self,
method __iter__ (line 39) | def __iter__(self) -> Sequence[int]:
method __len__ (line 64) | def __len__(self) -> int:
FILE: mmdet/datasets/samplers/class_aware_sampler.py
class ClassAwareSampler (line 15) | class ClassAwareSampler(Sampler):
method __init__ (line 36) | def __init__(self,
method get_cat2imgs (line 70) | def get_cat2imgs(self) -> Dict[int, list]:
method __iter__ (line 89) | def __iter__(self) -> Iterator[int]:
method __len__ (line 135) | def __len__(self) -> int:
method set_epoch (line 139) | def set_epoch(self, epoch: int) -> None:
class RandomCycleIter (line 152) | class RandomCycleIter:
method __init__ (line 170) | def __init__(self,
method __iter__ (line 179) | def __iter__(self) -> Iterator:
method __len__ (line 182) | def __len__(self) -> int:
method __next__ (line 185) | def __next__(self):
FILE: mmdet/datasets/samplers/multi_source_sampler.py
class MultiSourceSampler (line 15) | class MultiSourceSampler(Sampler):
method __init__ (line 64) | def __init__(self,
method _infinite_indices (line 107) | def _infinite_indices(self, sample_size: int) -> Iterator[int]:
method _indices_of_rank (line 117) | def _indices_of_rank(self, sample_size: int) -> Iterator[int]:
method __iter__ (line 123) | def __iter__(self) -> Iterator[int]:
method __len__ (line 137) | def __len__(self) -> int:
method set_epoch (line 140) | def set_epoch(self, epoch: int) -> None:
class GroupMultiSourceSampler (line 146) | class GroupMultiSourceSampler(MultiSourceSampler):
method __init__ (line 162) | def __init__(self,
method _get_source_group_info (line 182) | def _get_source_group_info(self) -> None:
method __iter__ (line 199) | def __iter__(self) -> Iterator[int]:
FILE: mmdet/datasets/transforms/augment_wrappers.py
function policies_v0 (line 55) | def policies_v0():
function level_to_mag (line 76) | def level_to_mag(level: Optional[int], min_mag: float,
class AutoAugment (line 86) | class AutoAugment(RandomChoice):
method __init__ (line 147) | def __init__(self,
method __repr__ (line 162) | def __repr__(self) -> str:
class RandAugment (line 168) | class RandAugment(RandomChoice):
method __init__ (line 224) | def __init__(self,
method random_pipeline_index (line 242) | def random_pipeline_index(self):
method transform (line 247) | def transform(self, results: dict) -> dict:
method __repr__ (line 260) | def __repr__(self) -> str:
FILE: mmdet/datasets/transforms/colorspace.py
class ColorTransform (line 15) | class ColorTransform(BaseTransform):
method __init__ (line 43) | def __init__(self,
method _transform_img (line 66) | def _transform_img(self, results: dict, mag: float) -> None:
method _random_disable (line 71) | def _random_disable(self):
method _get_mag (line 76) | def _get_mag(self):
method transform (line 80) | def transform(self, results: dict) -> dict:
method __repr__ (line 96) | def __repr__(self) -> str:
class Color (line 106) | class Color(ColorTransform):
method __init__ (line 132) | def __init__(self,
method _transform_img (line 144) | def _transform_img(self, results: dict, mag: float) -> None:
class Brightness (line 152) | class Brightness(ColorTransform):
method __init__ (line 177) | def __init__(self,
method _transform_img (line 189) | def _transform_img(self, results: dict, mag: float) -> None:
class Contrast (line 196) | class Contrast(ColorTransform):
method __init__ (line 221) | def __init__(self,
method _transform_img (line 233) | def _transform_img(self, results: dict, mag: float) -> None:
class Sharpness (line 240) | class Sharpness(ColorTransform):
method __init__ (line 265) | def __init__(self,
method _transform_img (line 277) | def _transform_img(self, results: dict, mag: float) -> None:
class Solarize (line 284) | class Solarize(ColorTransform):
method __init__ (line 308) | def __init__(self,
method _transform_img (line 320) | def _transform_img(self, results: dict, mag: float) -> None:
class SolarizeAdd (line 327) | class SolarizeAdd(ColorTransform):
method __init__ (line 351) | def __init__(self,
method _transform_img (line 363) | def _transform_img(self, results: dict, mag: float) -> None:
class Posterize (line 371) | class Posterize(ColorTransform):
method __init__ (line 394) | def __init__(self,
method _transform_img (line 406) | def _transform_img(self, results: dict, mag: float) -> None:
class Equalize (line 413) | class Equalize(ColorTransform):
method _transform_img (line 434) | def _transform_img(self, results: dict, mag: float) -> None:
class AutoContrast (line 441) | class AutoContrast(ColorTransform):
method _transform_img (line 463) | def _transform_img(self, results: dict, mag: float) -> None:
class Invert (line 470) | class Invert(ColorTransform):
method _transform_img (line 490) | def _transform_img(self, results: dict, mag: float) -> None:
FILE: mmdet/datasets/transforms/formatting.py
class PackDetInputs (line 13) | class PackDetInputs(BaseTransform):
method __init__ (line 48) | def __init__(self,
method transform (line 53) | def transform(self, results: dict) -> dict:
method __repr__ (line 139) | def __repr__(self) -> str:
class ToTensor (line 146) | class ToTensor:
method __init__ (line 153) | def __init__(self, keys):
method __call__ (line 156) | def __call__(self, results):
method __repr__ (line 170) | def __repr__(self):
class ImageToTensor (line 175) | class ImageToTensor:
method __init__ (line 186) | def __init__(self, keys):
method __call__ (line 189) | def __call__(self, results):
method __repr__ (line 208) | def __repr__(self):
class Transpose (line 213) | class Transpose:
method __init__ (line 221) | def __init__(self, keys, order):
method __call__ (line 225) | def __call__(self, results):
method __repr__ (line 239) | def __repr__(self):
class WrapFieldsToLists (line 245) | class WrapFieldsToLists:
method __call__ (line 265) | def __call__(self, results):
method __repr__ (line 281) | def __repr__(self):
FILE: mmdet/datasets/transforms/geometric.py
class GeomTransform (line 17) | class GeomTransform(BaseTransform):
method __init__ (line 69) | def __init__(self,
method _transform_img (line 120) | def _transform_img(self, results: dict, mag: float) -> None:
method _transform_masks (line 124) | def _transform_masks(self, results: dict, mag: float) -> None:
method _transform_seg (line 128) | def _transform_seg(self, results: dict, mag: float) -> None:
method _get_homography_matrix (line 132) | def _get_homography_matrix(self, results: dict, mag: float) -> np.ndar...
method _transform_bboxes (line 136) | def _transform_bboxes(self, results: dict, mag: float) -> None:
method _record_homography_matrix (line 141) | def _record_homography_matrix(self, results: dict) -> None:
method _random_disable (line 150) | def _random_disable(self):
method _get_mag (line 155) | def _get_mag(self):
method transform (line 161) | def transform(self, results: dict) -> dict:
method __repr__ (line 186) | def __repr__(self) -> str:
class ShearX (line 201) | class ShearX(GeomTransform):
method __init__ (line 248) | def __init__(self,
method _get_mag (line 276) | def _get_mag(self):
method _get_homography_matrix (line 282) | def _get_homography_matrix(self, results: dict, mag: float) -> np.ndar...
method _transform_img (line 286) | def _transform_img(self, results: dict, mag: float) -> None:
method _transform_masks (line 295) | def _transform_masks(self, results: dict, mag: float) -> None:
method _transform_seg (line 304) | def _transform_seg(self, results: dict, mag: float) -> None:
class ShearY (line 315) | class ShearY(GeomTransform):
method __init__ (line 362) | def __init__(self,
method _get_mag (line 390) | def _get_mag(self):
method _get_homography_matrix (line 396) | def _get_homography_matrix(self, results: dict, mag: float) -> np.ndar...
method _transform_img (line 400) | def _transform_img(self, results: dict, mag: float) -> None:
method _transform_masks (line 409) | def _transform_masks(self, results: dict, mag: float) -> None:
method _transform_seg (line 418) | def _transform_seg(self, results: dict, mag: float) -> None:
class Rotate (line 429) | class Rotate(GeomTransform):
method __init__ (line 476) | def __init__(self,
method _get_homography_matrix (line 501) | def _get_homography_matrix(self, results: dict, mag: float) -> np.ndar...
method _transform_img (line 510) | def _transform_img(self, results: dict, mag: float) -> None:
method _transform_masks (line 518) | def _transform_masks(self, results: dict, mag: float) -> None:
method _transform_seg (line 526) | def _transform_seg(self, results: dict, mag: float) -> None:
class TranslateX (line 536) | class TranslateX(GeomTransform):
method __init__ (line 583) | def __init__(self,
method _get_homography_matrix (line 610) | def _get_homography_matrix(self, results: dict, mag: float) -> np.ndar...
method _transform_img (line 615) | def _transform_img(self, results: dict, mag: float) -> None:
method _transform_masks (line 625) | def _transform_masks(self, results: dict, mag: float) -> None:
method _transform_seg (line 635) | def _transform_seg(self, results: dict, mag: float) -> None:
class TranslateY (line 647) | class TranslateY(GeomTransform):
method __init__ (line 694) | def __init__(self,
method _get_homography_matrix (line 721) | def _get_homography_matrix(self, results: dict, mag: float) -> np.ndar...
method _transform_img (line 726) | def _transform_img(self, results: dict, mag: float) -> None:
method _transform_masks (line 736) | def _transform_masks(self, results: dict, mag: float) -> None:
method _transform_seg (line 746) | def _transform_seg(self, results: dict, mag: float) -> None:
FILE: mmdet/datasets/transforms/instaboost.py
class InstaBoost (line 11) | class InstaBoost(BaseTransform):
method __init__ (line 49) | def __init__(self,
method _load_anns (line 80) | def _load_anns(self, results: dict) -> Tuple[list, list]:
method _parse_anns (line 103) | def _parse_anns(self, results: dict, anns: list, ignore_anns: list,
method transform (line 126) | def transform(self, results) -> dict:
method __repr__ (line 147) | def __repr__(self) -> str:
FILE: mmdet/datasets/transforms/loading.py
class LoadImageFromNDArray (line 21) | class LoadImageFromNDArray(LoadImageFromFile):
method transform (line 45) | def transform(self, results: dict) -> dict:
class LoadMultiChannelImageFromFiles (line 68) | class LoadMultiChannelImageFromFiles(BaseTransform):
method __init__ (line 96) | def __init__(
method transform (line 109) | def transform(self, results: dict) -> dict:
method __repr__ (line 138) | def __repr__(self):
class LoadAnnotations (line 148) | class LoadAnnotations(MMCV_LoadAnnotations):
method __init__ (line 244) | def __init__(self,
method _load_bboxes (line 254) | def _load_bboxes(self, results: dict) -> None:
method _load_labels (line 275) | def _load_labels(self, results: dict) -> None:
method _poly2mask (line 291) | def _poly2mask(self, mask_ann: Union[list, dict], img_h: int,
method _process_masks (line 319) | def _process_masks(self, results: dict) -> list:
method _load_masks (line 362) | def _load_masks(self, results: dict) -> None:
method transform (line 378) | def transform(self, results: dict) -> dict:
method __repr__ (line 399) | def __repr__(self) -> str:
class LoadPanopticAnnotations (line 412) | class LoadPanopticAnnotations(LoadAnnotations):
method __init__ (line 509) | def __init__(
method _load_masks_and_semantic_segs (line 539) | def _load_masks_and_semantic_segs(self, results: dict) -> None:
method transform (line 577) | def transform(self, results: dict) -> dict:
class LoadProposals (line 601) | class LoadProposals(BaseTransform):
method __init__ (line 617) | def __init__(self, num_max_proposals: Optional[int] = None) -> None:
method transform (line 620) | def transform(self, results: dict) -> dict:
method __repr__ (line 657) | def __repr__(self):
class FilterAnnotations (line 663) | class FilterAnnotations(BaseTransform):
method __init__ (line 693) | def __init__(self,
method transform (line 708) | def transform(self, results: dict) -> Union[dict, None]:
method __repr__ (line 747) | def __repr__(self):
class LoadEmptyAnnotations (line 754) | class LoadEmptyAnnotations(BaseTransform):
method __init__ (line 778) | def __init__(self,
method transform (line 790) | def transform(self, results: dict) -> dict:
method __repr__ (line 814) | def __repr__(self) -> str:
class InferencerLoader (line 825) | class InferencerLoader(BaseTransform):
method __init__ (line 849) | def __init__(self, **kwargs) -> None:
method transform (line 856) | def transform(self, results: Union[str, np.ndarray, dict]) -> dict:
FILE: mmdet/datasets/transforms/transforms.py
class Resize (line 41) | class Resize(MMCV_Resize):
method _resize_masks (line 92) | def _resize_masks(self, results: dict) -> None:
method _resize_bboxes (line 102) | def _resize_bboxes(self, results: dict) -> None:
method _resize_seg (line 109) | def _resize_seg(self, results: dict) -> None:
method _record_homography_matrix (line 126) | def _record_homography_matrix(self, results: dict) -> None:
method transform (line 138) | def transform(self, results: dict) -> dict:
method __repr__ (line 161) | def __repr__(self) -> str:
class FixShapeResize (line 173) | class FixShapeResize(Resize):
method __init__ (line 231) | def __init__(self,
method transform (line 257) | def transform(self, results: dict) -> dict:
method __repr__ (line 299) | def __repr__(self) -> str:
class RandomFlip (line 310) | class RandomFlip(MMCV_RandomFlip):
method _record_homography_matrix (line 363) | def _record_homography_matrix(self, results: dict) -> None:
method _flip (line 387) | def _flip(self, results: dict) -> None:
class RandomShift (line 414) | class RandomShift(BaseTransform):
method __init__ (line 439) | def __init__(self,
method _random_prob (line 450) | def _random_prob(self) -> float:
method transform (line 454) | def transform(self, results: dict) -> dict:
method __repr__ (line 510) | def __repr__(self):
class Pad (line 519) | class Pad(MMCV_Pad):
method _pad_masks (line 578) | def _pad_masks(self, results: dict) -> None:
method transform (line 586) | def transform(self, results: dict) -> dict:
class RandomCrop (line 602) | class RandomCrop(BaseTransform):
method __init__ (line 662) | def __init__(self,
method _crop_data (line 686) | def _crop_data(self, results: dict, crop_size: Tuple[int, int],
method _rand_offset (line 765) | def _rand_offset(self, margin: Tuple[int, int]) -> Tuple[int, int]:
method _get_crop_size (line 782) | def _get_crop_size(self, image_size: Tuple[int, int]) -> Tuple[int, int]:
method transform (line 813) | def transform(self, results: dict) -> Union[dict, None]:
method __repr__ (line 830) | def __repr__(self) -> str:
class SegRescale (line 841) | class SegRescale(BaseTransform):
method __init__ (line 862) | def __init__(self, scale_factor: float = 1, backend: str = 'cv2') -> N...
method transform (line 866) | def transform(self, results: dict) -> dict:
method __repr__ (line 884) | def __repr__(self) -> str:
class PhotoMetricDistortion (line 892) | class PhotoMetricDistortion(BaseTransform):
method __init__ (line 921) | def __init__(self,
method _random_flags (line 932) | def _random_flags(self) -> Sequence[Number]:
method transform (line 951) | def transform(self, results: dict) -> dict:
method __repr__ (line 1010) | def __repr__(self) -> str:
class Expand (line 1022) | class Expand(BaseTransform):
method __init__ (line 1053) | def __init__(self,
method _random_prob (line 1070) | def _random_prob(self) -> float:
method _random_ratio (line 1074) | def _random_ratio(self) -> float:
method _random_left_top (line 1078) | def _random_left_top(self, ratio: float, h: int,
method transform (line 1085) | def transform(self, results: dict) -> dict:
method __repr__ (line 1136) | def __repr__(self) -> str:
class MinIoURandomCrop (line 1146) | class MinIoURandomCrop(BaseTransform):
method __init__ (line 1183) | def __init__(self,
method _random_mode (line 1194) | def _random_mode(self) -> Number:
method transform (line 1198) | def transform(self, results: dict) -> dict:
method __repr__ (line 1293) | def __repr__(self) -> str:
class Corrupt (line 1302) | class Corrupt(BaseTransform):
method __init__ (line 1323) | def __init__(self, corruption: str, severity: int = 1) -> None:
method transform (line 1327) | def transform(self, results: dict) -> dict:
method __repr__ (line 1345) | def __repr__(self) -> str:
class Albu (line 1354) | class Albu(BaseTransform):
method __init__ (line 1410) | def __init__(self,
method albu_builder (line 1451) | def albu_builder(self, cfg: dict) -> albumentations:
method mapper (line 1485) | def mapper(d: dict, keymap: dict) -> dict:
method transform (line 1501) | def transform(self, results: dict) -> Union[dict, None]:
method _preprocess_results (line 1516) | def _preprocess_results(self, results: dict) -> tuple:
method _postprocess_results (line 1543) | def _postprocess_results(
method __repr__ (line 1590) | def __repr__(self) -> str:
class RandomCenterCropPad (line 1597) | class RandomCenterCropPad(BaseTransform):
method __init__ (line 1705) | def __init__(self,
method _get_border (line 1751) | def _get_border(self, border, size):
method _filter_boxes (line 1770) | def _filter_boxes(self, patch, boxes):
method _crop_image_and_paste (line 1786) | def _crop_image_and_paste(self, image, center, size):
method _train_aug (line 1837) | def _train_aug(self, results):
method _test_aug (line 1911) | def _test_aug(self, results):
method transform (line 1945) | def transform(self, results: dict) -> dict:
method __repr__ (line 1957) | def __repr__(self):
class CutOut (line 1972) | class CutOut(BaseTransform):
method __init__ (line 2006) | def __init__(
method transform (line 2033) | def transform(self, results: dict) -> dict:
method __repr__ (line 2053) | def __repr__(self):
class Mosaic (line 2063) | class Mosaic(BaseTransform):
method __init__ (line 2127) | def __init__(self,
method get_indexes (line 2145) | def get_indexes(self, dataset: BaseDataset) -> int:
method transform (line 2159) | def transform(self, results: dict) -> dict:
method _mosaic_combine (line 2250) | def _mosaic_combine(
method __repr__ (line 2313) | def __repr__(self):
class MixUp (line 2323) | class MixUp(BaseTransform):
method __init__ (line 2384) | def __init__(self,
method get_indexes (line 2401) | def get_indexes(self, dataset: BaseDataset) -> int:
method transform (line 2420) | def transform(self, results: dict) -> dict:
method __repr__ (line 2533) | def __repr__(self):
class RandomAffine (line 2545) | class RandomAffine(BaseTransform):
method __init__ (line 2586) | def __init__(self,
method _get_random_homography_matrix (line 2606) | def _get_random_homography_matrix(self, height, width):
method transform (line 2636) | def transform(self, results: dict) -> dict:
method __repr__ (line 2669) | def __repr__(self):
method _get_rotation_matrix (line 2681) | def _get_rotation_matrix(rotate_degrees: float) -> np.ndarray:
method _get_scaling_matrix (line 2690) | def _get_scaling_matrix(scale_ratio: float) -> np.ndarray:
method _get_shear_matrix (line 2697) | def _get_shear_matrix(x_shear_degrees: float,
method _get_translation_matrix (line 2707) | def _get_translation_matrix(x: float, y: float) -> np.ndarray:
class YOLOXHSVRandomAug (line 2714) | class YOLOXHSVRandomAug(BaseTransform):
method __init__ (line 2733) | def __init__(self,
method _get_hsv_gains (line 2742) | def _get_hsv_gains(self):
method transform (line 2752) | def transform(self, results: dict) -> dict:
method __repr__ (line 2765) | def __repr__(self):
class CopyPaste (line 2774) | class CopyPaste(BaseTransform):
method __init__ (line 2822) | def __init__(
method get_indexes (line 2835) | def get_indexes(self, dataset: BaseDataset) -> int:
method transform (line 2846) | def transform(self, results: dict) -> dict:
method _get_selected_inds (line 2866) | def _get_selected_inds(self, num_bboxes: int) -> np.ndarray:
method _select_object (line 2871) | def _select_object(self, results: dict) -> dict:
method _copy_paste (line 2891) | def _copy_paste(self, dst_results: dict, src_results: dict) -> dict:
method _get_updated_masks (line 2948) | def _get_updated_masks(self, masks: BitmapMasks,
method __repr__ (line 2956) | def __repr__(self):
class RandomErasing (line 2966) | class RandomErasing(BaseTransform):
method __init__ (line 3011) | def __init__(
method _get_patches (line 3039) | def _get_patches(self, img_shape: Tuple[int, int]) -> List[list]:
method _transform_img (line 3060) | def _transform_img(self, results: dict, patches: List[list]) -> None:
method _transform_bboxes (line 3066) | def _transform_bboxes(self, results: dict, patches: List[list]) -> None:
method _transform_masks (line 3086) | def _transform_masks(self, results: dict, patches: List[list]) -> None:
method _transform_seg (line 3093) | def _transform_seg(self, results: dict, patches: List[list]) -> None:
method transform (line 3100) | def transform(self, results: dict) -> dict:
method __repr__ (line 3112) | def __repr__(self):
class CachedMosaic (line 3125) | class CachedMosaic(Mosaic):
method __init__ (line 3195) | def __init__(self,
method get_indexes (line 3208) | def get_indexes(self, cache: list) -> list:
method transform (line 3222) | def transform(self, results: dict) -> dict:
method __repr__ (line 3348) | def __repr__(self):
class CachedMixUp (line 3360) | class CachedMixUp(BaseTransform):
method __init__ (line 3431) | def __init__(self,
method get_indexes (line 3459) | def get_indexes(self, cache: list) -> int:
method transform (line 3477) | def transform(self, results: dict) -> dict:
method __repr__ (line 3626) | def __repr__(self):
FILE: mmdet/datasets/transforms/wrappers.py
class MultiBranch (line 13) | class MultiBranch(BaseTransform):
method __init__ (line 92) | def __init__(self, branch_field: List[str],
method transform (line 100) | def transform(self, results: dict) -> dict:
method __repr__ (line 135) | def __repr__(self) -> str:
class RandomOrder (line 142) | class RandomOrder(Compose):
method _random_permutation (line 146) | def _random_permutation(self):
method transform (line 149) | def transform(self, results: Dict) -> Optional[Dict]:
method __repr__ (line 166) | def __repr__(self):
class ProposalBroadcaster (line 176) | class ProposalBroadcaster(BaseTransform):
method __init__ (line 213) | def __init__(self, transforms: List[Union[dict, Callable]] = []) -> None:
method transform (line 216) | def transform(self, results: dict) -> dict:
method _process_input (line 236) | def _process_input(self, data: dict) -> list:
method _apply_transforms (line 251) | def _apply_transforms(self, inputs: list) -> list:
method _process_output (line 266) | def _process_output(self, output_scatters: list) -> dict:
FILE: mmdet/datasets/utils.py
function get_loading_pipeline (line 9) | def get_loading_pipeline(pipeline):
FILE: mmdet/datasets/voc.py
class VOCDataset (line 7) | class VOCDataset(XMLDataset):
method __init__ (line 24) | def __init__(self, **kwargs):
FILE: mmdet/datasets/wider_face.py
class WIDERFaceDataset (line 12) | class WIDERFaceDataset(XMLDataset):
method __init__ (line 20) | def __init__(self, **kwargs):
method load_annotations (line 23) | def load_annotations(self, ann_file):
FILE: mmdet/datasets/xml_style.py
class XMLDataset (line 14) | class XMLDataset(BaseDetDataset):
method __init__ (line 25) | def __init__(self,
method sub_data_root (line 34) | def sub_data_root(self) -> str:
method load_data_list (line 38) | def load_data_list(self) -> List[dict]:
method bbox_min_size (line 69) | def bbox_min_size(self) -> Optional[str]:
method parse_data_info (line 76) | def parse_data_info(self, img_info: dict) -> Union[dict, List[dict]]:
method filter_data (line 142) | def filter_data(self) -> List[dict]:
FILE: mmdet/engine/hooks/checkloss_hook.py
class CheckInvalidLossHook (line 12) | class CheckInvalidLossHook(Hook):
method __init__ (line 23) | def __init__(self, interval: int = 50) -> None:
method after_train_iter (line 26) | def after_train_iter(self,
FILE: mmdet/engine/hooks/mean_teacher_hook.py
class MeanTeacherHook (line 13) | class MeanTeacherHook(Hook):
method __init__ (line 38) | def __init__(self,
method before_train (line 47) | def before_train(self, runner: Runner) -> None:
method after_train_iter (line 58) | def after_train_iter(self,
method momentum_update (line 71) | def momentum_update(self, model: nn.Module, momentum: float) -> None:
FILE: mmdet/engine/hooks/memory_profiler_hook.py
class MemoryProfilerHook (line 12) | class MemoryProfilerHook(Hook):
method __init__ (line 21) | def __init__(self, interval: int = 50) -> None:
method _record_memory_information (line 40) | def _record_memory_information(self, runner: Runner) -> None:
method after_train_iter (line 68) | def after_train_iter(self,
method after_val_iter (line 85) | def after_val_iter(
method after_test_iter (line 104) | def after_test_iter(
FILE: mmdet/engine/hooks/num_class_check_hook.py
class NumClassCheckHook (line 10) | class NumClassCheckHook(Hook):
method _check_head (line 14) | def _check_head(self, runner: Runner, mode: str) -> None:
method before_train_epoch (line 52) | def before_train_epoch(self, runner: Runner) -> None:
method before_val_epoch (line 61) | def before_val_epoch(self, runner: Runner) -> None:
FILE: mmdet/engine/hooks/pipeline_switch_hook.py
class PipelineSwitchHook (line 9) | class PipelineSwitchHook(Hook):
method __init__ (line 17) | def __init__(self, switch_epoch, switch_pipeline):
method before_train_epoch (line 22) | def before_train_epoch(self, runner):
FILE: mmdet/engine/hooks/set_epoch_info_hook.py
class SetEpochInfoHook (line 9) | class SetEpochInfoHook(Hook):
method before_train_epoch (line 12) | def before_train_epoch(self, runner):
FILE: mmdet/engine/hooks/sync_norm_hook.py
function get_norm_states (line 12) | def get_norm_states(module: nn.Module) -> OrderedDict:
class SyncNormHook (line 23) | class SyncNormHook(Hook):
method before_val_epoch (line 26) | def before_val_epoch(self, runner):
FILE: mmdet/engine/hooks/utils.py
function trigger_visualization_hook (line 2) | def trigger_visualization_hook(cfg, args):
FILE: mmdet/engine/hooks/visualization_hook.py
class DetVisualizationHook (line 18) | class DetVisualizationHook(Hook):
method __init__ (line 50) | def __init__(self,
method after_val_iter (line 77) | def after_val_iter(self, runner: Runner, batch_idx: int, data_batch: d...
method after_test_iter (line 113) | def after_test_iter(self, runner: Runner, batch_idx: int, data_batch: ...
FILE: mmdet/engine/hooks/yolox_mode_switch_hook.py
class YOLOXModeSwitchHook (line 11) | class YOLOXModeSwitchHook(Hook):
method __init__ (line 25) | def __init__(
method before_train_epoch (line 34) | def before_train_epoch(self, runner) -> None:
FILE: mmdet/engine/optimizers/layer_decay_optimizer_constructor.py
function get_layer_id_for_convnext (line 13) | def get_layer_id_for_convnext(var_name, max_layer_id):
function get_stage_id_for_convnext (line 56) | def get_stage_id_for_convnext(var_name, max_stage_id):
class LearningRateDecayOptimizerConstructor (line 82) | class LearningRateDecayOptimizerConstructor(DefaultOptimWrapperConstruct...
method add_params (line 86) | def add_params(self, params: List[dict], module: nn.Module,
FILE: mmdet/engine/runner/loops.py
class TeacherStudentValLoop (line 10) | class TeacherStudentValLoop(ValLoop):
method run (line 13) | def run(self):
FILE: mmdet/engine/schedulers/quadratic_warmup.py
class QuadraticWarmupParamScheduler (line 11) | class QuadraticWarmupParamScheduler(_ParamScheduler):
method __init__ (line 35) | def __init__(self,
method build_iter_from_epoch (line 59) | def build_iter_from_epoch(cls,
method _get_value (line 79) | def _get_value(self):
class QuadraticWarmupLR (line 96) | class QuadraticWarmupLR(LRSchedulerMixin, QuadraticWarmupParamScheduler):
class QuadraticWarmupMomentum (line 115) | class QuadraticWarmupMomentum(MomentumSchedulerMixin,
FILE: mmdet/evaluation/functional/bbox_overlaps.py
function bbox_overlaps (line 5) | def bbox_overlaps(bboxes1,
FILE: mmdet/evaluation/functional/class_names.py
function wider_face_classes (line 5) | def wider_face_classes() -> list:
function voc_classes (line 10) | def voc_classes() -> list:
function imagenet_det_classes (line 19) | def imagenet_det_classes() -> list:
function imagenet_vid_classes (line 61) | def imagenet_vid_classes() -> list:
function coco_classes (line 72) | def coco_classes() -> list:
function coco_panoptic_classes (line 91) | def coco_panoptic_classes() -> list:
function cityscapes_classes (line 121) | def cityscapes_classes() -> list:
function oid_challenge_classes (line 129) | def oid_challenge_classes() -> list:
function oid_v6_classes (line 225) | def oid_v6_classes() -> list:
function objects365v1_classes (line 344) | def objects365v1_classes() -> list:
function objects365v2_classes (line 415) | def objects365v2_classes() -> list:
function get_classes (line 503) | def get_classes(dataset) -> list:
FILE: mmdet/evaluation/functional/mean_ap.py
function average_precision (line 13) | def average_precision(recalls, precisions, mode='area'):
function tpfp_imagenet (line 60) | def tpfp_imagenet(det_bboxes,
function tpfp_default (line 169) | def tpfp_default(det_bboxes,
function tpfp_openimages (line 272) | def tpfp_openimages(det_bboxes,
function get_cls_results (line 477) | def get_cls_results(det_results, annotations, class_id):
function get_cls_group_ofs (line 504) | def get_cls_group_ofs(annotations, class_id):
function eval_map (line 525) | def eval_map(det_results,
function print_map_summary (line 726) | def print_map_summary(mean_ap,
FILE: mmdet/evaluation/functional/panoptic_utils.py
function pq_compute_single_core (line 30) | def pq_compute_single_core(proc_id,
function pq_compute_multi_core (line 180) | def pq_compute_multi_core(matched_annotations_list,
FILE: mmdet/evaluation/functional/recall.py
function _recalls (line 11) | def _recalls(all_ious, proposal_nums, thrs):
function set_recall_param (line 44) | def set_recall_param(proposal_nums, iou_thrs):
function eval_recalls (line 65) | def eval_recalls(gts,
function print_recall_summary (line 118) | def print_recall_summary(recalls,
function plot_num_recall (line 152) | def plot_num_recall(recalls, proposal_nums):
function plot_iou_recall (line 177) | def plot_iou_recall(recalls, iou_thrs):
FILE: mmdet/evaluation/metrics/cityscapes_metric.py
class CityScapesMetric (line 28) | class CityScapesMetric(BaseMetric):
method __init__ (line 55) | def __init__(self,
method __del__ (line 82) | def __del__(self) -> None:
method process (line 89) | def process(self, data_batch: dict, data_samples: Sequence[dict]) -> N...
method compute_metrics (line 135) | def compute_metrics(self, results: list) -> Dict[str, float]:
FILE: mmdet/evaluation/metrics/coco_metric.py
class CocoMetric (line 23) | class CocoMetric(BaseMetric):
method __init__ (line 68) | def __init__(self,
method fast_eval_recall (line 137) | def fast_eval_recall(self,
method xyxy2xywh (line 178) | def xyxy2xywh(self, bbox: np.ndarray) -> list:
method results2json (line 198) | def results2json(self, results: Sequence[dict],
method gt_to_coco_json (line 262) | def gt_to_coco_json(self, gt_dicts: Sequence[dict],
method process (line 334) | def process(self, data_batch: dict, data_samples: Sequence[dict]) -> N...
method compute_metrics (line 374) | def compute_metrics(self, results: list) -> Dict[str, float]:
FILE: mmdet/evaluation/metrics/coco_occluded_metric.py
class CocoOccludedSeparatedMetric (line 18) | class CocoOccludedSeparatedMetric(CocoMetric):
method __init__ (line 59) | def __init__(
method compute_metrics (line 81) | def compute_metrics(self, results: list) -> Dict[str, float]:
method evaluate_occluded_separated (line 96) | def evaluate_occluded_separated(self, results: List[tuple]) -> dict:
method compute_recall (line 154) | def compute_recall(self,
method mask_iou (line 205) | def mask_iou(self, mask1: np.ndarray, mask2: np.ndarray) -> np.ndarray:
FILE: mmdet/evaluation/metrics/coco_panoptic_metric.py
class CocoPanopticMetric (line 33) | class CocoPanopticMetric(BaseMetric):
method __init__ (line 72) | def __init__(self,
method __del__ (line 124) | def __del__(self) -> None:
method gt_to_coco_json (line 129) | def gt_to_coco_json(self, gt_dicts: Sequence[dict],
method result2json (line 210) | def result2json(self, results: Sequence[dict],
method _parse_predictions (line 244) | def _parse_predictions(self,
method _compute_batch_pq_stats (line 297) | def _compute_batch_pq_stats(self, data_samples: Sequence[dict]):
method _process_gt_and_predictions (line 377) | def _process_gt_and_predictions(self, data_samples: Sequence[dict]):
method process (line 407) | def process(self, data_batch: dict, data_samples: Sequence[dict]) -> N...
method compute_metrics (line 424) | def compute_metrics(self, results: list) -> Dict[str, float]:
function parse_pq_results (line 544) | def parse_pq_results(pq_results: dict) -> dict:
function print_panoptic_table (line 566) | def print_panoptic_table(
FILE: mmdet/evaluation/metrics/crowdhuman_metric.py
class CrowdHumanMetric (line 24) | class CrowdHumanMetric(BaseMetric):
method __init__ (line 66) | def __init__(self,
method results2json (line 114) | def results2json(results: Sequence[dict], outfile_prefix: str) -> str:
method process (line 138) | def process(self, data_batch: Sequence[dict],
method compute_metrics (line 162) | def compute_metrics(self, results: list) -> Dict[str, float]:
method load_eval_samples (line 215) | def load_eval_samples(self, result_file):
method compare (line 240) | def compare(self, samples):
method eval_ap (line 263) | def eval_ap(score_list, gt_num, img_num):
method eval_mr (line 312) | def eval_mr(self, score_list, gt_num, img_num):
method eval_ji (line 372) | def eval_ji(self, samples):
method compute_ji_with_ignore (line 411) | def compute_ji_with_ignore(self, result_queue, dt_result, score_thr):
method gather (line 462) | def gather(results):
method compute_ji_matching (line 477) | def compute_ji_matching(self, dt_boxes, gt_boxes):
method get_ignores (line 502) | def get_ignores(self, dt_boxes, gt_boxes):
class Image (line 513) | class Image(object):
method __init__ (line 526) | def __init__(self, mode):
method load (line 538) | def load(self, record, body_key, head_key, class_names, gt_flag):
method load_gt_boxes (line 622) | def load_gt_boxes(dict_input, key_name, class_names):
method load_det_boxes (line 654) | def load_det_boxes(dict_input, key_name, key_box, key_score, key_tag=N...
method clip_all_boader (line 688) | def clip_all_boader(self):
method compare_voc (line 717) | def compare_voc(self, thres):
method compare_caltech (line 758) | def compare_caltech(self, thres):
FILE: mmdet/evaluation/metrics/dump_det_results.py
class DumpDetResults (line 13) | class DumpDetResults(DumpResults):
method process (line 27) | def process(self, data_batch: dict, data_samples: Sequence[dict]) -> N...
FILE: mmdet/evaluation/metrics/dump_proposals_metric.py
class DumpProposals (line 16) | class DumpProposals(BaseMetric):
method __init__ (line 39) | def __init__(self,
method process (line 58) | def process(self, data_batch: Sequence[dict],
method compute_metrics (line 93) | def compute_metrics(self, results: list) -> dict:
FILE: mmdet/evaluation/metrics/lvis_metric.py
class LVISMetric (line 32) | class LVISMetric(CocoMetric):
method __init__ (line 69) | def __init__(self,
method fast_eval_recall (line 122) | def fast_eval_recall(self,
method process (line 163) | def process(self, data_batch: dict, data_samples: Sequence[dict]) -> N...
method compute_metrics (line 202) | def compute_metrics(self, results: list) -> Dict[str, float]:
FILE: mmdet/evaluation/metrics/openimages_metric.py
class OpenImagesMetric (line 15) | class OpenImagesMetric(BaseMetric):
method __init__ (line 44) | def __init__(self,
method _get_supercategory_ann (line 66) | def _get_supercategory_ann(self, instances: List[dict]) -> List[dict]:
method _process_predictions (line 87) | def _process_predictions(self, pred_bboxes: np.ndarray,
method process (line 147) | def process(self, data_batch: dict, data_samples: Sequence[dict]) -> N...
method compute_metrics (line 195) | def compute_metrics(self, results: list) -> dict:
FILE: mmdet/evaluation/metrics/voc_metric.py
class VOCMetric (line 16) | class VOCMetric(BaseMetric):
method __init__ (line 46) | def __init__(self,
method process (line 74) | def process(self, data_batch: dict, data_samples: Sequence[dict]) -> N...
method compute_metrics (line 109) | def compute_metrics(self, results: list) -> dict:
FILE: mmdet/models/backbones/csp_darknet.py
class Focus (line 14) | class Focus(nn.Module):
method __init__ (line 30) | def __init__(self,
method forward (line 49) | def forward(self, x):
class SPPBottleneck (line 67) | class SPPBottleneck(BaseModule):
method __init__ (line 85) | def __init__(self,
method forward (line 116) | def forward(self, x):
class CSPDarknet (line 126) | class CSPDarknet(BaseModule):
method __init__ (line 179) | def __init__(self,
method _freeze_stages (line 263) | def _freeze_stages(self):
method train (line 271) | def train(self, mode=True):
method forward (line 279) | def forward(self, x):
FILE: mmdet/models/backbones/cspnext.py
class CSPNeXt (line 18) | class CSPNeXt(BaseModule):
method __init__ (line 64) | def __init__(
method _freeze_stages (line 172) | def _freeze_stages(self) -> None:
method train (line 180) | def train(self, mode=True) -> None:
method forward (line 188) | def forward(self, x: Tuple[Tensor, ...]) -> Tuple[Tensor, ...]:
FILE: mmdet/models/backbones/darknet.py
class ResBlock (line 14) | class ResBlock(BaseModule):
method __init__ (line 33) | def __init__(self,
method forward (line 50) | def forward(self, x):
class Darknet (line 60) | class Darknet(BaseModule):
method __init__ (line 101) | def __init__(self,
method forward (line 153) | def forward(self, x):
method _freeze_stages (line 163) | def _freeze_stages(self):
method train (line 171) | def train(self, mode=True):
method make_conv_res_block (line 180) | def make_conv_res_block(in_channels,
FILE: mmdet/models/backbones/detectors_resnet.py
class Bottleneck (line 16) | class Bottleneck(_Bottleneck):
method __init__ (line 36) | def __init__(self,
method rfp_forward (line 73) | def rfp_forward(self, x, rfp_feat):
class ResLayer (line 120) | class ResLayer(Sequential):
method __init__ (line 146) | def __init__(self,
class DetectoRS_ResNet (line 212) | class DetectoRS_ResNet(ResNet):
method __init__ (line 234) | def __init__(self,
method init_weights (line 296) | def init_weights(self):
method make_res_layer (line 325) | def make_res_layer(self, **kwargs):
method forward (line 329) | def forward(self, x):
method rfp_forward (line 336) | def rfp_forward(self, x, rfp_feats):
FILE: mmdet/models/backbones/detectors_resnext.py
class Bottleneck (line 11) | class Bottleneck(_Bottleneck):
method __init__ (line 14) | def __init__(self,
class DetectoRS_ResNeXt (line 99) | class DetectoRS_ResNeXt(DetectoRS_ResNet):
method __init__ (line 113) | def __init__(self, groups=1, base_width=4, **kwargs):
method make_res_layer (line 118) | def make_res_layer(self, **kwargs):
FILE: mmdet/models/backbones/efficientnet.py
class EdgeResidual (line 17) | class EdgeResidual(BaseModule):
method __init__ (line 42) | def __init__(self,
method forward (line 92) | def forward(self, x):
function model_scaling (line 116) | def model_scaling(layer_setting, arch_setting):
class EfficientNet (line 160) | class EfficientNet(BaseModule):
method __init__ (line 255) | def __init__(self,
method make_layer (line 328) | def make_layer(self):
method forward (line 396) | def forward(self, x):
method _freeze_stages (line 405) | def _freeze_stages(self):
method train (line 412) | def train(self, mode=True):
FILE: mmdet/models/backbones/hourglass.py
class HourglassModule (line 16) | class HourglassModule(BaseModule):
method __init__ (line 35) | def __init__(self,
method forward (line 85) | def forward(self, x: torch.Tensor) -> nn.Module:
class HourglassNet (line 102) | class HourglassNet(BaseModule):
method __init__ (line 135) | def __init__(self,
method init_weights (line 198) | def init_weights(self) -> None:
method forward (line 206) | def forward(self, x: torch.Tensor) -> List[torch.Tensor]:
FILE: mmdet/models/backbones/hrnet.py
class HRModule (line 13) | class HRModule(BaseModule):
method __init__ (line 20) | def __init__(self,
method _check_branches (line 49) | def _check_branches(self, num_branches, num_blocks, in_channels,
method _make_one_branch (line 66) | def _make_one_branch(self,
method _make_branches (line 112) | def _make_branches(self, num_branches, block, num_blocks, num_channels):
method _make_fuse_layers (line 121) | def _make_fuse_layers(self):
method forward (line 183) | def forward(self, x):
class HRNet (line 204) | class HRNet(BaseModule):
method __init__ (line 281) | def __init__(self,
method norm1 (line 403) | def norm1(self):
method norm2 (line 408) | def norm2(self):
method _make_transition_layer (line 412) | def _make_transition_layer(self, num_channels_pre_layer,
method _make_layer (line 458) | def _make_layer(self, block, inplanes, planes, blocks, stride=1):
method _make_stage (line 505) | def _make_stage(self, layer_config, in_channels, multiscale_output=True):
method forward (line 545) | def forward(self, x):
method train (line 581) | def train(self, mode=True):
FILE: mmdet/models/backbones/mobilenet_v2.py
class MobileNetV2 (line 15) | class MobileNetV2(BaseModule):
method __init__ (line 47) | def __init__(self,
method make_layer (line 139) | def make_layer(self, out_channels, num_blocks, stride, expand_ratio):
method _freeze_stages (line 168) | def _freeze_stages(self):
method forward (line 178) | def forward(self, x):
method train (line 189) | def train(self, mode=True):
FILE: mmdet/models/backbones/pvt.py
class MixFFN (line 24) | class MixFFN(BaseModule):
method __init__ (line 48) | def __init__(self,
method forward (line 94) | def forward(self, x, hw_shape, identity=None):
class SpatialReductionAttention (line 103) | class SpatialReductionAttention(MultiheadAttention):
method __init__ (line 130) | def __init__(self,
method forward (line 170) | def forward(self, x, hw_shape, identity=None):
method legacy_forward (line 201) | def legacy_forward(self, x, hw_shape, identity=None):
class PVTEncoderLayer (line 220) | class PVTEncoderLayer(BaseModule):
method __init__ (line 246) | def __init__(self,
method forward (line 285) | def forward(self, x, hw_shape):
class AbsolutePositionEmbedding (line 292) | class AbsolutePositionEmbedding(BaseModule):
method __init__ (line 302) | def __init__(self, pos_shape, pos_dim, drop_rate=0., init_cfg=None):
method init_weights (line 320) | def init_weights(self):
method resize_pos_embed (line 323) | def resize_pos_embed(self, pos_embed, input_shape, mode='bilinear'):
method forward (line 352) | def forward(self, x, hw_shape, mode='bilinear'):
class PyramidVisionTransformer (line 358) | class PyramidVisionTransformer(BaseModule):
method __init__ (line 411) | def __init__(self,
method init_weights (line 524) | def init_weights(self):
method forward (line 564) | def forward(self, x):
class PyramidVisionTransformerV2 (line 581) | class PyramidVisionTransformerV2(PyramidVisionTransformer):
method __init__ (line 585) | def __init__(self, **kwargs):
function pvt_convert (line 595) | def pvt_convert(ckpt):
FILE: mmdet/models/backbones/regnet.py
class RegNet (line 14) | class RegNet(ResNet):
method __init__ (line 90) | def __init__(self,
method _make_stem_layer (line 238) | def _make_stem_layer(self, in_channels, base_channels):
method generate_regnet (line 252) | def generate_regnet(self,
method quantize_float (line 285) | def quantize_float(number, divisor):
method adjust_width_group (line 297) | def adjust_width_group(self, widths, bottleneck_ratio, groups):
method get_stages_from_blocks (line 322) | def get_stages_from_blocks(self, widths):
method forward (line 344) | def forward(self, x):
FILE: mmdet/models/backbones/res2net.py
class Bottle2neck (line 15) | class Bottle2neck(_Bottleneck):
method __init__ (line 18) | def __init__(self,
method forward (line 106) | def forward(self, x):
class Res2Layer (line 163) | class Res2Layer(Sequential):
method __init__ (line 182) | def __init__(self,
class Res2Net (line 243) | class Res2Net(ResNet):
method __init__ (line 303) | def __init__(self,
method make_res_layer (line 322) | def make_res_layer(self, **kwargs):
FILE: mmdet/models/backbones/resnest.py
class RSoftmax (line 17) | class RSoftmax(nn.Module):
method __init__ (line 25) | def __init__(self, radix, groups):
method forward (line 30) | def forward(self, x):
class SplitAttentionConv2d (line 41) | class SplitAttentionConv2d(BaseModule):
method __init__ (line 64) | def __init__(self,
method norm0 (line 116) | def norm0(self):
method norm1 (line 121) | def norm1(self):
method forward (line 125) | def forward(self, x):
class Bottleneck (line 154) | class Bottleneck(_Bottleneck):
method __init__ (line 173) | def __init__(self,
method forward (line 234) | def forward(self, x):
class ResNeSt (line 278) | class ResNeSt(ResNetV1d):
method __init__ (line 299) | def __init__(self,
method make_res_layer (line 313) | def make_res_layer(self, **kwargs):
FILE: mmdet/models/backbones/resnet.py
class BasicBlock (line 14) | class BasicBlock(BaseModule):
method __init__ (line 17) | def __init__(self,
method norm1 (line 58) | def norm1(self):
method norm2 (line 63) | def norm2(self):
method forward (line 67) | def forward(self, x):
class Bottleneck (line 97) | class Bottleneck(BaseModule):
method __init__ (line 100) | def __init__(self,
method make_block_plugins (line 219) | def make_block_plugins(self, in_channels, plugins):
method forward_plugin (line 242) | def forward_plugin(self, x, plugin_names):
method norm1 (line 249) | def norm1(self):
method norm2 (line 254) | def norm2(self):
method norm3 (line 259) | def norm3(self):
method forward (line 263) | def forward(self, x):
class ResNet (line 306) | class ResNet(BaseModule):
method __init__ (line 369) | def __init__(self,
method make_stage_plugins (line 494) | def make_stage_plugins(self, plugins, stage_idx):
method make_res_layer (line 556) | def make_res_layer(self, **kwargs):
method norm1 (line 561) | def norm1(self):
method _make_stem_layer (line 565) | def _make_stem_layer(self, in_channels, stem_channels):
method _freeze_stages (line 613) | def _freeze_stages(self):
method forward (line 631) | def forward(self, x):
method train (line 648) | def train(self, mode=True):
class ResNetV1d (line 661) | class ResNetV1d(ResNet):
method __init__ (line 670) | def __init__(self, **kwargs):
FILE: mmdet/models/backbones/resnext.py
class Bottleneck (line 12) | class Bottleneck(_Bottleneck):
method __init__ (line 15) | def __init__(self,
method _del_block_plugins (line 98) | def _del_block_plugins(self, plugin_names):
class ResNeXt (line 110) | class ResNeXt(ResNet):
method __init__ (line 143) | def __init__(self, groups=1, base_width=4, **kwargs):
method make_res_layer (line 148) | def make_res_layer(self, **kwargs):
FILE: mmdet/models/backbones/ssd_vgg.py
class SSDVGG (line 13) | class SSDVGG(VGG, BaseModule):
method __init__ (line 50) | def __init__(self,
method init_weights (line 105) | def init_weights(self, pretrained=None):
method forward (line 108) | def forward(self, x):
class L2Norm (line 122) | class L2Norm(ssd_neck.L2Norm):
method __init__ (line 124) | def __init__(self, **kwargs):
FILE: mmdet/models/backbones/swin.py
class WindowMSA (line 23) | class WindowMSA(BaseModule):
method __init__ (line 42) | def __init__(self,
method init_weights (line 79) | def init_weights(self):
method forward (line 82) | def forward(self, x, mask=None):
method double_step_seq (line 123) | def double_step_seq(step1, len1, step2, len2):
class ShiftWindowMSA (line 129) | class ShiftWindowMSA(BaseModule):
method __init__ (line 152) | def __init__(self,
method forward (line 181) | def forward(self, query, hw_shape):
method window_reverse (line 257) | def window_reverse(self, windows, H, W):
method window_partition (line 273) | def window_partition(self, x):
class SwinBlock (line 289) | class SwinBlock(BaseModule):
method __init__ (line 314) | def __init__(self,
method forward (line 359) | def forward(self, x, hw_shape):
class SwinBlockSequence (line 382) | class SwinBlockSequence(BaseModule):
method __init__ (line 411) | def __init__(self,
method forward (line 456) | def forward(self, x, hw_shape):
class SwinTransformer (line 468) | class SwinTransformer(BaseModule):
method __init__ (line 525) | def __init__(self,
method train (line 644) | def train(self, mode=True):
method _freeze_stages (line 649) | def _freeze_stages(self):
method init_weights (line 671) | def init_weights(self):
method forward (line 746) | def forward(self, x):
function swin_converter (line 767) | def swin_converter(ckpt):
FILE: mmdet/models/backbones/trident_resnet.py
class TridentConv (line 14) | class TridentConv(BaseModule):
method __init__ (line 33) | def __init__(self,
method extra_repr (line 61) | def extra_repr(self):
method forward (line 73) | def forward(self, inputs):
class TridentBottleneck (line 93) | class TridentBottleneck(Bottleneck):
method __init__ (line 106) | def __init__(self, trident_dilations, test_branch_idx, concat_output,
method forward (line 128) | def forward(self, x):
function make_trident_res_layer (line 182) | def make_trident_res_layer(block,
class TridentResNet (line 235) | class TridentResNet(ResNet):
method __init__ (line 256) | def __init__(self, depth, num_branch, test_branch_idx, trident_dilations,
FILE: mmdet/models/data_preprocessors/data_preprocessor.py
class DetDataPreprocessor (line 31) | class DetDataPreprocessor(ImgDataPreprocessor):
method __init__ (line 77) | def __init__(self,
method forward (line 110) | def forward(self, data: dict, training: bool = False) -> dict:
method _get_pad_shape (line 151) | def _get_pad_shape(self, data: dict) -> List[tuple]:
method pad_gt_masks (line 185) | def pad_gt_masks(self,
method pad_gt_sem_seg (line 195) | def pad_gt_sem_seg(self,
class BatchSyncRandomResize (line 212) | class BatchSyncRandomResize(nn.Module):
method __init__ (line 224) | def __init__(self,
method forward (line 236) | def forward(
method _get_random_size (line 282) | def _get_random_size(self, aspect_ratio: float,
class BatchFixedSizePad (line 300) | class BatchFixedSizePad(nn.Module):
method __init__ (line 317) | def __init__(self,
method forward (line 332) | def forward(
class MultiBranchDataPreprocessor (line 379) | class MultiBranchDataPreprocessor(BaseDataPreprocessor):
method __init__ (line 472) | def __init__(self, data_preprocessor: ConfigType) -> None:
method forward (line 476) | def forward(self, data: dict, training: bool = False) -> dict:
method device (line 532) | def device(self):
method to (line 535) | def to(self, device: Optional[Union[int, torch.device]], *args,
method cuda (line 549) | def cuda(self, *args, **kwargs) -> nn.Module:
method cpu (line 558) | def cpu(self, *args, **kwargs) -> nn.Module:
class BatchResize (line 569) | class BatchResize(nn.Module):
method __init__ (line 587) | def __init__(
method forward (line 599) | def forward(
method get_target_size (line 634) | def get_target_size(self, height: int,
method get_padded_tensor (line 646) | def get_padded_tensor(self, tensor: Tensor, pad_value: int) -> Tensor:
class BoxInstDataPreprocessor (line 662) | class BoxInstDataPreprocessor(DetDataPreprocessor):
method __init__ (line 683) | def __init__(self,
method get_images_color_similarity (line 702) | def get_images_color_similarity(self, inputs: Tensor,
method forward (line 723) | def forward(self, data: dict, training: bool = False) -> dict:
FILE: mmdet/models/dense_heads/anchor_free_head.py
class AnchorFreeHead (line 21) | class AnchorFreeHead(BaseDenseHead):
method __init__ (line 55) | def __init__(
method _init_layers (line 115) | def _init_layers(self) -> None:
method _init_cls_convs (line 121) | def _init_cls_convs(self) -> None:
method _init_reg_convs (line 141) | def _init_reg_convs(self) -> None:
method _init_predictor (line 161) | def _init_predictor(self) -> None:
method _load_from_state_dict (line 167) | def _load_from_state_dict(self, state_dict: dict, prefix: str,
method forward (line 209) | def forward(self, x: Tuple[Tensor]) -> Tuple[List[Tensor], List[Tensor]]:
method forward_single (line 227) | def forward_single(self, x: Tensor) -> Tuple[Tensor, ...]:
method loss_by_feat (line 251) | def loss_by_feat(
method get_targets (line 282) | def get_targets(self, points: List[Tensor],
method aug_test (line 297) | def aug_test(self,
FILE: mmdet/models/dense_heads/anchor_head.py
class AnchorHead (line 22) | class AnchorHead(BaseDenseHead):
method __init__ (line 44) | def __init__(
method num_anchors (line 107) | def num_anchors(self) -> int:
method anchor_generator (line 114) | def anchor_generator(self) -> AnchorGenerator:
method _init_layers (line 119) | def _init_layers(self) -> None:
method forward_single (line 128) | def forward_single(self, x: Tensor) -> Tuple[Tensor, Tensor]:
method forward (line 145) | def forward(self, x: Tuple[Tensor]) -> Tuple[List[Tensor]]:
method get_anchors (line 164) | def get_anchors(self,
method _get_targets_single (line 201) | def _get_targets_single(self,
method get_targets (line 308) | def get_targets(self,
method loss_by_feat_single (line 415) | def loss_by_feat_single(self, cls_score: Tensor, bbox_pred: Tensor,
method loss_by_feat (line 467) | def loss_by_feat(
FILE: mmdet/models/dense_heads/atss_head.py
class ATSSHead (line 19) | class ATSSHead(AnchorHead):
method __init__ (line 48) | def __init__(self,
method _init_layers (line 85) | def _init_layers(self) -> None:
method forward (line 129) | def forward(self, x: Tuple[Tensor]) -> Tuple[List[Tensor]]:
method forward_single (line 147) | def forward_single(self, x: Tensor, scale: Scale) -> Sequence[Tensor]:
method loss_by_feat_single (line 176) | def loss_by_feat_single(self, anchors: Tensor, cls_score: Tensor,
method loss_by_feat (line 253) | def loss_by_feat(
method centerness_target (line 323) | def centerness_target(self, anchors: Tensor, gts: Tensor) -> Tensor:
method get_targets (line 350) | def get_targets(self,
method _get_targets_single (line 408) | def _get_targets_single(self,
method get_num_level_anchors_inside (line 517) | def get_num_level_anchors_inside(self, num_level_anchors, inside_flags):
FILE: mmdet/models/dense_heads/autoassign_head.py
class CenterPrior (line 22) | class CenterPrior(nn.Module):
method __init__ (line 38) | def __init__(
method forward (line 52) | def forward(self, anchor_points_list: List[Tensor],
class AutoAssignHead (line 134) | class AutoAssignHead(FCOSHead):
method __init__ (line 154) | def __init__(self,
method init_weights (line 173) | def init_weights(self) -> None:
method forward_single (line 185) | def forward_single(self, x: Tensor, scale: Scale,
method get_pos_loss_single (line 214) | def get_pos_loss_single(self, cls_score: Tensor, objectness: Tensor,
method get_neg_loss_single (line 261) | def get_neg_loss_single(self, cls_score: Tensor, objectness: Tensor,
method loss_by_feat (line 319) | def loss_by_feat(
method get_targets (line 456) | def get_targets(
method _get_targets_single (line 485) | def _get_targets_single(self, gt_instances: InstanceData,
FILE: mmdet/models/dense_heads/base_dense_head.py
class BaseDenseHead (line 23) | class BaseDenseHead(BaseModule, metaclass=ABCMeta):
method __init__ (line 60) | def __init__(self, init_cfg: OptMultiConfig = None) -> None:
method init_weights (line 66) | def init_weights(self) -> None:
method get_positive_infos (line 75) | def get_positive_infos(self) -> InstanceList:
method loss (line 101) | def loss(self, x: Tuple[Tensor], batch_data_samples: SampleList) -> dict:
method loss_by_feat (line 127) | def loss_by_feat(self, **kwargs) -> dict:
method loss_and_predict (line 132) | def loss_and_predict(
method predict (line 171) | def predict(self,
method predict_by_feat (line 201) | def predict_by_feat(self,
method _predict_by_feat_single (line 291) | def _predict_by_feat_single(self,
method _bbox_post_process (line 424) | def _bbox_post_process(self,
method aug_test (line 488) | def aug_test(self,
FILE: mmdet/models/dense_heads/base_mask_head.py
class BaseMaskHead (line 13) | class BaseMaskHead(BaseModule, metaclass=ABCMeta):
method __init__ (line 16) | def __init__(self, init_cfg: OptMultiConfig = None) -> None:
method loss_by_feat (line 20) | def loss_by_feat(self, *args, **kwargs):
method predict_by_feat (line 26) | def predict_by_feat(self, *args, **kwargs):
method loss (line 31) | def loss(self,
method predict (line 82) | def predict(self,
FILE: mmdet/models/dense_heads/boxinst_head.py
class BoxInstBboxHead (line 17) | class BoxInstBboxHead(CondInstBboxHead):
method __init__ (line 20) | def __init__(self, *args, **kwargs) -> None:
class BoxInstMaskHead (line 25) | class BoxInstMaskHead(CondInstMaskHead):
method __init__ (line 39) | def __init__(self,
method get_pairwise_affinity (line 50) | def get_pairwise_affinity(self, mask_logits: Tensor) -> Tensor:
method loss_by_feat (line 79) | def loss_by_feat(self, mask_preds: List[Tensor],
method _get_targets_single (line 155) | def _get_targets_single(self, mask_preds: Tensor,
FILE: mmdet/models/dense_heads/cascade_rpn_head.py
class AdaptiveConv (line 26) | class AdaptiveConv(BaseModule):
method __init__ (line 50) | def __init__(
method forward (line 89) | def forward(self, x: Tensor, offset: Tensor) -> Tensor:
class StageCascadeRPNHead (line 106) | class StageCascadeRPNHead(RPNHead):
method __init__ (line 120) | def __init__(self,
method _init_layers (line 159) | def _init_layers(self) -> None:
method forward_single (line 172) | def forward_single(self, x: Tensor, offset: Tensor) -> Tuple[Tensor]:
method forward (line 182) | def forward(
method _region_targets_single (line 191) | def _region_targets_single(self, flat_anchors: Tensor, valid_flags: Te...
method region_targets (line 270) | def region_targets(
method get_targets (line 360) | def get_targets(
method anchor_offset (line 423) | def anchor_offset(self, anchor_list: List[List[Tensor]],
method loss_by_feat_single (line 503) | def loss_by_feat_single(self, cls_score: Tensor, bbox_pred: Tensor,
method loss_by_feat (line 532) | def loss_by_feat(
method predict_by_feat (line 605) | def predict_by_feat(self,
method _predict_by_feat_single (line 657) | def _predict_by_feat_single(self,
method refine_bboxes (line 751) | def refine_bboxes(self, anchor_list: List[List[Tensor]],
method loss (line 769) | def loss(self, x: Tuple[Tensor], batch_data_samples: SampleList) -> dict:
method loss_and_predict (line 804) | def loss_and_predict(
method predict (line 856) | def predict(self,
class CascadeRPNHead (line 902) | class CascadeRPNHead(BaseDenseHead):
method __init__ (line 921) | def __init__(self,
method loss_by_feat (line 943) | def loss_by_feat(self):
method predict_by_feat (line 947) | def predict_by_feat(self):
method loss (line 951) | def loss(self, x: Tuple[Tensor], batch_data_samples: SampleList) -> dict:
method loss_and_predict (line 998) | def loss_and_predict(
method predict (line 1062) | def predict(self,
FILE: mmdet/models/dense_heads/centernet_head.py
class CenterNetHead (line 22) | class CenterNetHead(BaseDenseHead):
method __init__ (line 48) | def __init__(self,
method _build_head (line 75) | def _build_head(self, in_channels: int, feat_channels: int,
method init_weights (line 84) | def init_weights(self) -> None:
method forward (line 93) | def forward(self, x: Tuple[Tensor, ...]) -> Tuple[List[Tensor]]:
method forward_single (line 110) | def forward_single(self, x: Tensor) -> Tuple[Tensor, ...]:
method loss_by_feat (line 127) | def loss_by_feat(
method get_targets (line 201) | def get_targets(self, gt_bboxes: List[Tensor], gt_labels: List[Tensor],
method predict_by_feat (line 272) | def predict_by_feat(self,
method _predict_by_feat_single (line 321) | def _predict_by_feat_single(self,
method _decode_heatmap (line 384) | def _decode_heatmap(self,
method _bboxes_nms (line 435) | def _bboxes_nms(self, bboxes: Tensor, labels: Tensor,
FILE: mmdet/models/dense_heads/centernet_update_head.py
function _transpose (line 21) | def _transpose(tensor_list: List[Tensor],
class CenterNetUpdateHead (line 36) | class CenterNetUpdateHead(AnchorFreeHead):
method __init__ (line 71) | def __init__(self,
method _init_predictor (line 116) | def _init_predictor(self) -> None:
method forward (line 122) | def forward(self, x: Tuple[Tensor]) -> Tuple[List[Tensor], List[Tensor]]:
method forward_single (line 139) | def forward_single(self, x: Tensor, scale: Scale,
method loss_by_feat (line 165) | def loss_by_feat(
method get_targets (line 276) | def get_targets(
method _get_targets_single (line 331) | def _get_targets_single(self, gt_instances: InstanceData, points: Tensor,
method add_cls_pos_inds (line 406) | def add_cls_pos_inds(
method _create_heatmaps_from_dist (line 482) | def _create_heatmaps_from_dist(self, weighted_dist: Tensor,
method _get_center3x3_region_index_targets (line 497) | def _get_center3x3_region_index_targets(self,
FILE: mmdet/models/dense_heads/centripetal_head.py
class CentripetalHead (line 18) | class CentripetalHead(CornerHead):
method __init__ (line 55) | def __init__(self,
method _init_centripetal_layers (line 79) | def _init_centripetal_layers(self) -> None:
method _init_layers (line 139) | def _init_layers(self) -> None:
method init_weights (line 147) | def init_weights(self) -> None:
method forward_single (line 163) | def forward_single(self, x: Tensor, lvl_ind: int) -> List[Tensor]:
method loss_by_feat (line 213) | def loss_by_feat(
method loss_by_feat_single (line 298) | def loss_by_feat_single(self, tl_hmp: Tensor, br_hmp: Tensor,
method predict_by_feat (line 383) | def predict_by_feat(self,
FILE: mmdet/models/dense_heads/condinst_head.py
class CondInstBboxHead (line 29) | class CondInstBboxHead(FCOSHead):
method __init__ (line 42) | def __init__(self, *args, num_params: int = 169, **kwargs) -> None:
method _init_layers (line 46) | def _init_layers(self) -> None:
method forward_single (line 52) | def forward_single(self, x: Tensor, scale: Scale,
method loss_by_feat (line 89) | def loss_by_feat(
method get_targets (line 210) | def get_targets(
method _get_targets_single (line 276) | def _get_targets_single(
method get_positive_infos (line 394) | def get_positive_infos(self) -> InstanceList:
method predict_by_feat (line 457) | def predict_by_feat(self,
method _predict_by_feat_single (line 558) | def _predict_by_feat_single(self,
class MaskFeatModule (line 715) | class MaskFeatModule(BaseModule):
method __init__ (line 739) | def __init__(self,
method _init_layers (line 766) | def _init_layers(self) -> None:
method init_weights (line 800) | def init_weights(self) -> None:
method forward (line 807) | def forward(self, x: Tuple[Tensor]) -> Tensor:
class CondInstMaskHead (line 838) | class CondInstMaskHead(BaseMaskHead):
method __init__ (line 859) | def __init__(self,
method _init_layers (line 887) | def _init_layers(self) -> None:
method parse_dynamic_params (line 905) | def parse_dynamic_params(
method dynamic_conv_forward (line 928) | def dynamic_conv_forward(self, features: Tensor, weights: List[Tensor],
method forward (line 939) | def forward(self, x: tuple, positive_infos: InstanceList) -> tuple:
method forward_single (line 956) | def forward_single(self, mask_feat: Tensor,
method loss_by_feat (line 989) | def loss_by_feat(self, mask_preds: List[Tensor],
method _get_targets_single (line 1038) | def _get_targets_single(self, mask_preds: Tensor,
method predict_by_feat (line 1127) | def predict_by_feat(self,
method _predict_by_feat_single (line 1177) | def _predict_by_feat_single(self,
FILE: mmdet/models/dense_heads/conditional_detr_head.py
class ConditionalDETRHead (line 17) | class ConditionalDETRHead(DETRHead):
method init_weights (line 24) | def init_weights(self):
method forward (line 33) | def forward(self, hidden_states: Tensor,
method loss (line 69) | def loss(self, hidden_states: Tensor, references: Tensor,
method loss_and_predict (line 97) | def loss_and_predict(
method predict (line 134) | def predict(self,
FILE: mmdet/models/dense_heads/corner_head.py
class BiCornerPool (line 24) | class BiCornerPool(BaseModule):
method __init__ (line 38) | def __init__(self,
method forward (line 68) | def forward(self, x: Tensor) -> Tensor:
class CornerHead (line 89) | class CornerHead(BaseDenseHead):
method __init__ (line 124) | def __init__(self,
method _make_layers (line 163) | def _make_layers(self,
method _init_corner_kpt_layers (line 173) | def _init_corner_kpt_layers(self) -> None:
method _init_corner_emb_layers (line 211) | def _init_corner_emb_layers(self) -> None:
method _init_layers (line 229) | def _init_layers(self) -> None:
method init_weights (line 238) | def init_weights(self) -> None:
method forward (line 256) | def forward(self, feats: Tuple[Tensor]) -> tuple:
method forward_single (line 288) | def forward_single(self,
method get_targets (line 337) | def get_targets(self,
method loss_by_feat (line 525) | def loss_by_feat(
method loss_by_feat_single (line 596) | def loss_by_feat_single(self, tl_hmp: Tensor, br_hmp: Tensor,
method predict_by_feat (line 677) | def predict_by_feat(self,
method _predict_by_feat_single (line 739) | def _predict_by_feat_single(self,
method _bboxes_nms (line 830) | def _bboxes_nms(self, bboxes: Tensor, labels: Tensor,
method _decode_heatmap (line 850) | def _decode_heatmap(self,
FILE: mmdet/models/dense_heads/dab_detr_head.py
class DABDETRHead (line 17) | class DABDETRHead(ConditionalDETRHead):
method _init_layers (line 25) | def _init_layers(self) -> None:
method init_weights (line 32) | def init_weights(self) -> None:
method forward (line 39) | def forward(self, hidden_states: Tensor,
method predict (line 72) | def predict(self,
FILE: mmdet/models/dense_heads/ddod_head.py
class DDODHead (line 23) | class DDODHead(AnchorHead):
method __init__ (line 44) | def __init__(self,
method _init_layers (line 69) | def _init_layers(self) -> None:
method init_weights (line 116) | def init_weights(self) -> None:
method forward (line 127) | def forward(self, x: Tuple[Tensor]) -> Tuple[List[Tensor]]:
method forward_single (line 149) | def forward_single(self, x: Tensor, scale: Scale) -> Sequence[Tensor]:
method loss_cls_by_feat_single (line 179) | def loss_cls_by_feat_single(self, cls_score: Tensor, labels: Tensor,
method loss_reg_by_feat_single (line 211) | def loss_reg_by_feat_single(self, anchors: Tensor, bbox_pred: Tensor,
method calc_reweight_factor (line 292) | def calc_reweight_factor(self, labels_list: List[Tensor]) -> List[float]:
method loss_by_feat (line 311) | def loss_by_feat(
method process_predictions_and_anchors (line 421) | def process_predictions_and_anchors(
method get_cls_targets (line 498) | def get_cls_targets(self,
method get_reg_targets (line 573) | def get_reg_targets(self,
method _get_targets_single (line 648) | def _get_targets_single(self,
method get_num_level_anchors_inside (line 776) | def get_num_level_anchors_inside(self, num_level_anchors: List[int],
FILE: mmdet/models/dense_heads/deformable_detr_head.py
class DeformableDETRHead (line 19) | class DeformableDETRHead(DETRHead):
method __init__ (line 38) | def __init__(self,
method _init_layers (line 50) | def _init_layers(self) -> None:
method init_weights (line 72) | def init_weights(self) -> None:
method forward (line 85) | def forward(self, hidden_states: Tensor,
method loss (line 143) | def loss(self, hidden_states: Tensor, references: List[Tensor],
method loss_by_feat (line 189) | def loss_by_feat(
method predict (line 252) | def predict(self,
method predict_by_feat (line 293) | def predict_by_feat(self,
FILE: mmdet/models/dense_heads/dense_test_mixins.py
class BBoxTestMixin (line 17) | class BBoxTestMixin(object):
method simple_test_bboxes (line 20) | def simple_test_bboxes(self, feats, img_metas, rescale=False):
method aug_test_bboxes (line 53) | def aug_test_bboxes(self, feats, img_metas, rescale=False):
method aug_test_rpn (line 135) | def aug_test_rpn(self, feats, img_metas):
method async_simple_test_rpn (line 178) | async def async_simple_test_rpn(self, x, img_metas):
method merge_aug_bboxes (line 188) | def merge_aug_bboxes(self, aug_bboxes, aug_scores, img_metas):
FILE: mmdet/models/dense_heads/detr_head.py
class DETRHead (line 22) | class DETRHead(BaseModule):
method __init__ (line 51) | def __init__(
method _init_layers (line 120) | def _init_layers(self) -> None:
method forward (line 138) | def forward(self, hidden_states: Tensor) -> Tuple[Tensor]:
method loss (line 162) | def loss(self, hidden_states: Tensor,
method loss_by_feat (line 189) | def loss_by_feat(
method loss_by_feat_single (line 249) | def loss_by_feat_single(self, cls_scores: Tensor, bbox_preds: Tensor,
method get_targets (line 327) | def get_targets(self, cls_scores_list: List[Tensor],
method _get_targets_single (line 368) | def _get_targets_single(self, cls_score: Tensor, bbox_pred: Tensor,
method loss_and_predict (line 441) | def loss_and_predict(
method predict (line 476) | def predict(self,
method predict_by_feat (line 509) | def predict_by_feat(self,
method _predict_by_feat_single (line 554) | def _predict_by_feat_single(self,
FILE: mmdet/models/dense_heads/dino_head.py
class DINOHead (line 17) | class DINOHead(DeformableDETRHead):
method loss (line 28) | def loss(self, hidden_states: Tensor, references: List[Tensor],
method loss_by_feat (line 75) | def loss_by_feat(
method loss_dn (line 166) | def loss_dn(self, all_layers_denoising_cls_scores: Tensor,
method _loss_dn_single (line 203) | def _loss_dn_single(self, dn_cls_scores: Tensor, dn_bbox_preds: Tensor,
method get_dn_targets (line 288) | def get_dn_targets(self, batch_gt_instances: InstanceList,
method _get_dn_targets_single (line 325) | def _get_dn_targets_single(self, gt_instances: InstanceData,
method split_outputs (line 397) | def split_outputs(all_layers_cls_scores: Tensor,
FILE: mmdet/models/dense_heads/embedding_rpn_head.py
class EmbeddingRPNHead (line 17) | class EmbeddingRPNHead(BaseModule):
method __init__ (line 32) | def __init__(self,
method _init_layers (line 45) | def _init_layers(self) -> None:
method init_weights (line 51) | def init_weights(self) -> None:
method _decode_init_proposals (line 61) | def _decode_init_proposals(self, x: List[Tensor],
method loss (line 109) | def loss(self, *args, **kwargs):
method predict (line 116) | def predict(self, x: List[Tensor], batch_data_samples: SampleList,
method loss_and_predict (line 124) | def loss_and_predict(self, x: List[Tensor], batch_data_samples: Sample...
FILE: mmdet/models/dense_heads/fcos_head.py
class FCOSHead (line 20) | class FCOSHead(AnchorFreeHead):
method __init__ (line 68) | def __init__(self,
method _init_layers (line 115) | def _init_layers(self) -> None:
method forward (line 121) | def forward(
method forward_single (line 144) | def forward_single(self, x: Tensor, scale: Scale,
method loss_by_feat (line 179) | def loss_by_feat(
method get_targets (line 285) | def get_targets(
method _get_targets_single (line 347) | def _get_targets_single(
method centerness_target (line 436) | def centerness_target(self, pos_bbox_targets: Tensor) -> Tensor:
FILE: mmdet/models/dense_heads/fovea_head.py
class FeatureAlign (line 21) | class FeatureAlign(BaseModule):
method __init__ (line 39) | def __init__(
method forward (line 63) | def forward(self, x: Tensor, shape: Tensor) -> Tensor:
class FoveaHead (line 79) | class FoveaHead(AnchorFreeHead):
method __init__ (line 97) | def __init__(self,
method _init_layers (line 127) | def _init_layers(self) -> None:
method forward_single (line 168) | def forward_single(self, x: Tensor) -> Tuple[Tensor, Tensor]:
method loss_by_feat (line 190) | def loss_by_feat(
method get_targets (line 265) | def get_targets(
method _get_targets_single (line 305) | def _get_targets_single(self,
method _predict_by_feat_single (line 386) | def _predict_by_feat_single(self,
method _bbox_decode (line 480) | def _bbox_decode(self, priors: Tensor, bbox_pred: Tensor, base_len: int,
FILE: mmdet/models/dense_heads/free_anchor_retina_head.py
class FreeAnchorRetinaHead (line 19) | class FreeAnchorRetinaHead(RetinaHead):
method __init__ (line 42) | def __init__(self,
method loss_by_feat (line 66) | def loss_by_feat(
method positive_loss_single (line 145) | def positive_loss_single(self, cls_prob: Tensor, bbox_pred: Tensor,
method positive_bag_loss (line 259) | def positive_bag_loss(self, matched_cls_prob: Tensor,
method negative_bag_loss (line 287) | def negative_bag_loss(self, cls_prob: Tensor, box_prob: Tensor) -> Ten...
FILE: mmdet/models/dense_heads/fsaf_head.py
class FSAFHead (line 19) | class FSAFHead(RetinaHead):
method __init__ (line 47) | def __init__(self,
method forward_single (line 71) | def forward_single(self, x: Tensor) -> Tuple[Tensor, Tensor]:
method _get_targets_single (line 89) | def _get_targets_single(self,
method loss_by_feat (line 209) | def loss_by_feat(
method calculate_pos_recall (line 337) | def calculate_pos_recall(self, cls_scores: List[Tensor],
method collect_loss_level_single (line 373) | def collect_loss_level_single(self, cls_loss: Tensor, reg_loss: Tensor,
method reweight_loss_single (line 405) | def reweight_loss_single(self, cls_loss: Tensor, reg_loss: Tensor,
FILE: mmdet/models/dense_heads/ga_retina_head.py
class GARetinaHead (line 15) | class GARetinaHead(GuidedAnchorHead):
method __init__ (line 18) | def __init__(self,
method _init_layers (line 52) | def _init_layers(self) -> None:
method forward_single (line 99) | def forward_single(self, x: Tensor) -> Tuple[Tensor]:
FILE: mmdet/models/dense_heads/ga_rpn_head.py
class GARPNHead (line 18) | class GARPNHead(GuidedAnchorHead):
method __init__ (line 21) | def __init__(self,
method _init_layers (line 40) | def _init_layers(self) -> None:
method forward_single (line 46) | def forward_single(self, x: Tensor) -> Tuple[Tensor]:
method loss_by_feat (line 55) | def loss_by_feat(
method _predict_by_feat_single (line 103) | def _predict_by_feat_single(self,
FILE: mmdet/models/dense_heads/gfl_head.py
class Integral (line 23) | class Integral(nn.Module):
method __init__ (line 36) | def __init__(self, reg_max: int = 16) -> None:
method forward (line 42) | def forward(self, x: Tensor) -> Tensor:
class GFLHead (line 60) | class GFLHead(AnchorHead):
method __init__ (line 98) | def __init__(self,
method _init_layers (line 141) | def _init_layers(self) -> None:
method forward (line 174) | def forward(self, x: Tuple[Tensor]) -> Tuple[List[Tensor]]:
method forward_single (line 193) | def forward_single(self, x: Tensor, scale: Scale) -> Sequence[Tensor]:
method anchor_center (line 220) | def anchor_center(self, anchors: Tensor) -> Tensor:
method loss_by_feat_single (line 233) | def loss_by_feat_single(self, anchors: Tensor, cls_score: Tensor,
method loss_by_feat (line 327) | def loss_by_feat(
method _predict_by_feat_single (line 396) | def _predict_by_feat_single(self,
method get_targets (line 492) | def get_targets(self,
method _get_targets_single (line 550) | def _get_targets_single(self,
method get_num_level_anchors_inside (line 659) | def get_num_level_anchors_inside(self, num_level_anchors: List[int],
FILE: mmdet/models/dense_heads/guided_anchor_head.py
class FeatureAdaption (line 21) | class FeatureAdaption(BaseModule):
method __init__ (line 37) | def __init__(
method forward (line 61) | def forward(self, x: Tensor, shape: Tensor) -> Tensor:
class GuidedAnchorHead (line 68) | class GuidedAnchorHead(AnchorHead):
method __init__ (line 108) | def __init__(
method _init_layers (line 219) | def _init_layers(self) -> None:
method forward_single (line 236) | def forward_single(self, x: Tensor) -> Tuple[Tensor]:
method forward (line 250) | def forward(self, x: List[Tensor]) -> Tuple[List[Tensor]]:
method get_sampled_approxs (line 254) | def get_sampled_approxs(self,
method get_anchors (line 307) | def get_anchors(self,
method _get_guided_anchors_single (line 359) | def _get_guided_anchors_single(
method ga_loc_targets (line 395) | def ga_loc_targets(self, batch_gt_instances: InstanceList,
method _ga_shape_target_single (line 500) | def _ga_shape_target_single(self,
method ga_shape_targets (line 577) | def ga_shape_targets(self,
method loss_shape_single (line 648) | def loss_shape_single(self, shape_pred: Tensor, bbox_anchors: Tensor,
method loss_loc_single (line 671) | def loss_loc_single(self, loc_pred: Tensor, loc_target: Tensor,
method loss_by_feat (line 681) | def loss_by_feat(
method predict_by_feat (line 803) | def predict_by_feat(self,
method _predict_by_feat_single (line 881) | def _predict_by_feat_single(self,
FILE: mmdet/models/dense_heads/lad_head.py
class LADHead (line 16) | class LADHead(PAAHead):
method get_label_assignment (line 20) | def get_label_assignment(
method loss (line 124) | def loss(self, x: List[Tensor], label_assignment_results: tuple,
method loss_by_feat (line 152) | def loss_by_feat(self,
FILE: mmdet/models/dense_heads/ld_head.py
class LDHead (line 16) | class LDHead(GFLHead):
method __init__ (line 31) | def __init__(self,
method loss_by_feat_single (line 44) | def loss_by_feat_single(self, anchors: Tensor, cls_score: Tensor,
method loss (line 156) | def loss(self, x: List[Tensor], out_teacher: Tuple[Tensor],
method loss_by_feat (line 185) | def loss_by_feat(
FILE: mmdet/models/dense_heads/mask2former_head.py
class Mask2FormerHead (line 24) | class Mask2FormerHead(MaskFormerHead):
method __init__ (line 62) | def __init__(self,
method init_weights (line 158) | def init_weights(self) -> None:
method _get_targets_single (line 169) | def _get_targets_single(self, cls_score: Tensor, mask_pred: Tensor,
method _loss_by_feat_single (line 249) | def _loss_by_feat_single(self, cls_scores: Tensor, mask_preds: Tensor,
method _forward_head (line 337) | def _forward_head(self, decoder_out: Tensor, mask_feature: Tensor,
method forward (line 379) | def forward(self, x: List[Tensor],
FILE: mmdet/models/dense_heads/maskformer_head.py
class MaskFormerHead (line 23) | class MaskFormerHead(AnchorFreeHead):
method __init__ (line 59) | def __init__(self,
method init_weights (line 134) | def init_weights(self) -> None:
method preprocess_gt (line 144) | def preprocess_gt(
method get_targets (line 192) | def get_targets(
method _get_targets_single (line 254) | def _get_targets_single(self, cls_score: Tensor, mask_pred: Tensor,
method loss_by_feat (line 324) | def loss_by_feat(self, all_cls_scores: Tensor, all_mask_preds: Tensor,
method _loss_by_feat_single (line 367) | def _loss_by_feat_single(self, cls_scores: Tensor, mask_preds: Tensor,
method forward (line 455) | def forward(self, x: Tuple[Tensor],
method loss (line 524) | def loss(
method predict (line 566) | def predict(self, x: Tuple[Tensor],
FILE: mmdet/models/dense_heads/nasfcos_head.py
class NASFCOSHead (line 13) | class NASFCOSHead(FCOSHead):
method __init__ (line 51) | def __init__(self,
method _init_layers (line 73) | def _init_layers(self) -> None:
FILE: mmdet/models/dense_heads/paa_head.py
class PAAHead (line 25) | class PAAHead(ATSSHead):
method __init__ (line 53) | def __init__(self,
method loss_by_feat (line 65) | def loss_by_feat(
method get_pos_loss (line 180) | def get_pos_loss(self, anchors: List[Tensor], cls_score: Tensor,
method paa_reassign (line 238) | def paa_reassign(self, pos_losses: Tensor, label: Tensor,
method gmm_separation_scheme (line 349) | def gmm_separation_scheme(self, gmm_assignment: Tensor, scores: Tensor,
method get_targets (line 385) | def get_targets(self,
method _get_targets_single (line 472) | def _get_targets_single(self,
method predict_by_feat (line 494) | def predict_by_feat(self,
method _predict_by_feat_single (line 519) | def _predict_by_feat_single(self,
method _bbox_post_process (line 604) | def _bbox_post_process(self,
method score_voting (line 666) | def score_voting(self, det_bboxes: Tensor, det_labels: Tensor,
FILE: mmdet/models/dense_heads/pisa_retinanet_head.py
class PISARetinaHead (line 15) | class PISARetinaHead(RetinaHead):
method loss_by_feat (line 25) | def loss_by_feat(
FILE: mmdet/models/dense_heads/pisa_ssd_head.py
class PISASSDHead (line 16) | class PISASSDHead(SSDHead):
method loss_by_feat (line 52) | def loss_by_feat(
FILE: mmdet/models/dense_heads/reppoints_head.py
class RepPointsHead (line 23) | class RepPointsHead(AnchorFreeHead):
method __init__ (line 49) | def __init__(self,
method _init_layers (line 140) | def _init_layers(self) -> None:
method points2bbox (line 184) | def points2bbox(self, pts: Tensor, y_first: bool = True) -> Tensor:
method gen_grid_from_reg (line 239) | def gen_grid_from_reg(self, reg: Tensor,
method forward (line 277) | def forward(self, feats: Tuple[Tensor]) -> Tuple[Tensor]:
method forward_single (line 280) | def forward_single(self, x: Tensor) -> Tuple[Tensor]:
method get_points (line 326) | def get_points(self, featmap_sizes: List[Tuple[int]],
method centers_to_bboxes (line 355) | def centers_to_bboxes(self, point_list: List[Tensor]) -> List[Tensor]:
method offset_to_pts (line 373) | def offset_to_pts(self, center_list: List[Tensor],
method _get_targets_single (line 395) | def _get_targets_single(self,
method get_targets (line 493) | def get_targets(self,
method loss_by_feat_single (line 587) | def loss_by_feat_single(self, cls_score: Tensor, pts_pred_init: Tensor,
method loss_by_feat (line 656) | def loss_by_feat(
method _predict_by_feat_single (line 768) | def _predict_by_feat_single(self,
method _bbox_decode (line 865) | def _bbox_decode(self, points: Tensor, bbox_pred: Tensor, stride: int,
FILE: mmdet/models/dense_heads/retina_head.py
class RetinaHead (line 10) | class RetinaHead(AnchorHead):
method __init__ (line 29) | def __init__(self,
method _init_layers (line 64) | def _init_layers(self):
method forward_single (line 99) | def forward_single(self, x):
FILE: mmdet/models/dense_heads/retina_sepbn_head.py
class RetinaSepBNHead (line 15) | class RetinaSepBNHead(AnchorHead):
method __init__ (line 23) | def __init__(self,
method _init_layers (line 44) | def _init_layers(self) -> None:
method init_weights (line 86) | def init_weights(self) -> None:
method forward (line 97) | def forward(self, feats: Tuple[Tensor]) -> tuple:
FILE: mmdet/models/dense_heads/rpn_head.py
class RPNHead (line 22) | class RPNHead(AnchorHead):
method __init__ (line 35) | def __init__(self,
method _init_layers (line 50) | def _init_layers(self) -> None:
method forward_single (line 80) | def forward_single(self, x: Tensor) -> Tuple[Tensor, Tensor]:
method loss_by_feat (line 99) | def loss_by_feat(self,
method _predict_by_feat_single (line 134) | def _predict_by_feat_single(self,
method _bbox_post_process (line 236) | def _bbox_post_process(self,
FILE: mmdet/models/dense_heads/rtmdet_head.py
class RTMDetHead (line 22) | class RTMDetHead(ATSSHead):
method __init__ (line 35) | def __init__(self,
method _init_layers (line 47) | def _init_layers(self):
method init_weights (line 94) | def init_weights(self) -> None:
method forward (line 107) | def forward(self, feats: Tuple[Tensor, ...]) -> tuple:
method loss_by_feat_single (line 149) | def loss_by_feat_single(self, cls_score: Tensor, bbox_pred: Tensor,
method loss_by_feat (line 212) | def loss_by_feat(self,
method get_targets (line 290) | def get_targets(self,
method _get_targets_single (line 383) | def _get_targets_single(self,
method get_anchors (line 492) | def get_anchors(self,
class RTMDetSepBNHead (line 530) | class RTMDetSepBNHead(RTMDetHead):
method __init__ (line 548) | def __init__(self,
method _init_layers (line 570) | def _init_layers(self) -> None:
method init_weights (line 635) | def init_weights(self) -> None:
method forward (line 650) | def forward(self, feats: Tuple[Tensor, ...]) -> tuple:
FILE: mmdet/models/dense_heads/rtmdet_ins_head.py
class RTMDetInsHead (line 27) | class RTMDetInsHead(RTMDetHead):
method __init__ (line 42) | def __init__(self,
method _init_layers (line 61) | def _init_layers(self) -> None:
method forward (line 111) | def forward(self, feats: Tuple[Tensor, ...]) -> tuple:
method predict_by_feat (line 167) | def predict_by_feat(self,
method _predict_by_feat_single (line 270) | def _predict_by_feat_single(self,
method _bbox_mask_post_process (line 425) | def _bbox_mask_post_process(
method parse_dynamic_params (line 521) | def parse_dynamic_params(self, flatten_kernels: Tensor) -> tuple:
method _mask_predict_by_feat_single (line 542) | def _mask_predict_by_feat_single(self, mask_feat: Tensor, kernels: Ten...
method loss_mask_by_feat (line 591) | def loss_mask_by_feat(self, mask_feats: Tensor, flatten_kernels: Tensor,
method loss_by_feat (line 661) | def loss_by_feat(self,
class MaskFeatModule (line 756) | class MaskFeatModule(BaseModule):
method __init__ (line 775) | def __init__(
method forward (line 803) | def forward(self, features: Tuple[Tensor, ...]) -> Tensor:
class RTMDetInsSepBNHead (line 819) | class RTMDetInsSepBNHead(RTMDetInsHead):
method __init__ (line 835) | def __init__(self,
method _init_layers (line 854) | def _init_layers(self) -> None:
method init_weights (line 964) | def init_weights(self) -> None:
method forward (line 980) | def forward(self, feats: Tuple[Tensor, ...]) -> tuple:
FILE: mmdet/models/dense_heads/sabl_retina_head.py
class SABLRetinaHead (line 23) | class SABLRetinaHead(BaseDenseHead):
method __init__ (line 64) | def __init__(
method _init_layers (line 158) | def _init_layers(self) -> None:
method forward_single (line 189) | def forward_single(self, x: Tensor) -> Tuple[Tensor, Tensor]:
method forward (line 202) | def forward(self, feats: List[Tensor]) -> Tuple[List[Tensor]]:
method get_anchors (line 205) | def get_anchors(
method get_targets (line 231) | def get_targets(self,
method _get_targets_single (line 325) | def _get_targets_single(self,
method loss_by_feat_single (line 440) | def loss_by_feat_single(self, cls_score: Tensor, bbox_pred: Tensor,
method loss_by_feat (line 493) | def loss_by_feat(
method predict_by_feat (line 560) | def predict_by_feat(self,
method _predict_by_feat_single (line 631) | def _predict_by_feat_single(self,
FILE: mmdet/models/dense_heads/solo_head.py
class SOLOHead (line 22) | class SOLOHead(BaseMaskHead):
method __init__ (line 55) | def __init__(
method _init_layers (line 116) | def _init_layers(self) -> None:
method resize_feats (line 147) | def resize_feats(self, x: Tuple[Tensor]) -> List[Tensor]:
method forward (line 170) | def forward(self, x: Tuple[Tensor]) -> tuple:
method loss_by_feat (line 232) | def loss_by_feat(self, mlvl_mask_preds: List[Tensor],
method _get_targets_single (line 311) | def _get_targets_single(self,
method predict_by_feat (line 460) | def predict_by_feat(self, mlvl_mask_preds: List[Tensor],
method _predict_by_feat_single (line 512) | def _predict_by_feat_single(self,
class DecoupledSOLOHead (line 624) | class DecoupledSOLOHead(SOLOHead):
method __init__ (line 633) | def __init__(self,
method _init_layers (line 656) | def _init_layers(self) -> None:
method forward (line 700) | def forward(self, x: Tuple[Tensor]) -> Tuple:
method loss_by_feat (line 780) | def loss_by_feat(self, mlvl_mask_preds_x: List[Tensor],
method _get_targets_single (line 874) | def _get_targets_single(self,
method predict_by_feat (line 911) | def predict_by_feat(self, mlvl_mask_preds_x: List[Tensor],
method _predict_by_feat_single (line 974) | def _predict_by_feat_single(self,
class DecoupledSOLOLightHead (line 1111) | class DecoupledSOLOLightHead(DecoupledSOLOHead):
method __init__ (line 1121) | def __init__(self,
method _init_layers (line 1147) | def _init_layers(self) -> None:
method forward (line 1190) | def forward(self, x: Tuple[Tensor]) -> Tuple:
FILE: mmdet/models/dense_heads/solov2_head.py
class MaskFeatModule (line 23) | class MaskFeatModule(BaseModule):
method __init__ (line 46) | def __init__(
method _init_layers (line 73) | def _init_layers(self) -> None:
method forward (line 141) | def forward(self, x: Tuple[Tensor]) -> Tensor:
class SOLOV2Head (line 169) | class SOLOV2Head(SOLOHead):
method __init__ (line 185) | def __init__(self,
method _init_layers (line 226) | def _init_layers(self) -> None:
method forward (line 269) | def forward(self, x):
method _get_targets_single (line 331) | def _get_targets_single(self,
method loss_by_feat (line 496) | def loss_by_feat(self, mlvl_kernel_preds: List[Tensor],
method predict_by_feat (line 609) | def predict_by_feat(self, mlvl_kernel_preds: List[Tensor],
method _predict_by_feat_single (line 672) | def _predict_by_feat_single(self,
FILE: mmdet/models/dense_heads/ssd_head.py
class SSDHead (line 20) | class SSDHead(AnchorHead):
method __init__ (line 56) | def __init__(
method _init_layers (line 119) | def _init_layers(self) -> None:
method forward (line 190) | def forward(self, x: Tuple[Tensor]) -> Tuple[List[Tensor], List[Tensor]]:
method loss_by_feat_single (line 215) | def loss_by_feat_single(self, cls_score: Tensor, bbox_pred: Tensor,
method loss_by_feat (line 279) | def loss_by_feat(
FILE: mmdet/models/dense_heads/tood_head.py
class TaskDecomposition (line 25) | class TaskDecomposition(nn.Module):
method __init__ (line 39) | def __init__(self,
method init_weights (line 69) | def init_weights(self) -> None:
method forward (line 76) | def forward(self,
class TOODHead (line 105) | class TOODHead(ATSSHead):
method __init__ (line 131) | def __init__(self,
method _init_layers (line 161) | def _init_layers(self) -> None:
method init_weights (line 210) | def init_weights(self) -> None:
method forward (line 229) | def forward(self, feats: Tuple[Tensor]) -> Tuple[List[Tensor]]:
method deform_sampling (line 303) | def deform_sampling(self, feat: Tensor, offset: Tensor) -> Tensor:
method anchor_center (line 316) | def anchor_center(self, anchors: Tensor) -> Tensor:
method loss_by_feat_single (line 329) | def loss_by_feat_single(self, anchors: Tensor, cls_score: Tensor,
method loss_by_feat (line 405) | def loss_by_feat(
method _predict_by_feat_single (line 484) | def _predict_by_feat_single(self,
method get_targets (line 578) | def get_targets(self,
method _get_targets_single (line 691) | def _get_targets_single(self,
FILE: mmdet/models/dense_heads/vfnet_head.py
class VFNetHead (line 25) | class VFNetHead(ATSSHead, FCOSHead):
method __init__ (line 75) | def __init__(self,
method _init_layers (line 187) | def _init_layers(self) -> None:
method forward (line 222) | def forward(self, x: Tuple[Tensor]) -> Tuple[List[Tensor]]:
method forward_single (line 245) | def forward_single(self, x: Tensor, scale: Scale, scale_refine: Scale,
method star_dcn_offset (line 307) | def star_dcn_offset(self, bbox_pred: Tensor, gradient_mul: float,
method loss_by_feat (line 349) | def loss_by_feat(
method get_targets (line 502) | def get_targets(
method _get_targets_single (line 544) | def _get_targets_single(self, *args, **kwargs):
method get_fcos_targets (line 551) | def get_fcos_targets(self, points: List[Tensor],
method get_anchors (line 577) | def get_anchors(self,
method get_atss_targets (line 611) | def get_atss_targets(
method transform_bbox_targets (line 687) | def transform_bbox_targets(self, decoded_bboxes: List[Tensor],
method _load_from_state_dict (line 715) | def _load_from_state_dict(self, state_dict: dict, prefix: str,
FILE: mmdet/models/dense_heads/yolact_head.py
class YOLACTHead (line 25) | class YOLACTHead(AnchorHead):
method __init__ (line 57) | def __init__(self,
method _init_layers (line 98) | def _init_layers(self) -> None:
method forward_single (line 126) | def forward_single(self, x: Tensor) -> tuple:
method loss_by_feat (line 149) | def loss_by_feat(
method OHEMloss_by_feat_single (line 264) | def OHEMloss_by_feat_single(self, cls_score: Tensor, bbox_pred: Tensor,
method get_positive_infos (line 327) | def get_positive_infos(self) -> InstanceList:
method predict_by_feat (line 359) | def predict_by_feat(self,
method _predict_by_feat_single (line 421) | def _predict_by_feat_single(self,
method _bbox_post_process (line 526) | def _bbox_post_process(self,
class YOLACTProtonet (line 589) | class YOLACTProtonet(BaseMaskHead):
method __init__ (line 618) | def __init__(
method _init_layers (line 659) | def _init_layers(self) -> None:
method forward (line 695) | def forward(self, x: tuple, positive_infos: InstanceList) -> tuple:
method loss_by_feat (line 736) | def loss_by_feat(self, mask_preds: List[Tensor], segm_preds: List[Tens...
method _get_targets_single (line 824) | def _get_targets_single(self, mask_preds: Tensor, segm_pred: Tensor,
method crop_mask_preds (line 913) | def crop_mask_preds(self, mask_preds: List[Tensor],
method crop_single (line 941) | def crop_single(self,
method sanitize_coordinates (line 979) | def sanitize_coordinates(self,
method predict_by_feat (line 1016) | def predict_by_feat(self,
method _predict_by_feat_single (line 1070) | def _predict_by_feat_single(self,
class SegmentationModule (line 1125) | class SegmentationModule(BaseModule):
method __init__ (line 1139) | def __init__(
method _init_layers (line 1153) | def _init_layers(self) -> None:
method forward (line 1158) | def forward(self, x: Tensor) -> Tensor:
class InterpolateModule (line 1172) | class InterpolateModule(BaseModule):
method __init__ (line 1178) | def __init__(self, *args, init_cfg=None, **kwargs) -> None:
method forward (line 1183) | def forward(self, x: Tensor) -> Tensor:
FILE: mmdet/models/dense_heads/yolo_head.py
class YOLOV3Head (line 25) | class YOLOV3Head(BaseDenseHead):
method __init__ (line 56) | def __init__(self,
method num_levels (line 127) | def num_levels(self) -> int:
method num_attrib (line 132) | def num_attrib(self) -> int:
method _init_layers (line 138) | def _init_layers(self) -> None:
method init_weights (line 157) | def init_weights(self) -> None:
method forward (line 174) | def forward(self, x: Tuple[Tensor, ...]) -> tuple:
method predict_by_feat (line 196) | def predict_by_feat(self,
method loss_by_feat (line 289) | def loss_by_feat(
method loss_by_feat_single (line 344) | def loss_by_feat_single(self, pred_map: Tensor, target_map: Tensor,
method get_targets (line 391) | def get_targets(self, anchor_list: List[List[Tensor]],
method _get_targets_single (line 428) | def _get_targets_single(self, anchors: List[Tensor],
method responsible_flags (line 493) | def responsible_flags(self, featmap_sizes: List[tuple], gt_bboxes: Ten...
FILE: mmdet/models/dense_heads/yolof_head.py
class YOLOFHead (line 21) | class YOLOFHead(AnchorHead):
method __init__ (line 35) | def __init__(self,
method _init_layers (line 48) | def _init_layers(self) -> None:
method init_weights (line 88) | def init_weights(self) -> None:
method forward_single (line 99) | def forward_single(self, x: Tensor) -> Tuple[Tensor, Tensor]:
method loss_by_feat (line 129) | def loss_by_feat(
method get_targets (line 213) | def get_targets(self,
method _get_targets_single (line 297) | def _get_targets_single(self,
FILE: mmdet/models/dense_heads/yolox_head.py
class YOLOXHead (line 26) | class YOLOXHead(BaseDenseHead):
method __init__ (line 65) | def __init__(
method _init_layers (line 143) | def _init_layers(self) -> None:
method _build_stacked_convs (line 158) | def _build_stacked_convs(self) -> nn.Sequential:
method _build_predictor (line 182) | def _build_predictor(self) -> Tuple[nn.Module, nn.Module, nn.Module]:
method init_weights (line 189) | def init_weights(self) -> None:
method forward_single (line 199) | def forward_single(self, x: Tensor, cls_convs: nn.Module,
method forward (line 214) | def forward(self, x: Tuple[Tensor]) -> Tuple[List]:
method predict_by_feat (line 231) | def predict_by_feat(self,
method _bbox_decode (line 326) | def _bbox_decode(self, priors: Tensor, bbox_preds: Tensor) -> Tensor:
method _bbox_post_process (line 351) | def _bbox_post_process(self,
method loss_by_feat (line 399) | def loss_by_feat(
method _get_targets_single (line 522) | def _get_targets_single(
method _get_l1_target (line 609) | def _get_l1_target(self,
FILE: mmdet/models/detectors/atss.py
class ATSS (line 8) | class ATSS(SingleStageDetector):
method __init__ (line 26) | def __init__(self,
FILE: mmdet/models/detectors/autoassign.py
class AutoAssign (line 8) | class AutoAssign(SingleStageDetector):
method __init__ (line 28) | def __init__(self,
FILE: mmdet/models/detectors/base.py
class BaseDetector (line 17) | class BaseDetector(BaseModel, metaclass=ABCMeta):
method __init__ (line 28) | def __init__(self,
method with_neck (line 35) | def with_neck(self) -> bool:
method with_shared_head (line 42) | def with_shared_head(self) -> bool:
method with_bbox (line 47) | def with_bbox(self) -> bool:
method with_mask (line 53) | def with_mask(self) -> bool:
method forward (line 58) | def forward(self,
method loss (line 102) | def loss(self, batch_inputs: Tensor,
method predict (line 108) | def predict(self, batch_inputs: Tensor,
method _forward (line 115) | def _forward(self,
method extract_feat (line 126) | def extract_feat(self, batch_inputs: Tensor):
method add_pred_to_datasample (line 130) | def add_pred_to_datasample(self, data_samples: SampleList,
FILE: mmdet/models/detectors/base_detr.py
class DetectionTransformer (line 14) | class DetectionTransformer(BaseDetector, metaclass=ABCMeta):
method __init__ (line 48) | def __init__(self,
method _init_layers (line 80) | def _init_layers(self) -> None:
method loss (line 84) | def loss(self, batch_inputs: Tensor,
method predict (line 106) | def predict(self,
method _forward (line 144) | def _forward(
method forward_transformer (line 167) | def forward_transformer(self,
method extract_feat (line 227) | def extract_feat(self, batch_inputs: Tensor) -> Tuple[Tensor]:
method pre_transformer (line 243) | def pre_transformer(
method forward_encoder (line 271) | def forward_encoder(self, feat: Tensor, feat_mask: Tensor,
method pre_decoder (line 291) | def pre_decoder(self, memory: Tensor, **kwargs) -> Tuple[Dict, Dict]:
method forward_decoder (line 314) | def forward_decoder(self, query: Tensor, query_pos: Tensor, memory: Te...
FILE: mmdet/models/detectors/boxinst.py
class BoxInst (line 8) | class BoxInst(SingleStageInstanceSegmentor):
method __init__ (line 11) | def __init__(self,
FILE: mmdet/models/detectors/cascade_rcnn.py
class CascadeRCNN (line 8) | class CascadeRCNN(TwoStageDetector):
method __init__ (line 12) | def __init__(self,
FILE: mmdet/models/detectors/centernet.py
class CenterNet (line 8) | class CenterNet(SingleStageDetector):
method __init__ (line 14) | def __init__(self,
FILE: mmdet/models/detectors/condinst.py
class CondInst (line 8) | class CondInst(SingleStageInstanceSegmentor):
method __init__ (line 11) | def __init__(self,
FILE: mmdet/models/detectors/conditional_detr.py
class ConditionalDETR (line 14) | class ConditionalDETR(DETR):
method _init_layers (line 23) | def _init_layers(self) -> None:
method forward_decoder (line 40) | def forward_decoder(self, query: Tensor, query_pos: Tensor, memory: Te...
FILE: mmdet/models/detectors/cornernet.py
class CornerNet (line 8) | class CornerNet(SingleStageDetector):
method __init__ (line 15) | def __init__(self,
FILE: mmdet/models/detectors/crosskd_atss.py
class CrossKDATSS (line 16) | class CrossKDATSS(CrossKDSingleStageDetector):
method __init__ (line 18) | def __init__(self,
method loss (line 26) | def loss(self, batch_inputs: Tensor,
method forward_hkd_single (line 82) | def forward_hkd_single(self, x, scale, module):
method reuse_teacher_head (line 100) | def reuse_teacher_head(self, tea_cls_feat, tea_reg_feat, stu_cls_feat,
method align_scale (line 117) | def align_scale(self, stu_feat, tea_feat):
method loss_by_feat (line 131) | def loss_by_feat(
method pred_imitation_loss_single (line 230) | def pred_imitation_loss_single(self,
FILE: mmdet/models/detectors/crosskd_fcos.py
class CrossKDFCOS (line 17) | class CrossKDFCOS(CrossKDSingleStageDetector):
method loss (line 19) | def loss(self, batch_inputs: Tensor,
method forward_hkd_single (line 75) | def forward_hkd_single(self, x, scale, stride, module):
method reuse_teacher_head (line 105) | def reuse_teacher_head(self, tea_cls_feat, tea_reg_feat, stu_cls_feat,...
method align_scale (line 133) | def align_scale(self, stu_feat, tea_feat):
method loss_by_feat (line 147) | def loss_by_feat(
FILE: mmdet/models/detectors/crosskd_gfl.py
class CrossKDGFL (line 17) | class CrossKDGFL(CrossKDSingleStageDetector):
method loss (line 19) | def loss(self, batch_inputs: Tensor,
method forward_crosskd_single (line 55) | def forward_crosskd_single(self, x, scale, module):
method reuse_teacher_head (line 72) | def reuse_teacher_head(self, tea_cls_feat, tea_reg_feat, stu_cls_feat,
method align_scale (line 88) | def align_scale(self, stu_feat, tea_feat):
method loss_by_feat (line 102) | def loss_by_feat(
method pred_mimicking_loss_single (line 198) | def pred_mimicking_loss_single(self, tea_cls_score, tea_bbox_pred,
FILE: mmdet/models/detectors/crosskd_retinanet.py
class CrossKDRetinaNet (line 17) | class CrossKDRetinaNet(CrossKDSingleStageDetector):
method loss (line 19) | def loss(self, batch_inputs: Tensor,
method forward_crosskd_single (line 53) | def forward_crosskd_single(self, x, module):
method reuse_teacher_head (line 70) | def reuse_teacher_head(self, tea_cls_feat, tea_reg_feat, stu_cls_feat,
method align_scale (line 86) | def align_scale(self, stu_feat, tea_feat):
method loss_by_feat (line 100) | def loss_by_feat(
method pred_mimicking_loss_single (line 192) | def pred_mimicking_loss_single(self, tea_cls_score, tea_bbox_pred,
FILE: mmdet/models/detectors/crosskd_single_stage.py
class CrossKDSingleStageDetector (line 22) | class CrossKDSingleStageDetector(SingleStageDetector):
method __init__ (line 46) | def __init__(
method freeze (line 83) | def freeze(model: nn.Module):
method cuda (line 89) | def cuda(self, device: Optional[str] = None) -> nn.Module:
method to (line 95) | def to(self, device: Optional[str] = None) -> nn.Module:
method train (line 101) | def train(self, mode: bool = True) -> None:
method __setattr__ (line 106) | def __setattr__(self, name: str, value: Any) -> None:
FILE: mmdet/models/detectors/crowddet.py
class CrowdDet (line 8) | class CrowdDet(TwoStageDetector):
method __init__ (line 28) | def __init__(self,
FILE: mmdet/models/detectors/d2_wrapper.py
function _to_cfgnode_list (line 26) | def _to_cfgnode_list(cfg: ConfigType,
function convert_d2_pred_to_datasample (line 57) | def convert_d2_pred_to_datasample(data_samples: SampleList,
class Detectron2Wrapper (line 97) | class Detectron2Wrapper(BaseDetector):
method __init__ (line 111) | def __init__(self,
method init_weights (line 127) | def init_weights(self) -> None:
method loss (line 138) | def loss(self, batch_inputs: Tensor,
method predict (line 166) | def predict(self, batch_inputs: Tensor,
method _forward (line 206) | def _forward(self, *args, **kwargs):
method extract_feat (line 215) | def extract_feat(self, *args, **kwargs):
method _convert_to_d2_inputs (line 222) | def _convert_to_d2_inputs(self,
FILE: mmdet/models/detectors/dab_detr.py
class DABDETR (line 15) | class DABDETR(DETR):
method __init__ (line 31) | def __init__(self,
method _init_layers (line 43) | def _init_layers(self) -> None:
method init_weights (line 60) | def init_weights(self) -> None:
method pre_decoder (line 69) | def pre_decoder(self, memory: Tensor) -> Tuple[Dict, Dict]:
method forward_decoder (line 107) | def forward_decoder(self, query: Tensor, query_pos: Tensor, memory: Te...
FILE: mmdet/models/detectors/ddod.py
class DDOD (line 8) | class DDOD(SingleStageDetector):
method __init__ (line 26) | def __init__(self,
FILE: mmdet/models/detectors/deformable_detr.py
class DeformableDETR (line 21) | class DeformableDETR(DetectionTransformer):
method __init__ (line 41) | def __init__(self,
method _init_layers (line 71) | def _init_layers(self) -> None:
method init_weights (line 101) | def init_weights(self) -> None:
method pre_transformer (line 119) | def pre_transformer(
method forward_encoder (line 221) | def forward_encoder(self, feat: Tensor, feat_mask: Tensor,
method pre_decoder (line 265) | def pre_decoder(self, memory: Tensor, memory_mask: Tensor,
method forward_decoder (line 347) | def forward_decoder(self, query: Tensor, query_pos: Tensor, memory: Te...
method get_valid_ratio (line 403) | def get_valid_ratio(mask: Tensor) -> Tensor:
method gen_encoder_output_proposals (line 441) | def gen_encoder_output_proposals(
method get_proposal_pos_embed (line 509) | def get_proposal_pos_embed(proposals: Tensor,
FILE: mmdet/models/detectors/detr.py
class DETR (line 16) | class DETR(DetectionTransformer):
method _init_layers (line 25) | def _init_layers(self) -> None:
method init_weights (line 42) | def init_weights(self) -> None:
method pre_transformer (line 50) | def pre_transformer(
method forward_encoder (line 114) | def forward_encoder(self, feat: Tensor, feat_mask: Tensor,
method pre_decoder (line 141) | def pre_decoder(self, memory: Tensor) -> Tuple[Dict, Dict]:
method forward_decoder (line 178) | def forward_decoder(self, query: Tensor, query_pos: Tensor, memory: Te...
FILE: mmdet/models/detectors/dino.py
class DINO (line 17) | class DINO(DeformableDETR):
method __init__ (line 29) | def __init__(self, *args, dn_cfg: OptConfigType = None, **kwargs) -> N...
method _init_layers (line 46) | def _init_layers(self) -> None:
method init_weights (line 69) | def init_weights(self) -> None:
method forward_transformer (line 83) | def forward_transformer(
method pre_decoder (line 126) | def pre_decoder(
method forward_decoder (line 216) | def forward_decoder(self,
FILE: mmdet/models/detectors/fast_rcnn.py
class FastRCNN (line 8) | class FastRCNN(TwoStageDetector):
method __init__ (line 11) | def __init__(self,
FILE: mmdet/models/detectors/faster_rcnn.py
class FasterRCNN (line 8) | class FasterRCNN(TwoStageDetector):
method __init__ (line 11) | def __init__(self,
FILE: mmdet/models/detectors/fcos.py
class FCOS (line 8) | class FCOS(SingleStageDetector):
method __init__ (line 27) | def __init__(self,
FILE: mmdet/models/detectors/fovea.py
class FOVEA (line 8) | class FOVEA(SingleStageDetector):
method __init__ (line 26) | def __init__(self,
FILE: mmdet/models/detectors/fsaf.py
class FSAF (line 8) | class FSAF(SingleStageDetector):
method __init__ (line 11) | def __init__(self,
FILE: mmdet/models/detectors/gfl.py
class GFL (line 8) | class GFL(SingleStageDetector):
method __init__ (line 26) | def __init__(self,
FILE: mmdet/models/detectors/grid_rcnn.py
class GridRCNN (line 8) | class GridRCNN(TwoStageDetector):
method __init__ (line 16) | def __init__(self,
FILE: mmdet/models/detectors/htc.py
class HybridTaskCascade (line 7) | class HybridTaskCascade(CascadeRCNN):
method __init__ (line 10) | def __init__(self, **kwargs) -> None:
method with_semantic (line 14) | def with_semantic(self) -> bool:
FILE: mmdet/models/detectors/kd_one_stage.py
class KnowledgeDistillationSingleStageDetector (line 18) | class KnowledgeDistillationSingleStageDetector(SingleStageDetector):
method __init__ (line 42) | def __init__(
method loss (line 70) | def loss(self, batch_inputs: Tensor,
method cuda (line 90) | def cuda(self, device: Optional[str] = None) -> nn.Module:
method to (line 96) | def to(self, device: Optional[str] = None) -> nn.Module:
method train (line 103) | def train(self, mode: bool = True) -> None:
method __setattr__ (line 111) | def __setattr__(self, name: str, value: Any) -> None:
FILE: mmdet/models/detectors/lad.py
class LAD (line 17) | class LAD(KnowledgeDistillationSingleStageDetector):
method __init__ (line 20) | def __init__(self,
method with_teacher_neck (line 52) | def with_teacher_neck(self) -> bool:
method extract_teacher_feat (line 57) | def extract_teacher_feat(self, batch_inputs: Tensor) -> Tensor:
method loss (line 64) | def loss(self, batch_inputs: Tensor,
FILE: mmdet/models/detectors/mask2former.py
class Mask2Former (line 8) | class Mask2Former(MaskFormer):
method __init__ (line 13) | def __init__(self,
FILE: mmdet/models/detectors/mask_rcnn.py
class MaskRCNN (line 10) | class MaskRCNN(TwoStageDetector):
method __init__ (line 13) | def __init__(self,
FILE: mmdet/models/detectors/mask_scoring_rcnn.py
class MaskScoringRCNN (line 8) | class MaskScoringRCNN(TwoStageDetector):
method __init__ (line 14) | def __init__(self,
FILE: mmdet/models/detectors/maskformer.py
class MaskFormer (line 13) | class MaskFormer(SingleStageDetector):
method __init__ (line 18) | def __init__(self,
method loss (line 49) | def loss(self, batch_inputs: Tensor,
method predict (line 66) | def predict(self,
method add_pred_to_datasample (line 112) | def add_pred_to_datasample(self, data_samples: SampleList,
method _forward (line 153) | def _forward(self, batch_inputs: Tensor,
FILE: mmdet/models/detectors/nasfcos.py
class NASFCOS (line 8) | class NASFCOS(SingleStageDetector):
method __init__ (line 28) | def __init__(self,
FILE: mmdet/models/detectors/paa.py
class PAA (line 8) | class PAA(SingleStageDetector):
method __init__ (line 26) | def __init__(self,
FILE: mmdet/models/detectors/panoptic_fpn.py
class PanopticFPN (line 8) | class PanopticFPN(TwoStagePanopticSegmentor):
method __init__ (line 12) | def __init__(
FILE: mmdet/models/detectors/panoptic_two_stage_segmentor.py
class TwoStagePanopticSegmentor (line 16) | class TwoStagePanopticSegmentor(TwoStageDetector):
method __init__ (line 23) | def __init__(
method with_semantic_head (line 62) | def with_semantic_head(self) -> bool:
method with_panoptic_fusion_head (line 68) | def with_panoptic_fusion_head(self) -> bool:
method loss (line 73) | def loss(self, batch_inputs: Tensor,
method predict (line 126) | def predict(self,
method _forward (line 175) | def _forward(self, batch_inputs: Tensor,
method add_pred_to_datasample (line 215) | def add_pred_to_datasample(self, data_samples: SampleList,
FILE: mmdet/models/detectors/point_rend.py
class PointRend (line 10) | class PointRend(TwoStageDetector):
method __init__ (line 18) | def __init__(self,
FILE: mmdet/models/detectors/queryinst.py
class QueryInst (line 8) | class QueryInst(SparseRCNN):
method __init__ (line 12) | def __init__(self,
FILE: mmdet/models/detectors/reppoints_detector.py
class RepPointsDetector (line 8) | class RepPointsDetector(SingleStageDetector):
method __init__ (line 15) | def __init__(self,
FILE: mmdet/models/detectors/retinanet.py
class RetinaNet (line 8) | class RetinaNet(SingleStageDetector):
method __init__ (line 11) | def __init__(self,
FILE: mmdet/models/detectors/rpn.py
class RPN (line 15) | class RPN(SingleStageDetector):
method __init__ (line 32) | def __init__(self,
method loss (line 58) | def loss(self, batch_inputs: Tensor,
FILE: mmdet/models/detectors/rtmdet.py
class RTMDet (line 12) | class RTMDet(SingleStageDetector):
method __init__ (line 31) | def __init__(self,
FILE: mmdet/models/detectors/scnet.py
class SCNet (line 7) | class SCNet(CascadeRCNN):
method __init__ (line 10) | def __init__(self, **kwargs) -> None:
FILE: mmdet/models/detectors/semi_base.py
class SemiBaseDetector (line 19) | class SemiBaseDetector(BaseDetector):
method __init__ (line 40) | def __init__(self,
method freeze (line 56) | def freeze(model: nn.Module):
method loss (line 62) | def loss(self, multi_batch_inputs: Dict[str, Tensor],
method loss_by_gt_instances (line 92) | def loss_by_gt_instances(self, batch_inputs: Tensor,
method loss_by_pseudo_instances (line 112) | def loss_by_pseudo_instances(self,
method get_pseudo_instances (line 145) | def get_pseudo_instances(
method project_pseudo_instances (line 161) | def project_pseudo_instances(self, batch_pseudo_instances: SampleList,
method predict (line 175) | def predict(self, batch_inputs: Tensor,
method _forward (line 209) | def _forward(self, batch_inputs: Tensor,
method extract_feat (line 228) | def extract_feat(self, batch_inputs: Tensor) -> Tuple[Tensor]:
method _load_from_state_dict (line 243) | def _load_from_state_dict(self, state_dict: dict, prefix: str,
FILE: mmdet/models/detectors/single_stage.py
class SingleStageDetector (line 13) | class SingleStageDetector(BaseDetector):
method __init__ (line 20) | def __init__(self,
method _load_from_state_dict (line 39) | def _load_from_state_dict(self, state_dict: dict, prefix: str,
method loss (line 63) | def loss(self, batch_inputs: Tensor,
method predict (line 81) | def predict(self,
method _forward (line 116) | def _forward(
method extract_feat (line 136) | def extract_feat(self, batch_inputs: Tensor) -> Tuple[Tensor]:
FILE: mmdet/models/detectors/single_stage_instance_seg.py
class SingleStageInstanceSegmentor (line 16) | class SingleStageInstanceSegmentor(BaseDetector):
method __init__ (line 19) | def __init__(self,
method extract_feat (line 51) | def extract_feat(self, batch_inputs: Tensor) -> Tuple[Tensor]:
method _forward (line 66) | def _forward(self,
method loss (line 101) | def loss(self, batch_inputs: Tensor, batch_data_samples: SampleList,
method predict (line 134) | def predict(self,
FILE: mmdet/models/detectors/soft_teacher.py
class SoftTeacher (line 20) | class SoftTeacher(SemiBaseDetector):
method __init__ (line 38) | def __init__(self,
method loss_by_pseudo_instances (line 51) | def loss_by_pseudo_instances(self,
method get_pseudo_instances (line 87) | def get_pseudo_instances(
method rpn_loss_by_pseudo_instances (line 137) | def rpn_loss_by_pseudo_instances(self, x: Tuple[Tensor],
method rcnn_cls_loss_by_pseudo_instances (line 169) | def rcnn_cls_loss_by_pseudo_instances(self, x: Tuple[Tensor],
method rcnn_reg_loss_by_pseudo_instances (line 259) | def rcnn_reg_loss_by_pseudo_instances(
method compute_uncertainty_with_aug (line 290) | def compute_uncertainty_with_aug(
method aug_box (line 358) | def aug_box(batch_data_samples, times, frac):
FILE: mmdet/models/detectors/solo.py
class SOLO (line 8) | class SOLO(SingleStageInstanceSegmentor):
method __init__ (line 14) | def __init__(self,
FILE: mmdet/models/detectors/solov2.py
class SOLOv2 (line 8) | class SOLOv2(SingleStageInstanceSegmentor):
method __init__ (line 14) | def __init__(self,
FILE: mmdet/models/detectors/sparse_rcnn.py
class SparseRCNN (line 8) | class SparseRCNN(TwoStageDetector):
method __init__ (line 12) | def __init__(self,
FILE: mmdet/models/detectors/tood.py
class TOOD (line 8) | class TOOD(SingleStageDetector):
method __init__ (line 27) | def __init__(self,
FILE: mmdet/models/detectors/trident_faster_rcnn.py
class TridentFasterRCNN (line 11) | class TridentFasterRCNN(FasterRCNN):
method __init__ (line 14) | def __init__(self,
method _forward (line 38) | def _forward(self, batch_inputs: Tensor,
method loss (line 47) | def loss(self, batch_inputs: Tensor,
method predict (line 56) | def predict(self,
method aug_test (line 70) | def aug_test(self, imgs, img_metas, rescale=False):
FILE: mmdet/models/detectors/two_stage.py
class TwoStageDetector (line 16) | class TwoStageDetector(BaseDetector):
method __init__ (line 23) | def __init__(self,
method _load_from_state_dict (line 66) | def _load_from_state_dict(self, state_dict: dict, prefix: str,
method with_rpn (line 91) | def with_rpn(self) -> bool:
method with_roi_head (line 96) | def with_roi_head(self) -> bool:
method extract_feat (line 100) | def extract_feat(self, batch_inputs: Tensor) -> Tuple[Tensor]:
method _forward (line 115) | def _forward(self, batch_inputs: Tensor,
method loss (line 146) | def loss(self, batch_inputs: Tensor,
method predict (line 196) | def predict(self,
FILE: mmdet/models/detectors/vfnet.py
class VFNet (line 8) | class VFNet(SingleStageDetector):
method __init__ (line 27) | def __init__(self,
FILE: mmdet/models/detectors/yolact.py
class YOLACT (line 8) | class YOLACT(SingleStageInstanceSegmentor):
method __init__ (line 11) | def __init__(self,
FILE: mmdet/models/detectors/yolo.py
class YOLOV3 (line 10) | class YOLOV3(SingleStageDetector):
method __init__ (line 30) | def __init__(self,
FILE: mmdet/models/detectors/yolof.py
class YOLOF (line 8) | class YOLOF(SingleStageDetector):
method __init__ (line 28) | def __init__(self,
FILE: mmdet/models/detectors/yolox.py
class YOLOX (line 8) | class YOLOX(SingleStageDetector):
method __init__ (line 28) | def __init__(self,
FILE: mmdet/models/layers/activations.py
class SiLU (line 12) | class SiLU(nn.Module):
method __init__ (line 15) | def __init__(self, inplace=True):
method forward (line 18) | def forward(self, inputs) -> torch.Tensor:
FILE: mmdet/models/layers/bbox_nms.py
function multiclass_nms (line 12) | def multiclass_nms(
function fast_nms (line 108) | def fast_nms(
FILE: mmdet/models/layers/brick_wrappers.py
function adaptive_avg_pool2d (line 15) | def adaptive_avg_pool2d(input, output_size):
class AdaptiveAvgPool2d (line 32) | class AdaptiveAvgPool2d(nn.AdaptiveAvgPool2d):
method forward (line 35) | def forward(self, x):
FILE: mmdet/models/layers/conv_upsample.py
class ConvUpsample (line 7) | class ConvUpsample(BaseModule):
method __init__ (line 28) | def __init__(self,
method forward (line 59) | def forward(self, x):
FILE: mmdet/models/layers/csp_layer.py
class DarknetBottleneck (line 12) | class DarknetBottleneck(BaseModule):
method __init__ (line 37) | def __init__(self,
method forward (line 70) | def forward(self, x: Tensor) -> Tensor:
class CSPNeXtBlock (line 82) | class CSPNeXtBlock(BaseModule):
method __init__ (line 106) | def __init__(self,
method forward (line 141) | def forward(self, x: Tensor) -> Tensor:
class CSPLayer (line 153) | class CSPLayer(BaseModule):
method __init__ (line 181) | def __init__(self,
method forward (line 235) | def forward(self, x: Tensor) -> Tensor:
FILE: mmdet/models/layers/dropblock.py
class DropBlock (line 12) | class DropBlock(nn.Module):
method __init__ (line 26) | def __init__(self, drop_prob, block_size, warmup_iters=2000, **kwargs):
method forward (line 36) | def forward(self, x):
method _compute_gamma (line 63) | def _compute_gamma(self, feat_size):
method extra_repr (line 84) | def extra_repr(self):
FILE: mmdet/models/layers/ema.py
class ExpMomentumEMA (line 14) | class ExpMomentumEMA(ExponentialMovingAverage):
method __init__ (line 37) | def __init__(self,
method avg_func (line 53) | def avg_func(self, averaged_param: Tensor, source_param: Tensor,
FILE: mmdet/models/layers/inverted_residual.py
class InvertedResidual (line 11) | class InvertedResidual(BaseModule):
method __init__ (line 42) | def __init__(self,
method forward (line 105) | def forward(self, x):
FILE: mmdet/models/layers/matrix_nms.py
function mask_matrix_nms (line 5) | def mask_matrix_nms(masks,
FILE: mmdet/models/layers/msdeformattn_pixel_decoder.py
class MSDeformAttnPixelDecoder (line 21) | class MSDeformAttnPixelDecoder(BaseModule):
method __init__ (line 45) | def __init__(self,
method init_weights (line 119) | def init_weights(self) -> None:
method forward (line 144) | def forward(self, feats: List[Tensor]) -> Tuple[Tensor, Tensor]:
FILE: mmdet/models/layers/normed_predictor.py
class NormedLinear (line 13) | class NormedLinear(nn.Linear):
method __init__ (line 23) | def __init__(self,
method init_weights (line 35) | def init_weights(self) -> None:
method forward (line 41) | def forward(self, x: Tensor) -> Tensor:
class NormedConv2d (line 52) | class NormedConv2d(nn.Conv2d):
method __init__ (line 64) | def __init__(self,
method forward (line 77) | def forward(self, x: Tensor) -> Tensor:
FILE: mmdet/models/layers/pixel_decoder.py
class PixelDecoder (line 18) | class PixelDecoder(BaseModule):
method __init__ (line 40) | def __init__(self,
method init_weights (line 85) | def init_weights(self) -> None:
method forward (line 94) | def forward(self, feats: List[Tensor],
class TransformerEncoderPixelDecoder (line 125) | class TransformerEncoderPixelDecoder(PixelDecoder):
method __init__ (line 146) | def __init__(self,
method init_weights (line 184) | def init_weights(self) -> None:
method forward (line 198) | def forward(self, feats: List[Tensor],
FILE: mmdet/models/layers/positional_encoding.py
class SinePositionalEncoding (line 14) | class SinePositionalEncoding(BaseModule):
method __init__ (line 39) | def __init__(self,
method forward (line 59) | def forward(self, mask: Tensor) -> Tensor:
method __repr__ (line 98) | def __repr__(self) -> str:
class LearnedPositionalEncoding (line 110) | class LearnedPositionalEncoding(BaseModule):
method __init__ (line 124) | def __init__(
method forward (line 138) | def forward(self, mask: Tensor) -> Tensor:
method __repr__ (line 162) | def __repr__(self) -> str:
FILE: mmdet/models/layers/res_layer.py
class ResLayer (line 12) | class ResLayer(Sequential):
method __init__ (line 31) | def __init__(self,
class SimplifiedBasicBlock (line 112) | class SimplifiedBasicBlock(BaseModule):
method __init__ (line 121) | def __init__(self,
method norm1 (line 167) | def norm1(self) -> Optional[BaseModule]:
method norm2 (line 172) | def norm2(self) -> Optional[BaseModule]:
method forward (line 176) | def forward(self, x: Tensor) -> Tensor:
FILE: mmdet/models/layers/se_layer.py
class SELayer (line 12) | class SELayer(BaseModule):
method __init__ (line 31) | def __init__(self,
method forward (line 59) | def forward(self, x: Tensor) -> Tensor:
class DyReLU (line 67) | class DyReLU(BaseModule):
method __init__ (line 93) | def __init__(self,
method forward (line 126) | def forward(self, x: Tensor) -> Tensor:
class ChannelAttention (line 138) | class ChannelAttention(BaseModule):
method __init__ (line 147) | def __init__(self, channels: int, init_cfg: OptMultiConfig = None) -> ...
method forward (line 156) | def forward(self, x: Tensor) -> Tensor:
FILE: mmdet/models/layers/transformer/conditional_detr_layers.py
class ConditionalDetrTransformerDecoder (line 12) | class ConditionalDetrTransformerDecoder(DetrTransformerDecoder):
method _init_layers (line 15) | def _init_layers(self) -> None:
method forward (line 34) | def forward(self,
class ConditionalDetrTransformerDecoderLayer (line 95) | class ConditionalDetrTransformerDecoderLayer(DetrTransformerDecoderLayer):
method _init_layers (line 98) | def _init_layers(self):
method forward (line 111) | def forward(self,
FILE: mmdet/models/layers/transformer/dab_detr_layers.py
class DABDetrTransformerDecoderLayer (line 17) | class DABDetrTransformerDecoderLayer(DetrTransformerDecoderLayer):
method _init_layers (line 20) | def _init_layers(self):
method forward (line 34) | def forward(self,
class DABDetrTransformerDecoder (line 100) | class DABDetrTransformerDecoder(DetrTransformerDecoder):
method __init__ (line 113) | def __init__(self,
method _init_layers (line 126) | def _init_layers(self):
method forward (line 164) | def forward(self,
class DABDetrTransformerEncoder (line 261) | class DABDetrTransformerEncoder(DetrTransformerEncoder):
method _init_layers (line 264) | def _init_layers(self):
method forward (line 274) | def forward(self, query: Tensor, query_pos: Tensor,
FILE: mmdet/models/layers/transformer/deformable_detr_layers.py
class DeformableDetrTransformerEncoder (line 16) | class DeformableDetrTransformerEncoder(DetrTransformerEncoder):
method _init_layers (line 19) | def _init_layers(self) -> None:
method forward (line 27) | def forward(self, query: Tensor, query_pos: Tensor,
method get_encoder_reference_points (line 68) | def get_encoder_reference_points(
class DeformableDetrTransformerDecoder (line 106) | class DeformableDetrTransformerDecoder(DetrTransformerDecoder):
method _init_layers (line 109) | def _init_layers(self) -> None:
method forward (line 120) | def forward(self,
class DeformableDetrTransformerEncoderLayer (line 222) | class DeformableDetrTransformerEncoderLayer(DetrTransformerEncoderLayer):
method _init_layers (line 225) | def _init_layers(self) -> None:
class DeformableDetrTransformerDecoderLayer (line 237) | class DeformableDetrTransformerDecoderLayer(DetrTransformerDecoderLayer):
method _init_layers (line 240) | def _init_layers(self) -> None:
FILE: mmdet/models/layers/transformer/detr_layers.py
class DetrTransformerEncoder (line 14) | class DetrTransformerEncoder(BaseModule):
method __init__ (line 25) | def __init__(self,
method _init_layers (line 35) | def _init_layers(self) -> None:
method forward (line 43) | def forward(self, query: Tensor, query_pos: Tensor,
class DetrTransformerDecoder (line 64) | class DetrTransformerDecoder(BaseModule):
method __init__ (line 79) | def __init__(self,
method _init_layers (line 92) | def _init_layers(self) -> None:
method forward (line 102) | def forward(self, query: Tensor, key: Tensor, value: Tensor,
class DetrTransformerEncoderLayer (line 142) | class DetrTransformerEncoderLayer(BaseModule):
method __init__ (line 156) | def __init__(self,
method _init_layers (line 182) | def _init_layers(self) -> None:
method forward (line 193) | def forward(self, query: Tensor, query_pos: Tensor,
class DetrTransformerDecoderLayer (line 221) | class DetrTransformerDecoderLayer(BaseModule):
method __init__ (line 237) | def __init__(self,
method _init_layers (line 280) | def _init_layers(self) -> None:
method forward (line 292) | def forward(self,
FILE: mmdet/models/layers/transformer/dino_layers.py
class DinoTransformerDecoder (line 16) | class DinoTransformerDecoder(DeformableDetrTransformerDecoder):
method _init_layers (line 19) | def _init_layers(self) -> None:
method forward (line 26) | def forward(self, query: Tensor, value: Tensor, key_padding_mask: Tensor,
class CdnQueryGenerator (line 110) | class CdnQueryGenerator(BaseModule):
method __init__ (line 137) | def __init__(self,
method __call__ (line 177) | def __call__(self, batch_data_samples: SampleList) -> tuple:
method get_num_groups (line 259) | def get_num_groups(self, max_num_target: int = None) -> int:
method generate_dn_label_query (line 295) | def generate_dn_label_query(self, gt_labels: Tensor,
method generate_dn_bbox_query (line 333) | def generate_dn_bbox_query(self, gt_bboxes: Tensor,
method collate_dn_queries (line 425) | def collate_dn_queries(self, input_label_query: Tensor,
method generate_dn_mask (line 494) | def generate_dn_mask(self, max_num_target: int, num_groups: int,
FILE: mmdet/models/layers/transformer/mask2former_layers.py
class Mask2FormerTransformerEncoder (line 10) | class Mask2FormerTransformerEncoder(DeformableDetrTransformerEncoder):
method forward (line 13) | def forward(self, query: Tensor, query_pos: Tensor,
class Mask2FormerTransformerDecoder (line 56) | class Mask2FormerTransformerDecoder(DetrTransformerDecoder):
method _init_layers (line 59) | def _init_layers(self) -> None:
class Mask2FormerTransformerDecoderLayer (line 70) | class Mask2FormerTransformerDecoderLayer(DetrTransformerDecoderLayer):
method forward (line 73) | def forward(self,
FILE: mmdet/models/layers/transformer/utils.py
function nlc_to_nchw (line 19) | def nlc_to_nchw(x: Tensor, hw_shape: Sequence[int]) -> Tensor:
function nchw_to_nlc (line 36) | def nchw_to_nlc(x):
function coordinate_to_encoding (line 49) | def coordinate_to_encoding(coord_tensor: Tensor,
function inverse_sigmoid (line 100) | def inverse_sigmoid(x: Tensor, eps: float = 1e-5) -> Tensor:
class AdaptivePadding (line 116) | class AdaptivePadding(nn.Module):
method __init__ (line 147) | def __init__(self, kernel_size=1, stride=1, dilation=1, padding='corne...
method get_pad_shape (line 163) | def get_pad_shape(self, input_shape):
method forward (line 175) | def forward(self, x):
class PatchEmbed (line 188) | class PatchEmbed(BaseModule):
method __init__ (line 216) | def __init__(self,
method forward (line 288) | def forward(self, x: Tensor) -> Tuple[Tensor, Tuple[int]]:
class PatchMerging (line 312) | class PatchMerging(BaseModule):
method __init__ (line 343) | def __init__(self,
method forward (line 392) | def forward(self, x: Tensor,
class ConditionalAttention (line 441) | class ConditionalAttention(BaseModule):
method __init__ (line 463) | def __init__(self,
method _init_layers (line 488) | def _init_layers(self):
method forward_attn (line 502) | def forward_attn(self,
method forward (line 644) | def forward(self,
class MLP (line 736) | class MLP(BaseModule):
method __init__ (line 748) | def __init__(self, input_dim: int, hidden_dim: int, output_dim: int,
method forward (line 756) | def forward(self, x: Tensor) -> Tensor:
class DynamicConv (line 772) | class DynamicConv(BaseModule):
method __init__ (line 799) | def __init__(self,
method forward (line 833) | def forward(self, param_feature: Tensor, input_feature: Tensor) -> Ten...
FILE: mmdet/models/losses/accuracy.py
function accuracy (line 5) | def accuracy(pred, target, topk=1, thresh=None):
class Accuracy (line 52) | class Accuracy(nn.Module):
method __init__ (line 54) | def __init__(self, topk=(1, ), thresh=None):
method forward (line 67) | def forward(self, pred, target):
FILE: mmdet/models/losses/ae_loss.py
function ae_loss_per_image (line 9) | def ae_loss_per_image(tl_preds, br_preds, match):
class AssociativeEmbeddingLoss (line 73) | class AssociativeEmbeddingLoss(nn.Module):
method __init__ (line 86) | def __init__(self, pull_weight=0.25, push_weight=0.25):
method forward (line 91) | def forward(self, pred, target, match):
FILE: mmdet/models/losses/balanced_l1_loss.py
function balanced_l1_loss (line 11) | def balanced_l1_loss(pred,
class BalancedL1Loss (line 55) | class BalancedL1Loss(nn.Module):
method __init__ (line 72) | def __init__(self,
method forward (line 85) | def forward(self,
FILE: mmdet/models/losses/cross_entropy_loss.py
function cross_entropy (line 12) | def cross_entropy(pred,
function _expand_onehot_labels (line 64) | def _expand_onehot_labels(labels, label_weights, label_channels, ignore_...
function binary_cross_entropy (line 85) | def binary_cross_entropy(pred,
function mask_cross_entropy (line 148) | def mask_cross_entropy(pred,
class CrossEntropyLoss (line 201) | class CrossEntropyLoss(nn.Module):
method __init__ (line 203) | def __init__(self,
method extra_repr (line 252) | def extra_repr(self):
method forward (line 257) | def forward(self,
FILE: mmdet/models/losses/dice_loss.py
function dice_loss (line 9) | def dice_loss(pred,
class DiceLoss (line 66) | class DiceLoss(nn.Module):
method __init__ (line 68) | def __init__(self,
method forward (line 103) | def forward(self,
FILE: mmdet/models/losses/focal_loss.py
function py_sigmoid_focal_loss (line 12) | def py_sigmoid_focal_loss(pred,
function py_focal_loss_with_prob (line 60) | def py_focal_loss_with_prob(pred,
function sigmoid_focal_loss (line 115) | def sigmoid_focal_loss(pred,
class FocalLoss (line 162) | class FocalLoss(nn.Module):
method __init__ (line 164) | def __init__(self,
method forward (line 198) | def forward(self,
FILE: mmdet/models/losses/gaussian_focal_loss.py
function gaussian_focal_loss (line 12) | def gaussian_focal_loss(pred: Tensor,
function gaussian_focal_loss_with_pos_inds (line 40) | def gaussian_focal_loss_with_pos_inds(
class GaussianFocalLoss (line 93) | class GaussianFocalLoss(nn.Module):
method __init__ (line 112) | def __init__(self,
method forward (line 127) | def forward(self,
FILE: mmdet/models/losses/gfocal_loss.py
function quality_focal_loss (line 13) | def quality_focal_loss(pred, target, beta=2.0):
function quality_focal_loss_tensor_target (line 57) | def quality_focal_loss_tensor_target(pred, target, beta=2.0, activated=F...
function quality_focal_loss_with_prob (line 98) | def quality_focal_loss_with_prob(pred, target, beta=2.0):
function distribution_focal_loss (line 144) | def distribution_focal_loss(pred, label):
class QualityFocalLoss (line 169) | class QualityFocalLoss(nn.Module):
method __init__ (line 187) | def __init__(self,
method forward (line 201) | def forward(self,
class DistributionFocalLoss (line 253) | class DistributionFocalLoss(nn.Module):
method __init__ (line 263) | def __init__(self, reduction='mean', loss_weight=1.0):
method forward (line 268) | def forward(self,
FILE: mmdet/models/losses/ghm_loss.py
function _expand_onehot_labels (line 10) | def _expand_onehot_labels(labels, label_weights, label_channels):
class GHMC (line 23) | class GHMC(nn.Module):
method __init__ (line 39) | def __init__(self,
method forward (line 60) | def forward(self,
class GHMR (line 122) | class GHMR(nn.Module):
method __init__ (line 138) | def __init__(self,
method forward (line 158) | def forward(self,
FILE: mmdet/models/losses/iou_loss.py
function iou_loss (line 16) | def iou_loss(pred: Tensor,
function bounded_iou_loss (line 58) | def bounded_iou_loss(pred: Tensor,
function giou_loss (line 111) | def giou_loss(pred: Tensor, target: Tensor, eps: float = 1e-7) -> Tensor:
function diou_loss (line 130) | def diou_loss(pred: Tensor, target: Tensor, eps: float = 1e-7) -> Tensor:
function ciou_loss (line 185) | def ciou_loss(pred: Tensor, target: Tensor, eps: float = 1e-7) -> Tensor:
function eiou_loss (line 250) | def eiou_loss(pred: Tensor,
class IoULoss (line 307) | class IoULoss(nn.Module):
method __init__ (line 322) | def __init__(self,
method forward (line 341) | def forward(self,
class BoundedIoULoss (line 393) | class BoundedIoULoss(nn.Module):
method __init__ (line 407) | def __init__(self,
method forward (line 418) | def forward(self,
class GIoULoss (line 463) | class GIoULoss(nn.Module):
method __init__ (line 473) | def __init__(self,
method forward (line 482) | def forward(self,
class DIoULoss (line 532) | class DIoULoss(nn.Module):
method __init__ (line 544) | def __init__(self,
method forward (line 553) | def forward(self,
class CIoULoss (line 603) | class CIoULoss(nn.Module):
method __init__ (line 616) | def __init__(self,
method forward (line 625) | def forward(self,
class EIoULoss (line 675) | class EIoULoss(nn.Module):
method __init__ (line 689) | def __init__(self,
method forward (line 700) | def forward(self,
FILE: mmdet/models/losses/kd_loss.py
function knowledge_distillation_kl_div_loss (line 11) | def knowledge_distillation_kl_div_loss(pred,
function kd_quality_focal_loss (line 44) | def kd_quality_focal_loss(pred,
class KnowledgeDistillationKLDivLoss (line 63) | class KnowledgeDistillationKLDivLoss(nn.Module):
method __init__ (line 72) | def __init__(self,
method forward (line 84) | def forward(self,
class KDQualityFocalLoss (line 121) | class KDQualityFocalLoss(nn.Module):
method __init__ (line 123) | def __init__(self,
method forward (line 135) | def forward(self,
FILE: mmdet/models/losses/mse_loss.py
function mse_loss (line 13) | def mse_loss(pred: Tensor, target: Tensor) -> Tensor:
class MSELoss (line 26) | class MSELoss(nn.Module):
method __init__ (line 35) | def __init__(self,
method forward (line 42) | def forward(self,
FILE: mmdet/models/losses/pisa_loss.py
function isr_p (line 13) | def isr_p(cls_score: Tensor,
function carl_loss (line 126) | def carl_loss(cls_score: Tensor,
FILE: mmdet/models/losses/pkd_loss.py
function norm (line 10) | def norm(feat: torch.Tensor) -> torch.Tensor:
function pkd_loss (line 27) | def pkd_loss(pred, target):
class PKDLoss (line 34) | class PKDLoss(nn.Module):
method __init__ (line 36) | def __init__(self, reduction='mean', loss_weight=1.0):
method forward (line 41) | def forward(self,
FILE: mmdet/models/losses/seesaw_loss.py
function seesaw_ce_loss (line 15) | def seesaw_ce_loss(cls_score: Tensor,
class SeesawLoss (line 83) | class SeesawLoss(nn.Module):
method __init__ (line 106) | def __init__(self,
method _split_cls_score (line 141) | def _split_cls_score(self, cls_score: Tensor) -> Tuple[Tensor, Tensor]:
method get_cls_channels (line 157) | def get_cls_channels(self, num_classes: int) -> int:
method get_activation (line 169) | def get_activation(self, cls_score: Tensor) -> Tensor:
method get_accuracy (line 189) | def get_accuracy(self, cls_score: Tensor,
method forward (line 212) | def forward(
FILE: mmdet/models/losses/smooth_l1_loss.py
function smooth_l1_loss (line 13) | def smooth_l1_loss(pred: Tensor, target: Tensor, beta: float = 1.0) -> T...
function l1_loss (line 37) | def l1_loss(pred: Tensor, target: Tensor) -> Tensor:
class SmoothL1Loss (line 56) | class SmoothL1Loss(nn.Module):
method __init__ (line 67) | def __init__(self,
method forward (line 76) | def forward(self,
class L1Loss (line 114) | class L1Loss(nn.Module):
method __init__ (line 123) | def __init__(self,
method forward (line 130) | def forward(self,
FILE: mmdet/models/losses/utils.py
function reduce_loss (line 10) | def reduce_loss(loss: Tensor, reduction: str) -> Tensor:
function weight_reduce_loss (line 30) | def weight_reduce_loss(loss: Tensor,
function weighted_loss (line 68) | def weighted_loss(loss_func: Callable) -> Callable:
FILE: mmdet/models/losses/varifocal_loss.py
function varifocal_loss (line 12) | def varifocal_loss(pred: Tensor,
class VarifocalLoss (line 64) | class VarifocalLoss(nn.Module):
method __init__ (line 66) | def __init__(self,
method forward (line 101) | def forward(self,
FILE: mmdet/models/necks/bfp.py
class BFP (line 15) | class BFP(BaseModule):
method __init__ (line 40) | def __init__(
method forward (line 79) | def forward(self, inputs: Tuple[Tensor]) -> Tuple[Tensor]:
FILE: mmdet/models/necks/channel_mapper.py
class ChannelMapper (line 14) | class ChannelMapper(BaseModule):
method __init__ (line 50) | def __init__(
method forward (line 96) | def forward(self, inputs: Tuple[Tensor]) -> Tuple[Tensor]:
FILE: mmdet/models/necks/cspnext_pafpn.py
class CSPNeXtPAFPN (line 17) | class CSPNeXtPAFPN(BaseModule):
method __init__ (line 41) | def __init__(
method forward (line 131) | def forward(self, inputs: Tuple[Tensor, ...]) -> Tuple[Tensor, ...]:
FILE: mmdet/models/necks/ct_resnet_neck.py
class CTResNetNeck (line 15) | class CTResNetNeck(BaseModule):
method __init__ (line 29) | def __init__(self,
method _make_deconv_layer (line 43) | def _make_deconv_layer(
method init_weights (line 71) | def init_weights(self) -> None:
method forward (line 98) | def forward(self, x: Sequence[torch.Tensor]) -> Tuple[torch.Tensor]:
FILE: mmdet/models/necks/dilated_encoder.py
class Bottleneck (line 10) | class Bottleneck(nn.Module):
method __init__ (line 24) | def __init__(self,
method forward (line 42) | def forward(self, x):
class DilatedEncoder (line 52) | class DilatedEncoder(nn.Module):
method __init__ (line 68) | def __init__(self, in_channels, out_channels, block_mid_channels,
method _init_layers (line 78) | def _init_layers(self):
method init_weights (line 95) | def init_weights(self):
method forward (line 106) | def forward(self, feature):
FILE: mmdet/models/necks/dyhead.py
class DyDCNv2 (line 16) | class DyDCNv2(nn.Module):
method __init__ (line 31) | def __init__(self,
method forward (line 44) | def forward(self, x, offset, mask):
class DyHeadBlock (line 52) | class DyHeadBlock(nn.Module):
method __init__ (line 68) | def __init__(self,
method _init_weights (line 90) | def _init_weights(self):
method forward (line 97) | def forward(self, x):
class DyHead (line 129) | class DyHead(BaseModule):
method __init__ (line 145) | def __init__(self,
method forward (line 169) | def forward(self, inputs):
FILE: mmdet/models/necks/fpg.py
class Transition (line 10) | class Transition(BaseModule):
method __init__ (line 18) | def __init__(self, in_channels, out_channels, init_cfg=None):
method forward (line 23) | def forward(x):
class UpInterpolationConv (line 27) | class UpInterpolationConv(Transition):
method __init__ (line 43) | def __init__(self,
method forward (line 63) | def forward(self, x):
class LastConv (line 73) | class LastConv(Transition):
method __init__ (line 83) | def __init__(self,
method forward (line 99) | def forward(self, inputs):
class FPG (line 105) | class FPG(BaseModule):
method __init__ (line 150) | def __init__(self,
method build_trans (line 317) | def build_trans(self, cfg, in_channels, out_channels, **extra_args):
method fuse (line 323) | def fuse(self, fuse_dict):
method forward (line 333) | def forward(self, inputs):
FILE: mmdet/models/necks/fpn.py
class FPN (line 15) | class FPN(BaseModule):
method __init__ (line 70) | def __init__(
method forward (line 161) | def forward(self, inputs: Tuple[Tensor]) -> tuple:
FILE: mmdet/models/necks/fpn_carafe.py
class FPN_CARAFE (line 11) | class FPN_CARAFE(BaseModule):
method __init__ (line 37) | def __init__(self,
method init_weights (line 209) | def init_weights(self):
method slice_as (line 219) | def slice_as(self, src, dst):
method tensor_add (line 239) | def tensor_add(self, a, b):
method forward (line 247) | def forward(self, inputs):
FILE: mmdet/models/necks/hrfpn.py
class HRFPN (line 13) | class HRFPN(BaseModule):
method __init__ (line 33) | def __init__(self,
method forward (line 77) | def forward(self, inputs):
FILE: mmdet/models/necks/nas_fpn.py
class NASFPN (line 15) | class NASFPN(BaseModule):
method __init__ (line 38) | def __init__(
method forward (line 132) | def forward(self, inputs: Tuple[Tensor]) -> tuple:
FILE: mmdet/models/necks/nasfcos_fpn.py
class NASFCOS_FPN (line 12) | class NASFCOS_FPN(BaseModule):
method __init__ (line 35) | def __init__(self,
method forward (line 123) | def forward(self, inputs):
method init_weights (line 157) | def init_weights(self):
FILE: mmdet/models/necks/pafpn.py
class PAFPN (line 11) | class PAFPN(FPN):
method __init__ (line 45) | def __init__(self,
method forward (line 98) | def forward(self, inputs):
FILE: mmdet/models/necks/rfp.py
class ASPP (line 11) | class ASPP(BaseModule):
method __init__ (line 25) | def __init__(self,
method forward (line 47) | def forward(self, x):
class RFP (line 59) | class RFP(FPN):
method __init__ (line 77) | def __init__(self,
method init_weights (line 104) | def init_weights(self):
method forward (line 116) | def forward(self, inputs):
FILE: mmdet/models/necks/ssd_neck.py
class SSDNeck (line 11) | class SSDNeck(BaseModule):
method __init__ (line 33) | def __init__(self,
method forward (line 93) | def forward(self, inputs):
class L2Norm (line 106) | class L2Norm(nn.Module):
method __init__ (line 108) | def __init__(self, n_dims, scale=20., eps=1e-10):
method forward (line 123) | def forward(self, x):
FILE: mmdet/models/necks/ssh.py
class SSHContextModule (line 13) | class SSHContextModule(BaseModule):
method __init__ (line 31) | def __init__(self,
method forward (line 84) | def forward(self, x: torch.Tensor) -> tuple:
class SSHDetModule (line 93) | class SSHDetModule(BaseModule):
method __init__ (line 111) | def __init__(self,
method forward (line 139) | def forward(self, x: torch.Tensor) -> torch.Tensor:
class SSH (line 149) | class SSH(BaseModule):
method __init__ (line 183) | def __init__(self,
method forward (line 207) | def forward(self, inputs: Tuple[torch.Tensor]) -> tuple:
FILE: mmdet/models/necks/yolo_neck.py
class DetectionBlock (line 15) | class DetectionBlock(BaseModule):
method __init__ (line 38) | def __init__(self,
method forward (line 59) | def forward(self, x: Tensor) -> Tensor:
class YOLOV3Neck (line 69) | class YOLOV3Neck(BaseModule):
method __init__ (line 96) | def __init__(self,
method forward (line 125) | def forward(self, feats=Tuple[Tensor]) -> Tuple[Tensor]:
FILE: mmdet/models/necks/yolox_pafpn.py
class YOLOXPAFPN (line 14) | class YOLOXPAFPN(BaseModule):
method __init__ (line 35) | def __init__(self,
method forward (line 117) | def forward(self, inputs):
FILE: mmdet/models/roi_heads/base_roi_head.py
class BaseRoIHead (line 13) | class BaseRoIHead(BaseModule, metaclass=ABCMeta):
method __init__ (line 16) | def __init__(self,
method with_bbox (line 40) | def with_bbox(self) -> bool:
method with_mask (line 45) | def with_mask(self) -> bool:
method with_shared_head (line 50) | def with_shared_head(self) -> bool:
method init_bbox_head (line 55) | def init_bbox_head(self, *args, **kwargs):
method init_mask_head (line 60) | def init_mask_head(self, *args, **kwargs):
method init_assigner_sampler (line 65) | def init_assigner_sampler(self, *args, **kwargs):
method loss (line 70) | def loss(self, x: Tuple[Tensor], rpn_results_list: InstanceList,
method predict (line 75) | def predict(self,
FILE: mmdet/models/roi_heads/bbox_heads/bbox_head.py
class BBoxHead (line 23) | class BBoxHead(BaseModule):
method __init__ (line 27) | def __init__(self,
method custom_cls_channels (line 110) | def custom_cls_channels(self) -> bool:
method custom_activation (line 116) | def custom_activation(self) -> bool:
method custom_accuracy (line 122) | def custom_accuracy(self) -> bool:
method forward (line 126) | def forward(self, x: Tuple[Tensor]) -> tuple:
method _get_targets_single (line 155) | def _get_targets_single(self, pos_priors: Tensor, neg_priors: Tensor,
method get_targets (line 225) | def get_targets(self,
method loss_and_target (line 285) | def loss_and_target(self,
method loss (line 333) | def loss(self,
method predict_by_feat (line 425) | def predict_by_feat(self,
method _predict_by_feat_single (line 476) | def _predict_by_feat_single(
method refine_bboxes (line 573) | def refine_bboxes(self, sampling_results: Union[List[SamplingResult],
method regress_by_class (line 680) | def regress_by_class(self, priors: Tensor, label: Tensor,
FILE: mmdet/models/roi_heads/bbox_heads/convfc_bbox_head.py
class ConvFCBBoxHead (line 14) | class ConvFCBBoxHead(BBoxHead):
method __init__ (line 25) | def __init__(self,
method _add_conv_fc_branch (line 122) | def _add_conv_fc_branch(self,
method forward (line 163) | def forward(self, x: Tuple[Tensor]) -> tuple:
class Shared2FCBBoxHead (line 221) | class Shared2FCBBoxHead(ConvFCBBoxHead):
method __init__ (line 223) | def __init__(self, fc_out_channels: int = 1024, *args, **kwargs) -> None:
class Shared4Conv1FCBBoxHead (line 237) | class Shared4Conv1FCBBoxHead(ConvFCBBoxHead):
method __init__ (line 239) | def __init__(self, fc_out_channels: int = 1024, *args, **kwargs) -> None:
FILE: mmdet/models/roi_heads/bbox_heads/dii_head.py
class DIIHead (line 21) | class DIIHead(BBoxHead):
method __init__ (line 52) | def __init__(self,
method init_weights (line 131) | def init_weights(self) -> None:
method forward (line 146) | def forward(self, roi_feat: Tensor, proposal_feat: Tensor) -> tuple:
method loss_and_target (line 206) | def loss_and_target(self,
method _get_targets_single (line 286) | def _get_targets_single(self, pos_inds: Tensor, neg_inds: Tensor,
method get_targets (line 362) | def get_targets(self,
FILE: mmdet/models/roi_heads/bbox_heads/double_bbox_head.py
class BasicResBlock (line 15) | class BasicResBlock(BaseModule):
method __init__ (line 32) | def __init__(self,
method forward (line 69) | def forward(self, x: Tensor) -> Tensor:
class DoubleConvFCBBoxHead (line 84) | class DoubleConvFCBBoxHead(BBoxHead):
method __init__ (line 98) | def __init__(self,
method _add_conv_branch (line 143) | def _add_conv_branch(self) -> None:
method _add_fc_branch (line 155) | def _add_fc_branch(self) -> None:
method forward (line 165) | def forward(self, x_cls: Tensor, x_reg: Tensor) -> Tuple[Tensor]:
FILE: mmdet/models/roi_heads/bbox_heads/multi_instance_bbox_head.py
class MultiInstanceBBoxHead (line 20) | class MultiInstanceBBoxHead(BBoxHead):
method __init__ (line 57) | def __init__(self,
method _add_conv_fc_branch (line 182) | def _add_conv_fc_branch(self,
method forward (line 219) | def forward(self, x: Tuple[Tensor]) -> tuple:
method get_targets (line 303) | def get_targets(self,
method loss (line 382) | def loss(self, cls_score: Tensor, bbox_pred: Tensor, rois: Tensor,
method emd_loss (line 430) | def emd_loss(self, bbox_pred_0: Tensor, cls_score_0: Tensor,
method _predict_by_feat_single (line 491) | def _predict_by_feat_single(
method set_nms (line 573) | def set_nms(bboxes: Tensor,
FILE: mmdet/models/roi_heads/bbox_heads/sabl_head.py
class SABLHead (line 23) | class SABLHead(BBoxHead):
method __init__ (line 66) | def __init__(self,
method _add_fc_branch (line 217) | def _add_fc_branch(self, num_branch_fcs: int, in_channels: int,
method cls_forward (line 228) | def cls_forward(self, cls_x: Tensor) -> Tensor:
method attention_pool (line 236) | def attention_pool(self, reg_x: Tensor) -> tuple:
method side_aware_feature_extractor (line 249) | def side_aware_feature_extractor(self, reg_x: Tensor) -> tuple:
method reg_pred (line 270) | def reg_pred(self, x: Tensor, offset_fcs: nn.ModuleList,
method side_aware_split (line 289) | def side_aware_split(self, feat: Tensor) -> Tensor:
method bbox_pred_split (line 301) | def bbox_pred_split(self, bbox_pred: tuple,
method reg_forward (line 311) | def reg_forward(self, reg_x: Tensor) -> tuple:
method forward (line 331) | def forward(self, x: Tensor) -> tuple:
method get_targets (line 338) | def get_targets(self,
method bucket_target (line 361) | def bucket_target(self,
method _bucket_target_single (line 389) | def _bucket_target_single(self, pos_proposals: Tensor,
method loss (line 452) | def loss(self,
method _predict_by_feat_single (line 525) | def _predict_by_feat_single(
method refine_bboxes (line 597) | def refine_bboxes(self, sampling_results: List[SamplingResult],
method regress_by_class (line 660) | def regress_by_class(self, rois: Tensor, label: Tensor, bbox_pred: tuple,
FILE: mmdet/models/roi_heads/bbox_heads/scnet_bbox_head.py
class SCNetBBoxHead (line 11) | class SCNetBBoxHead(ConvFCBBoxHead):
method _forward_shared (line 18) | def _forward_shared(self, x: Tensor) -> Tensor:
method _forward_cls_reg (line 42) | def _forward_cls_reg(self, x: Tensor) -> Tuple[Tensor]:
method forward (line 80) | def forward(
FILE: mmdet/models/roi_heads/cascade_roi_head.py
class CascadeRoIHead (line 22) | class CascadeRoIHead(BaseRoIHead):
method __init__ (line 28) | def __init__(self,
method init_bbox_head (line 56) | def init_bbox_head(self, bbox_roi_extractor: MultiConfig,
method init_mask_head (line 79) | def init_mask_head(self, mask_roi_extractor: MultiConfig,
method init_assigner_sampler (line 108) | def init_assigner_sampler(self) -> None:
method _bbox_forward (line 122) | def _bbox_forward(self, stage: int, x: Tuple[Tensor],
method bbox_loss (line 150) | def bbox_loss(self, stage: int, x: Tuple[Tensor],
method _mask_forward (line 187) | def _mask_forward(self, stage: int, x: Tuple[Tensor],
method mask_loss (line 212) | def mask_loss(self, stage: int, x: Tuple[Tensor],
method loss (line 245) | def loss(self, x: Tuple[Tensor], rpn_results_list: InstanceList,
method predict_bbox (line 323) | def predict_bbox(self,
method predict_mask (line 383) | def predict_mask(self,
method _refine_roi (line 446) | def _refine_roi(self, x: Tuple[Tensor], rois: Tensor,
method forward (line 522) | def forward(self, x: Tuple[Tensor], rpn_results_list: InstanceList,
FILE: mmdet/models/roi_heads/double_roi_head.py
class DoubleHeadRoIHead (line 11) | class DoubleHeadRoIHead(StandardRoIHead):
method __init__ (line 19) | def __init__(self, reg_roi_scale_factor: float, **kwargs):
method _bbox_forward (line 23) | def _bbox_forward(self, x: Tuple[Tensor], rois: Tensor) -> dict:
FILE: mmdet/models/roi_heads/dynamic_roi_head.py
class DynamicRoIHead (line 21) | class DynamicRoIHead(StandardRoIHead):
method __init__ (line 24) | def __init__(self, **kwargs) -> None:
method loss (line 32) | def loss(self, x: Tuple[Tensor], rpn_results_list: InstanceList,
method bbox_loss (line 98) | def bbox_loss(self, x: Tuple[Tensor],
method update_hyperparameters (line 142) | def update_hyperparameters(self):
FILE: mmdet/models/roi_heads/grid_roi_head.py
class GridRoIHead (line 17) | class GridRoIHead(StandardRoIHead):
method __init__ (line 26) | def __init__(self, grid_roi_extractor: ConfigType, grid_head: ConfigType,
method _random_jitter (line 38) | def _random_jitter(self,
method forward (line 78) | def forward(self,
method loss (line 125) | def loss(self, x: Tuple[Tensor], rpn_results_list: InstanceList,
method bbox_loss (line 179) | def bbox_loss(self,
method predict_bbox (line 230) | def predict_bbox(self,
FILE: mmdet/models/roi_heads/htc_roi_head.py
class HybridTaskCascadeRoIHead (line 20) | class HybridTaskCascadeRoIHead(CascadeRoIHead):
method __init__ (line 40) | def __init__(self,
method with_semantic (line 66) | def with_semantic(self) -> bool:
method _bbox_forward (line 71) | def _bbox_forward(
method bbox_loss (line 110) | def bbox_loss(self,
method _mask_forward (line 152) | def _mask_forward(self,
method mask_loss (line 221) | def mask_loss(self,
method loss (line 263) | def loss(self, x: Tuple[Tensor], rpn_results_list: InstanceList,
method predict (line 382) | def predict(self,
method predict_mask (line 448) | def predict_mask(self,
method forward (line 520) | def forward(self, x: Tuple[Tensor], rpn_results_list: InstanceList,
FILE: mmdet/models/roi_heads/mask_heads/coarse_mask_head.py
class CoarseMaskHead (line 12) | class CoarseMaskHead(FCNMaskHead):
method __init__ (line 28) | def __init__(self,
method init_weights (line 86) | def init_weights(self) -> None:
method forward (line 90) | def forward(self, x: Tensor) -> Tensor:
FILE: mmdet/models/roi_heads/mask_heads/dynamic_mask_head.py
class DynamicMaskHead (line 16) | class DynamicMaskHead(FCNMaskHead):
method __init__ (line 47) | def __init__(self,
method init_weights (line 90) | def init_weights(self) -> None:
method forward (line 98) | def forward(self, roi_feat: Tensor, proposal_feat: Tensor) -> Tensor:
method loss_and_target (line 129) | def loss_and_target(self, mask_preds: Tensor,
FILE: mmdet/models/roi_heads/mask_heads/fcn_mask_head.py
class FCNMaskHead (line 29) | class FCNMaskHead(BaseModule):
method __init__ (line 31) | def __init__(self,
method init_weights (line 121) | def init_weights(self) -> None:
method forward (line 134) | def forward(self, x: Tensor) -> Tensor:
method get_targets (line 152) | def get_targets(self, sampling_results: List[SamplingResult],
method loss_and_target (line 178) | def loss_and_target(self, mask_preds: Tensor,
method predict_by_feat (line 218) | def predict_by_feat(self,
method _predict_by_feat_single (line 278) | def _predict_by_feat_single(self,
function _do_paste_mask (line 400) | def _do_paste_mask(masks: Tensor,
FILE: mmdet/models/roi_heads/mask_heads/feature_relay_head.py
class FeatureRelayHead (line 13) | class FeatureRelayHead(BaseModule):
method __init__ (line 28) | def __init__(
method forward (line 50) | def forward(self, x: Tensor) -> Optional[Tensor]:
FILE: mmdet/models/roi_heads/mask_heads/fused_semantic_head.py
class FusedSemanticHead (line 17) | class FusedSemanticHead(BaseModule):
method __init__ (line 33) | def __init__(
method forward (line 102) | def forward(self, feats: Tuple[Tensor]) -> Tuple[Tensor]:
method loss (line 130) | def loss(self, mask_preds: Tensor, labels: Tensor) -> Tensor:
FILE: mmdet/models/roi_heads/mask_heads/global_context_head.py
class GlobalContextHead (line 15) | class GlobalContextHead(BaseModule):
method __init__ (line 37) | def __init__(
method forward (line 89) | def forward(self, feats: Tuple[Tensor]) -> Tuple[Tensor]:
method loss (line 112) | def loss(self, pred: Tensor, labels: List[Tensor]) -> Tensor:
FILE: mmdet/models/roi_heads/mask_heads/grid_head.py
class GridHead (line 20) | class GridHead(BaseModule):
method __init__ (line 44) | def __init__(
method forward (line 185) | def forward(self, x: Tensor) -> Dict[str, Tensor]:
method calc_sub_regions (line 233) | def calc_sub_regions(self) -> List[Tuple[float]]:
method get_targets (line 264) | def get_targets(self, sampling_results: List[SamplingResult],
method loss (line 344) | def loss(self, grid_pred: Tensor, sample_idx: Tensor,
method predict_by_feat (line 367) | def predict_by_feat(self,
method _predict_by_feat_single (line 409) | def _predict_by_feat_single(self,
FILE: mmdet/models/roi_heads/mask_heads/htc_mask_head.py
class HTCMaskHead (line 12) | class HTCMaskHead(FCNMaskHead):
method __init__ (line 20) | def __init__(self, with_conv_res: bool = True, *args, **kwargs) -> None:
method forward (line 31) | def forward(self,
FILE: mmdet/models/roi_heads/mask_heads/mask_point_head.py
class MaskPointHead (line 23) | class MaskPointHead(BaseModule):
method __init__ (line 50) | def __init__(
method forward (line 97) | def forward(self, fine_grained_feats: Tensor,
method get_targets (line 119) | def get_targets(self, rois: Tensor, rel_roi_points: Tensor,
method _get_targets_single (line 162) | def _get_targets_single(self, rois: Tensor, rel_roi_points: Tensor,
method loss_and_target (line 183) | def loss_and_target(self, point_pred: Tensor, rel_roi_points: Tensor,
method get_roi_rel_points_train (line 217) | def get_roi_rel_points_train(self, mask_preds: Tensor, labels: Tensor,
method get_roi_rel_points_test (line 243) | def get_roi_rel_points_test(self, mask_preds: Tensor, label_preds: Ten...
FILE: mmdet/models/roi_heads/mask_heads/maskiou_head.py
class MaskIoUHead (line 20) | class MaskIoUHead(BaseModule):
method __init__ (line 42) | def __init__(
method forward (line 94) | def forward(self, mask_feat: Tensor, mask_preds: Tensor) -> Tensor:
method loss_and_target (line 117) | def loss_and_target(self, mask_iou_pred: Tensor, mask_preds: Tensor,
method get_targets (line 157) | def get_targets(self, sampling_results: List[SamplingResult],
method _get_area_ratio (line 209) | def _get_area_ratio(self, pos_proposals: Tensor,
method predict_by_feat (line 249) | def predict_by_feat(self, mask_iou_preds: Tuple[Tensor],
FILE: mmdet/models/roi_heads/mask_heads/scnet_mask_head.py
class SCNetMaskHead (line 8) | class SCNetMaskHead(FCNMaskHead):
method __init__ (line 16) | def __init__(self, conv_to_res: bool = True, **kwargs) -> None:
FILE: mmdet/models/roi_heads/mask_heads/scnet_semantic_head.py
class SCNetSemanticHead (line 8) | class SCNetSemanticHead(FusedSemanticHead):
method __init__ (line 16) | def __init__(self, conv_to_res: bool = True, **kwargs) -> None:
FILE: mmdet/models/roi_heads/mask_scoring_roi_head.py
class MaskScoringRoIHead (line 17) | class MaskScoringRoIHead(StandardRoIHead):
method __init__ (line 26) | def __init__(self, mask_iou_head: ConfigType, **kwargs):
method forward (line 31) | def forward(self,
method mask_loss (line 76) | def mask_loss(self, x: Tuple[Tensor],
method predict_mask (line 147) | def predict_mask(self,
FILE: mmdet/models/roi_heads/multi_instance_roi_head.py
class MultiInstanceRoIHead (line 16) | class MultiInstanceRoIHead(StandardRoIHead):
method __init__ (line 19) | def __init__(self, num_instance: int = 2, *args, **kwargs) -> None:
method init_bbox_head (line 23) | def init_bbox_head(self, bbox_roi_extractor: ConfigType,
method _bbox_forward (line 35) | def _bbox_forward(self, x: Tuple[Tensor], rois: Tensor) -> dict:
method bbox_loss (line 72) | def bbox_loss(self, x: Tuple[Tensor],
method loss (line 120) | def loss(self, x: Tuple[Tensor], rpn_results_list: InstanceList,
method predict_bbox (line 164) | def predict_bbox(self,
FILE: mmdet/models/roi_heads/pisa_roi_head.py
class PISARoIHead (line 17) | class PISARoIHead(StandardRoIHead):
method loss (line 21) | def loss(self, x: Tuple[Tensor], rpn_results_list: InstanceList,
method bbox_loss (line 79) | def bbox_loss(self,
FILE: mmdet/models/roi_heads/point_rend_roi_head.py
class PointRendRoIHead (line 19) | class PointRendRoIHead(StandardRoIHead):
method __init__ (line 22) | def __init__(self, point_head: ConfigType, *args, **kwargs) -> None:
method init_point_head (line 27) | def init_point_head(self, point_head: ConfigType) -> None:
method mask_loss (line 31) | def mask_loss(self, x: Tuple[Tensor],
method _mask_point_loss (line 52) | def _mask_point_loss(self, x: Tuple[Tensor],
method _mask_point_forward_test (line 78) | def _mask_point_forward_test(self, x: Tuple[Tensor], rois: Tensor,
method _get_fine_grained_point_feats (line 130) | def _get_fine_grained_point_feats(self, x: Tuple[Tensor], rois: Tensor,
method predict_mask (line 170) | def predict_mask(self,
FILE: mmdet/models/roi_heads/roi_extractors/base_roi_extractor.py
class BaseRoIExtractor (line 14) | class BaseRoIExtractor(BaseModule, metaclass=ABCMeta):
method __init__ (line 26) | def __init__(self,
method num_inputs (line 37) | def num_inputs(self) -> int:
method build_roi_layers (line 41) | def build_roi_layers(self, layer_cfg: ConfigType,
method roi_rescale (line 67) | def roi_rescale(self, rois: Tensor, scale_factor: float) -> Tensor:
method forward (line 92) | def forward(self,
FILE: mmdet/models/roi_heads/roi_extractors/generic_roi_extractor.py
class GenericRoIExtractor (line 13) | class GenericRoIExtractor(BaseRoIExtractor):
method __init__ (line 30) | def __init__(self,
method forward (line 48) | def forward(self,
FILE: mmdet/models/roi_heads/roi_extractors/single_level_roi_extractor.py
class SingleRoIExtractor (line 13) | class SingleRoIExtractor(BaseRoIExtractor):
method __init__ (line 31) | def __init__(self,
method map_roi_levels (line 44) | def map_roi_levels(self, rois: Tensor, num_levels: int) -> Tensor:
method forward (line 65) | def forward(self,
FILE: mmdet/models/roi_heads/scnet_roi_head.py
class SCNetRoIHead (line 20) | class SCNetRoIHead(CascadeRoIHead):
method __init__ (line 32) | def __init__(self,
method init_mask_head (line 57) | def init_mask_head(self, mask_roi_extractor: ConfigType,
method with_semantic (line 66) | def with_semantic(self) -> bool:
method with_feat_relay (line 72) | def with_feat_relay(self) -> bool:
method with_glbctx (line 78) | def with_glbctx(self) -> bool:
method _fuse_glbctx (line 82) | def _fuse_glbctx(self, roi_feats: Tensor, glbctx_feat: Tensor,
method _slice_pos_feats (line 106) | def _slice_pos_feats(self, feats: Tensor,
method _bbox_forward (line 128) | def _bbox_forward(self,
method _mask_forward (line 173) | def _mask_forward(self,
method bbox_loss (line 213) | def bbox_loss(self,
method mask_loss (line 261) | def mask_loss(self,
method semantic_loss (line 303) | def semantic_loss(self, x: Tuple[Tensor],
method global_context_loss (line 331) | def global_context_loss(self, x: Tuple[Tensor],
method loss (line 357) | def loss(self, x: Tensor, rpn_results_list: InstanceList,
method predict (line 464) | def predict(self,
method predict_mask (line 537) | def predict_mask(self,
method forward (line 611) | def forward(self, x: Tuple[Tensor], rpn_results_list: InstanceList,
FILE: mmdet/models/roi_heads/shared_heads/res_layer.py
class ResLayer (line 13) | class ResLayer(BaseModule):
method __init__ (line 15) | def __init__(self,
method forward (line 69) | def forward(self, x):
method train (line 74) | def train(self, mode=True):
FILE: mmdet/models/roi_heads/sparse_roi_head.py
class SparseRoIHead (line 19) | class SparseRoIHead(CascadeRoIHead):
method __init__ (line 44) | def __init__(self,
method bbox_loss (line 93) | def bbox_loss(self, stage: int, x: Tuple[Tensor],
method _bbox_forward (line 173) | def _bbox_forward(self, stage: int, x: Tuple[Tensor], rois: Tensor,
method _mask_forward (line 248) | def _mask_forward(self, stage: int, x: Tuple[Tensor], rois: Tensor,
method mask_loss (line 276) | def mask_loss(self, stage: int, x: Tuple[Tensor], bbox_results: dict,
method loss (line 316) | def loss(self, x: Tuple[Tensor], rpn_results_list: InstanceList,
method predict_bbox (line 372) | def predict_bbox(self,
method predict_mask (line 460) | def predict_mask(self,
method forward (line 545) | def forward(self, x: Tuple[Tensor], rpn_results_list: InstanceList,
FILE: mmdet/models/roi_heads/standard_roi_head.py
class StandardRoIHead (line 17) | class StandardRoIHead(BaseRoIHead):
method init_assigner_sampler (line 20) | def init_assigner_sampler(self) -> None:
method init_bbox_head (line 29) | def init_bbox_head(self, bbox_roi_extractor: ConfigType,
method init_mask_head (line 41) | def init_mask_head(self, mask_roi_extractor: ConfigType,
method forward (line 59) | def forward(self,
method loss (line 94) | def loss(self, x: Tuple[Tensor], rpn_results_list: InstanceList,
method _bbox_forward (line 147) | def _bbox_forward(self, x: Tuple[Tensor], rois: Tensor) -> dict:
method bbox_loss (line 173) | def bbox_loss(self, x: Tuple[Tensor],
method mask_loss (line 203) | def mask_loss(self, x: Tuple[Tensor],
method _mask_forward (line 257) | def _mask_forward(self,
method predict_bbox (line 293) | def predict_bbox(self,
method predict_mask (line 365) | def predict_mask(self,
FILE: mmdet/models/roi_heads/test_mixins.py
class BBoxTestMixin (line 15) | class BBoxTestMixin:
method async_test_bboxes (line 19) | async def async_test_bboxes(self,
method aug_test_bboxes (line 52) | def aug_test_bboxes(self, feats, img_metas, rpn_results_list,
class MaskTestMixin (line 94) | class MaskTestMixin:
method async_test_mask (line 98) | async def async_test_mask(self,
method aug_test_mask (line 141) | def aug_test_mask(self, feats, img_metas, det_bboxes, det_labels):
FILE: mmdet/models/roi_heads/trident_roi_head.py
class TridentRoIHead (line 16) | class TridentRoIHead(StandardRoIHead):
method __init__ (line 26) | def __init__(self, num_branch: int, test_branch_idx: int,
method merge_trident_bboxes (line 32) | def merge_trident_bboxes(self,
method predict (line 63) | def predict(self,
FILE: mmdet/models/seg_heads/base_semantic_head.py
class BaseSemanticHead (line 15) | class BaseSemanticHead(BaseModule, metaclass=ABCMeta):
method __init__ (line 29) | def __init__(self,
method forward (line 43) | def forward(self, x: Union[Tensor, Tuple[Tensor]]) -> Dict[str, Tensor]:
method loss (line 57) | def loss(self, x: Union[Tensor, Tuple[Tensor]],
method predict (line 74) | def predict(self,
FILE: mmdet/models/seg_heads/panoptic_fpn_head.py
class PanopticFPNHead (line 19) | class PanopticFPNHead(BaseSemanticHead):
method __init__ (line 46) | def __init__(self,
method _set_things_to_void (line 87) | def _set_things_to_void(self, gt_semantic_seg: Tensor) -> Tensor:
method loss (line 108) | def loss(self, x: Union[Tensor, Tuple[Tensor]],
method init_weights (line 146) | def init_weights(self) -> None:
method forward (line 152) | def forward(self, x: Tuple[Tensor]) -> Dict[str, Tensor]:
FILE: mmdet/models/seg_heads/panoptic_fusion_heads/base_panoptic_fusion_head.py
class BasePanopticFusionHead (line 11) | class BasePanopticFusionHead(BaseModule, metaclass=ABCMeta):
method __init__ (line 14) | def __init__(self,
method with_loss (line 33) | def with_loss(self) -> bool:
method loss (line 38) | def loss(self, **kwargs):
method predict (line 42) | def predict(self, **kwargs):
FILE: mmdet/models/seg_heads/panoptic_fusion_heads/heuristic_fusion_head.py
class HeuristicFusionHead (line 15) | class HeuristicFusionHead(BasePanopticFusionHead):
method __init__ (line 18) | def __init__(self,
method loss (line 32) | def loss(self, **kwargs) -> dict:
method _lay_masks (line 36) | def _lay_masks(self,
method _predict_single (line 95) | def _predict_single(self, mask_results: InstanceData, seg_preds: Tensor,
method predict (line 140) | def predict(self, mask_results_list: InstanceList,
FILE: mmdet/models/seg_heads/panoptic_fusion_heads/maskformer_fusion_head.py
class MaskFormerFusionHead (line 18) | class MaskFormerFusionHead(BasePanopticFusionHead):
method __init__ (line 22) | def __init__(self,
method loss (line 37) | def loss(self, **kwargs):
method panoptic_postprocess (line 41) | def panoptic_postprocess(self, mask_cls: Tensor,
method semantic_postprocess (line 108) | def semantic_postprocess(self, mask_cls: Tensor,
method instance_postprocess (line 126) | def instance_postprocess(self, mask_cls: Tensor,
method predict (line 184) | def predict(self,
FILE: mmdet/models/task_modules/assigners/approx_max_iou_assigner.py
class ApproxMaxIoUAssigner (line 14) | class ApproxMaxIoUAssigner(MaxIoUAssigner):
method __init__ (line 46) | def __init__(
method assign (line 68) | def assign(self,
FILE: mmdet/models/task_modules/assigners/assign_result.py
class AssignResult (line 8) | class AssignResult(util_mixins.NiceRepr):
method __init__ (line 41) | def __init__(self, num_gts: int, gt_inds: Tensor, max_overlaps: Tensor,
method num_preds (line 51) | def num_preds(self):
method set_extra_property (line 55) | def set_extra_property(self, key, value):
method get_extra_property (line 60) | def get_extra_property(self, key):
method info (line 65) | def info(self):
method __nice__ (line 77) | def __nice__(self):
method random (line 97) | def random(cls, **kwargs):
method add_gt_ (line 185) | def add_gt_(self, gt_labels):
FILE: mmdet/models/task_modules/assigners/atss_assigner.py
function bbox_center_distance (line 15) | def bbox_center_distance(bboxes: Tensor, priors: Tensor) -> Tensor:
class ATSSAssigner (line 40) | class ATSSAssigner(BaseAssigner):
method __init__ (line 63) | def __init__(self,
method assign (line 74) | def assign(
FILE: mmdet/models/task_modules/assigners/base_assigner.py
class BaseAssigner (line 8) | class BaseAssigner(metaclass=ABCMeta):
method assign (line 12) | def assign(self,
FILE: mmdet/models/task_modules/assigners/center_region_assigner.py
function scale_boxes (line 14) | def scale_boxes(bboxes: Tensor, scale: float) -> Tensor:
function is_located_in (line 41) | def is_located_in(points: Tensor, bboxes: Tensor) -> Tensor:
function bboxes_area (line 60) | def bboxes_area(bboxes: Tensor) -> Tensor:
class CenterRegionAssigner (line 77) | class CenterRegionAssigner(BaseAssigner):
method __init__ (line 101) | def __init__(
method get_gt_priorities (line 117) | def get_gt_priorities(self, gt_bboxes: Tensor) -> Tensor:
method assign (line 135) | def assign(self,
method assign_one_hot_gt_indices (line 286) | def assign_one_hot_gt_indices(
FILE: mmdet/models/task_modules/assigners/dynamic_soft_label_assigner.py
function center_of_mass (line 19) | def center_of_mass(masks: Tensor, eps: float = 1e-7) -> Tensor:
class DynamicSoftLabelAssigner (line 40) | class DynamicSoftLabelAssigner(BaseAssigner):
method __init__ (line 54) | def __init__(
method assign (line 66) | def assign(self,
method dynamic_k_matching (line 186) | def dynamic_k_matching(self, cost: Tensor, pairwise_ious: Tensor,
FILE: mmdet/models/task_modules/assigners/grid_assigner.py
class GridAssigner (line 14) | class GridAssigner(BaseAssigner):
method __init__ (line 38) | def __init__(
method assign (line 52) | def assign(self,
FILE: mmdet/models/task_modules/assigners/hungarian_assigner.py
class HungarianAssigner (line 16) | class HungarianAssigner(BaseAssigner):
method __init__ (line 36) | def __init__(
method assign (line 51) | def assign(self,
FILE: mmdet/models/task_modules/assigners/iou2d_calculator.py
function cast_tensor_type (line 8) | def cast_tensor_type(x, scale=1., dtype=None):
class BboxOverlaps2D (line 16) | class BboxOverlaps2D:
method __init__ (line 19) | def __init__(self, scale=1., dtype=None):
method __call__ (line 23) | def __call__(self, bboxes1, bboxes2, mode='iou', is_aligned=False):
method __repr__ (line 64) | def __repr__(self):
FILE: mmdet/models/task_modules/assigners/match_cost.py
class BaseMatchCost (line 14) | class BaseMatchCost:
method __init__ (line 21) | def __init__(self, weight: Union[float, int] = 1.) -> None:
method __call__ (line 25) | def __call__(self,
class BBoxL1Cost (line 52) | class BBoxL1Cost(BaseMatchCost):
method __init__ (line 75) | def __init__(self,
method __call__ (line 82) | def __call__(self,
class IoUCost (line 120) | class IoUCost(BaseMatchCost):
method __init__ (line 142) | def __init__(self, iou_mode: str = 'giou', weight: Union[float, int] =...
method __call__ (line 146) | def __call__(self,
class ClassificationCost (line 175) | class ClassificationCost(BaseMatchCost):
method __init__ (line 196) | def __init__(self, weight: Union[float, int] = 1) -> None:
method __call__ (line 199) | def __call__(self,
class FocalLossCost (line 227) | class FocalLossCost(BaseMatchCost):
method __init__ (line 240) | def __init__(self,
method _focal_loss_cost (line 252) | def _focal_loss_cost(self, cls_pred: Tensor, gt_labels: Tensor) -> Ten...
method _mask_focal_loss_cost (line 271) | def _mask_focal_loss_cost(self, cls_pred, gt_labels) -> Tensor:
method __call__ (line 296) | def __call__(self,
class DiceCost (line 324) | class DiceCost(BaseMatchCost):
method __init__ (line 338) | def __init__(self,
method _binary_mask_dice_loss (line 348) | def _binary_mask_dice_loss(self, mask_preds: Tensor,
method __call__ (line 372) | def __call__(self,
class CrossEntropyLossCost (line 399) | class CrossEntropyLossCost(BaseMatchCost):
method __init__ (line 408) | def __init__(self,
method _binary_cross_entropy (line 414) | def _binary_cross_entropy(self, cls_pred: Tensor,
method __call__ (line 439) | def __call__(self,
FILE: mmdet/models/task_modules/assigners/max_iou_assigner.py
class MaxIoUAssigner (line 14) | class MaxIoUAssigner(BaseAssigner):
method __init__ (line 50) | def __init__(self,
method assign (line 70) | def assign(self,
method assign_wrt_overlaps (line 162) | def assign_wrt_overlaps(self, overlaps: Tensor,
FILE: mmdet/models/task_modules/assigners/multi_instance_assigner.py
class MultiInstanceAssigner (line 13) | class MultiInstanceAssigner(MaxIoUAssigner):
method __init__ (line 22) | def __init__(self, num_instance: int = 2, **kwargs):
method assign (line 26) | def assign(self,
FILE: mmdet/models/task_modules/assigners/point_assigner.py
class PointAssigner (line 13) | class PointAssigner(BaseAssigner):
method __init__ (line 23) | def __init__(self, scale: int = 4, pos_num: int = 3) -> None:
method assign (line 27) | def assign(self,
FILE: mmdet/models/task_modules/assigners/region_assigner.py
function calc_region (line 14) | def calc_region(
function anchor_ctr_inside_region_flags (line 35) | def anchor_ctr_inside_region_flags(anchors: Tensor, stride: int,
class RegionAssigner (line 47) | class RegionAssigner(BaseAssigner):
method __init__ (line 63) | def __init__(self,
method assign (line 69) | def assign(self,
FILE: mmdet/models/task_modules/assigners/sim_ota_assigner.py
class SimOTAAssigner (line 19) | class SimOTAAssigner(BaseAssigner):
method __init__ (line 35) | def __init__(self,
method assign (line 47) | def assign(self,
method get_in_gt_and_in_center_info (line 145) | def get_in_gt_and_in_center_info(
method dynamic_k_matching (line 192) | def dynamic_k_matching(self, cost: Tensor, pairwise_ious: Tensor,
FILE: mmdet/models/task_modules/assigners/task_aligned_assigner.py
class TaskAlignedAssigner (line 16) | class TaskAlignedAssigner(BaseAssigner):
method __init__ (line 34) | def __init__(self,
method assign (line 41) | def assign(self,
FILE: mmdet/models/task_modules/assigners/uniform_assigner.py
class UniformAssigner (line 15) | class UniformAssigner(BaseAssigner):
method __init__ (line 29) | def __init__(self,
method assign (line 39) | def assign(
FILE: mmdet/models/task_modules/builder.py
function build_bbox_coder (line 15) | def build_bbox_coder(cfg, **default_args):
function build_iou_calculator (line 22) | def build_iou_calculator(cfg, default_args=None):
function build_match_cost (line 30) | def build_match_cost(cfg, default_args=None):
function build_assigner (line 37) | def build_assigner(cfg, **default_args):
function build_sampler (line 44) | def build_sampler(cfg, **default_args):
function build_prior_generator (line 51) | def build_prior_generator(cfg, default_args=None):
function build_anchor_generator (line 58) | def build_anchor_generator(cfg, default_args=None):
FILE: mmdet/models/task_modules/coders/base_bbox_coder.py
class BaseBBoxCoder (line 5) | class BaseBBoxCoder(metaclass=ABCMeta):
method __init__ (line 16) | def __init__(self, use_box_type: bool = False, **kwargs):
method encode (line 20) | def encode(self, bboxes, gt_bboxes):
method decode (line 24) | def decode(self, bboxes, bboxes_pred):
FILE: mmdet/models/task_modules/coders/bucketing_bbox_coder.py
class BucketingBBoxCoder (line 12) | class BucketingBBoxCoder(BaseBBoxCoder):
method __init__ (line 34) | def __init__(self,
method encode (line 50) | def encode(self, bboxes, gt_bboxes):
method decode (line 74) | def decode(self, bboxes, pred_bboxes, max_shape=None):
function generat_buckets (line 100) | def generat_buckets(proposals, num_buckets, scale_factor=1.0):
function bbox2bucket (line 148) | def bbox2bucket(proposals,
function bucket2bbox (line 271) | def bucket2bbox(proposals,
FILE: mmdet/models/task_modules/coders/delta_xywh_bbox_coder.py
class DeltaXYWHBBoxCoder (line 13) | class DeltaXYWHBBoxCoder(BaseBBoxCoder):
method __init__ (line 34) | def __init__(self,
method encode (line 48) | def encode(self, bboxes, gt_bboxes):
method decode (line 68) | def decode(self,
function bbox2delta (line 126) | def bbox2delta(proposals, gt, means=(0., 0., 0., 0.), stds=(1., 1., 1., ...
function delta2bbox (line 171) | def delta2bbox(rois,
function onnx_delta2bbox (line 270) | def onnx_delta2bbox(rois,
FILE: mmdet/models/task_modules/coders/distance_point_bbox_coder.py
class DistancePointBBoxCoder (line 9) | class DistancePointBBoxCoder(BaseBBoxCoder):
method __init__ (line 20) | def __init__(self, clip_border=True, **kwargs):
method encode (line 24) | def encode(self, points, gt_bboxes, max_dis=None, eps=0.1):
method decode (line 44) | def decode(self, points, pred_bboxes, max_shape=None):
FILE: mmdet/models/task_modules/coders/legacy_delta_xywh_bbox_coder.py
class LegacyDeltaXYWHBBoxCoder (line 11) | class LegacyDeltaXYWHBBoxCoder(BaseBBoxCoder):
method __init__ (line 34) | def __init__(self,
method encode (line 42) | def encode(self, bboxes, gt_bboxes):
method decode (line 63) | def decode(self,
function legacy_bbox2delta (line 94) | def legacy_bbox2delta(proposals,
function legacy_delta2bbox (line 142) | def legacy_delta2bbox(rois,
FILE: mmdet/models/task_modules/coders/pseudo_bbox_coder.py
class PseudoBBoxCoder (line 8) | class PseudoBBoxCoder(BaseBBoxCoder):
method __init__ (line 11) | def __init__(self, **kwargs):
method encode (line 14) | def encode(self, bboxes, gt_bboxes):
method decode (line 19) | def decode(self, bboxes, pred_bboxes):
FILE: mmdet/models/task_modules/coders/tblr_bbox_coder.py
class TBLRBBoxCoder (line 10) | class TBLRBBoxCoder(BaseBBoxCoder):
method __init__ (line 26) | def __init__(self, normalizer=4.0, clip_border=True, **kwargs):
method encode (line 31) | def encode(self, bboxes, gt_bboxes):
method decode (line 53) | def decode(self, bboxes, pred_bboxes, max_shape=None):
function bboxes2tblr (line 83) | def bboxes2tblr(priors, gts, normalizer=4.0, normalize_by_wh=True):
function tblr2bboxes (line 129) | def tblr2bboxes(priors,
FILE: mmdet/models/task_modules/coders/yolo_bbox_coder.py
class YOLOBBoxCoder (line 10) | class YOLOBBoxCoder(BaseBBoxCoder):
method __init__ (line 22) | def __init__(self, eps=1e-6, **kwargs):
method encode (line 26) | def encode(self, bboxes, gt_bboxes, stride):
method decode (line 62) | def decode(self, bboxes, pred_bboxes, stride):
FILE: mmdet/models/task_modules/prior_generators/anchor_generator.py
class AnchorGenerator (line 18) | class AnchorGenerator:
method __init__ (line 69) | def __init__(self,
method num_base_anchors (line 126) | def num_base_anchors(self) -> List[int]:
method num_base_priors (line 131) | def num_base_priors(self) -> List[int]:
method num_levels (line 137) | def num_levels(self) -> int:
method gen_base_anchors (line 141) | def gen_base_anchors(self) -> List[Tensor]:
method gen_single_level_base_anchors (line 161) | def gen_single_level_base_anchors(self,
method _meshgrid (line 207) | def _meshgrid(self,
method grid_priors (line 230) | def grid_priors(self,
method single_level_grid_priors (line 259) | def single_level_grid_priors(self,
method sparse_priors (line 303) | def sparse_priors(self,
method grid_anchors (line 338) | def grid_anchors(self,
method single_level_grid_anchors (line 370) | def single_level_grid_anchors(self,
method valid_f
Condensed preview — 875 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (7,134K chars).
[
{
"path": ".circleci/config.yml",
"chars": 1276,
"preview": "version: 2.1\n\n# this allows you to use CircleCI's dynamic configuration feature\nsetup: true\n\n# the path-filtering orb is"
},
{
"path": ".circleci/docker/Dockerfile",
"chars": 527,
"preview": "ARG PYTORCH=\"1.8.1\"\nARG CUDA=\"10.2\"\nARG CUDNN=\"7\"\n\nFROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel\n\n# To"
},
{
"path": ".circleci/test.yml",
"chars": 6617,
"preview": "version: 2.1\n\n# the default pipeline parameters, which will be updated according to\n# the results of the path-filtering "
},
{
"path": ".dev_scripts/batch_test_list.py",
"chars": 29576,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\n\n# missing wider_face/timm_example/strong_baselines/simple_copy_paste/\n#"
},
{
"path": ".dev_scripts/batch_train_list.txt",
"chars": 4196,
"preview": "configs/albu_example/mask-rcnn_r50_fpn_albu_1x_coco.py\nconfigs/atss/atss_r50_fpn_1x_coco.py\nconfigs/autoassign/autoassig"
},
{
"path": ".dev_scripts/benchmark_filter.py",
"chars": 7106,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport argparse\nimport os\nimport os.path as osp\n\n\ndef parse_args():\n "
},
{
"path": ".dev_scripts/benchmark_full_models.txt",
"chars": 4152,
"preview": "albu_example/mask-rcnn_r50_fpn_albu_1x_coco.py\natss/atss_r50_fpn_1x_coco.py\nautoassign/autoassign_r50-caffe_fpn_1x_coco."
},
{
"path": ".dev_scripts/benchmark_inference_fps.py",
"chars": 6830,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport argparse\nimport os\nimport os.path as osp\n\nfrom mmengine.config im"
},
{
"path": ".dev_scripts/benchmark_options.py",
"chars": 441,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\n\nthird_part_libs = [\n 'pip install -r ../requirements/albu.txt',\n "
},
{
"path": ".dev_scripts/benchmark_test.py",
"chars": 4055,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport logging\nimport os\nimport os.path as osp\nfrom argparse import Argu"
},
{
"path": ".dev_scripts/benchmark_test_image.py",
"chars": 4670,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport logging\nimport os.path as osp\nfrom argparse import ArgumentParser"
},
{
"path": ".dev_scripts/benchmark_train.py",
"chars": 6412,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport logging\nimport os\nimport os.path as osp\nfrom argparse import Argu"
},
{
"path": ".dev_scripts/benchmark_train_models.txt",
"chars": 839,
"preview": "atss/atss_r50_fpn_1x_coco.py\nfaster_rcnn/faster-rcnn_r50_fpn_1x_coco.py\nmask_rcnn/mask-rcnn_r50_fpn_1x_coco.py\ncascade_r"
},
{
"path": ".dev_scripts/benchmark_valid_flops.py",
"chars": 10539,
"preview": "import logging\nimport re\nimport tempfile\nfrom argparse import ArgumentParser\nfrom collections import OrderedDict\nfrom fu"
},
{
"path": ".dev_scripts/check_links.py",
"chars": 5064,
"preview": "# Modified from:\n# https://github.com/allenai/allennlp/blob/main/scripts/check_links.py\n\nimport argparse\nimport logging\n"
},
{
"path": ".dev_scripts/convert_test_benchmark_script.py",
"chars": 3414,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport argparse\nimport os\nimport os.path as osp\n\nfrom mmengine import Co"
},
{
"path": ".dev_scripts/convert_train_benchmark_script.py",
"chars": 2993,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport argparse\nimport os\nimport os.path as osp\n\n\ndef parse_args():\n "
},
{
"path": ".dev_scripts/covignore.cfg",
"chars": 145,
"preview": "# Each line should be the relative path to the root directory\n# of this repo. Support regular expression as well.\n# For "
},
{
"path": ".dev_scripts/diff_coverage_test.sh",
"chars": 1456,
"preview": "#!/bin/bash\n\nreadarray -t IGNORED_FILES < $( dirname \"$0\" )/covignore.cfg\nREUSE_COVERAGE_REPORT=${REUSE_COVERAGE_REPORT:"
},
{
"path": ".dev_scripts/download_checkpoints.py",
"chars": 2822,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\n\nimport argparse\nimport math\nimport os\nimport os.path as osp\nfrom multip"
},
{
"path": ".dev_scripts/gather_models.py",
"chars": 12549,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport argparse\nimport glob\nimport json\nimport os.path as osp\nimport shu"
},
{
"path": ".dev_scripts/gather_test_benchmark_metric.py",
"chars": 3963,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport argparse\nimport glob\nimport os.path as osp\n\nfrom mmengine.config "
},
{
"path": ".dev_scripts/gather_train_benchmark_metric.py",
"chars": 5904,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport argparse\nimport glob\nimport os.path as osp\n\nfrom gather_models im"
},
{
"path": ".dev_scripts/linter.sh",
"chars": 90,
"preview": "yapf -r -i mmdet/ configs/ tests/ tools/\nisort -rc mmdet/ configs/ tests/ tools/\nflake8 .\n"
},
{
"path": ".dev_scripts/test_benchmark.sh",
"chars": 30779,
"preview": "PARTITION=$1\nCHECKPOINT_DIR=$2\nWORK_DIR=$3\nCPUS_PER_TASK=${4:-2}\n\necho 'configs/atss/atss_r50_fpn_1x_coco.py' &\nGPUS=8 "
},
{
"path": ".dev_scripts/test_init_backbone.py",
"chars": 6556,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\n\"\"\"Check out backbone whether successfully load pretrained checkpoint.\"\""
},
{
"path": ".dev_scripts/train_benchmark.sh",
"chars": 26925,
"preview": "PARTITION=$1\nWORK_DIR=$2\nCPUS_PER_TASK=${3:-4}\n\necho 'configs/albu_example/mask-rcnn_r50_fpn_albu_1x_coco.py' &\nGPUS=8 "
},
{
"path": ".github/CODE_OF_CONDUCT.md",
"chars": 3355,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
},
{
"path": ".github/CONTRIBUTING.md",
"chars": 213,
"preview": "We appreciate all contributions to improve MMDetection. Please refer to [CONTRIBUTING.md](https://github.com/open-mmlab/"
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 329,
"preview": "blank_issues_enabled: false\n\ncontact_links:\n - name: Common Issues\n url: https://mmdetection.readthedocs.io/en/lates"
},
{
"path": ".github/ISSUE_TEMPLATE/error-report.md",
"chars": 1433,
"preview": "---\nname: Error report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n---\n\nThanks for your"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.md",
"chars": 707,
"preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n---\n\n**Describe the"
},
{
"path": ".github/ISSUE_TEMPLATE/general_questions.md",
"chars": 108,
"preview": "---\nname: General questions\nabout: Ask general questions to get help\ntitle: ''\nlabels: ''\nassignees: ''\n---\n"
},
{
"path": ".github/ISSUE_TEMPLATE/reimplementation_questions.md",
"chars": 2635,
"preview": "---\nname: Reimplementation Questions\nabout: Ask about questions during model reimplementation\ntitle: ''\nlabels: reimplem"
},
{
"path": ".github/pull_request_template.md",
"chars": 1310,
"preview": "Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more he"
},
{
"path": ".github/workflows/deploy.yml",
"chars": 734,
"preview": "name: deploy\n\non: push\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: true\n\njobs:"
},
{
"path": ".gitignore",
"chars": 1377,
"preview": "# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packagi"
},
{
"path": ".owners.yml",
"chars": 207,
"preview": "assign:\n strategy:\n # random\n daily-shift-based\n scedule:\n '*/1 * * * *'\n assignees:\n - Czm369\n - hhaA"
},
{
"path": ".pre-commit-config-zh-cn.yaml",
"chars": 1667,
"preview": "exclude: ^tests/data/\nrepos:\n - repo: https://gitee.com/openmmlab/mirrors-flake8\n rev: 5.0.4\n hooks:\n - id: "
},
{
"path": ".pre-commit-config.yaml",
"chars": 1452,
"preview": "repos:\n - repo: https://github.com/PyCQA/flake8\n rev: 5.0.4\n hooks:\n - id: flake8\n - repo: https://github.c"
},
{
"path": ".readthedocs.yml",
"chars": 151,
"preview": "version: 2\n\nformats: all\n\npython:\n version: 3.7\n install:\n - requirements: requirements/docs.txt\n - requirements"
},
{
"path": "CITATION.cff",
"chars": 273,
"preview": "cff-version: 1.2.0\nmessage: \"If you use this software, please cite it as below.\"\nauthors:\n - name: \"MMDetection Contrib"
},
{
"path": "LICENSE",
"chars": 17682,
"preview": "## creative commons\n\n# Attribution-NonCommercial 4.0 International\n\nCreative Commons Corporation (“Creative Commons”) is"
},
{
"path": "MANIFEST.in",
"chars": 205,
"preview": "include requirements/*.txt\ninclude mmdet/VERSION\ninclude mmdet/.mim/model-index.yml\ninclude mmdet/.mim/demo/*/*\nrecursiv"
},
{
"path": "README.md",
"chars": 13900,
"preview": "# <p align=center> 🌟 `CrossKD: Cross-Head Knowledge Distillation for Dense Object Detection` 🌟 </p>\n\n,\n logger=dict(type='LoggerHook', "
},
{
"path": "configs/_base_/models/cascade-mask-rcnn_r50_fpn.py",
"chars": 7169,
"preview": "# model settings\nmodel = dict(\n type='CascadeRCNN',\n data_preprocessor=dict(\n type='DetDataPreprocessor',\n "
},
{
"path": "configs/_base_/models/cascade-rcnn_r50_fpn.py",
"chars": 6521,
"preview": "# model settings\nmodel = dict(\n type='CascadeRCNN',\n data_preprocessor=dict(\n type='DetDataPreprocessor',\n "
},
{
"path": "configs/_base_/models/fast-rcnn_r50_fpn.py",
"chars": 2256,
"preview": "# model settings\nmodel = dict(\n type='FastRCNN',\n data_preprocessor=dict(\n type='DetDataPreprocessor',\n "
},
{
"path": "configs/_base_/models/faster-rcnn_r50-caffe-c4.py",
"chars": 4018,
"preview": "# model settings\nnorm_cfg = dict(type='BN', requires_grad=False)\nmodel = dict(\n type='FasterRCNN',\n data_preproces"
},
{
"path": "configs/_base_/models/faster-rcnn_r50-caffe-dc5.py",
"chars": 3670,
"preview": "# model settings\nnorm_cfg = dict(type='BN', requires_grad=False)\nmodel = dict(\n type='FasterRCNN',\n data_preproces"
},
{
"path": "configs/_base_/models/faster-rcnn_r50_fpn.py",
"chars": 3828,
"preview": "# model settings\nmodel = dict(\n type='FasterRCNN',\n data_preprocessor=dict(\n type='DetDataPreprocessor',\n "
},
{
"path": "configs/_base_/models/mask-rcnn_r50-caffe-c4.py",
"chars": 4275,
"preview": "# model settings\nnorm_cfg = dict(type='BN', requires_grad=False)\nmodel = dict(\n type='MaskRCNN',\n data_preprocesso"
},
{
"path": "configs/_base_/models/mask-rcnn_r50_fpn.py",
"chars": 4273,
"preview": "# model settings\nmodel = dict(\n type='MaskRCNN',\n data_preprocessor=dict(\n type='DetDataPreprocessor',\n "
},
{
"path": "configs/_base_/models/retinanet_r50_fpn.py",
"chars": 2059,
"preview": "# model settings\nmodel = dict(\n type='RetinaNet',\n data_preprocessor=dict(\n type='DetDataPreprocessor',\n "
},
{
"path": "configs/_base_/models/rpn_r50-caffe-c4.py",
"chars": 1980,
"preview": "# model settings\nmodel = dict(\n type='RPN',\n data_preprocessor=dict(\n type='DetDataPreprocessor',\n m"
},
{
"path": "configs/_base_/models/rpn_r50_fpn.py",
"chars": 2004,
"preview": "# model settings\nmodel = dict(\n type='RPN',\n data_preprocessor=dict(\n type='DetDataPreprocessor',\n m"
},
{
"path": "configs/_base_/models/ssd300.py",
"chars": 1959,
"preview": "# model settings\ninput_size = 300\nmodel = dict(\n type='SingleStageDetector',\n data_preprocessor=dict(\n type"
},
{
"path": "configs/_base_/schedules/schedule_1x.py",
"chars": 814,
"preview": "# training schedule for 1x\ntrain_cfg = dict(type='EpochBasedTrainLoop', max_epochs=12, val_interval=1)\nval_cfg = dict(ty"
},
{
"path": "configs/_base_/schedules/schedule_20e.py",
"chars": 816,
"preview": "# training schedule for 20e\ntrain_cfg = dict(type='EpochBasedTrainLoop', max_epochs=20, val_interval=1)\nval_cfg = dict(t"
},
{
"path": "configs/_base_/schedules/schedule_2x.py",
"chars": 815,
"preview": "# training schedule for 2x\ntrain_cfg = dict(type='EpochBasedTrainLoop', max_epochs=24, val_interval=1)\nval_cfg = dict(ty"
},
{
"path": "configs/atss/README.md",
"chars": 3479,
"preview": "# ATSS\n\n> [Bridging the Gap Between Anchor-based and Anchor-free Detection via Adaptive Training Sample Selection](https"
},
{
"path": "configs/atss/atss_r101_fpn_1x_coco.py",
"chars": 192,
"preview": "_base_ = './atss_r50_fpn_1x_coco.py'\nmodel = dict(\n backbone=dict(\n depth=101,\n init_cfg=dict(type='Pre"
},
{
"path": "configs/atss/atss_r101_fpn_8xb8-amp-lsj-200e_coco.py",
"chars": 208,
"preview": "_base_ = './atss_r50_fpn_8xb8-amp-lsj-200e_coco.py'\n\nmodel = dict(\n backbone=dict(\n depth=101,\n init_cf"
},
{
"path": "configs/atss/atss_r18_fpn_8xb8-amp-lsj-200e_coco.py",
"chars": 232,
"preview": "_base_ = './atss_r50_fpn_8xb8-amp-lsj-200e_coco.py'\n\nmodel = dict(\n backbone=dict(\n depth=18,\n init_cfg"
},
{
"path": "configs/atss/atss_r50_fpn_1x_coco.py",
"chars": 2164,
"preview": "_base_ = [\n '../_base_/datasets/coco_detection.py',\n '../_base_/schedules/schedule_1x.py', '../_base_/default_runt"
},
{
"path": "configs/atss/atss_r50_fpn_8xb8-amp-lsj-200e_coco.py",
"chars": 2536,
"preview": "_base_ = '../common/lsj-200e_coco-detection.py'\n\nimage_size = (1024, 1024)\nbatch_augments = [dict(type='BatchFixedSizePa"
},
{
"path": "configs/atss/metafile.yml",
"chars": 1772,
"preview": "Collections:\n - Name: ATSS\n Metadata:\n Training Data: COCO\n Training Techniques:\n - SGD with Moment"
},
{
"path": "configs/centernet/README.md",
"chars": 5238,
"preview": "# CenterNet\n\n> [Objects as Points](https://arxiv.org/abs/1904.07850)\n\n<!-- [ALGORITHM] -->\n\n## Abstract\n\nDetection ident"
},
{
"path": "configs/centernet/centernet-update_r101_fpn_8xb8-amp-lsj-200e_coco.py",
"chars": 220,
"preview": "_base_ = './centernet-update_r50_fpn_8xb8-amp-lsj-200e_coco.py'\n\nmodel = dict(\n backbone=dict(\n depth=101,\n "
},
{
"path": "configs/centernet/centernet-update_r18_fpn_8xb8-amp-lsj-200e_coco.py",
"chars": 244,
"preview": "_base_ = './centernet-update_r50_fpn_8xb8-amp-lsj-200e_coco.py'\n\nmodel = dict(\n backbone=dict(\n depth=18,\n "
},
{
"path": "configs/centernet/centernet-update_r50-caffe_fpn_ms-1x_coco.py",
"chars": 3054,
"preview": "_base_ = [\n '../_base_/datasets/coco_detection.py',\n '../_base_/schedules/schedule_1x.py', '../_base_/default_runt"
},
{
"path": "configs/centernet/centernet-update_r50_fpn_8xb8-amp-lsj-200e_coco.py",
"chars": 2397,
"preview": "_base_ = '../common/lsj-200e_coco-detection.py'\n\nimage_size = (1024, 1024)\nbatch_augments = [dict(type='BatchFixedSizePa"
},
{
"path": "configs/centernet/centernet_r18-dcnv2_8xb16-crop512-140e_coco.py",
"chars": 4272,
"preview": "_base_ = [\n '../_base_/datasets/coco_detection.py',\n '../_base_/schedules/schedule_1x.py', '../_base_/default_runt"
},
{
"path": "configs/centernet/centernet_r18_8xb16-crop512-140e_coco.py",
"chars": 100,
"preview": "_base_ = './centernet_r18-dcnv2_8xb16-crop512-140e_coco.py'\n\nmodel = dict(neck=dict(use_dcn=False))\n"
},
{
"path": "configs/centernet/centernet_tta.py",
"chars": 1406,
"preview": "# This is different from the TTA of official CenterNet.\n\ntta_model = dict(\n type='DetTTAModel',\n tta_cfg=dict(nms="
},
{
"path": "configs/centernet/metafile.yml",
"chars": 1529,
"preview": "Collections:\n - Name: CenterNet\n Metadata:\n Training Data: COCO\n Training Techniques:\n - SGD with M"
},
{
"path": "configs/crosskd/crosskd_r18_gflv1_r50_fpn_1x_coco.py",
"chars": 2778,
"preview": "_base_ = [\n '../_base_/datasets/coco_detection.py',\n '../_base_/schedules/schedule_1x.py', '../_base_/default_runt"
},
{
"path": "configs/crosskd/crosskd_r18_retinanet_r50_fpn_1x_coco.py",
"chars": 3007,
"preview": "_base_ = [\n '../_base_/datasets/coco_detection.py',\n '../_base_/schedules/schedule_1x.py', '../_base_/default_runt"
},
{
"path": "configs/crosskd/crosskd_r50_atss_r101_fpn_1x_coco.py",
"chars": 2785,
"preview": "\n_base_ = [\n '../_base_/datasets/coco_detection.py',\n '../_base_/schedules/schedule_1x.py', \n '../_base_/defaul"
},
{
"path": "configs/crosskd/crosskd_r50_fcos_r101-2x-ms_caffe_fpn_gn-head_2x_ms_coco.py",
"chars": 3470,
"preview": "_base_ = [\n '../_base_/datasets/coco_detection.py',\n '../_base_/schedules/schedule_1x.py', \n '../_base_/default"
},
{
"path": "configs/crosskd/crosskd_r50_gflv1_r101-2x-ms_fpn_1x_coco.py",
"chars": 2803,
"preview": "_base_ = [\n '../_base_/datasets/coco_detection.py',\n '../_base_/schedules/schedule_1x.py', '../_base_/default_runt"
},
{
"path": "configs/crosskd/crosskd_r50_retinanet_r101_fpn_2x_coco.py",
"chars": 3023,
"preview": "_base_ = [\n '../_base_/datasets/coco_detection.py',\n '../_base_/schedules/schedule_2x.py', \n '../_base_/default"
},
{
"path": "configs/crosskd/crosskd_r50_retinanet_swint_fpn_1x_coco.py",
"chars": 2852,
"preview": "_base_ = [\n '../_base_/datasets/coco_detection.py',\n '../_base_/schedules/schedule_1x.py', \n '../_base_/default"
},
{
"path": "configs/crosskd+pkd/crosskd+pkd_r50_atss_r101_fpn_1x_coco.py",
"chars": 2828,
"preview": "\n_base_ = [\n '../_base_/datasets/coco_detection.py',\n '../_base_/schedules/schedule_1x.py', \n '../_base_/defaul"
},
{
"path": "configs/crosskd+pkd/crosskd+pkd_r50_fcos_r101-2x-ms_caffe_fpn_gn-head_2x_ms_coco.py",
"chars": 3528,
"preview": "_base_ = [\n '../_base_/datasets/coco_detection.py',\n '../_base_/schedules/schedule_1x.py', \n '../_base_/default"
},
{
"path": "configs/crosskd+pkd/crosskd+pkd_r50_gflv1_r101-2x-ms_fpn_1x_coco.py",
"chars": 2863,
"preview": "_base_ = [\n '../_base_/datasets/coco_detection.py',\n '../_base_/schedules/schedule_1x.py', '../_base_/default_runt"
},
{
"path": "configs/crosskd+pkd/crosskd+pkd_r50_retinanet_r101_fpn_2x_coco.py",
"chars": 3083,
"preview": "_base_ = [\n '../_base_/datasets/coco_detection.py',\n '../_base_/schedules/schedule_2x.py', \n '../_base_/default"
},
{
"path": "configs/fcos/README.md",
"chars": 7693,
"preview": "# FCOS\n\n> [FCOS: Fully Convolutional One-Stage Object Detection](https://arxiv.org/abs/1904.01355)\n\n<!-- [ALGORITHM] -->"
},
{
"path": "configs/fcos/fcos_r101-caffe_fpn_gn-head-1x_coco.py",
"chars": 242,
"preview": "_base_ = './fcos_r50-caffe_fpn_gn-head_1x_coco.py'\n\n# model settings\nmodel = dict(\n backbone=dict(\n depth=101,"
},
{
"path": "configs/fcos/fcos_r101-caffe_fpn_gn-head_ms-640-800-2x_coco.py",
"chars": 1030,
"preview": "_base_ = './fcos_r50-caffe_fpn_gn-head_1x_coco.py'\n\n# model settings\nmodel = dict(\n backbone=dict(\n depth=101,"
},
{
"path": "configs/fcos/fcos_r101_fpn_gn-head-center-normbbox-centeronreg-giou_8xb8-amp-lsj-200e_coco.py",
"chars": 257,
"preview": "_base_ = './fcos_r50_fpn_gn-head-center-normbbox-centeronreg-giou_8xb8-amp-lsj-200e_coco.py' # noqa\n\nmodel = dict(\n "
},
{
"path": "configs/fcos/fcos_r18_fpn_gn-head-center-normbbox-centeronreg-giou_8xb8-amp-lsj-200e_coco.py",
"chars": 281,
"preview": "_base_ = './fcos_r50_fpn_gn-head-center-normbbox-centeronreg-giou_8xb8-amp-lsj-200e_coco.py' # noqa\n\nmodel = dict(\n "
},
{
"path": "configs/fcos/fcos_r50-caffe_fpn_gn-head-center-normbbox-centeronreg-giou_1x_coco.py",
"chars": 1087,
"preview": "_base_ = 'fcos_r50-caffe_fpn_gn-head_1x_coco.py'\n\n# model setting\nmodel = dict(\n data_preprocessor=dict(\n type"
},
{
"path": "configs/fcos/fcos_r50-caffe_fpn_gn-head-center_1x_coco.py",
"chars": 146,
"preview": "_base_ = './fcos_r50-caffe_fpn_gn-head_1x_coco.py'\n\n# model settings\nmodel = dict(bbox_head=dict(center_sampling=True, c"
},
{
"path": "configs/fcos/fcos_r50-caffe_fpn_gn-head_1x_coco.py",
"chars": 2093,
"preview": "_base_ = [\n '../_base_/datasets/coco_detection.py',\n '../_base_/schedules/schedule_1x.py', '../_base_/default_runt"
},
{
"path": "configs/fcos/fcos_r50-caffe_fpn_gn-head_4xb4-1x_coco.py",
"chars": 188,
"preview": "# TODO: Remove this config after benchmarking all related configs\n_base_ = 'fcos_r50-caffe_fpn_gn-head_1x_coco.py'\n\n# da"
},
{
"path": "configs/fcos/fcos_r50-caffe_fpn_gn-head_ms-640-800-2x_coco.py",
"chars": 839,
"preview": "_base_ = './fcos_r50-caffe_fpn_gn-head_1x_coco.py'\n\n# dataset settings\ntrain_pipeline = [\n dict(\n type='LoadIm"
},
{
"path": "configs/fcos/fcos_r50-dcn-caffe_fpn_gn-head-center-normbbox-centeronreg-giou_1x_coco.py",
"chars": 1212,
"preview": "_base_ = 'fcos_r50-caffe_fpn_gn-head_1x_coco.py'\n\n# model settings\nmodel = dict(\n data_preprocessor=dict(\n typ"
},
{
"path": "configs/fcos/fcos_r50_fpn_gn-head-center-normbbox-centeronreg-giou_8xb8-amp-lsj-200e_coco.py",
"chars": 2377,
"preview": "_base_ = '../common/lsj-200e_coco-detection.py'\n\nimage_size = (1024, 1024)\nbatch_augments = [dict(type='BatchFixedSizePa"
},
{
"path": "configs/fcos/fcos_x101-64x4d_fpn_gn-head_ms-640-800-2x_coco.py",
"chars": 1454,
"preview": "_base_ = './fcos_r50-caffe_fpn_gn-head_1x_coco.py'\n\n# model settings\nmodel = dict(\n data_preprocessor=dict(\n t"
},
{
"path": "configs/fcos/metafile.yml",
"chars": 5094,
"preview": "Collections:\n - Name: FCOS\n Metadata:\n Training Data: COCO\n Training Techniques:\n - SGD with Moment"
},
{
"path": "configs/gfl/README.md",
"chars": 7280,
"preview": "# GFL\n\n> [Generalized Focal Loss: Learning Qualified and Distributed Bounding Boxes for Dense Object Detection](https://"
},
{
"path": "configs/gfl/gfl_r101-dconv-c3-c5_fpn_ms-2x_coco.py",
"chars": 524,
"preview": "_base_ = './gfl_r50_fpn_ms-2x_coco.py'\nmodel = dict(\n backbone=dict(\n type='ResNet',\n depth=101,\n "
},
{
"path": "configs/gfl/gfl_r101_fpn_ms-2x_coco.py",
"chars": 401,
"preview": "_base_ = './gfl_r50_fpn_ms-2x_coco.py'\nmodel = dict(\n backbone=dict(\n type='ResNet',\n depth=101,\n "
},
{
"path": "configs/gfl/gfl_r50_fpn_1x_coco.py",
"chars": 1986,
"preview": "_base_ = [\n '../_base_/datasets/coco_detection.py',\n '../_base_/schedules/schedule_1x.py', '../_base_/default_runt"
},
{
"path": "configs/gfl/gfl_r50_fpn_ms-2x_coco.py",
"chars": 799,
"preview": "_base_ = './gfl_r50_fpn_1x_coco.py'\nmax_epochs = 24\n\n# learning policy\nparam_scheduler = [\n dict(\n type='Linea"
},
{
"path": "configs/gfl/gfl_x101-32x4d-dconv-c4-c5_fpn_ms-2x_coco.py",
"chars": 580,
"preview": "_base_ = './gfl_r50_fpn_ms-2x_coco.py'\nmodel = dict(\n type='GFL',\n backbone=dict(\n type='ResNeXt',\n "
},
{
"path": "configs/gfl/gfl_x101-32x4d_fpn_ms-2x_coco.py",
"chars": 456,
"preview": "_base_ = './gfl_r50_fpn_ms-2x_coco.py'\nmodel = dict(\n type='GFL',\n backbone=dict(\n type='ResNeXt',\n "
},
{
"path": "configs/gfl/metafile.yml",
"chars": 4350,
"preview": "Collections:\n - Name: Generalized Focal Loss\n Metadata:\n Training Data: COCO\n Training Techniques:\n "
},
{
"path": "configs/ld/README.md",
"chars": 6443,
"preview": "# LD\n\n> [Localization Distillation for Dense Object Detection](https://arxiv.org/abs/2102.12252)\n\n<!-- [ALGORITHM] -->\n\n"
},
{
"path": "configs/ld/ld_r101-gflv1-r101-dcn_fpn_2x_coco.py",
"chars": 1633,
"preview": "_base_ = ['./ld_r18-gflv1-r101_fpn_1x_coco.py']\nteacher_ckpt = 'https://download.openmmlab.com/mmdetection/v2.0/gfl/gfl_"
},
{
"path": "configs/ld/ld_r18-gflv1-r101_fpn_1x_coco.py",
"chars": 2361,
"preview": "_base_ = [\n '../_base_/datasets/coco_detection.py',\n '../_base_/schedules/schedule_1x.py', '../_base_/default_runt"
},
{
"path": "configs/ld/ld_r34-gflv1-r101_fpn_1x_coco.py",
"chars": 569,
"preview": "_base_ = ['./ld_r18-gflv1-r101_fpn_1x_coco.py']\nmodel = dict(\n backbone=dict(\n type='ResNet',\n depth=34"
},
{
"path": "configs/ld/ld_r50-gflv1-r101_fpn_1x_coco.py",
"chars": 572,
"preview": "_base_ = ['./ld_r18-gflv1-r101_fpn_1x_coco.py']\nmodel = dict(\n backbone=dict(\n type='ResNet',\n depth=50"
},
{
"path": "configs/ld/metafile.yml",
"chars": 2435,
"preview": "Collections:\n - Name: Localization Distillation\n Metadata:\n Training Data: COCO\n Training Techniques:\n "
},
{
"path": "configs/retinanet/README.md",
"chars": 11616,
"preview": "# RetinaNet\n\n> [Focal Loss for Dense Object Detection](https://arxiv.org/abs/1708.02002)\n\n<!-- [ALGORITHM] -->\n\n## Abstr"
},
{
"path": "configs/retinanet/metafile.yml",
"chars": 10332,
"preview": "Collections:\n - Name: RetinaNet\n Metadata:\n Training Data: COCO\n Training Techniques:\n - SGD with M"
},
{
"path": "configs/retinanet/retinanet_r101-caffe_fpn_1x_coco.py",
"chars": 222,
"preview": "_base_ = './retinanet_r50-caffe_fpn_1x_coco.py'\nmodel = dict(\n backbone=dict(\n depth=101,\n init_cfg=dic"
},
{
"path": "configs/retinanet/retinanet_r101-caffe_fpn_ms-3x_coco.py",
"chars": 243,
"preview": "_base_ = './retinanet_r50-caffe_fpn_ms-3x_coco.py'\n# learning policy\nmodel = dict(\n backbone=dict(\n depth=101,"
},
{
"path": "configs/retinanet/retinanet_r101_fpn_1x_coco.py",
"chars": 197,
"preview": "_base_ = './retinanet_r50_fpn_1x_coco.py'\nmodel = dict(\n backbone=dict(\n depth=101,\n init_cfg=dict(type"
},
{
"path": "configs/retinanet/retinanet_r101_fpn_2x_coco.py",
"chars": 197,
"preview": "_base_ = './retinanet_r50_fpn_2x_coco.py'\nmodel = dict(\n backbone=dict(\n depth=101,\n init_cfg=dict(type"
},
{
"path": "configs/retinanet/retinanet_r101_fpn_8xb8-amp-lsj-200e_coco.py",
"chars": 213,
"preview": "_base_ = './retinanet_r50_fpn_8xb8-amp-lsj-200e_coco.py'\n\nmodel = dict(\n backbone=dict(\n depth=101,\n in"
},
{
"path": "configs/retinanet/retinanet_r101_fpn_ms-640-800-3x_coco.py",
"chars": 343,
"preview": "_base_ = ['../_base_/models/retinanet_r50_fpn.py', '../common/ms_3x_coco.py']\n# optimizer\nmodel = dict(\n backbone=dic"
},
{
"path": "configs/retinanet/retinanet_r18_fpn_1x_coco.py",
"chars": 682,
"preview": "_base_ = [\n '../_base_/models/retinanet_r50_fpn.py',\n '../_base_/datasets/coco_detection.py',\n '../_base_/sched"
},
{
"path": "configs/retinanet/retinanet_r18_fpn_1xb8-1x_coco.py",
"chars": 797,
"preview": "_base_ = [\n '../_base_/models/retinanet_r50_fpn.py',\n '../_base_/datasets/coco_detection.py',\n '../_base_/sched"
},
{
"path": "configs/retinanet/retinanet_r18_fpn_8xb8-amp-lsj-200e_coco.py",
"chars": 237,
"preview": "_base_ = './retinanet_r50_fpn_8xb8-amp-lsj-200e_coco.py'\n\nmodel = dict(\n backbone=dict(\n depth=18,\n ini"
},
{
"path": "configs/retinanet/retinanet_r50-caffe_fpn_1x_coco.py",
"chars": 507,
"preview": "_base_ = './retinanet_r50_fpn_1x_coco.py'\nmodel = dict(\n data_preprocessor=dict(\n type='DetDataPreprocessor',\n"
},
{
"path": "configs/retinanet/retinanet_r50-caffe_fpn_ms-1x_coco.py",
"chars": 464,
"preview": "_base_ = './retinanet_r50-caffe_fpn_1x_coco.py'\n\ntrain_pipeline = [\n dict(type='LoadImageFromFile'),\n dict(type='L"
},
{
"path": "configs/retinanet/retinanet_r50-caffe_fpn_ms-2x_coco.py",
"chars": 388,
"preview": "_base_ = './retinanet_r50-caffe_fpn_ms-1x_coco.py'\n# training schedule for 2x\ntrain_cfg = dict(max_epochs=24)\n\n# learnin"
},
{
"path": "configs/retinanet/retinanet_r50-caffe_fpn_ms-3x_coco.py",
"chars": 389,
"preview": "_base_ = './retinanet_r50-caffe_fpn_ms-1x_coco.py'\n\n# training schedule for 2x\ntrain_cfg = dict(max_epochs=36)\n\n# learni"
},
{
"path": "configs/retinanet/retinanet_r50_fpn_1x_coco.py",
"chars": 312,
"preview": "_base_ = [\n '../_base_/models/retinanet_r50_fpn.py',\n '../_base_/datasets/coco_detection.py',\n '../_base_/sched"
},
{
"path": "configs/retinanet/retinanet_r50_fpn_2x_coco.py",
"chars": 624,
"preview": "_base_ = [\n '../_base_/models/retinanet_r50_fpn.py',\n '../_base_/datasets/coco_detection.py',\n '../_base_/sched"
},
{
"path": "configs/retinanet/retinanet_r50_fpn_8xb8-amp-lsj-200e_coco.py",
"chars": 711,
"preview": "_base_ = [\n '../_base_/models/retinanet_r50_fpn.py',\n '../common/lsj-200e_coco-detection.py'\n]\n\nimage_size = (1024"
},
{
"path": "configs/retinanet/retinanet_r50_fpn_90k_coco.py",
"chars": 639,
"preview": "_base_ = 'retinanet_r50_fpn_1x_coco.py'\n\n# training schedule for 90k\ntrain_cfg = dict(\n _delete_=True,\n type='Iter"
},
{
"path": "configs/retinanet/retinanet_r50_fpn_amp-1x_coco.py",
"chars": 87,
"preview": "_base_ = './retinanet_r50_fpn_1x_coco.py'\n# fp16 settings\nfp16 = dict(loss_scale=512.)\n"
},
{
"path": "configs/retinanet/retinanet_r50_fpn_ms-640-800-3x_coco.py",
"chars": 188,
"preview": "_base_ = ['../_base_/models/retinanet_r50_fpn.py', '../common/ms_3x_coco.py']\n# optimizer\noptim_wrapper = dict(\n opti"
},
{
"path": "configs/retinanet/retinanet_swin-t-p4-w7_fpn_1x_coco.py",
"chars": 881,
"preview": "_base_ = './retinanet_r50_fpn_1x_coco.py'\nmodel = dict(\n backbone=dict(\n _delete_=True,\n type='SwinTran"
},
{
"path": "configs/retinanet/retinanet_tta.py",
"chars": 901,
"preview": "tta_model = dict(\n type='DetTTAModel',\n tta_cfg=dict(nms=dict(type='nms', iou_threshold=0.5), max_per_img=100))\n\ni"
},
{
"path": "configs/retinanet/retinanet_x101-32x4d_fpn_1x_coco.py",
"chars": 419,
"preview": "_base_ = './retinanet_r50_fpn_1x_coco.py'\nmodel = dict(\n backbone=dict(\n type='ResNeXt',\n depth=101,\n "
},
{
"path": "configs/retinanet/retinanet_x101-32x4d_fpn_2x_coco.py",
"chars": 419,
"preview": "_base_ = './retinanet_r50_fpn_2x_coco.py'\nmodel = dict(\n backbone=dict(\n type='ResNeXt',\n depth=101,\n "
},
{
"path": "configs/retinanet/retinanet_x101-64x4d_fpn_1x_coco.py",
"chars": 419,
"preview": "_base_ = './retinanet_r50_fpn_1x_coco.py'\nmodel = dict(\n backbone=dict(\n type='ResNeXt',\n depth=101,\n "
},
{
"path": "configs/retinanet/retinanet_x101-64x4d_fpn_2x_coco.py",
"chars": 419,
"preview": "_base_ = './retinanet_r50_fpn_2x_coco.py'\nmodel = dict(\n backbone=dict(\n type='ResNeXt',\n depth=101,\n "
},
{
"path": "configs/retinanet/retinanet_x101-64x4d_fpn_ms-640-800-3x_coco.py",
"chars": 365,
"preview": "_base_ = ['../_base_/models/retinanet_r50_fpn.py', '../common/ms_3x_coco.py']\n# optimizer\nmodel = dict(\n backbone=dic"
},
{
"path": "demo/create_result_gif.py",
"chars": 5011,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport argparse\nimport os\nimport os.path as osp\n\nimport matplotlib.patch"
},
{
"path": "demo/image_demo.py",
"chars": 3648,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\n\"\"\"Image Demo.\n\nThis script adopts a new infenence class, currently supp"
},
{
"path": "demo/inference_demo.ipynb",
"chars": 956207,
"preview": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n "
},
{
"path": "demo/video_demo.py",
"chars": 2771,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport argparse\n\nimport cv2\nimport mmcv\nfrom mmcv.transforms import Comp"
},
{
"path": "demo/video_gpuaccel_demo.py",
"chars": 4725,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport argparse\nfrom typing import Tuple\n\nimport cv2\nimport mmcv\nimport "
},
{
"path": "demo/webcam_demo.py",
"chars": 1930,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport argparse\n\nimport cv2\nimport mmcv\nimport torch\n\nfrom mmdet.apis im"
},
{
"path": "docker/Dockerfile",
"chars": 1556,
"preview": "ARG PYTORCH=\"1.9.0\"\nARG CUDA=\"11.1\"\nARG CUDNN=\"8\"\n\nFROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel\n\nENV "
},
{
"path": "docker/serve/Dockerfile",
"chars": 2028,
"preview": "ARG PYTORCH=\"1.9.0\"\nARG CUDA=\"11.1\"\nARG CUDNN=\"8\"\nFROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel\n\nARG M"
},
{
"path": "docker/serve/config.properties",
"chars": 172,
"preview": "inference_address=http://0.0.0.0:8080\nmanagement_address=http://0.0.0.0:8081\nmetrics_address=http://0.0.0.0:8082\nmodel_s"
},
{
"path": "docker/serve/entrypoint.sh",
"chars": 197,
"preview": "#!/bin/bash\nset -e\n\nif [[ \"$1\" = \"serve\" ]]; then\n shift 1\n torchserve --start --ts-config /home/model-server/conf"
},
{
"path": "docker/serve_cn/Dockerfile",
"chars": 2224,
"preview": "ARG PYTORCH=\"1.9.0\"\nARG CUDA=\"11.1\"\nARG CUDNN=\"8\"\nFROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel\n\nARG M"
},
{
"path": "mmdet/__init__.py",
"chars": 1042,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport mmcv\nimport mmengine\nfrom mmengine.utils import digit_version\n\nfr"
},
{
"path": "mmdet/apis/__init__.py",
"chars": 305,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom .det_inferencer import DetInferencer\nfrom .inference import (async_"
},
{
"path": "mmdet/apis/det_inferencer.py",
"chars": 24008,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport copy\nimport os.path as osp\nimport warnings\nfrom typing import Dic"
},
{
"path": "mmdet/apis/inference.py",
"chars": 8007,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport copy\nimport warnings\nfrom pathlib import Path\nfrom typing import "
},
{
"path": "mmdet/datasets/__init__.py",
"chars": 1325,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom .base_det_dataset import BaseDetDataset\nfrom .cityscapes import Cit"
},
{
"path": "mmdet/datasets/api_wrappers/__init__.py",
"chars": 147,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom .coco_api import COCO, COCOeval, COCOPanoptic\n\n__all__ = ['COCO', '"
},
{
"path": "mmdet/datasets/api_wrappers/coco_api.py",
"chars": 4791,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\n# This file add snake case alias for coco api\n\nimport warnings\nfrom coll"
},
{
"path": "mmdet/datasets/base_det_dataset.py",
"chars": 4445,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport os.path as osp\nfrom typing import List, Optional\n\nfrom mmengine.d"
},
{
"path": "mmdet/datasets/cityscapes.py",
"chars": 2323,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\n# Modified from https://github.com/facebookresearch/detectron2/blob/mast"
},
{
"path": "mmdet/datasets/coco.py",
"chars": 7974,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport copy\nimport os.path as osp\nfrom typing import List, Union\n\nfrom m"
},
{
"path": "mmdet/datasets/coco_panoptic.py",
"chars": 13594,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport os.path as osp\nfrom typing import Callable, List, Optional, Seque"
},
{
"path": "mmdet/datasets/crowdhuman.py",
"chars": 6108,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport json\nimport logging\nimport os.path as osp\nimport warnings\nfrom ty"
},
{
"path": "mmdet/datasets/dataset_wrappers.py",
"chars": 6474,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport collections\nimport copy\nfrom typing import Sequence, Union\n\nfrom "
},
{
"path": "mmdet/datasets/deepfashion.py",
"chars": 819,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom mmdet.registry import DATASETS\nfrom .coco import CocoDataset\n\n\n@DAT"
},
{
"path": "mmdet/datasets/lvis.py",
"chars": 41273,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport copy\nimport warnings\nfrom typing import List\n\nfrom mmdet.registry"
},
{
"path": "mmdet/datasets/objects365.py",
"chars": 14684,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport copy\nimport os.path as osp\nfrom typing import List\n\nfrom mmdet.re"
},
{
"path": "mmdet/datasets/openimages.py",
"chars": 19986,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport csv\nimport os.path as osp\nfrom collections import defaultdict\nfro"
},
{
"path": "mmdet/datasets/samplers/__init__.py",
"chars": 347,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom .batch_sampler import AspectRatioBatchSampler\nfrom .class_aware_sam"
},
{
"path": "mmdet/datasets/samplers/batch_sampler.py",
"chars": 2637,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom typing import Sequence\n\nfrom torch.utils.data import BatchSampler, "
},
{
"path": "mmdet/datasets/samplers/class_aware_sampler.py",
"chars": 7132,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport math\nfrom typing import Dict, Iterator, Optional, Union\n\nimport n"
},
{
"path": "mmdet/datasets/samplers/multi_source_sampler.py",
"chars": 8580,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport itertools\nfrom typing import Iterator, List, Optional, Sized, Uni"
},
{
"path": "mmdet/datasets/transforms/__init__.py",
"chars": 2191,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom .augment_wrappers import AutoAugment, RandAugment\nfrom .colorspace "
},
{
"path": "mmdet/datasets/transforms/augment_wrappers.py",
"chars": 9738,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom typing import List, Optional, Union\n\nimport numpy as np\nfrom mmcv.t"
},
{
"path": "mmdet/datasets/transforms/colorspace.py",
"chars": 16984,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport math\nfrom typing import Optional\n\nimport mmcv\nimport numpy as np\n"
},
{
"path": "mmdet/datasets/transforms/formatting.py",
"chars": 9565,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport numpy as np\nfrom mmcv.transforms import to_tensor\nfrom mmcv.trans"
},
{
"path": "mmdet/datasets/transforms/geometric.py",
"chars": 30322,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\n\nfrom typing import Optional, Union\n\nimport cv2\nimport mmcv\nimport numpy"
},
{
"path": "mmdet/datasets/transforms/instaboost.py",
"chars": 5489,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom typing import Tuple\n\nimport numpy as np\nfrom mmcv.transforms import"
},
{
"path": "mmdet/datasets/transforms/loading.py",
"chars": 29899,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom typing import Optional, Tuple, Union\n\nimport mmcv\nimport numpy as n"
},
{
"path": "mmdet/datasets/transforms/transforms.py",
"chars": 140703,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport copy\nimport inspect\nimport math\nfrom typing import List, Optional"
},
{
"path": "mmdet/datasets/transforms/wrappers.py",
"chars": 11035,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport copy\nfrom typing import Callable, Dict, List, Optional, Union\n\nim"
}
]
// ... and 675 more files (download for full content)
About this extraction
This page contains the full source code of the jbwang1997/CrossKD GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 875 files (31.0 MB), approximately 1.8M tokens, and a symbol index with 4271 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.