├── ExcelAnnotator ├── LICENSE ├── Readme.md ├── Util │ └── poppler │ │ └── poppler-0.68.0 │ │ ├── bin │ │ ├── AUTHORS │ │ ├── BINARIES │ │ ├── COPYING │ │ ├── COPYING3 │ │ ├── README │ │ ├── README-XPDF │ │ ├── freetype6.dll │ │ ├── jpeg62.dll │ │ ├── libcairo-2.dll │ │ ├── libexpat-1.dll │ │ ├── libfontconfig-1.dll │ │ ├── libgcc_s_dw2-1.dll │ │ ├── libpixman-1-0.dll │ │ ├── libpng16-16.dll │ │ ├── libpoppler-79.dll │ │ ├── libpoppler-cpp-0.dll │ │ ├── libstdc++-6.dll │ │ ├── libtiff3.dll │ │ ├── pdfdetach.exe │ │ ├── pdffonts.exe │ │ ├── pdfimages.exe │ │ ├── pdfinfo.exe │ │ ├── pdfseparate.exe │ │ ├── pdftocairo.exe │ │ ├── pdftohtml.exe │ │ ├── pdftoppm.exe │ │ ├── pdftops.exe │ │ ├── pdftotext.exe │ │ ├── pdfunite.exe │ │ └── zlib1.dll │ │ ├── include │ │ └── poppler │ │ │ └── cpp │ │ │ ├── poppler-document.h │ │ │ ├── poppler-embedded-file.h │ │ │ ├── poppler-font.h │ │ │ ├── poppler-global.h │ │ │ ├── poppler-image.h │ │ │ ├── poppler-page-renderer.h │ │ │ ├── poppler-page-transition.h │ │ │ ├── poppler-page.h │ │ │ ├── poppler-rectangle.h │ │ │ ├── poppler-toc.h │ │ │ └── poppler-version.h │ │ ├── lib │ │ ├── libpoppler-cpp.dll.a │ │ ├── libpoppler.dll.a │ │ └── pkgconfig │ │ │ ├── poppler-cairo.pc │ │ │ ├── poppler-cpp.pc │ │ │ ├── poppler-splash.pc │ │ │ └── poppler.pc │ │ └── share │ │ └── man │ │ └── man1 │ │ ├── pdfdetach.1 │ │ ├── pdffonts.1 │ │ ├── pdfimages.1 │ │ ├── pdfinfo.1 │ │ ├── pdfseparate.1 │ │ ├── pdftocairo.1 │ │ ├── pdftohtml.1 │ │ ├── pdftoppm.1 │ │ ├── pdftops.1 │ │ ├── pdftotext.1 │ │ └── pdfunite.1 ├── de_exceleration │ ├── __init__.py │ └── extract_metadata.py ├── doc_parser │ ├── __init__.py │ └── __main__.py ├── excel_extraction │ ├── __init__.py │ └── excel_extraction.py ├── jar │ ├── dom4j-2.1.3.jar │ └── poi-bin-3.17-20170915.zip └── parse_helper │ ├── __init__.py │ └── helper.py ├── README.md ├── TableParser ├── LICENSE ├── README.md ├── detectron2 │ ├── .circleci │ │ └── config.yml │ ├── .clang-format │ ├── .flake8 │ ├── .gitignore │ ├── GETTING_STARTED.md │ ├── INSTALL.md │ ├── LICENSE │ ├── MODEL_ZOO.md │ ├── README.md │ ├── configs │ │ ├── Base-RCNN-FPN.yaml │ │ └── arxivdocs-Detection │ │ │ ├── docparser_Au_tables_4gpu_finetune_v1.yaml │ │ │ ├── docparser_yearbooks_tables_4gpu_thesis_v1_swisstext_finetune.yaml │ │ │ └── docparser_yearbooks_tables_4gpu_thesis_v1_swisstext_finetune_v2.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 │ │ ├── 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 │ │ │ ├── shared.py │ │ │ ├── torchscript.py │ │ │ └── torchscript_patch.py │ │ ├── layers │ │ │ ├── __init__.py │ │ │ ├── aspp.py │ │ │ ├── batch_norm.py │ │ │ ├── blocks.py │ │ │ ├── csrc │ │ │ │ ├── README.md │ │ │ │ ├── ROIAlign │ │ │ │ │ ├── ROIAlign.h │ │ │ │ │ ├── ROIAlign_cpu.cpp │ │ │ │ │ └── ROIAlign_cuda.cu │ │ │ │ ├── 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 │ │ │ │ └── resnet.py │ │ │ ├── box_regression.py │ │ │ ├── matcher.py │ │ │ ├── meta_arch │ │ │ │ ├── __init__.py │ │ │ │ ├── build.py │ │ │ │ ├── panoptic_fpn.py │ │ │ │ ├── rcnn.py │ │ │ │ ├── retinanet.py │ │ │ │ └── semantic_seg.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.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_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-MC-B.yaml │ │ │ │ │ ├── Base-RCNN-FPN-MC.yaml │ │ │ │ │ ├── densepose_R_101_FPN_1x_Atop10_toP.yaml │ │ │ │ │ ├── densepose_R_101_FPN_DL_1x_Atop10_toP.yaml │ │ │ │ │ ├── densepose_R_101_FPN_DL_WC1M_1x_Atop10_toP.yaml │ │ │ │ │ ├── densepose_R_101_FPN_DL_WC1_1x_Atop10_toP.yaml │ │ │ │ │ ├── densepose_R_101_FPN_WC1M_1x_Atop10_toP.yaml │ │ │ │ │ ├── densepose_R_101_FPN_WC1_1x_Atop10_toP.yaml │ │ │ │ │ ├── densepose_R_50_FPN_1x_Atop10_toP.yaml │ │ │ │ │ ├── densepose_R_50_FPN_DL_1x_Atop10_toP.yaml │ │ │ │ │ ├── densepose_R_50_FPN_DL_WC1M_1x_Atop10_toP.yaml │ │ │ │ │ ├── densepose_R_50_FPN_DL_WC1_1x_Atop10_toP.yaml │ │ │ │ │ ├── densepose_R_50_FPN_WC1M_1x_Atop10_toP.yaml │ │ │ │ │ ├── densepose_R_50_FPN_WC1M_1x_Atop10_toP_B.yaml │ │ │ │ │ ├── densepose_R_50_FPN_WC1_1x_Atop10_toP.yaml │ │ │ │ │ └── faster_rcnn_R_50_FPN_1x_MC.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_uniform.py │ │ │ │ │ │ ├── mask_from_densepose.py │ │ │ │ │ │ └── prediction_to_gt.py │ │ │ │ │ ├── structures.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 │ │ │ │ │ ├── densepose_coco_evaluation.py │ │ │ │ │ └── evaluator.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 │ │ │ │ │ │ ├── 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 │ │ │ │ │ │ └── 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 │ │ │ │ │ └── mesh.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 │ │ │ │ ├── GETTING_STARTED.md │ │ │ │ ├── MODEL_ZOO.md │ │ │ │ ├── TOOL_APPLY_NET.md │ │ │ │ ├── TOOL_QUERY_DB.md │ │ │ │ └── images │ │ │ │ │ ├── res_bbox_dp_contour.jpg │ │ │ │ │ ├── res_bbox_dp_segm.jpg │ │ │ │ │ ├── res_bbox_dp_u.jpg │ │ │ │ │ ├── res_bbox_dp_v.jpg │ │ │ │ │ ├── vis_bbox_dp_i.jpg │ │ │ │ │ ├── vis_bbox_dp_pts.jpg │ │ │ │ │ ├── vis_bbox_dp_segm.jpg │ │ │ │ │ ├── vis_bbox_dp_u.jpg │ │ │ │ │ └── vis_bbox_dp_v.jpg │ │ │ ├── query_db.py │ │ │ ├── tests │ │ │ │ ├── common.py │ │ │ │ ├── test_combine_data_loader.py │ │ │ │ ├── test_frame_selector.py │ │ │ │ ├── test_image_resize_transform.py │ │ │ │ ├── test_model_e2e.py │ │ │ │ ├── test_setup.py │ │ │ │ ├── test_structures.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-PointRend-RCNN-FPN.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 │ │ ├── README.md │ │ ├── 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 │ │ ├── data │ │ │ ├── __init__.py │ │ │ ├── test_coco.py │ │ │ ├── test_coco_evaluation.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_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_config.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_visualizer.py │ └── tools │ │ ├── README.md │ │ ├── analyze_model.py │ │ ├── benchmark.py │ │ ├── convert-torchvision-to-d2.py │ │ ├── datasets │ │ └── yearbooks_manual │ │ │ └── manual_val_v2_with_L_multicells │ │ │ ├── 31-0 │ │ │ └── 31-0.pdf │ │ │ ├── 32-0 │ │ │ └── 32-0.pdf │ │ │ ├── 33-0 │ │ │ └── 33-0.pdf │ │ │ ├── 34-0 │ │ │ └── 34-0.pdf │ │ │ ├── 35-0 │ │ │ └── 35-0.pdf │ │ │ ├── 36-0 │ │ │ └── 36-0.pdf │ │ │ ├── 37-0 │ │ │ └── 37-0.pdf │ │ │ ├── 38-0 │ │ │ └── 38-0.pdf │ │ │ ├── 39-0 │ │ │ └── 39-0.pdf │ │ │ ├── 40-0 │ │ │ └── 40-0.pdf │ │ │ ├── 41-0 │ │ │ └── 41-0.pdf │ │ │ ├── 42-0 │ │ │ └── 42-0.pdf │ │ │ ├── 43-0 │ │ │ └── 43-0.pdf │ │ │ ├── 44-0 │ │ │ └── 44-0.pdf │ │ │ ├── 45-0 │ │ │ └── 45-0.pdf │ │ │ ├── 46-0 │ │ │ └── 46-0.pdf │ │ │ ├── 47-0 │ │ │ └── 47-0.pdf │ │ │ ├── 48-0 │ │ │ └── 48-0.pdf │ │ │ └── 49-0 │ │ │ └── 49-0.pdf │ │ ├── deploy │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── caffe2_mask_rcnn.cpp │ │ ├── export_model.py │ │ └── torchscript_traced_mask_rcnn.cpp │ │ ├── plain_train_net.py │ │ ├── train_net.py │ │ ├── visualize_data.py │ │ └── visualize_json_results.py ├── docparser │ ├── __pycache__ │ │ ├── stage1_entity_detector.cpython-36.pyc │ │ └── stage2_structure_parser.cpython-36.pyc │ ├── logging.conf │ ├── objdetmetrics_lib │ │ ├── BoundingBox.py │ │ ├── BoundingBoxes.py │ │ ├── Evaluator.py │ │ ├── __init__.py │ │ ├── __pycache__ │ │ │ ├── BoundingBox.cpython-36.pyc │ │ │ ├── BoundingBoxes.cpython-36.pyc │ │ │ ├── Evaluator.cpython-36.pyc │ │ │ ├── __init__.cpython-36.pyc │ │ │ └── utils.cpython-36.pyc │ │ └── utils.py │ ├── stage1_entity_detector.py │ ├── stage2_structure_parser.py │ └── utils │ │ ├── __pycache__ │ │ ├── arxiv_heuristics.cpython-36.pyc │ │ ├── data_utils.cpython-36.pyc │ │ ├── data_utils.cpython-38.pyc │ │ ├── eval_utils.cpython-36.pyc │ │ ├── experiment_utils.cpython-36.pyc │ │ ├── postprocess_icdar_table_structure.cpython-36.pyc │ │ ├── postprocess_table_structure.cpython-36.pyc │ │ ├── postprocess_utils.cpython-36.pyc │ │ └── structure_utils.cpython-36.pyc │ │ ├── arxiv_heuristics.py │ │ ├── create_dataset_groundtruths_exact.py │ │ ├── create_manual_labeling_set.py │ │ ├── data_utils.py │ │ ├── dataset-tools-20180206.jar │ │ ├── detect_missing_docs.py │ │ ├── eval_utils.py │ │ ├── experiment_utils.py │ │ ├── postprocess_icdar_table_structure.py │ │ ├── postprocess_manual_labels_yearbooks.py │ │ ├── postprocess_manual_yearbooks.py │ │ ├── postprocess_table_structure.py │ │ ├── postprocess_utils.py │ │ ├── prepare_docs_from_gui.py │ │ ├── preprocess_yearbooks.py │ │ └── structure_utils.py ├── environment.yaml └── preprocessing │ ├── .ipynb_checkpoints │ ├── Example_Layout_Parser-Susie-cell-bbox-checkpoint.ipynb │ └── adding_col_row_ranges_after_manual-checkpoint.ipynb │ ├── Example-automated.json │ ├── Example.jpg │ ├── Example.png │ ├── adding_col_row_ranges_after_manual.ipynb │ └── google-vision-bbox.ipynb ├── demo └── 2021-06-15 02-05-58.gif └── figures ├── 4-4_pdf.jpg ├── 4-4_pdf_anno.jpg ├── 6-5_structure.PNG ├── 6-5_table_annotated.PNG ├── 6-5_table_original.PNG ├── DeExcelerator.jpg ├── HTableParser_csv.jpg ├── HTableParser_input.png ├── HTableParser_input_annotations.png ├── LayoutParser_HTableParserInput.png ├── M1_18-0.png ├── M1_27-0.png ├── M1_HTableParserInput.png ├── M1_KR_CB_Page1.png ├── M1_ZH_cut1.png ├── M2_18-0.png ├── M2_27-0.png ├── M2_KR_CB_Page1.png ├── M2_ZH_cut1.png ├── MTableParser_Example.jpg ├── MTableParser_Excel.jpg ├── MTableParser_bbox.jpg ├── OCR_TableAnnotator.png ├── TableParser.drawio.pdf ├── demo_TableAnnotator.png ├── googlevision-ocr-bad.png ├── googlevision-ocr-good.png └── mask-rcnn.drawio.pdf /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/AUTHORS: -------------------------------------------------------------------------------- 1 | xpdf is written by Derek Noonburg 2 | 3 | libpoppler is a fork of xpdf-3.00 4 | 5 | Current Maintainer: Albert Astals Cid 6 | -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/BINARIES: -------------------------------------------------------------------------------- 1 | Version 0.33.0 2 | 3 | Compiled by Alivate Australia 2015 4 | 5 | Unless otherwise stated, the software on this site is distributed in the hope 6 | that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 7 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. THERE IS NO 8 | WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT 9 | WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS PROVIDE THE SOFTWARE 10 | "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, 11 | BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 12 | A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF 13 | THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE 14 | COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. IN NO EVENT UNLESS 15 | REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, 16 | BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR 17 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE 18 | (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE 19 | OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO 20 | OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER HAS BEEN ADVISED OF 21 | THE POSSIBILITY OF SUCH DAMAGES. 22 | 23 | http://blog.alivate.com.au/poppler-windows 24 | -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/README-XPDF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/README-XPDF -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/freetype6.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/freetype6.dll -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/jpeg62.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/jpeg62.dll -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/libcairo-2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/libcairo-2.dll -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/libexpat-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/libexpat-1.dll -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/libfontconfig-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/libfontconfig-1.dll -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/libgcc_s_dw2-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/libgcc_s_dw2-1.dll -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/libpixman-1-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/libpixman-1-0.dll -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/libpng16-16.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/libpng16-16.dll -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/libpoppler-79.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/libpoppler-79.dll -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/libpoppler-cpp-0.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/libpoppler-cpp-0.dll -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/libstdc++-6.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/libstdc++-6.dll -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/libtiff3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/libtiff3.dll -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdfdetach.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdfdetach.exe -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdffonts.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdffonts.exe -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdfimages.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdfimages.exe -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdfinfo.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdfinfo.exe -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdfseparate.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdfseparate.exe -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdftocairo.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdftocairo.exe -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdftohtml.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdftohtml.exe -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdftoppm.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdftoppm.exe -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdftops.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdftops.exe -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdftotext.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdftotext.exe -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdfunite.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/pdfunite.exe -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/zlib1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/bin/zlib1.dll -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/include/poppler/cpp/poppler-version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009, Pino Toscano 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2, or (at your option) 7 | * any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #ifndef POPPLER_VERSION_H 20 | #define POPPLER_VERSION_H 21 | 22 | #include "poppler-global.h" 23 | 24 | #define POPPLER_VERSION "0.68.0" 25 | #define POPPLER_VERSION_MAJOR 0 26 | #define POPPLER_VERSION_MINOR 68 27 | #define POPPLER_VERSION_MICRO 0 28 | 29 | namespace poppler 30 | { 31 | 32 | POPPLER_CPP_EXPORT std::string version_string(); 33 | POPPLER_CPP_EXPORT unsigned int version_major(); 34 | POPPLER_CPP_EXPORT unsigned int version_minor(); 35 | POPPLER_CPP_EXPORT unsigned int version_micro(); 36 | 37 | } 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/lib/libpoppler-cpp.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/lib/libpoppler-cpp.dll.a -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/lib/libpoppler.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/Util/poppler/poppler-0.68.0/lib/libpoppler.dll.a -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/lib/pkgconfig/poppler-cairo.pc: -------------------------------------------------------------------------------- 1 | prefix=C:/temp/poppler-install-dir/x86/poppler-0.69.0 2 | libdir=C:/temp/poppler-install-dir/x86/poppler-0.69.0/lib 3 | includedir=C:/temp/poppler-install-dir/x86/poppler-0.69.0/include 4 | 5 | Name: poppler-cairo 6 | Description: Cairo backend for Poppler PDF rendering library 7 | Version: 0.68.0 8 | Requires: poppler = 0.68.0 cairo >= 1.10.0 9 | -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/lib/pkgconfig/poppler-cpp.pc: -------------------------------------------------------------------------------- 1 | prefix=C:/temp/poppler-install-dir/x86/poppler-0.69.0 2 | libdir=C:/temp/poppler-install-dir/x86/poppler-0.69.0/lib 3 | includedir=C:/temp/poppler-install-dir/x86/poppler-0.69.0/include 4 | 5 | Name: poppler-cpp 6 | Description: cpp backend for Poppler PDF rendering library 7 | Version: 0.68.0 8 | Requires: 9 | Requires.private: poppler = 0.68.0 10 | 11 | Libs: -L${libdir} -lpoppler-cpp 12 | Cflags: -I${includedir}/poppler/cpp 13 | -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/lib/pkgconfig/poppler-splash.pc: -------------------------------------------------------------------------------- 1 | prefix=C:/temp/poppler-install-dir/x86/poppler-0.69.0 2 | libdir=C:/temp/poppler-install-dir/x86/poppler-0.69.0/lib 3 | includedir=C:/temp/poppler-install-dir/x86/poppler-0.69.0/include 4 | 5 | Name: poppler-splash 6 | Description: Splash backend for Poppler PDF rendering library 7 | Version: 0.68.0 8 | Requires: poppler = 0.68.0 9 | -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/lib/pkgconfig/poppler.pc: -------------------------------------------------------------------------------- 1 | prefix=C:/temp/poppler-install-dir/x86/poppler-0.69.0 2 | libdir=C:/temp/poppler-install-dir/x86/poppler-0.69.0/lib 3 | includedir=C:/temp/poppler-install-dir/x86/poppler-0.69.0/include 4 | 5 | Name: poppler 6 | Description: PDF rendering library 7 | Version: 0.68.0 8 | 9 | Libs: -L${libdir} -lpoppler 10 | Cflags: -I${includedir}/poppler 11 | -------------------------------------------------------------------------------- /ExcelAnnotator/Util/poppler/poppler-0.68.0/share/man/man1/pdfunite.1: -------------------------------------------------------------------------------- 1 | .\" Copyright 2011 The Poppler Developers - http://poppler.freedesktop.org 2 | .TH pdfunite 1 "15 September 2011" 3 | .SH NAME 4 | pdfunite \- Portable Document Format (PDF) page merger 5 | .SH SYNOPSIS 6 | .B pdfunite 7 | [options] 8 | .I PDF-sourcefile1..PDF-sourcefilen PDF-destfile 9 | .SH DESCRIPTION 10 | .B pdfunite 11 | merges several PDF (Portable Document Format) files in order of their occurrence on command line to one PDF result file. 12 | .TP 13 | Neither of the PDF-sourcefile1 to PDF-sourcefilen should be encrypted. 14 | .SH OPTIONS 15 | .TP 16 | .B \-v 17 | Print copyright and version information. 18 | .TP 19 | .B \-h 20 | Print usage information. 21 | .RB ( \-help 22 | and 23 | .B \-\-help 24 | are equivalent.) 25 | .SH EXAMPLE 26 | pdfunite sample1.pdf sample2.pdf sample.pdf 27 | .TP 28 | merges all pages from sample1.pdf and sample2.pdf (in that order) and creates sample.pdf 29 | .SH AUTHOR 30 | The pdfunite software and documentation are copyright 1996-2004 Glyph & Cog, LLC 31 | and copyright 2005-2011 The Poppler Developers - http://poppler.freedesktop.org 32 | .SH "SEE ALSO" 33 | .BR pdfdetach (1), 34 | .BR pdffonts (1), 35 | .BR pdfimages (1), 36 | .BR pdfinfo (1), 37 | .BR pdftocairo (1), 38 | .BR pdftohtml (1), 39 | .BR pdftoppm (1), 40 | .BR pdftops (1), 41 | .BR pdftotext (1) 42 | .BR pdfseparate (1), 43 | .BR pdfsig (1) 44 | -------------------------------------------------------------------------------- /ExcelAnnotator/de_exceleration/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/de_exceleration/__init__.py -------------------------------------------------------------------------------- /ExcelAnnotator/doc_parser/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/doc_parser/__init__.py -------------------------------------------------------------------------------- /ExcelAnnotator/excel_extraction/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/excel_extraction/__init__.py -------------------------------------------------------------------------------- /ExcelAnnotator/jar/dom4j-2.1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/jar/dom4j-2.1.3.jar -------------------------------------------------------------------------------- /ExcelAnnotator/jar/poi-bin-3.17-20170915.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/jar/poi-bin-3.17-20170915.zip -------------------------------------------------------------------------------- /ExcelAnnotator/parse_helper/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/ExcelAnnotator/parse_helper/__init__.py -------------------------------------------------------------------------------- /ExcelAnnotator/parse_helper/helper.py: -------------------------------------------------------------------------------- 1 | def color2hex_rgb(color): 2 | """Transforms a color tuple (r,g,b) to rgb hex representation""" 3 | 4 | return (color[0] << 16) + (color[1] << 8) + color[2] 5 | 6 | 7 | def color2hex_bgr(color): 8 | """Transforms a color tuple (r,g,b) to bgr hex representation""" 9 | 10 | return (color[2] << 16) + (color[1] << 8) + color[0] 11 | 12 | 13 | def all_color(): 14 | """Generator for colors. Used to mark position of cell inside of table.""" 15 | 16 | for b in range(256): 17 | for g in range(256): 18 | for r in range(256): 19 | yield r, g, b 20 | 21 | # If all colors are used, we run into problems. Can be solved by introducing 'instances'. 22 | print("ERROR: Maximal color reached.") 23 | exit(1) 24 | 25 | 26 | color_iter = all_color() 27 | 28 | 29 | def next_fill_color(illegal_colors): 30 | """Get next valid color, ignores illegal colors which have been present in the document before.""" 31 | 32 | fill_color = next(color_iter) 33 | while fill_color in illegal_colors: 34 | fill_color = next(color_iter) 35 | 36 | return fill_color 37 | -------------------------------------------------------------------------------- /TableParser/detectron2/.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, C404 6 | # C404 dict comprehension ignored due to https://github.com/pytorch/pytorch/issues/41448 7 | max-line-length = 100 8 | max-complexity = 18 9 | select = B,C,E,F,W,T4,B9 10 | exclude = build 11 | per-file-ignores = 12 | **/__init__.py:F401,F403 13 | -------------------------------------------------------------------------------- /TableParser/detectron2/.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 | -------------------------------------------------------------------------------- /TableParser/detectron2/configs/Base-RCNN-FPN.yaml: -------------------------------------------------------------------------------- 1 | MODEL: 2 | META_ARCHITECTURE: "GeneralizedRCNN" 3 | BACKBONE: 4 | NAME: "build_resnet_fpn_backbone" 5 | RESNETS: 6 | OUT_FEATURES: ["res2", "res3", "res4", "res5"] 7 | FPN: 8 | IN_FEATURES: ["res2", "res3", "res4", "res5"] 9 | ANCHOR_GENERATOR: 10 | SIZES: [[32], [64], [128], [256], [512]] # One size for each in feature map 11 | ASPECT_RATIOS: [[0.5, 1.0, 2.0]] # Three aspect ratios (same for all in feature maps) 12 | RPN: 13 | IN_FEATURES: ["p2", "p3", "p4", "p5", "p6"] 14 | PRE_NMS_TOPK_TRAIN: 2000 # Per FPN level 15 | PRE_NMS_TOPK_TEST: 1000 # Per FPN level 16 | # Detectron1 uses 2000 proposals per-batch, 17 | # (See "modeling/rpn/rpn_outputs.py" for details of this legacy issue) 18 | # which is approximately 1000 proposals per-image since the default batch size for FPN is 2. 19 | POST_NMS_TOPK_TRAIN: 1000 20 | POST_NMS_TOPK_TEST: 1000 21 | ROI_HEADS: 22 | NAME: "StandardROIHeads" 23 | IN_FEATURES: ["p2", "p3", "p4", "p5"] 24 | ROI_BOX_HEAD: 25 | NAME: "FastRCNNConvFCHead" 26 | NUM_FC: 2 27 | POOLER_RESOLUTION: 7 28 | ROI_MASK_HEAD: 29 | NAME: "MaskRCNNConvUpsampleHead" 30 | NUM_CONV: 4 31 | POOLER_RESOLUTION: 14 32 | DATASETS: 33 | TRAIN: ("coco_2017_train",) 34 | TEST: ("coco_2017_val",) 35 | SOLVER: 36 | IMS_PER_BATCH: 16 37 | BASE_LR: 0.02 38 | STEPS: (60000, 80000) 39 | MAX_ITER: 90000 40 | INPUT: 41 | MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) 42 | VERSION: 2 43 | -------------------------------------------------------------------------------- /TableParser/detectron2/datasets/prepare_ade20k_sem_seg.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | # Copyright (c) Facebook, Inc. and its affiliates. 4 | import numpy as np 5 | import os 6 | from pathlib import Path 7 | import tqdm 8 | from PIL import Image 9 | 10 | 11 | def convert(input, output): 12 | img = np.asarray(Image.open(input)) 13 | assert img.dtype == np.uint8 14 | img = img - 1 # 0 (ignore) becomes 255. others are shifted by 1 15 | Image.fromarray(img).save(output) 16 | 17 | 18 | if __name__ == "__main__": 19 | dataset_dir = Path(os.getenv("DETECTRON2_DATASETS", "datasets")) / "ADEChallengeData2016" 20 | for name in ["training", "validation"]: 21 | annotation_dir = dataset_dir / "annotations" / name 22 | output_dir = dataset_dir / "annotations_detectron2" / name 23 | output_dir.mkdir(parents=True, exist_ok=True) 24 | for file in tqdm.tqdm(list(annotation_dir.iterdir())): 25 | output_file = output_dir / file.name 26 | convert(file, output_file) 27 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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.3" 11 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | 5 | __all__ = [ 6 | "CfgNode", 7 | "get_cfg", 8 | "global_cfg", 9 | "set_global_cfg", 10 | "downgrade_config", 11 | "upgrade_config", 12 | "configurable", 13 | ] 14 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/detectron2/export/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from .api import * 4 | 5 | __all__ = [k for k in globals().keys() if not k.startswith("_")] 6 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) Facebook, Inc. and its affiliates. 2 | #pragma once 3 | #include 4 | 5 | namespace detectron2 { 6 | 7 | at::Tensor box_iou_rotated_cpu( 8 | const at::Tensor& boxes1, 9 | const at::Tensor& boxes2); 10 | 11 | #if defined(WITH_CUDA) || defined(WITH_HIP) 12 | at::Tensor box_iou_rotated_cuda( 13 | const at::Tensor& boxes1, 14 | const at::Tensor& boxes2); 15 | #endif 16 | 17 | // Interface for Python 18 | // inline is needed to prevent multiple function definitions when this header is 19 | // included by different cpps 20 | inline at::Tensor box_iou_rotated( 21 | const at::Tensor& boxes1, 22 | const at::Tensor& boxes2) { 23 | assert(boxes1.device().is_cuda() == boxes2.device().is_cuda()); 24 | if (boxes1.device().is_cuda()) { 25 | #if defined(WITH_CUDA) || defined(WITH_HIP) 26 | return box_iou_rotated_cuda(boxes1.contiguous(), boxes2.contiguous()); 27 | #else 28 | AT_ERROR("Not compiled with GPU support"); 29 | #endif 30 | } 31 | 32 | return box_iou_rotated_cpu(boxes1.contiguous(), boxes2.contiguous()); 33 | } 34 | 35 | } // namespace detectron2 36 | -------------------------------------------------------------------------------- /TableParser/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cpu.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) Facebook, Inc. and its affiliates. 2 | #include "box_iou_rotated.h" 3 | #include "box_iou_rotated_utils.h" 4 | 5 | namespace detectron2 { 6 | 7 | template 8 | void box_iou_rotated_cpu_kernel( 9 | const at::Tensor& boxes1, 10 | const at::Tensor& boxes2, 11 | at::Tensor& ious) { 12 | auto num_boxes1 = boxes1.size(0); 13 | auto num_boxes2 = boxes2.size(0); 14 | 15 | for (int i = 0; i < num_boxes1; i++) { 16 | for (int j = 0; j < num_boxes2; j++) { 17 | ious[i * num_boxes2 + j] = single_box_iou_rotated( 18 | boxes1[i].data_ptr(), boxes2[j].data_ptr()); 19 | } 20 | } 21 | } 22 | 23 | at::Tensor box_iou_rotated_cpu( 24 | // input must be contiguous: 25 | const at::Tensor& boxes1, 26 | const at::Tensor& boxes2) { 27 | auto num_boxes1 = boxes1.size(0); 28 | auto num_boxes2 = boxes2.size(0); 29 | at::Tensor ious = 30 | at::empty({num_boxes1 * num_boxes2}, boxes1.options().dtype(at::kFloat)); 31 | 32 | box_iou_rotated_cpu_kernel(boxes1, boxes2, ious); 33 | 34 | // reshape from 1d array to 2d array 35 | auto shape = std::vector{num_boxes1, num_boxes2}; 36 | return ious.reshape(shape); 37 | } 38 | 39 | } // namespace detectron2 40 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) Facebook, Inc. and its affiliates. 2 | #pragma once 3 | #include 4 | 5 | namespace detectron2 { 6 | 7 | at::Tensor nms_rotated_cpu( 8 | const at::Tensor& dets, 9 | const at::Tensor& scores, 10 | const float iou_threshold); 11 | 12 | #if defined(WITH_CUDA) || defined(WITH_HIP) 13 | at::Tensor nms_rotated_cuda( 14 | const at::Tensor& dets, 15 | const at::Tensor& scores, 16 | const float iou_threshold); 17 | #endif 18 | 19 | // Interface for Python 20 | // inline is needed to prevent multiple function definitions when this header is 21 | // included by different cpps 22 | inline at::Tensor nms_rotated( 23 | const at::Tensor& dets, 24 | const at::Tensor& scores, 25 | const float iou_threshold) { 26 | assert(dets.device().is_cuda() == scores.device().is_cuda()); 27 | if (dets.device().is_cuda()) { 28 | #if defined(WITH_CUDA) || defined(WITH_HIP) 29 | return nms_rotated_cuda( 30 | dets.contiguous(), scores.contiguous(), iou_threshold); 31 | #else 32 | AT_ERROR("Not compiled with GPU support"); 33 | #endif 34 | } 35 | 36 | return nms_rotated_cpu(dets.contiguous(), scores.contiguous(), iou_threshold); 37 | } 38 | 39 | } // namespace detectron2 40 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/detectron2/modeling/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from detectron2.layers import ShapeSpec 3 | 4 | from .anchor_generator import build_anchor_generator, ANCHOR_GENERATOR_REGISTRY 5 | from .backbone import ( 6 | BACKBONE_REGISTRY, 7 | FPN, 8 | Backbone, 9 | ResNet, 10 | ResNetBlockBase, 11 | build_backbone, 12 | build_resnet_backbone, 13 | make_stage, 14 | ) 15 | from .meta_arch import ( 16 | META_ARCH_REGISTRY, 17 | SEM_SEG_HEADS_REGISTRY, 18 | GeneralizedRCNN, 19 | PanopticFPN, 20 | ProposalNetwork, 21 | RetinaNet, 22 | SemanticSegmentor, 23 | build_model, 24 | build_sem_seg_head, 25 | ) 26 | from .postprocessing import detector_postprocess 27 | from .proposal_generator import ( 28 | PROPOSAL_GENERATOR_REGISTRY, 29 | build_proposal_generator, 30 | RPN_HEAD_REGISTRY, 31 | build_rpn_head, 32 | ) 33 | from .roi_heads import ( 34 | ROI_BOX_HEAD_REGISTRY, 35 | ROI_HEADS_REGISTRY, 36 | ROI_KEYPOINT_HEAD_REGISTRY, 37 | ROI_MASK_HEAD_REGISTRY, 38 | ROIHeads, 39 | StandardROIHeads, 40 | BaseMaskRCNNHead, 41 | BaseKeypointRCNNHead, 42 | FastRCNNOutputLayers, 43 | build_box_head, 44 | build_keypoint_head, 45 | build_mask_head, 46 | build_roi_heads, 47 | ) 48 | from .test_time_augmentation import DatasetMapperTTA, GeneralizedRCNNWithTTA 49 | 50 | _EXCLUDE = {"ShapeSpec"} 51 | __all__ = [k for k in globals().keys() if k not in _EXCLUDE and not k.startswith("_")] 52 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 .resnet import ResNet, ResNetBlockBase, build_resnet_backbone, make_stage 7 | 8 | __all__ = [k for k in globals().keys() if not k.startswith("_")] 9 | # TODO can expose more resnet blocks after careful consideration 10 | -------------------------------------------------------------------------------- /TableParser/detectron2/detectron2/modeling/backbone/build.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from detectron2.layers import ShapeSpec 3 | from detectron2.utils.registry import Registry 4 | 5 | from .backbone import Backbone 6 | 7 | BACKBONE_REGISTRY = Registry("BACKBONE") 8 | BACKBONE_REGISTRY.__doc__ = """ 9 | Registry for backbones, which extract feature maps from images 10 | 11 | The registered object must be a callable that accepts two arguments: 12 | 13 | 1. A :class:`detectron2.config.CfgNode` 14 | 2. A :class:`detectron2.layers.ShapeSpec`, which contains the input shape specification. 15 | 16 | Registered object must return instance of :class:`Backbone`. 17 | """ 18 | 19 | 20 | def build_backbone(cfg, input_shape=None): 21 | """ 22 | Build a backbone from `cfg.MODEL.BACKBONE.NAME`. 23 | 24 | Returns: 25 | an instance of :class:`Backbone` 26 | """ 27 | if input_shape is None: 28 | input_shape = ShapeSpec(channels=len(cfg.MODEL.PIXEL_MEAN)) 29 | 30 | backbone_name = cfg.MODEL.BACKBONE.NAME 31 | backbone = BACKBONE_REGISTRY.get(backbone_name)(cfg, input_shape) 32 | assert isinstance(backbone, Backbone) 33 | return backbone 34 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/detectron2/modeling/meta_arch/build.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | import torch 3 | 4 | from detectron2.utils.registry import Registry 5 | 6 | META_ARCH_REGISTRY = Registry("META_ARCH") # noqa F401 isort:skip 7 | META_ARCH_REGISTRY.__doc__ = """ 8 | Registry for meta-architectures, i.e. the whole model. 9 | 10 | The registered object will be called with `obj(cfg)` 11 | and expected to return a `nn.Module` object. 12 | """ 13 | 14 | 15 | def build_model(cfg): 16 | """ 17 | Build the whole model architecture, defined by ``cfg.MODEL.META_ARCHITECTURE``. 18 | Note that it does not load any weights from ``cfg``. 19 | """ 20 | meta_arch = cfg.MODEL.META_ARCHITECTURE 21 | model = META_ARCH_REGISTRY.get(meta_arch)(cfg) 22 | model.to(torch.device(cfg.MODEL.DEVICE)) 23 | return model 24 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 4 | 5 | __all__ = list(globals().keys()) 6 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 .rotated_fast_rcnn import RROIHeads 24 | from .fast_rcnn import FastRCNNOutputLayers 25 | 26 | from . import cascade_rcnn # isort:skip 27 | 28 | __all__ = list(globals().keys()) 29 | -------------------------------------------------------------------------------- /TableParser/detectron2/detectron2/projects/README.md: -------------------------------------------------------------------------------- 1 | 2 | Projects live in the [`projects` directory](../../projects) under the root of this repository, but not here. 3 | -------------------------------------------------------------------------------- /TableParser/detectron2/detectron2/projects/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | import importlib 3 | from pathlib import Path 4 | 5 | _PROJECTS = { 6 | "point_rend": "PointRend", 7 | "deeplab": "DeepLab", 8 | "panoptic_deeplab": "Panoptic-DeepLab", 9 | } 10 | _PROJECT_ROOT = Path(__file__).parent.parent.parent / "projects" 11 | 12 | if _PROJECT_ROOT.is_dir(): 13 | # This is true only for in-place installation (pip install -e, setup.py develop), 14 | # where setup(package_dir=) does not work: https://github.com/pypa/setuptools/issues/230 15 | 16 | class _D2ProjectsFinder(importlib.abc.MetaPathFinder): 17 | def find_spec(self, name, path, target=None): 18 | if not name.startswith("detectron2.projects."): 19 | return 20 | project_name = name.split(".")[-1] 21 | project_dir = _PROJECTS.get(project_name) 22 | if not project_dir: 23 | return 24 | target_file = _PROJECT_ROOT / f"{project_dir}/{project_name}/__init__.py" 25 | if not target_file.is_file(): 26 | return 27 | return importlib.util.spec_from_file_location(name, target_file) 28 | 29 | import sys 30 | 31 | sys.meta_path.append(_D2ProjectsFinder()) 32 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 4 | 5 | __all__ = [k for k in globals().keys() if not k.startswith("_")] 6 | -------------------------------------------------------------------------------- /TableParser/detectron2/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, rasterize_polygons_within_box, polygons_to_bitmask 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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/detectron2/utils/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | -------------------------------------------------------------------------------- /TableParser/detectron2/detectron2/utils/file_io.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from iopath.common.file_io import HTTPURLHandler, OneDrivePathHandler, PathHandler 3 | from iopath.common.file_io import PathManager as PathManagerBase 4 | 5 | __all__ = ["PathManager", "PathHandler"] 6 | 7 | 8 | PathManager = PathManagerBase() 9 | """ 10 | This is a detectron2 project-specific PathManager. 11 | We try to stay away from global PathManager in fvcore as it 12 | introduces potential conflicts among other libraries. 13 | """ 14 | 15 | 16 | class Detectron2Handler(PathHandler): 17 | """ 18 | Resolve anything that's hosted under detectron2's namespace. 19 | """ 20 | 21 | PREFIX = "detectron2://" 22 | S3_DETECTRON2_PREFIX = "https://dl.fbaipublicfiles.com/detectron2/" 23 | 24 | def _get_supported_prefixes(self): 25 | return [self.PREFIX] 26 | 27 | def _get_local_path(self, path): 28 | name = path[len(self.PREFIX) :] 29 | return PathManager.get_local_path(self.S3_DETECTRON2_PREFIX + name) 30 | 31 | def _open(self, path, mode="r", **kwargs): 32 | return PathManager.open(self._get_local_path(path), mode, **kwargs) 33 | 34 | 35 | PathManager.register_handler(HTTPURLHandler()) 36 | PathManager.register_handler(OneDrivePathHandler()) 37 | PathManager.register_handler(Detectron2Handler()) 38 | -------------------------------------------------------------------------------- /TableParser/detectron2/detectron2/utils/registry.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from typing import Any 4 | import pydoc 5 | from fvcore.common.registry import Registry # for backward compatibility. 6 | 7 | """ 8 | ``Registry`` and `locate` provide ways to map a string (typically found 9 | in config files) to callable objects. 10 | """ 11 | 12 | __all__ = ["Registry", "locate"] 13 | 14 | 15 | def _convert_target_to_string(t: Any) -> Any: 16 | """ 17 | Inverse of ``locate()``. 18 | """ 19 | return f"{t.__module__}.{t.__qualname__}" 20 | 21 | 22 | def locate(name: str) -> Any: 23 | """ 24 | Locate and return an object ``x`` using an input string ``{x.__module__}.{x.__qualname__}``, 25 | such as "module.submodule.class_name". 26 | 27 | Raise Exception if it cannot be found. 28 | """ 29 | obj = pydoc.locate(name) 30 | 31 | # Some cases (e.g. torch.optim.sgd.SGD) not handled correctly 32 | # by pydoc.locate. Try a private function from hydra. 33 | # Should use _locate directly if it's public. 34 | if obj is None: 35 | try: 36 | from hydra._internal.utils import _locate 37 | except ImportError as e: 38 | raise ImportError(f"Cannot dynamically locate object {name}!") from e 39 | else: 40 | obj = _locate(name) # it raises if fails 41 | 42 | return obj 43 | -------------------------------------------------------------------------------- /TableParser/detectron2/detectron2/utils/serialize.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | import cloudpickle 3 | 4 | 5 | class PicklableWrapper(object): 6 | """ 7 | Wrap an object to make it more picklable, note that it uses 8 | heavy weight serialization libraries that are slower than pickle. 9 | It's best to use it only on closures (which are usually not picklable). 10 | 11 | This is a simplified version of 12 | https://github.com/joblib/joblib/blob/master/joblib/externals/loky/cloudpickle_wrapper.py 13 | """ 14 | 15 | def __init__(self, obj): 16 | self._obj = obj 17 | 18 | def __reduce__(self): 19 | s = cloudpickle.dumps(self._obj) 20 | return cloudpickle.loads, (s,) 21 | 22 | def __call__(self, *args, **kwargs): 23 | return self._obj(*args, **kwargs) 24 | 25 | def __getattr__(self, attr): 26 | # Ensure that the wrapped object can be used seamlessly as the previous object. 27 | if attr not in ["_obj"]: 28 | return getattr(self._obj, attr) 29 | return getattr(self, attr) 30 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/dev/linter.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | 4 | # Run this script at project root by "./dev/linter.sh" before you commit 5 | 6 | { 7 | black --version | grep -E "20.8b1" > /dev/null 8 | } || { 9 | echo "Linter requires 'black==20.8b1' !" 10 | exit 1 11 | } 12 | 13 | ISORT_VERSION=$(isort --version-number) 14 | if [[ "$ISORT_VERSION" != 4.3* ]]; then 15 | echo "Linter requires isort==4.3.21 !" 16 | exit 1 17 | fi 18 | 19 | set -v 20 | 21 | echo "Running isort ..." 22 | isort -y -sp . --atomic 23 | 24 | echo "Running black ..." 25 | black -l 100 . 26 | 27 | echo "Running flake8 ..." 28 | if [ -x "$(command -v flake8-3)" ]; then 29 | flake8-3 . 30 | else 31 | python3 -m flake8 . 32 | fi 33 | 34 | # echo "Running mypy ..." 35 | # Pytorch does not have enough type annotations 36 | # mypy detectron2/solver detectron2/structures detectron2/config 37 | 38 | echo "Running clang-format ..." 39 | find . -regex ".*\.\(cpp\|c\|cc\|cu\|cxx\|h\|hh\|hpp\|hxx\|tcc\|mm\|m\)" -print0 | xargs -0 clang-format -i 40 | 41 | command -v arc > /dev/null && arc lint 42 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/dev/packaging/build_all_wheels.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | 4 | [[ -d "dev/packaging" ]] || { 5 | echo "Please run this script at detectron2 root!" 6 | exit 1 7 | } 8 | 9 | build_one() { 10 | cu=$1 11 | pytorch_ver=$2 12 | 13 | case "$cu" in 14 | cu*) 15 | container_name=manylinux-cuda${cu/cu/} 16 | ;; 17 | cpu) 18 | container_name=manylinux-cuda101 19 | ;; 20 | *) 21 | echo "Unrecognized cu=$cu" 22 | exit 1 23 | ;; 24 | esac 25 | 26 | echo "Launching container $container_name ..." 27 | 28 | for py in 3.6 3.7 3.8; do 29 | docker run -itd \ 30 | --name $container_name \ 31 | --mount type=bind,source="$(pwd)",target=/detectron2 \ 32 | pytorch/$container_name 33 | 34 | cat </dev/null 2>&1 && pwd )" 8 | . "$script_dir/pkg_helpers.bash" 9 | 10 | echo "Build Settings:" 11 | echo "CU_VERSION: $CU_VERSION" # e.g. cu101 12 | echo "D2_VERSION_SUFFIX: $D2_VERSION_SUFFIX" # e.g. +cu101 or "" 13 | echo "PYTHON_VERSION: $PYTHON_VERSION" # e.g. 3.6 14 | echo "PYTORCH_VERSION: $PYTORCH_VERSION" # e.g. 1.4 15 | 16 | setup_cuda 17 | setup_wheel_python 18 | 19 | yum install ninja-build -y 20 | ln -sv /usr/bin/ninja-build /usr/bin/ninja || true 21 | 22 | pip_install pip numpy -U 23 | pip_install "torch==$PYTORCH_VERSION" \ 24 | -f https://download.pytorch.org/whl/"$CU_VERSION"/torch_stable.html 25 | 26 | # use separate directories to allow parallel build 27 | BASE_BUILD_DIR=build/$CU_VERSION-py$PYTHON_VERSION-pt$PYTORCH_VERSION 28 | python setup.py \ 29 | build -b "$BASE_BUILD_DIR" \ 30 | bdist_wheel -b "$BASE_BUILD_DIR/build_dist" -d "wheels/$CU_VERSION/torch$PYTORCH_VERSION" 31 | rm -rf "$BASE_BUILD_DIR" 32 | -------------------------------------------------------------------------------- /TableParser/detectron2/dev/packaging/gen_wheel_index.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | 4 | 5 | root=$1 6 | if [[ -z "$root" ]]; then 7 | echo "Usage: ./gen_wheel_index.sh /path/to/wheels" 8 | exit 9 | fi 10 | 11 | export LC_ALL=C # reproducible sort 12 | # NOTE: all sort in this script might not work when xx.10 is released 13 | 14 | index=$root/index.html 15 | 16 | cd "$root" 17 | for cu in cpu cu92 cu100 cu101 cu102 cu110; do 18 | cd "$root/$cu" 19 | echo "Creating $PWD/index.html ..." 20 | # First sort by torch version, then stable sort by d2 version with unique. 21 | # As a result, the latest torch version for each d2 version is kept. 22 | for whl in $(find -type f -name '*.whl' -printf '%P\n' \ 23 | | sort -k 1 -r | sort -t '/' -k 2 --stable -r --unique); do 24 | echo "$whl
" 25 | done > index.html 26 | 27 | 28 | for torch in torch*; do 29 | cd "$root/$cu/$torch" 30 | 31 | # list all whl for each cuda,torch version 32 | echo "Creating $PWD/index.html ..." 33 | for whl in $(find . -type f -name '*.whl' -printf '%P\n' | sort -r); do 34 | echo "$whl
" 35 | done > index.html 36 | done 37 | done 38 | 39 | cd "$root" 40 | # Just list everything: 41 | echo "Creating $index ..." 42 | for whl in $(find . -type f -name '*.whl' -printf '%P\n' | sort -r); do 43 | echo "$whl
" 44 | done > "$index" 45 | 46 | -------------------------------------------------------------------------------- /TableParser/detectron2/dev/run_inference_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | 4 | BIN="python tools/train_net.py" 5 | OUTPUT="inference_test_output" 6 | NUM_GPUS=2 7 | 8 | CFG_LIST=( "${@:1}" ) 9 | 10 | if [ ${#CFG_LIST[@]} -eq 0 ]; then 11 | CFG_LIST=( ./configs/quick_schedules/*inference_acc_test.yaml ) 12 | fi 13 | 14 | echo "========================================================================" 15 | echo "Configs to run:" 16 | echo "${CFG_LIST[@]}" 17 | echo "========================================================================" 18 | 19 | 20 | for cfg in "${CFG_LIST[@]}"; do 21 | echo "========================================================================" 22 | echo "Running $cfg ..." 23 | echo "========================================================================" 24 | $BIN \ 25 | --eval-only \ 26 | --num-gpus $NUM_GPUS \ 27 | --config-file "$cfg" \ 28 | OUTPUT_DIR $OUTPUT 29 | rm -rf $OUTPUT 30 | done 31 | 32 | 33 | echo "========================================================================" 34 | echo "Running demo.py ..." 35 | echo "========================================================================" 36 | DEMO_BIN="python demo/demo.py" 37 | COCO_DIR=datasets/coco/val2014 38 | mkdir -pv $OUTPUT 39 | 40 | set -v 41 | 42 | $DEMO_BIN --config-file ./configs/quick_schedules/panoptic_fpn_R_50_inference_acc_test.yaml \ 43 | --input $COCO_DIR/COCO_val2014_0000001933* --output $OUTPUT 44 | rm -rf $OUTPUT 45 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/docker/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Use the container (with docker ≥ 19.03) 3 | 4 | ``` 5 | cd docker/ 6 | # Build: 7 | docker build --build-arg USER_ID=$UID -t detectron2:v0 . 8 | # Launch: 9 | docker run --gpus all -it \ 10 | --shm-size=8gb --env="DISPLAY" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \ 11 | --name=detectron2 detectron2:v0 12 | 13 | # Grant docker access to host X server to show images 14 | xhost +local:`docker inspect --format='{{ .Config.Hostname }}' detectron2` 15 | ``` 16 | 17 | ## Use the container (with docker < 19.03) 18 | 19 | Install docker-compose and nvidia-docker2, then run: 20 | ``` 21 | cd docker && USER_ID=$UID docker-compose run detectron2 22 | ``` 23 | 24 | ## Use the deployment container (to test C++ examples) 25 | After building the base detectron2 container as above, do: 26 | ``` 27 | # Build: 28 | docker build -t detectron2-deploy:v0 -f deploy.Dockerfile 29 | # Launch: 30 | docker run --gpus all -it detectron2-deploy:v0 31 | ``` 32 | 33 | #### Using a persistent cache directory 34 | 35 | You can prevent models from being re-downloaded on every run, 36 | by storing them in a cache directory. 37 | 38 | To do this, add `--volume=$HOME/.torch/fvcore_cache:/tmp:rw` in the run command. 39 | 40 | ## Install new dependencies 41 | Add the following to `Dockerfile` to make persistent changes. 42 | ``` 43 | RUN sudo apt-get update && sudo apt-get install -y vim 44 | ``` 45 | Or run them in the container to make temporary changes. 46 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | runtime: nvidia # TODO: Exchange with "gpu: all" in the future (see https://github.com/facebookresearch/detectron2/pull/197/commits/00545e1f376918db4a8ce264d427a07c1e896c5a). 10 | shm_size: "8gb" 11 | ulimits: 12 | memlock: -1 13 | stack: 67108864 14 | volumes: 15 | - /tmp/.X11-unix:/tmp/.X11-unix:ro 16 | environment: 17 | - DISPLAY=$DISPLAY 18 | - NVIDIA_VISIBLE_DEVICES=all 19 | -------------------------------------------------------------------------------- /TableParser/detectron2/docs/.gitignore: -------------------------------------------------------------------------------- 1 | _build 2 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | div.section > details { 24 | padding-bottom: 1em; 25 | } 26 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/docs/modules/checkpoint.rst: -------------------------------------------------------------------------------- 1 | detectron2.checkpoint 2 | ============================= 3 | 4 | .. automodule:: detectron2.checkpoint 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | 39 | 40 | detectron2.data.transforms module 41 | --------------------------------------- 42 | 43 | .. automodule:: detectron2.data.transforms 44 | :members: 45 | :undoc-members: 46 | :show-inheritance: 47 | :imported-members: 48 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/docs/modules/evaluation.rst: -------------------------------------------------------------------------------- 1 | detectron2.evaluation 2 | ============================= 3 | 4 | .. automodule:: detectron2.evaluation 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/docs/modules/fvcore.rst: -------------------------------------------------------------------------------- 1 | fvcore documentation 2 | ==================== 3 | 4 | Detectron2 depends on utilities in 5 | `fvcore `_. 6 | We include part of fvcore documentation here for easier reference. 7 | 8 | fvcore.nn 9 | ----------------- 10 | 11 | .. automodule:: fvcore.nn 12 | :members: 13 | :undoc-members: 14 | :show-inheritance: 15 | 16 | fvcore.common 17 | --------------------- 18 | 19 | .. automodule:: fvcore.common.checkpoint 20 | :members: 21 | :undoc-members: 22 | :show-inheritance: 23 | 24 | .. automodule:: fvcore.common.config 25 | :members: 26 | :undoc-members: 27 | :show-inheritance: 28 | 29 | .. automodule:: fvcore.common.history_buffer 30 | :members: 31 | :undoc-members: 32 | :show-inheritance: 33 | 34 | .. automodule:: fvcore.common.registry 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | 39 | .. automodule:: fvcore.common.timer 40 | :members: 41 | :undoc-members: 42 | :show-inheritance: 43 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/docs/modules/layers.rst: -------------------------------------------------------------------------------- 1 | detectron2.layers 2 | ========================= 3 | 4 | .. automodule:: detectron2.layers 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/docs/modules/solver.rst: -------------------------------------------------------------------------------- 1 | detectron2.solver 2 | ========================= 3 | 4 | .. automodule:: detectron2.solver 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /TableParser/detectron2/docs/modules/structures.rst: -------------------------------------------------------------------------------- 1 | detectron2.structures 2 | ============================= 3 | 4 | .. automodule:: detectron2.structures 5 | :members: 6 | :undoc-members: 7 | :show-inheritance: 8 | -------------------------------------------------------------------------------- /TableParser/detectron2/docs/notes/contributing.md: -------------------------------------------------------------------------------- 1 | ../../.github/CONTRIBUTING.md -------------------------------------------------------------------------------- /TableParser/detectron2/docs/notes/index.rst: -------------------------------------------------------------------------------- 1 | Notes 2 | ====================================== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | benchmarks 8 | compatibility 9 | contributing 10 | changelog 11 | -------------------------------------------------------------------------------- /TableParser/detectron2/docs/requirements.txt: -------------------------------------------------------------------------------- 1 | termcolor 2 | numpy 3 | tqdm 4 | docutils==0.16 5 | # https://github.com/sphinx-doc/sphinx/commit/7acd3ada3f38076af7b2b5c9f3b60bb9c2587a3d 6 | git+git://github.com/sphinx-doc/sphinx.git@7acd3ada3f38076af7b2b5c9f3b60bb9c2587a3d 7 | recommonmark==0.6.0 8 | sphinx_rtd_theme 9 | matplotlib 10 | termcolor 11 | yacs 12 | tabulate 13 | cloudpickle 14 | Pillow 15 | future 16 | requests 17 | six 18 | git+git://github.com/facebookresearch/fvcore.git 19 | https://download.pytorch.org/whl/cpu/torch-1.5.0%2Bcpu-cp37-cp37m-linux_x86_64.whl 20 | https://download.pytorch.org/whl/cpu/torchvision-0.6.0%2Bcpu-cp37-cp37m-linux_x86_64.whl 21 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/docs/tutorials/builtin_datasets.md: -------------------------------------------------------------------------------- 1 | ../../datasets/README.md -------------------------------------------------------------------------------- /TableParser/detectron2/docs/tutorials/getting_started.md: -------------------------------------------------------------------------------- 1 | ../../GETTING_STARTED.md -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/docs/tutorials/install.md: -------------------------------------------------------------------------------- 1 | ../../INSTALL.md -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DeepLab/configs/Cityscapes-SemanticSegmentation/Base-DeepLabV3-OS16-Semantic.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "../../../../configs/Base-RCNN-DilatedC5.yaml" 2 | MODEL: 3 | META_ARCHITECTURE: "SemanticSegmentor" 4 | BACKBONE: 5 | FREEZE_AT: 0 6 | SEM_SEG_HEAD: 7 | NAME: "DeepLabV3Head" 8 | IN_FEATURES: ["res5"] 9 | ASPP_CHANNELS: 256 10 | ASPP_DILATIONS: [6, 12, 18] 11 | ASPP_DROPOUT: 0.1 12 | CONVS_DIM: 256 13 | COMMON_STRIDE: 16 14 | NUM_CLASSES: 19 15 | LOSS_TYPE: "hard_pixel_mining" 16 | DATASETS: 17 | TRAIN: ("cityscapes_fine_sem_seg_train",) 18 | TEST: ("cityscapes_fine_sem_seg_val",) 19 | SOLVER: 20 | BASE_LR: 0.01 21 | MAX_ITER: 90000 22 | LR_SCHEDULER_NAME: "WarmupPolyLR" 23 | IMS_PER_BATCH: 16 24 | INPUT: 25 | MIN_SIZE_TRAIN: (512, 768, 1024, 1280, 1536, 1792, 2048) 26 | MIN_SIZE_TRAIN_SAMPLING: "choice" 27 | MIN_SIZE_TEST: 1024 28 | MAX_SIZE_TRAIN: 4096 29 | MAX_SIZE_TEST: 2048 30 | CROP: 31 | ENABLED: True 32 | TYPE: "absolute" 33 | SIZE: (512, 1024) 34 | SINGLE_CATEGORY_MAX_AREA: 1.0 35 | DATALOADER: 36 | NUM_WORKERS: 10 37 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DeepLab/deeplab/build_solver.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | import torch 3 | 4 | from detectron2.config import CfgNode 5 | from detectron2.solver import build_lr_scheduler as build_d2_lr_scheduler 6 | 7 | from .lr_scheduler import WarmupPolyLR 8 | 9 | 10 | def build_lr_scheduler( 11 | cfg: CfgNode, optimizer: torch.optim.Optimizer 12 | ) -> torch.optim.lr_scheduler._LRScheduler: 13 | """ 14 | Build a LR scheduler from config. 15 | """ 16 | name = cfg.SOLVER.LR_SCHEDULER_NAME 17 | if name == "WarmupPolyLR": 18 | return WarmupPolyLR( 19 | optimizer, 20 | cfg.SOLVER.MAX_ITER, 21 | warmup_factor=cfg.SOLVER.WARMUP_FACTOR, 22 | warmup_iters=cfg.SOLVER.WARMUP_ITERS, 23 | warmup_method=cfg.SOLVER.WARMUP_METHOD, 24 | power=cfg.SOLVER.POLY_LR_POWER, 25 | constant_ending=cfg.SOLVER.POLY_LR_CONSTANT_ENDING, 26 | ) 27 | else: 28 | return build_d2_lr_scheduler(cfg, optimizer) 29 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DeepLab/deeplab/config.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | 4 | 5 | def add_deeplab_config(cfg): 6 | """ 7 | Add config for DeepLab. 8 | """ 9 | # We retry random cropping until no single category in semantic segmentation GT occupies more 10 | # than `SINGLE_CATEGORY_MAX_AREA` part of the crop. 11 | cfg.INPUT.CROP.SINGLE_CATEGORY_MAX_AREA = 1.0 12 | # Used for `poly` learning rate schedule. 13 | cfg.SOLVER.POLY_LR_POWER = 0.9 14 | cfg.SOLVER.POLY_LR_CONSTANT_ENDING = 0.0 15 | # Loss type, choose from `cross_entropy`, `hard_pixel_mining`. 16 | cfg.MODEL.SEM_SEG_HEAD.LOSS_TYPE = "hard_pixel_mining" 17 | # DeepLab settings 18 | cfg.MODEL.SEM_SEG_HEAD.PROJECT_FEATURES = ["res2"] 19 | cfg.MODEL.SEM_SEG_HEAD.PROJECT_CHANNELS = [48] 20 | cfg.MODEL.SEM_SEG_HEAD.ASPP_CHANNELS = 256 21 | cfg.MODEL.SEM_SEG_HEAD.ASPP_DILATIONS = [6, 12, 18] 22 | cfg.MODEL.SEM_SEG_HEAD.ASPP_DROPOUT = 0.1 23 | cfg.MODEL.SEM_SEG_HEAD.USE_DEPTHWISE_SEPARABLE_CONV = False 24 | # Backbone new configs 25 | cfg.MODEL.RESNETS.RES4_DILATION = 1 26 | cfg.MODEL.RESNETS.RES5_MULTI_GRID = [1, 2, 4] 27 | # ResNet stem type from: `basic`, `deeplab` 28 | cfg.MODEL.RESNETS.STEM_TYPE = "deeplab" 29 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/cse/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 | CSE: 9 | EMBED_LOSS_NAME: "EmbeddingLoss" 10 | SOLVER: 11 | MAX_ITER: 130000 12 | STEPS: (100000, 120000) 13 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/cse/densepose_rcnn_R_101_FPN_DL_soft_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 | CSE: 9 | EMBED_LOSS_NAME: "SoftEmbeddingLoss" 10 | SOLVER: 11 | MAX_ITER: 130000 12 | STEPS: (100000, 120000) 13 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/cse/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 | ROI_DENSEPOSE_HEAD: 7 | NAME: "DensePoseV1ConvXHead" 8 | CSE: 9 | EMBED_LOSS_NAME: "EmbeddingLoss" 10 | SOLVER: 11 | MAX_ITER: 130000 12 | STEPS: (100000, 120000) 13 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/cse/densepose_rcnn_R_101_FPN_soft_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: "DensePoseV1ConvXHead" 8 | CSE: 9 | EMBED_LOSS_NAME: "SoftEmbeddingLoss" 10 | SOLVER: 11 | MAX_ITER: 130000 12 | STEPS: (100000, 120000) 13 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/cse/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 | CSE: 9 | EMBED_LOSS_NAME: "EmbeddingLoss" 10 | SOLVER: 11 | MAX_ITER: 130000 12 | STEPS: (100000, 120000) 13 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/cse/densepose_rcnn_R_50_FPN_DL_soft_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 | CSE: 9 | EMBED_LOSS_NAME: "SoftEmbeddingLoss" 10 | SOLVER: 11 | MAX_ITER: 130000 12 | STEPS: (100000, 120000) 13 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/cse/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 | ROI_DENSEPOSE_HEAD: 7 | NAME: "DensePoseV1ConvXHead" 8 | CSE: 9 | EMBED_LOSS_NAME: "EmbeddingLoss" 10 | SOLVER: 11 | MAX_ITER: 130000 12 | STEPS: (100000, 120000) 13 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/cse/densepose_rcnn_R_50_FPN_soft_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: "DensePoseV1ConvXHead" 8 | CSE: 9 | EMBED_LOSS_NAME: "SoftEmbeddingLoss" 10 | SOLVER: 11 | MAX_ITER: 130000 12 | STEPS: (100000, 120000) 13 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/evolution/densepose_R_101_FPN_1x_Atop10_toP.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-RCNN-FPN-MC.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 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: "DensePoseV1ConvXHead" 13 | POOLER_TYPE: "ROIAlign" 14 | NUM_COARSE_SEGM_CHANNELS: 2 15 | COARSE_SEGM_TRAINED_BY_MASKS: True 16 | INDEX_WEIGHTS: 1.0 17 | DATASETS: 18 | TRAIN: ("base_coco_2017_train", "densepose_coco_2014_train") 19 | TEST: ("densepose_chimps",) 20 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/evolution/densepose_R_101_FPN_DL_1x_Atop10_toP.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-RCNN-FPN-MC.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 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 | POOLER_TYPE: "ROIAlign" 14 | NUM_COARSE_SEGM_CHANNELS: 2 15 | COARSE_SEGM_TRAINED_BY_MASKS: True 16 | INDEX_WEIGHTS: 1.0 17 | DATASETS: 18 | TRAIN: ("base_coco_2017_train", "densepose_coco_2014_train") 19 | TEST: ("densepose_chimps",) 20 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/evolution/densepose_R_101_FPN_DL_WC1M_1x_Atop10_toP.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-RCNN-FPN-MC.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 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 | DATASETS: 28 | TRAIN: ("base_coco_2017_train", "densepose_coco_2014_train") 29 | TEST: ("densepose_chimps",) 30 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/evolution/densepose_R_101_FPN_DL_WC1_1x_Atop10_toP.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-RCNN-FPN-MC.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 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 | POINT_REGRESSION_WEIGHTS: 0.0005 17 | POOLER_TYPE: "ROIAlign" 18 | NUM_COARSE_SEGM_CHANNELS: 2 19 | COARSE_SEGM_TRAINED_BY_MASKS: True 20 | INDEX_WEIGHTS: 1.0 21 | SOLVER: 22 | CLIP_GRADIENTS: 23 | ENABLED: True 24 | WARMUP_FACTOR: 0.025 25 | DATASETS: 26 | TRAIN: ("base_coco_2017_train", "densepose_coco_2014_train") 27 | TEST: ("densepose_chimps",) 28 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/evolution/densepose_R_101_FPN_WC1M_1x_Atop10_toP.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-RCNN-FPN-MC.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 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: "DensePoseV1ConvXHead" 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 | DATASETS: 28 | TRAIN: ("base_coco_2017_train", "densepose_coco_2014_train") 29 | TEST: ("densepose_chimps",) 30 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/evolution/densepose_R_101_FPN_WC1_1x_Atop10_toP.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-RCNN-FPN-MC.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" 4 | RESNETS: 5 | DEPTH: 101 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: "DensePoseV1ConvXHead" 13 | UV_CONFIDENCE: 14 | ENABLED: True 15 | TYPE: "iid_iso" 16 | POINT_REGRESSION_WEIGHTS: 0.0005 17 | POOLER_TYPE: "ROIAlign" 18 | NUM_COARSE_SEGM_CHANNELS: 2 19 | COARSE_SEGM_TRAINED_BY_MASKS: True 20 | INDEX_WEIGHTS: 1.0 21 | SOLVER: 22 | CLIP_GRADIENTS: 23 | ENABLED: True 24 | WARMUP_FACTOR: 0.025 25 | DATASETS: 26 | TRAIN: ("base_coco_2017_train", "densepose_coco_2014_train") 27 | TEST: ("densepose_chimps",) 28 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/evolution/densepose_R_50_FPN_1x_Atop10_toP.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-RCNN-FPN-MC.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: "DensePoseV1ConvXHead" 13 | POOLER_TYPE: "ROIAlign" 14 | NUM_COARSE_SEGM_CHANNELS: 2 15 | COARSE_SEGM_TRAINED_BY_MASKS: True 16 | INDEX_WEIGHTS: 1.0 17 | DATASETS: 18 | TRAIN: ("base_coco_2017_train", "densepose_coco_2014_train") 19 | TEST: ("densepose_chimps",) 20 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/evolution/densepose_R_50_FPN_DL_1x_Atop10_toP.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-RCNN-FPN-MC.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 | POOLER_TYPE: "ROIAlign" 14 | NUM_COARSE_SEGM_CHANNELS: 2 15 | COARSE_SEGM_TRAINED_BY_MASKS: True 16 | INDEX_WEIGHTS: 1.0 17 | DATASETS: 18 | TRAIN: ("base_coco_2017_train", "densepose_coco_2014_train") 19 | TEST: ("densepose_chimps",) 20 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/evolution/densepose_R_50_FPN_DL_WC1M_1x_Atop10_toP.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-RCNN-FPN-MC.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 | DATASETS: 28 | TRAIN: ("base_coco_2017_train", "densepose_coco_2014_train") 29 | TEST: ("densepose_chimps",) 30 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/evolution/densepose_R_50_FPN_DL_WC1_1x_Atop10_toP.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-RCNN-FPN-MC.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 | POINT_REGRESSION_WEIGHTS: 0.0005 17 | POOLER_TYPE: "ROIAlign" 18 | NUM_COARSE_SEGM_CHANNELS: 2 19 | COARSE_SEGM_TRAINED_BY_MASKS: True 20 | INDEX_WEIGHTS: 1.0 21 | SOLVER: 22 | CLIP_GRADIENTS: 23 | ENABLED: True 24 | WARMUP_FACTOR: 0.025 25 | DATASETS: 26 | TRAIN: ("base_coco_2017_train", "densepose_coco_2014_train") 27 | TEST: ("densepose_chimps",) 28 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/evolution/densepose_R_50_FPN_WC1M_1x_Atop10_toP.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-RCNN-FPN-MC.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: "DensePoseV1ConvXHead" 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 | DATASETS: 28 | TRAIN: ("base_coco_2017_train", "densepose_coco_2014_train") 29 | TEST: ("densepose_chimps",) 30 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/evolution/densepose_R_50_FPN_WC1M_1x_Atop10_toP_B.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-RCNN-FPN-MC-B.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: "DensePoseV1ConvXHead" 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 | CLIP_TYPE: "norm" 27 | WARMUP_FACTOR: 0.025 28 | DATASETS: 29 | TRAIN: ("base_coco_2017_train", "densepose_coco_2014_train") 30 | TEST: ("densepose_chimps",) 31 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/evolution/densepose_R_50_FPN_WC1_1x_Atop10_toP.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-RCNN-FPN-MC.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: "DensePoseV1ConvXHead" 13 | UV_CONFIDENCE: 14 | ENABLED: True 15 | TYPE: "iid_iso" 16 | POINT_REGRESSION_WEIGHTS: 0.0005 17 | POOLER_TYPE: "ROIAlign" 18 | NUM_COARSE_SEGM_CHANNELS: 2 19 | COARSE_SEGM_TRAINED_BY_MASKS: True 20 | INDEX_WEIGHTS: 1.0 21 | SOLVER: 22 | CLIP_GRADIENTS: 23 | ENABLED: True 24 | WARMUP_FACTOR: 0.025 25 | DATASETS: 26 | TRAIN: ("base_coco_2017_train", "densepose_coco_2014_train") 27 | TEST: ("densepose_chimps",) 28 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/configs/evolution/faster_rcnn_R_50_FPN_1x_MC.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: "Base-RCNN-FPN-MC.yaml" 2 | MODEL: 3 | WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" 4 | MASK_ON: False 5 | DENSEPOSE_ON: False 6 | RESNETS: 7 | DEPTH: 50 8 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 .data.structures import DensePoseDataRelative, DensePoseList, DensePoseTransformData 13 | from .modeling.roi_heads import DensePoseROIHeads 14 | from .modeling.test_time_augmentation import ( 15 | DensePoseGeneralizedRCNNWithTTA, 16 | DensePoseDatasetMapperTTA, 17 | ) 18 | from .utils.transform import load_from_cfg 19 | from .modeling.hrfpn import build_hrfpn_backbone 20 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | resample_fine_and_coarse_segm_to_bbox, 9 | ) 10 | from .chart_output_to_chart_result import ( 11 | densepose_chart_predictor_output_to_result, 12 | densepose_chart_predictor_output_to_result_with_confidences, 13 | ) 14 | from .chart_output_hflip import densepose_chart_predictor_output_hflip 15 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/densepose/converters/builtin.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from ..structures import DensePoseChartPredictorOutput 4 | from . import ( 5 | HFlipConverter, 6 | ToChartResultConverter, 7 | ToChartResultConverterWithConfidences, 8 | ToMaskConverter, 9 | densepose_chart_predictor_output_hflip, 10 | densepose_chart_predictor_output_to_result, 11 | densepose_chart_predictor_output_to_result_with_confidences, 12 | predictor_output_with_fine_and_coarse_segm_to_mask, 13 | ) 14 | 15 | ToMaskConverter.register( 16 | DensePoseChartPredictorOutput, predictor_output_with_fine_and_coarse_segm_to_mask 17 | ) 18 | 19 | ToChartResultConverter.register( 20 | DensePoseChartPredictorOutput, densepose_chart_predictor_output_to_result 21 | ) 22 | 23 | ToChartResultConverterWithConfidences.register( 24 | DensePoseChartPredictorOutput, densepose_chart_predictor_output_to_result_with_confidences 25 | ) 26 | 27 | HFlipConverter.register(DensePoseChartPredictorOutput, densepose_chart_predictor_output_hflip) 28 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/densepose/converters/hflip.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from typing import Any 4 | 5 | from .base import BaseConverter 6 | 7 | 8 | class HFlipConverter(BaseConverter): 9 | """ 10 | Converts various DensePose predictor outputs to DensePose results. 11 | Each DensePose predictor output type has to register its convertion strategy. 12 | """ 13 | 14 | registry = {} 15 | dst_type = None 16 | 17 | @classmethod 18 | def convert(cls, predictor_outputs: Any, transform_data: Any, *args, **kwargs): 19 | """ 20 | Performs an horizontal flip on DensePose predictor outputs. 21 | Does recursive lookup for base classes, so there's no need 22 | for explicit registration for derived classes. 23 | 24 | Args: 25 | predictor_outputs: DensePose predictor output to be converted to BitMasks 26 | transform_data: Anything useful for the flip 27 | Return: 28 | An instance of the same type as predictor_outputs 29 | """ 30 | return super(HFlipConverter, cls).convert( 31 | predictor_outputs, transform_data, *args, **kwargs 32 | ) 33 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 .utils import is_relative_local_path, maybe_prepend_base_path 17 | 18 | # ensure the builtin datasets are registered 19 | from . import datasets 20 | 21 | # ensure the bootstrap datasets builders are registered 22 | from . import build 23 | 24 | __all__ = [k for k in globals().keys() if not k.startswith("_")] 25 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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) 17 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/densepose/data/datasets/chimpnsee.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | import os 4 | from typing import Optional 5 | 6 | from detectron2.data import DatasetCatalog, MetadataCatalog 7 | 8 | from ..utils import maybe_prepend_base_path 9 | from .dataset_type import DatasetType 10 | 11 | CHIMPNSEE_DATASET_NAME = "chimpnsee" 12 | 13 | 14 | def register_dataset(datasets_root: Optional[os.PathLike] = None): 15 | def empty_load_callback(): 16 | pass 17 | 18 | video_list_fpath = maybe_prepend_base_path( 19 | datasets_root, "chimpnsee/cdna.eva.mpg.de/video_list.txt" 20 | ) 21 | video_base_path = maybe_prepend_base_path(datasets_root, "chimpnsee/cdna.eva.mpg.de") 22 | 23 | DatasetCatalog.register(CHIMPNSEE_DATASET_NAME, empty_load_callback) 24 | MetadataCatalog.get(CHIMPNSEE_DATASET_NAME).set( 25 | dataset_type=DatasetType.VIDEO_LIST, 26 | video_list_fpath=video_list_fpath, 27 | video_base_path=video_base_path, 28 | ) 29 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 .mask_from_densepose import MaskFromDensePoseSampler 6 | from .prediction_to_gt import PredictionToGroundTruthSampler 7 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/densepose/data/samplers/densepose_uniform.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | import random 4 | import torch 5 | 6 | from .densepose_base import DensePoseBaseSampler 7 | 8 | 9 | class DensePoseUniformSampler(DensePoseBaseSampler): 10 | """ 11 | Samples DensePose data from DensePose predictions. 12 | Samples for each class are drawn uniformly over all pixels estimated 13 | to belong to that class. 14 | """ 15 | 16 | def __init__(self, count_per_class: int = 8): 17 | """ 18 | Constructor 19 | 20 | Args: 21 | count_per_class (int): the sampler produces at most `count_per_class` 22 | samples for each category 23 | """ 24 | super().__init__(count_per_class) 25 | 26 | def _produce_index_sample(self, values: torch.Tensor, count: int): 27 | """ 28 | Produce a uniform sample of indices to select data 29 | 30 | Args: 31 | values (torch.Tensor): an array of size [n, k] that contains 32 | estimated values (U, V, confidences); 33 | n: number of channels (U, V, confidences) 34 | k: number of points labeled with part_id 35 | count (int): number of samples to produce, should be positive and <= k 36 | 37 | Return: 38 | list(int): indices of values (along axis 1) selected as a sample 39 | """ 40 | k = values.shape[1] 41 | return random.sample(range(k), count) 42 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/densepose/data/samplers/mask_from_densepose.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from detectron2.structures import BitMasks, Instances 4 | 5 | from densepose.converters import ToMaskConverter 6 | 7 | 8 | class MaskFromDensePoseSampler: 9 | """ 10 | Produce mask GT from DensePose predictions 11 | This sampler simply converts DensePose predictions to BitMasks 12 | that a contain a bool tensor of the size of the input image 13 | """ 14 | 15 | def __call__(self, instances: Instances) -> BitMasks: 16 | """ 17 | Converts predicted data from `instances` into the GT mask data 18 | 19 | Args: 20 | instances (Instances): predicted results, expected to have `pred_densepose` field 21 | 22 | Returns: 23 | Boolean Tensor of the size of the input image that has non-zero 24 | values at pixels that are estimated to belong to the detected object 25 | """ 26 | return ToMaskConverter.convert( 27 | instances.pred_densepose, instances.pred_boxes, instances.image_size 28 | ) 29 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/densepose/data/transform/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from .image import ImageResizeTransform 4 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/densepose/data/utils.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | import os 4 | from typing import Optional 5 | 6 | 7 | def is_relative_local_path(path: os.PathLike): 8 | path_str = os.fsdecode(path) 9 | return ("://" not in path_str) and not os.path.isabs(path) 10 | 11 | 12 | def maybe_prepend_base_path(base_path: Optional[os.PathLike], path: os.PathLike): 13 | """ 14 | Prepends the provided path with a base path prefix if: 15 | 1) base path is not None; 16 | 2) path is a local path 17 | """ 18 | if base_path is None: 19 | return path 20 | if is_relative_local_path(path): 21 | return os.path.join(base_path, path) 22 | return path 23 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/densepose/engine/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from .trainer import Trainer 4 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/densepose/evaluation/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | from .evaluator import DensePoseCOCOEvaluator 4 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/densepose/modeling/cse/utils.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | 3 | import torch 4 | 5 | 6 | def squared_euclidean_distance_matrix(pts1: torch.Tensor, pts2: torch.Tensor) -> torch.Tensor: 7 | """ 8 | Get squared Euclidean Distance Matrix 9 | Computes pairwise squared Euclidean distances between points 10 | 11 | Args: 12 | pts1: Tensor [M x D], M is the number of points, D is feature dimensionality 13 | pts2: Tensor [N x D], N is the number of points, D is feature dimensionality 14 | 15 | Return: 16 | Tensor [M, N]: matrix of squared Euclidean distances; at index (m, n) 17 | it contains || pts1[m] - pts2[n] ||^2 18 | """ 19 | edm = torch.mm(-2 * pts1, pts2.t()) 20 | edm += (pts1 * pts1).sum(1, keepdim=True) + (pts2 * pts2).sum(1, keepdim=True).t() 21 | return edm.contiguous() 22 | 23 | 24 | def normalize_embeddings(embeddings: torch.Tensor, epsilon: float = 1e-6) -> torch.Tensor: 25 | """ 26 | Normalize N D-dimensional embedding vectors arranged in a tensor [N, D] 27 | 28 | Args: 29 | embeddings (tensor [N, D]): N D-dimensional embedding vectors 30 | epsilon (float): minimum value for a vector norm 31 | Return: 32 | Normalized embeddings (tensor [N, D]), such that L2 vector norms are all equal to 1. 33 | """ 34 | return embeddings / torch.clamp(embeddings.norm(p=None, dim=1, keepdim=True), min=epsilon) 35 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/densepose/modeling/densepose_checkpoint.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from collections import OrderedDict 3 | 4 | from detectron2.checkpoint import DetectionCheckpointer 5 | 6 | 7 | def _rename_HRNet_weights(weights): 8 | # We detect and rename HRNet weights for DensePose. 1956 and 1716 are values that are 9 | # common to all HRNet pretrained weights, and should be enough to accurately identify them 10 | if ( 11 | len(weights["model"].keys()) == 1956 12 | and len([k for k in weights["model"].keys() if k.startswith("stage")]) == 1716 13 | ): 14 | hrnet_weights = OrderedDict() 15 | for k in weights["model"].keys(): 16 | hrnet_weights["backbone.bottom_up." + str(k)] = weights["model"][k] 17 | return {"model": hrnet_weights} 18 | else: 19 | return weights 20 | 21 | 22 | class DensePoseCheckpointer(DetectionCheckpointer): 23 | """ 24 | Same as :class:`DetectionCheckpointer`, but is able to handle HRNet weights 25 | """ 26 | 27 | def __init__(self, model, save_dir="", *, save_to_disk=None, **checkpointables): 28 | super().__init__(model, save_dir, save_to_disk=save_to_disk, **checkpointables) 29 | 30 | def _load_file(self, filename: str) -> object: 31 | """ 32 | Adding hrnet support 33 | """ 34 | weights = super()._load_file(filename) 35 | return _rename_HRNet_weights(weights) 36 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 .registry import DENSEPOSE_PREDICTOR_REGISTRY 8 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 .chart_result import ( 6 | DensePoseChartResult, 7 | DensePoseChartResultWithConfidences, 8 | quantize_densepose_chart_result, 9 | compress_quantized_densepose_chart_result, 10 | decompress_compressed_densepose_chart_result, 11 | ) 12 | from .cse import DensePoseEmbeddingPredictorOutput 13 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/densepose/structures/cse.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | 3 | from dataclasses import dataclass 4 | from typing import Union 5 | import torch 6 | 7 | 8 | @dataclass 9 | class DensePoseEmbeddingPredictorOutput: 10 | """ 11 | Predictor output that contains embedding and coarse segmentation data: 12 | * embedding: float tensor of size [N, D, H, W], contains estimated embeddings 13 | * coarse_segm: float tensor of size [N, K, H, W] 14 | Here D = MODEL.ROI_DENSEPOSE_HEAD.CSE.EMBED_SIZE 15 | K = MODEL.ROI_DENSEPOSE_HEAD.NUM_COARSE_SEGM_CHANNELS 16 | """ 17 | 18 | embedding: torch.Tensor 19 | coarse_segm: torch.Tensor 20 | 21 | def __len__(self): 22 | """ 23 | Number of instances (N) in the output 24 | """ 25 | return self.coarse_segm.size(0) 26 | 27 | def __getitem__( 28 | self, item: Union[int, slice, torch.BoolTensor] 29 | ) -> "DensePoseEmbeddingPredictorOutput": 30 | """ 31 | Get outputs for the selected instance(s) 32 | 33 | Args: 34 | item (int or slice or tensor): selected items 35 | """ 36 | if isinstance(item, int): 37 | return DensePoseEmbeddingPredictorOutput( 38 | coarse_segm=self.coarse_segm[item].unsqueeze(0), 39 | embedding=self.embedding[item].unsqueeze(0), 40 | ) 41 | else: 42 | return DensePoseEmbeddingPredictorOutput( 43 | coarse_segm=self.coarse_segm[item], embedding=self.embedding[item] 44 | ) 45 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/dev/run_inference_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | 4 | BIN="python train_net.py" 5 | OUTPUT="inference_test_output" 6 | NUM_GPUS=2 7 | IMS_PER_GPU=2 8 | IMS_PER_BATCH=$(( NUM_GPUS * IMS_PER_GPU )) 9 | 10 | CFG_LIST=( "${@:1}" ) 11 | 12 | if [ ${#CFG_LIST[@]} -eq 0 ]; then 13 | CFG_LIST=( ./configs/quick_schedules/*inference_acc_test.yaml ) 14 | fi 15 | 16 | echo "========================================================================" 17 | echo "Configs to run:" 18 | echo "${CFG_LIST[@]}" 19 | echo "========================================================================" 20 | 21 | for cfg in "${CFG_LIST[@]}"; do 22 | echo "========================================================================" 23 | echo "Running $cfg ..." 24 | echo "========================================================================" 25 | $BIN \ 26 | --eval-only \ 27 | --num-gpus $NUM_GPUS \ 28 | --config-file "$cfg" \ 29 | OUTPUT_DIR "$OUTPUT" \ 30 | SOLVER.IMS_PER_BATCH $IMS_PER_BATCH 31 | rm -rf $OUTPUT 32 | done 33 | 34 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/dev/run_instant_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | 4 | BIN="python train_net.py" 5 | OUTPUT="instant_test_output" 6 | NUM_GPUS=2 7 | SOLVER_IMS_PER_BATCH=$((NUM_GPUS * 2)) 8 | 9 | CFG_LIST=( "${@:1}" ) 10 | if [ ${#CFG_LIST[@]} -eq 0 ]; then 11 | CFG_LIST=( ./configs/quick_schedules/*instant_test.yaml ) 12 | fi 13 | 14 | echo "========================================================================" 15 | echo "Configs to run:" 16 | echo "${CFG_LIST[@]}" 17 | echo "========================================================================" 18 | 19 | for cfg in "${CFG_LIST[@]}"; do 20 | echo "========================================================================" 21 | echo "Running $cfg ..." 22 | echo "========================================================================" 23 | $BIN --num-gpus $NUM_GPUS --config-file "$cfg" \ 24 | SOLVER.IMS_PER_BATCH $SOLVER_IMS_PER_BATCH \ 25 | OUTPUT_DIR "$OUTPUT" 26 | rm -rf "$OUTPUT" 27 | done 28 | 29 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/doc/images/res_bbox_dp_contour.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/projects/DensePose/doc/images/res_bbox_dp_contour.jpg -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/doc/images/res_bbox_dp_segm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/projects/DensePose/doc/images/res_bbox_dp_segm.jpg -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/doc/images/res_bbox_dp_u.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/projects/DensePose/doc/images/res_bbox_dp_u.jpg -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/doc/images/res_bbox_dp_v.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/projects/DensePose/doc/images/res_bbox_dp_v.jpg -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/doc/images/vis_bbox_dp_i.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/projects/DensePose/doc/images/vis_bbox_dp_i.jpg -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/doc/images/vis_bbox_dp_pts.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/projects/DensePose/doc/images/vis_bbox_dp_pts.jpg -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/doc/images/vis_bbox_dp_segm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/projects/DensePose/doc/images/vis_bbox_dp_segm.jpg -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/doc/images/vis_bbox_dp_u.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/projects/DensePose/doc/images/vis_bbox_dp_u.jpg -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/doc/images/vis_bbox_dp_v.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/projects/DensePose/doc/images/vis_bbox_dp_v.jpg -------------------------------------------------------------------------------- /TableParser/detectron2/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, 100, 100, 3), 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 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/tests/test_model_e2e.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | import unittest 4 | import torch 5 | 6 | from detectron2.structures import BitMasks, Boxes, Instances 7 | 8 | from .common import get_model 9 | 10 | 11 | # TODO(plabatut): Modularize detectron2 tests and re-use 12 | def make_model_inputs(image, instances=None): 13 | if instances is None: 14 | return {"image": image} 15 | 16 | return {"image": image, "instances": instances} 17 | 18 | 19 | def make_empty_instances(h, w): 20 | instances = Instances((h, w)) 21 | instances.gt_boxes = Boxes(torch.rand(0, 4)) 22 | instances.gt_classes = torch.tensor([]).to(dtype=torch.int64) 23 | instances.gt_masks = BitMasks(torch.rand(0, h, w)) 24 | return instances 25 | 26 | 27 | class ModelE2ETest(unittest.TestCase): 28 | CONFIG_PATH = "" 29 | 30 | def setUp(self): 31 | self.model = get_model(self.CONFIG_PATH) 32 | 33 | def _test_eval(self, sizes): 34 | inputs = [make_model_inputs(torch.rand(3, size[0], size[1])) for size in sizes] 35 | self.model.eval() 36 | self.model(inputs) 37 | 38 | 39 | class DensePoseRCNNE2ETest(ModelE2ETest): 40 | CONFIG_PATH = "densepose_rcnn_R_101_FPN_s1x.yaml" 41 | 42 | def test_empty_data(self): 43 | self._test_eval([(200, 250), (200, 249)]) 44 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/tests/test_setup.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | import unittest 4 | 5 | from .common import ( 6 | get_config_files, 7 | get_evolution_config_files, 8 | get_hrnet_config_files, 9 | get_quick_schedules_config_files, 10 | setup, 11 | ) 12 | 13 | 14 | class TestSetup(unittest.TestCase): 15 | def _test_setup(self, config_file): 16 | setup(config_file) 17 | 18 | def test_setup_configs(self): 19 | config_files = get_config_files() 20 | for config_file in config_files: 21 | self._test_setup(config_file) 22 | 23 | def test_setup_evolution_configs(self): 24 | config_files = get_evolution_config_files() 25 | for config_file in config_files: 26 | self._test_setup(config_file) 27 | 28 | def test_setup_hrnet_configs(self): 29 | config_files = get_hrnet_config_files() 30 | for config_file in config_files: 31 | self._test_setup(config_file) 32 | 33 | def test_setup_quick_schedules_configs(self): 34 | config_files = get_quick_schedules_config_files() 35 | for config_file in config_files: 36 | self._test_setup(config_file) 37 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/DensePose/tests/test_structures.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | import unittest 4 | 5 | from densepose.data.structures import normalized_coords_transform 6 | 7 | 8 | class TestStructures(unittest.TestCase): 9 | def test_normalized_coords_transform(self): 10 | bbox = (32, 24, 288, 216) 11 | x0, y0, w, h = bbox 12 | xmin, ymin, xmax, ymax = x0, y0, x0 + w, y0 + h 13 | f = normalized_coords_transform(*bbox) 14 | # Top-left 15 | expected_p, actual_p = (-1, -1), f((xmin, ymin)) 16 | self.assertEqual(expected_p, actual_p) 17 | # Top-right 18 | expected_p, actual_p = (1, -1), f((xmax, ymin)) 19 | self.assertEqual(expected_p, actual_p) 20 | # Bottom-left 21 | expected_p, actual_p = (-1, 1), f((xmin, ymax)) 22 | self.assertEqual(expected_p, actual_p) 23 | # Bottom-right 24 | expected_p, actual_p = (1, 1), f((xmax, ymax)) 25 | self.assertEqual(expected_p, actual_p) 26 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/Panoptic-DeepLab/configs/COCO-PanopticSegmentation/panoptic_deeplab_R_52_os16_mg124_poly_200k_bs64_crop_640_640_coco_dsconv.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: ../Cityscapes-PanopticSegmentation/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 | SEM_SEG_HEAD: 16 | NUM_CLASSES: 133 17 | LOSS_TOP_K: 1.0 18 | USE_DEPTHWISE_SEPARABLE_CONV: True 19 | PANOPTIC_DEEPLAB: 20 | STUFF_AREA: 4096 21 | NMS_KERNEL: 41 22 | SIZE_DIVISIBILITY: 640 23 | USE_DEPTHWISE_SEPARABLE_CONV: True 24 | DATASETS: 25 | TRAIN: ("coco_2017_train_panoptic",) 26 | TEST: ("coco_2017_val_panoptic",) 27 | SOLVER: 28 | BASE_LR: 0.0005 29 | MAX_ITER: 200000 30 | IMS_PER_BATCH: 64 31 | INPUT: 32 | FORMAT: "RGB" 33 | GAUSSIAN_SIGMA: 8 34 | MIN_SIZE_TRAIN: !!python/object/apply:eval ["[int(x * 0.1 * 640) for x in range(5, 16)]"] 35 | MIN_SIZE_TRAIN_SAMPLING: "choice" 36 | MIN_SIZE_TEST: 640 37 | MAX_SIZE_TRAIN: 960 38 | MAX_SIZE_TEST: 640 39 | CROP: 40 | ENABLED: True 41 | TYPE: "absolute" 42 | SIZE: (640, 640) 43 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 segmenation does not work with "polygon" mask_format. 20 | MASK_FORMAT: "bitmask" 21 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/PointRend/configs/SemanticSegmentation/pointrend_semantic_R_101_FPN_1x_cityscapes.yaml: -------------------------------------------------------------------------------- 1 | _BASE_: Base-PointRend-Semantic-FPN.yaml 2 | MODEL: 3 | WEIGHTS: detectron2://ImageNetPretrained/MSRA/R-101.pkl 4 | RESNETS: 5 | DEPTH: 101 6 | SEM_SEG_HEAD: 7 | NUM_CLASSES: 19 8 | POINT_HEAD: 9 | NUM_CLASSES: 19 10 | TRAIN_NUM_POINTS: 2048 11 | SUBDIVISION_NUM_POINTS: 8192 12 | DATASETS: 13 | TRAIN: ("cityscapes_fine_sem_seg_train",) 14 | TEST: ("cityscapes_fine_sem_seg_val",) 15 | SOLVER: 16 | BASE_LR: 0.01 17 | STEPS: (40000, 55000) 18 | MAX_ITER: 65000 19 | IMS_PER_BATCH: 32 20 | INPUT: 21 | MIN_SIZE_TRAIN: (512, 768, 1024, 1280, 1536, 1792, 2048) 22 | MIN_SIZE_TRAIN_SAMPLING: "choice" 23 | MIN_SIZE_TEST: 1024 24 | MAX_SIZE_TRAIN: 4096 25 | MAX_SIZE_TEST: 2048 26 | CROP: 27 | ENABLED: True 28 | TYPE: "absolute" 29 | SIZE: (512, 1024) 30 | SINGLE_CATEGORY_MAX_AREA: 0.75 31 | COLOR_AUG_SSD: True 32 | DATALOADER: 33 | NUM_WORKERS: 10 34 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 4 | from .semantic_seg import PointRendSemSegHead 5 | from .color_augmentation import ColorAugSSDTransform 6 | 7 | from . import roi_heads as _ # only registration 8 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/TensorMask/tensormask/layers/csrc/SwapAlign2Nat/SwapAlign2Nat.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) Facebook, Inc. and its affiliates. 2 | #pragma once 3 | #include 4 | 5 | namespace tensormask { 6 | 7 | #if defined(WITH_CUDA) || defined(WITH_HIP) 8 | at::Tensor SwapAlign2Nat_forward_cuda( 9 | const at::Tensor& X, 10 | const int lambda_val, 11 | const float pad_val); 12 | 13 | at::Tensor SwapAlign2Nat_backward_cuda( 14 | const at::Tensor& gY, 15 | const int lambda_val, 16 | const int batch_size, 17 | const int channel, 18 | const int height, 19 | const int width); 20 | #endif 21 | 22 | inline at::Tensor SwapAlign2Nat_forward( 23 | const at::Tensor& X, 24 | const int lambda_val, 25 | const float pad_val) { 26 | if (X.type().is_cuda()) { 27 | #if defined(WITH_CUDA) || defined(WITH_HIP) 28 | return SwapAlign2Nat_forward_cuda(X, lambda_val, pad_val); 29 | #else 30 | AT_ERROR("Not compiled with GPU support"); 31 | #endif 32 | } 33 | AT_ERROR("Not implemented on the CPU"); 34 | } 35 | 36 | inline at::Tensor SwapAlign2Nat_backward( 37 | const at::Tensor& gY, 38 | const int lambda_val, 39 | const int batch_size, 40 | const int channel, 41 | const int height, 42 | const int width) { 43 | if (gY.type().is_cuda()) { 44 | #if defined(WITH_CUDA) || defined(WITH_HIP) 45 | return SwapAlign2Nat_backward_cuda( 46 | gY, lambda_val, batch_size, channel, height, width); 47 | #else 48 | AT_ERROR("Not compiled with GPU support"); 49 | #endif 50 | } 51 | AT_ERROR("Not implemented on the CPU"); 52 | } 53 | 54 | } // namespace tensormask 55 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/TensorMask/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/TensorMask/tests/test_swap_align2nat.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | 4 | import unittest 5 | import torch 6 | from torch.autograd import gradcheck 7 | 8 | from tensormask.layers.swap_align2nat import SwapAlign2Nat 9 | 10 | 11 | class SwapAlign2NatTest(unittest.TestCase): 12 | @unittest.skipIf(not torch.cuda.is_available(), "CUDA not available") 13 | def test_swap_align2nat_gradcheck_cuda(self): 14 | dtype = torch.float64 15 | device = torch.device("cuda") 16 | m = SwapAlign2Nat(2).to(dtype=dtype, device=device) 17 | x = torch.rand(2, 4, 10, 10, dtype=dtype, device=device, requires_grad=True) 18 | 19 | self.assertTrue(gradcheck(m, x), "gradcheck failed for SwapAlign2Nat CUDA") 20 | 21 | def _swap_align2nat(self, tensor, lambda_val): 22 | """ 23 | The basic setup for testing Swap_Align 24 | """ 25 | op = SwapAlign2Nat(lambda_val, pad_val=0.0) 26 | input = torch.from_numpy(tensor[None, :, :, :].astype("float32")) 27 | output = op.forward(input.cuda()).cpu().numpy() 28 | return output[0] 29 | 30 | 31 | if __name__ == "__main__": 32 | unittest.main() 33 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/TridentNet/tridentnet/config.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | 4 | from detectron2.config import CfgNode as CN 5 | 6 | 7 | def add_tridentnet_config(cfg): 8 | """ 9 | Add config for tridentnet. 10 | """ 11 | _C = cfg 12 | 13 | _C.MODEL.TRIDENT = CN() 14 | 15 | # Number of branches for TridentNet. 16 | _C.MODEL.TRIDENT.NUM_BRANCH = 3 17 | # Specify the dilations for each branch. 18 | _C.MODEL.TRIDENT.BRANCH_DILATIONS = [1, 2, 3] 19 | # Specify the stage for applying trident blocks. Default stage is Res4 according to the 20 | # TridentNet paper. 21 | _C.MODEL.TRIDENT.TRIDENT_STAGE = "res4" 22 | # Specify the test branch index TridentNet Fast inference: 23 | # - use -1 to aggregate results of all branches during inference. 24 | # - otherwise, only using specified branch for fast inference. Recommended setting is 25 | # to use the middle branch. 26 | _C.MODEL.TRIDENT.TEST_BRANCH_IDX = 1 27 | -------------------------------------------------------------------------------- /TableParser/detectron2/projects/TridentNet/tridentnet/trident_rpn.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | import torch 3 | 4 | from detectron2.modeling import PROPOSAL_GENERATOR_REGISTRY 5 | from detectron2.modeling.proposal_generator.rpn import RPN 6 | from detectron2.structures import ImageList 7 | 8 | 9 | @PROPOSAL_GENERATOR_REGISTRY.register() 10 | class TridentRPN(RPN): 11 | """ 12 | Trident RPN subnetwork. 13 | """ 14 | 15 | def __init__(self, cfg, input_shape): 16 | super(TridentRPN, self).__init__(cfg, input_shape) 17 | 18 | self.num_branch = cfg.MODEL.TRIDENT.NUM_BRANCH 19 | self.trident_fast = cfg.MODEL.TRIDENT.TEST_BRANCH_IDX != -1 20 | 21 | def forward(self, images, features, gt_instances=None): 22 | """ 23 | See :class:`RPN.forward`. 24 | """ 25 | num_branch = self.num_branch if self.training or not self.trident_fast else 1 26 | # Duplicate images and gt_instances for all branches in TridentNet. 27 | all_images = ImageList( 28 | torch.cat([images.tensor] * num_branch), images.image_sizes * num_branch 29 | ) 30 | all_gt_instances = gt_instances * num_branch if gt_instances is not None else None 31 | 32 | return super(TridentRPN, self).forward(all_images, features, all_gt_instances) 33 | -------------------------------------------------------------------------------- /TableParser/detectron2/setup.cfg: -------------------------------------------------------------------------------- 1 | [isort] 2 | line_length=100 3 | multi_line_output=3 4 | include_trailing_comma=True 5 | known_standard_library=numpy,setuptools,mock 6 | skip=./datasets,docs 7 | skip_glob=*/__init__.py 8 | known_myself=detectron2 9 | known_third_party=fvcore,matplotlib,cv2,torch,torchvision,PIL,pycocotools,yacs,termcolor,cityscapesscripts,tabulate,tqdm,scipy,lvis,psutil,pkg_resources,caffe2,onnx,panopticapi,black,isort,av,iopath,omegaconf,hydra,yaml,pydoc,submitit 10 | no_lines_before=STDLIB,THIRDPARTY 11 | sections=FUTURE,STDLIB,THIRDPARTY,myself,FIRSTPARTY,LOCALFOLDER 12 | default_section=FIRSTPARTY 13 | 14 | [mypy] 15 | python_version=3.6 16 | ignore_missing_imports = True 17 | warn_unused_configs = True 18 | disallow_untyped_defs = True 19 | check_untyped_defs = True 20 | warn_unused_ignores = True 21 | warn_redundant_casts = True 22 | show_column_numbers = True 23 | follow_imports = silent 24 | allow_redefinition = True 25 | ; Require all functions to be annotated 26 | disallow_incomplete_defs = True 27 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/tests/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | -------------------------------------------------------------------------------- /TableParser/detectron2/tests/data/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tests/data/__init__.py -------------------------------------------------------------------------------- /TableParser/detectron2/tests/layers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tests/layers/__init__.py -------------------------------------------------------------------------------- /TableParser/detectron2/tests/layers/test_blocks.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | import unittest 4 | import torch 5 | from torch import nn 6 | 7 | from detectron2.layers import ASPP, DepthwiseSeparableConv2d, FrozenBatchNorm2d 8 | from detectron2.utils.env import TORCH_VERSION 9 | 10 | 11 | """ 12 | Test for misc layers. 13 | """ 14 | 15 | 16 | class TestBlocks(unittest.TestCase): 17 | def test_separable_conv(self): 18 | DepthwiseSeparableConv2d(3, 10, norm1="BN", activation1=nn.PReLU()) 19 | 20 | def test_aspp(self): 21 | m = ASPP(3, 10, [2, 3, 4], norm="", activation=nn.PReLU()) 22 | self.assertIsNot(m.convs[0].activation.weight, m.convs[1].activation.weight) 23 | self.assertIsNot(m.convs[0].activation.weight, m.project.activation.weight) 24 | 25 | @unittest.skipIf(TORCH_VERSION < (1, 6) or not torch.cuda.is_available(), "CUDA not available") 26 | def test_frozen_batchnorm_fp16(self): 27 | from torch.cuda.amp import autocast 28 | 29 | C = 10 30 | input = torch.rand(1, C, 10, 10).cuda() 31 | m = FrozenBatchNorm2d(C).cuda() 32 | with autocast(): 33 | output = m(input.half()) 34 | self.assertEqual(output.dtype, torch.float16) 35 | 36 | # requires_grad triggers a different codepath 37 | input.requires_grad_() 38 | with autocast(): 39 | output = m(input.half()) 40 | self.assertEqual(output.dtype, torch.float16) 41 | -------------------------------------------------------------------------------- /TableParser/detectron2/tests/layers/test_nms.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | from __future__ import absolute_import, division, print_function, unicode_literals 3 | import unittest 4 | import torch 5 | 6 | from detectron2.layers import batched_nms 7 | from detectron2.utils.env import TORCH_VERSION 8 | from detectron2.utils.testing import random_boxes 9 | 10 | 11 | class TestNMS(unittest.TestCase): 12 | def _create_tensors(self, N): 13 | boxes = random_boxes(N, 200) 14 | scores = torch.rand(N) 15 | return boxes, scores 16 | 17 | @unittest.skipIf(TORCH_VERSION < (1, 6), "Insufficient pytorch version") 18 | def test_nms_scriptability(self): 19 | N = 2000 20 | num_classes = 50 21 | boxes, scores = self._create_tensors(N) 22 | idxs = torch.randint(0, num_classes, (N,)) 23 | scripted_batched_nms = torch.jit.script(batched_nms) 24 | err_msg = "NMS is incompatible with jit-scripted NMS for IoU={}" 25 | 26 | for iou in [0.2, 0.5, 0.8]: 27 | keep_ref = batched_nms(boxes, scores, idxs, iou) 28 | backup = boxes.clone() 29 | scripted_keep = scripted_batched_nms(boxes, scores, idxs, iou) 30 | assert torch.allclose(boxes, backup), "boxes modified by jit-scripted batched_nms" 31 | self.assertTrue(torch.equal(keep_ref, scripted_keep), err_msg.format(iou)) 32 | 33 | 34 | if __name__ == "__main__": 35 | unittest.main() 36 | -------------------------------------------------------------------------------- /TableParser/detectron2/tests/modeling/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tests/modeling/__init__.py -------------------------------------------------------------------------------- /TableParser/detectron2/tests/modeling/test_backbone.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved 2 | 3 | import unittest 4 | import torch 5 | 6 | import detectron2.export.torchscript # apply patch # noqa 7 | from detectron2 import model_zoo 8 | from detectron2.config import get_cfg 9 | from detectron2.layers import ShapeSpec 10 | from detectron2.modeling.backbone import build_resnet_backbone 11 | from detectron2.modeling.backbone.fpn import build_resnet_fpn_backbone 12 | from detectron2.utils.env import TORCH_VERSION 13 | 14 | 15 | class TestBackBone(unittest.TestCase): 16 | @unittest.skipIf(TORCH_VERSION < (1, 8), "Insufficient pytorch version") 17 | def test_resnet_scriptability(self): 18 | cfg = get_cfg() 19 | resnet = build_resnet_backbone(cfg, ShapeSpec(channels=3)) 20 | 21 | scripted_resnet = torch.jit.script(resnet) 22 | 23 | inp = torch.rand(2, 3, 100, 100) 24 | out1 = resnet(inp)["res4"] 25 | out2 = scripted_resnet(inp)["res4"] 26 | self.assertTrue(torch.allclose(out1, out2)) 27 | 28 | @unittest.skipIf(TORCH_VERSION < (1, 8), "Insufficient pytorch version") 29 | def test_fpn_scriptability(self): 30 | cfg = model_zoo.get_config("Misc/scratch_mask_rcnn_R_50_FPN_3x_gn.yaml") 31 | bb = build_resnet_fpn_backbone(cfg, ShapeSpec(channels=3)) 32 | bb_s = torch.jit.script(bb) 33 | 34 | inp = torch.rand(2, 3, 128, 128) 35 | out1 = bb(inp)["p5"] 36 | out2 = bb_s(inp)["p5"] 37 | self.assertTrue(torch.allclose(out1, out2)) 38 | -------------------------------------------------------------------------------- /TableParser/detectron2/tests/structures/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tests/structures/__init__.py -------------------------------------------------------------------------------- /TableParser/detectron2/tests/test_model_zoo.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | import logging 3 | import unittest 4 | 5 | from detectron2 import model_zoo 6 | from detectron2.modeling import FPN, GeneralizedRCNN 7 | 8 | logger = logging.getLogger(__name__) 9 | 10 | 11 | class TestModelZoo(unittest.TestCase): 12 | def test_get_returns_model(self): 13 | model = model_zoo.get("Misc/scratch_mask_rcnn_R_50_FPN_3x_gn.yaml", trained=False) 14 | self.assertIsInstance(model, GeneralizedRCNN) 15 | self.assertIsInstance(model.backbone, FPN) 16 | 17 | def test_get_invalid_model(self): 18 | self.assertRaises(RuntimeError, model_zoo.get, "Invalid/config.yaml") 19 | 20 | def test_get_url(self): 21 | url = model_zoo.get_checkpoint_url("Misc/scratch_mask_rcnn_R_50_FPN_3x_gn.yaml") 22 | self.assertEqual( 23 | url, 24 | "https://dl.fbaipublicfiles.com/detectron2/Misc/scratch_mask_rcnn_R_50_FPN_3x_gn/138602908/model_final_01ca85.pkl", # noqa 25 | ) 26 | 27 | 28 | if __name__ == "__main__": 29 | unittest.main() 30 | -------------------------------------------------------------------------------- /TableParser/detectron2/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 | -------------------------------------------------------------------------------- /TableParser/detectron2/tests/test_registry.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | import unittest 3 | import torch 4 | 5 | from detectron2.modeling.meta_arch import GeneralizedRCNN 6 | from detectron2.utils.registry import _convert_target_to_string, locate 7 | 8 | 9 | class A: 10 | class B: 11 | pass 12 | 13 | 14 | class TestLocate(unittest.TestCase): 15 | def _test_obj(self, obj): 16 | name = _convert_target_to_string(obj) 17 | newobj = locate(name) 18 | self.assertIs(obj, newobj) 19 | 20 | def test_basic(self): 21 | self._test_obj(GeneralizedRCNN) 22 | 23 | def test_inside_class(self): 24 | # requires using __qualname__ instead of __name__ 25 | self._test_obj(A.B) 26 | 27 | def test_builtin(self): 28 | self._test_obj(len) 29 | self._test_obj(dict) 30 | 31 | def test_pytorch_optim(self): 32 | # pydoc.locate does not work for it 33 | self._test_obj(torch.optim.SGD) 34 | 35 | def test_failure(self): 36 | with self.assertRaises(ImportError): 37 | locate("asdf") 38 | -------------------------------------------------------------------------------- /TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/31-0/31-0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/31-0/31-0.pdf -------------------------------------------------------------------------------- /TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/32-0/32-0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/32-0/32-0.pdf -------------------------------------------------------------------------------- /TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/33-0/33-0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/33-0/33-0.pdf -------------------------------------------------------------------------------- /TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/34-0/34-0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/34-0/34-0.pdf -------------------------------------------------------------------------------- /TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/35-0/35-0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/35-0/35-0.pdf -------------------------------------------------------------------------------- /TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/36-0/36-0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/36-0/36-0.pdf -------------------------------------------------------------------------------- /TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/37-0/37-0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/37-0/37-0.pdf -------------------------------------------------------------------------------- /TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/38-0/38-0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/38-0/38-0.pdf -------------------------------------------------------------------------------- /TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/39-0/39-0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/39-0/39-0.pdf -------------------------------------------------------------------------------- /TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/40-0/40-0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/40-0/40-0.pdf -------------------------------------------------------------------------------- /TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/41-0/41-0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/41-0/41-0.pdf -------------------------------------------------------------------------------- /TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/42-0/42-0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/42-0/42-0.pdf -------------------------------------------------------------------------------- /TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/43-0/43-0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/43-0/43-0.pdf -------------------------------------------------------------------------------- /TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/44-0/44-0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/44-0/44-0.pdf -------------------------------------------------------------------------------- /TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/45-0/45-0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/45-0/45-0.pdf -------------------------------------------------------------------------------- /TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/46-0/46-0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/46-0/46-0.pdf -------------------------------------------------------------------------------- /TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/47-0/47-0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/47-0/47-0.pdf -------------------------------------------------------------------------------- /TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/48-0/48-0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/48-0/48-0.pdf -------------------------------------------------------------------------------- /TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/49-0/49-0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/detectron2/tools/datasets/yearbooks_manual/manual_val_v2_with_L_multicells/49-0/49-0.pdf -------------------------------------------------------------------------------- /TableParser/detectron2/tools/deploy/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # See https://pytorch.org/tutorials/advanced/cpp_frontend.html 3 | cmake_minimum_required(VERSION 3.12 FATAL_ERROR) 4 | project(caffe2_mask_rcnn) 5 | 6 | find_package(Torch REQUIRED) 7 | find_package(gflags REQUIRED) # needed by caffe2 8 | find_package(OpenCV REQUIRED) 9 | find_package(TorchVision REQUIRED) # needed by export-method=tracing/scripting 10 | 11 | add_executable(caffe2_mask_rcnn caffe2_mask_rcnn.cpp) 12 | target_link_libraries( 13 | caffe2_mask_rcnn 14 | "${TORCH_LIBRARIES}" gflags glog protobuf ${OpenCV_LIBS}) 15 | set_property(TARGET caffe2_mask_rcnn PROPERTY CXX_STANDARD 14) 16 | 17 | 18 | add_executable(torchscript_traced_mask_rcnn torchscript_traced_mask_rcnn.cpp) 19 | target_link_libraries( 20 | torchscript_traced_mask_rcnn 21 | -Wl,--no-as-needed TorchVision::TorchVision -Wl,--as-needed 22 | "${TORCH_LIBRARIES}" ${OpenCV_LIBS}) 23 | set_property(TARGET torchscript_traced_mask_rcnn PROPERTY CXX_STANDARD 14) 24 | -------------------------------------------------------------------------------- /TableParser/docparser/__pycache__/stage1_entity_detector.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/docparser/__pycache__/stage1_entity_detector.cpython-36.pyc -------------------------------------------------------------------------------- /TableParser/docparser/__pycache__/stage2_structure_parser.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/docparser/__pycache__/stage2_structure_parser.cpython-36.pyc -------------------------------------------------------------------------------- /TableParser/docparser/logging.conf: -------------------------------------------------------------------------------- 1 | [loggers] 2 | keys=root,simpleExample 3 | 4 | [handlers] 5 | keys=consoleHandler 6 | 7 | [formatters] 8 | keys=simpleFormatter 9 | 10 | [logger_root] 11 | level=DEBUG 12 | handlers=consoleHandler 13 | 14 | [logger_simpleExample] 15 | level=DEBUG 16 | handlers=consoleHandler 17 | qualname=simpleExample 18 | propagate=0 19 | 20 | [handler_consoleHandler] 21 | class=StreamHandler 22 | level=DEBUG 23 | formatter=simpleFormatter 24 | args=(sys.stdout,) 25 | 26 | [formatter_simpleFormatter] 27 | format=%(asctime)s - %(name)s - %(levelname)s - %(message)s 28 | datefmt= 29 | -------------------------------------------------------------------------------- /TableParser/docparser/objdetmetrics_lib/__init__.py: -------------------------------------------------------------------------------- 1 | ########################################################################################### 2 | # Developed by: Rafael Padilla # 3 | # SMT - Signal Multimedia and Telecommunications Lab # 4 | # COPPE - Universidade Federal do Rio de Janeiro # 5 | # Last modification: May 24th 2018 # 6 | ########################################################################################### 7 | -------------------------------------------------------------------------------- /TableParser/docparser/objdetmetrics_lib/__pycache__/BoundingBox.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/docparser/objdetmetrics_lib/__pycache__/BoundingBox.cpython-36.pyc -------------------------------------------------------------------------------- /TableParser/docparser/objdetmetrics_lib/__pycache__/BoundingBoxes.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/docparser/objdetmetrics_lib/__pycache__/BoundingBoxes.cpython-36.pyc -------------------------------------------------------------------------------- /TableParser/docparser/objdetmetrics_lib/__pycache__/Evaluator.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/docparser/objdetmetrics_lib/__pycache__/Evaluator.cpython-36.pyc -------------------------------------------------------------------------------- /TableParser/docparser/objdetmetrics_lib/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/docparser/objdetmetrics_lib/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /TableParser/docparser/objdetmetrics_lib/__pycache__/utils.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/docparser/objdetmetrics_lib/__pycache__/utils.cpython-36.pyc -------------------------------------------------------------------------------- /TableParser/docparser/utils/__pycache__/arxiv_heuristics.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/docparser/utils/__pycache__/arxiv_heuristics.cpython-36.pyc -------------------------------------------------------------------------------- /TableParser/docparser/utils/__pycache__/data_utils.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/docparser/utils/__pycache__/data_utils.cpython-36.pyc -------------------------------------------------------------------------------- /TableParser/docparser/utils/__pycache__/data_utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/docparser/utils/__pycache__/data_utils.cpython-38.pyc -------------------------------------------------------------------------------- /TableParser/docparser/utils/__pycache__/eval_utils.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/docparser/utils/__pycache__/eval_utils.cpython-36.pyc -------------------------------------------------------------------------------- /TableParser/docparser/utils/__pycache__/experiment_utils.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/docparser/utils/__pycache__/experiment_utils.cpython-36.pyc -------------------------------------------------------------------------------- /TableParser/docparser/utils/__pycache__/postprocess_icdar_table_structure.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/docparser/utils/__pycache__/postprocess_icdar_table_structure.cpython-36.pyc -------------------------------------------------------------------------------- /TableParser/docparser/utils/__pycache__/postprocess_table_structure.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/docparser/utils/__pycache__/postprocess_table_structure.cpython-36.pyc -------------------------------------------------------------------------------- /TableParser/docparser/utils/__pycache__/postprocess_utils.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/docparser/utils/__pycache__/postprocess_utils.cpython-36.pyc -------------------------------------------------------------------------------- /TableParser/docparser/utils/__pycache__/structure_utils.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/docparser/utils/__pycache__/structure_utils.cpython-36.pyc -------------------------------------------------------------------------------- /TableParser/docparser/utils/dataset-tools-20180206.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/docparser/utils/dataset-tools-20180206.jar -------------------------------------------------------------------------------- /TableParser/docparser/utils/detect_missing_docs.py: -------------------------------------------------------------------------------- 1 | import os 2 | import json 3 | 4 | dataset_root = os.path.join('./', 'datasets') 5 | train_dataset = os.path.join(dataset_root, 'arxivdocs_weak/splits/by_page/train') 6 | VG_output_train_dataset = os.path.join(dataset_root, 'arxivdocs_weak/splits/by_page/VG/train') 7 | VG_img_dict_path = os.path.join(VG_output_train_dataset, 'arxivdocs_weak_layout_train_scene_graph_image_data.json') 8 | VG_obj_dict_path = os.path.join(VG_output_train_dataset, 'arxivdocs_weak_layout_train_scene_graph_objects.json') 9 | src_filenames = os.listdir(train_dataset) 10 | 11 | 12 | print(len(src_filenames)) 13 | 14 | with open(VG_img_dict_path, 'r') as in_file: 15 | img_dict = json.load(in_file) 16 | print(len(img_dict)) 17 | 18 | 19 | with open(VG_obj_dict_path, 'r') as in_file: 20 | obj_dict = json.load(in_file) 21 | 22 | print('analyze json contents..') 23 | 24 | img_dict_ids = dict() 25 | for img_item in img_dict: 26 | img_dict_ids[img_item['image_id']] = img_item 27 | 28 | obj_dict_ids = set() 29 | for obj in obj_dict: 30 | obj_dict_ids.add(obj['image_id']) 31 | 32 | print(len(img_dict_ids), len(obj_dict_ids)) 33 | print('looking form missing imgs') 34 | missing_ids = set(img_dict_ids.keys()) - obj_dict_ids 35 | print('missing: {}'.format( missing_ids)) 36 | -------------------------------------------------------------------------------- /TableParser/preprocessing/Example.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/preprocessing/Example.jpg -------------------------------------------------------------------------------- /TableParser/preprocessing/Example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/TableParser/preprocessing/Example.png -------------------------------------------------------------------------------- /demo/2021-06-15 02-05-58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/demo/2021-06-15 02-05-58.gif -------------------------------------------------------------------------------- /figures/4-4_pdf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/4-4_pdf.jpg -------------------------------------------------------------------------------- /figures/4-4_pdf_anno.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/4-4_pdf_anno.jpg -------------------------------------------------------------------------------- /figures/6-5_structure.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/6-5_structure.PNG -------------------------------------------------------------------------------- /figures/6-5_table_annotated.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/6-5_table_annotated.PNG -------------------------------------------------------------------------------- /figures/6-5_table_original.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/6-5_table_original.PNG -------------------------------------------------------------------------------- /figures/DeExcelerator.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/DeExcelerator.jpg -------------------------------------------------------------------------------- /figures/HTableParser_csv.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/HTableParser_csv.jpg -------------------------------------------------------------------------------- /figures/HTableParser_input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/HTableParser_input.png -------------------------------------------------------------------------------- /figures/HTableParser_input_annotations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/HTableParser_input_annotations.png -------------------------------------------------------------------------------- /figures/LayoutParser_HTableParserInput.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/LayoutParser_HTableParserInput.png -------------------------------------------------------------------------------- /figures/M1_18-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/M1_18-0.png -------------------------------------------------------------------------------- /figures/M1_27-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/M1_27-0.png -------------------------------------------------------------------------------- /figures/M1_HTableParserInput.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/M1_HTableParserInput.png -------------------------------------------------------------------------------- /figures/M1_KR_CB_Page1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/M1_KR_CB_Page1.png -------------------------------------------------------------------------------- /figures/M1_ZH_cut1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/M1_ZH_cut1.png -------------------------------------------------------------------------------- /figures/M2_18-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/M2_18-0.png -------------------------------------------------------------------------------- /figures/M2_27-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/M2_27-0.png -------------------------------------------------------------------------------- /figures/M2_KR_CB_Page1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/M2_KR_CB_Page1.png -------------------------------------------------------------------------------- /figures/M2_ZH_cut1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/M2_ZH_cut1.png -------------------------------------------------------------------------------- /figures/MTableParser_Example.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/MTableParser_Example.jpg -------------------------------------------------------------------------------- /figures/MTableParser_Excel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/MTableParser_Excel.jpg -------------------------------------------------------------------------------- /figures/MTableParser_bbox.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/MTableParser_bbox.jpg -------------------------------------------------------------------------------- /figures/OCR_TableAnnotator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/OCR_TableAnnotator.png -------------------------------------------------------------------------------- /figures/TableParser.drawio.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/TableParser.drawio.pdf -------------------------------------------------------------------------------- /figures/demo_TableAnnotator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/demo_TableAnnotator.png -------------------------------------------------------------------------------- /figures/googlevision-ocr-bad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/googlevision-ocr-bad.png -------------------------------------------------------------------------------- /figures/googlevision-ocr-good.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/googlevision-ocr-good.png -------------------------------------------------------------------------------- /figures/mask-rcnn.drawio.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DS3Lab/TableParser/bf4fa8c88ecdb01d1ca58cccda61dc505a26d06d/figures/mask-rcnn.drawio.pdf --------------------------------------------------------------------------------