├── .gitignore ├── .gitmodules ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── configs ├── T_samba.config ├── T_samba1.config ├── T_swing.config ├── T_swing1.config ├── a-eagle-1.config ├── a-eagle.config ├── a-hands-1.config ├── a-hands.config ├── adult7-sub.config ├── adult7.config ├── ama-1v.config ├── ama-2v.config ├── ama-4v.config ├── ama-6v.config ├── ama-8v.config ├── ama-female-cam.config ├── ama-female-cam0.config ├── ama-female-cam10.config ├── ama-female-cam30.config ├── ama-female-cam60.config ├── ama-female.config ├── ama-female1.config ├── cat-coco.config ├── cat-pikachiu-cam.config ├── cat-pikachiu-sub.config ├── cat-pikachiu.config ├── cat-retarget.config ├── cat-socks-sub.config ├── cat-socks.config ├── dog-tetres.config ├── felipe-1.config ├── human-cap.config ├── penguin.config ├── shiba-haru-1.config └── shiba_100.config ├── dataloader ├── __init__.py ├── frameloader.py └── vidbase.py ├── extract.py ├── main.py ├── mesh_material ├── .gitignore ├── sheep_5004_sph.pkl ├── smpl_27554_sph.pkl └── wood.obj ├── misc ├── .gitignore ├── ama.txt ├── banmo-cu113.yml ├── banmo.yml ├── posenet.txt ├── processed │ ├── download.sh │ ├── processed-cat-pikachiu-imgs.txt │ ├── processed-cat-pikachiu.txt │ ├── processed-cat-socks.txt │ └── processed-human-cap.txt └── vid │ ├── download-chunk.sh │ ├── download.sh │ ├── vid-cat-coco.txt │ ├── vid-cat-pikachiu.txt │ ├── vid-dog-tetres.txt │ ├── vid-human-cap.txt │ └── vidchunk-penguin.txt ├── nnutils ├── banmo.py ├── cse.py ├── geom_utils.py ├── loss_utils.py ├── nerf.py ├── rendering.py ├── train_utils.py └── vis_utils.py ├── preprocess ├── README.md ├── compute_dp.py ├── img2lines.py ├── mask.py ├── preprocess.sh ├── save_zip.sh └── write_config.py ├── scripts ├── README.md ├── abalations │ ├── template-ama-bones.sh │ ├── template-ama-cam.sh │ ├── template-ama-embed.sh │ ├── template-ama-nactive.sh │ ├── template-ama-quad.sh │ ├── template-ama-view.sh │ ├── template-human-noactive.sh │ └── template-human-nosymm.sh ├── ama-process │ ├── ama2davis.py │ └── read_cam.py ├── eval │ ├── eval_root.py │ └── run_eval.sh ├── misc │ ├── add_cam_noise.py │ ├── generate_traj.py │ ├── random_colors.py │ ├── run_cse.sh │ └── vid2gif.sh ├── render_iter.sh ├── render_match.sh ├── render_mgpu.sh ├── render_nvs.sh ├── render_result.sh ├── render_retarget.sh ├── render_seq.sh ├── render_vids.sh ├── synthetic │ ├── render_eagle.sh │ ├── render_hands.sh │ └── render_synthetic.py ├── template-accu.sh ├── template-known-cam.sh ├── template-mgpu.sh ├── template-prior-model.sh ├── template-retarget.sh ├── template-short.sh ├── template.sh └── visualize │ ├── match.py │ ├── nvs.py │ ├── nvs_iter.py │ ├── render_root.py │ ├── render_root_txt.py │ └── render_vis.py ├── third_party ├── .gitignore ├── chamfer3D │ ├── .gitignore │ ├── chamfer3D.cu │ ├── chamfer_cuda.cpp │ ├── dist_chamfer_3D.py │ └── setup.py ├── detectron2_old │ ├── .circleci │ │ └── config.yml │ ├── .clang-format │ ├── .flake8 │ ├── .github │ │ ├── CODE_OF_CONDUCT.md │ │ ├── CONTRIBUTING.md │ │ ├── Detectron2-Logo-Horz.svg │ │ ├── ISSUE_TEMPLATE.md │ │ ├── ISSUE_TEMPLATE │ │ │ ├── bugs.md │ │ │ ├── config.yml │ │ │ ├── documentation.md │ │ │ ├── feature-request.md │ │ │ └── unexpected-problems-bugs.md │ │ ├── pull_request_template.md │ │ └── workflows │ │ │ ├── check-template.yml │ │ │ ├── levenshtein.js │ │ │ ├── needs-reply.yml │ │ │ ├── remove-needs-reply.yml │ │ │ └── workflow.yml │ ├── .gitignore │ ├── GETTING_STARTED.md │ ├── INSTALL.md │ ├── LICENSE │ ├── MODEL_ZOO.md │ ├── README.md │ ├── configs │ │ ├── Base-RCNN-C4.yaml │ │ ├── Base-RCNN-DilatedC5.yaml │ │ ├── Base-RCNN-FPN.yaml │ │ ├── Base-RetinaNet.yaml │ │ ├── COCO-Detection │ │ │ ├── fast_rcnn_R_50_FPN_1x.yaml │ │ │ ├── faster_rcnn_R_101_C4_3x.yaml │ │ │ ├── faster_rcnn_R_101_DC5_3x.yaml │ │ │ ├── faster_rcnn_R_101_FPN_3x.yaml │ │ │ ├── faster_rcnn_R_50_C4_1x.yaml │ │ │ ├── faster_rcnn_R_50_C4_3x.yaml │ │ │ ├── faster_rcnn_R_50_DC5_1x.yaml │ │ │ ├── faster_rcnn_R_50_DC5_3x.yaml │ │ │ ├── faster_rcnn_R_50_FPN_1x.yaml │ │ │ ├── faster_rcnn_R_50_FPN_3x.yaml │ │ │ ├── faster_rcnn_X_101_32x8d_FPN_3x.yaml │ │ │ ├── retinanet_R_101_FPN_3x.yaml │ │ │ ├── retinanet_R_50_FPN_1x.py │ │ │ ├── retinanet_R_50_FPN_1x.yaml │ │ │ ├── retinanet_R_50_FPN_3x.yaml │ │ │ ├── rpn_R_50_C4_1x.yaml │ │ │ └── rpn_R_50_FPN_1x.yaml │ │ ├── COCO-InstanceSegmentation │ │ │ ├── mask_rcnn_R_101_C4_3x.yaml │ │ │ ├── mask_rcnn_R_101_DC5_3x.yaml │ │ │ ├── mask_rcnn_R_101_FPN_3x.yaml │ │ │ ├── mask_rcnn_R_50_C4_1x.py │ │ │ ├── mask_rcnn_R_50_C4_1x.yaml │ │ │ ├── mask_rcnn_R_50_C4_3x.yaml │ │ │ ├── mask_rcnn_R_50_DC5_1x.yaml │ │ │ ├── mask_rcnn_R_50_DC5_3x.yaml │ │ │ ├── mask_rcnn_R_50_FPN_1x.py │ │ │ ├── mask_rcnn_R_50_FPN_1x.yaml │ │ │ ├── mask_rcnn_R_50_FPN_1x_giou.yaml │ │ │ ├── mask_rcnn_R_50_FPN_3x.yaml │ │ │ ├── mask_rcnn_X_101_32x8d_FPN_3x.yaml │ │ │ ├── mask_rcnn_regnetx_4gf_dds_fpn_1x.py │ │ │ └── mask_rcnn_regnety_4gf_dds_fpn_1x.py │ │ ├── COCO-Keypoints │ │ │ ├── Base-Keypoint-RCNN-FPN.yaml │ │ │ ├── keypoint_rcnn_R_101_FPN_3x.yaml │ │ │ ├── keypoint_rcnn_R_50_FPN_1x.py │ │ │ ├── keypoint_rcnn_R_50_FPN_1x.yaml │ │ │ ├── keypoint_rcnn_R_50_FPN_3x.yaml │ │ │ └── keypoint_rcnn_X_101_32x8d_FPN_3x.yaml │ │ ├── COCO-PanopticSegmentation │ │ │ ├── Base-Panoptic-FPN.yaml │ │ │ ├── panoptic_fpn_R_101_3x.yaml │ │ │ ├── panoptic_fpn_R_50_1x.py │ │ │ ├── panoptic_fpn_R_50_1x.yaml │ │ │ └── panoptic_fpn_R_50_3x.yaml │ │ ├── Cityscapes │ │ │ └── mask_rcnn_R_50_FPN.yaml │ │ ├── Detectron1-Comparisons │ │ │ ├── README.md │ │ │ ├── faster_rcnn_R_50_FPN_noaug_1x.yaml │ │ │ ├── keypoint_rcnn_R_50_FPN_1x.yaml │ │ │ └── mask_rcnn_R_50_FPN_noaug_1x.yaml │ │ ├── LVISv0.5-InstanceSegmentation │ │ │ ├── mask_rcnn_R_101_FPN_1x.yaml │ │ │ ├── mask_rcnn_R_50_FPN_1x.yaml │ │ │ └── mask_rcnn_X_101_32x8d_FPN_1x.yaml │ │ ├── LVISv1-InstanceSegmentation │ │ │ ├── mask_rcnn_R_101_FPN_1x.yaml │ │ │ ├── mask_rcnn_R_50_FPN_1x.yaml │ │ │ └── mask_rcnn_X_101_32x8d_FPN_1x.yaml │ │ ├── Misc │ │ │ ├── cascade_mask_rcnn_R_50_FPN_1x.yaml │ │ │ ├── cascade_mask_rcnn_R_50_FPN_3x.yaml │ │ │ ├── cascade_mask_rcnn_X_152_32x8d_FPN_IN5k_gn_dconv.yaml │ │ │ ├── mask_rcnn_R_50_FPN_1x_cls_agnostic.yaml │ │ │ ├── mask_rcnn_R_50_FPN_1x_dconv_c3-c5.yaml │ │ │ ├── mask_rcnn_R_50_FPN_3x_dconv_c3-c5.yaml │ │ │ ├── mask_rcnn_R_50_FPN_3x_gn.yaml │ │ │ ├── mask_rcnn_R_50_FPN_3x_syncbn.yaml │ │ │ ├── mmdet_mask_rcnn_R_50_FPN_1x.py │ │ │ ├── panoptic_fpn_R_101_dconv_cascade_gn_3x.yaml │ │ │ ├── scratch_mask_rcnn_R_50_FPN_3x_gn.yaml │ │ │ ├── scratch_mask_rcnn_R_50_FPN_9x_gn.yaml │ │ │ ├── scratch_mask_rcnn_R_50_FPN_9x_syncbn.yaml │ │ │ ├── semantic_R_50_FPN_1x.yaml │ │ │ └── torchvision_imagenet_R_50.py │ │ ├── PascalVOC-Detection │ │ │ ├── faster_rcnn_R_50_C4.yaml │ │ │ └── faster_rcnn_R_50_FPN.yaml │ │ ├── common │ │ │ ├── README.md │ │ │ ├── coco_schedule.py │ │ │ ├── data │ │ │ │ ├── coco.py │ │ │ │ ├── coco_keypoint.py │ │ │ │ └── coco_panoptic_separated.py │ │ │ ├── models │ │ │ │ ├── cascade_rcnn.py │ │ │ │ ├── keypoint_rcnn_fpn.py │ │ │ │ ├── mask_rcnn_c4.py │ │ │ │ ├── mask_rcnn_fpn.py │ │ │ │ ├── panoptic_fpn.py │ │ │ │ └── retinanet.py │ │ │ ├── optim.py │ │ │ └── train.py │ │ ├── new_baselines │ │ │ ├── mask_rcnn_R_101_FPN_100ep_LSJ.py │ │ │ ├── mask_rcnn_R_101_FPN_200ep_LSJ.py │ │ │ ├── mask_rcnn_R_101_FPN_400ep_LSJ.py │ │ │ ├── mask_rcnn_R_50_FPN_100ep_LSJ.py │ │ │ ├── mask_rcnn_R_50_FPN_200ep_LSJ.py │ │ │ ├── mask_rcnn_R_50_FPN_400ep_LSJ.py │ │ │ ├── mask_rcnn_regnetx_4gf_dds_FPN_100ep_LSJ.py │ │ │ ├── mask_rcnn_regnetx_4gf_dds_FPN_200ep_LSJ.py │ │ │ ├── mask_rcnn_regnetx_4gf_dds_FPN_400ep_LSJ.py │ │ │ ├── mask_rcnn_regnety_4gf_dds_FPN_100ep_LSJ.py │ │ │ ├── mask_rcnn_regnety_4gf_dds_FPN_200ep_LSJ.py │ │ │ └── mask_rcnn_regnety_4gf_dds_FPN_400ep_LSJ.py │ │ └── quick_schedules │ │ │ ├── README.md │ │ │ ├── cascade_mask_rcnn_R_50_FPN_inference_acc_test.yaml │ │ │ ├── cascade_mask_rcnn_R_50_FPN_instant_test.yaml │ │ │ ├── fast_rcnn_R_50_FPN_inference_acc_test.yaml │ │ │ ├── fast_rcnn_R_50_FPN_instant_test.yaml │ │ │ ├── keypoint_rcnn_R_50_FPN_inference_acc_test.yaml │ │ │ ├── keypoint_rcnn_R_50_FPN_instant_test.yaml │ │ │ ├── keypoint_rcnn_R_50_FPN_normalized_training_acc_test.yaml │ │ │ ├── keypoint_rcnn_R_50_FPN_training_acc_test.yaml │ │ │ ├── mask_rcnn_R_50_C4_GCV_instant_test.yaml │ │ │ ├── mask_rcnn_R_50_C4_inference_acc_test.yaml │ │ │ ├── mask_rcnn_R_50_C4_instant_test.yaml │ │ │ ├── mask_rcnn_R_50_C4_training_acc_test.yaml │ │ │ ├── mask_rcnn_R_50_DC5_inference_acc_test.yaml │ │ │ ├── mask_rcnn_R_50_FPN_inference_acc_test.yaml │ │ │ ├── mask_rcnn_R_50_FPN_instant_test.yaml │ │ │ ├── mask_rcnn_R_50_FPN_pred_boxes_training_acc_test.yaml │ │ │ ├── mask_rcnn_R_50_FPN_training_acc_test.yaml │ │ │ ├── panoptic_fpn_R_50_inference_acc_test.yaml │ │ │ ├── panoptic_fpn_R_50_instant_test.yaml │ │ │ ├── panoptic_fpn_R_50_training_acc_test.yaml │ │ │ ├── retinanet_R_50_FPN_inference_acc_test.yaml │ │ │ ├── retinanet_R_50_FPN_instant_test.yaml │ │ │ ├── rpn_R_50_FPN_inference_acc_test.yaml │ │ │ ├── rpn_R_50_FPN_instant_test.yaml │ │ │ ├── semantic_R_50_FPN_inference_acc_test.yaml │ │ │ ├── semantic_R_50_FPN_instant_test.yaml │ │ │ └── semantic_R_50_FPN_training_acc_test.yaml │ ├── datasets │ │ ├── README.md │ │ ├── prepare_ade20k_sem_seg.py │ │ ├── prepare_cocofied_lvis.py │ │ ├── prepare_for_tests.sh │ │ └── prepare_panoptic_fpn.py │ ├── demo │ │ ├── README.md │ │ ├── demo.py │ │ └── predictor.py │ ├── detectron2 │ │ ├── __init__.py │ │ ├── checkpoint │ │ │ ├── __init__.py │ │ │ ├── c2_model_loading.py │ │ │ ├── catalog.py │ │ │ └── detection_checkpoint.py │ │ ├── config │ │ │ ├── __init__.py │ │ │ ├── compat.py │ │ │ ├── config.py │ │ │ ├── defaults.py │ │ │ ├── instantiate.py │ │ │ └── lazy.py │ │ ├── data │ │ │ ├── __init__.py │ │ │ ├── build.py │ │ │ ├── catalog.py │ │ │ ├── common.py │ │ │ ├── dataset_mapper.py │ │ │ ├── datasets │ │ │ │ ├── README.md │ │ │ │ ├── __init__.py │ │ │ │ ├── builtin.py │ │ │ │ ├── builtin_meta.py │ │ │ │ ├── cityscapes.py │ │ │ │ ├── cityscapes_panoptic.py │ │ │ │ ├── coco.py │ │ │ │ ├── coco_panoptic.py │ │ │ │ ├── lvis.py │ │ │ │ ├── lvis_v0_5_categories.py │ │ │ │ ├── lvis_v1_categories.py │ │ │ │ ├── pascal_voc.py │ │ │ │ └── register_coco.py │ │ │ ├── detection_utils.py │ │ │ ├── samplers │ │ │ │ ├── __init__.py │ │ │ │ ├── distributed_sampler.py │ │ │ │ └── grouped_batch_sampler.py │ │ │ └── transforms │ │ │ │ ├── __init__.py │ │ │ │ ├── augmentation.py │ │ │ │ ├── augmentation_impl.py │ │ │ │ └── transform.py │ │ ├── engine │ │ │ ├── __init__.py │ │ │ ├── defaults.py │ │ │ ├── hooks.py │ │ │ ├── launch.py │ │ │ └── train_loop.py │ │ ├── evaluation │ │ │ ├── __init__.py │ │ │ ├── cityscapes_evaluation.py │ │ │ ├── coco_evaluation.py │ │ │ ├── evaluator.py │ │ │ ├── fast_eval_api.py │ │ │ ├── lvis_evaluation.py │ │ │ ├── panoptic_evaluation.py │ │ │ ├── pascal_voc_evaluation.py │ │ │ ├── rotated_coco_evaluation.py │ │ │ ├── sem_seg_evaluation.py │ │ │ └── testing.py │ │ ├── export │ │ │ ├── README.md │ │ │ ├── __init__.py │ │ │ ├── api.py │ │ │ ├── c10.py │ │ │ ├── caffe2_export.py │ │ │ ├── caffe2_inference.py │ │ │ ├── caffe2_modeling.py │ │ │ ├── caffe2_patch.py │ │ │ ├── flatten.py │ │ │ ├── shared.py │ │ │ ├── torchscript.py │ │ │ └── torchscript_patch.py │ │ ├── layers │ │ │ ├── __init__.py │ │ │ ├── aspp.py │ │ │ ├── batch_norm.py │ │ │ ├── blocks.py │ │ │ ├── csrc │ │ │ │ ├── README.md │ │ │ │ ├── ROIAlignRotated │ │ │ │ │ ├── ROIAlignRotated.h │ │ │ │ │ ├── ROIAlignRotated_cpu.cpp │ │ │ │ │ └── ROIAlignRotated_cuda.cu │ │ │ │ ├── box_iou_rotated │ │ │ │ │ ├── box_iou_rotated.h │ │ │ │ │ ├── box_iou_rotated_cpu.cpp │ │ │ │ │ ├── box_iou_rotated_cuda.cu │ │ │ │ │ └── box_iou_rotated_utils.h │ │ │ │ ├── cocoeval │ │ │ │ │ ├── cocoeval.cpp │ │ │ │ │ └── cocoeval.h │ │ │ │ ├── cuda_version.cu │ │ │ │ ├── deformable │ │ │ │ │ ├── deform_conv.h │ │ │ │ │ ├── deform_conv_cuda.cu │ │ │ │ │ └── deform_conv_cuda_kernel.cu │ │ │ │ ├── nms_rotated │ │ │ │ │ ├── nms_rotated.h │ │ │ │ │ ├── nms_rotated_cpu.cpp │ │ │ │ │ └── nms_rotated_cuda.cu │ │ │ │ └── vision.cpp │ │ │ ├── deform_conv.py │ │ │ ├── mask_ops.py │ │ │ ├── nms.py │ │ │ ├── roi_align.py │ │ │ ├── roi_align_rotated.py │ │ │ ├── rotated_boxes.py │ │ │ ├── shape_spec.py │ │ │ └── wrappers.py │ │ ├── model_zoo │ │ │ ├── __init__.py │ │ │ └── model_zoo.py │ │ ├── modeling │ │ │ ├── __init__.py │ │ │ ├── anchor_generator.py │ │ │ ├── backbone │ │ │ │ ├── __init__.py │ │ │ │ ├── backbone.py │ │ │ │ ├── build.py │ │ │ │ ├── fpn.py │ │ │ │ ├── regnet.py │ │ │ │ └── resnet.py │ │ │ ├── box_regression.py │ │ │ ├── matcher.py │ │ │ ├── meta_arch │ │ │ │ ├── __init__.py │ │ │ │ ├── build.py │ │ │ │ ├── panoptic_fpn.py │ │ │ │ ├── rcnn.py │ │ │ │ ├── retinanet.py │ │ │ │ └── semantic_seg.py │ │ │ ├── mmdet_wrapper.py │ │ │ ├── poolers.py │ │ │ ├── postprocessing.py │ │ │ ├── proposal_generator │ │ │ │ ├── __init__.py │ │ │ │ ├── build.py │ │ │ │ ├── proposal_utils.py │ │ │ │ ├── rpn.py │ │ │ │ └── rrpn.py │ │ │ ├── roi_heads │ │ │ │ ├── __init__.py │ │ │ │ ├── box_head.py │ │ │ │ ├── cascade_rcnn.py │ │ │ │ ├── fast_rcnn.py │ │ │ │ ├── keypoint_head.py │ │ │ │ ├── mask_head.py │ │ │ │ ├── roi_heads.py │ │ │ │ └── rotated_fast_rcnn.py │ │ │ ├── sampling.py │ │ │ └── test_time_augmentation.py │ │ ├── projects │ │ │ ├── README.md │ │ │ └── __init__.py │ │ ├── solver │ │ │ ├── __init__.py │ │ │ ├── build.py │ │ │ └── lr_scheduler.py │ │ ├── structures │ │ │ ├── __init__.py │ │ │ ├── boxes.py │ │ │ ├── image_list.py │ │ │ ├── instances.py │ │ │ ├── keypoints.py │ │ │ ├── masks.py │ │ │ └── rotated_boxes.py │ │ └── utils │ │ │ ├── README.md │ │ │ ├── __init__.py │ │ │ ├── analysis.py │ │ │ ├── collect_env.py │ │ │ ├── colormap.py │ │ │ ├── comm.py │ │ │ ├── env.py │ │ │ ├── events.py │ │ │ ├── file_io.py │ │ │ ├── logger.py │ │ │ ├── memory.py │ │ │ ├── registry.py │ │ │ ├── serialize.py │ │ │ ├── testing.py │ │ │ ├── video_visualizer.py │ │ │ └── visualizer.py │ ├── dev │ │ ├── README.md │ │ ├── linter.sh │ │ ├── packaging │ │ │ ├── README.md │ │ │ ├── build_all_wheels.sh │ │ │ ├── build_wheel.sh │ │ │ ├── gen_install_table.py │ │ │ ├── gen_wheel_index.sh │ │ │ └── pkg_helpers.bash │ │ ├── parse_results.sh │ │ ├── run_inference_tests.sh │ │ └── run_instant_tests.sh │ ├── docker │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── deploy.Dockerfile │ │ └── docker-compose.yml │ ├── docs │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── README.md │ │ ├── _static │ │ │ └── css │ │ │ │ └── custom.css │ │ ├── conf.py │ │ ├── index.rst │ │ ├── modules │ │ │ ├── checkpoint.rst │ │ │ ├── config.rst │ │ │ ├── data.rst │ │ │ ├── data_transforms.rst │ │ │ ├── engine.rst │ │ │ ├── evaluation.rst │ │ │ ├── export.rst │ │ │ ├── fvcore.rst │ │ │ ├── index.rst │ │ │ ├── layers.rst │ │ │ ├── model_zoo.rst │ │ │ ├── modeling.rst │ │ │ ├── solver.rst │ │ │ ├── structures.rst │ │ │ └── utils.rst │ │ ├── notes │ │ │ ├── benchmarks.md │ │ │ ├── changelog.md │ │ │ ├── compatibility.md │ │ │ ├── contributing.md │ │ │ └── index.rst │ │ ├── requirements.txt │ │ └── tutorials │ │ │ ├── README.md │ │ │ ├── augmentation.md │ │ │ ├── builtin_datasets.md │ │ │ ├── configs.md │ │ │ ├── data_loading.md │ │ │ ├── datasets.md │ │ │ ├── deployment.md │ │ │ ├── evaluation.md │ │ │ ├── extend.md │ │ │ ├── getting_started.md │ │ │ ├── index.rst │ │ │ ├── install.md │ │ │ ├── models.md │ │ │ ├── training.md │ │ │ └── write-models.md │ ├── projects │ │ ├── DeepLab │ │ │ ├── README.md │ │ │ ├── configs │ │ │ │ └── Cityscapes-SemanticSegmentation │ │ │ │ │ ├── Base-DeepLabV3-OS16-Semantic.yaml │ │ │ │ │ ├── deeplab_v3_R_103_os16_mg124_poly_90k_bs16.yaml │ │ │ │ │ └── deeplab_v3_plus_R_103_os16_mg124_poly_90k_bs16.yaml │ │ │ ├── deeplab │ │ │ │ ├── __init__.py │ │ │ │ ├── build_solver.py │ │ │ │ ├── config.py │ │ │ │ ├── loss.py │ │ │ │ ├── lr_scheduler.py │ │ │ │ ├── resnet.py │ │ │ │ └── semantic_seg.py │ │ │ └── train_net.py │ │ ├── DensePose │ │ │ ├── README.md │ │ │ ├── apply_net.py │ │ │ ├── configs │ │ │ │ ├── Base-DensePose-RCNN-FPN.yaml │ │ │ │ ├── HRNet │ │ │ │ │ ├── densepose_rcnn_HRFPN_HRNet_w32_s1x.yaml │ │ │ │ │ ├── densepose_rcnn_HRFPN_HRNet_w40_s1x.yaml │ │ │ │ │ └── densepose_rcnn_HRFPN_HRNet_w48_s1x.yaml │ │ │ │ ├── cse │ │ │ │ │ ├── Base-DensePose-RCNN-FPN-Human.yaml │ │ │ │ │ ├── Base-DensePose-RCNN-FPN.yaml │ │ │ │ │ ├── densepose_rcnn_R_101_FPN_DL_s1x.yaml │ │ │ │ │ ├── densepose_rcnn_R_101_FPN_DL_soft_s1x.yaml │ │ │ │ │ ├── densepose_rcnn_R_101_FPN_s1x.yaml │ │ │ │ │ ├── densepose_rcnn_R_101_FPN_soft_s1x.yaml │ │ │ │ │ ├── densepose_rcnn_R_50_FPN_DL_s1x.yaml │ │ │ │ │ ├── densepose_rcnn_R_50_FPN_DL_soft_s1x.yaml │ │ │ │ │ ├── densepose_rcnn_R_50_FPN_s1x.yaml │ │ │ │ │ ├── densepose_rcnn_R_50_FPN_soft_animals_CA_finetune_16k.yaml │ │ │ │ │ ├── densepose_rcnn_R_50_FPN_soft_animals_CA_finetune_4k.yaml │ │ │ │ │ ├── densepose_rcnn_R_50_FPN_soft_animals_I0_finetune_16k.yaml │ │ │ │ │ ├── densepose_rcnn_R_50_FPN_soft_animals_I0_finetune_i2m_16k.yaml │ │ │ │ │ ├── densepose_rcnn_R_50_FPN_soft_animals_I0_finetune_m2m_16k.yaml │ │ │ │ │ ├── densepose_rcnn_R_50_FPN_soft_animals_finetune_16k.yaml │ │ │ │ │ ├── densepose_rcnn_R_50_FPN_soft_animals_finetune_4k.yaml │ │ │ │ │ ├── densepose_rcnn_R_50_FPN_soft_animals_finetune_maskonly_24k.yaml │ │ │ │ │ ├── densepose_rcnn_R_50_FPN_soft_chimps_finetune_4k.yaml │ │ │ │ │ └── densepose_rcnn_R_50_FPN_soft_s1x.yaml │ │ │ │ ├── densepose_rcnn_R_101_FPN_DL_WC1M_s1x.yaml │ │ │ │ ├── densepose_rcnn_R_101_FPN_DL_WC1_s1x.yaml │ │ │ │ ├── densepose_rcnn_R_101_FPN_DL_WC2M_s1x.yaml │ │ │ │ ├── densepose_rcnn_R_101_FPN_DL_WC2_s1x.yaml │ │ │ │ ├── densepose_rcnn_R_101_FPN_DL_s1x.yaml │ │ │ │ ├── densepose_rcnn_R_101_FPN_WC1M_s1x.yaml │ │ │ │ ├── densepose_rcnn_R_101_FPN_WC1_s1x.yaml │ │ │ │ ├── densepose_rcnn_R_101_FPN_WC2M_s1x.yaml │ │ │ │ ├── densepose_rcnn_R_101_FPN_WC2_s1x.yaml │ │ │ │ ├── densepose_rcnn_R_101_FPN_s1x.yaml │ │ │ │ ├── densepose_rcnn_R_101_FPN_s1x_legacy.yaml │ │ │ │ ├── densepose_rcnn_R_50_FPN_DL_WC1M_s1x.yaml │ │ │ │ ├── densepose_rcnn_R_50_FPN_DL_WC1_s1x.yaml │ │ │ │ ├── densepose_rcnn_R_50_FPN_DL_WC2M_s1x.yaml │ │ │ │ ├── densepose_rcnn_R_50_FPN_DL_WC2_s1x.yaml │ │ │ │ ├── densepose_rcnn_R_50_FPN_DL_s1x.yaml │ │ │ │ ├── densepose_rcnn_R_50_FPN_WC1M_s1x.yaml │ │ │ │ ├── densepose_rcnn_R_50_FPN_WC1_s1x.yaml │ │ │ │ ├── densepose_rcnn_R_50_FPN_WC2M_s1x.yaml │ │ │ │ ├── densepose_rcnn_R_50_FPN_WC2_s1x.yaml │ │ │ │ ├── densepose_rcnn_R_50_FPN_s1x.yaml │ │ │ │ ├── densepose_rcnn_R_50_FPN_s1x_legacy.yaml │ │ │ │ ├── evolution │ │ │ │ │ ├── Base-RCNN-FPN-Atop10P_CA.yaml │ │ │ │ │ ├── densepose_R_50_FPN_DL_WC1M_3x_Atop10P_CA.yaml │ │ │ │ │ ├── densepose_R_50_FPN_DL_WC1M_3x_Atop10P_CA_B_coarsesegm.yaml │ │ │ │ │ ├── densepose_R_50_FPN_DL_WC1M_3x_Atop10P_CA_B_finesegm.yaml │ │ │ │ │ ├── densepose_R_50_FPN_DL_WC1M_3x_Atop10P_CA_B_uniform.yaml │ │ │ │ │ └── densepose_R_50_FPN_DL_WC1M_3x_Atop10P_CA_B_uv.yaml │ │ │ │ └── quick_schedules │ │ │ │ │ ├── cse │ │ │ │ │ ├── densepose_rcnn_R_50_FPN_DL_instant_test.yaml │ │ │ │ │ └── densepose_rcnn_R_50_FPN_soft_animals_finetune_instant_test.yaml │ │ │ │ │ ├── densepose_rcnn_HRFPN_HRNet_w32_instant_test.yaml │ │ │ │ │ ├── densepose_rcnn_R_50_FPN_DL_instant_test.yaml │ │ │ │ │ ├── densepose_rcnn_R_50_FPN_TTA_inference_acc_test.yaml │ │ │ │ │ ├── densepose_rcnn_R_50_FPN_WC1_instant_test.yaml │ │ │ │ │ ├── densepose_rcnn_R_50_FPN_WC2_instant_test.yaml │ │ │ │ │ ├── densepose_rcnn_R_50_FPN_inference_acc_test.yaml │ │ │ │ │ ├── densepose_rcnn_R_50_FPN_instant_test.yaml │ │ │ │ │ └── densepose_rcnn_R_50_FPN_training_acc_test.yaml │ │ │ ├── densepose │ │ │ │ ├── __init__.py │ │ │ │ ├── config.py │ │ │ │ ├── converters │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── base.py │ │ │ │ │ ├── builtin.py │ │ │ │ │ ├── chart_output_hflip.py │ │ │ │ │ ├── chart_output_to_chart_result.py │ │ │ │ │ ├── hflip.py │ │ │ │ │ ├── segm_to_mask.py │ │ │ │ │ ├── to_chart_result.py │ │ │ │ │ └── to_mask.py │ │ │ │ ├── data │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── build.py │ │ │ │ │ ├── combined_loader.py │ │ │ │ │ ├── dataset_mapper.py │ │ │ │ │ ├── datasets │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── builtin.py │ │ │ │ │ │ ├── chimpnsee.py │ │ │ │ │ │ ├── coco.py │ │ │ │ │ │ ├── dataset_type.py │ │ │ │ │ │ └── lvis.py │ │ │ │ │ ├── image_list_dataset.py │ │ │ │ │ ├── inference_based_loader.py │ │ │ │ │ ├── meshes │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── builtin.py │ │ │ │ │ │ └── catalog.py │ │ │ │ │ ├── samplers │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── densepose_base.py │ │ │ │ │ │ ├── densepose_confidence_based.py │ │ │ │ │ │ ├── densepose_cse_base.py │ │ │ │ │ │ ├── densepose_cse_confidence_based.py │ │ │ │ │ │ ├── densepose_cse_uniform.py │ │ │ │ │ │ ├── densepose_uniform.py │ │ │ │ │ │ ├── mask_from_densepose.py │ │ │ │ │ │ └── prediction_to_gt.py │ │ │ │ │ ├── transform │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ └── image.py │ │ │ │ │ ├── utils.py │ │ │ │ │ └── video │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── frame_selector.py │ │ │ │ │ │ └── video_keyframe_dataset.py │ │ │ │ ├── engine │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── trainer.py │ │ │ │ ├── evaluation │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── d2_evaluator_adapter.py │ │ │ │ │ ├── densepose_coco_evaluation.py │ │ │ │ │ ├── evaluator.py │ │ │ │ │ ├── mesh_alignment_evaluator.py │ │ │ │ │ └── tensor_storage.py │ │ │ │ ├── modeling │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── build.py │ │ │ │ │ ├── confidence.py │ │ │ │ │ ├── cse │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── embedder.py │ │ │ │ │ │ ├── utils.py │ │ │ │ │ │ ├── vertex_direct_embedder.py │ │ │ │ │ │ └── vertex_feature_embedder.py │ │ │ │ │ ├── densepose_checkpoint.py │ │ │ │ │ ├── filter.py │ │ │ │ │ ├── hrfpn.py │ │ │ │ │ ├── hrnet.py │ │ │ │ │ ├── inference.py │ │ │ │ │ ├── losses │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── chart.py │ │ │ │ │ │ ├── chart_with_confidences.py │ │ │ │ │ │ ├── cse.py │ │ │ │ │ │ ├── cycle_pix2shape.py │ │ │ │ │ │ ├── cycle_shape2shape.py │ │ │ │ │ │ ├── embed.py │ │ │ │ │ │ ├── embed_utils.py │ │ │ │ │ │ ├── mask.py │ │ │ │ │ │ ├── mask_or_segm.py │ │ │ │ │ │ ├── registry.py │ │ │ │ │ │ ├── segm.py │ │ │ │ │ │ ├── soft_embed.py │ │ │ │ │ │ └── utils.py │ │ │ │ │ ├── predictors │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── chart.py │ │ │ │ │ │ ├── chart_confidence.py │ │ │ │ │ │ ├── chart_with_confidence.py │ │ │ │ │ │ ├── cse.py │ │ │ │ │ │ ├── cse_confidence.py │ │ │ │ │ │ ├── cse_with_confidence.py │ │ │ │ │ │ └── registry.py │ │ │ │ │ ├── roi_heads │ │ │ │ │ │ ├── __init__.py │ │ │ │ │ │ ├── deeplab.py │ │ │ │ │ │ ├── registry.py │ │ │ │ │ │ ├── roi_head.py │ │ │ │ │ │ └── v1convx.py │ │ │ │ │ ├── test_time_augmentation.py │ │ │ │ │ └── utils.py │ │ │ │ ├── structures │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── chart.py │ │ │ │ │ ├── chart_confidence.py │ │ │ │ │ ├── chart_result.py │ │ │ │ │ ├── cse.py │ │ │ │ │ ├── cse_confidence.py │ │ │ │ │ ├── data_relative.py │ │ │ │ │ ├── list.py │ │ │ │ │ ├── mesh.py │ │ │ │ │ └── transform_data.py │ │ │ │ ├── utils │ │ │ │ │ ├── dbhelper.py │ │ │ │ │ ├── logger.py │ │ │ │ │ └── transform.py │ │ │ │ └── vis │ │ │ │ │ ├── base.py │ │ │ │ │ ├── bounding_box.py │ │ │ │ │ ├── densepose_data_points.py │ │ │ │ │ ├── densepose_outputs_iuv.py │ │ │ │ │ ├── densepose_outputs_vertex.py │ │ │ │ │ ├── densepose_results.py │ │ │ │ │ ├── densepose_results_textures.py │ │ │ │ │ └── extractor.py │ │ │ ├── dev │ │ │ │ ├── README.md │ │ │ │ ├── run_inference_tests.sh │ │ │ │ └── run_instant_tests.sh │ │ │ ├── doc │ │ │ │ ├── BOOTSTRAPPING_PIPELINE.md │ │ │ │ ├── DENSEPOSE_CSE.md │ │ │ │ ├── DENSEPOSE_DATASETS.md │ │ │ │ ├── DENSEPOSE_IUV.md │ │ │ │ ├── GETTING_STARTED.md │ │ │ │ ├── RELEASE_2020_04.md │ │ │ │ ├── RELEASE_2021_03.md │ │ │ │ ├── RELEASE_2021_06.md │ │ │ │ ├── TOOL_APPLY_NET.md │ │ │ │ └── TOOL_QUERY_DB.md │ │ │ ├── query_db.py │ │ │ ├── tests │ │ │ │ ├── common.py │ │ │ │ ├── test_chart_based_annotations_accumulator.py │ │ │ │ ├── test_combine_data_loader.py │ │ │ │ ├── test_cse_annotations_accumulator.py │ │ │ │ ├── test_dataset_loaded_annotations.py │ │ │ │ ├── test_frame_selector.py │ │ │ │ ├── test_image_list_dataset.py │ │ │ │ ├── test_image_resize_transform.py │ │ │ │ ├── test_model_e2e.py │ │ │ │ ├── test_setup.py │ │ │ │ ├── test_structures.py │ │ │ │ ├── test_tensor_storage.py │ │ │ │ └── test_video_keyframe_dataset.py │ │ │ └── train_net.py │ │ ├── Panoptic-DeepLab │ │ │ ├── README.md │ │ │ ├── configs │ │ │ │ ├── COCO-PanopticSegmentation │ │ │ │ │ └── panoptic_deeplab_R_52_os16_mg124_poly_200k_bs64_crop_640_640_coco_dsconv.yaml │ │ │ │ └── Cityscapes-PanopticSegmentation │ │ │ │ │ ├── Base-PanopticDeepLab-OS16.yaml │ │ │ │ │ ├── panoptic_deeplab_R_52_os16_mg124_poly_90k_bs32_crop_512_1024.yaml │ │ │ │ │ └── panoptic_deeplab_R_52_os16_mg124_poly_90k_bs32_crop_512_1024_dsconv.yaml │ │ │ ├── panoptic_deeplab │ │ │ │ ├── __init__.py │ │ │ │ ├── config.py │ │ │ │ ├── dataset_mapper.py │ │ │ │ ├── panoptic_seg.py │ │ │ │ ├── post_processing.py │ │ │ │ └── target_generator.py │ │ │ └── train_net.py │ │ ├── PointRend │ │ │ ├── README.md │ │ │ ├── configs │ │ │ │ ├── InstanceSegmentation │ │ │ │ │ ├── Base-Implicit-PointRend.yaml │ │ │ │ │ ├── Base-PointRend-RCNN-FPN.yaml │ │ │ │ │ ├── implicit_pointrend_R_50_FPN_1x_coco.yaml │ │ │ │ │ ├── implicit_pointrend_R_50_FPN_3x_coco.yaml │ │ │ │ │ ├── pointrend_rcnn_R_101_FPN_3x_coco.yaml │ │ │ │ │ ├── pointrend_rcnn_R_50_FPN_1x_cityscapes.yaml │ │ │ │ │ ├── pointrend_rcnn_R_50_FPN_1x_coco.yaml │ │ │ │ │ ├── pointrend_rcnn_R_50_FPN_3x_coco.yaml │ │ │ │ │ └── pointrend_rcnn_X_101_32x8d_FPN_3x_coco.yaml │ │ │ │ └── SemanticSegmentation │ │ │ │ │ ├── Base-PointRend-Semantic-FPN.yaml │ │ │ │ │ └── pointrend_semantic_R_101_FPN_1x_cityscapes.yaml │ │ │ ├── point_rend │ │ │ │ ├── __init__.py │ │ │ │ ├── color_augmentation.py │ │ │ │ ├── config.py │ │ │ │ ├── mask_head.py │ │ │ │ ├── point_features.py │ │ │ │ ├── point_head.py │ │ │ │ ├── roi_heads.py │ │ │ │ └── semantic_seg.py │ │ │ └── train_net.py │ │ ├── PointSup │ │ │ ├── README.md │ │ │ ├── configs │ │ │ │ ├── implicit_pointrend_R_50_FPN_3x_point_sup_point_aug_coco.yaml │ │ │ │ ├── mask_rcnn_R_50_FPN_3x_point_sup_coco.yaml │ │ │ │ └── mask_rcnn_R_50_FPN_3x_point_sup_point_aug_coco.yaml │ │ │ ├── point_sup │ │ │ │ ├── __init__.py │ │ │ │ ├── config.py │ │ │ │ ├── dataset_mapper.py │ │ │ │ ├── detection_utils.py │ │ │ │ ├── mask_head.py │ │ │ │ ├── point_utils.py │ │ │ │ └── register_point_annotations.py │ │ │ ├── tools │ │ │ │ └── prepare_coco_point_annotations_without_masks.py │ │ │ └── train_net.py │ │ ├── README.md │ │ ├── Rethinking-BatchNorm │ │ │ ├── README.md │ │ │ ├── configs │ │ │ │ ├── mask_rcnn_BNhead.py │ │ │ │ ├── mask_rcnn_BNhead_batch_stats.py │ │ │ │ ├── mask_rcnn_BNhead_shuffle.py │ │ │ │ ├── mask_rcnn_SyncBNhead.py │ │ │ │ ├── retinanet_SyncBNhead.py │ │ │ │ └── retinanet_SyncBNhead_SharedTraining.py │ │ │ └── retinanet-eval-domain-specific.py │ │ ├── TensorMask │ │ │ ├── README.md │ │ │ ├── configs │ │ │ │ ├── Base-TensorMask.yaml │ │ │ │ ├── tensormask_R_50_FPN_1x.yaml │ │ │ │ └── tensormask_R_50_FPN_6x.yaml │ │ │ ├── setup.py │ │ │ ├── tensormask │ │ │ │ ├── __init__.py │ │ │ │ ├── arch.py │ │ │ │ ├── config.py │ │ │ │ └── layers │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── csrc │ │ │ │ │ ├── SwapAlign2Nat │ │ │ │ │ │ ├── SwapAlign2Nat.h │ │ │ │ │ │ └── SwapAlign2Nat_cuda.cu │ │ │ │ │ └── vision.cpp │ │ │ │ │ └── swap_align2nat.py │ │ │ ├── tests │ │ │ │ ├── __init__.py │ │ │ │ └── test_swap_align2nat.py │ │ │ └── train_net.py │ │ └── TridentNet │ │ │ ├── README.md │ │ │ ├── configs │ │ │ ├── Base-TridentNet-Fast-C4.yaml │ │ │ ├── tridentnet_fast_R_101_C4_3x.yaml │ │ │ ├── tridentnet_fast_R_50_C4_1x.yaml │ │ │ └── tridentnet_fast_R_50_C4_3x.yaml │ │ │ ├── train_net.py │ │ │ └── tridentnet │ │ │ ├── __init__.py │ │ │ ├── config.py │ │ │ ├── trident_backbone.py │ │ │ ├── trident_conv.py │ │ │ ├── trident_rcnn.py │ │ │ └── trident_rpn.py │ ├── setup.cfg │ ├── setup.py │ ├── tests │ │ ├── README.md │ │ ├── __init__.py │ │ ├── config │ │ │ ├── dir1 │ │ │ │ ├── dir1_a.py │ │ │ │ └── dir1_b.py │ │ │ ├── root_cfg.py │ │ │ ├── test_instantiate_config.py │ │ │ ├── test_lazy_config.py │ │ │ └── test_yacs_config.py │ │ ├── data │ │ │ ├── __init__.py │ │ │ ├── test_coco.py │ │ │ ├── test_coco_evaluation.py │ │ │ ├── test_dataset.py │ │ │ ├── test_detection_utils.py │ │ │ ├── test_rotation_transform.py │ │ │ ├── test_sampler.py │ │ │ └── test_transforms.py │ │ ├── layers │ │ │ ├── __init__.py │ │ │ ├── test_blocks.py │ │ │ ├── test_deformable.py │ │ │ ├── test_mask_ops.py │ │ │ ├── test_nms.py │ │ │ ├── test_nms_rotated.py │ │ │ ├── test_roi_align.py │ │ │ └── test_roi_align_rotated.py │ │ ├── modeling │ │ │ ├── __init__.py │ │ │ ├── test_anchor_generator.py │ │ │ ├── test_backbone.py │ │ │ ├── test_box2box_transform.py │ │ │ ├── test_fast_rcnn.py │ │ │ ├── test_matcher.py │ │ │ ├── test_mmdet.py │ │ │ ├── test_model_e2e.py │ │ │ ├── test_roi_heads.py │ │ │ ├── test_roi_pooler.py │ │ │ └── test_rpn.py │ │ ├── structures │ │ │ ├── __init__.py │ │ │ ├── test_boxes.py │ │ │ ├── test_imagelist.py │ │ │ ├── test_instances.py │ │ │ ├── test_masks.py │ │ │ └── test_rotated_boxes.py │ │ ├── test_checkpoint.py │ │ ├── test_engine.py │ │ ├── test_events.py │ │ ├── test_export_caffe2.py │ │ ├── test_export_torchscript.py │ │ ├── test_model_analysis.py │ │ ├── test_model_zoo.py │ │ ├── test_packaging.py │ │ ├── test_registry.py │ │ ├── test_scheduler.py │ │ └── test_visualizer.py │ └── tools │ │ ├── README.md │ │ ├── analyze_model.py │ │ ├── benchmark.py │ │ ├── convert-torchvision-to-d2.py │ │ ├── deploy │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── caffe2_mask_rcnn.cpp │ │ ├── export_model.py │ │ └── torchscript_traced_mask_rcnn.cpp │ │ ├── lazyconfig_train_net.py │ │ ├── plain_train_net.py │ │ ├── train_net.py │ │ ├── visualize_data.py │ │ └── visualize_json_results.py ├── ext_utils │ ├── flowlib.py │ └── util_flow.py ├── fscore.py ├── softras │ ├── .gitignore │ ├── setup.py │ └── soft_renderer │ │ ├── __init__.py │ │ ├── cuda │ │ ├── __init__.py │ │ ├── create_texture_image_cuda.cpp │ │ ├── create_texture_image_cuda_kernel.cu │ │ ├── load_textures_cuda.cpp │ │ ├── load_textures_cuda_kernel.cu │ │ ├── soft_rasterize_cuda.cpp │ │ ├── soft_rasterize_cuda_kernel.cu │ │ ├── voxelization_cuda.cpp │ │ └── voxelization_cuda_kernel.cu │ │ ├── functional │ │ ├── __init__.py │ │ ├── ambient_lighting.py │ │ ├── directional_lighting.py │ │ ├── face_vertices.py │ │ ├── get_points_from_angles.py │ │ ├── load_obj.py │ │ ├── look.py │ │ ├── look_at.py │ │ ├── orthogonal.py │ │ ├── perspective.py │ │ ├── projection.py │ │ ├── save_obj.py │ │ ├── soft_rasterize.py │ │ ├── vertex_normals.py │ │ └── voxelization.py │ │ ├── lighting.py │ │ ├── losses.py │ │ ├── mesh.py │ │ ├── rasterizer.py │ │ ├── renderer.py │ │ └── transform.py └── vcnplus │ ├── .gitignore │ ├── auto_gen.py │ ├── compute_flow.sh │ ├── flowutils │ ├── __init__.py │ ├── detlib.py │ ├── dydepth.py │ ├── flowlib.py │ ├── io.py │ ├── multiscaleloss.py │ ├── sintel_io.py │ └── util_flow.py │ └── models │ ├── VCNplus.py │ ├── __init__.py │ ├── conv4d.py │ ├── det.py │ ├── det_losses.py │ ├── det_utils.py │ ├── feature_extraction.py │ ├── networks │ ├── .gitignore │ ├── DCNv2 │ │ ├── .gitignore │ │ ├── DCN │ │ │ ├── __init__.py │ │ │ ├── dcn_v2.py │ │ │ ├── src │ │ │ │ ├── cpu │ │ │ │ │ ├── dcn_v2_cpu.cpp │ │ │ │ │ ├── dcn_v2_im2col_cpu.cpp │ │ │ │ │ ├── dcn_v2_im2col_cpu.h │ │ │ │ │ ├── dcn_v2_psroi_pooling_cpu.cpp │ │ │ │ │ └── vision.h │ │ │ │ ├── cuda │ │ │ │ │ ├── dcn_v2_cuda.cu │ │ │ │ │ ├── dcn_v2_im2col_cuda.cu │ │ │ │ │ ├── dcn_v2_im2col_cuda.h │ │ │ │ │ ├── dcn_v2_psroi_pooling_cuda.cu │ │ │ │ │ └── vision.h │ │ │ │ ├── dcn_v2.h │ │ │ │ └── vision.cpp │ │ │ ├── testcpu.py │ │ │ └── testcuda.py │ │ ├── LICENSE │ │ ├── README.md │ │ ├── make.sh │ │ └── setup.py │ ├── dlav0.py │ ├── large_hourglass.py │ ├── msra_resnet.py │ ├── pose_dla_dcn.py │ └── resnet_dcn.py │ └── submodule.py └── utils ├── colors.py ├── cselib.py └── io.py /.gitignore: -------------------------------------------------------------------------------- 1 | run.sh 2 | run_human.sh 3 | t1.txt 4 | t2.txt 5 | cam-files/ 6 | trash/* 7 | raw 8 | mesh_material/geodists_smpl_27554.pkl 9 | mesh_material/geodists_sheep_5004.pkl 10 | mesh_material/posenet 11 | logdir 12 | tmp 13 | Manifold 14 | database 15 | __pycache__/ 16 | lasr_vcn/ 17 | *.pyc 18 | .nfs* 19 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "third_party/kmeans_pytorch"] 2 | path = third_party/kmeans_pytorch 3 | url = https://github.com/subhadarship/kmeans_pytorch 4 | ignore = dirty 5 | [submodule "third_party/pytorch3d"] 6 | path = third_party/pytorch3d 7 | url = https://github.com/facebookresearch/pytorch3d 8 | ignore = dirty 9 | [submodule "third_party/detectron2"] 10 | path = third_party/detectron2 11 | url = https://github.com/facebookresearch/detectron2 12 | ignore = dirty 13 | -------------------------------------------------------------------------------- /configs/T_samba1.config: -------------------------------------------------------------------------------- 1 | [data] 2 | dframe = 1 3 | init_frame = 0 4 | end_frame = -1 5 | can_frame = -1 6 | 7 | [data_0] 8 | datapath = database/DAVIS/JPEGImages/Full-Resolution/T_samba1/ 9 | ks = 1111.0891608773807000 1109.5029285201724000 799.5000000000000000 599.5000000000000000 10 | -------------------------------------------------------------------------------- /configs/T_swing1.config: -------------------------------------------------------------------------------- 1 | [data] 2 | dframe = 1 3 | init_frame = 0 4 | end_frame = -1 5 | can_frame = -1 6 | 7 | [data_0] 8 | datapath = database/DAVIS/JPEGImages/Full-Resolution/T_swing1/ 9 | ks = 1111.0891608773807000 1109.5029285201724000 799.5000000000000000 599.5000000000000000 10 | -------------------------------------------------------------------------------- /configs/a-eagle-1.config: -------------------------------------------------------------------------------- 1 | [data] 2 | datapath = database/DAVIS/JPEGImages/Full-Resolution/ 3 | dframe = 1 4 | init_frame = 0 5 | end_frame = -1 6 | can_frame = -1 7 | 8 | [data_0] 9 | ks = 5.120000000000000000e+02 5.120000000000000000e+02 2.560000000000000000e+02 2.560000000000000000e+02 10 | datapath = database/DAVIS/JPEGImages/Full-Resolution/a-eagle-1/ 11 | -------------------------------------------------------------------------------- /configs/a-hands-1.config: -------------------------------------------------------------------------------- 1 | [data] 2 | dframe = 1 3 | init_frame = 0 4 | end_frame = -1 5 | can_frame = -1 6 | 7 | [data_0] 8 | ks = 5.120000000000000000e+02 5.120000000000000000e+02 2.560000000000000000e+02 2.560000000000000000e+02 9 | datapath = database/DAVIS/JPEGImages/Full-Resolution/a-hands-1/ 10 | -------------------------------------------------------------------------------- /configs/adult7-sub.config: -------------------------------------------------------------------------------- 1 | [data] 2 | dframe = 1 3 | init_frame = 0 4 | end_frame = -1 5 | can_frame = -1 6 | 7 | [data_0] 8 | ks = 1780.2113875928924 1780.2113875928924 540.0252075195312 962.663330078125 9 | datapath = database/DAVIS/JPEGImages/Full-Resolution/adult-400/ 10 | -------------------------------------------------------------------------------- /configs/ama-1v.config: -------------------------------------------------------------------------------- 1 | [data] 2 | dframe = 1 3 | init_frame = 0 4 | end_frame = -1 5 | can_frame = -1 6 | 7 | [data_0] 8 | ks = 1111.0891608773807000 1109.5029285201724000 799.5000000000000000 599.5000000000000000 9 | datapath = database/DAVIS/JPEGImages/Full-Resolution/T_samba1/ 10 | -------------------------------------------------------------------------------- /configs/ama-2v.config: -------------------------------------------------------------------------------- 1 | [data] 2 | dframe = 1 3 | init_frame = 0 4 | end_frame = -1 5 | can_frame = -1 6 | 7 | [data_0] 8 | ks = 1111.0891608773807000 1109.5029285201724000 799.5000000000000000 599.5000000000000000 9 | datapath = database/DAVIS/JPEGImages/Full-Resolution/T_samba1/ 10 | 11 | [data_1] 12 | ks = 1111.0891608773807000 1109.5029285201724000 799.5000000000000000 599.5000000000000000 13 | datapath = database/DAVIS/JPEGImages/Full-Resolution/T_samba2/ 14 | -------------------------------------------------------------------------------- /configs/ama-4v.config: -------------------------------------------------------------------------------- 1 | [data] 2 | dframe = 1 3 | init_frame = 0 4 | end_frame = -1 5 | can_frame = -1 6 | 7 | [data_0] 8 | ks = 1111.0891608773807000 1109.5029285201724000 799.5000000000000000 599.5000000000000000 9 | datapath = database/DAVIS/JPEGImages/Full-Resolution/T_samba1/ 10 | 11 | [data_1] 12 | ks = 1111.0891608773807000 1109.5029285201724000 799.5000000000000000 599.5000000000000000 13 | datapath = database/DAVIS/JPEGImages/Full-Resolution/T_samba2/ 14 | 15 | [data_2] 16 | ks = 1111.0891608773807000 1109.5029285201724000 799.5000000000000000 599.5000000000000000 17 | datapath = database/DAVIS/JPEGImages/Full-Resolution/T_samba3/ 18 | 19 | [data_3] 20 | ks = 1111.0891608773807000 1109.5029285201724000 799.5000000000000000 599.5000000000000000 21 | datapath = database/DAVIS/JPEGImages/Full-Resolution/T_samba4/ 22 | -------------------------------------------------------------------------------- /configs/ama-female1.config: -------------------------------------------------------------------------------- 1 | [data] 2 | dframe = 1 3 | init_frame = 0 4 | end_frame = -1 5 | can_frame = -1 6 | 7 | [data_0] 8 | ks = 1111.0891608773807000 1109.5029285201724000 799.5000000000000000 599.5000000000000000 9 | datapath = database/DAVIS/JPEGImages/Full-Resolution/T_swing1/ 10 | 11 | [data_1] 12 | ks = 1111.0891608773807000 1109.5029285201724000 799.5000000000000000 599.5000000000000000 13 | datapath = database/DAVIS/JPEGImages/Full-Resolution/T_samba1/ 14 | -------------------------------------------------------------------------------- /configs/cat-coco.config: -------------------------------------------------------------------------------- 1 | [data] 2 | dframe = 1 3 | init_frame = 0 4 | end_frame = -1 5 | can_frame = -1 6 | 7 | [data_0] 8 | ishuman = n 9 | ks = 1920 1920 960 540 10 | datapath = database/DAVIS/JPEGImages/Full-Resolution/cat-coco000/ 11 | 12 | [data_1] 13 | ishuman = n 14 | ks = 1920 1920 960 540 15 | datapath = database/DAVIS/JPEGImages/Full-Resolution/cat-coco001/ 16 | 17 | [data_2] 18 | ishuman = n 19 | ks = 1920 1920 960 540 20 | datapath = database/DAVIS/JPEGImages/Full-Resolution/cat-coco002/ 21 | 22 | [data_3] 23 | ishuman = n 24 | ks = 1920 1920 960 540 25 | datapath = database/DAVIS/JPEGImages/Full-Resolution/cat-coco003/ 26 | 27 | [data_4] 28 | ishuman = n 29 | ks = 1920 1920 960 540 30 | datapath = database/DAVIS/JPEGImages/Full-Resolution/cat-coco004/ 31 | 32 | [data_5] 33 | ishuman = n 34 | ks = 1920 1920 540 960 35 | datapath = database/DAVIS/JPEGImages/Full-Resolution/cat-coco005/ 36 | 37 | -------------------------------------------------------------------------------- /configs/cat-pikachiu-sub.config: -------------------------------------------------------------------------------- 1 | [data] 2 | dframe = 1 3 | init_frame = 0 4 | end_frame = -1 5 | can_frame = -1 6 | 7 | [data_0] 8 | ks = 1920 1920 960 540 9 | datapath = database/DAVIS/JPEGImages/Full-Resolution/cat-pikachiu04/ 10 | -------------------------------------------------------------------------------- /configs/cat-retarget.config: -------------------------------------------------------------------------------- 1 | [data] 2 | dframe = 1 3 | init_frame = 0 4 | end_frame = -1 5 | can_frame = -1 6 | 7 | [data_0] 8 | ks = 360 360 360 203 9 | datapath = database/DAVIS/JPEGImages/Full-Resolution/cat-retarget00/ 10 | -------------------------------------------------------------------------------- /configs/cat-socks-sub.config: -------------------------------------------------------------------------------- 1 | [data] 2 | dframe = 1 3 | init_frame = 0 4 | end_frame = -1 5 | can_frame = -1 6 | 7 | [data_0] 8 | ks = 1920 1920 960 540 9 | datapath = database/DAVIS/JPEGImages/Full-Resolution/cat-socks03/ 10 | 11 | #[data_0] 12 | #ks = 1920 1920 960 540 13 | #datapath = database/DAVIS/JPEGImages/Full-Resolution/cat-socks00/ 14 | # 15 | #[data_1] 16 | #ks = 1920 1920 540 960 17 | #datapath = database/DAVIS/JPEGImages/Full-Resolution/cat-socks01/ 18 | # 19 | #[data_2] 20 | #ks = 1920 1920 960 540 21 | #datapath = database/DAVIS/JPEGImages/Full-Resolution/cat-socks02/ 22 | # 23 | #[data_3] 24 | #ks = 1920 1920 960 540 25 | #datapath = database/DAVIS/JPEGImages/Full-Resolution/cat-socks03/ 26 | # 27 | #[data_4] 28 | #ks = 1920 1920 960 540 29 | #datapath = database/DAVIS/JPEGImages/Full-Resolution/cat-socks04/ 30 | -------------------------------------------------------------------------------- /configs/dog-tetres.config: -------------------------------------------------------------------------------- 1 | [data] 2 | dframe = 1 3 | init_frame = 0 4 | end_frame = -1 5 | can_frame = -1 6 | 7 | [data_0] 8 | ishuman = n 9 | ks = 1280 1280 640 360 10 | datapath = database/DAVIS/JPEGImages/Full-Resolution/dog-tetres000/ 11 | 12 | -------------------------------------------------------------------------------- /configs/felipe-1.config: -------------------------------------------------------------------------------- 1 | [data] 2 | dframe = 1 3 | init_frame = 0 4 | end_frame = -1 5 | can_frame = -1 6 | 7 | [data_0] 8 | ishuman = n 9 | ks = 1280 1280 640 360 10 | datapath = database/DAVIS/JPEGImages/Full-Resolution/felipe-1000/ 11 | 12 | -------------------------------------------------------------------------------- /configs/shiba_100.config: -------------------------------------------------------------------------------- 1 | [data] 2 | datapath = database/DAVIS/JPEGImages/Full-Resolution/ 3 | dframe = 1 4 | init_frame = 0 5 | end_frame = -1 6 | can_frame = -1 7 | 8 | [data_0] 9 | ks = 2121.068882327623 2121.068882327623 1104.4833984375 604.4934692382812 10 | -------------------------------------------------------------------------------- /dataloader/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/banmo/422098726f4c42914f7881f43ab57ea2cff2b90e/dataloader/__init__.py -------------------------------------------------------------------------------- /mesh_material/.gitignore: -------------------------------------------------------------------------------- 1 | posenet/ 2 | -------------------------------------------------------------------------------- /mesh_material/sheep_5004_sph.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/banmo/422098726f4c42914f7881f43ab57ea2cff2b90e/mesh_material/sheep_5004_sph.pkl -------------------------------------------------------------------------------- /mesh_material/smpl_27554_sph.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/banmo/422098726f4c42914f7881f43ab57ea2cff2b90e/mesh_material/smpl_27554_sph.pkl -------------------------------------------------------------------------------- /mesh_material/wood.obj: -------------------------------------------------------------------------------- 1 | mtllib ./wood.obj.mtl 2 | 3 | v -0.300000 -0.300000 0.000000 4 | v 0.300000 -0.300000 0.000000 5 | v -0.300000 0.300000 0.000000 6 | v 0.300000 0.300000 0.000000 7 | vn 0.000000 0.000000 1.000000 8 | vn 0.000000 0.000000 1.000000 9 | vn 0.000000 0.000000 1.000000 10 | vn 0.000000 0.000000 1.000000 11 | vt 0.000000 0.000000 12 | vt 1.000000 0.000000 13 | vt 0.000000 1.000000 14 | vt 1.000000 1.000000 15 | 16 | usemtl material_0 17 | f 1/1/1 2/2/2 4/4/4 18 | f 1/1/1 4/4/4 3/3/3 19 | -------------------------------------------------------------------------------- /misc/.gitignore: -------------------------------------------------------------------------------- 1 | rtks/ 2 | -------------------------------------------------------------------------------- /misc/ama.txt: -------------------------------------------------------------------------------- 1 | http://groups.csail.mit.edu/graphics/mesh_animation/T_samba.tar 2 | http://groups.csail.mit.edu/graphics/mesh_animation/T_swing.tar 3 | -------------------------------------------------------------------------------- /misc/posenet.txt: -------------------------------------------------------------------------------- 1 | https://www.dropbox.com/s/51cjzo8zgz966t5/human.pth 2 | https://www.dropbox.com/s/1464pg6c9ce8rve/quad.pth 3 | -------------------------------------------------------------------------------- /misc/processed/download.sh: -------------------------------------------------------------------------------- 1 | seqname=$1 2 | rootdir=$PWD 3 | 4 | mkdir -p database/DAVIS/ && cd "$_" 5 | wget $(cat $rootdir/misc/processed/processed-$seqname.txt) 6 | unzip '*.zip'; cd ../../ 7 | -------------------------------------------------------------------------------- /misc/processed/processed-cat-pikachiu-imgs.txt: -------------------------------------------------------------------------------- 1 | https://www.dropbox.com/s/9x9wwop3kcxxe5r/cat-pikachiu-imgs.zip 2 | -------------------------------------------------------------------------------- /misc/processed/processed-cat-pikachiu.txt: -------------------------------------------------------------------------------- 1 | https://www.dropbox.com/s/mwepx7g84bqgt4n/cat-pikachiu00.zip 2 | https://www.dropbox.com/s/trtf2pbrodb28ko/cat-pikachiu01.zip 3 | https://www.dropbox.com/s/8hef0mghmzubrlq/cat-pikachiu02.zip 4 | https://www.dropbox.com/s/jjm9hb2d5kplz2v/cat-pikachiu03.zip 5 | https://www.dropbox.com/s/0imsgwymw972i7k/cat-pikachiu04.zip 6 | https://www.dropbox.com/s/6nxiwbp3vo7fn15/cat-pikachiu05.zip 7 | https://www.dropbox.com/s/46m9h36ezzczte5/cat-pikachiu06.zip 8 | https://www.dropbox.com/s/ib5mwanqcjx1dgx/cat-pikachiu07.zip 9 | https://www.dropbox.com/s/mexpiul6l699xh0/cat-pikachiu08.zip 10 | https://www.dropbox.com/s/ogccc9i9w6h2qs0/cat-pikachiu09.zip 11 | https://www.dropbox.com/s/sdrgmnfcdifkho6/cat-pikachiu13.zip 12 | -------------------------------------------------------------------------------- /misc/processed/processed-cat-socks.txt: -------------------------------------------------------------------------------- 1 | https://www.dropbox.com/s/j9425to9sdx6l08/cat-socks006.zip 2 | -------------------------------------------------------------------------------- /misc/processed/processed-human-cap.txt: -------------------------------------------------------------------------------- 1 | https://dl.fbaipublicfiles.com/banmo/processed/human-cap/adult-400.zip 2 | https://dl.fbaipublicfiles.com/banmo/processed/human-cap/adult-401.zip 3 | https://dl.fbaipublicfiles.com/banmo/processed/human-cap/adult-402.zip 4 | https://dl.fbaipublicfiles.com/banmo/processed/human-cap/adult-404.zip 5 | https://dl.fbaipublicfiles.com/banmo/processed/human-cap/adult-405.zip 6 | https://dl.fbaipublicfiles.com/banmo/processed/human-cap/adult-407.zip 7 | https://dl.fbaipublicfiles.com/banmo/processed/human-cap/adult-500.zip 8 | https://dl.fbaipublicfiles.com/banmo/processed/human-cap/adult-501.zip 9 | https://dl.fbaipublicfiles.com/banmo/processed/human-cap/adult-502.zip 10 | https://dl.fbaipublicfiles.com/banmo/processed/human-cap/adult-503.zip 11 | -------------------------------------------------------------------------------- /misc/vid/download-chunk.sh: -------------------------------------------------------------------------------- 1 | seqname=$1 2 | rootdir=$PWD 3 | 4 | mkdir -p raw/$seqname && cd "$_" 5 | # download the video 6 | wget $(cat $rootdir/misc/vid/vidchunk-$seqname.txt) -O tmp.zip 7 | unzip tmp.zip 8 | rm tmp.zip 9 | cd ../../ 10 | -------------------------------------------------------------------------------- /misc/vid/download.sh: -------------------------------------------------------------------------------- 1 | seqname=$1 2 | rootdir=$PWD 3 | 4 | mkdir -p raw/$seqname && cd "$_" 5 | # download the video 6 | wget $(cat $rootdir/misc/vid/vid-$seqname.txt) 7 | cd ../../ 8 | -------------------------------------------------------------------------------- /misc/vid/vid-cat-coco.txt: -------------------------------------------------------------------------------- 1 | https://www.dropbox.com/s/40rdclj51lk9r9f/IMG_8542.MOV 2 | https://www.dropbox.com/s/hn6nbv19o03dj24/IMG_8546.MOV 3 | https://www.dropbox.com/s/8xjjhkazkks7m6l/IMG_8547.MOV 4 | https://www.dropbox.com/s/3nvw27m8qa8s039/IMG_8548.MOV 5 | https://www.dropbox.com/s/x1qe7mi5qem1f83/IMG_8550.MOV 6 | https://www.dropbox.com/s/1na8ktcx302emle/IMG_8552.MOV 7 | -------------------------------------------------------------------------------- /misc/vid/vid-cat-pikachiu.txt: -------------------------------------------------------------------------------- 1 | https://dl.fbaipublicfiles.com/banmo/cat-pikachiu/cat-pikachiu_0.MOV 2 | https://dl.fbaipublicfiles.com/banmo/cat-pikachiu/cat-pikachiu_1.MOV 3 | https://dl.fbaipublicfiles.com/banmo/cat-pikachiu/cat-pikachiu_2.MOV 4 | https://dl.fbaipublicfiles.com/banmo/cat-pikachiu/cat-pikachiu_3.MOV 5 | https://dl.fbaipublicfiles.com/banmo/cat-pikachiu/cat-pikachiu_4.MOV 6 | https://dl.fbaipublicfiles.com/banmo/cat-pikachiu/cat-pikachiu_5.MOV 7 | https://dl.fbaipublicfiles.com/banmo/cat-pikachiu/cat-pikachiu_6.MOV 8 | https://dl.fbaipublicfiles.com/banmo/cat-pikachiu/cat-pikachiu_7.MOV 9 | https://dl.fbaipublicfiles.com/banmo/cat-pikachiu/cat-pikachiu_8.MOV 10 | https://dl.fbaipublicfiles.com/banmo/cat-pikachiu/cat-pikachiu_9.MOV 11 | https://www.dropbox.com/s/n4yuccd64dl0mkz/cat-pikachiu_13.MOV 12 | -------------------------------------------------------------------------------- /misc/vid/vid-dog-tetres.txt: -------------------------------------------------------------------------------- 1 | https://www.dropbox.com/s/pic6v6fc2pjki6j/dog-tetres-00.mp4 2 | -------------------------------------------------------------------------------- /misc/vid/vid-human-cap.txt: -------------------------------------------------------------------------------- 1 | https://dl.fbaipublicfiles.com/banmo/human-cap/human-cap_0.MOV 2 | https://dl.fbaipublicfiles.com/banmo/human-cap/human-cap_1.MOV 3 | https://dl.fbaipublicfiles.com/banmo/human-cap/human-cap_2.MOV 4 | https://dl.fbaipublicfiles.com/banmo/human-cap/human-cap_3.MOV 5 | https://dl.fbaipublicfiles.com/banmo/human-cap/human-cap_4.MOV 6 | https://dl.fbaipublicfiles.com/banmo/human-cap/human-cap_5.MOV 7 | https://dl.fbaipublicfiles.com/banmo/human-cap/human-cap_6.MOV 8 | https://dl.fbaipublicfiles.com/banmo/human-cap/human-cap_7.MOV 9 | https://dl.fbaipublicfiles.com/banmo/human-cap/human-cap_8.MOV 10 | https://dl.fbaipublicfiles.com/banmo/human-cap/human-cap_9.MOV 11 | -------------------------------------------------------------------------------- /misc/vid/vidchunk-penguin.txt: -------------------------------------------------------------------------------- 1 | https://www.dropbox.com/sh/fsejyvti8kq2g00/AAD8g9ATXB4w6Uy4_zERx9Rpa 2 | -------------------------------------------------------------------------------- /nnutils/vis_utils.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. 2 | 3 | import torch 4 | 5 | def image_grid(img, row, col): 6 | """ 7 | img: N,h,w,x 8 | collage: 1,.., x 9 | """ 10 | bs,h,w,c=img.shape 11 | device = img.device 12 | collage = torch.zeros(h*row, w*col, c).to(device) 13 | for i in range(row): 14 | for j in range(col): 15 | collage[i*h:(i+1)*h,j*w:(j+1)*w] = img[i*col+j] 16 | return collage 17 | -------------------------------------------------------------------------------- /preprocess/save_zip.sh: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. 2 | 3 | # save preprocessed files to zips 4 | seqname=$1 5 | #seqname=cat-pikachiu00 6 | 7 | cd database/DAVIS/ 8 | zip $seqname.zip -r Annotations/Full-Resolution/$seqname/ \ 9 | Densepose/Full-Resolution/$seqname/ \ 10 | Flow*/Full-Resolution/$seqname/ \ 11 | JPEGImages/Full-Resolution/$seqname/ 12 | -------------------------------------------------------------------------------- /scripts/abalations/template-ama-cam.sh: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. 2 | gpus=$1 3 | seqname=$2 # 630 frames 4 | num_epochs=$3 5 | addname=b64-cam-rig 6 | addr=10005 7 | use_human= 8 | 9 | model_prefix=$seqname-lbs-rkopt-$num_epochs-$addname 10 | if [ "$use_human" = "" ]; then 11 | pose_cnn_path=mesh_material/posenet/human.pth 12 | else 13 | pose_cnn_path=mesh_material/posenet/quad.pth 14 | fi 15 | echo $pose_cnn_path 16 | 17 | # mode: line load 18 | savename=${model_prefix}-init 19 | bash scripts/template-mgpu.sh $gpus $savename \ 20 | $seqname $addr --num_epochs $num_epochs --lbs --root_opt --ks_opt \ 21 | --lineload --batch_size 64 --nsample 4 \ 22 | --warmup_shape_ep 5 \ 23 | --nounc_filter \ 24 | --clip_scale 100 --rig_loss \ 25 | --${use_human}use_human 26 | #--symm_shape \ 27 | #--pose_cnn_path $pose_cnn_path \ 28 | -------------------------------------------------------------------------------- /scripts/abalations/template-ama-embed.sh: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. 2 | gpus=$1 3 | seqname=ama-female # 2600 4 | num_epochs=120 5 | addname=b4ft-nomt 6 | addr=10006 7 | use_human= 8 | 9 | model_prefix=$seqname-lbs-rkopt-$num_epochs-$addname 10 | if [ "$use_human" = "" ]; then 11 | pose_cnn_path=mesh_material/posenet/human.pth 12 | else 13 | pose_cnn_path=mesh_material/posenet/quad.pth 14 | fi 15 | echo $pose_cnn_path 16 | 17 | # mode: line load 18 | savename=${model_prefix}-init 19 | bash scripts/template-mgpu.sh $gpus $savename \ 20 | $seqname $addr --num_epochs $num_epochs --lbs --root_opt --ks_opt \ 21 | --nsample 64 --batch_size 4 --ft_cse --nomt_cse \ 22 | --pose_cnn_path $pose_cnn_path \ 23 | --warmup_shape_ep 5 \ 24 | --${use_human}use_human 25 | #--lineload --batch_size 64 --nsample 4 \ 26 | -------------------------------------------------------------------------------- /scripts/abalations/template-ama-nactive.sh: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. 2 | gpus=$1 3 | nactive=$2 4 | seqname=ama-female # 630 frames 5 | num_epochs=120 6 | addname=b64-nactive-$nactive 7 | addr=10005 8 | use_human= 9 | 10 | model_prefix=$seqname-lbs-rkopt-$num_epochs-$addname 11 | if [ "$use_human" = "" ]; then 12 | pose_cnn_path=mesh_material/posenet/human.pth 13 | else 14 | pose_cnn_path=mesh_material/posenet/quad.pth 15 | fi 16 | echo $pose_cnn_path 17 | 18 | # mode: line load 19 | savename=${model_prefix}-init 20 | bash scripts/template-mgpu.sh $gpus $savename \ 21 | $seqname $addr --num_epochs $num_epochs --lbs --root_opt --ks_opt \ 22 | --pose_cnn_path $pose_cnn_path \ 23 | --lineload --batch_size 64 --nsample 4 \ 24 | --nactive $nactive \ 25 | --warmup_shape_ep 5 \ 26 | --${use_human}use_human 27 | #--symm_shape \ 28 | #--nouse_unc \ 29 | -------------------------------------------------------------------------------- /scripts/abalations/template-ama-quad.sh: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. 2 | gpus=$1 3 | seqname=ama-female-cam # 2600 4 | #seqname=ama-female # 2600 5 | num_epochs=120 6 | addname=b64-quad 7 | addr=10005 8 | use_human= 9 | 10 | model_prefix=$seqname-lbs-rkopt-$num_epochs-$addname 11 | if [ "$use_human" = "" ]; then 12 | pose_cnn_path=mesh_material/posenet/human.pth 13 | else 14 | pose_cnn_path=mesh_material/posenet/quad.pth 15 | fi 16 | echo $pose_cnn_path 17 | 18 | # mode: line load 19 | savename=${model_prefix}-init 20 | bash scripts/template-mgpu.sh $gpus $savename \ 21 | $seqname $addr --num_epochs $num_epochs --lbs --root_opt --ks_opt \ 22 | --lineload --batch_size 64 --nsample 4 \ 23 | --warmup_shape_ep 5 \ 24 | --nounc_filter \ 25 | --${use_human}use_human 26 | #--pose_cnn_path $pose_cnn_path \ 27 | -------------------------------------------------------------------------------- /scripts/abalations/template-ama-view.sh: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. 2 | gpus=$1 3 | seqname=$2 # 630 frames 4 | num_epochs=$3 5 | addname=b64 6 | addr=$4 7 | use_human= 8 | 9 | model_prefix=$seqname-lbs-rkopt-$num_epochs-$addname 10 | if [ "$use_human" = "" ]; then 11 | pose_cnn_path=mesh_material/posenet/human.pth 12 | else 13 | pose_cnn_path=mesh_material/posenet/quad.pth 14 | fi 15 | echo $pose_cnn_path 16 | 17 | # mode: line load 18 | savename=${model_prefix}-init 19 | bash scripts/template-mgpu.sh $gpus $savename \ 20 | $seqname $addr --num_epochs $num_epochs --lbs --root_opt --ks_opt \ 21 | --pose_cnn_path $pose_cnn_path \ 22 | --lineload --batch_size 64 --nsample 4 \ 23 | --warmup_shape_ep 5 \ 24 | --${use_human}use_human 25 | #--symm_shape \ 26 | 27 | -------------------------------------------------------------------------------- /scripts/ama-process/read_cam.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. 2 | 3 | 4 | import numpy as np 5 | import cv2 6 | import pdb 7 | 8 | pmat = np.loadtxt('/private/home/gengshany/data/AMA/T_swing/calibration/Camera1.Pmat.cal') 9 | K,R,T,_,_,_,_=cv2.decomposeProjectionMatrix(pmat) 10 | print(K/K[-1,-1]) 11 | print(R) 12 | print(T/T[-1]) 13 | pdb.set_trace() 14 | -------------------------------------------------------------------------------- /scripts/misc/run_cse.sh: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. 2 | det_path=./third_party/detectron2/projects/DensePose 3 | # human 4 | #config=$det_path/configs/cse/densepose_rcnn_R_101_FPN_DL_soft_s1x.yaml 5 | #weights=https://dl.fbaipublicfiles.com/densepose/cse/densepose_rcnn_R_101_FPN_DL_soft_s1x/250713061/model_final_1d3314.pkl 6 | # animals 7 | config=$det_path/configs/cse/densepose_rcnn_R_50_FPN_soft_animals_CA_finetune_4k.yaml 8 | weights=https://dl.fbaipublicfiles.com/densepose/cse/densepose_rcnn_R_50_FPN_soft_animals_CA_finetune_4k/253498611/model_final_6d69b7.pkl 9 | data=$1 10 | python $det_path/apply_net.py show \ 11 | $config \ 12 | $weights \ 13 | $1 bbox,dp_vertex -v --output ./output.png 14 | -------------------------------------------------------------------------------- /scripts/misc/vid2gif.sh: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. 2 | prefix=cat_5 3 | filedir=$prefix 4 | outdir=tmp 5 | suffix=.MOV 6 | 7 | counter=0 8 | for infile in $filedir/*$suffix; do 9 | ffmpeg -y -i $infile -vf "scale=iw/8:ih/8" $infile.gif 10 | 11 | counter=$((counter+1)) 12 | done 13 | -------------------------------------------------------------------------------- /scripts/render_iter.sh: -------------------------------------------------------------------------------- 1 | # render canonical model over iterations 2 | dev=$1 3 | testdir=$2 4 | scale=1 5 | 6 | save_prefix=$testdir/vis-iter 7 | CUDA_VISIBLE_DEVICES=$dev python scripts/visualize/nvs_iter.py --flagfile=$testdir/opts.log \ 8 | --model_path $testdir/params_latest.pth \ 9 | --scale $scale \ 10 | --chunk 2048 \ 11 | --nouse_corresp --nouse_unc --perturb 0 --vidid 0 --nolbs\ 12 | --nvs_outpath $save_prefix-iter 13 | -------------------------------------------------------------------------------- /scripts/render_match.sh: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. 2 | model_path=$1 3 | match_frames=$2 4 | add_args=${*: 3:$#-1} 5 | testdir=${model_path%/*} # %: from end 6 | 7 | python scripts/visualize/match.py --flagfile=$testdir/opts.log \ 8 | --model_path $model_path \ 9 | --match_frames "$match_frames" \ 10 | $add_args 11 | -------------------------------------------------------------------------------- /scripts/render_mgpu.sh: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. 2 | #bash scripts/render_mgpu.sh 0 logdir/$seqname-ft3/params_latest.pth \ 3 | # "0 1 2 3 4 5 6 7 8 9 10"' 4 | ## argv[1]: gpu id 5 | ## argv[2]: sequence name 6 | ## argv[3]: weights path 7 | ## argv[4]: video id separated by space 8 | ## argv[5]: resolution of running marching cubes (256 by default) 9 | 10 | dev=$1 11 | seqname=$2 12 | modelpath=$3 13 | vids=$4 14 | sample_grid3d=$5 15 | 16 | CUDA_VISIBLE_DEVICES=${dev} bash scripts/render_vids.sh \ 17 | ${seqname} ${modelpath} "${vids}" \ 18 | "--sample_grid3d ${sample_grid3d} --full_mesh \ 19 | --nouse_corresp --nouse_embed --nouse_proj --render_size 2 --ndepth 2" 20 | -------------------------------------------------------------------------------- /scripts/render_vids.sh: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. 2 | seqname=$1 3 | model_path=$2 4 | vid_id=$3 5 | args=$4 6 | 7 | # Set space as the delimiter 8 | IFS=' ' 9 | 10 | #Read the split words into an array based on space delimiter 11 | read -a strarr <<< "$vid_id" 12 | 13 | for vid in "${strarr[@]}"; do 14 | echo $vid 15 | 16 | bash scripts/render_result.sh $seqname \ 17 | $model_path \ 18 | {$vid} \ 19 | $args # for python script 20 | done 21 | -------------------------------------------------------------------------------- /scripts/template-mgpu.sh: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. 2 | export MKL_SERVICE_FORCE_INTEL=1 3 | dev=$1 4 | ngpu=`echo $dev | awk -F '[\t,]' '{print NF-1}'` 5 | ngpu=$(($ngpu + 1 )) 6 | echo "using "$ngpu "gpus" 7 | 8 | logname=$2 9 | seqname=$3 10 | address=$4 11 | add_args=${*: 4:$#-1} 12 | 13 | CUDA_VISIBLE_DEVICES=$dev python -m torch.distributed.launch\ 14 | --master_port $address \ 15 | --nproc_per_node=$ngpu main.py \ 16 | --ngpu $ngpu \ 17 | --seqname $seqname \ 18 | --logname $logname \ 19 | $add_args 20 | -------------------------------------------------------------------------------- /scripts/template-short.sh: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. 2 | gpus=$1 3 | seqname=$2 4 | addr=$3 5 | use_human=$4 6 | use_symm=$5 7 | num_epochs=120 8 | batch_size=256 9 | 10 | model_prefix=short-$seqname-e$num_epochs-b$batch_size 11 | if [ "$use_human" = "" ]; then 12 | pose_cnn_path=mesh_material/posenet/human.pth 13 | else 14 | pose_cnn_path=mesh_material/posenet/quad.pth 15 | fi 16 | echo $pose_cnn_path 17 | 18 | # mode: line load 19 | savename=${model_prefix}-init 20 | bash scripts/template-mgpu.sh $gpus $savename \ 21 | $seqname $addr --num_epochs $num_epochs \ 22 | --pose_cnn_path $pose_cnn_path \ 23 | --warmup_shape_ep 5 --warmup_rootmlp \ 24 | --lineload --batch_size $batch_size\ 25 | --${use_symm}symm_shape \ 26 | --${use_human}use_human 27 | -------------------------------------------------------------------------------- /scripts/visualize/render_root_txt.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. 2 | import sys, os 3 | sys.path.append(os.path.dirname(os.path.dirname(sys.path[0]))) 4 | os.environ["PYOPENGL_PLATFORM"] = "egl" #opengl seems to only work with TPU 5 | curr_dir = os.path.abspath(os.getcwd()) 6 | sys.path.insert(0,curr_dir) 7 | import pdb 8 | import glob 9 | import numpy as np 10 | import configparser 11 | from utils.io import config_to_dataloader, draw_cams, render_root_txt 12 | 13 | 14 | cam_dir=sys.argv[1] 15 | cap_frame=int(sys.argv[2]) 16 | def main(): 17 | render_root_txt(cam_dir, cap_frame) 18 | 19 | # python ... path to camera folder 20 | # will draw a trajectory of camera locations 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /third_party/.gitignore: -------------------------------------------------------------------------------- 1 | /*/*.so 2 | /*/*/*/*.so 3 | -------------------------------------------------------------------------------- /third_party/chamfer3D/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | dist/ 3 | chamfer_3D.egg-info/ 4 | -------------------------------------------------------------------------------- /third_party/chamfer3D/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | from torch.utils.cpp_extension import BuildExtension, CUDAExtension 3 | 4 | setup( 5 | name='chamfer_3D', 6 | ext_modules=[ 7 | CUDAExtension('chamfer_3D', [ 8 | "/".join(__file__.split('/')[:-1] + ['chamfer_cuda.cpp']), 9 | "/".join(__file__.split('/')[:-1] + ['chamfer3D.cu']), 10 | ]), 11 | ], 12 | cmdclass={ 13 | 'build_ext': BuildExtension 14 | }) -------------------------------------------------------------------------------- /third_party/detectron2_old/.flake8: -------------------------------------------------------------------------------- 1 | # This is an example .flake8 config, used when developing *Black* itself. 2 | # Keep in sync with setup.cfg which is used for source packages. 3 | 4 | [flake8] 5 | ignore = W503, E203, E221, C901, C408, E741, C407, E741, B017 6 | max-line-length = 100 7 | max-complexity = 18 8 | select = B,C,E,F,W,T4,B9 9 | exclude = build 10 | per-file-ignores = 11 | **/__init__.py:F401,F403,E402 12 | **/configs/**.py:F401,E402 13 | configs/**.py:F401,E402 14 | **/tests/config/**.py:F401,E402 15 | tests/config/**.py:F401,E402 16 | -------------------------------------------------------------------------------- /third_party/detectron2_old/.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | Facebook has adopted a Code of Conduct that we expect project participants to adhere to. 4 | Please read the [full text](https://code.fb.com/codeofconduct/) 5 | so that you can understand what actions will and will not be tolerated. 6 | -------------------------------------------------------------------------------- /third_party/detectron2_old/.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | Please select an issue template from 3 | https://github.com/facebookresearch/detectron2/issues/new/choose . 4 | 5 | Otherwise your issue will be closed. 6 | -------------------------------------------------------------------------------- /third_party/detectron2_old/.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | # require an issue template to be chosen 2 | blank_issues_enabled: false 3 | 4 | contact_links: 5 | - name: How-To / All Other Questions 6 | url: https://github.com/facebookresearch/detectron2/discussions 7 | about: Use "github discussions" for community support on general questions that don't belong to the above issue categories 8 | - name: Detectron2 Documentation 9 | url: https://detectron2.readthedocs.io/index.html 10 | about: Check if your question is answered in tutorials or API docs 11 | 12 | # Unexpected behaviors & bugs are split to two templates. 13 | # When they are one template, users think "it's not a bug" and don't choose the template. 14 | # 15 | # But the file name is still "unexpected-problems-bugs.md" so that old references 16 | # to this issue template still works. 17 | # It's ok since this template should be a superset of "bugs.md" (unexpected behaviors is a superset of bugs) 18 | -------------------------------------------------------------------------------- /third_party/detectron2_old/.github/ISSUE_TEMPLATE/documentation.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "\U0001F4DA Documentation Improvements" 3 | about: Suggest an improvement about existing documentation, comments, website or tutorials. 4 | labels: documentation 5 | 6 | --- 7 | 8 | ## 📚 Documentation Improvements 9 | 10 | * Provide a link to the relevant documentation/comment/tutorial: 11 | 12 | * How should the above documentation/comment/tutorial improve: 13 | -------------------------------------------------------------------------------- /third_party/detectron2_old/.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | Thanks for your contribution! 2 | 3 | If you're sending a large PR (e.g., >100 lines), 4 | please open an issue first about the feature / bug, and indicate how you want to contribute. 5 | 6 | We do not always accept features. 7 | See https://detectron2.readthedocs.io/notes/contributing.html#pull-requests about how we handle PRs. 8 | 9 | Before submitting a PR, please run `dev/linter.sh` to lint the code. 10 | 11 | -------------------------------------------------------------------------------- /third_party/detectron2_old/.github/workflows/remove-needs-reply.yml: -------------------------------------------------------------------------------- 1 | name: Remove needs-more-info label 2 | 3 | on: 4 | issue_comment: 5 | types: [created] 6 | issues: 7 | types: [edited] 8 | 9 | jobs: 10 | remove-needs-more-info-label: 11 | runs-on: ubuntu-latest 12 | # 1. issue_comment events could include PR comment, filter them out 13 | # 2. Only trigger action if event was produced by the original author 14 | if: ${{ !github.event.issue.pull_request && github.event.sender.login == github.event.issue.user.login }} 15 | steps: 16 | - name: Remove needs-more-info label 17 | uses: octokit/request-action@v2.x 18 | continue-on-error: true 19 | with: 20 | route: DELETE /repos/:repository/issues/:issue/labels/:label 21 | repository: ${{ github.repository }} 22 | issue: ${{ github.event.issue.number }} 23 | label: needs-more-info 24 | env: 25 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 26 | -------------------------------------------------------------------------------- /third_party/detectron2_old/.gitignore: -------------------------------------------------------------------------------- 1 | # output dir 2 | output 3 | instant_test_output 4 | inference_test_output 5 | 6 | 7 | *.png 8 | *.json 9 | *.diff 10 | *.jpg 11 | !/projects/DensePose/doc/images/*.jpg 12 | 13 | # compilation and distribution 14 | __pycache__ 15 | _ext 16 | *.pyc 17 | *.pyd 18 | *.so 19 | *.dll 20 | *.egg-info/ 21 | build/ 22 | dist/ 23 | wheels/ 24 | 25 | # pytorch/python/numpy formats 26 | *.pth 27 | *.pkl 28 | *.npy 29 | *.ts 30 | model_ts*.txt 31 | 32 | # ipython/jupyter notebooks 33 | *.ipynb 34 | **/.ipynb_checkpoints/ 35 | 36 | # Editor temporaries 37 | *.swn 38 | *.swo 39 | *.swp 40 | *~ 41 | 42 | # editor settings 43 | .idea 44 | .vscode 45 | _darcs 46 | 47 | # project dirs 48 | /detectron2/model_zoo/configs 49 | /datasets/* 50 | !/datasets/*.* 51 | /projects/*/datasets 52 | /models 53 | /snippet 54 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/Base-RCNN-C4.yaml: -------------------------------------------------------------------------------- 1 | MODEL: 2 | META_ARCHITECTURE: "GeneralizedRCNN" 3 | RPN: 4 | PRE_NMS_TOPK_TEST: 6000 5 | POST_NMS_TOPK_TEST: 1000 6 | ROI_HEADS: 7 | NAME: "Res5ROIHeads" 8 | DATASETS: 9 | TRAIN: ("coco_2017_train",) 10 | TEST: ("coco_2017_val",) 11 | SOLVER: 12 | IMS_PER_BATCH: 16 13 | BASE_LR: 0.02 14 | STEPS: (60000, 80000) 15 | MAX_ITER: 90000 16 | INPUT: 17 | MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) 18 | VERSION: 2 19 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/Base-RCNN-DilatedC5.yaml: -------------------------------------------------------------------------------- 1 | MODEL: 2 | META_ARCHITECTURE: "GeneralizedRCNN" 3 | RESNETS: 4 | OUT_FEATURES: ["res5"] 5 | RES5_DILATION: 2 6 | RPN: 7 | IN_FEATURES: ["res5"] 8 | PRE_NMS_TOPK_TEST: 6000 9 | POST_NMS_TOPK_TEST: 1000 10 | ROI_HEADS: 11 | NAME: "StandardROIHeads" 12 | IN_FEATURES: ["res5"] 13 | ROI_BOX_HEAD: 14 | NAME: "FastRCNNConvFCHead" 15 | NUM_FC: 2 16 | POOLER_RESOLUTION: 7 17 | ROI_MASK_HEAD: 18 | NAME: "MaskRCNNConvUpsampleHead" 19 | NUM_CONV: 4 20 | POOLER_RESOLUTION: 14 21 | DATASETS: 22 | TRAIN: ("coco_2017_train",) 23 | TEST: ("coco_2017_val",) 24 | SOLVER: 25 | IMS_PER_BATCH: 16 26 | BASE_LR: 0.02 27 | STEPS: (60000, 80000) 28 | MAX_ITER: 90000 29 | INPUT: 30 | MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) 31 | VERSION: 2 32 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/Base-RetinaNet.yaml: -------------------------------------------------------------------------------- 1 | MODEL: 2 | META_ARCHITECTURE: "RetinaNet" 3 | BACKBONE: 4 | NAME: "build_retinanet_resnet_fpn_backbone" 5 | RESNETS: 6 | OUT_FEATURES: ["res3", "res4", "res5"] 7 | ANCHOR_GENERATOR: 8 | SIZES: !!python/object/apply:eval ["[[x, x * 2**(1.0/3), x * 2**(2.0/3) ] for x in [32, 64, 128, 256, 512 ]]"] 9 | FPN: 10 | IN_FEATURES: ["res3", "res4", "res5"] 11 | RETINANET: 12 | IOU_THRESHOLDS: [0.4, 0.5] 13 | IOU_LABELS: [0, -1, 1] 14 | SMOOTH_L1_LOSS_BETA: 0.0 15 | DATASETS: 16 | TRAIN: ("coco_2017_train",) 17 | TEST: ("coco_2017_val",) 18 | SOLVER: 19 | IMS_PER_BATCH: 16 20 | BASE_LR: 0.01 # Note that RetinaNet uses a different default learning rate 21 | STEPS: (60000, 80000) 22 | MAX_ITER: 90000 23 | INPUT: 24 | MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) 25 | VERSION: 2 26 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Detection/fast_rcnn_R_50_FPN_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: False 5 | LOAD_PROPOSALS: True 6 | RESNETS: 7 | DEPTH: 50 8 | PROPOSAL_GENERATOR: 9 | NAME: "PrecomputedProposals" 10 | DATASETS: 11 | TRAIN: ("coco_2017_train",) 12 | PROPOSAL_FILES_TRAIN: ("detectron2://COCO-Detection/rpn_R_50_FPN_1x/137258492/coco_2017_train_box_proposals_21bc3a.pkl", ) 13 | TEST: ("coco_2017_val",) 14 | PROPOSAL_FILES_TEST: ("detectron2://COCO-Detection/rpn_R_50_FPN_1x/137258492/coco_2017_val_box_proposals_ee0dad.pkl", ) 15 | DATALOADER: 16 | # proposals are part of the dataset_dicts, and take a lot of RAM 17 | NUM_WORKERS: 2 18 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Detection/faster_rcnn_R_101_C4_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-C4.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | MASK_ON: False 5 | RESNETS: 6 | DEPTH: 101 7 | SOLVER: 8 | STEPS: (210000, 250000) 9 | MAX_ITER: 270000 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Detection/faster_rcnn_R_101_DC5_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-DilatedC5.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | MASK_ON: False 5 | RESNETS: 6 | DEPTH: 101 7 | SOLVER: 8 | STEPS: (210000, 250000) 9 | MAX_ITER: 270000 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Detection/faster_rcnn_R_101_FPN_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | MASK_ON: False 5 | RESNETS: 6 | DEPTH: 101 7 | SOLVER: 8 | STEPS: (210000, 250000) 9 | MAX_ITER: 270000 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Detection/faster_rcnn_R_50_C4_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-C4.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: False 5 | RESNETS: 6 | DEPTH: 50 7 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Detection/faster_rcnn_R_50_C4_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-C4.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: False 5 | RESNETS: 6 | DEPTH: 50 7 | SOLVER: 8 | STEPS: (210000, 250000) 9 | MAX_ITER: 270000 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Detection/faster_rcnn_R_50_DC5_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-DilatedC5.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: False 5 | RESNETS: 6 | DEPTH: 50 7 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Detection/faster_rcnn_R_50_DC5_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-DilatedC5.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: False 5 | RESNETS: 6 | DEPTH: 50 7 | SOLVER: 8 | STEPS: (210000, 250000) 9 | MAX_ITER: 270000 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Detection/faster_rcnn_R_50_FPN_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: False 5 | RESNETS: 6 | DEPTH: 50 7 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: False 5 | RESNETS: 6 | DEPTH: 50 7 | SOLVER: 8 | STEPS: (210000, 250000) 9 | MAX_ITER: 270000 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Detection/faster_rcnn_X_101_32x8d_FPN_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | MASK_ON: False 4 | WEIGHTS: "detectron2://ImageNetPretrained/FAIR/X-101-32x8d.pkl" 5 | PIXEL_STD: [57.375, 57.120, 58.395] 6 | RESNETS: 7 | STRIDE_IN_1X1: False # this is a C2 model 8 | NUM_GROUPS: 32 9 | WIDTH_PER_GROUP: 8 10 | DEPTH: 101 11 | SOLVER: 12 | STEPS: (210000, 250000) 13 | MAX_ITER: 270000 14 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Detection/retinanet_R_101_FPN_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RetinaNet.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 6 | SOLVER: 7 | STEPS: (210000, 250000) 8 | MAX_ITER: 270000 9 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Detection/retinanet_R_50_FPN_1x.py: -------------------------------------------------------------------------------- 1 | from ..common.optim import SGD as optimizer 2 | from ..common.coco_schedule import lr_multiplier_1x as lr_multiplier 3 | from ..common.data.coco import dataloader 4 | from ..common.models.retinanet import model 5 | from ..common.train import train 6 | 7 | dataloader.train.mapper.use_instance_mask = False 8 | model.backbone.bottom_up.freeze_at = 2 9 | optimizer.lr = 0.01 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Detection/retinanet_R_50_FPN_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RetinaNet.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Detection/retinanet_R_50_FPN_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RetinaNet.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | SOLVER: 7 | STEPS: (210000, 250000) 8 | MAX_ITER: 270000 9 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Detection/rpn_R_50_C4_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-C4.yaml" 2 | MODEL: 3 | META_ARCHITECTURE: "ProposalNetwork" 4 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 5 | MASK_ON: False 6 | RESNETS: 7 | DEPTH: 50 8 | RPN: 9 | PRE_NMS_TOPK_TEST: 12000 10 | POST_NMS_TOPK_TEST: 2000 11 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Detection/rpn_R_50_FPN_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | META_ARCHITECTURE: "ProposalNetwork" 4 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 5 | MASK_ON: False 6 | RESNETS: 7 | DEPTH: 50 8 | RPN: 9 | POST_NMS_TOPK_TEST: 2000 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-InstanceSegmentation/mask_rcnn_R_101_C4_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-C4.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 101 7 | SOLVER: 8 | STEPS: (210000, 250000) 9 | MAX_ITER: 270000 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-InstanceSegmentation/mask_rcnn_R_101_DC5_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-DilatedC5.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 101 7 | SOLVER: 8 | STEPS: (210000, 250000) 9 | MAX_ITER: 270000 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-InstanceSegmentation/mask_rcnn_R_101_FPN_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 101 7 | SOLVER: 8 | STEPS: (210000, 250000) 9 | MAX_ITER: 270000 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_C4_1x.py: -------------------------------------------------------------------------------- 1 | from ..common.train import train 2 | from ..common.optim import SGD as optimizer 3 | from ..common.coco_schedule import lr_multiplier_1x as lr_multiplier 4 | from ..common.data.coco import dataloader 5 | from ..common.models.mask_rcnn_c4 import model 6 | 7 | model.backbone.freeze_at = 2 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_C4_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-C4.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 50 7 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_C4_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-C4.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 50 7 | SOLVER: 8 | STEPS: (210000, 250000) 9 | MAX_ITER: 270000 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_DC5_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-DilatedC5.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 50 7 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_DC5_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-DilatedC5.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 50 7 | SOLVER: 8 | STEPS: (210000, 250000) 9 | MAX_ITER: 270000 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.py: -------------------------------------------------------------------------------- 1 | from ..common.optim import SGD as optimizer 2 | from ..common.coco_schedule import lr_multiplier_1x as lr_multiplier 3 | from ..common.data.coco import dataloader 4 | from ..common.models.mask_rcnn_fpn import model 5 | from ..common.train import train 6 | 7 | model.backbone.bottom_up.freeze_at = 2 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 50 7 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x_giou.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 50 7 | RPN: 8 | BBOX_REG_LOSS_TYPE: "giou" 9 | BBOX_REG_LOSS_WEIGHT: 2.0 10 | ROI_BOX_HEAD: 11 | BBOX_REG_LOSS_TYPE: "giou" 12 | BBOX_REG_LOSS_WEIGHT: 10.0 13 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 50 7 | SOLVER: 8 | STEPS: (210000, 250000) 9 | MAX_ITER: 270000 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-InstanceSegmentation/mask_rcnn_X_101_32x8d_FPN_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | MASK_ON: True 4 | WEIGHTS: "detectron2://ImageNetPretrained/FAIR/X-101-32x8d.pkl" 5 | PIXEL_STD: [57.375, 57.120, 58.395] 6 | RESNETS: 7 | STRIDE_IN_1X1: False # this is a C2 model 8 | NUM_GROUPS: 32 9 | WIDTH_PER_GROUP: 8 10 | DEPTH: 101 11 | SOLVER: 12 | STEPS: (210000, 250000) 13 | MAX_ITER: 270000 14 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Keypoints/Base-Keypoint-RCNN-FPN.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | KEYPOINT_ON: True 4 | ROI_HEADS: 5 | NUM_CLASSES: 1 6 | ROI_BOX_HEAD: 7 | SMOOTH_L1_BETA: 0.5 # Keypoint AP degrades (though box AP improves) when using plain L1 loss 8 | RPN: 9 | # Detectron1 uses 2000 proposals per-batch, but this option is per-image in detectron2. 10 | # 1000 proposals per-image is found to hurt box AP. 11 | # Therefore we increase it to 1500 per-image. 12 | POST_NMS_TOPK_TRAIN: 1500 13 | DATASETS: 14 | TRAIN: ("keypoints_coco_2017_train",) 15 | TEST: ("keypoints_coco_2017_val",) 16 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Keypoints/keypoint_rcnn_R_101_FPN_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-Keypoint-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 6 | SOLVER: 7 | STEPS: (210000, 250000) 8 | MAX_ITER: 270000 9 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Keypoints/keypoint_rcnn_R_50_FPN_1x.py: -------------------------------------------------------------------------------- 1 | from ..common.optim import SGD as optimizer 2 | from ..common.coco_schedule import lr_multiplier_1x as lr_multiplier 3 | from ..common.data.coco_keypoint import dataloader 4 | from ..common.models.keypoint_rcnn_fpn import model 5 | from ..common.train import train 6 | 7 | model.backbone.bottom_up.freeze_at = 2 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Keypoints/keypoint_rcnn_R_50_FPN_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-Keypoint-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Keypoints/keypoint_rcnn_R_50_FPN_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-Keypoint-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | SOLVER: 7 | STEPS: (210000, 250000) 8 | MAX_ITER: 270000 9 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-Keypoints/keypoint_rcnn_X_101_32x8d_FPN_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-Keypoint-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/FAIR/X-101-32x8d.pkl" 4 | PIXEL_STD: [57.375, 57.120, 58.395] 5 | RESNETS: 6 | STRIDE_IN_1X1: False # this is a C2 model 7 | NUM_GROUPS: 32 8 | WIDTH_PER_GROUP: 8 9 | DEPTH: 101 10 | SOLVER: 11 | STEPS: (210000, 250000) 12 | MAX_ITER: 270000 13 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-PanopticSegmentation/Base-Panoptic-FPN.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | META_ARCHITECTURE: "PanopticFPN" 4 | MASK_ON: True 5 | SEM_SEG_HEAD: 6 | LOSS_WEIGHT: 0.5 7 | DATASETS: 8 | TRAIN: ("coco_2017_train_panoptic_separated",) 9 | TEST: ("coco_2017_val_panoptic_separated",) 10 | DATALOADER: 11 | FILTER_EMPTY_ANNOTATIONS: False 12 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-PanopticSegmentation/panoptic_fpn_R_101_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-Panoptic-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 6 | SOLVER: 7 | STEPS: (210000, 250000) 8 | MAX_ITER: 270000 9 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-PanopticSegmentation/panoptic_fpn_R_50_1x.py: -------------------------------------------------------------------------------- 1 | from ..common.optim import SGD as optimizer 2 | from ..common.coco_schedule import lr_multiplier_1x as lr_multiplier 3 | from ..common.data.coco_panoptic_separated import dataloader 4 | from ..common.models.panoptic_fpn import model 5 | from ..common.train import train 6 | 7 | model.backbone.bottom_up.freeze_at = 2 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-PanopticSegmentation/panoptic_fpn_R_50_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-Panoptic-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/COCO-PanopticSegmentation/panoptic_fpn_R_50_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-Panoptic-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | SOLVER: 7 | STEPS: (210000, 250000) 8 | MAX_ITER: 270000 9 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/Detectron1-Comparisons/faster_rcnn_R_50_FPN_noaug_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: False 5 | RESNETS: 6 | DEPTH: 50 7 | # Detectron1 uses smooth L1 loss with some magic beta values. 8 | # The defaults are changed to L1 loss in Detectron2. 9 | RPN: 10 | SMOOTH_L1_BETA: 0.1111 11 | ROI_BOX_HEAD: 12 | SMOOTH_L1_BETA: 1.0 13 | POOLER_SAMPLING_RATIO: 2 14 | POOLER_TYPE: "ROIAlign" 15 | INPUT: 16 | # no scale augmentation 17 | MIN_SIZE_TRAIN: (800, ) 18 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/Detectron1-Comparisons/mask_rcnn_R_50_FPN_noaug_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 50 7 | # Detectron1 uses smooth L1 loss with some magic beta values. 8 | # The defaults are changed to L1 loss in Detectron2. 9 | RPN: 10 | SMOOTH_L1_BETA: 0.1111 11 | ROI_BOX_HEAD: 12 | SMOOTH_L1_BETA: 1.0 13 | POOLER_SAMPLING_RATIO: 2 14 | POOLER_TYPE: "ROIAlign" 15 | ROI_MASK_HEAD: 16 | POOLER_SAMPLING_RATIO: 2 17 | POOLER_TYPE: "ROIAlign" 18 | INPUT: 19 | # no scale augmentation 20 | MIN_SIZE_TRAIN: (800, ) 21 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/LVISv0.5-InstanceSegmentation/mask_rcnn_R_101_FPN_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 101 7 | ROI_HEADS: 8 | NUM_CLASSES: 1230 9 | SCORE_THRESH_TEST: 0.0001 10 | INPUT: 11 | MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) 12 | DATASETS: 13 | TRAIN: ("lvis_v0.5_train",) 14 | TEST: ("lvis_v0.5_val",) 15 | TEST: 16 | DETECTIONS_PER_IMAGE: 300 # LVIS allows up to 300 17 | DATALOADER: 18 | SAMPLER_TRAIN: "RepeatFactorTrainingSampler" 19 | REPEAT_THRESHOLD: 0.001 20 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/LVISv0.5-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 50 7 | ROI_HEADS: 8 | NUM_CLASSES: 1230 9 | SCORE_THRESH_TEST: 0.0001 10 | INPUT: 11 | MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) 12 | DATASETS: 13 | TRAIN: ("lvis_v0.5_train",) 14 | TEST: ("lvis_v0.5_val",) 15 | TEST: 16 | DETECTIONS_PER_IMAGE: 300 # LVIS allows up to 300 17 | DATALOADER: 18 | SAMPLER_TRAIN: "RepeatFactorTrainingSampler" 19 | REPEAT_THRESHOLD: 0.001 20 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/LVISv0.5-InstanceSegmentation/mask_rcnn_X_101_32x8d_FPN_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/FAIR/X-101-32x8d.pkl" 4 | PIXEL_STD: [57.375, 57.120, 58.395] 5 | MASK_ON: True 6 | RESNETS: 7 | STRIDE_IN_1X1: False # this is a C2 model 8 | NUM_GROUPS: 32 9 | WIDTH_PER_GROUP: 8 10 | DEPTH: 101 11 | ROI_HEADS: 12 | NUM_CLASSES: 1230 13 | SCORE_THRESH_TEST: 0.0001 14 | INPUT: 15 | MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) 16 | DATASETS: 17 | TRAIN: ("lvis_v0.5_train",) 18 | TEST: ("lvis_v0.5_val",) 19 | TEST: 20 | DETECTIONS_PER_IMAGE: 300 # LVIS allows up to 300 21 | DATALOADER: 22 | SAMPLER_TRAIN: "RepeatFactorTrainingSampler" 23 | REPEAT_THRESHOLD: 0.001 24 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/LVISv1-InstanceSegmentation/mask_rcnn_R_101_FPN_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 101 7 | ROI_HEADS: 8 | NUM_CLASSES: 1203 9 | SCORE_THRESH_TEST: 0.0001 10 | INPUT: 11 | MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) 12 | DATASETS: 13 | TRAIN: ("lvis_v1_train",) 14 | TEST: ("lvis_v1_val",) 15 | TEST: 16 | DETECTIONS_PER_IMAGE: 300 # LVIS allows up to 300 17 | SOLVER: 18 | STEPS: (120000, 160000) 19 | MAX_ITER: 180000 # 180000 * 16 / 100000 ~ 28.8 epochs 20 | DATALOADER: 21 | SAMPLER_TRAIN: "RepeatFactorTrainingSampler" 22 | REPEAT_THRESHOLD: 0.001 23 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/LVISv1-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 50 7 | ROI_HEADS: 8 | NUM_CLASSES: 1203 9 | SCORE_THRESH_TEST: 0.0001 10 | INPUT: 11 | MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) 12 | DATASETS: 13 | TRAIN: ("lvis_v1_train",) 14 | TEST: ("lvis_v1_val",) 15 | TEST: 16 | DETECTIONS_PER_IMAGE: 300 # LVIS allows up to 300 17 | SOLVER: 18 | STEPS: (120000, 160000) 19 | MAX_ITER: 180000 # 180000 * 16 / 100000 ~ 28.8 epochs 20 | DATALOADER: 21 | SAMPLER_TRAIN: "RepeatFactorTrainingSampler" 22 | REPEAT_THRESHOLD: 0.001 23 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/LVISv1-InstanceSegmentation/mask_rcnn_X_101_32x8d_FPN_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/FAIR/X-101-32x8d.pkl" 4 | PIXEL_STD: [57.375, 57.120, 58.395] 5 | MASK_ON: True 6 | RESNETS: 7 | STRIDE_IN_1X1: False # this is a C2 model 8 | NUM_GROUPS: 32 9 | WIDTH_PER_GROUP: 8 10 | DEPTH: 101 11 | ROI_HEADS: 12 | NUM_CLASSES: 1203 13 | SCORE_THRESH_TEST: 0.0001 14 | INPUT: 15 | MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) 16 | DATASETS: 17 | TRAIN: ("lvis_v1_train",) 18 | TEST: ("lvis_v1_val",) 19 | SOLVER: 20 | STEPS: (120000, 160000) 21 | MAX_ITER: 180000 # 180000 * 16 / 100000 ~ 28.8 epochs 22 | TEST: 23 | DETECTIONS_PER_IMAGE: 300 # LVIS allows up to 300 24 | DATALOADER: 25 | SAMPLER_TRAIN: "RepeatFactorTrainingSampler" 26 | REPEAT_THRESHOLD: 0.001 27 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/Misc/cascade_mask_rcnn_R_50_FPN_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 50 7 | ROI_HEADS: 8 | NAME: CascadeROIHeads 9 | ROI_BOX_HEAD: 10 | CLS_AGNOSTIC_BBOX_REG: True 11 | RPN: 12 | POST_NMS_TOPK_TRAIN: 2000 13 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/Misc/cascade_mask_rcnn_R_50_FPN_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 50 7 | ROI_HEADS: 8 | NAME: CascadeROIHeads 9 | ROI_BOX_HEAD: 10 | CLS_AGNOSTIC_BBOX_REG: True 11 | RPN: 12 | POST_NMS_TOPK_TRAIN: 2000 13 | SOLVER: 14 | STEPS: (210000, 250000) 15 | MAX_ITER: 270000 16 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/Misc/cascade_mask_rcnn_X_152_32x8d_FPN_IN5k_gn_dconv.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | MASK_ON: True 4 | WEIGHTS: "catalog://ImageNetPretrained/FAIR/X-152-32x8d-IN5k" 5 | RESNETS: 6 | STRIDE_IN_1X1: False # this is a C2 model 7 | NUM_GROUPS: 32 8 | WIDTH_PER_GROUP: 8 9 | DEPTH: 152 10 | DEFORM_ON_PER_STAGE: [False, True, True, True] 11 | ROI_HEADS: 12 | NAME: "CascadeROIHeads" 13 | ROI_BOX_HEAD: 14 | NAME: "FastRCNNConvFCHead" 15 | NUM_CONV: 4 16 | NUM_FC: 1 17 | NORM: "GN" 18 | CLS_AGNOSTIC_BBOX_REG: True 19 | ROI_MASK_HEAD: 20 | NUM_CONV: 8 21 | NORM: "GN" 22 | RPN: 23 | POST_NMS_TOPK_TRAIN: 2000 24 | SOLVER: 25 | IMS_PER_BATCH: 128 26 | STEPS: (35000, 45000) 27 | MAX_ITER: 50000 28 | BASE_LR: 0.16 29 | INPUT: 30 | MIN_SIZE_TRAIN: (640, 864) 31 | MIN_SIZE_TRAIN_SAMPLING: "range" 32 | MAX_SIZE_TRAIN: 1440 33 | CROP: 34 | ENABLED: True 35 | TEST: 36 | EVAL_PERIOD: 2500 37 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/Misc/mask_rcnn_R_50_FPN_1x_cls_agnostic.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 50 7 | ROI_BOX_HEAD: 8 | CLS_AGNOSTIC_BBOX_REG: True 9 | ROI_MASK_HEAD: 10 | CLS_AGNOSTIC_MASK: True 11 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/Misc/mask_rcnn_R_50_FPN_1x_dconv_c3-c5.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 50 7 | DEFORM_ON_PER_STAGE: [False, True, True, True] # on Res3,Res4,Res5 8 | DEFORM_MODULATED: False 9 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/Misc/mask_rcnn_R_50_FPN_3x_dconv_c3-c5.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 50 7 | DEFORM_ON_PER_STAGE: [False, True, True, True] # on Res3,Res4,Res5 8 | DEFORM_MODULATED: False 9 | SOLVER: 10 | STEPS: (210000, 250000) 11 | MAX_ITER: 270000 12 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/Misc/mask_rcnn_R_50_FPN_3x_gn.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "catalog://ImageNetPretrained/FAIR/R-50-GN" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 50 7 | NORM: "GN" 8 | STRIDE_IN_1X1: False 9 | FPN: 10 | NORM: "GN" 11 | ROI_BOX_HEAD: 12 | NAME: "FastRCNNConvFCHead" 13 | NUM_CONV: 4 14 | NUM_FC: 1 15 | NORM: "GN" 16 | ROI_MASK_HEAD: 17 | NORM: "GN" 18 | SOLVER: 19 | # 3x schedule 20 | STEPS: (210000, 250000) 21 | MAX_ITER: 270000 22 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/Misc/mask_rcnn_R_50_FPN_3x_syncbn.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 50 7 | NORM: "SyncBN" 8 | STRIDE_IN_1X1: True 9 | FPN: 10 | NORM: "SyncBN" 11 | ROI_BOX_HEAD: 12 | NAME: "FastRCNNConvFCHead" 13 | NUM_CONV: 4 14 | NUM_FC: 1 15 | NORM: "SyncBN" 16 | ROI_MASK_HEAD: 17 | NORM: "SyncBN" 18 | SOLVER: 19 | # 3x schedule 20 | STEPS: (210000, 250000) 21 | MAX_ITER: 270000 22 | TEST: 23 | PRECISE_BN: 24 | ENABLED: True 25 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/Misc/panoptic_fpn_R_101_dconv_cascade_gn_3x.yaml: -------------------------------------------------------------------------------- 1 | # A large PanopticFPN for demo purposes. 2 | # Use GN on backbone to support semantic seg. 3 | # Use Cascade + Deform Conv to improve localization. 4 | _BASE_: "../COCO-PanopticSegmentation/Base-Panoptic-FPN.yaml" 5 | MODEL: 6 | WEIGHTS: "catalog://ImageNetPretrained/FAIR/R-101-GN" 7 | RESNETS: 8 | DEPTH: 101 9 | NORM: "GN" 10 | DEFORM_ON_PER_STAGE: [False, True, True, True] 11 | STRIDE_IN_1X1: False 12 | FPN: 13 | NORM: "GN" 14 | ROI_HEADS: 15 | NAME: CascadeROIHeads 16 | ROI_BOX_HEAD: 17 | CLS_AGNOSTIC_BBOX_REG: True 18 | ROI_MASK_HEAD: 19 | NORM: "GN" 20 | RPN: 21 | POST_NMS_TOPK_TRAIN: 2000 22 | SOLVER: 23 | STEPS: (105000, 125000) 24 | MAX_ITER: 135000 25 | IMS_PER_BATCH: 32 26 | BASE_LR: 0.04 27 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/Misc/scratch_mask_rcnn_R_50_FPN_3x_gn.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "mask_rcnn_R_50_FPN_3x_gn.yaml" 2 | MODEL: 3 | # Train from random initialization. 4 | WEIGHTS: "" 5 | # It makes sense to divide by STD when training from scratch 6 | # But it seems to make no difference on the results and C2's models didn't do this. 7 | # So we keep things consistent with C2. 8 | # PIXEL_STD: [57.375, 57.12, 58.395] 9 | MASK_ON: True 10 | BACKBONE: 11 | FREEZE_AT: 0 12 | # NOTE: Please refer to Rethinking ImageNet Pre-training https://arxiv.org/abs/1811.08883 13 | # to learn what you need for training from scratch. 14 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/Misc/scratch_mask_rcnn_R_50_FPN_9x_gn.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "mask_rcnn_R_50_FPN_3x_gn.yaml" 2 | MODEL: 3 | PIXEL_STD: [57.375, 57.12, 58.395] 4 | WEIGHTS: "" 5 | MASK_ON: True 6 | RESNETS: 7 | STRIDE_IN_1X1: False 8 | BACKBONE: 9 | FREEZE_AT: 0 10 | SOLVER: 11 | # 9x schedule 12 | IMS_PER_BATCH: 64 # 4x the standard 13 | STEPS: (187500, 197500) # last 60/4==15k and last 20/4==5k 14 | MAX_ITER: 202500 # 90k * 9 / 4 15 | BASE_LR: 0.08 16 | TEST: 17 | EVAL_PERIOD: 2500 18 | # NOTE: Please refer to Rethinking ImageNet Pre-training https://arxiv.org/abs/1811.08883 19 | # to learn what you need for training from scratch. 20 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/Misc/scratch_mask_rcnn_R_50_FPN_9x_syncbn.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "mask_rcnn_R_50_FPN_3x_syncbn.yaml" 2 | MODEL: 3 | PIXEL_STD: [57.375, 57.12, 58.395] 4 | WEIGHTS: "" 5 | MASK_ON: True 6 | RESNETS: 7 | STRIDE_IN_1X1: False 8 | BACKBONE: 9 | FREEZE_AT: 0 10 | SOLVER: 11 | # 9x schedule 12 | IMS_PER_BATCH: 64 # 4x the standard 13 | STEPS: (187500, 197500) # last 60/4==15k and last 20/4==5k 14 | MAX_ITER: 202500 # 90k * 9 / 4 15 | BASE_LR: 0.08 16 | TEST: 17 | EVAL_PERIOD: 2500 18 | # NOTE: Please refer to Rethinking ImageNet Pre-training https://arxiv.org/abs/1811.08883 19 | # to learn what you need for training from scratch. 20 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/Misc/semantic_R_50_FPN_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | META_ARCHITECTURE: "SemanticSegmentor" 4 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 5 | RESNETS: 6 | DEPTH: 50 7 | DATASETS: 8 | TRAIN: ("coco_2017_train_panoptic_stuffonly",) 9 | TEST: ("coco_2017_val_panoptic_stuffonly",) 10 | INPUT: 11 | MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) 12 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/PascalVOC-Detection/faster_rcnn_R_50_C4.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-C4.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: False 5 | RESNETS: 6 | DEPTH: 50 7 | ROI_HEADS: 8 | NUM_CLASSES: 20 9 | INPUT: 10 | MIN_SIZE_TRAIN: (480, 512, 544, 576, 608, 640, 672, 704, 736, 768, 800) 11 | MIN_SIZE_TEST: 800 12 | DATASETS: 13 | TRAIN: ('voc_2007_trainval', 'voc_2012_trainval') 14 | TEST: ('voc_2007_test',) 15 | SOLVER: 16 | STEPS: (12000, 16000) 17 | MAX_ITER: 18000 # 17.4 epochs 18 | WARMUP_ITERS: 100 19 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/PascalVOC-Detection/faster_rcnn_R_50_FPN.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: False 5 | RESNETS: 6 | DEPTH: 50 7 | ROI_HEADS: 8 | NUM_CLASSES: 20 9 | INPUT: 10 | MIN_SIZE_TRAIN: (480, 512, 544, 576, 608, 640, 672, 704, 736, 768, 800) 11 | MIN_SIZE_TEST: 800 12 | DATASETS: 13 | TRAIN: ('voc_2007_trainval', 'voc_2012_trainval') 14 | TEST: ('voc_2007_test',) 15 | SOLVER: 16 | STEPS: (12000, 16000) 17 | MAX_ITER: 18000 # 17.4 epochs 18 | WARMUP_ITERS: 100 19 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/common/README.md: -------------------------------------------------------------------------------- 1 | This directory provides definitions for a few common models, dataloaders, scheduler, 2 | and optimizers that are often used in training. 3 | The definition of these objects are provided in the form of lazy instantiation: 4 | their arguments can be edited by users before constructing the objects. 5 | 6 | They can be imported, or loaded by `model_zoo.get_config` API in users' own configs. 7 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/common/data/coco_keypoint.py: -------------------------------------------------------------------------------- 1 | from detectron2.data.detection_utils import create_keypoint_hflip_indices 2 | 3 | from .coco import dataloader 4 | 5 | dataloader.train.dataset.min_keypoints = 1 6 | dataloader.train.dataset.names = "keypoints_coco_2017_train" 7 | dataloader.test.dataset.names = "keypoints_coco_2017_val" 8 | 9 | dataloader.train.mapper.update( 10 | use_instance_mask=False, 11 | use_keypoint=True, 12 | keypoint_hflip_indices=create_keypoint_hflip_indices(dataloader.train.dataset.names), 13 | ) 14 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/common/data/coco_panoptic_separated.py: -------------------------------------------------------------------------------- 1 | from detectron2.config import LazyCall as L 2 | from detectron2.evaluation import ( 3 | COCOEvaluator, 4 | COCOPanopticEvaluator, 5 | DatasetEvaluators, 6 | SemSegEvaluator, 7 | ) 8 | 9 | from .coco import dataloader 10 | 11 | dataloader.train.dataset.names = "coco_2017_train_panoptic_separated" 12 | dataloader.train.dataset.filter_empty = False 13 | dataloader.test.dataset.names = "coco_2017_val_panoptic_separated" 14 | 15 | 16 | dataloader.evaluator = [ 17 | L(COCOEvaluator)( 18 | dataset_name="${...test.dataset.names}", 19 | ), 20 | L(SemSegEvaluator)( 21 | dataset_name="${...test.dataset.names}", 22 | ), 23 | L(COCOPanopticEvaluator)( 24 | dataset_name="${...test.dataset.names}", 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/common/models/panoptic_fpn.py: -------------------------------------------------------------------------------- 1 | from detectron2.config import LazyCall as L 2 | from detectron2.layers import ShapeSpec 3 | from detectron2.modeling import PanopticFPN 4 | from detectron2.modeling.meta_arch.semantic_seg import SemSegFPNHead 5 | 6 | from .mask_rcnn_fpn import model 7 | 8 | model._target_ = PanopticFPN 9 | model.sem_seg_head = L(SemSegFPNHead)( 10 | input_shape={ 11 | f: L(ShapeSpec)(stride=s, channels="${....backbone.out_channels}") 12 | for f, s in zip(["p2", "p3", "p4", "p5"], [4, 8, 16, 32]) 13 | }, 14 | ignore_value=255, 15 | num_classes=54, # COCO stuff + 1 16 | conv_dims=128, 17 | common_stride=4, 18 | loss_weight=0.5, 19 | norm="GN", 20 | ) 21 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/common/optim.py: -------------------------------------------------------------------------------- 1 | import torch 2 | 3 | from detectron2.config import LazyCall as L 4 | from detectron2.solver.build import get_default_optimizer_params 5 | 6 | SGD = L(torch.optim.SGD)( 7 | params=L(get_default_optimizer_params)( 8 | # params.model is meant to be set to the model object, before instantiating 9 | # the optimizer. 10 | weight_decay_norm=0.0 11 | ), 12 | lr=0.02, 13 | momentum=0.9, 14 | weight_decay=1e-4, 15 | ) 16 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/common/train.py: -------------------------------------------------------------------------------- 1 | # Common training-related configs that are designed for "tools/lazyconfig_train_net.py" 2 | # You can use your own instead, together with your own train_net.py 3 | train = dict( 4 | output_dir="./output", 5 | init_checkpoint="detectron2://ImageNetPretrained/MSRA/R-50.pkl", 6 | max_iter=90000, 7 | amp=dict(enabled=False), # options for Automatic Mixed Precision 8 | ddp=dict( # options for DistributedDataParallel 9 | broadcast_buffers=False, 10 | find_unused_parameters=False, 11 | fp16_compression=False, 12 | ), 13 | checkpointer=dict(period=5000, max_to_keep=100), # options for PeriodicCheckpointer 14 | eval_period=5000, 15 | log_period=20, 16 | device="cuda" 17 | # ... 18 | ) 19 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/new_baselines/mask_rcnn_R_101_FPN_100ep_LSJ.py: -------------------------------------------------------------------------------- 1 | from .mask_rcnn_R_50_FPN_100ep_LSJ import ( 2 | dataloader, 3 | lr_multiplier, 4 | model, 5 | optimizer, 6 | train, 7 | ) 8 | 9 | model.backbone.bottom_up.stages.depth = 101 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/new_baselines/mask_rcnn_R_101_FPN_200ep_LSJ.py: -------------------------------------------------------------------------------- 1 | from .mask_rcnn_R_101_FPN_100ep_LSJ import ( 2 | dataloader, 3 | lr_multiplier, 4 | model, 5 | optimizer, 6 | train, 7 | ) 8 | 9 | train.max_iter *= 2 # 100ep -> 200ep 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/new_baselines/mask_rcnn_R_101_FPN_400ep_LSJ.py: -------------------------------------------------------------------------------- 1 | from .mask_rcnn_R_101_FPN_100ep_LSJ import ( 2 | dataloader, 3 | lr_multiplier, 4 | model, 5 | optimizer, 6 | train, 7 | ) 8 | 9 | train.max_iter *= 4 # 100ep -> 400ep 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/new_baselines/mask_rcnn_R_50_FPN_200ep_LSJ.py: -------------------------------------------------------------------------------- 1 | from .mask_rcnn_R_50_FPN_100ep_LSJ import ( 2 | dataloader, 3 | lr_multiplier, 4 | model, 5 | optimizer, 6 | train, 7 | ) 8 | 9 | train.max_iter *= 2 # 100ep -> 200ep 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/new_baselines/mask_rcnn_R_50_FPN_400ep_LSJ.py: -------------------------------------------------------------------------------- 1 | from .mask_rcnn_R_50_FPN_100ep_LSJ import ( 2 | dataloader, 3 | lr_multiplier, 4 | model, 5 | optimizer, 6 | train, 7 | ) 8 | 9 | train.max_iter *= 4 # 100ep -> 400ep 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/new_baselines/mask_rcnn_regnetx_4gf_dds_FPN_200ep_LSJ.py: -------------------------------------------------------------------------------- 1 | from .mask_rcnn_regnetx_4gf_dds_FPN_100ep_LSJ import ( 2 | dataloader, 3 | lr_multiplier, 4 | model, 5 | optimizer, 6 | train, 7 | ) 8 | 9 | train.max_iter *= 2 # 100ep -> 200ep 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/new_baselines/mask_rcnn_regnetx_4gf_dds_FPN_400ep_LSJ.py: -------------------------------------------------------------------------------- 1 | from .mask_rcnn_regnetx_4gf_dds_FPN_100ep_LSJ import ( 2 | dataloader, 3 | lr_multiplier, 4 | model, 5 | optimizer, 6 | train, 7 | ) 8 | 9 | train.max_iter *= 4 # 100ep -> 400ep 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/new_baselines/mask_rcnn_regnety_4gf_dds_FPN_200ep_LSJ.py: -------------------------------------------------------------------------------- 1 | from .mask_rcnn_regnety_4gf_dds_FPN_100ep_LSJ import ( 2 | dataloader, 3 | lr_multiplier, 4 | model, 5 | optimizer, 6 | train, 7 | ) 8 | 9 | train.max_iter *= 2 # 100ep -> 200ep 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/new_baselines/mask_rcnn_regnety_4gf_dds_FPN_400ep_LSJ.py: -------------------------------------------------------------------------------- 1 | from .mask_rcnn_regnety_4gf_dds_FPN_100ep_LSJ import ( 2 | dataloader, 3 | lr_multiplier, 4 | model, 5 | optimizer, 6 | train, 7 | ) 8 | 9 | train.max_iter *= 4 # 100ep -> 400ep 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/README.md: -------------------------------------------------------------------------------- 1 | These are quick configs for performance or accuracy regression tracking purposes. 2 | 3 | * `*instance_test.yaml`: can train on 2 GPUs. They are used to test whether the training can 4 | successfully finish. They are not expected to produce reasonable training results. 5 | * `*inference_acc_test.yaml`: They should be run using `--eval-only`. They run inference using pre-trained models and verify 6 | the results are as expected. 7 | * `*training_acc_test.yaml`: They should be trained on 8 GPUs. They finish in about an hour and verify the training accuracy 8 | is within the normal range. 9 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/cascade_mask_rcnn_R_50_FPN_inference_acc_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Misc/cascade_mask_rcnn_R_50_FPN_3x.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://Misc/cascade_mask_rcnn_R_50_FPN_3x/144998488/model_final_480dd8.pkl" 4 | DATASETS: 5 | TEST: ("coco_2017_val_100",) 6 | TEST: 7 | EXPECTED_RESULTS: [["bbox", "AP", 50.18, 0.02], ["segm", "AP", 43.87, 0.02]] 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/cascade_mask_rcnn_R_50_FPN_instant_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Misc/cascade_mask_rcnn_R_50_FPN_3x.yaml" 2 | DATASETS: 3 | TRAIN: ("coco_2017_val_100",) 4 | TEST: ("coco_2017_val_100",) 5 | SOLVER: 6 | BASE_LR: 0.005 7 | STEPS: (30,) 8 | MAX_ITER: 40 9 | IMS_PER_BATCH: 4 10 | DATALOADER: 11 | NUM_WORKERS: 2 12 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/fast_rcnn_R_50_FPN_inference_acc_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../COCO-Detection/fast_rcnn_R_50_FPN_1x.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://COCO-Detection/fast_rcnn_R_50_FPN_1x/137635226/model_final_e5f7ce.pkl" 4 | DATASETS: 5 | TEST: ("coco_2017_val_100",) 6 | TEST: 7 | EXPECTED_RESULTS: [["bbox", "AP", 45.70, 0.02]] 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/fast_rcnn_R_50_FPN_instant_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../COCO-Detection/fast_rcnn_R_50_FPN_1x.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | DATASETS: 5 | TRAIN: ("coco_2017_val_100",) 6 | PROPOSAL_FILES_TRAIN: ("detectron2://COCO-Detection/rpn_R_50_FPN_1x/137258492/coco_2017_val_box_proposals_ee0dad.pkl", ) 7 | TEST: ("coco_2017_val_100",) 8 | PROPOSAL_FILES_TEST: ("detectron2://COCO-Detection/rpn_R_50_FPN_1x/137258492/coco_2017_val_box_proposals_ee0dad.pkl", ) 9 | SOLVER: 10 | BASE_LR: 0.005 11 | STEPS: (30,) 12 | MAX_ITER: 40 13 | IMS_PER_BATCH: 4 14 | DATALOADER: 15 | NUM_WORKERS: 2 16 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/keypoint_rcnn_R_50_FPN_inference_acc_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../COCO-Keypoints/keypoint_rcnn_R_50_FPN_3x.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://COCO-Keypoints/keypoint_rcnn_R_50_FPN_3x/137849621/model_final_a6e10b.pkl" 4 | DATASETS: 5 | TEST: ("keypoints_coco_2017_val_100",) 6 | TEST: 7 | EXPECTED_RESULTS: [["bbox", "AP", 52.47, 0.02], ["keypoints", "AP", 67.36, 0.02]] 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/keypoint_rcnn_R_50_FPN_instant_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | KEYPOINT_ON: True 5 | ROI_HEADS: 6 | NUM_CLASSES: 1 7 | DATASETS: 8 | TRAIN: ("keypoints_coco_2017_val_100",) 9 | TEST: ("keypoints_coco_2017_val_100",) 10 | SOLVER: 11 | BASE_LR: 0.005 12 | STEPS: (30,) 13 | MAX_ITER: 40 14 | IMS_PER_BATCH: 4 15 | DATALOADER: 16 | NUM_WORKERS: 2 17 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/keypoint_rcnn_R_50_FPN_training_acc_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | KEYPOINT_ON: True 5 | RESNETS: 6 | DEPTH: 50 7 | ROI_HEADS: 8 | BATCH_SIZE_PER_IMAGE: 256 9 | NUM_CLASSES: 1 10 | ROI_KEYPOINT_HEAD: 11 | POOLER_RESOLUTION: 14 12 | POOLER_SAMPLING_RATIO: 2 13 | ROI_BOX_HEAD: 14 | SMOOTH_L1_BETA: 1.0 # Keypoint AP degrades when using plain L1 loss 15 | RPN: 16 | SMOOTH_L1_BETA: 0.2 # Keypoint AP degrades when using plain L1 loss 17 | DATASETS: 18 | TRAIN: ("keypoints_coco_2017_val",) 19 | TEST: ("keypoints_coco_2017_val",) 20 | INPUT: 21 | MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) 22 | SOLVER: 23 | WARMUP_FACTOR: 0.33333333 24 | WARMUP_ITERS: 100 25 | STEPS: (5500, 5800) 26 | MAX_ITER: 6000 27 | TEST: 28 | EXPECTED_RESULTS: [["bbox", "AP", 53.5, 1.0], ["keypoints", "AP", 72.4, 1.0]] 29 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/mask_rcnn_R_50_C4_GCV_instant_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-C4.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: True 5 | DATASETS: 6 | TRAIN: ("coco_2017_val_100",) 7 | TEST: ("coco_2017_val_100",) 8 | SOLVER: 9 | BASE_LR: 0.001 10 | STEPS: (30,) 11 | MAX_ITER: 40 12 | IMS_PER_BATCH: 4 13 | CLIP_GRADIENTS: 14 | ENABLED: True 15 | CLIP_TYPE: "value" 16 | CLIP_VALUE: 1.0 17 | DATALOADER: 18 | NUM_WORKERS: 2 19 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/mask_rcnn_R_50_C4_inference_acc_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../COCO-InstanceSegmentation/mask_rcnn_R_50_C4_3x.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_C4_3x/137849525/model_final_4ce675.pkl" 4 | DATASETS: 5 | TEST: ("coco_2017_val_100",) 6 | TEST: 7 | EXPECTED_RESULTS: [["bbox", "AP", 47.37, 0.02], ["segm", "AP", 40.99, 0.02]] 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/mask_rcnn_R_50_C4_instant_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-C4.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: True 5 | DATASETS: 6 | TRAIN: ("coco_2017_val_100",) 7 | TEST: ("coco_2017_val_100",) 8 | SOLVER: 9 | BASE_LR: 0.001 10 | STEPS: (30,) 11 | MAX_ITER: 40 12 | IMS_PER_BATCH: 4 13 | DATALOADER: 14 | NUM_WORKERS: 2 15 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/mask_rcnn_R_50_C4_training_acc_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-C4.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | ROI_HEADS: 5 | BATCH_SIZE_PER_IMAGE: 256 6 | MASK_ON: True 7 | DATASETS: 8 | TRAIN: ("coco_2017_val",) 9 | TEST: ("coco_2017_val",) 10 | INPUT: 11 | MIN_SIZE_TRAIN: (600,) 12 | MAX_SIZE_TRAIN: 1000 13 | MIN_SIZE_TEST: 800 14 | MAX_SIZE_TEST: 1000 15 | SOLVER: 16 | IMS_PER_BATCH: 8 # base uses 16 17 | WARMUP_FACTOR: 0.33333 18 | WARMUP_ITERS: 100 19 | STEPS: (11000, 11600) 20 | MAX_ITER: 12000 21 | TEST: 22 | EXPECTED_RESULTS: [["bbox", "AP", 41.88, 0.7], ["segm", "AP", 33.79, 0.5]] 23 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/mask_rcnn_R_50_DC5_inference_acc_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../COCO-InstanceSegmentation/mask_rcnn_R_50_DC5_3x.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_DC5_3x/137849551/model_final_84107b.pkl" 4 | DATASETS: 5 | TEST: ("coco_2017_val_100",) 6 | TEST: 7 | EXPECTED_RESULTS: [["bbox", "AP", 47.44, 0.02], ["segm", "AP", 42.94, 0.02]] 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/mask_rcnn_R_50_FPN_inference_acc_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl" 4 | DATASETS: 5 | TEST: ("coco_2017_val_100",) 6 | TEST: 7 | EXPECTED_RESULTS: [["bbox", "AP", 47.34, 0.02], ["segm", "AP", 42.67, 0.02], ["bbox_TTA", "AP", 49.11, 0.02], ["segm_TTA", "AP", 45.04, 0.02]] 8 | AUG: 9 | ENABLED: True 10 | MIN_SIZES: (700, 800) # to save some time 11 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/mask_rcnn_R_50_FPN_instant_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: True 5 | DATASETS: 6 | TRAIN: ("coco_2017_val_100",) 7 | TEST: ("coco_2017_val_100",) 8 | SOLVER: 9 | BASE_LR: 0.005 10 | STEPS: (30,) 11 | MAX_ITER: 40 12 | IMS_PER_BATCH: 4 13 | DATALOADER: 14 | NUM_WORKERS: 2 15 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/mask_rcnn_R_50_FPN_pred_boxes_training_acc_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "./mask_rcnn_R_50_FPN_training_acc_test.yaml" 2 | MODEL: 3 | ROI_BOX_HEAD: 4 | TRAIN_ON_PRED_BOXES: True 5 | TEST: 6 | EXPECTED_RESULTS: [["bbox", "AP", 42.6, 1.0], ["segm", "AP", 35.8, 0.8]] 7 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/mask_rcnn_R_50_FPN_training_acc_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | ROI_HEADS: 5 | BATCH_SIZE_PER_IMAGE: 256 6 | MASK_ON: True 7 | DATASETS: 8 | TRAIN: ("coco_2017_val",) 9 | TEST: ("coco_2017_val",) 10 | INPUT: 11 | MIN_SIZE_TRAIN: (600,) 12 | MAX_SIZE_TRAIN: 1000 13 | MIN_SIZE_TEST: 800 14 | MAX_SIZE_TEST: 1000 15 | SOLVER: 16 | WARMUP_FACTOR: 0.3333333 17 | WARMUP_ITERS: 100 18 | STEPS: (5500, 5800) 19 | MAX_ITER: 6000 20 | TEST: 21 | EXPECTED_RESULTS: [["bbox", "AP", 42.5, 1.0], ["segm", "AP", 35.8, 0.8]] 22 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/panoptic_fpn_R_50_inference_acc_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../COCO-PanopticSegmentation/panoptic_fpn_R_50_3x.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://COCO-PanopticSegmentation/panoptic_fpn_R_50_3x/139514569/model_final_c10459.pkl" 4 | DATASETS: 5 | TEST: ("coco_2017_val_100_panoptic_separated",) 6 | TEST: 7 | EXPECTED_RESULTS: [["bbox", "AP", 46.47, 0.02], ["segm", "AP", 43.39, 0.02], ["sem_seg", "mIoU", 42.55, 0.02], ["panoptic_seg", "PQ", 38.99, 0.02]] 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/panoptic_fpn_R_50_instant_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | META_ARCHITECTURE: "PanopticFPN" 4 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 5 | MASK_ON: True 6 | RESNETS: 7 | DEPTH: 50 8 | SEM_SEG_HEAD: 9 | LOSS_WEIGHT: 0.5 10 | DATASETS: 11 | TRAIN: ("coco_2017_val_100_panoptic_separated",) 12 | TEST: ("coco_2017_val_100_panoptic_separated",) 13 | SOLVER: 14 | BASE_LR: 0.005 15 | STEPS: (30,) 16 | MAX_ITER: 40 17 | IMS_PER_BATCH: 4 18 | DATALOADER: 19 | NUM_WORKERS: 1 20 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/panoptic_fpn_R_50_training_acc_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | META_ARCHITECTURE: "PanopticFPN" 4 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 5 | MASK_ON: True 6 | RESNETS: 7 | DEPTH: 50 8 | SEM_SEG_HEAD: 9 | LOSS_WEIGHT: 0.5 10 | DATASETS: 11 | TRAIN: ("coco_2017_val_panoptic_separated",) 12 | TEST: ("coco_2017_val_panoptic_separated",) 13 | SOLVER: 14 | BASE_LR: 0.01 15 | WARMUP_FACTOR: 0.001 16 | WARMUP_ITERS: 500 17 | STEPS: (5500,) 18 | MAX_ITER: 7000 19 | TEST: 20 | EXPECTED_RESULTS: [["bbox", "AP", 46.70, 1.1], ["segm", "AP", 39.0, 0.7], ["sem_seg", "mIoU", 64.73, 1.3], ["panoptic_seg", "PQ", 48.13, 0.8]] 21 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/retinanet_R_50_FPN_inference_acc_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../COCO-Detection/retinanet_R_50_FPN_3x.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://COCO-Detection/retinanet_R_50_FPN_3x/190397829/model_final_5bd44e.pkl" 4 | DATASETS: 5 | TEST: ("coco_2017_val_100",) 6 | TEST: 7 | EXPECTED_RESULTS: [["bbox", "AP", 44.45, 0.02]] 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/retinanet_R_50_FPN_instant_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../COCO-Detection/retinanet_R_50_FPN_1x.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | DATASETS: 5 | TRAIN: ("coco_2017_val_100",) 6 | TEST: ("coco_2017_val_100",) 7 | SOLVER: 8 | BASE_LR: 0.005 9 | STEPS: (30,) 10 | MAX_ITER: 40 11 | IMS_PER_BATCH: 4 12 | DATALOADER: 13 | NUM_WORKERS: 2 14 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/rpn_R_50_FPN_inference_acc_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../COCO-Detection/rpn_R_50_FPN_1x.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://COCO-Detection/rpn_R_50_FPN_1x/137258492/model_final_02ce48.pkl" 4 | DATASETS: 5 | TEST: ("coco_2017_val_100",) 6 | TEST: 7 | EXPECTED_RESULTS: [["box_proposals", "AR@1000", 58.16, 0.02]] 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/rpn_R_50_FPN_instant_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../COCO-Detection/rpn_R_50_FPN_1x.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | DATASETS: 5 | TRAIN: ("coco_2017_val_100",) 6 | TEST: ("coco_2017_val_100",) 7 | SOLVER: 8 | STEPS: (30,) 9 | MAX_ITER: 40 10 | BASE_LR: 0.005 11 | IMS_PER_BATCH: 4 12 | DATALOADER: 13 | NUM_WORKERS: 2 14 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/semantic_R_50_FPN_inference_acc_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | META_ARCHITECTURE: "SemanticSegmentor" 4 | WEIGHTS: "detectron2://semantic_R_50_FPN_1x/111802073/model_final_c18079783c55a94968edc28b7101c5f0.pkl" 5 | RESNETS: 6 | DEPTH: 50 7 | DATASETS: 8 | TEST: ("coco_2017_val_100_panoptic_stuffonly",) 9 | TEST: 10 | EXPECTED_RESULTS: [["sem_seg", "mIoU", 39.53, 0.02], ["sem_seg", "mACC", 51.50, 0.02]] 11 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/semantic_R_50_FPN_instant_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | META_ARCHITECTURE: "SemanticSegmentor" 4 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 5 | RESNETS: 6 | DEPTH: 50 7 | DATASETS: 8 | TRAIN: ("coco_2017_val_100_panoptic_stuffonly",) 9 | TEST: ("coco_2017_val_100_panoptic_stuffonly",) 10 | INPUT: 11 | MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) 12 | SOLVER: 13 | BASE_LR: 0.005 14 | STEPS: (30,) 15 | MAX_ITER: 40 16 | IMS_PER_BATCH: 4 17 | DATALOADER: 18 | NUM_WORKERS: 2 19 | -------------------------------------------------------------------------------- /third_party/detectron2_old/configs/quick_schedules/semantic_R_50_FPN_training_acc_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-RCNN-FPN.yaml" 2 | MODEL: 3 | META_ARCHITECTURE: "SemanticSegmentor" 4 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 5 | RESNETS: 6 | DEPTH: 50 7 | DATASETS: 8 | TRAIN: ("coco_2017_val_panoptic_stuffonly",) 9 | TEST: ("coco_2017_val_panoptic_stuffonly",) 10 | SOLVER: 11 | BASE_LR: 0.01 12 | WARMUP_FACTOR: 0.001 13 | WARMUP_ITERS: 300 14 | STEPS: (5500,) 15 | MAX_ITER: 7000 16 | TEST: 17 | EXPECTED_RESULTS: [["sem_seg", "mIoU", 76.51, 1.0], ["sem_seg", "mACC", 83.25, 1.0]] 18 | INPUT: 19 | # no scale augmentation 20 | MIN_SIZE_TRAIN: (800, ) 21 | -------------------------------------------------------------------------------- /third_party/detectron2_old/datasets/prepare_for_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | 4 | # Download some files needed for running tests. 5 | 6 | cd "${0%/*}" 7 | 8 | BASE=https://dl.fbaipublicfiles.com/detectron2 9 | mkdir -p coco/annotations 10 | 11 | for anno in instances_val2017_100 \ 12 | person_keypoints_val2017_100 \ 13 | instances_minival2014_100 \ 14 | person_keypoints_minival2014_100; do 15 | 16 | dest=coco/annotations/$anno.json 17 | [[ -s $dest ]] && { 18 | echo "$dest exists. Skipping ..." 19 | } || { 20 | wget $BASE/annotations/coco/$anno.json -O $dest 21 | } 22 | done 23 | -------------------------------------------------------------------------------- /third_party/detectron2_old/demo/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Detectron2 Demo 3 | 4 | We provide a command line tool to run a simple demo of builtin configs. 5 | The usage is explained in [GETTING_STARTED.md](../GETTING_STARTED.md). 6 | 7 | See our [blog post](https://ai.facebook.com/blog/-detectron2-a-pytorch-based-modular-object-detection-library-) 8 | for a high-quality demo generated with this tool. 9 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from .utils.env import setup_environment 4 | 5 | setup_environment() 6 | 7 | 8 | # This line will be programatically read/write by setup.py. 9 | # Leave them at the bottom of this file and don't touch them. 10 | __version__ = "0.4" 11 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/checkpoint/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | # File: 4 | 5 | 6 | from . import catalog as _UNUSED # register the handler 7 | from .detection_checkpoint import DetectionCheckpointer 8 | from fvcore.common.checkpoint import Checkpointer, PeriodicCheckpointer 9 | 10 | __all__ = ["Checkpointer", "PeriodicCheckpointer", "DetectionCheckpointer"] 11 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/config/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from .compat import downgrade_config, upgrade_config 3 | from .config import CfgNode, get_cfg, global_cfg, set_global_cfg, configurable 4 | from .instantiate import instantiate 5 | from .lazy import LazyCall, LazyConfig 6 | 7 | __all__ = [ 8 | "CfgNode", 9 | "get_cfg", 10 | "global_cfg", 11 | "set_global_cfg", 12 | "downgrade_config", 13 | "upgrade_config", 14 | "configurable", 15 | "instantiate", 16 | "LazyCall", 17 | "LazyConfig", 18 | ] 19 | 20 | 21 | from detectron2.utils.env import fixup_module_metadata 22 | 23 | fixup_module_metadata(__name__, globals(), __all__) 24 | del fixup_module_metadata 25 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/data/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from . import transforms # isort:skip 3 | 4 | from .build import ( 5 | build_batch_data_loader, 6 | build_detection_test_loader, 7 | build_detection_train_loader, 8 | get_detection_dataset_dicts, 9 | load_proposals_into_dataset, 10 | print_instances_class_histogram, 11 | ) 12 | from .catalog import DatasetCatalog, MetadataCatalog, Metadata 13 | from .common import DatasetFromList, MapDataset 14 | from .dataset_mapper import DatasetMapper 15 | 16 | # ensure the builtin datasets are registered 17 | from . import datasets, samplers # isort:skip 18 | 19 | __all__ = [k for k in globals().keys() if not k.startswith("_")] 20 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/data/datasets/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ### Common Datasets 4 | 5 | The dataset implemented here do not need to load the data into the final format. 6 | It should provide the minimal data structure needed to use the dataset, so it can be very efficient. 7 | 8 | For example, for an image dataset, just provide the file names and labels, but don't read the images. 9 | Let the downstream decide how to read. 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/data/datasets/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from .coco import load_coco_json, load_sem_seg, register_coco_instances 3 | from .coco_panoptic import register_coco_panoptic, register_coco_panoptic_separated 4 | from .lvis import load_lvis_json, register_lvis_instances, get_lvis_instances_meta 5 | from .pascal_voc import load_voc_instances, register_pascal_voc 6 | from . import builtin as _builtin # ensure the builtin datasets are registered 7 | 8 | 9 | __all__ = [k for k in globals().keys() if not k.startswith("_")] 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/data/datasets/register_coco.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from .coco import register_coco_instances # noqa 3 | from .coco_panoptic import register_coco_panoptic_separated # noqa 4 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/data/samplers/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from .distributed_sampler import InferenceSampler, RepeatFactorTrainingSampler, TrainingSampler 3 | from .grouped_batch_sampler import GroupedBatchSampler 4 | 5 | __all__ = [ 6 | "GroupedBatchSampler", 7 | "TrainingSampler", 8 | "InferenceSampler", 9 | "RepeatFactorTrainingSampler", 10 | ] 11 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/data/transforms/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from fvcore.transforms.transform import Transform, TransformList # order them first 3 | from fvcore.transforms.transform import * 4 | from .transform import * 5 | from .augmentation import * 6 | from .augmentation_impl import * 7 | 8 | __all__ = [k for k in globals().keys() if not k.startswith("_")] 9 | 10 | 11 | from detectron2.utils.env import fixup_module_metadata 12 | 13 | fixup_module_metadata(__name__, globals(), __all__) 14 | del fixup_module_metadata 15 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/engine/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from .launch import * 4 | from .train_loop import * 5 | 6 | __all__ = [k for k in globals().keys() if not k.startswith("_")] 7 | 8 | 9 | # prefer to let hooks and defaults live in separate namespaces (therefore not in __all__) 10 | # but still make them available here 11 | from .hooks import * 12 | from .defaults import * 13 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/evaluation/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from .cityscapes_evaluation import CityscapesInstanceEvaluator, CityscapesSemSegEvaluator 3 | from .coco_evaluation import COCOEvaluator 4 | from .rotated_coco_evaluation import RotatedCOCOEvaluator 5 | from .evaluator import DatasetEvaluator, DatasetEvaluators, inference_context, inference_on_dataset 6 | from .lvis_evaluation import LVISEvaluator 7 | from .panoptic_evaluation import COCOPanopticEvaluator 8 | from .pascal_voc_evaluation import PascalVOCDetectionEvaluator 9 | from .sem_seg_evaluation import SemSegEvaluator 10 | from .testing import print_csv_format, verify_results 11 | 12 | __all__ = [k for k in globals().keys() if not k.startswith("_")] 13 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/export/README.md: -------------------------------------------------------------------------------- 1 | 2 | This directory contains code to prepare a detectron2 model for deployment. 3 | Currently it supports exporting a detectron2 model to Caffe2 format through ONNX. 4 | 5 | Please see [documentation](https://detectron2.readthedocs.io/tutorials/deployment.html) for its usage. 6 | 7 | 8 | ### Acknowledgements 9 | 10 | Thanks to Mobile Vision team at Facebook for developing the Caffe2 conversion tools. 11 | 12 | Thanks to Computing Platform Department - PAI team at Alibaba Group (@bddpqq, @chenbohua3) who 13 | help export Detectron2 models to TorchScript. 14 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/export/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from .api import * 4 | from .flatten import TracingAdapter 5 | from .torchscript import scripting_with_instances, dump_torchscript_IR 6 | 7 | __all__ = [k for k in globals().keys() if not k.startswith("_")] 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/layers/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from .batch_norm import FrozenBatchNorm2d, get_norm, NaiveSyncBatchNorm 3 | from .deform_conv import DeformConv, ModulatedDeformConv 4 | from .mask_ops import paste_masks_in_image 5 | from .nms import batched_nms, batched_nms_rotated, nms, nms_rotated 6 | from .roi_align import ROIAlign, roi_align 7 | from .roi_align_rotated import ROIAlignRotated, roi_align_rotated 8 | from .shape_spec import ShapeSpec 9 | from .wrappers import ( 10 | BatchNorm2d, 11 | Conv2d, 12 | ConvTranspose2d, 13 | cat, 14 | interpolate, 15 | Linear, 16 | nonzero_tuple, 17 | cross_entropy, 18 | ) 19 | from .blocks import CNNBlockBase, DepthwiseSeparableConv2d 20 | from .aspp import ASPP 21 | 22 | __all__ = [k for k in globals().keys() if not k.startswith("_")] 23 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/layers/csrc/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | To add a new Op: 4 | 5 | 1. Create a new directory 6 | 2. Implement new ops there 7 | 3. Delcare its Python interface in `vision.cpp`. 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/layers/csrc/cuda_version.cu: -------------------------------------------------------------------------------- 1 | // Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | #include 4 | 5 | namespace detectron2 { 6 | int get_cudart_version() { 7 | // Not a ROCM platform: Either HIP is not used, or 8 | // it is used, but platform is not ROCM (i.e. it is CUDA) 9 | #if !defined(__HIP_PLATFORM_HCC__) 10 | return CUDART_VERSION; 11 | #else 12 | int version = 0; 13 | 14 | #if HIP_VERSION_MAJOR != 0 15 | // Create a convention similar to that of CUDA, as assumed by other 16 | // parts of the code. 17 | 18 | version = HIP_VERSION_MINOR; 19 | version += (HIP_VERSION_MAJOR * 100); 20 | #else 21 | hipRuntimeGetVersion(&version); 22 | #endif 23 | return version; 24 | #endif 25 | } 26 | } // namespace detectron2 27 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/layers/rotated_boxes.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from __future__ import absolute_import, division, print_function, unicode_literals 3 | 4 | from detectron2 import _C 5 | 6 | 7 | def pairwise_iou_rotated(boxes1, boxes2): 8 | """ 9 | Return intersection-over-union (Jaccard index) of boxes. 10 | 11 | Both sets of boxes are expected to be in 12 | (x_center, y_center, width, height, angle) format. 13 | 14 | Arguments: 15 | boxes1 (Tensor[N, 5]) 16 | boxes2 (Tensor[M, 5]) 17 | 18 | Returns: 19 | iou (Tensor[N, M]): the NxM matrix containing the pairwise 20 | IoU values for every element in boxes1 and boxes2 21 | """ 22 | return _C.box_iou_rotated(boxes1, boxes2) 23 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/layers/shape_spec.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | from collections import namedtuple 4 | 5 | 6 | class ShapeSpec(namedtuple("_ShapeSpec", ["channels", "height", "width", "stride"])): 7 | """ 8 | A simple structure that contains basic shape specification about a tensor. 9 | It is often used as the auxiliary inputs/outputs of models, 10 | to complement the lack of shape inference ability among pytorch modules. 11 | 12 | Attributes: 13 | channels: 14 | height: 15 | width: 16 | stride: 17 | """ 18 | 19 | def __new__(cls, channels=None, height=None, width=None, stride=None): 20 | return super().__new__(cls, channels, height, width, stride) 21 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/model_zoo/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | """ 3 | Model Zoo API for Detectron2: a collection of functions to create common model architectures 4 | listed in `MODEL_ZOO.md `_, 5 | and optionally load their pre-trained weights. 6 | """ 7 | 8 | from .model_zoo import get, get_config_file, get_checkpoint_url, get_config 9 | 10 | __all__ = ["get_checkpoint_url", "get", "get_config_file", "get_config"] 11 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/modeling/backbone/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from .build import build_backbone, BACKBONE_REGISTRY # noqa F401 isort:skip 3 | 4 | from .backbone import Backbone 5 | from .fpn import FPN 6 | from .regnet import RegNet 7 | from .resnet import ( 8 | BasicStem, 9 | ResNet, 10 | ResNetBlockBase, 11 | build_resnet_backbone, 12 | make_stage, 13 | BottleneckBlock, 14 | ) 15 | 16 | __all__ = [k for k in globals().keys() if not k.startswith("_")] 17 | # TODO can expose more resnet blocks after careful consideration 18 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/modeling/meta_arch/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | 4 | from .build import META_ARCH_REGISTRY, build_model # isort:skip 5 | 6 | from .panoptic_fpn import PanopticFPN 7 | 8 | # import all the meta_arch, so they will be registered 9 | from .rcnn import GeneralizedRCNN, ProposalNetwork 10 | from .retinanet import RetinaNet 11 | from .semantic_seg import SEM_SEG_HEADS_REGISTRY, SemanticSegmentor, build_sem_seg_head 12 | 13 | 14 | __all__ = list(globals().keys()) 15 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/modeling/meta_arch/build.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | import torch 3 | 4 | from detectron2.utils.logger import _log_api_usage 5 | from detectron2.utils.registry import Registry 6 | 7 | META_ARCH_REGISTRY = Registry("META_ARCH") # noqa F401 isort:skip 8 | META_ARCH_REGISTRY.__doc__ = """ 9 | Registry for meta-architectures, i.e. the whole model. 10 | 11 | The registered object will be called with `obj(cfg)` 12 | and expected to return a `nn.Module` object. 13 | """ 14 | 15 | 16 | def build_model(cfg): 17 | """ 18 | Build the whole model architecture, defined by ``cfg.MODEL.META_ARCHITECTURE``. 19 | Note that it does not load any weights from ``cfg``. 20 | """ 21 | meta_arch = cfg.MODEL.META_ARCHITECTURE 22 | model = META_ARCH_REGISTRY.get(meta_arch)(cfg) 23 | model.to(torch.device(cfg.MODEL.DEVICE)) 24 | _log_api_usage("modeling.meta_arch." + meta_arch) 25 | return model 26 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/modeling/proposal_generator/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from .build import PROPOSAL_GENERATOR_REGISTRY, build_proposal_generator 3 | from .rpn import RPN_HEAD_REGISTRY, build_rpn_head, RPN, StandardRPNHead 4 | 5 | __all__ = list(globals().keys()) 6 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/modeling/proposal_generator/build.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from detectron2.utils.registry import Registry 3 | 4 | PROPOSAL_GENERATOR_REGISTRY = Registry("PROPOSAL_GENERATOR") 5 | PROPOSAL_GENERATOR_REGISTRY.__doc__ = """ 6 | Registry for proposal generator, which produces object proposals from feature maps. 7 | 8 | The registered object will be called with `obj(cfg, input_shape)`. 9 | The call should return a `nn.Module` object. 10 | """ 11 | 12 | from . import rpn, rrpn # noqa F401 isort:skip 13 | 14 | 15 | def build_proposal_generator(cfg, input_shape): 16 | """ 17 | Build a proposal generator from `cfg.MODEL.PROPOSAL_GENERATOR.NAME`. 18 | The name can be "PrecomputedProposals" to use no proposal generator. 19 | """ 20 | name = cfg.MODEL.PROPOSAL_GENERATOR.NAME 21 | if name == "PrecomputedProposals": 22 | return None 23 | 24 | return PROPOSAL_GENERATOR_REGISTRY.get(name)(cfg, input_shape) 25 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/modeling/roi_heads/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from .box_head import ROI_BOX_HEAD_REGISTRY, build_box_head, FastRCNNConvFCHead 3 | from .keypoint_head import ( 4 | ROI_KEYPOINT_HEAD_REGISTRY, 5 | build_keypoint_head, 6 | BaseKeypointRCNNHead, 7 | KRCNNConvDeconvUpsampleHead, 8 | ) 9 | from .mask_head import ( 10 | ROI_MASK_HEAD_REGISTRY, 11 | build_mask_head, 12 | BaseMaskRCNNHead, 13 | MaskRCNNConvUpsampleHead, 14 | ) 15 | from .roi_heads import ( 16 | ROI_HEADS_REGISTRY, 17 | ROIHeads, 18 | Res5ROIHeads, 19 | StandardROIHeads, 20 | build_roi_heads, 21 | select_foreground_proposals, 22 | ) 23 | from .cascade_rcnn import CascadeROIHeads 24 | from .rotated_fast_rcnn import RROIHeads 25 | from .fast_rcnn import FastRCNNOutputLayers 26 | 27 | from . import cascade_rcnn # isort:skip 28 | 29 | __all__ = list(globals().keys()) 30 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/projects/README.md: -------------------------------------------------------------------------------- 1 | 2 | Projects live in the [`projects` directory](../../projects) under the root of this repository, but not here. 3 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/solver/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from .build import build_lr_scheduler, build_optimizer, get_default_optimizer_params 3 | from .lr_scheduler import WarmupCosineLR, WarmupMultiStepLR, LRMultiplier, WarmupParamScheduler 4 | 5 | __all__ = [k for k in globals().keys() if not k.startswith("_")] 6 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/structures/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from .boxes import Boxes, BoxMode, pairwise_iou, pairwise_ioa 3 | from .image_list import ImageList 4 | 5 | from .instances import Instances 6 | from .keypoints import Keypoints, heatmaps_to_keypoints 7 | from .masks import BitMasks, PolygonMasks, polygons_to_bitmask, ROIMasks 8 | from .rotated_boxes import RotatedBoxes 9 | from .rotated_boxes import pairwise_iou as pairwise_iou_rotated 10 | 11 | __all__ = [k for k in globals().keys() if not k.startswith("_")] 12 | 13 | 14 | from detectron2.utils.env import fixup_module_metadata 15 | 16 | fixup_module_metadata(__name__, globals(), __all__) 17 | del fixup_module_metadata 18 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/utils/README.md: -------------------------------------------------------------------------------- 1 | # Utility functions 2 | 3 | This folder contain utility functions that are not used in the 4 | core library, but are useful for building models or training 5 | code using the config system. 6 | -------------------------------------------------------------------------------- /third_party/detectron2_old/detectron2/utils/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | -------------------------------------------------------------------------------- /third_party/detectron2_old/dev/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Some scripts for developers to use, include: 3 | 4 | - `linter.sh`: lint the codebase before commit. 5 | - `run_{inference,instant}_tests.sh`: run inference/training for a few iterations. 6 | Note that these tests require 2 GPUs. 7 | - `parse_results.sh`: parse results from a log file. 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/dev/packaging/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## To build a cu101 wheel for release: 3 | 4 | ``` 5 | $ nvidia-docker run -it --storage-opt "size=20GB" --name pt pytorch/manylinux-cuda101 6 | # inside the container: 7 | # git clone https://github.com/facebookresearch/detectron2/ 8 | # cd detectron2 9 | # export CU_VERSION=cu101 D2_VERSION_SUFFIX= PYTHON_VERSION=3.7 PYTORCH_VERSION=1.6 10 | # ./dev/packaging/build_wheel.sh 11 | ``` 12 | 13 | ## To build all wheels for `CUDA {9.2,10.0,10.1}` x `Python {3.6,3.7,3.8}`: 14 | ``` 15 | ./dev/packaging/build_all_wheels.sh 16 | ./dev/packaging/gen_wheel_index.sh /path/to/wheels 17 | ``` 18 | -------------------------------------------------------------------------------- /third_party/detectron2_old/dev/run_instant_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | 4 | BIN="python tools/train_net.py" 5 | OUTPUT="instant_test_output" 6 | NUM_GPUS=2 7 | 8 | CFG_LIST=( "${@:1}" ) 9 | if [ ${#CFG_LIST[@]} -eq 0 ]; then 10 | CFG_LIST=( ./configs/quick_schedules/*instant_test.yaml ) 11 | fi 12 | 13 | echo "========================================================================" 14 | echo "Configs to run:" 15 | echo "${CFG_LIST[@]}" 16 | echo "========================================================================" 17 | 18 | for cfg in "${CFG_LIST[@]}"; do 19 | echo "========================================================================" 20 | echo "Running $cfg ..." 21 | echo "========================================================================" 22 | $BIN --num-gpus $NUM_GPUS --config-file "$cfg" \ 23 | SOLVER.IMS_PER_BATCH $(($NUM_GPUS * 2)) \ 24 | OUTPUT_DIR "$OUTPUT" 25 | rm -rf "$OUTPUT" 26 | done 27 | 28 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "2.3" 2 | services: 3 | detectron2: 4 | build: 5 | context: . 6 | dockerfile: Dockerfile 7 | args: 8 | USER_ID: ${USER_ID:-1000} 9 | deploy: 10 | resources: 11 | reservations: 12 | devices: 13 | - capabilities: 14 | - gpu 15 | shm_size: "8gb" 16 | ulimits: 17 | memlock: -1 18 | stack: 67108864 19 | volumes: 20 | - /tmp/.X11-unix:/tmp/.X11-unix:ro 21 | environment: 22 | - DISPLAY=$DISPLAY 23 | - NVIDIA_VISIBLE_DEVICES=all 24 | # Uncomment with proper source to access webcam from docker 25 | # devices: 26 | # - /dev/video0:/dev/video0 27 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/.gitignore: -------------------------------------------------------------------------------- 1 | _build 2 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | SOURCEDIR = . 8 | BUILDDIR = _build 9 | 10 | # Put it first so that "make" without argument is like "make help". 11 | help: 12 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 13 | 14 | .PHONY: help Makefile 15 | 16 | # Catch-all target: route all unknown targets to Sphinx using the new 17 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 18 | %: Makefile 19 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 20 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/README.md: -------------------------------------------------------------------------------- 1 | # Read the docs: 2 | 3 | The latest documentation built from this directory is available at [detectron2.readthedocs.io](https://detectron2.readthedocs.io/). 4 | Documents in this directory are not meant to be read on github. 5 | 6 | # Build the docs: 7 | 8 | 1. Install detectron2 according to [INSTALL.md](https://github.com/facebookresearch/detectron2/blob/master/INSTALL.md). 9 | 2. Install additional libraries required to build docs: 10 | - docutils==0.16 11 | - Sphinx==3.0.0 12 | - recommonmark==0.6.0 13 | - sphinx_rtd_theme 14 | - mock 15 | 16 | 3. Run `make html` from this directory. 17 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/_static/css/custom.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * some extra css to make markdown look similar between github/sphinx 4 | */ 5 | 6 | /* 7 | * Below is for install.md: 8 | */ 9 | .rst-content code { 10 | white-space: pre; 11 | border: 0px; 12 | } 13 | 14 | .rst-content th { 15 | border: 1px solid #e1e4e5; 16 | } 17 | 18 | .rst-content th p { 19 | /* otherwise will be default 24px for regular paragraph */ 20 | margin-bottom: 0px; 21 | } 22 | 23 | .rst-content .line-block { 24 | /* otherwise will be 24px */ 25 | margin-bottom: 0px; 26 | } 27 | 28 | div.section > details { 29 | padding-bottom: 1em; 30 | } 31 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/index.rst: -------------------------------------------------------------------------------- 1 | .. detectron2 documentation master file, created by 2 | sphinx-quickstart on Sat Sep 21 13:46:45 2019. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to detectron2's documentation! 7 | ====================================== 8 | 9 | .. toctree:: 10 | :maxdepth: 2 11 | 12 | tutorials/index 13 | notes/index 14 | modules/index 15 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/modules/checkpoint.rst: -------------------------------------------------------------------------------- 1 | detectron2.checkpoint 2 | ============================= 3 | 4 | .. automodule:: detectron2.checkpoint 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/modules/config.rst: -------------------------------------------------------------------------------- 1 | detectron2.config 2 | ========================= 3 | 4 | Related tutorials: :doc:`../tutorials/configs`, :doc:`../tutorials/extend`. 5 | 6 | .. automodule:: detectron2.config 7 | :members: 8 | :undoc-members: 9 | :show-inheritance: 10 | :inherited-members: 11 | 12 | 13 | Config References 14 | ----------------- 15 | 16 | .. literalinclude:: ../../detectron2/config/defaults.py 17 | :language: python 18 | :linenos: 19 | :lines: 4- 20 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/modules/data.rst: -------------------------------------------------------------------------------- 1 | detectron2.data 2 | ======================= 3 | 4 | .. autodata:: detectron2.data.DatasetCatalog(dict) 5 | :annotation: 6 | 7 | .. autodata:: detectron2.data.MetadataCatalog(dict) 8 | :annotation: 9 | 10 | .. automodule:: detectron2.data 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | detectron2.data.detection\_utils module 16 | --------------------------------------- 17 | 18 | .. automodule:: detectron2.data.detection_utils 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | detectron2.data.datasets module 24 | --------------------------------------- 25 | 26 | .. automodule:: detectron2.data.datasets 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | detectron2.data.samplers module 32 | --------------------------------------- 33 | 34 | .. automodule:: detectron2.data.samplers 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/modules/data_transforms.rst: -------------------------------------------------------------------------------- 1 | detectron2.data.transforms 2 | ==================================== 3 | 4 | Related tutorial: :doc:`../tutorials/augmentation`. 5 | 6 | .. automodule:: detectron2.data.transforms 7 | :members: 8 | :undoc-members: 9 | :show-inheritance: 10 | :imported-members: 11 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/modules/engine.rst: -------------------------------------------------------------------------------- 1 | detectron2.engine 2 | ========================= 3 | 4 | Related tutorial: :doc:`../tutorials/training`. 5 | 6 | .. automodule:: detectron2.engine 7 | :members: 8 | :undoc-members: 9 | :show-inheritance: 10 | 11 | 12 | detectron2.engine.defaults module 13 | --------------------------------- 14 | 15 | .. automodule:: detectron2.engine.defaults 16 | :members: 17 | :undoc-members: 18 | :show-inheritance: 19 | 20 | detectron2.engine.hooks module 21 | --------------------------------- 22 | 23 | .. automodule:: detectron2.engine.hooks 24 | :members: 25 | :undoc-members: 26 | :show-inheritance: 27 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/modules/evaluation.rst: -------------------------------------------------------------------------------- 1 | detectron2.evaluation 2 | ============================= 3 | 4 | .. automodule:: detectron2.evaluation 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/modules/export.rst: -------------------------------------------------------------------------------- 1 | detectron2.export 2 | ========================= 3 | 4 | Related tutorial: :doc:`../tutorials/deployment`. 5 | 6 | .. automodule:: detectron2.export 7 | :members: 8 | :undoc-members: 9 | :show-inheritance: 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/modules/index.rst: -------------------------------------------------------------------------------- 1 | API Documentation 2 | ================== 3 | 4 | .. toctree:: 5 | 6 | checkpoint 7 | config 8 | data 9 | data_transforms 10 | engine 11 | evaluation 12 | layers 13 | model_zoo 14 | modeling 15 | solver 16 | structures 17 | utils 18 | export 19 | fvcore 20 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/modules/layers.rst: -------------------------------------------------------------------------------- 1 | detectron2.layers 2 | ========================= 3 | 4 | .. automodule:: detectron2.layers 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/modules/model_zoo.rst: -------------------------------------------------------------------------------- 1 | detectron2.model_zoo 2 | ============================ 3 | 4 | .. automodule:: detectron2.model_zoo 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/modules/solver.rst: -------------------------------------------------------------------------------- 1 | detectron2.solver 2 | ========================= 3 | 4 | .. automodule:: detectron2.solver 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/modules/structures.rst: -------------------------------------------------------------------------------- 1 | detectron2.structures 2 | ============================= 3 | 4 | .. automodule:: detectron2.structures 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/notes/contributing.md: -------------------------------------------------------------------------------- 1 | ../../.github/CONTRIBUTING.md -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/notes/index.rst: -------------------------------------------------------------------------------- 1 | Notes 2 | ====================================== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | benchmarks 8 | compatibility 9 | contributing 10 | changelog 11 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/requirements.txt: -------------------------------------------------------------------------------- 1 | termcolor 2 | numpy 3 | tqdm 4 | docutils==0.16 5 | # https://github.com/sphinx-doc/sphinx/commit/7acd3ada3f38076af7b2b5c9f3b60bb9c2587a3d 6 | sphinx==3.2.0 7 | recommonmark==0.6.0 8 | sphinx_rtd_theme 9 | matplotlib 10 | termcolor 11 | yacs 12 | tabulate 13 | cloudpickle 14 | Pillow 15 | future 16 | git+git://github.com/facebookresearch/fvcore.git 17 | https://download.pytorch.org/whl/cpu/torch-1.7.0%2Bcpu-cp37-cp37m-linux_x86_64.whl 18 | https://download.pytorch.org/whl/cpu/torchvision-0.8.1%2Bcpu-cp37-cp37m-linux_x86_64.whl 19 | omegaconf>=2.1.0.dev24 20 | hydra-core>=1.1.0.dev5 21 | black 22 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/tutorials/README.md: -------------------------------------------------------------------------------- 1 | # Read the docs: 2 | 3 | The latest documentation built from this directory is available at [detectron2.readthedocs.io](https://detectron2.readthedocs.io/). 4 | Documents in this directory are not meant to be read on github. 5 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/tutorials/builtin_datasets.md: -------------------------------------------------------------------------------- 1 | ../../datasets/README.md -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/tutorials/getting_started.md: -------------------------------------------------------------------------------- 1 | ../../GETTING_STARTED.md -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/tutorials/index.rst: -------------------------------------------------------------------------------- 1 | Tutorials 2 | ====================================== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | install 8 | getting_started 9 | builtin_datasets 10 | extend 11 | datasets 12 | data_loading 13 | augmentation 14 | models 15 | write-models 16 | training 17 | evaluation 18 | configs 19 | deployment 20 | -------------------------------------------------------------------------------- /third_party/detectron2_old/docs/tutorials/install.md: -------------------------------------------------------------------------------- 1 | ../../INSTALL.md -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DeepLab/configs/Cityscapes-SemanticSegmentation/deeplab_v3_R_103_os16_mg124_poly_90k_bs16.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: Base-DeepLabV3-OS16-Semantic.yaml 2 | MODEL: 3 | WEIGHTS: "detectron2://DeepLab/R-103.pkl" 4 | PIXEL_MEAN: [123.675, 116.280, 103.530] 5 | PIXEL_STD: [58.395, 57.120, 57.375] 6 | BACKBONE: 7 | NAME: "build_resnet_deeplab_backbone" 8 | RESNETS: 9 | DEPTH: 101 10 | NORM: "SyncBN" 11 | RES5_MULTI_GRID: [1, 2, 4] 12 | STEM_TYPE: "deeplab" 13 | STEM_OUT_CHANNELS: 128 14 | STRIDE_IN_1X1: False 15 | SEM_SEG_HEAD: 16 | NAME: "DeepLabV3Head" 17 | NORM: "SyncBN" 18 | INPUT: 19 | FORMAT: "RGB" 20 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DeepLab/configs/Cityscapes-SemanticSegmentation/deeplab_v3_plus_R_103_os16_mg124_poly_90k_bs16.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: Base-DeepLabV3-OS16-Semantic.yaml 2 | MODEL: 3 | WEIGHTS: "detectron2://DeepLab/R-103.pkl" 4 | PIXEL_MEAN: [123.675, 116.280, 103.530] 5 | PIXEL_STD: [58.395, 57.120, 57.375] 6 | BACKBONE: 7 | NAME: "build_resnet_deeplab_backbone" 8 | RESNETS: 9 | DEPTH: 101 10 | NORM: "SyncBN" 11 | OUT_FEATURES: ["res2", "res5"] 12 | RES5_MULTI_GRID: [1, 2, 4] 13 | STEM_TYPE: "deeplab" 14 | STEM_OUT_CHANNELS: 128 15 | STRIDE_IN_1X1: False 16 | SEM_SEG_HEAD: 17 | NAME: "DeepLabV3PlusHead" 18 | IN_FEATURES: ["res2", "res5"] 19 | PROJECT_FEATURES: ["res2"] 20 | PROJECT_CHANNELS: [48] 21 | NORM: "SyncBN" 22 | COMMON_STRIDE: 4 23 | INPUT: 24 | FORMAT: "RGB" 25 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DeepLab/deeplab/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from .build_solver import build_lr_scheduler 3 | from .config import add_deeplab_config 4 | from .resnet import build_resnet_deeplab_backbone 5 | from .semantic_seg import DeepLabV3Head, DeepLabV3PlusHead 6 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/HRNet/densepose_rcnn_HRFPN_HRNet_w32_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "https://1drv.ms/u/s!Aus8VCZ_C_33dYBMemi9xOUFR0w" 4 | BACKBONE: 5 | NAME: "build_hrfpn_backbone" 6 | RPN: 7 | IN_FEATURES: ['p1', 'p2', 'p3', 'p4', 'p5'] 8 | ROI_HEADS: 9 | IN_FEATURES: ['p1', 'p2', 'p3', 'p4', 'p5'] 10 | SOLVER: 11 | MAX_ITER: 130000 12 | STEPS: (100000, 120000) 13 | CLIP_GRADIENTS: 14 | ENABLED: True 15 | CLIP_TYPE: "norm" 16 | BASE_LR: 0.03 17 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/HRNet/densepose_rcnn_HRFPN_HRNet_w40_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "https://1drv.ms/u/s!Aus8VCZ_C_33ck0gvo5jfoWBOPo" 4 | BACKBONE: 5 | NAME: "build_hrfpn_backbone" 6 | RPN: 7 | IN_FEATURES: ['p1', 'p2', 'p3', 'p4', 'p5'] 8 | ROI_HEADS: 9 | IN_FEATURES: ['p1', 'p2', 'p3', 'p4', 'p5'] 10 | HRNET: 11 | STAGE2: 12 | NUM_CHANNELS: [40, 80] 13 | STAGE3: 14 | NUM_CHANNELS: [40, 80, 160] 15 | STAGE4: 16 | NUM_CHANNELS: [40, 80, 160, 320] 17 | SOLVER: 18 | MAX_ITER: 130000 19 | STEPS: (100000, 120000) 20 | CLIP_GRADIENTS: 21 | ENABLED: True 22 | CLIP_TYPE: "norm" 23 | BASE_LR: 0.03 24 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/HRNet/densepose_rcnn_HRFPN_HRNet_w48_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "https://1drv.ms/u/s!Aus8VCZ_C_33dKvqI6pBZlifgJk" 4 | BACKBONE: 5 | NAME: "build_hrfpn_backbone" 6 | RPN: 7 | IN_FEATURES: ['p1', 'p2', 'p3', 'p4', 'p5'] 8 | ROI_HEADS: 9 | IN_FEATURES: ['p1', 'p2', 'p3', 'p4', 'p5'] 10 | HRNET: 11 | STAGE2: 12 | NUM_CHANNELS: [48, 96] 13 | STAGE3: 14 | NUM_CHANNELS: [48, 96, 192] 15 | STAGE4: 16 | NUM_CHANNELS: [48, 96, 192, 384] 17 | SOLVER: 18 | MAX_ITER: 130000 19 | STEPS: (100000, 120000) 20 | CLIP_GRADIENTS: 21 | ENABLED: True 22 | CLIP_TYPE: "norm" 23 | BASE_LR: 0.03 24 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/cse/Base-DensePose-RCNN-FPN-Human.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | ROI_DENSEPOSE_HEAD: 4 | CSE: 5 | EMBEDDERS: 6 | "smpl_27554": 7 | TYPE: vertex_feature 8 | NUM_VERTICES: 27554 9 | FEATURE_DIM: 256 10 | FEATURES_TRAINABLE: False 11 | IS_TRAINABLE: True 12 | INIT_FILE: "https://dl.fbaipublicfiles.com/densepose/data/cse/lbo/phi_smpl_27554_256.pkl" 13 | DATASETS: 14 | TRAIN: 15 | - "densepose_coco_2014_train_cse" 16 | - "densepose_coco_2014_valminusminival_cse" 17 | TEST: 18 | - "densepose_coco_2014_minival_cse" 19 | CLASS_TO_MESH_NAME_MAPPING: 20 | "0": "smpl_27554" 21 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/cse/densepose_rcnn_R_101_FPN_DL_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN-Human.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 6 | ROI_DENSEPOSE_HEAD: 7 | NAME: "DensePoseDeepLabHead" 8 | CSE: 9 | EMBED_LOSS_NAME: "EmbeddingLoss" 10 | SOLVER: 11 | MAX_ITER: 130000 12 | STEPS: (100000, 120000) 13 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/cse/densepose_rcnn_R_101_FPN_DL_soft_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN-Human.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 6 | ROI_DENSEPOSE_HEAD: 7 | NAME: "DensePoseDeepLabHead" 8 | CSE: 9 | EMBED_LOSS_NAME: "SoftEmbeddingLoss" 10 | SOLVER: 11 | MAX_ITER: 130000 12 | STEPS: (100000, 120000) 13 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/cse/densepose_rcnn_R_101_FPN_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN-Human.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 6 | ROI_DENSEPOSE_HEAD: 7 | NAME: "DensePoseV1ConvXHead" 8 | CSE: 9 | EMBED_LOSS_NAME: "EmbeddingLoss" 10 | SOLVER: 11 | MAX_ITER: 130000 12 | STEPS: (100000, 120000) 13 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/cse/densepose_rcnn_R_101_FPN_soft_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN-Human.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 6 | ROI_DENSEPOSE_HEAD: 7 | NAME: "DensePoseV1ConvXHead" 8 | CSE: 9 | EMBED_LOSS_NAME: "SoftEmbeddingLoss" 10 | SOLVER: 11 | MAX_ITER: 130000 12 | STEPS: (100000, 120000) 13 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/cse/densepose_rcnn_R_50_FPN_DL_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN-Human.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | ROI_DENSEPOSE_HEAD: 7 | NAME: "DensePoseDeepLabHead" 8 | CSE: 9 | EMBED_LOSS_NAME: "EmbeddingLoss" 10 | SOLVER: 11 | MAX_ITER: 130000 12 | STEPS: (100000, 120000) 13 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/cse/densepose_rcnn_R_50_FPN_DL_soft_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN-Human.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | ROI_DENSEPOSE_HEAD: 7 | NAME: "DensePoseDeepLabHead" 8 | CSE: 9 | EMBED_LOSS_NAME: "SoftEmbeddingLoss" 10 | SOLVER: 11 | MAX_ITER: 130000 12 | STEPS: (100000, 120000) 13 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/cse/densepose_rcnn_R_50_FPN_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN-Human.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | ROI_DENSEPOSE_HEAD: 7 | NAME: "DensePoseV1ConvXHead" 8 | CSE: 9 | EMBED_LOSS_NAME: "EmbeddingLoss" 10 | SOLVER: 11 | MAX_ITER: 130000 12 | STEPS: (100000, 120000) 13 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/cse/densepose_rcnn_R_50_FPN_soft_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN-Human.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | ROI_DENSEPOSE_HEAD: 7 | NAME: "DensePoseV1ConvXHead" 8 | CSE: 9 | EMBED_LOSS_NAME: "SoftEmbeddingLoss" 10 | SOLVER: 11 | MAX_ITER: 130000 12 | STEPS: (100000, 120000) 13 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_101_FPN_DL_WC1M_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 6 | ROI_DENSEPOSE_HEAD: 7 | NAME: "DensePoseDeepLabHead" 8 | UV_CONFIDENCE: 9 | ENABLED: True 10 | TYPE: "iid_iso" 11 | SEGM_CONFIDENCE: 12 | ENABLED: True 13 | POINT_REGRESSION_WEIGHTS: 0.0005 14 | SOLVER: 15 | CLIP_GRADIENTS: 16 | ENABLED: True 17 | MAX_ITER: 130000 18 | STEPS: (100000, 120000) 19 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_101_FPN_DL_WC1_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 6 | ROI_DENSEPOSE_HEAD: 7 | NAME: "DensePoseDeepLabHead" 8 | UV_CONFIDENCE: 9 | ENABLED: True 10 | TYPE: "iid_iso" 11 | POINT_REGRESSION_WEIGHTS: 0.0005 12 | SOLVER: 13 | CLIP_GRADIENTS: 14 | ENABLED: True 15 | MAX_ITER: 130000 16 | STEPS: (100000, 120000) 17 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_101_FPN_DL_WC2M_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 6 | ROI_DENSEPOSE_HEAD: 7 | NAME: "DensePoseDeepLabHead" 8 | UV_CONFIDENCE: 9 | ENABLED: True 10 | TYPE: "indep_aniso" 11 | SEGM_CONFIDENCE: 12 | ENABLED: True 13 | POINT_REGRESSION_WEIGHTS: 0.0005 14 | SOLVER: 15 | CLIP_GRADIENTS: 16 | ENABLED: True 17 | MAX_ITER: 130000 18 | STEPS: (100000, 120000) 19 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_101_FPN_DL_WC2_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 6 | ROI_DENSEPOSE_HEAD: 7 | NAME: "DensePoseDeepLabHead" 8 | UV_CONFIDENCE: 9 | ENABLED: True 10 | TYPE: "indep_aniso" 11 | POINT_REGRESSION_WEIGHTS: 0.0005 12 | SOLVER: 13 | CLIP_GRADIENTS: 14 | ENABLED: True 15 | MAX_ITER: 130000 16 | STEPS: (100000, 120000) 17 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_101_FPN_DL_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 6 | ROI_DENSEPOSE_HEAD: 7 | NAME: "DensePoseDeepLabHead" 8 | SOLVER: 9 | MAX_ITER: 130000 10 | STEPS: (100000, 120000) 11 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_101_FPN_WC1M_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 6 | ROI_DENSEPOSE_HEAD: 7 | UV_CONFIDENCE: 8 | ENABLED: True 9 | TYPE: "iid_iso" 10 | SEGM_CONFIDENCE: 11 | ENABLED: True 12 | POINT_REGRESSION_WEIGHTS: 0.0005 13 | SOLVER: 14 | CLIP_GRADIENTS: 15 | ENABLED: True 16 | MAX_ITER: 130000 17 | STEPS: (100000, 120000) 18 | WARMUP_FACTOR: 0.025 19 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_101_FPN_WC1_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 6 | ROI_DENSEPOSE_HEAD: 7 | UV_CONFIDENCE: 8 | ENABLED: True 9 | TYPE: "iid_iso" 10 | POINT_REGRESSION_WEIGHTS: 0.0005 11 | SOLVER: 12 | CLIP_GRADIENTS: 13 | ENABLED: True 14 | MAX_ITER: 130000 15 | STEPS: (100000, 120000) 16 | WARMUP_FACTOR: 0.025 17 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_101_FPN_WC2M_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 6 | ROI_DENSEPOSE_HEAD: 7 | UV_CONFIDENCE: 8 | ENABLED: True 9 | TYPE: "indep_aniso" 10 | SEGM_CONFIDENCE: 11 | ENABLED: True 12 | POINT_REGRESSION_WEIGHTS: 0.0005 13 | SOLVER: 14 | CLIP_GRADIENTS: 15 | ENABLED: True 16 | MAX_ITER: 130000 17 | STEPS: (100000, 120000) 18 | WARMUP_FACTOR: 0.025 19 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_101_FPN_WC2_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 6 | ROI_DENSEPOSE_HEAD: 7 | UV_CONFIDENCE: 8 | ENABLED: True 9 | TYPE: "indep_aniso" 10 | POINT_REGRESSION_WEIGHTS: 0.0005 11 | SOLVER: 12 | CLIP_GRADIENTS: 13 | ENABLED: True 14 | MAX_ITER: 130000 15 | STEPS: (100000, 120000) 16 | WARMUP_FACTOR: 0.025 17 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_101_FPN_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 6 | SOLVER: 7 | MAX_ITER: 130000 8 | STEPS: (100000, 120000) 9 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_101_FPN_s1x_legacy.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 6 | ROI_DENSEPOSE_HEAD: 7 | NUM_COARSE_SEGM_CHANNELS: 15 8 | POOLER_RESOLUTION: 14 9 | HEATMAP_SIZE: 56 10 | INDEX_WEIGHTS: 2.0 11 | PART_WEIGHTS: 0.3 12 | POINT_REGRESSION_WEIGHTS: 0.1 13 | DECODER_ON: False 14 | SOLVER: 15 | BASE_LR: 0.002 16 | MAX_ITER: 130000 17 | STEPS: (100000, 120000) 18 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_50_FPN_DL_WC1M_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | ROI_DENSEPOSE_HEAD: 7 | NAME: "DensePoseDeepLabHead" 8 | UV_CONFIDENCE: 9 | ENABLED: True 10 | TYPE: "iid_iso" 11 | SEGM_CONFIDENCE: 12 | ENABLED: True 13 | POINT_REGRESSION_WEIGHTS: 0.0005 14 | SOLVER: 15 | CLIP_GRADIENTS: 16 | ENABLED: True 17 | MAX_ITER: 130000 18 | STEPS: (100000, 120000) 19 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_50_FPN_DL_WC1_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | ROI_DENSEPOSE_HEAD: 7 | NAME: "DensePoseDeepLabHead" 8 | UV_CONFIDENCE: 9 | ENABLED: True 10 | TYPE: "iid_iso" 11 | POINT_REGRESSION_WEIGHTS: 0.0005 12 | SOLVER: 13 | CLIP_GRADIENTS: 14 | ENABLED: True 15 | MAX_ITER: 130000 16 | STEPS: (100000, 120000) 17 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_50_FPN_DL_WC2M_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | ROI_DENSEPOSE_HEAD: 7 | NAME: "DensePoseDeepLabHead" 8 | UV_CONFIDENCE: 9 | ENABLED: True 10 | TYPE: "indep_aniso" 11 | SEGM_CONFIDENCE: 12 | ENABLED: True 13 | POINT_REGRESSION_WEIGHTS: 0.0005 14 | SOLVER: 15 | CLIP_GRADIENTS: 16 | ENABLED: True 17 | MAX_ITER: 130000 18 | STEPS: (100000, 120000) 19 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_50_FPN_DL_WC2_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | ROI_DENSEPOSE_HEAD: 7 | NAME: "DensePoseDeepLabHead" 8 | UV_CONFIDENCE: 9 | ENABLED: True 10 | TYPE: "indep_aniso" 11 | POINT_REGRESSION_WEIGHTS: 0.0005 12 | SOLVER: 13 | CLIP_GRADIENTS: 14 | ENABLED: True 15 | MAX_ITER: 130000 16 | STEPS: (100000, 120000) 17 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_50_FPN_DL_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | ROI_DENSEPOSE_HEAD: 7 | NAME: "DensePoseDeepLabHead" 8 | SOLVER: 9 | MAX_ITER: 130000 10 | STEPS: (100000, 120000) 11 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_50_FPN_WC1M_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | ROI_DENSEPOSE_HEAD: 7 | UV_CONFIDENCE: 8 | ENABLED: True 9 | TYPE: "iid_iso" 10 | SEGM_CONFIDENCE: 11 | ENABLED: True 12 | POINT_REGRESSION_WEIGHTS: 0.0005 13 | SOLVER: 14 | CLIP_GRADIENTS: 15 | ENABLED: True 16 | CLIP_TYPE: norm 17 | CLIP_VALUE: 100.0 18 | MAX_ITER: 130000 19 | STEPS: (100000, 120000) 20 | WARMUP_FACTOR: 0.025 21 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_50_FPN_WC1_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | ROI_DENSEPOSE_HEAD: 7 | UV_CONFIDENCE: 8 | ENABLED: True 9 | TYPE: "iid_iso" 10 | POINT_REGRESSION_WEIGHTS: 0.0005 11 | SOLVER: 12 | CLIP_GRADIENTS: 13 | ENABLED: True 14 | MAX_ITER: 130000 15 | STEPS: (100000, 120000) 16 | WARMUP_FACTOR: 0.025 17 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_50_FPN_WC2M_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | ROI_DENSEPOSE_HEAD: 7 | UV_CONFIDENCE: 8 | ENABLED: True 9 | TYPE: "indep_aniso" 10 | SEGM_CONFIDENCE: 11 | ENABLED: True 12 | POINT_REGRESSION_WEIGHTS: 0.0005 13 | SOLVER: 14 | CLIP_GRADIENTS: 15 | ENABLED: True 16 | MAX_ITER: 130000 17 | STEPS: (100000, 120000) 18 | WARMUP_FACTOR: 0.025 19 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_50_FPN_WC2_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | ROI_DENSEPOSE_HEAD: 7 | UV_CONFIDENCE: 8 | ENABLED: True 9 | TYPE: "indep_aniso" 10 | POINT_REGRESSION_WEIGHTS: 0.0005 11 | SOLVER: 12 | CLIP_GRADIENTS: 13 | ENABLED: True 14 | MAX_ITER: 130000 15 | STEPS: (100000, 120000) 16 | WARMUP_FACTOR: 0.025 17 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_50_FPN_s1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | SOLVER: 7 | MAX_ITER: 130000 8 | STEPS: (100000, 120000) 9 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/densepose_rcnn_R_50_FPN_s1x_legacy.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | ROI_DENSEPOSE_HEAD: 7 | NUM_COARSE_SEGM_CHANNELS: 15 8 | POOLER_RESOLUTION: 14 9 | HEATMAP_SIZE: 56 10 | INDEX_WEIGHTS: 2.0 11 | PART_WEIGHTS: 0.3 12 | POINT_REGRESSION_WEIGHTS: 0.1 13 | DECODER_ON: False 14 | SOLVER: 15 | BASE_LR: 0.002 16 | MAX_ITER: 130000 17 | STEPS: (100000, 120000) 18 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/evolution/densepose_R_50_FPN_DL_WC1M_3x_Atop10P_CA.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-RCNN-FPN-Atop10P_CA.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | DENSEPOSE_ON: True 7 | ROI_HEADS: 8 | NAME: "DensePoseROIHeads" 9 | IN_FEATURES: ["p2", "p3", "p4", "p5"] 10 | NUM_CLASSES: 1 11 | ROI_DENSEPOSE_HEAD: 12 | NAME: "DensePoseDeepLabHead" 13 | UV_CONFIDENCE: 14 | ENABLED: True 15 | TYPE: "iid_iso" 16 | SEGM_CONFIDENCE: 17 | ENABLED: True 18 | POINT_REGRESSION_WEIGHTS: 0.0005 19 | POOLER_TYPE: "ROIAlign" 20 | NUM_COARSE_SEGM_CHANNELS: 2 21 | COARSE_SEGM_TRAINED_BY_MASKS: True 22 | INDEX_WEIGHTS: 1.0 23 | SOLVER: 24 | CLIP_GRADIENTS: 25 | ENABLED: True 26 | WARMUP_FACTOR: 0.025 27 | MAX_ITER: 270000 28 | STEPS: (210000, 250000) 29 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/quick_schedules/cse/densepose_rcnn_R_50_FPN_DL_instant_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../../cse/Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | ROI_DENSEPOSE_HEAD: 5 | NAME: "DensePoseDeepLabHead" 6 | DATASETS: 7 | TRAIN: ("densepose_coco_2014_minival_100_cse",) 8 | TEST: ("densepose_coco_2014_minival_100_cse",) 9 | SOLVER: 10 | MAX_ITER: 40 11 | STEPS: (30,) 12 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/quick_schedules/densepose_rcnn_HRFPN_HRNet_w32_instant_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../HRNet/densepose_rcnn_HRFPN_HRNet_w32_s1x.yaml" 2 | DATASETS: 3 | TRAIN: ("densepose_coco_2014_minival_100",) 4 | TEST: ("densepose_coco_2014_minival_100",) 5 | SOLVER: 6 | MAX_ITER: 40 7 | STEPS: (30,) 8 | IMS_PER_BATCH: 2 9 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/quick_schedules/densepose_rcnn_R_50_FPN_DL_instant_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | ROI_DENSEPOSE_HEAD: 5 | NAME: "DensePoseDeepLabHead" 6 | DATASETS: 7 | TRAIN: ("densepose_coco_2014_minival_100",) 8 | TEST: ("densepose_coco_2014_minival_100",) 9 | SOLVER: 10 | MAX_ITER: 40 11 | STEPS: (30,) 12 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/quick_schedules/densepose_rcnn_R_50_FPN_TTA_inference_acc_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../densepose_rcnn_R_50_FPN_s1x.yaml" 2 | MODEL: 3 | WEIGHTS: "https://dl.fbaipublicfiles.com/densepose/densepose_rcnn_R_50_FPN_s1x/165712039/model_final_162be9.pkl" 4 | DATASETS: 5 | TRAIN: () 6 | TEST: ("densepose_coco_2014_minival_100",) 7 | TEST: 8 | AUG: 9 | ENABLED: True 10 | MIN_SIZES: (400, 500, 600, 700, 800, 900, 1000, 1100, 1200) 11 | MAX_SIZE: 4000 12 | FLIP: True 13 | EXPECTED_RESULTS: [["bbox_TTA", "AP", 61.74, 0.03], ["densepose_gps_TTA", "AP", 60.22, 0.03], ["densepose_gpsm_TTA", "AP", 63.59, 0.03]] 14 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/quick_schedules/densepose_rcnn_R_50_FPN_WC1_instant_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | ROI_DENSEPOSE_HEAD: 7 | UV_CONFIDENCE: 8 | ENABLED: True 9 | TYPE: "iid_iso" 10 | POINT_REGRESSION_WEIGHTS: 0.0005 11 | DATASETS: 12 | TRAIN: ("densepose_coco_2014_minival_100",) 13 | TEST: ("densepose_coco_2014_minival_100",) 14 | SOLVER: 15 | CLIP_GRADIENTS: 16 | ENABLED: True 17 | MAX_ITER: 40 18 | STEPS: (30,) 19 | WARMUP_FACTOR: 0.025 20 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/quick_schedules/densepose_rcnn_R_50_FPN_WC2_instant_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | ROI_DENSEPOSE_HEAD: 7 | UV_CONFIDENCE: 8 | ENABLED: True 9 | TYPE: "indep_aniso" 10 | POINT_REGRESSION_WEIGHTS: 0.0005 11 | DATASETS: 12 | TRAIN: ("densepose_coco_2014_minival_100",) 13 | TEST: ("densepose_coco_2014_minival_100",) 14 | SOLVER: 15 | CLIP_GRADIENTS: 16 | ENABLED: True 17 | MAX_ITER: 40 18 | STEPS: (30,) 19 | WARMUP_FACTOR: 0.025 20 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/quick_schedules/densepose_rcnn_R_50_FPN_inference_acc_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../densepose_rcnn_R_50_FPN_s1x.yaml" 2 | MODEL: 3 | WEIGHTS: "https://dl.fbaipublicfiles.com/densepose/densepose_rcnn_R_50_FPN_s1x/165712039/model_final_162be9.pkl" 4 | DATASETS: 5 | TRAIN: () 6 | TEST: ("densepose_coco_2014_minival_100",) 7 | TEST: 8 | EXPECTED_RESULTS: [["bbox", "AP", 59.27, 0.025], ["densepose_gps", "AP", 60.11, 0.02], ["densepose_gpsm", "AP", 64.09, 0.02]] 9 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/quick_schedules/densepose_rcnn_R_50_FPN_instant_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | DATASETS: 5 | TRAIN: ("densepose_coco_2014_minival_100",) 6 | TEST: ("densepose_coco_2014_minival_100",) 7 | SOLVER: 8 | MAX_ITER: 40 9 | STEPS: (30,) 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/configs/quick_schedules/densepose_rcnn_R_50_FPN_training_acc_test.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../Base-DensePose-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | ROI_HEADS: 5 | NUM_CLASSES: 1 6 | DATASETS: 7 | TRAIN: ("densepose_coco_2014_minival",) 8 | TEST: ("densepose_coco_2014_minival",) 9 | SOLVER: 10 | CLIP_GRADIENTS: 11 | ENABLED: True 12 | CLIP_TYPE: norm 13 | CLIP_VALUE: 1.0 14 | MAX_ITER: 6000 15 | STEPS: (5500, 5800) 16 | TEST: 17 | EXPECTED_RESULTS: [["bbox", "AP", 76.2477, 1.0], ["densepose_gps", "AP", 79.6090, 1.5], ["densepose_gpsm", "AP", 80.0061, 1.5]] 18 | 19 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from .data.datasets import builtin # just to register data 3 | from .converters import builtin as builtin_converters # register converters 4 | from .config import ( 5 | add_densepose_config, 6 | add_densepose_head_config, 7 | add_hrnet_config, 8 | add_dataset_category_config, 9 | add_bootstrap_config, 10 | load_bootstrap_config, 11 | ) 12 | from .structures import DensePoseDataRelative, DensePoseList, DensePoseTransformData 13 | from .evaluation import DensePoseCOCOEvaluator 14 | from .modeling.roi_heads import DensePoseROIHeads 15 | from .modeling.test_time_augmentation import ( 16 | DensePoseGeneralizedRCNNWithTTA, 17 | DensePoseDatasetMapperTTA, 18 | ) 19 | from .utils.transform import load_from_cfg 20 | from .modeling.hrfpn import build_hrfpn_backbone 21 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/converters/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from .hflip import HFlipConverter 4 | from .to_mask import ToMaskConverter 5 | from .to_chart_result import ToChartResultConverter, ToChartResultConverterWithConfidences 6 | from .segm_to_mask import ( 7 | predictor_output_with_fine_and_coarse_segm_to_mask, 8 | predictor_output_with_coarse_segm_to_mask, 9 | resample_fine_and_coarse_segm_to_bbox, 10 | ) 11 | from .chart_output_to_chart_result import ( 12 | densepose_chart_predictor_output_to_result, 13 | densepose_chart_predictor_output_to_result_with_confidences, 14 | ) 15 | from .chart_output_hflip import densepose_chart_predictor_output_hflip 16 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/data/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from .meshes import builtin 4 | from .build import ( 5 | build_detection_test_loader, 6 | build_detection_train_loader, 7 | build_combined_loader, 8 | build_frame_selector, 9 | build_inference_based_loaders, 10 | has_inference_based_loaders, 11 | BootstrapDatasetFactoryCatalog, 12 | ) 13 | from .combined_loader import CombinedDataLoader 14 | from .dataset_mapper import DatasetMapper 15 | from .inference_based_loader import InferenceBasedLoader, ScoreBasedFilter 16 | from .image_list_dataset import ImageListDataset 17 | from .utils import is_relative_local_path, maybe_prepend_base_path 18 | 19 | # ensure the builtin datasets are registered 20 | from . import datasets 21 | 22 | # ensure the bootstrap datasets builders are registered 23 | from . import build 24 | 25 | __all__ = [k for k in globals().keys() if not k.startswith("_")] 26 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/data/datasets/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from . import builtin # ensure the builtin datasets are registered 4 | 5 | __all__ = [k for k in globals().keys() if "builtin" not in k and not k.startswith("_")] 6 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/data/datasets/builtin.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from .chimpnsee import register_dataset as register_chimpnsee_dataset 3 | from .coco import BASE_DATASETS as BASE_COCO_DATASETS 4 | from .coco import DATASETS as COCO_DATASETS 5 | from .coco import register_datasets as register_coco_datasets 6 | from .lvis import DATASETS as LVIS_DATASETS 7 | from .lvis import register_datasets as register_lvis_datasets 8 | 9 | DEFAULT_DATASETS_ROOT = "datasets" 10 | 11 | 12 | register_coco_datasets(COCO_DATASETS, DEFAULT_DATASETS_ROOT) 13 | register_coco_datasets(BASE_COCO_DATASETS, DEFAULT_DATASETS_ROOT) 14 | register_lvis_datasets(LVIS_DATASETS, DEFAULT_DATASETS_ROOT) 15 | 16 | register_chimpnsee_dataset(DEFAULT_DATASETS_ROOT) # pyre-ignore[19] 17 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/data/datasets/dataset_type.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from enum import Enum 4 | 5 | 6 | class DatasetType(Enum): 7 | """ 8 | Dataset type, mostly used for datasets that contain data to bootstrap models on 9 | """ 10 | 11 | VIDEO_LIST = "video_list" 12 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/data/meshes/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | 3 | from . import builtin 4 | 5 | __all__ = [k for k in globals().keys() if "builtin" not in k and not k.startswith("_")] 6 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/data/samplers/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from .densepose_uniform import DensePoseUniformSampler 4 | from .densepose_confidence_based import DensePoseConfidenceBasedSampler 5 | from .densepose_cse_uniform import DensePoseCSEUniformSampler 6 | from .densepose_cse_confidence_based import DensePoseCSEConfidenceBasedSampler 7 | from .mask_from_densepose import MaskFromDensePoseSampler 8 | from .prediction_to_gt import PredictionToGroundTruthSampler 9 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/data/samplers/densepose_cse_uniform.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from .densepose_cse_base import DensePoseCSEBaseSampler 4 | from .densepose_uniform import DensePoseUniformSampler 5 | 6 | 7 | class DensePoseCSEUniformSampler(DensePoseCSEBaseSampler, DensePoseUniformSampler): 8 | """ 9 | Uniform Sampler for CSE 10 | """ 11 | 12 | pass 13 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/data/transform/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from .image import ImageResizeTransform 4 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/data/video/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from .frame_selector import ( 4 | FrameSelectionStrategy, 5 | RandomKFramesSelector, 6 | FirstKFramesSelector, 7 | LastKFramesSelector, 8 | FrameTsList, 9 | FrameSelector, 10 | ) 11 | 12 | from .video_keyframe_dataset import ( 13 | VideoKeyframeDataset, 14 | video_list_from_file, 15 | list_keyframes, 16 | read_keyframes, 17 | ) 18 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/engine/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from .trainer import Trainer 4 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/evaluation/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from .evaluator import DensePoseCOCOEvaluator 4 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/modeling/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from .confidence import DensePoseConfidenceModelConfig, DensePoseUVConfidenceType 4 | from .filter import DensePoseDataFilter 5 | from .inference import densepose_inference 6 | from .utils import initialize_module_params 7 | from .build import ( 8 | build_densepose_data_filter, 9 | build_densepose_embedder, 10 | build_densepose_head, 11 | build_densepose_losses, 12 | build_densepose_predictor, 13 | ) 14 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/modeling/cse/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | 3 | from .vertex_direct_embedder import VertexDirectEmbedder 4 | from .vertex_feature_embedder import VertexFeatureEmbedder 5 | from .embedder import Embedder 6 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/modeling/losses/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from .chart import DensePoseChartLoss 4 | from .chart_with_confidences import DensePoseChartWithConfidenceLoss 5 | from .cse import DensePoseCseLoss 6 | from .registry import DENSEPOSE_LOSS_REGISTRY 7 | 8 | 9 | __all__ = [ 10 | "DensePoseChartLoss", 11 | "DensePoseChartWithConfidenceLoss", 12 | "DensePoseCseLoss", 13 | "DENSEPOSE_LOSS_REGISTRY", 14 | ] 15 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/modeling/losses/registry.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from detectron2.utils.registry import Registry 4 | 5 | DENSEPOSE_LOSS_REGISTRY = Registry("DENSEPOSE_LOSS") 6 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/modeling/predictors/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from .chart import DensePoseChartPredictor 4 | from .chart_confidence import DensePoseChartConfidencePredictorMixin 5 | from .chart_with_confidence import DensePoseChartWithConfidencePredictor 6 | from .cse import DensePoseEmbeddingPredictor 7 | from .cse_confidence import DensePoseEmbeddingConfidencePredictorMixin 8 | from .cse_with_confidence import DensePoseEmbeddingWithConfidencePredictor 9 | from .registry import DENSEPOSE_PREDICTOR_REGISTRY 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/modeling/predictors/chart_with_confidence.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from . import DensePoseChartConfidencePredictorMixin, DensePoseChartPredictor 4 | from .registry import DENSEPOSE_PREDICTOR_REGISTRY 5 | 6 | 7 | @DENSEPOSE_PREDICTOR_REGISTRY.register() 8 | class DensePoseChartWithConfidencePredictor( 9 | DensePoseChartConfidencePredictorMixin, DensePoseChartPredictor 10 | ): 11 | """ 12 | Predictor that combines chart and chart confidence estimation 13 | """ 14 | 15 | pass 16 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/modeling/predictors/cse_with_confidence.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from . import DensePoseEmbeddingConfidencePredictorMixin, DensePoseEmbeddingPredictor 4 | from .registry import DENSEPOSE_PREDICTOR_REGISTRY 5 | 6 | 7 | @DENSEPOSE_PREDICTOR_REGISTRY.register() 8 | class DensePoseEmbeddingWithConfidencePredictor( 9 | DensePoseEmbeddingConfidencePredictorMixin, DensePoseEmbeddingPredictor 10 | ): 11 | """ 12 | Predictor that combines CSE and CSE confidence estimation 13 | """ 14 | 15 | pass 16 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/modeling/predictors/registry.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from detectron2.utils.registry import Registry 4 | 5 | DENSEPOSE_PREDICTOR_REGISTRY = Registry("DENSEPOSE_PREDICTOR") 6 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/modeling/roi_heads/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from .v1convx import DensePoseV1ConvXHead 4 | from .deeplab import DensePoseDeepLabHead 5 | from .registry import ROI_DENSEPOSE_HEAD_REGISTRY 6 | from .roi_head import Decoder, DensePoseROIHeads 7 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/modeling/roi_heads/registry.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from detectron2.utils.registry import Registry 4 | 5 | ROI_DENSEPOSE_HEAD_REGISTRY = Registry("ROI_DENSEPOSE_HEAD") 6 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/modeling/utils.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from torch import nn 4 | 5 | 6 | def initialize_module_params(module: nn.Module): 7 | for name, param in module.named_parameters(): 8 | if "bias" in name: 9 | nn.init.constant_(param, 0) 10 | elif "weight" in name: 11 | nn.init.kaiming_normal_(param, mode="fan_out", nonlinearity="relu") 12 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/structures/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from .chart import DensePoseChartPredictorOutput 4 | from .chart_confidence import decorate_predictor_output_class_with_confidences 5 | from .cse_confidence import decorate_cse_predictor_output_class_with_confidences 6 | from .chart_result import ( 7 | DensePoseChartResult, 8 | DensePoseChartResultWithConfidences, 9 | quantize_densepose_chart_result, 10 | compress_quantized_densepose_chart_result, 11 | decompress_compressed_densepose_chart_result, 12 | ) 13 | from .cse import DensePoseEmbeddingPredictorOutput 14 | from .data_relative import DensePoseDataRelative 15 | from .list import DensePoseList 16 | from .mesh import Mesh, create_mesh 17 | from .transform_data import DensePoseTransformData, normalized_coords_transform 18 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/utils/logger.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | import logging 3 | 4 | 5 | def verbosity_to_level(verbosity): 6 | if verbosity is not None: 7 | if verbosity == 0: 8 | return logging.WARNING 9 | elif verbosity == 1: 10 | return logging.INFO 11 | elif verbosity >= 2: 12 | return logging.DEBUG 13 | return logging.WARNING 14 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/densepose/utils/transform.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from detectron2.data import MetadataCatalog 3 | from detectron2.utils.file_io import PathManager 4 | 5 | from densepose import DensePoseTransformData 6 | 7 | 8 | def load_for_dataset(dataset_name): 9 | path = MetadataCatalog.get(dataset_name).densepose_transform_src 10 | densepose_transform_data_fpath = PathManager.get_local_path(path) 11 | return DensePoseTransformData.load(densepose_transform_data_fpath) 12 | 13 | 14 | def load_from_cfg(cfg): 15 | return load_for_dataset(cfg.DATASETS.TEST[0]) 16 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/dev/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Some scripts for developers to use, include: 3 | 4 | - `run_instant_tests.sh`: run training for a few iterations. 5 | - `run_inference_tests.sh`: run inference on a small dataset. 6 | - `../../dev/linter.sh`: lint the codebase before commit 7 | - `../../dev/parse_results.sh`: parse results from log file. 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/doc/RELEASE_2020_04.md: -------------------------------------------------------------------------------- 1 | # DensePose Confidence Estimation and Model Zoo Improvements 2 | 3 | * [DensePose models with confidence estimation](doc/DENSEPOSE_IUV.md#ModelZooConfidence) 4 | * [Panoptic FPN and DeepLabV3 head implementation](doc/DENSEPOSE_IUV.md#ModelZooDeepLabV3) 5 | * Test time augmentations for DensePose 6 | * New evaluation metric (GPSm) that yields more reliable scores 7 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/DensePose/tests/test_image_resize_transform.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | import unittest 4 | import torch 5 | 6 | from densepose.data.transform import ImageResizeTransform 7 | 8 | 9 | class TestImageResizeTransform(unittest.TestCase): 10 | def test_image_resize_1(self): 11 | images_batch = torch.ones((3, 3, 100, 100), dtype=torch.uint8) * 100 12 | transform = ImageResizeTransform() 13 | images_transformed = transform(images_batch) 14 | IMAGES_GT = torch.ones((3, 3, 800, 800), dtype=torch.float) * 100 15 | self.assertEqual(images_transformed.size(), IMAGES_GT.size()) 16 | self.assertAlmostEqual(torch.abs(IMAGES_GT - images_transformed).max().item(), 0.0) 17 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/Panoptic-DeepLab/configs/Cityscapes-PanopticSegmentation/panoptic_deeplab_R_52_os16_mg124_poly_90k_bs32_crop_512_1024.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: Base-PanopticDeepLab-OS16.yaml 2 | MODEL: 3 | WEIGHTS: "detectron2://DeepLab/R-52.pkl" 4 | PIXEL_MEAN: [123.675, 116.280, 103.530] 5 | PIXEL_STD: [58.395, 57.120, 57.375] 6 | BACKBONE: 7 | NAME: "build_resnet_deeplab_backbone" 8 | RESNETS: 9 | DEPTH: 50 10 | NORM: "SyncBN" 11 | RES5_MULTI_GRID: [1, 2, 4] 12 | STEM_TYPE: "deeplab" 13 | STEM_OUT_CHANNELS: 128 14 | STRIDE_IN_1X1: False 15 | SOLVER: 16 | MAX_ITER: 90000 17 | INPUT: 18 | FORMAT: "RGB" 19 | CROP: 20 | SIZE: (512, 1024) 21 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/Panoptic-DeepLab/configs/Cityscapes-PanopticSegmentation/panoptic_deeplab_R_52_os16_mg124_poly_90k_bs32_crop_512_1024_dsconv.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: Base-PanopticDeepLab-OS16.yaml 2 | MODEL: 3 | WEIGHTS: "detectron2://DeepLab/R-52.pkl" 4 | PIXEL_MEAN: [123.675, 116.280, 103.530] 5 | PIXEL_STD: [58.395, 57.120, 57.375] 6 | BACKBONE: 7 | NAME: "build_resnet_deeplab_backbone" 8 | RESNETS: 9 | DEPTH: 50 10 | NORM: "SyncBN" 11 | RES5_MULTI_GRID: [1, 2, 4] 12 | STEM_TYPE: "deeplab" 13 | STEM_OUT_CHANNELS: 128 14 | STRIDE_IN_1X1: False 15 | PANOPTIC_DEEPLAB: 16 | USE_DEPTHWISE_SEPARABLE_CONV: True 17 | SEM_SEG_HEAD: 18 | USE_DEPTHWISE_SEPARABLE_CONV: True 19 | SOLVER: 20 | MAX_ITER: 90000 21 | INPUT: 22 | FORMAT: "RGB" 23 | CROP: 24 | SIZE: (512, 1024) 25 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/Panoptic-DeepLab/panoptic_deeplab/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from .config import add_panoptic_deeplab_config 3 | from .dataset_mapper import PanopticDeeplabDatasetMapper 4 | from .panoptic_seg import ( 5 | PanopticDeepLab, 6 | INS_EMBED_BRANCHES_REGISTRY, 7 | build_ins_embed_branch, 8 | PanopticDeepLabSemSegHead, 9 | PanopticDeepLabInsEmbedHead, 10 | ) 11 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/PointRend/configs/InstanceSegmentation/Base-Implicit-PointRend.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../../../../configs/Base-RCNN-FPN.yaml" 2 | MODEL: 3 | MASK_ON: true 4 | ROI_MASK_HEAD: 5 | NAME: "ImplicitPointRendMaskHead" 6 | POOLER_TYPE: "" # No RoI pooling, let the head process image features directly 7 | FC_DIM: 1024 8 | NUM_FC: 2 9 | POINT_HEAD: 10 | NAME: "ImplicitPointHead" 11 | FC_DIM: 256 12 | NUM_FC: 3 13 | IN_FEATURES: ["p2"] 14 | NUM_CLASSES: 80 15 | CLS_AGNOSTIC_MASK: False 16 | TRAIN_NUM_POINTS: 196 17 | SUBDIVISION_STEPS: 3 18 | SUBDIVISION_NUM_POINTS: 784 19 | IMPLICIT_POINTREND: 20 | IMAGE_FEATURE_ENABLED: True 21 | POS_ENC_ENABLED: True 22 | PARAMS_L2_REGULARIZER: 0.00001 23 | INPUT: 24 | # PointRend for instance segmentation does not work with "polygon" mask_format. 25 | MASK_FORMAT: "bitmask" 26 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/PointRend/configs/InstanceSegmentation/Base-PointRend-RCNN-FPN.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../../../../configs/Base-RCNN-FPN.yaml" 2 | MODEL: 3 | MASK_ON: true 4 | ROI_BOX_HEAD: 5 | TRAIN_ON_PRED_BOXES: True 6 | ROI_MASK_HEAD: 7 | POOLER_TYPE: "" # No RoI pooling, let the head process image features directly 8 | NAME: "PointRendMaskHead" 9 | FC_DIM: 1024 10 | NUM_FC: 2 11 | OUTPUT_SIDE_RESOLUTION: 7 12 | IN_FEATURES: ["p2"] # for the coarse mask head 13 | POINT_HEAD_ON: True 14 | POINT_HEAD: 15 | FC_DIM: 256 16 | NUM_FC: 3 17 | IN_FEATURES: ["p2"] 18 | INPUT: 19 | # PointRend for instance segmentation does not work with "polygon" mask_format. 20 | MASK_FORMAT: "bitmask" 21 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/PointRend/configs/InstanceSegmentation/implicit_pointrend_R_50_FPN_1x_coco.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-Implicit-PointRend.yaml" 2 | MODEL: 3 | WEIGHTS: detectron2://ImageNetPretrained/MSRA/R-50.pkl 4 | RESNETS: 5 | DEPTH: 50 6 | # To add COCO AP evaluation against the higher-quality LVIS annotations. 7 | # DATASETS: 8 | # TEST: ("coco_2017_val", "lvis_v0.5_val_cocofied") 9 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/PointRend/configs/InstanceSegmentation/implicit_pointrend_R_50_FPN_3x_coco.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-Implicit-PointRend.yaml" 2 | MODEL: 3 | WEIGHTS: detectron2://ImageNetPretrained/MSRA/R-50.pkl 4 | RESNETS: 5 | DEPTH: 50 6 | SOLVER: 7 | STEPS: (210000, 250000) 8 | MAX_ITER: 270000 9 | # To add COCO AP evaluation against the higher-quality LVIS annotations. 10 | # DATASETS: 11 | # TEST: ("coco_2017_val", "lvis_v0.5_val_cocofied") 12 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/PointRend/configs/InstanceSegmentation/pointrend_rcnn_R_101_FPN_3x_coco.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: Base-PointRend-RCNN-FPN.yaml 2 | MODEL: 3 | WEIGHTS: detectron2://ImageNetPretrained/MSRA/R-101.pkl 4 | MASK_ON: true 5 | RESNETS: 6 | DEPTH: 101 7 | SOLVER: 8 | STEPS: (210000, 250000) 9 | MAX_ITER: 270000 10 | # To add COCO AP evaluation against the higher-quality LVIS annotations. 11 | # DATASETS: 12 | # TEST: ("coco_2017_val", "lvis_v0.5_val_cocofied") 13 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/PointRend/configs/InstanceSegmentation/pointrend_rcnn_R_50_FPN_1x_cityscapes.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: Base-PointRend-RCNN-FPN.yaml 2 | MODEL: 3 | WEIGHTS: detectron2://ImageNetPretrained/MSRA/R-50.pkl 4 | RESNETS: 5 | DEPTH: 50 6 | ROI_HEADS: 7 | NUM_CLASSES: 8 8 | POINT_HEAD: 9 | NUM_CLASSES: 8 10 | DATASETS: 11 | TEST: ("cityscapes_fine_instance_seg_val",) 12 | TRAIN: ("cityscapes_fine_instance_seg_train",) 13 | SOLVER: 14 | BASE_LR: 0.01 15 | IMS_PER_BATCH: 8 16 | MAX_ITER: 24000 17 | STEPS: (18000,) 18 | INPUT: 19 | MAX_SIZE_TEST: 2048 20 | MAX_SIZE_TRAIN: 2048 21 | MIN_SIZE_TEST: 1024 22 | MIN_SIZE_TRAIN: (800, 832, 864, 896, 928, 960, 992, 1024) 23 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/PointRend/configs/InstanceSegmentation/pointrend_rcnn_R_50_FPN_1x_coco.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: Base-PointRend-RCNN-FPN.yaml 2 | MODEL: 3 | WEIGHTS: detectron2://ImageNetPretrained/MSRA/R-50.pkl 4 | RESNETS: 5 | DEPTH: 50 6 | # To add COCO AP evaluation against the higher-quality LVIS annotations. 7 | # DATASETS: 8 | # TEST: ("coco_2017_val", "lvis_v0.5_val_cocofied") 9 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/PointRend/configs/InstanceSegmentation/pointrend_rcnn_R_50_FPN_3x_coco.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: Base-PointRend-RCNN-FPN.yaml 2 | MODEL: 3 | WEIGHTS: detectron2://ImageNetPretrained/MSRA/R-50.pkl 4 | RESNETS: 5 | DEPTH: 50 6 | SOLVER: 7 | STEPS: (210000, 250000) 8 | MAX_ITER: 270000 9 | # To add COCO AP evaluation against the higher-quality LVIS annotations. 10 | # DATASETS: 11 | # TEST: ("coco_2017_val", "lvis_v0.5_val_cocofied") 12 | 13 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/PointRend/configs/InstanceSegmentation/pointrend_rcnn_X_101_32x8d_FPN_3x_coco.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: Base-PointRend-RCNN-FPN.yaml 2 | MODEL: 3 | MASK_ON: True 4 | WEIGHTS: "detectron2://ImageNetPretrained/FAIR/X-101-32x8d.pkl" 5 | PIXEL_STD: [57.375, 57.120, 58.395] 6 | RESNETS: 7 | STRIDE_IN_1X1: False # this is a C2 model 8 | NUM_GROUPS: 32 9 | WIDTH_PER_GROUP: 8 10 | DEPTH: 101 11 | SOLVER: 12 | STEPS: (210000, 250000) 13 | MAX_ITER: 270000 14 | # To add COCO AP evaluation against the higher-quality LVIS annotations. 15 | # DATASETS: 16 | # TEST: ("coco_2017_val", "lvis_v0.5_val_cocofied") 17 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/PointRend/configs/SemanticSegmentation/Base-PointRend-Semantic-FPN.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../../../../configs/Base-RCNN-FPN.yaml" 2 | MODEL: 3 | META_ARCHITECTURE: "SemanticSegmentor" 4 | BACKBONE: 5 | FREEZE_AT: 0 6 | SEM_SEG_HEAD: 7 | NAME: "PointRendSemSegHead" 8 | POINT_HEAD: 9 | NUM_CLASSES: 54 10 | FC_DIM: 256 11 | NUM_FC: 3 12 | IN_FEATURES: ["p2"] 13 | TRAIN_NUM_POINTS: 1024 14 | SUBDIVISION_STEPS: 2 15 | SUBDIVISION_NUM_POINTS: 8192 16 | COARSE_SEM_SEG_HEAD_NAME: "SemSegFPNHead" 17 | COARSE_PRED_EACH_LAYER: False 18 | DATASETS: 19 | TRAIN: ("coco_2017_train_panoptic_stuffonly",) 20 | TEST: ("coco_2017_val_panoptic_stuffonly",) 21 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/PointRend/point_rend/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from .config import add_pointrend_config 3 | from .mask_head import PointRendMaskHead, ImplicitPointRendMaskHead 4 | from .semantic_seg import PointRendSemSegHead 5 | from .color_augmentation import ColorAugSSDTransform 6 | 7 | from . import roi_heads as _ # only registration 8 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/PointSup/configs/implicit_pointrend_R_50_FPN_3x_point_sup_point_aug_coco.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../../PointRend/configs/InstanceSegmentation/implicit_pointrend_R_50_FPN_3x_coco.yaml" 2 | MODEL: 3 | ROI_MASK_HEAD: 4 | NAME: "ImplicitPointRendPointSupHead" 5 | INPUT: 6 | POINT_SUP: True 7 | SAMPLE_POINTS: 5 8 | DATASETS: 9 | TRAIN: ("coco_2017_train_points_n10_v1_without_masks",) 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/PointSup/configs/mask_rcnn_R_50_FPN_3x_point_sup_coco.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../../../configs/Base-RCNN-FPN.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: True 5 | RESNETS: 6 | DEPTH: 50 7 | ROI_MASK_HEAD: 8 | NAME: "MaskRCNNConvUpsamplePointSupHead" 9 | INPUT: 10 | POINT_SUP: True 11 | DATASETS: 12 | TRAIN: ("coco_2017_train_points_n10_v1_without_masks",) 13 | SOLVER: 14 | STEPS: (210000, 250000) 15 | MAX_ITER: 270000 16 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/PointSup/configs/mask_rcnn_R_50_FPN_3x_point_sup_point_aug_coco.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "mask_rcnn_R_50_FPN_3x_point_sup_coco.yaml" 2 | INPUT: 3 | SAMPLE_POINTS: 5 4 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/PointSup/point_sup/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | from . import register_point_annotations 3 | from .config import add_point_sup_config 4 | from .dataset_mapper import PointSupDatasetMapper 5 | from .mask_head import MaskRCNNConvUpsamplePointSupHead 6 | from .point_utils import get_point_coords_from_point_annotation 7 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/PointSup/point_sup/config.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 3 | 4 | 5 | def add_point_sup_config(cfg): 6 | """ 7 | Add config for point supervision. 8 | """ 9 | # Use point annotation 10 | cfg.INPUT.POINT_SUP = False 11 | # Sample only part of points in each iteration. 12 | # Default: 0, use all available points. 13 | cfg.INPUT.SAMPLE_POINTS = 0 14 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/Rethinking-BatchNorm/configs/mask_rcnn_BNhead.py: -------------------------------------------------------------------------------- 1 | from detectron2.model_zoo import get_config 2 | 3 | model = get_config("common/models/mask_rcnn_fpn.py").model 4 | 5 | model.backbone.bottom_up.freeze_at = 2 6 | 7 | model.roi_heads.box_head.conv_norm = model.roi_heads.mask_head.conv_norm = "BN" 8 | # 4conv1fc head 9 | model.roi_heads.box_head.conv_dims = [256, 256, 256, 256] 10 | model.roi_heads.box_head.fc_dims = [1024] 11 | 12 | dataloader = get_config("common/data/coco.py").dataloader 13 | lr_multiplier = get_config("common/coco_schedule.py").lr_multiplier_3x 14 | optimizer = get_config("common/optim.py").SGD 15 | train = get_config("common/train.py").train 16 | 17 | train.max_iter = 270000 # 3x for batchsize = 16 18 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/Rethinking-BatchNorm/configs/mask_rcnn_BNhead_batch_stats.py: -------------------------------------------------------------------------------- 1 | from torch.nn import BatchNorm2d 2 | from torch.nn import functional as F 3 | 4 | 5 | class BatchNormBatchStat(BatchNorm2d): 6 | """ 7 | BN that uses batch stat in inference 8 | """ 9 | 10 | def forward(self, input): 11 | if self.training: 12 | return super().forward(input) 13 | return F.batch_norm(input, None, None, self.weight, self.bias, True, 1.0, self.eps) 14 | 15 | 16 | # After training with the base config, it's sufficient to load its model with 17 | # this config only for inference -- because the training-time behavior is identical. 18 | from .mask_rcnn_BNhead import model, dataloader, lr_multiplier, optimizer, train 19 | 20 | model.roi_heads.box_head.conv_norm = model.roi_heads.mask_head.conv_norm = BatchNormBatchStat 21 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/Rethinking-BatchNorm/configs/mask_rcnn_SyncBNhead.py: -------------------------------------------------------------------------------- 1 | from .mask_rcnn_BNhead import model, dataloader, lr_multiplier, optimizer, train 2 | 3 | model.roi_heads.box_head.conv_norm = model.roi_heads.mask_head.conv_norm = "SyncBN" 4 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/Rethinking-BatchNorm/configs/retinanet_SyncBNhead.py: -------------------------------------------------------------------------------- 1 | from detectron2.model_zoo import get_config 2 | 3 | model = get_config("common/models/retinanet.py").model 4 | model.backbone.bottom_up.freeze_at = 2 5 | model.head.norm = "SyncBN" 6 | 7 | dataloader = get_config("common/data/coco.py").dataloader 8 | lr_multiplier = get_config("common/coco_schedule.py").lr_multiplier_3x 9 | optimizer = get_config("common/optim.py").SGD 10 | train = get_config("common/train.py").train 11 | 12 | optimizer.lr = 0.01 13 | train.max_iter = 270000 # 3x for batchsize = 16 14 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/TensorMask/configs/Base-TensorMask.yaml: -------------------------------------------------------------------------------- 1 | MODEL: 2 | META_ARCHITECTURE: "TensorMask" 3 | MASK_ON: True 4 | BACKBONE: 5 | NAME: "build_retinanet_resnet_fpn_backbone" 6 | RESNETS: 7 | OUT_FEATURES: ["res2", "res3", "res4", "res5"] 8 | ANCHOR_GENERATOR: 9 | SIZES: [[44, 60], [88, 120], [176, 240], [352, 480], [704, 960], [1408, 1920]] 10 | ASPECT_RATIOS: [[1.0]] 11 | FPN: 12 | IN_FEATURES: ["res2", "res3", "res4", "res5"] 13 | FUSE_TYPE: "avg" 14 | TENSOR_MASK: 15 | ALIGNED_ON: True 16 | BIPYRAMID_ON: True 17 | DATASETS: 18 | TRAIN: ("coco_2017_train",) 19 | TEST: ("coco_2017_val",) 20 | SOLVER: 21 | IMS_PER_BATCH: 16 22 | BASE_LR: 0.02 23 | STEPS: (60000, 80000) 24 | MAX_ITER: 90000 25 | VERSION: 2 26 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/TensorMask/configs/tensormask_R_50_FPN_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-TensorMask.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/TensorMask/configs/tensormask_R_50_FPN_6x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-TensorMask.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | RESNETS: 5 | DEPTH: 50 6 | SOLVER: 7 | STEPS: (480000, 520000) 8 | MAX_ITER: 540000 9 | INPUT: 10 | MIN_SIZE_TRAIN_SAMPLING: "range" 11 | MIN_SIZE_TRAIN: (640, 800) 12 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/TensorMask/tensormask/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from .config import add_tensormask_config 3 | from .arch import TensorMask 4 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/TensorMask/tensormask/layers/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from .swap_align2nat import SwapAlign2Nat, swap_align2nat 3 | 4 | __all__ = [k for k in globals().keys() if not k.startswith("_")] 5 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/TensorMask/tensormask/layers/csrc/vision.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | #include 4 | #include "SwapAlign2Nat/SwapAlign2Nat.h" 5 | 6 | namespace tensormask { 7 | 8 | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { 9 | m.def( 10 | "swap_align2nat_forward", 11 | &SwapAlign2Nat_forward, 12 | "SwapAlign2Nat_forward"); 13 | m.def( 14 | "swap_align2nat_backward", 15 | &SwapAlign2Nat_backward, 16 | "SwapAlign2Nat_backward"); 17 | } 18 | 19 | } // namespace tensormask 20 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/TensorMask/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/TridentNet/configs/Base-TridentNet-Fast-C4.yaml: -------------------------------------------------------------------------------- 1 | MODEL: 2 | META_ARCHITECTURE: "GeneralizedRCNN" 3 | BACKBONE: 4 | NAME: "build_trident_resnet_backbone" 5 | ROI_HEADS: 6 | NAME: "TridentRes5ROIHeads" 7 | POSITIVE_FRACTION: 0.5 8 | BATCH_SIZE_PER_IMAGE: 128 9 | PROPOSAL_APPEND_GT: False 10 | PROPOSAL_GENERATOR: 11 | NAME: "TridentRPN" 12 | RPN: 13 | POST_NMS_TOPK_TRAIN: 500 14 | TRIDENT: 15 | NUM_BRANCH: 3 16 | BRANCH_DILATIONS: [1, 2, 3] 17 | TEST_BRANCH_IDX: 1 18 | TRIDENT_STAGE: "res4" 19 | DATASETS: 20 | TRAIN: ("coco_2017_train",) 21 | TEST: ("coco_2017_val",) 22 | SOLVER: 23 | IMS_PER_BATCH: 16 24 | BASE_LR: 0.02 25 | STEPS: (60000, 80000) 26 | MAX_ITER: 90000 27 | INPUT: 28 | MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) 29 | VERSION: 2 30 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/TridentNet/configs/tridentnet_fast_R_101_C4_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-TridentNet-Fast-C4.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | MASK_ON: False 5 | RESNETS: 6 | DEPTH: 101 7 | SOLVER: 8 | STEPS: (210000, 250000) 9 | MAX_ITER: 270000 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/TridentNet/configs/tridentnet_fast_R_50_C4_1x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-TridentNet-Fast-C4.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: False 5 | RESNETS: 6 | DEPTH: 50 7 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/TridentNet/configs/tridentnet_fast_R_50_C4_3x.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-TridentNet-Fast-C4.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: False 5 | RESNETS: 6 | DEPTH: 50 7 | SOLVER: 8 | STEPS: (210000, 250000) 9 | MAX_ITER: 270000 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/projects/TridentNet/tridentnet/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from .config import add_tridentnet_config 3 | from .trident_backbone import ( 4 | TridentBottleneckBlock, 5 | build_trident_resnet_backbone, 6 | make_trident_stage, 7 | ) 8 | from .trident_rpn import TridentRPN 9 | from .trident_rcnn import TridentRes5ROIHeads, TridentStandardROIHeads 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/tests/README.md: -------------------------------------------------------------------------------- 1 | ## Unit Tests 2 | 3 | To run the unittests, do: 4 | ``` 5 | cd detectron2 6 | python -m unittest discover -v -s ./tests 7 | ``` 8 | 9 | There are also end-to-end inference & training tests, in [dev/run_*_tests.sh](../dev). 10 | -------------------------------------------------------------------------------- /third_party/detectron2_old/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | -------------------------------------------------------------------------------- /third_party/detectron2_old/tests/config/dir1/dir1_a.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | dir1a_str = "base_a_1" 3 | dir1a_dict = {"a": 1, "b": 2} 4 | -------------------------------------------------------------------------------- /third_party/detectron2_old/tests/config/dir1/dir1_b.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from detectron2.config import LazyConfig 3 | 4 | # equivalent to relative import 5 | dir1a_str, dir1a_dict = LazyConfig.load_rel("dir1_a.py", ("dir1a_str", "dir1a_dict")) 6 | 7 | dir1b_str = dir1a_str + "_from_b" 8 | dir1b_dict = dir1a_dict 9 | 10 | # Every import is a reload: not modified by other config files 11 | assert dir1a_dict.a == 1 12 | -------------------------------------------------------------------------------- /third_party/detectron2_old/tests/config/root_cfg.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from itertools import count 3 | 4 | from detectron2.config import LazyCall as L 5 | 6 | from .dir1.dir1_a import dir1a_dict, dir1a_str 7 | 8 | dir1a_dict.a = "modified" 9 | 10 | # modification above won't affect future imports 11 | from .dir1.dir1_b import dir1b_dict, dir1b_str 12 | 13 | 14 | lazyobj = L(count)(x=dir1a_str, y=dir1b_str) 15 | -------------------------------------------------------------------------------- /third_party/detectron2_old/tests/data/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/banmo/422098726f4c42914f7881f43ab57ea2cff2b90e/third_party/detectron2_old/tests/data/__init__.py -------------------------------------------------------------------------------- /third_party/detectron2_old/tests/data/test_dataset.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | import os 4 | import unittest 5 | from functools import partial 6 | from iopath.common.file_io import LazyPath 7 | 8 | from detectron2.data.build import DatasetFromList 9 | 10 | 11 | def _a_slow_func(x): 12 | return "path/{}".format(x) 13 | 14 | 15 | class TestDatasetFromList(unittest.TestCase): 16 | def test_using_lazy_path(self): 17 | dataset = [] 18 | for i in range(10): 19 | dataset.append({"file_name": LazyPath(partial(_a_slow_func, i))}) 20 | 21 | dataset = DatasetFromList(dataset) 22 | for i in range(10): 23 | path = dataset[i]["file_name"] 24 | self.assertTrue(isinstance(path, LazyPath)) 25 | self.assertEqual(os.fspath(path), _a_slow_func(i)) 26 | -------------------------------------------------------------------------------- /third_party/detectron2_old/tests/layers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/banmo/422098726f4c42914f7881f43ab57ea2cff2b90e/third_party/detectron2_old/tests/layers/__init__.py -------------------------------------------------------------------------------- /third_party/detectron2_old/tests/modeling/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/banmo/422098726f4c42914f7881f43ab57ea2cff2b90e/third_party/detectron2_old/tests/modeling/__init__.py -------------------------------------------------------------------------------- /third_party/detectron2_old/tests/structures/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/banmo/422098726f4c42914f7881f43ab57ea2cff2b90e/third_party/detectron2_old/tests/structures/__init__.py -------------------------------------------------------------------------------- /third_party/detectron2_old/tests/test_packaging.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | import unittest 3 | 4 | from detectron2.utils.collect_env import collect_env_info 5 | 6 | 7 | class TestProjects(unittest.TestCase): 8 | def test_import(self): 9 | from detectron2.projects import point_rend 10 | 11 | _ = point_rend.add_pointrend_config 12 | 13 | import detectron2.projects.deeplab as deeplab 14 | 15 | _ = deeplab.add_deeplab_config 16 | 17 | # import detectron2.projects.panoptic_deeplab as panoptic_deeplab 18 | 19 | # _ = panoptic_deeplab.add_panoptic_deeplab_config 20 | 21 | 22 | class TestCollectEnv(unittest.TestCase): 23 | def test(self): 24 | _ = collect_env_info() 25 | -------------------------------------------------------------------------------- /third_party/softras/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | dist/ 3 | soft_renderer.egg-info/ 4 | -------------------------------------------------------------------------------- /third_party/softras/soft_renderer/__init__.py: -------------------------------------------------------------------------------- 1 | from . import functional 2 | from .mesh import Mesh 3 | from .renderer import Renderer, SoftRenderer 4 | from .transform import Projection, LookAt, Look, Transform 5 | from .lighting import AmbientLighting, DirectionalLighting, Lighting 6 | from .rasterizer import SoftRasterizer 7 | from .losses import LaplacianLoss, FlattenLoss 8 | 9 | 10 | __version__ = '1.0.0' 11 | -------------------------------------------------------------------------------- /third_party/softras/soft_renderer/cuda/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/banmo/422098726f4c42914f7881f43ab57ea2cff2b90e/third_party/softras/soft_renderer/cuda/__init__.py -------------------------------------------------------------------------------- /third_party/softras/soft_renderer/functional/__init__.py: -------------------------------------------------------------------------------- 1 | from .get_points_from_angles import get_points_from_angles 2 | from .ambient_lighting import ambient_lighting 3 | from .directional_lighting import directional_lighting 4 | from .load_obj import load_obj 5 | from .look import look 6 | from .look_at import look_at 7 | from .perspective import perspective 8 | from .orthogonal import orthogonal 9 | from .projection import projection 10 | from .soft_rasterize import soft_rasterize 11 | from .save_obj import (save_obj, save_voxel) 12 | from .face_vertices import face_vertices 13 | from .vertex_normals import vertex_normals 14 | from .voxelization import voxelization 15 | -------------------------------------------------------------------------------- /third_party/softras/soft_renderer/functional/ambient_lighting.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | import torch.nn.functional as F 4 | import numpy as np 5 | 6 | 7 | def ambient_lighting(light, light_intensity=0.5, light_color=(1,1,1)): 8 | device = light.device 9 | 10 | if isinstance(light_color, tuple) or isinstance(light_color, list): 11 | light_color = torch.tensor(light_color, dtype=torch.float32, device=device) 12 | elif isinstance(light_color, np.ndarray): 13 | light_color = torch.from_numpy(light_color).float().to(device) 14 | if light_color.ndimension() == 1: 15 | light_color = light_color[None, :] 16 | 17 | light += light_intensity * light_color[:, None, :] 18 | return light #[nb, :, 3] 19 | -------------------------------------------------------------------------------- /third_party/softras/soft_renderer/functional/face_vertices.py: -------------------------------------------------------------------------------- 1 | import torch 2 | 3 | 4 | def face_vertices(vertices, faces): 5 | """ 6 | :param vertices: [batch size, number of vertices, 3] 7 | :param faces: [batch size, number of faces, 3] 8 | :return: [batch size, number of faces, 3, 3] 9 | """ 10 | assert (vertices.ndimension() == 3) 11 | assert (faces.ndimension() == 3) 12 | assert (vertices.shape[0] == faces.shape[0]) 13 | assert (vertices.shape[2] == 3) 14 | assert (faces.shape[2] == 3) 15 | 16 | bs, nv = vertices.shape[:2] 17 | bs, nf = faces.shape[:2] 18 | device = vertices.device 19 | faces = faces + (torch.arange(bs, dtype=torch.int32).to(device) * nv)[:, None, None] 20 | vertices = vertices.reshape((bs * nv, 3)) 21 | # pytorch only supports long and byte tensors for indexing 22 | return vertices[faces.long()] 23 | -------------------------------------------------------------------------------- /third_party/softras/soft_renderer/functional/get_points_from_angles.py: -------------------------------------------------------------------------------- 1 | import math 2 | 3 | import torch 4 | 5 | def get_points_from_angles(distance, elevation, azimuth, degrees=True): 6 | if isinstance(distance, float) or isinstance(distance, int): 7 | if degrees: 8 | elevation = math.radians(elevation) 9 | azimuth = math.radians(azimuth) 10 | return ( 11 | distance * math.cos(elevation) * math.sin(azimuth), 12 | distance * math.sin(elevation), 13 | -distance * math.cos(elevation) * math.cos(azimuth)) 14 | else: 15 | if degrees: 16 | elevation = math.pi / 180. * elevation 17 | azimuth = math.pi / 180. * azimuth 18 | # 19 | return torch.stack([ 20 | distance * torch.cos(elevation) * torch.sin(azimuth), 21 | distance * torch.sin(elevation), 22 | -distance * torch.cos(elevation) * torch.cos(azimuth) 23 | ]).transpose(1,0) 24 | -------------------------------------------------------------------------------- /third_party/softras/soft_renderer/functional/orthogonal.py: -------------------------------------------------------------------------------- 1 | import torch 2 | 3 | 4 | def orthogonal(vertices, scale): 5 | ''' 6 | Compute orthogonal projection from a given angle 7 | To find equivalent scale to perspective projection 8 | set scale = focal_pixel / object_depth -- to 0~H/W pixel range 9 | = 1 / ( object_depth * tan(half_fov_angle) ) -- to -1~1 pixel range 10 | ''' 11 | if (vertices.ndimension() != 3): 12 | raise ValueError('vertices Tensor should have 3 dimensions') 13 | z = vertices[:, :, 2] 14 | x = vertices[:, :, 0] * scale 15 | y = vertices[:, :, 1] * scale 16 | vertices = torch.stack((x,y,z), dim=2) 17 | return vertices -------------------------------------------------------------------------------- /third_party/softras/soft_renderer/functional/perspective.py: -------------------------------------------------------------------------------- 1 | import math 2 | import torch 3 | 4 | 5 | def perspective(vertices, angle=30.): 6 | ''' 7 | Compute perspective distortion from a given angle 8 | ''' 9 | if (vertices.ndimension() != 3): 10 | raise ValueError('vertices Tensor should have 3 dimensions') 11 | device = vertices.device 12 | angle = torch.tensor(angle / 180 * math.pi, dtype=torch.float32, device=device) 13 | angle = angle[None] 14 | width = torch.tan(angle) 15 | width = width[:, None] 16 | z = vertices[:, :, 2] 17 | x = vertices[:, :, 0] / z / width 18 | y = vertices[:, :, 1] / z / width 19 | vertices = torch.stack((x,y,z), dim=2) 20 | return vertices 21 | -------------------------------------------------------------------------------- /third_party/vcnplus/.gitignore: -------------------------------------------------------------------------------- 1 | cat_300 2 | nerfies* 3 | adult-400 4 | -------------------------------------------------------------------------------- /third_party/vcnplus/compute_flow.sh: -------------------------------------------------------------------------------- 1 | davisdir=../../database/DAVIS/ 2 | res=Full-Resolution 3 | seqname=$1 4 | testres=1 5 | 6 | #rm -rf ./$seqname 7 | rm -rf $davisdir/FlowFW*/$res/${seqname}* 8 | rm -rf $davisdir/FlowBW*/$res/${seqname}* 9 | 10 | array=(1 2 4 8 16 32) 11 | for i in "${array[@]}" 12 | do 13 | python auto_gen.py --datapath $davisdir/JPEGImages/$res/$seqname/ --loadmodel ../../lasr_vcn/vcn_rob.pth --testres $testres --dframe $i 14 | mkdir -p $davisdir/FlowFW_$i/$res/$seqname 15 | mkdir -p $davisdir/FlowBW_$i/$res/$seqname 16 | cp $seqname/FlowFW_$i/* -rf $davisdir/FlowFW_$i/$res/$seqname 17 | cp $seqname/FlowBW_$i/* -rf $davisdir/FlowBW_$i/$res/$seqname 18 | done 19 | -------------------------------------------------------------------------------- /third_party/vcnplus/flowutils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/banmo/422098726f4c42914f7881f43ab57ea2cff2b90e/third_party/vcnplus/flowutils/__init__.py -------------------------------------------------------------------------------- /third_party/vcnplus/models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookresearch/banmo/422098726f4c42914f7881f43ab57ea2cff2b90e/third_party/vcnplus/models/__init__.py -------------------------------------------------------------------------------- /third_party/vcnplus/models/networks/.gitignore: -------------------------------------------------------------------------------- 1 | DCNv2/build 2 | -------------------------------------------------------------------------------- /third_party/vcnplus/models/networks/DCNv2/.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | .idea 3 | *.so 4 | *.o 5 | *pyc 6 | _ext 7 | build 8 | DCNv2.egg-info 9 | dist -------------------------------------------------------------------------------- /third_party/vcnplus/models/networks/DCNv2/DCN/__init__.py: -------------------------------------------------------------------------------- 1 | from .dcn_v2 import * 2 | -------------------------------------------------------------------------------- /third_party/vcnplus/models/networks/DCNv2/DCN/src/vision.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "dcn_v2.h" 3 | 4 | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { 5 | m.def("dcn_v2_forward", &dcn_v2_forward, "dcn_v2_forward"); 6 | m.def("dcn_v2_backward", &dcn_v2_backward, "dcn_v2_backward"); 7 | m.def("dcn_v2_psroi_pooling_forward", &dcn_v2_psroi_pooling_forward, "dcn_v2_psroi_pooling_forward"); 8 | m.def("dcn_v2_psroi_pooling_backward", &dcn_v2_psroi_pooling_backward, "dcn_v2_psroi_pooling_backward"); 9 | } 10 | -------------------------------------------------------------------------------- /third_party/vcnplus/models/networks/DCNv2/make.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | python setup.py build develop 3 | --------------------------------------------------------------------------------