Repository: stevewongv/InstanceShadowDetection Branch: master Commit: 3e63c1869dd6 Files: 358 Total size: 4.4 MB Directory structure: gitextract_46mmgy8a/ ├── .gitignore ├── LICENSE ├── PythonAPI/ │ ├── Makefile │ ├── common/ │ │ ├── gason.cpp │ │ ├── gason.h │ │ ├── maskApi.c │ │ └── maskApi.h │ ├── pysobatools/ │ │ ├── __init__.py │ │ ├── _mask.c │ │ ├── _mask.pyx │ │ ├── cocoeval.py │ │ ├── mask.py │ │ ├── soba.py │ │ └── sobaeval.py │ └── setup.py ├── README.md ├── configs/ │ ├── Base-RCNN-C4.yaml │ ├── Base-RCNN-DilatedC5.yaml │ ├── Base-RCNN-FPN.yaml │ ├── Base-RetinaNet.yaml │ ├── COCO-Detection/ │ │ ├── fast_rcnn_R_50_FPN_1x.yaml │ │ ├── faster_rcnn_R_101_C4_3x.yaml │ │ ├── faster_rcnn_R_101_DC5_3x.yaml │ │ ├── faster_rcnn_R_101_FPN_3x.yaml │ │ ├── faster_rcnn_R_50_C4_1x.yaml │ │ ├── faster_rcnn_R_50_C4_3x.yaml │ │ ├── faster_rcnn_R_50_DC5_1x.yaml │ │ ├── faster_rcnn_R_50_DC5_3x.yaml │ │ ├── faster_rcnn_R_50_FPN_1x.yaml │ │ ├── faster_rcnn_R_50_FPN_3x.yaml │ │ ├── faster_rcnn_X_101_32x8d_FPN_3x.yaml │ │ ├── retinanet_R_101_FPN_3x.yaml │ │ ├── retinanet_R_50_FPN_1x.yaml │ │ ├── retinanet_R_50_FPN_3x.yaml │ │ ├── rpn_R_50_C4_1x.yaml │ │ └── rpn_R_50_FPN_1x.yaml │ ├── COCO-InstanceSegmentation/ │ │ ├── mask_rcnn_R_101_C4_3x.yaml │ │ ├── mask_rcnn_R_101_DC5_3x.yaml │ │ ├── mask_rcnn_R_101_FPN_3x.yaml │ │ ├── mask_rcnn_R_50_C4_1x.yaml │ │ ├── mask_rcnn_R_50_C4_3x.yaml │ │ ├── mask_rcnn_R_50_DC5_1x.yaml │ │ ├── mask_rcnn_R_50_DC5_3x.yaml │ │ ├── mask_rcnn_R_50_FPN_1x.yaml │ │ ├── mask_rcnn_R_50_FPN_3x.yaml │ │ └── mask_rcnn_X_101_32x8d_FPN_3x.yaml │ ├── COCO-Keypoints/ │ │ ├── Base-Keypoint-RCNN-FPN.yaml │ │ ├── keypoint_rcnn_R_101_FPN_3x.yaml │ │ ├── keypoint_rcnn_R_50_FPN_1x.yaml │ │ ├── keypoint_rcnn_R_50_FPN_3x.yaml │ │ └── keypoint_rcnn_X_101_32x8d_FPN_3x.yaml │ ├── COCO-PanopticSegmentation/ │ │ ├── Base-Panoptic-FPN.yaml │ │ ├── panoptic_fpn_R_101_3x.yaml │ │ ├── panoptic_fpn_R_50_1x.yaml │ │ └── panoptic_fpn_R_50_3x.yaml │ ├── Cityscapes/ │ │ └── mask_rcnn_R_50_FPN.yaml │ ├── Detectron1-Comparisons/ │ │ ├── README.md │ │ ├── faster_rcnn_R_50_FPN_noaug_1x.yaml │ │ ├── keypoint_rcnn_R_50_FPN_1x.yaml │ │ └── mask_rcnn_R_50_FPN_noaug_1x.yaml │ ├── LVIS-InstanceSegmentation/ │ │ ├── mask_rcnn_R_101_FPN_1x.yaml │ │ ├── mask_rcnn_R_50_FPN_1x.yaml │ │ └── mask_rcnn_X_101_32x8d_FPN_1x.yaml │ ├── Misc/ │ │ ├── cascade_mask_rcnn_R_50_FPN_1x.yaml │ │ ├── cascade_mask_rcnn_R_50_FPN_3x.yaml │ │ ├── cascade_mask_rcnn_X_152_32x8d_FPN_IN5k_gn_dconv.yaml │ │ ├── mask_rcnn_R_50_FPN_1x_cls_agnostic.yaml │ │ ├── mask_rcnn_R_50_FPN_1x_dconv_c3-c5.yaml │ │ ├── mask_rcnn_R_50_FPN_3x_dconv_c3-c5.yaml │ │ ├── mask_rcnn_R_50_FPN_3x_gn.yaml │ │ ├── mask_rcnn_R_50_FPN_3x_syncbn.yaml │ │ ├── panoptic_fpn_R_101_dconv_cascade_gn_3x.yaml │ │ ├── scratch_mask_rcnn_R_50_FPN_3x_gn.yaml │ │ └── semantic_R_50_FPN_1x.yaml │ ├── PascalVOC-Detection/ │ │ ├── faster_rcnn_R_50_C4.yaml │ │ └── faster_rcnn_R_50_FPN.yaml │ └── quick_schedules/ │ ├── README.md │ ├── fast_rcnn_R_50_FPN_inference_acc_test.yaml │ ├── fast_rcnn_R_50_FPN_instant_test.yaml │ ├── keypoint_rcnn_R_50_FPN_inference_acc_test.yaml │ ├── keypoint_rcnn_R_50_FPN_instant_test.yaml │ ├── keypoint_rcnn_R_50_FPN_normalized_training_acc_test.yaml │ ├── keypoint_rcnn_R_50_FPN_training_acc_test.yaml │ ├── mask_rcnn_R_50_C4_inference_acc_test.yaml │ ├── mask_rcnn_R_50_C4_instant_test.yaml │ ├── mask_rcnn_R_50_C4_training_acc_test.yaml │ ├── mask_rcnn_R_50_DC5_inference_acc_test.yaml │ ├── mask_rcnn_R_50_FPN_inference_acc_test.yaml │ ├── mask_rcnn_R_50_FPN_instant_test.yaml │ ├── mask_rcnn_R_50_FPN_training_acc_test.yaml │ ├── panoptic_fpn_R_50_inference_acc_test.yaml │ ├── panoptic_fpn_R_50_instant_test.yaml │ ├── panoptic_fpn_R_50_training_acc_test.yaml │ ├── retinanet_R_50_FPN_inference_acc_test.yaml │ ├── retinanet_R_50_FPN_instant_test.yaml │ ├── rpn_R_50_FPN_inference_acc_test.yaml │ ├── rpn_R_50_FPN_instant_test.yaml │ ├── semantic_R_50_FPN_inference_acc_test.yaml │ ├── semantic_R_50_FPN_instant_test.yaml │ └── semantic_R_50_FPN_training_acc_test.yaml ├── datasets/ │ ├── README.md │ ├── prepare_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 │ │ └── model_zoo.py │ ├── config/ │ │ ├── __init__.py │ │ ├── compat.py │ │ ├── config.py │ │ └── defaults.py │ ├── data/ │ │ ├── __init__.py │ │ ├── build.py │ │ ├── catalog.py │ │ ├── common.py │ │ ├── dataset_mapper.py │ │ ├── dataset_mapper.py.bak │ │ ├── datasets/ │ │ │ ├── README.md │ │ │ ├── __init__.py │ │ │ ├── builtin.py │ │ │ ├── builtin_meta.py │ │ │ ├── cityscapes.py │ │ │ ├── coco.py │ │ │ ├── lvis.py │ │ │ ├── lvis_v0_5_categories.py │ │ │ ├── pascal_voc.py │ │ │ ├── register_coco.py │ │ │ ├── register_soba.py │ │ │ └── soba.py │ │ ├── detection_utils.py │ │ ├── samplers/ │ │ │ ├── __init__.py │ │ │ ├── distributed_sampler.py │ │ │ └── grouped_batch_sampler.py │ │ └── transforms/ │ │ ├── __init__.py │ │ ├── transform.py │ │ └── transform_gen.py │ ├── engine/ │ │ ├── __init__.py │ │ ├── defaults.py │ │ ├── hooks.py │ │ ├── launch.py │ │ └── train_loop.py │ ├── evaluation/ │ │ ├── __init__.py │ │ ├── cityscapes_evaluation.py │ │ ├── coco_evaluation.py │ │ ├── evaluation/ │ │ │ ├── __init__.py │ │ │ ├── cityscapes_evaluation.py │ │ │ ├── coco_evaluation.py │ │ │ ├── evaluator.py │ │ │ ├── lvis_evaluation.py │ │ │ ├── panoptic_evaluation.py │ │ │ ├── pascal_voc_evaluation.py │ │ │ ├── sem_seg_evaluation.py │ │ │ └── testing.py │ │ ├── evaluator.py │ │ ├── lvis_evaluation.py │ │ ├── panoptic_evaluation.py │ │ ├── pascal_voc_evaluation.py │ │ ├── rotated_coco_evaluation.py │ │ ├── sem_seg_evaluation.py │ │ ├── soba_evaluation.py │ │ └── testing.py │ ├── export/ │ │ ├── README.md │ │ ├── __init__.py │ │ ├── api.py │ │ ├── c10.py │ │ ├── caffe2_export.py │ │ ├── caffe2_inference.py │ │ ├── caffe2_modeling.py │ │ ├── patcher.py │ │ └── shared.py │ ├── layers/ │ │ ├── __init__.py │ │ ├── aspp.py │ │ ├── batch_norm.py │ │ ├── blocks.py │ │ ├── csrc/ │ │ │ ├── README.md │ │ │ ├── ROIAlignRotated/ │ │ │ │ ├── ROIAlignRotated.h │ │ │ │ ├── ROIAlignRotated_cpu.cpp │ │ │ │ └── ROIAlignRotated_cuda.cu │ │ │ ├── box_iou_rotated/ │ │ │ │ ├── box_iou_rotated.h │ │ │ │ ├── box_iou_rotated_cpu.cpp │ │ │ │ ├── box_iou_rotated_cuda.cu │ │ │ │ └── box_iou_rotated_utils.h │ │ │ ├── cocoeval/ │ │ │ │ ├── cocoeval.cpp │ │ │ │ └── cocoeval.h │ │ │ ├── cuda_version.cu │ │ │ ├── deformable/ │ │ │ │ ├── deform_conv.h │ │ │ │ ├── deform_conv_cuda.cu │ │ │ │ └── deform_conv_cuda_kernel.cu │ │ │ ├── nms_rotated/ │ │ │ │ ├── nms_rotated.h │ │ │ │ ├── nms_rotated_cpu.cpp │ │ │ │ └── nms_rotated_cuda.cu │ │ │ └── vision.cpp │ │ ├── deform_conv.py │ │ ├── losses.py │ │ ├── mask_ops.py │ │ ├── nms.py │ │ ├── roi_align.py │ │ ├── roi_align_rotated.py │ │ ├── rotated_boxes.py │ │ ├── shape_spec.py │ │ └── wrappers.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/ │ │ │ ├── LISA_meta_arch.py │ │ │ ├── __init__.py │ │ │ ├── build.py │ │ │ ├── panoptic_fpn.py │ │ │ ├── rcnn.py │ │ │ ├── retinanet.py │ │ │ └── semantic_seg.py │ │ ├── poolers.py │ │ ├── postprocessing.py │ │ ├── proposal_generator/ │ │ │ ├── LISA_rpn.py │ │ │ ├── __init__.py │ │ │ ├── build.py │ │ │ ├── proposal_utils.py │ │ │ ├── rpn.py │ │ │ ├── rpn_outputs.py │ │ │ ├── rrpn.py │ │ │ └── rrpn_outputs.py │ │ ├── roi_heads/ │ │ │ ├── LISA_rcnn.py │ │ │ ├── __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 │ ├── 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 │ ├── collect_env.py │ ├── colormap.py │ ├── comm.py │ ├── develop.py │ ├── env.py │ ├── events.py │ ├── logger.py │ ├── memory.py │ ├── registry.py │ ├── serialize.py │ ├── video_visualizer.py │ ├── visualizer.py │ └── visualizer.py.back ├── dev/ │ ├── README.md │ ├── linter.sh │ ├── packaging/ │ │ ├── README.md │ │ ├── build_all_wheels.sh │ │ ├── build_wheel.sh │ │ ├── gen_wheel_index.sh │ │ └── pkg_helpers.bash │ ├── parse_results.sh │ ├── run_inference_tests.sh │ └── run_instant_tests.sh ├── docker/ │ ├── Dockerfile │ ├── Dockerfile-circleci │ └── docker-compose.yml ├── docs/ │ ├── .gitignore │ ├── Makefile │ ├── README.md │ ├── conf.py │ ├── index.rst │ ├── modules/ │ │ ├── checkpoint.rst │ │ ├── config.rst │ │ ├── data.rst │ │ ├── engine.rst │ │ ├── evaluation.rst │ │ ├── export.rst │ │ ├── index.rst │ │ ├── layers.rst │ │ ├── model_zoo.rst │ │ ├── modeling.rst │ │ ├── solver.rst │ │ ├── structures.rst │ │ └── utils.rst │ ├── notes/ │ │ ├── benchmarks.md │ │ ├── changelog.md │ │ ├── compatibility.md │ │ └── index.rst │ └── tutorials/ │ ├── README.md │ ├── configs.md │ ├── data_loading.md │ ├── datasets.md │ ├── deployment.md │ ├── evaluation.md │ ├── extend.md │ ├── index.rst │ ├── models.md │ ├── training.md │ └── write-models.md ├── projects/ │ └── LISA/ │ ├── LISA/ │ │ ├── LISA_meta_arch.py │ │ ├── LISA_rcnn.py │ │ ├── LISA_rpn.py │ │ ├── __init__.py │ │ └── config.py │ ├── SOAP.py │ ├── __init__.py │ ├── config/ │ │ ├── Base-RCNN-FPN.yaml │ │ ├── LISA_101_FPN_3x.yaml │ │ └── LISA_101_FPN_3x_demo.yaml │ ├── defaults.py │ ├── demo.py │ ├── output_light/ │ │ ├── inference/ │ │ │ ├── soba_association_results.json │ │ │ └── soba_instances_results.json │ │ └── last_checkpoint │ ├── predictor.py │ ├── train_net.py │ ├── utils.py │ ├── visualize_data.py │ └── visualize_json_results.py ├── setup.cfg ├── setup.py └── tests/ ├── README.md ├── __init__.py ├── test_anchor_generator.py ├── test_box2box_transform.py ├── test_boxes.py ├── test_checkpoint.py ├── test_config.py ├── test_data_loader.py ├── test_data_transform.py ├── test_fast_rcnn.py ├── test_mask_ops.py ├── test_model_e2e.py ├── test_model_zoo.py ├── test_nms_rotated.py ├── test_roi_align.py ├── test_roi_align_rotated.py ├── test_roi_heads.py ├── test_roi_pooler.py ├── test_rotated_boxes.py ├── test_rpn.py ├── test_sampler.py └── test_visualizer.py ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ /docker/clipboard.txt /projects/LISA/.ipynb_checkpoints/* !/projects/LISA/.SOAP.ipynb.icloud */.DS_Store .DS_Store # output dir output instant_test_output inference_test_output *.txt # compilation and distribution __pycache__ _ext *.pyc *.so *egg-info/ build/ dist/ # pytorch/python/numpy formats *.pth *.pkl *.npy # ipython/jupyter notebooks *.ipynb **/.ipynb_checkpoints/ # Editor temporaries *.swn *.swo *.swp *~ # Pycharm editor settings .idea .vscode .python-version # project dirs /datasets/coco /datasets/lvis /datasets/cityscapes /models /debug /weights eval.sh *.DS_Store ================================================ FILE: LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2019, Facebook, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: PythonAPI/Makefile ================================================ all: # install pycocotools locally python setup.py build_ext --inplace rm -rf build install: # install pycocotools to the Python site-packages python setup.py build_ext install rm -rf build ================================================ FILE: PythonAPI/common/gason.cpp ================================================ // https://github.com/vivkin/gason - pulled January 10, 2016 #include "gason.h" #include #define JSON_ZONE_SIZE 4096 #define JSON_STACK_SIZE 32 const char *jsonStrError(int err) { switch (err) { #define XX(no, str) \ case JSON_##no: \ return str; JSON_ERRNO_MAP(XX) #undef XX default: return "unknown"; } } void *JsonAllocator::allocate(size_t size) { size = (size + 7) & ~7; if (head && head->used + size <= JSON_ZONE_SIZE) { char *p = (char *)head + head->used; head->used += size; return p; } size_t allocSize = sizeof(Zone) + size; Zone *zone = (Zone *)malloc(allocSize <= JSON_ZONE_SIZE ? JSON_ZONE_SIZE : allocSize); if (zone == nullptr) return nullptr; zone->used = allocSize; if (allocSize <= JSON_ZONE_SIZE || head == nullptr) { zone->next = head; head = zone; } else { zone->next = head->next; head->next = zone; } return (char *)zone + sizeof(Zone); } void JsonAllocator::deallocate() { while (head) { Zone *next = head->next; free(head); head = next; } } static inline bool isspace(char c) { return c == ' ' || (c >= '\t' && c <= '\r'); } static inline bool isdelim(char c) { return c == ',' || c == ':' || c == ']' || c == '}' || isspace(c) || !c; } static inline bool isdigit(char c) { return c >= '0' && c <= '9'; } static inline bool isxdigit(char c) { return (c >= '0' && c <= '9') || ((c & ~' ') >= 'A' && (c & ~' ') <= 'F'); } static inline int char2int(char c) { if (c <= '9') return c - '0'; return (c & ~' ') - 'A' + 10; } static double string2double(char *s, char **endptr) { char ch = *s; if (ch == '-') ++s; double result = 0; while (isdigit(*s)) result = (result * 10) + (*s++ - '0'); if (*s == '.') { ++s; double fraction = 1; while (isdigit(*s)) { fraction *= 0.1; result += (*s++ - '0') * fraction; } } if (*s == 'e' || *s == 'E') { ++s; double base = 10; if (*s == '+') ++s; else if (*s == '-') { ++s; base = 0.1; } unsigned int exponent = 0; while (isdigit(*s)) exponent = (exponent * 10) + (*s++ - '0'); double power = 1; for (; exponent; exponent >>= 1, base *= base) if (exponent & 1) power *= base; result *= power; } *endptr = s; return ch == '-' ? -result : result; } static inline JsonNode *insertAfter(JsonNode *tail, JsonNode *node) { if (!tail) return node->next = node; node->next = tail->next; tail->next = node; return node; } static inline JsonValue listToValue(JsonTag tag, JsonNode *tail) { if (tail) { auto head = tail->next; tail->next = nullptr; return JsonValue(tag, head); } return JsonValue(tag, nullptr); } int jsonParse(char *s, char **endptr, JsonValue *value, JsonAllocator &allocator) { JsonNode *tails[JSON_STACK_SIZE]; JsonTag tags[JSON_STACK_SIZE]; char *keys[JSON_STACK_SIZE]; JsonValue o; int pos = -1; bool separator = true; JsonNode *node; *endptr = s; while (*s) { while (isspace(*s)) { ++s; if (!*s) break; } *endptr = s++; switch (**endptr) { case '-': if (!isdigit(*s) && *s != '.') { *endptr = s; return JSON_BAD_NUMBER; } case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': o = JsonValue(string2double(*endptr, &s)); if (!isdelim(*s)) { *endptr = s; return JSON_BAD_NUMBER; } break; case '"': o = JsonValue(JSON_STRING, s); for (char *it = s; *s; ++it, ++s) { int c = *it = *s; if (c == '\\') { c = *++s; switch (c) { case '\\': case '"': case '/': *it = c; break; case 'b': *it = '\b'; break; case 'f': *it = '\f'; break; case 'n': *it = '\n'; break; case 'r': *it = '\r'; break; case 't': *it = '\t'; break; case 'u': c = 0; for (int i = 0; i < 4; ++i) { if (isxdigit(*++s)) { c = c * 16 + char2int(*s); } else { *endptr = s; return JSON_BAD_STRING; } } if (c < 0x80) { *it = c; } else if (c < 0x800) { *it++ = 0xC0 | (c >> 6); *it = 0x80 | (c & 0x3F); } else { *it++ = 0xE0 | (c >> 12); *it++ = 0x80 | ((c >> 6) & 0x3F); *it = 0x80 | (c & 0x3F); } break; default: *endptr = s; return JSON_BAD_STRING; } } else if ((unsigned int)c < ' ' || c == '\x7F') { *endptr = s; return JSON_BAD_STRING; } else if (c == '"') { *it = 0; ++s; break; } } if (!isdelim(*s)) { *endptr = s; return JSON_BAD_STRING; } break; case 't': if (!(s[0] == 'r' && s[1] == 'u' && s[2] == 'e' && isdelim(s[3]))) return JSON_BAD_IDENTIFIER; o = JsonValue(JSON_TRUE); s += 3; break; case 'f': if (!(s[0] == 'a' && s[1] == 'l' && s[2] == 's' && s[3] == 'e' && isdelim(s[4]))) return JSON_BAD_IDENTIFIER; o = JsonValue(JSON_FALSE); s += 4; break; case 'n': if (!(s[0] == 'u' && s[1] == 'l' && s[2] == 'l' && isdelim(s[3]))) return JSON_BAD_IDENTIFIER; o = JsonValue(JSON_NULL); s += 3; break; case ']': if (pos == -1) return JSON_STACK_UNDERFLOW; if (tags[pos] != JSON_ARRAY) return JSON_MISMATCH_BRACKET; o = listToValue(JSON_ARRAY, tails[pos--]); break; case '}': if (pos == -1) return JSON_STACK_UNDERFLOW; if (tags[pos] != JSON_OBJECT) return JSON_MISMATCH_BRACKET; if (keys[pos] != nullptr) return JSON_UNEXPECTED_CHARACTER; o = listToValue(JSON_OBJECT, tails[pos--]); break; case '[': if (++pos == JSON_STACK_SIZE) return JSON_STACK_OVERFLOW; tails[pos] = nullptr; tags[pos] = JSON_ARRAY; keys[pos] = nullptr; separator = true; continue; case '{': if (++pos == JSON_STACK_SIZE) return JSON_STACK_OVERFLOW; tails[pos] = nullptr; tags[pos] = JSON_OBJECT; keys[pos] = nullptr; separator = true; continue; case ':': if (separator || keys[pos] == nullptr) return JSON_UNEXPECTED_CHARACTER; separator = true; continue; case ',': if (separator || keys[pos] != nullptr) return JSON_UNEXPECTED_CHARACTER; separator = true; continue; case '\0': continue; default: return JSON_UNEXPECTED_CHARACTER; } separator = false; if (pos == -1) { *endptr = s; *value = o; return JSON_OK; } if (tags[pos] == JSON_OBJECT) { if (!keys[pos]) { if (o.getTag() != JSON_STRING) return JSON_UNQUOTED_KEY; keys[pos] = o.toString(); continue; } if ((node = (JsonNode *) allocator.allocate(sizeof(JsonNode))) == nullptr) return JSON_ALLOCATION_FAILURE; tails[pos] = insertAfter(tails[pos], node); tails[pos]->key = keys[pos]; keys[pos] = nullptr; } else { if ((node = (JsonNode *) allocator.allocate(sizeof(JsonNode) - sizeof(char *))) == nullptr) return JSON_ALLOCATION_FAILURE; tails[pos] = insertAfter(tails[pos], node); } tails[pos]->value = o; } return JSON_BREAKING_BAD; } ================================================ FILE: PythonAPI/common/gason.h ================================================ // https://github.com/vivkin/gason - pulled January 10, 2016 #pragma once #include #include #include enum JsonTag { JSON_NUMBER = 0, JSON_STRING, JSON_ARRAY, JSON_OBJECT, JSON_TRUE, JSON_FALSE, JSON_NULL = 0xF }; struct JsonNode; #define JSON_VALUE_PAYLOAD_MASK 0x00007FFFFFFFFFFFULL #define JSON_VALUE_NAN_MASK 0x7FF8000000000000ULL #define JSON_VALUE_TAG_MASK 0xF #define JSON_VALUE_TAG_SHIFT 47 union JsonValue { uint64_t ival; double fval; JsonValue(double x) : fval(x) { } JsonValue(JsonTag tag = JSON_NULL, void *payload = nullptr) { assert((uintptr_t)payload <= JSON_VALUE_PAYLOAD_MASK); ival = JSON_VALUE_NAN_MASK | ((uint64_t)tag << JSON_VALUE_TAG_SHIFT) | (uintptr_t)payload; } bool isDouble() const { return (int64_t)ival <= (int64_t)JSON_VALUE_NAN_MASK; } JsonTag getTag() const { return isDouble() ? JSON_NUMBER : JsonTag((ival >> JSON_VALUE_TAG_SHIFT) & JSON_VALUE_TAG_MASK); } uint64_t getPayload() const { assert(!isDouble()); return ival & JSON_VALUE_PAYLOAD_MASK; } double toNumber() const { assert(getTag() == JSON_NUMBER); return fval; } char *toString() const { assert(getTag() == JSON_STRING); return (char *)getPayload(); } JsonNode *toNode() const { assert(getTag() == JSON_ARRAY || getTag() == JSON_OBJECT); return (JsonNode *)getPayload(); } }; struct JsonNode { JsonValue value; JsonNode *next; char *key; }; struct JsonIterator { JsonNode *p; void operator++() { p = p->next; } bool operator!=(const JsonIterator &x) const { return p != x.p; } JsonNode *operator*() const { return p; } JsonNode *operator->() const { return p; } }; inline JsonIterator begin(JsonValue o) { return JsonIterator{o.toNode()}; } inline JsonIterator end(JsonValue) { return JsonIterator{nullptr}; } #define JSON_ERRNO_MAP(XX) \ XX(OK, "ok") \ XX(BAD_NUMBER, "bad number") \ XX(BAD_STRING, "bad string") \ XX(BAD_IDENTIFIER, "bad identifier") \ XX(STACK_OVERFLOW, "stack overflow") \ XX(STACK_UNDERFLOW, "stack underflow") \ XX(MISMATCH_BRACKET, "mismatch bracket") \ XX(UNEXPECTED_CHARACTER, "unexpected character") \ XX(UNQUOTED_KEY, "unquoted key") \ XX(BREAKING_BAD, "breaking bad") \ XX(ALLOCATION_FAILURE, "allocation failure") enum JsonErrno { #define XX(no, str) JSON_##no, JSON_ERRNO_MAP(XX) #undef XX }; const char *jsonStrError(int err); class JsonAllocator { struct Zone { Zone *next; size_t used; } *head = nullptr; public: JsonAllocator() = default; JsonAllocator(const JsonAllocator &) = delete; JsonAllocator &operator=(const JsonAllocator &) = delete; JsonAllocator(JsonAllocator &&x) : head(x.head) { x.head = nullptr; } JsonAllocator &operator=(JsonAllocator &&x) { head = x.head; x.head = nullptr; return *this; } ~JsonAllocator() { deallocate(); } void *allocate(size_t size); void deallocate(); }; int jsonParse(char *str, char **endptr, JsonValue *value, JsonAllocator &allocator); ================================================ FILE: PythonAPI/common/maskApi.c ================================================ /************************************************************************** * Microsoft COCO Toolbox. version 2.0 * Data, paper, and tutorials available at: http://mscoco.org/ * Code written by Piotr Dollar and Tsung-Yi Lin, 2015. * Licensed under the Simplified BSD License [see coco/license.txt] **************************************************************************/ #include "maskApi.h" #include #include uint umin( uint a, uint b ) { return (ab) ? a : b; } void rleInit( RLE *R, siz h, siz w, siz m, uint *cnts ) { R->h=h; R->w=w; R->m=m; R->cnts=(m==0)?0:malloc(sizeof(uint)*m); siz j; if(cnts) for(j=0; jcnts[j]=cnts[j]; } void rleFree( RLE *R ) { free(R->cnts); R->cnts=0; } void rlesInit( RLE **R, siz n ) { siz i; *R = (RLE*) malloc(sizeof(RLE)*n); for(i=0; i0 ) { c=umin(ca,cb); cc+=c; ct=0; ca-=c; if(!ca && a0) { crowd=iscrowd!=NULL && iscrowd[g]; if(dt[d].h!=gt[g].h || dt[d].w!=gt[g].w) { o[g*m+d]=-1; continue; } siz ka, kb, a, b; uint c, ca, cb, ct, i, u; int va, vb; ca=dt[d].cnts[0]; ka=dt[d].m; va=vb=0; cb=gt[g].cnts[0]; kb=gt[g].m; a=b=1; i=u=0; ct=1; while( ct>0 ) { c=umin(ca,cb); if(va||vb) { u+=c; if(va&&vb) i+=c; } ct=0; ca-=c; if(!ca && athr) keep[j]=0; } } } void bbIou( BB dt, BB gt, siz m, siz n, byte *iscrowd, double *o ) { double h, w, i, u, ga, da; siz g, d; int crowd; for( g=0; gthr) keep[j]=0; } } } void rleToBbox( const RLE *R, BB bb, siz n ) { siz i; for( i=0; id?1:c=dy && xs>xe) || (dxye); if(flip) { t=xs; xs=xe; xe=t; t=ys; ys=ye; ye=t; } s = dx>=dy ? (double)(ye-ys)/dx : (double)(xe-xs)/dy; if(dx>=dy) for( d=0; d<=dx; d++ ) { t=flip?dx-d:d; u[m]=t+xs; v[m]=(int)(ys+s*t+.5); m++; } else for( d=0; d<=dy; d++ ) { t=flip?dy-d:d; v[m]=t+ys; u[m]=(int)(xs+s*t+.5); m++; } } /* get points along y-boundary and downsample */ free(x); free(y); k=m; m=0; double xd, yd; x=malloc(sizeof(int)*k); y=malloc(sizeof(int)*k); for( j=1; jw-1 ) continue; yd=(double)(v[j]h) yd=h; yd=ceil(yd); x[m]=(int) xd; y[m]=(int) yd; m++; } /* compute rle encoding given y-boundary points */ k=m; a=malloc(sizeof(uint)*(k+1)); for( j=0; j0) b[m++]=a[j++]; else { j++; if(jm, p=0; long x; int more; char *s=malloc(sizeof(char)*m*6); for( i=0; icnts[i]; if(i>2) x-=(long) R->cnts[i-2]; more=1; while( more ) { char c=x & 0x1f; x >>= 5; more=(c & 0x10) ? x!=-1 : x!=0; if(more) c |= 0x20; c+=48; s[p++]=c; } } s[p]=0; return s; } void rleFrString( RLE *R, char *s, siz h, siz w ) { siz m=0, p=0, k; long x; int more; uint *cnts; while( s[m] ) m++; cnts=malloc(sizeof(uint)*m); m=0; while( s[p] ) { x=0; k=0; more=1; while( more ) { char c=s[p]-48; x |= (c & 0x1f) << 5*k; more = c & 0x20; p++; k++; if(!more && (c & 0x10)) x |= -1 << 5*k; } if(m>2) x+=(long) cnts[m-2]; cnts[m++]=(uint) x; } rleInit(R,h,w,m,cnts); free(cnts); } ================================================ FILE: PythonAPI/common/maskApi.h ================================================ /************************************************************************** * Microsoft COCO Toolbox. version 2.0 * Data, paper, and tutorials available at: http://mscoco.org/ * Code written by Piotr Dollar and Tsung-Yi Lin, 2015. * Licensed under the Simplified BSD License [see coco/license.txt] **************************************************************************/ #pragma once typedef unsigned int uint; typedef unsigned long siz; typedef unsigned char byte; typedef double* BB; typedef struct { siz h, w, m; uint *cnts; } RLE; /* Initialize/destroy RLE. */ void rleInit( RLE *R, siz h, siz w, siz m, uint *cnts ); void rleFree( RLE *R ); /* Initialize/destroy RLE array. */ void rlesInit( RLE **R, siz n ); void rlesFree( RLE **R, siz n ); /* Encode binary masks using RLE. */ void rleEncode( RLE *R, const byte *mask, siz h, siz w, siz n ); /* Decode binary masks encoded via RLE. */ void rleDecode( const RLE *R, byte *mask, siz n ); /* Compute union or intersection of encoded masks. */ void rleMerge( const RLE *R, RLE *M, siz n, int intersect ); /* Compute area of encoded masks. */ void rleArea( const RLE *R, siz n, uint *a ); /* Compute intersection over union between masks. */ void rleIou( RLE *dt, RLE *gt, siz m, siz n, byte *iscrowd, double *o ); /* Compute non-maximum suppression between bounding masks */ void rleNms( RLE *dt, siz n, uint *keep, double thr ); /* Compute intersection over union between bounding boxes. */ void bbIou( BB dt, BB gt, siz m, siz n, byte *iscrowd, double *o ); /* Compute non-maximum suppression between bounding boxes */ void bbNms( BB dt, siz n, uint *keep, double thr ); /* Get bounding boxes surrounding encoded masks. */ void rleToBbox( const RLE *R, BB bb, siz n ); /* Convert bounding boxes to encoded masks. */ void rleFrBbox( RLE *R, const BB bb, siz h, siz w, siz n ); /* Convert polygon to encoded mask. */ void rleFrPoly( RLE *R, const double *xy, siz k, siz h, siz w ); /* Get compressed string representation of encoded mask. */ char* rleToString( const RLE *R ); /* Convert from compressed string representation of encoded mask. */ void rleFrString( RLE *R, char *s, siz h, siz w ); ================================================ FILE: PythonAPI/pysobatools/__init__.py ================================================ __author__ = 'tylin' ================================================ FILE: PythonAPI/pysobatools/_mask.c ================================================ /* Generated by Cython 0.29.13 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else #define CYTHON_ABI "0_29_13" #define CYTHON_HEX_VERSION 0x001D0DF0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #define __PYX_COMMA , #ifndef HAVE_LONG_LONG #if PY_VERSION_HEX >= 0x02070000 #define HAVE_LONG_LONG #endif #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_PYSTON 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #if PY_VERSION_HEX < 0x03050000 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #elif defined(PYSTON_VERSION) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #ifndef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #endif #if PY_VERSION_HEX < 0x02070000 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #elif !defined(CYTHON_USE_PYTYPE_LOOKUP) #define CYTHON_USE_PYTYPE_LOOKUP 1 #endif #if PY_MAJOR_VERSION < 3 #undef CYTHON_USE_ASYNC_SLOTS #define CYTHON_USE_ASYNC_SLOTS 0 #elif !defined(CYTHON_USE_ASYNC_SLOTS) #define CYTHON_USE_ASYNC_SLOTS 1 #endif #if PY_VERSION_HEX < 0x02070000 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #elif !defined(CYTHON_USE_PYLONG_INTERNALS) #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #ifndef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 1 #endif #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #if PY_VERSION_HEX < 0x030300F0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #elif !defined(CYTHON_USE_UNICODE_WRITER) #define CYTHON_USE_UNICODE_WRITER 1 #endif #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #ifndef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 1 #endif #ifndef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) #endif #ifndef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) #endif #ifndef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) #endif #endif #if !defined(CYTHON_FAST_PYCCALL) #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) #endif #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #undef SHIFT #undef BASE #undef MASK #ifdef SIZEOF_VOID_P enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; #endif #endif #ifndef __has_attribute #define __has_attribute(x) 0 #endif #ifndef __has_cpp_attribute #define __has_cpp_attribute(x) 0 #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_MAYBE_UNUSED_VAR # if defined(__cplusplus) template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } # else # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) # endif #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifdef _MSC_VER #ifndef _MSC_STDINT_H_ #if _MSC_VER < 1300 typedef unsigned char uint8_t; typedef unsigned int uint32_t; #else typedef unsigned __int8 uint8_t; typedef unsigned __int32 uint32_t; #endif #endif #else #include #endif #ifndef CYTHON_FALLTHROUGH #if defined(__cplusplus) && __cplusplus >= 201103L #if __has_cpp_attribute(fallthrough) #define CYTHON_FALLTHROUGH [[fallthrough]] #elif __has_cpp_attribute(clang::fallthrough) #define CYTHON_FALLTHROUGH [[clang::fallthrough]] #elif __has_cpp_attribute(gnu::fallthrough) #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_attribute(fallthrough) #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) #else #define CYTHON_FALLTHROUGH #endif #endif #if defined(__clang__ ) && defined(__apple_build_version__) #if __apple_build_version__ < 7000000 #undef CYTHON_FALLTHROUGH #define CYTHON_FALLTHROUGH #endif #endif #endif #ifndef CYTHON_INLINE #if defined(__clang__) #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) #elif defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) #define Py_OptimizeFlag 0 #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyClass_Type #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #endif #define __Pyx_DefaultClassType PyType_Type #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #ifndef METH_STACKLESS #define METH_STACKLESS 0 #endif #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) #ifndef METH_FASTCALL #define METH_FASTCALL 0x80 #endif typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames); #else #define __Pyx_PyCFunctionFast _PyCFunctionFast #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords #endif #if CYTHON_FAST_PYCCALL #define __Pyx_PyFastCFunction_Check(func)\ ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) #else #define __Pyx_PyFastCFunction_Check(func) 0 #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) #define PyObject_Realloc(p) PyMem_Realloc(p) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 #define PyMem_RawMalloc(n) PyMem_Malloc(n) #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) #define PyMem_RawFree(p) PyMem_Free(p) #endif #if CYTHON_COMPILING_IN_PYSTON #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) #else #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) #endif #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000 #define __Pyx_PyThreadState_Current PyThreadState_GET() #elif PY_VERSION_HEX >= 0x03060000 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() #elif PY_VERSION_HEX >= 0x03000000 #define __Pyx_PyThreadState_Current PyThreadState_GET() #else #define __Pyx_PyThreadState_Current _PyThreadState_Current #endif #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) #include "pythread.h" #define Py_tss_NEEDS_INIT 0 typedef int Py_tss_t; static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { *key = PyThread_create_key(); return 0; } static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); *key = Py_tss_NEEDS_INIT; return key; } static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { PyObject_Free(key); } static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { return *key != Py_tss_NEEDS_INIT; } static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { PyThread_delete_key(*key); *key = Py_tss_NEEDS_INIT; } static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { return PyThread_set_key_value(*key, value); } static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { return PyThread_get_key_value(*key); } #endif #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) #else #define __Pyx_PyDict_NewPresized(n) PyDict_New() #endif #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) #else #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name) #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) #else #define CYTHON_PEP393_ENABLED 0 #define PyUnicode_1BYTE_KIND 1 #define PyUnicode_2BYTE_KIND 2 #define PyUnicode_4BYTE_KIND 4 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) #define PyObject_ASCII(o) PyObject_Repr(o) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #define PyObject_Unicode PyObject_Str #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) #else #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) #endif #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t PyInt_AsLong #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif #if CYTHON_USE_ASYNC_SLOTS #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #else #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #endif #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef __Pyx_PyAsyncMethodsStruct typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) #define __Pyx_truncl trunc #else #define __Pyx_truncl truncl #endif #define __PYX_ERR(f_index, lineno, Ln_error) \ { \ __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ } #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__pysobatools___mask #define __PYX_HAVE_API__pysobatools___mask /* Early includes */ #include #include #include "numpy/arrayobject.h" #include "numpy/ufuncobject.h" #include #include "maskApi.h" #ifdef _OPENMP #include #endif /* _OPENMP */ #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) #define CYTHON_WITHOUT_ASSERTIONS #endif typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { return (size_t) i < (size_t) limit; } #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return (size_t)(u_end - u - 1); } #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); #define __Pyx_PySequence_Tuple(obj)\ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_ASSUME_SAFE_MACROS #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) #else #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) #endif #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } static PyObject *__pyx_m = NULL; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_cython_runtime = NULL; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static PyObject *__pyx_empty_unicode; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; /* Header.proto */ #if !defined(CYTHON_CCOMPLEX) #if defined(__cplusplus) #define CYTHON_CCOMPLEX 1 #elif defined(_Complex_I) #define CYTHON_CCOMPLEX 1 #else #define CYTHON_CCOMPLEX 0 #endif #endif #if CYTHON_CCOMPLEX #ifdef __cplusplus #include #else #include #endif #endif #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) #undef _Complex_I #define _Complex_I 1.0fj #endif static const char *__pyx_f[] = { "pysobatools/_mask.pyx", "stringsource", "__init__.pxd", "type.pxd", }; /* BufferFormatStructs.proto */ #define IS_UNSIGNED(type) (((type) -1) > 0) struct __Pyx_StructField_; #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) typedef struct { const char* name; struct __Pyx_StructField_* fields; size_t size; size_t arraysize[8]; int ndim; char typegroup; char is_unsigned; int flags; } __Pyx_TypeInfo; typedef struct __Pyx_StructField_ { __Pyx_TypeInfo* type; const char* name; size_t offset; } __Pyx_StructField; typedef struct { __Pyx_StructField* field; size_t parent_offset; } __Pyx_BufFmt_StackElem; typedef struct { __Pyx_StructField root; __Pyx_BufFmt_StackElem* head; size_t fmt_offset; size_t new_count, enc_count; size_t struct_alignment; int is_complex; char enc_type; char new_packmode; char enc_packmode; char is_valid_array; } __Pyx_BufFmt_Context; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":776 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t */ typedef npy_int8 __pyx_t_5numpy_int8_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":777 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t */ typedef npy_int16 __pyx_t_5numpy_int16_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":778 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< * ctypedef npy_int64 int64_t * #ctypedef npy_int96 int96_t */ typedef npy_int32 __pyx_t_5numpy_int32_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":779 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< * #ctypedef npy_int96 int96_t * #ctypedef npy_int128 int128_t */ typedef npy_int64 __pyx_t_5numpy_int64_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":783 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":784 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":785 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< * ctypedef npy_uint64 uint64_t * #ctypedef npy_uint96 uint96_t */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":786 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< * #ctypedef npy_uint96 uint96_t * #ctypedef npy_uint128 uint128_t */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":790 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< * ctypedef npy_float64 float64_t * #ctypedef npy_float80 float80_t */ typedef npy_float32 __pyx_t_5numpy_float32_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":791 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< * #ctypedef npy_float80 float80_t * #ctypedef npy_float128 float128_t */ typedef npy_float64 __pyx_t_5numpy_float64_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":800 * # The int types are mapped a bit surprising -- * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t # <<<<<<<<<<<<<< * ctypedef npy_longlong long_t * ctypedef npy_longlong longlong_t */ typedef npy_long __pyx_t_5numpy_int_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":801 * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< * ctypedef npy_longlong longlong_t * */ typedef npy_longlong __pyx_t_5numpy_long_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":802 * ctypedef npy_long int_t * ctypedef npy_longlong long_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< * * ctypedef npy_ulong uint_t */ typedef npy_longlong __pyx_t_5numpy_longlong_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":804 * ctypedef npy_longlong longlong_t * * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulong_t * ctypedef npy_ulonglong ulonglong_t */ typedef npy_ulong __pyx_t_5numpy_uint_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":805 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< * ctypedef npy_ulonglong ulonglong_t * */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":806 * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< * * ctypedef npy_intp intp_t */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":808 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< * ctypedef npy_uintp uintp_t * */ typedef npy_intp __pyx_t_5numpy_intp_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":809 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< * * ctypedef npy_double float_t */ typedef npy_uintp __pyx_t_5numpy_uintp_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":811 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t */ typedef npy_double __pyx_t_5numpy_float_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":812 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< * ctypedef npy_longdouble longdouble_t * */ typedef npy_double __pyx_t_5numpy_double_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":813 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< * * ctypedef npy_cfloat cfloat_t */ typedef npy_longdouble __pyx_t_5numpy_longdouble_t; /* Declarations.proto */ #if CYTHON_CCOMPLEX #ifdef __cplusplus typedef ::std::complex< float > __pyx_t_float_complex; #else typedef float _Complex __pyx_t_float_complex; #endif #else typedef struct { float real, imag; } __pyx_t_float_complex; #endif static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float); /* Declarations.proto */ #if CYTHON_CCOMPLEX #ifdef __cplusplus typedef ::std::complex< double > __pyx_t_double_complex; #else typedef double _Complex __pyx_t_double_complex; #endif #else typedef struct { double real, imag; } __pyx_t_double_complex; #endif static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double); /*--- Type declarations ---*/ struct __pyx_obj_11pysobatools_5_mask_RLEs; struct __pyx_obj_11pysobatools_5_mask_Masks; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":815 * ctypedef npy_longdouble longdouble_t * * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t */ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":816 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< * ctypedef npy_clongdouble clongdouble_t * */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":817 * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< * * ctypedef npy_cdouble complex_t */ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":819 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew1(a): */ typedef npy_cdouble __pyx_t_5numpy_complex_t; /* "pysobatools/_mask.pyx":56 * # python class to wrap RLE array in C * # the class handles the memory allocation and deallocation * cdef class RLEs: # <<<<<<<<<<<<<< * cdef RLE *_R * cdef siz _n */ struct __pyx_obj_11pysobatools_5_mask_RLEs { PyObject_HEAD RLE *_R; siz _n; }; /* "pysobatools/_mask.pyx":77 * # python class to wrap Mask array in C * # the class handles the memory allocation and deallocation * cdef class Masks: # <<<<<<<<<<<<<< * cdef byte *_mask * cdef siz _h */ struct __pyx_obj_11pysobatools_5_mask_Masks { PyObject_HEAD byte *_mask; siz _h; siz _w; siz _n; }; /* --- Runtime support code (head) --- */ /* Refnanny.proto */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, int); void (*DECREF)(void*, PyObject*, int); void (*GOTREF)(void*, PyObject*, int); void (*GIVEREF)(void*, PyObject*, int); void* (*SetupContext)(const char*, int, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) #endif #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) /* PyObjectGetAttrStr.proto */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif /* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); /* RaiseDoubleKeywords.proto */ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /* ParseKeywords.proto */ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ const char* function_name); /* RaiseArgTupleInvalid.proto */ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /* IncludeStringH.proto */ #include /* BytesEquals.proto */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /* UnicodeEquals.proto */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /* StrEquals.proto */ #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals #else #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals #endif /* PyCFunctionFastCall.proto */ #if CYTHON_FAST_PYCCALL static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); #else #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) #endif /* PyFunctionFastCall.proto */ #if CYTHON_FAST_PYCALL #define __Pyx_PyFunction_FastCall(func, args, nargs)\ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) #if 1 || PY_VERSION_HEX < 0x030600B1 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); #else #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) #endif #define __Pyx_BUILD_ASSERT_EXPR(cond)\ (sizeof(char [1 - 2*!(cond)]) - 1) #ifndef Py_MEMBER_SIZE #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) #endif static size_t __pyx_pyframe_localsplus_offset = 0; #include "frameobject.h" #define __Pxy_PyFrame_Initialize_Offsets()\ ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) #define __Pyx_PyFrame_GetLocalsplus(frame)\ (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) #endif /* PyObjectCall.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif /* PyObjectCallMethO.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif /* PyObjectCallOneArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); /* PyThreadStateGet.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type #else #define __Pyx_PyThreadState_declare #define __Pyx_PyThreadState_assign #define __Pyx_PyErr_Occurred() PyErr_Occurred() #endif /* PyErrFetchRestore.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) #else #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #endif #else #define __Pyx_PyErr_Clear() PyErr_Clear() #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) #endif /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /* ExtTypeTest.proto */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /* ArgTypeTest.proto */ #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\ __Pyx__ArgTypeTest(obj, type, name, exact)) static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); /* ListAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif /* PyIntBinop.proto */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); #else #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) #endif /* PyIntCompare.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); /* PyDictVersioning.proto */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ (version_var) = __PYX_GET_DICT_VERSION(dict);\ (cache_var) = (value); #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ (VAR) = __pyx_dict_cached_value;\ } else {\ (VAR) = __pyx_dict_cached_value = (LOOKUP);\ __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ }\ } static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); #else #define __PYX_GET_DICT_VERSION(dict) (0) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); #endif /* GetModuleGlobalName.proto */ #if CYTHON_USE_DICT_VERSIONS #define __Pyx_GetModuleGlobalName(var, name) {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } #define __Pyx_GetModuleGlobalNameUncached(var, name) {\ PY_UINT64_T __pyx_dict_version;\ PyObject *__pyx_dict_cached_value;\ (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); #else #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); #endif /* DictGetItem.proto */ #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); #define __Pyx_PyObject_Dict_GetItem(obj, name)\ (likely(PyDict_CheckExact(obj)) ?\ __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) #else #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) #endif /* PyObjectCall2Args.proto */ static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); /* IsLittleEndian.proto */ static CYTHON_INLINE int __Pyx_Is_Little_Endian(void); /* BufferFormatCheck.proto */ static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts); static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, __Pyx_BufFmt_StackElem* stack, __Pyx_TypeInfo* type); /* BufferGetAndValidate.proto */ #define __Pyx_GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)\ ((obj == Py_None || obj == NULL) ?\ (__Pyx_ZeroBuffer(buf), 0) :\ __Pyx__GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)) static int __Pyx__GetBufferAndValidate(Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); static void __Pyx_ZeroBuffer(Py_buffer* buf); static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); static Py_ssize_t __Pyx_minusones[] = { -1, -1, -1, -1, -1, -1, -1, -1 }; static Py_ssize_t __Pyx_zeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; /* ListCompAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif /* FetchCommonType.proto */ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); /* CythonFunction.proto */ #define __Pyx_CyFunction_USED 1 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CyFunction_GetClosure(f)\ (((__pyx_CyFunctionObject *) (f))->func_closure) #define __Pyx_CyFunction_GetClassObj(f)\ (((__pyx_CyFunctionObject *) (f))->func_classobj) #define __Pyx_CyFunction_Defaults(type, f)\ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { PyCFunctionObject func; #if PY_VERSION_HEX < 0x030500A0 PyObject *func_weakreflist; #endif PyObject *func_dict; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_globals; PyObject *func_code; PyObject *func_closure; PyObject *func_classobj; void *defaults; int defaults_pyobjects; int flags; PyObject *defaults_tuple; PyObject *defaults_kwdict; PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; #define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *self, PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __pyx_CyFunction_init(void); /* BufferFallbackError.proto */ static void __Pyx_RaiseBufferFallbackError(void); /* None.proto */ static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); /* BufferIndexError.proto */ static void __Pyx_RaiseBufferIndexError(int axis); #define __Pyx_BufPtrStrided1d(type, buf, i0, s0) (type)((char*)buf + i0 * s0) /* PySequenceContains.proto */ static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } /* RaiseTooManyValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); /* RaiseNeedMoreValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); /* RaiseNoneIterError.proto */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); /* GetTopmostException.proto */ #if CYTHON_USE_EXC_INFO_STACK static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); #endif /* SaveResetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); #else #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) #endif /* PyErrExceptionMatches.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); #else #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) #endif /* GetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); #endif /* PyObject_GenericGetAttrNoDict.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr #endif /* PyObject_GenericGetAttr.proto */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr #endif /* SetupReduce.proto */ static int __Pyx_setup_reduce(PyObject* type_obj); /* TypeImport.proto */ #ifndef __PYX_HAVE_RT_ImportType_proto #define __PYX_HAVE_RT_ImportType_proto enum __Pyx_ImportType_CheckSize { __Pyx_ImportType_CheckSize_Error = 0, __Pyx_ImportType_CheckSize_Warn = 1, __Pyx_ImportType_CheckSize_Ignore = 2 }; static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size); #endif /* Import.proto */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /* CLineInTraceback.proto */ #ifdef CYTHON_CLINE_IN_TRACEBACK #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) #else static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); #endif /* CodeObjectCache.proto */ typedef struct { PyCodeObject* code_object; int code_line; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); /* AddTraceback.proto */ static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /* BufferStructDeclare.proto */ typedef struct { Py_ssize_t shape, strides, suboffsets; } __Pyx_Buf_DimInfo; typedef struct { size_t refcount; Py_buffer pybuffer; } __Pyx_Buffer; typedef struct { __Pyx_Buffer *rcbuffer; char *data; __Pyx_Buf_DimInfo diminfo[8]; } __Pyx_LocalBuf_ND; #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); static void __Pyx_ReleaseBuffer(Py_buffer *view); #else #define __Pyx_GetBuffer PyObject_GetBuffer #define __Pyx_ReleaseBuffer PyBuffer_Release #endif /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_siz(siz value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Py_intptr_t(Py_intptr_t value); /* RealImag.proto */ #if CYTHON_CCOMPLEX #ifdef __cplusplus #define __Pyx_CREAL(z) ((z).real()) #define __Pyx_CIMAG(z) ((z).imag()) #else #define __Pyx_CREAL(z) (__real__(z)) #define __Pyx_CIMAG(z) (__imag__(z)) #endif #else #define __Pyx_CREAL(z) ((z).real) #define __Pyx_CIMAG(z) ((z).imag) #endif #if defined(__cplusplus) && CYTHON_CCOMPLEX\ && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103) #define __Pyx_SET_CREAL(z,x) ((z).real(x)) #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) #else #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) #endif /* Arithmetic.proto */ #if CYTHON_CCOMPLEX #define __Pyx_c_eq_float(a, b) ((a)==(b)) #define __Pyx_c_sum_float(a, b) ((a)+(b)) #define __Pyx_c_diff_float(a, b) ((a)-(b)) #define __Pyx_c_prod_float(a, b) ((a)*(b)) #define __Pyx_c_quot_float(a, b) ((a)/(b)) #define __Pyx_c_neg_float(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero_float(z) ((z)==(float)0) #define __Pyx_c_conj_float(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs_float(z) (::std::abs(z)) #define __Pyx_c_pow_float(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero_float(z) ((z)==0) #define __Pyx_c_conj_float(z) (conjf(z)) #if 1 #define __Pyx_c_abs_float(z) (cabsf(z)) #define __Pyx_c_pow_float(a, b) (cpowf(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex); static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex); #if 1 static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex); static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex); #endif #endif /* Arithmetic.proto */ #if CYTHON_CCOMPLEX #define __Pyx_c_eq_double(a, b) ((a)==(b)) #define __Pyx_c_sum_double(a, b) ((a)+(b)) #define __Pyx_c_diff_double(a, b) ((a)-(b)) #define __Pyx_c_prod_double(a, b) ((a)*(b)) #define __Pyx_c_quot_double(a, b) ((a)/(b)) #define __Pyx_c_neg_double(a) (-(a)) #ifdef __cplusplus #define __Pyx_c_is_zero_double(z) ((z)==(double)0) #define __Pyx_c_conj_double(z) (::std::conj(z)) #if 1 #define __Pyx_c_abs_double(z) (::std::abs(z)) #define __Pyx_c_pow_double(a, b) (::std::pow(a, b)) #endif #else #define __Pyx_c_is_zero_double(z) ((z)==0) #define __Pyx_c_conj_double(z) (conj(z)) #if 1 #define __Pyx_c_abs_double(z) (cabs(z)) #define __Pyx_c_pow_double(a, b) (cpow(a, b)) #endif #endif #else static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex); static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex); #if 1 static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex); static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex); #endif #endif /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); /* CIntFromPy.proto */ static CYTHON_INLINE siz __Pyx_PyInt_As_siz(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); /* FastTypeChecks.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); #else #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) #endif #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) /* CheckBinaryVersion.proto */ static int __Pyx_check_binary_version(void); /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* Module declarations from 'cpython.buffer' */ /* Module declarations from 'libc.string' */ /* Module declarations from 'libc.stdio' */ /* Module declarations from '__builtin__' */ /* Module declarations from 'cpython.type' */ static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0; /* Module declarations from 'cpython' */ /* Module declarations from 'cpython.object' */ /* Module declarations from 'cpython.ref' */ /* Module declarations from 'cpython.mem' */ /* Module declarations from 'numpy' */ /* Module declarations from 'numpy' */ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/ /* Module declarations from 'libc.stdlib' */ /* Module declarations from 'pysobatools._mask' */ static PyTypeObject *__pyx_ptype_11pysobatools_5_mask_RLEs = 0; static PyTypeObject *__pyx_ptype_11pysobatools_5_mask_Masks = 0; static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t = { "uint8_t", NULL, sizeof(__pyx_t_5numpy_uint8_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_uint8_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_uint8_t), 0 }; static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_double_t = { "double_t", NULL, sizeof(__pyx_t_5numpy_double_t), { 0 }, 0, 'R', 0, 0 }; static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_uint32_t = { "uint32_t", NULL, sizeof(__pyx_t_5numpy_uint32_t), { 0 }, 0, IS_UNSIGNED(__pyx_t_5numpy_uint32_t) ? 'U' : 'I', IS_UNSIGNED(__pyx_t_5numpy_uint32_t), 0 }; #define __Pyx_MODULE_NAME "pysobatools._mask" extern int __pyx_module_is_main_pysobatools___mask; int __pyx_module_is_main_pysobatools___mask = 0; /* Implementation of 'pysobatools._mask' */ static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_AttributeError; static PyObject *__pyx_builtin_TypeError; static PyObject *__pyx_builtin_enumerate; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_RuntimeError; static PyObject *__pyx_builtin_ImportError; static const char __pyx_k_F[] = "F"; static const char __pyx_k_N[] = "N"; static const char __pyx_k_R[] = "R"; static const char __pyx_k_a[] = "_a"; static const char __pyx_k_h[] = "h"; static const char __pyx_k_i[] = "i"; static const char __pyx_k_j[] = "j"; static const char __pyx_k_m[] = "m"; static const char __pyx_k_n[] = "n"; static const char __pyx_k_p[] = "p"; static const char __pyx_k_w[] = "w"; static const char __pyx_k_Rs[] = "Rs"; static const char __pyx_k_bb[] = "bb"; static const char __pyx_k_dt[] = "dt"; static const char __pyx_k_gt[] = "gt"; static const char __pyx_k_np[] = "np"; static const char __pyx_k_a_2[] = "a"; static const char __pyx_k_all[] = "all"; static const char __pyx_k_iou[] = "_iou"; static const char __pyx_k_len[] = "_len"; static const char __pyx_k_obj[] = "obj"; static const char __pyx_k_sys[] = "sys"; static const char __pyx_k_RLEs[] = "RLEs"; static const char __pyx_k_area[] = "area"; static const char __pyx_k_bb_2[] = "_bb"; static const char __pyx_k_cnts[] = "cnts"; static const char __pyx_k_data[] = "data"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_mask[] = "mask"; static const char __pyx_k_name[] = "__name__"; static const char __pyx_k_objs[] = "objs"; static const char __pyx_k_poly[] = "poly"; static const char __pyx_k_size[] = "size"; static const char __pyx_k_test[] = "__test__"; static const char __pyx_k_utf8[] = "utf8"; static const char __pyx_k_Masks[] = "Masks"; static const char __pyx_k_array[] = "array"; static const char __pyx_k_bbIou[] = "_bbIou"; static const char __pyx_k_dtype[] = "dtype"; static const char __pyx_k_iou_2[] = "iou"; static const char __pyx_k_isbox[] = "isbox"; static const char __pyx_k_isrle[] = "isrle"; static const char __pyx_k_masks[] = "masks"; static const char __pyx_k_merge[] = "merge"; static const char __pyx_k_numpy[] = "numpy"; static const char __pyx_k_order[] = "order"; static const char __pyx_k_pyobj[] = "pyobj"; static const char __pyx_k_range[] = "range"; static const char __pyx_k_shape[] = "shape"; static const char __pyx_k_uint8[] = "uint8"; static const char __pyx_k_zeros[] = "zeros"; static const char __pyx_k_astype[] = "astype"; static const char __pyx_k_author[] = "__author__"; static const char __pyx_k_counts[] = "counts"; static const char __pyx_k_decode[] = "decode"; static const char __pyx_k_double[] = "double"; static const char __pyx_k_encode[] = "encode"; static const char __pyx_k_frBbox[] = "frBbox"; static const char __pyx_k_frPoly[] = "frPoly"; static const char __pyx_k_import[] = "__import__"; static const char __pyx_k_iouFun[] = "_iouFun"; static const char __pyx_k_reduce[] = "__reduce__"; static const char __pyx_k_rleIou[] = "_rleIou"; static const char __pyx_k_toBbox[] = "toBbox"; static const char __pyx_k_ucRles[] = "ucRles"; static const char __pyx_k_uint32[] = "uint32"; static const char __pyx_k_iscrowd[] = "iscrowd"; static const char __pyx_k_np_poly[] = "np_poly"; static const char __pyx_k_preproc[] = "_preproc"; static const char __pyx_k_reshape[] = "reshape"; static const char __pyx_k_rleObjs[] = "rleObjs"; static const char __pyx_k_tsungyi[] = "tsungyi"; static const char __pyx_k_c_string[] = "c_string"; static const char __pyx_k_frString[] = "_frString"; static const char __pyx_k_getstate[] = "__getstate__"; static const char __pyx_k_setstate[] = "__setstate__"; static const char __pyx_k_toString[] = "_toString"; static const char __pyx_k_TypeError[] = "TypeError"; static const char __pyx_k_enumerate[] = "enumerate"; static const char __pyx_k_intersect[] = "intersect"; static const char __pyx_k_py_string[] = "py_string"; static const char __pyx_k_pyiscrowd[] = "pyiscrowd"; static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; static const char __pyx_k_ValueError[] = "ValueError"; static const char __pyx_k_ImportError[] = "ImportError"; static const char __pyx_k_frPyObjects[] = "frPyObjects"; static const char __pyx_k_RuntimeError[] = "RuntimeError"; static const char __pyx_k_version_info[] = "version_info"; static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; static const char __pyx_k_AttributeError[] = "AttributeError"; static const char __pyx_k_PYTHON_VERSION[] = "PYTHON_VERSION"; static const char __pyx_k_iou_locals__len[] = "iou.._len"; static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; static const char __pyx_k_frUncompressedRLE[] = "frUncompressedRLE"; static const char __pyx_k_iou_locals__bbIou[] = "iou.._bbIou"; static const char __pyx_k_pysobatools__mask[] = "pysobatools._mask"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; static const char __pyx_k_iou_locals__rleIou[] = "iou.._rleIou"; static const char __pyx_k_iou_locals__preproc[] = "iou.._preproc"; static const char __pyx_k_pysobatools__mask_pyx[] = "pysobatools/_mask.pyx"; static const char __pyx_k_input_data_type_not_allowed[] = "input data type not allowed."; static const char __pyx_k_input_type_is_not_supported[] = "input type is not supported."; static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; static const char __pyx_k_Python_version_must_be_2_or_3[] = "Python version must be 2 or 3"; static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; static const char __pyx_k_numpy_ndarray_input_is_only_for[] = "numpy ndarray input is only for *bounding boxes* and should have Nx4 dimension"; static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; static const char __pyx_k_unrecognized_type_The_following[] = "unrecognized type. The following type: RLEs (rle), np.ndarray (box), and list (box) are supported."; static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; static const char __pyx_k_The_dt_and_gt_should_have_the_sa[] = "The dt and gt should have the same data type, either RLEs, list or np.ndarray"; static const char __pyx_k_list_input_can_be_bounding_box_N[] = "list input can be bounding box (Nx4) or RLEs ([RLE])"; static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; static PyObject *__pyx_n_s_AttributeError; static PyObject *__pyx_n_s_F; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; static PyObject *__pyx_n_s_ImportError; static PyObject *__pyx_n_s_Masks; static PyObject *__pyx_n_s_N; static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; static PyObject *__pyx_n_s_PYTHON_VERSION; static PyObject *__pyx_kp_s_Python_version_must_be_2_or_3; static PyObject *__pyx_n_s_R; static PyObject *__pyx_n_s_RLEs; static PyObject *__pyx_n_s_Rs; static PyObject *__pyx_n_s_RuntimeError; static PyObject *__pyx_kp_s_The_dt_and_gt_should_have_the_sa; static PyObject *__pyx_n_s_TypeError; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_n_s_a; static PyObject *__pyx_n_s_a_2; static PyObject *__pyx_n_s_all; static PyObject *__pyx_n_s_area; static PyObject *__pyx_n_s_array; static PyObject *__pyx_n_s_astype; static PyObject *__pyx_n_s_author; static PyObject *__pyx_n_s_bb; static PyObject *__pyx_n_s_bbIou; static PyObject *__pyx_n_s_bb_2; static PyObject *__pyx_n_s_c_string; static PyObject *__pyx_n_s_cline_in_traceback; static PyObject *__pyx_n_s_cnts; static PyObject *__pyx_n_s_counts; static PyObject *__pyx_n_s_data; static PyObject *__pyx_n_s_decode; static PyObject *__pyx_n_s_double; static PyObject *__pyx_n_s_dt; static PyObject *__pyx_n_s_dtype; static PyObject *__pyx_n_s_encode; static PyObject *__pyx_n_s_enumerate; static PyObject *__pyx_n_s_frBbox; static PyObject *__pyx_n_s_frPoly; static PyObject *__pyx_n_s_frPyObjects; static PyObject *__pyx_n_s_frString; static PyObject *__pyx_n_s_frUncompressedRLE; static PyObject *__pyx_n_s_getstate; static PyObject *__pyx_n_s_gt; static PyObject *__pyx_n_s_h; static PyObject *__pyx_n_s_i; static PyObject *__pyx_n_s_import; static PyObject *__pyx_kp_s_input_data_type_not_allowed; static PyObject *__pyx_kp_s_input_type_is_not_supported; static PyObject *__pyx_n_s_intersect; static PyObject *__pyx_n_s_iou; static PyObject *__pyx_n_s_iouFun; static PyObject *__pyx_n_s_iou_2; static PyObject *__pyx_n_s_iou_locals__bbIou; static PyObject *__pyx_n_s_iou_locals__len; static PyObject *__pyx_n_s_iou_locals__preproc; static PyObject *__pyx_n_s_iou_locals__rleIou; static PyObject *__pyx_n_s_isbox; static PyObject *__pyx_n_s_iscrowd; static PyObject *__pyx_n_s_isrle; static PyObject *__pyx_n_s_j; static PyObject *__pyx_n_s_len; static PyObject *__pyx_kp_s_list_input_can_be_bounding_box_N; static PyObject *__pyx_n_s_m; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_mask; static PyObject *__pyx_n_s_masks; static PyObject *__pyx_n_s_merge; static PyObject *__pyx_n_s_n; static PyObject *__pyx_n_s_name; static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; static PyObject *__pyx_kp_s_no_default___reduce___due_to_non; static PyObject *__pyx_n_s_np; static PyObject *__pyx_n_s_np_poly; static PyObject *__pyx_n_s_numpy; static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; static PyObject *__pyx_kp_s_numpy_ndarray_input_is_only_for; static PyObject *__pyx_n_s_obj; static PyObject *__pyx_n_s_objs; static PyObject *__pyx_n_s_order; static PyObject *__pyx_n_s_p; static PyObject *__pyx_n_s_poly; static PyObject *__pyx_n_s_preproc; static PyObject *__pyx_n_s_py_string; static PyObject *__pyx_n_s_pysobatools__mask; static PyObject *__pyx_kp_s_pysobatools__mask_pyx; static PyObject *__pyx_n_s_pyiscrowd; static PyObject *__pyx_n_s_pyobj; static PyObject *__pyx_n_s_range; static PyObject *__pyx_n_s_reduce; static PyObject *__pyx_n_s_reduce_cython; static PyObject *__pyx_n_s_reduce_ex; static PyObject *__pyx_n_s_reshape; static PyObject *__pyx_n_s_rleIou; static PyObject *__pyx_n_s_rleObjs; static PyObject *__pyx_n_s_setstate; static PyObject *__pyx_n_s_setstate_cython; static PyObject *__pyx_n_s_shape; static PyObject *__pyx_n_s_size; static PyObject *__pyx_n_s_sys; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_toBbox; static PyObject *__pyx_n_s_toString; static PyObject *__pyx_n_s_tsungyi; static PyObject *__pyx_n_s_ucRles; static PyObject *__pyx_n_s_uint32; static PyObject *__pyx_n_s_uint8; static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; static PyObject *__pyx_kp_s_unrecognized_type_The_following; static PyObject *__pyx_n_s_utf8; static PyObject *__pyx_n_s_version_info; static PyObject *__pyx_n_s_w; static PyObject *__pyx_n_s_zeros; static int __pyx_pf_11pysobatools_5_mask_4RLEs___cinit__(struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_self, siz __pyx_v_n); /* proto */ static void __pyx_pf_11pysobatools_5_mask_4RLEs_2__dealloc__(struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask_4RLEs_4__getattr__(struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_self, PyObject *__pyx_v_key); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask_4RLEs_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask_4RLEs_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_11pysobatools_5_mask_5Masks___cinit__(struct __pyx_obj_11pysobatools_5_mask_Masks *__pyx_v_self, PyObject *__pyx_v_h, PyObject *__pyx_v_w, PyObject *__pyx_v_n); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask_5Masks_2__array__(struct __pyx_obj_11pysobatools_5_mask_Masks *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask_5Masks_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11pysobatools_5_mask_Masks *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask_5Masks_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11pysobatools_5_mask_Masks *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask__toString(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_Rs); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask_2_frString(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rleObjs); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask_4encode(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask_6decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rleObjs); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask_8merge(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rleObjs, PyObject *__pyx_v_intersect); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask_10area(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rleObjs); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask_3iou__preproc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_objs); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask_3iou_2_rleIou(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_dt, struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_gt, PyArrayObject *__pyx_v_iscrowd, siz __pyx_v_m, siz __pyx_v_n, PyArrayObject *__pyx_v__iou); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask_3iou_4_bbIou(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dt, PyArrayObject *__pyx_v_gt, PyArrayObject *__pyx_v_iscrowd, siz __pyx_v_m, siz __pyx_v_n, PyArrayObject *__pyx_v__iou); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask_3iou_6_len(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask_12iou(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dt, PyObject *__pyx_v_gt, PyObject *__pyx_v_pyiscrowd); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask_14toBbox(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rleObjs); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask_16frBbox(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_bb, siz __pyx_v_h, siz __pyx_v_w); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask_18frPoly(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_poly, siz __pyx_v_h, siz __pyx_v_w); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask_20frUncompressedRLE(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ucRles, CYTHON_UNUSED siz __pyx_v_h, CYTHON_UNUSED siz __pyx_v_w); /* proto */ static PyObject *__pyx_pf_11pysobatools_5_mask_22frPyObjects(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pyobj, PyObject *__pyx_v_h, PyObject *__pyx_v_w); /* proto */ static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ static PyObject *__pyx_tp_new_11pysobatools_5_mask_RLEs(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_11pysobatools_5_mask_Masks(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_2; static PyObject *__pyx_int_3; static PyObject *__pyx_int_4; static PyObject *__pyx_tuple_; static PyObject *__pyx_tuple__2; static PyObject *__pyx_tuple__3; static PyObject *__pyx_tuple__4; static PyObject *__pyx_tuple__5; static PyObject *__pyx_tuple__6; static PyObject *__pyx_tuple__7; static PyObject *__pyx_tuple__8; static PyObject *__pyx_tuple__9; static PyObject *__pyx_tuple__10; static PyObject *__pyx_tuple__12; static PyObject *__pyx_tuple__14; static PyObject *__pyx_tuple__16; static PyObject *__pyx_tuple__18; static PyObject *__pyx_tuple__19; static PyObject *__pyx_tuple__20; static PyObject *__pyx_tuple__21; static PyObject *__pyx_tuple__22; static PyObject *__pyx_tuple__23; static PyObject *__pyx_tuple__24; static PyObject *__pyx_tuple__25; static PyObject *__pyx_tuple__26; static PyObject *__pyx_tuple__27; static PyObject *__pyx_tuple__28; static PyObject *__pyx_tuple__30; static PyObject *__pyx_tuple__32; static PyObject *__pyx_tuple__34; static PyObject *__pyx_tuple__36; static PyObject *__pyx_tuple__38; static PyObject *__pyx_tuple__40; static PyObject *__pyx_tuple__42; static PyObject *__pyx_tuple__44; static PyObject *__pyx_tuple__46; static PyObject *__pyx_tuple__48; static PyObject *__pyx_tuple__50; static PyObject *__pyx_codeobj__11; static PyObject *__pyx_codeobj__13; static PyObject *__pyx_codeobj__15; static PyObject *__pyx_codeobj__17; static PyObject *__pyx_codeobj__29; static PyObject *__pyx_codeobj__31; static PyObject *__pyx_codeobj__33; static PyObject *__pyx_codeobj__35; static PyObject *__pyx_codeobj__37; static PyObject *__pyx_codeobj__39; static PyObject *__pyx_codeobj__41; static PyObject *__pyx_codeobj__43; static PyObject *__pyx_codeobj__45; static PyObject *__pyx_codeobj__47; static PyObject *__pyx_codeobj__49; static PyObject *__pyx_codeobj__51; /* Late includes */ /* "pysobatools/_mask.pyx":60 * cdef siz _n * * def __cinit__(self, siz n =0): # <<<<<<<<<<<<<< * rlesInit(&self._R, n) * self._n = n */ /* Python wrapper */ static int __pyx_pw_11pysobatools_5_mask_4RLEs_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_11pysobatools_5_mask_4RLEs_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { siz __pyx_v_n; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_n,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n); if (value) { values[0] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 60, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } if (values[0]) { __pyx_v_n = __Pyx_PyInt_As_siz(values[0]); if (unlikely((__pyx_v_n == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 60, __pyx_L3_error) } else { __pyx_v_n = ((siz)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 60, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pysobatools._mask.RLEs.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_11pysobatools_5_mask_4RLEs___cinit__(((struct __pyx_obj_11pysobatools_5_mask_RLEs *)__pyx_v_self), __pyx_v_n); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_11pysobatools_5_mask_4RLEs___cinit__(struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_self, siz __pyx_v_n) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* "pysobatools/_mask.pyx":61 * * def __cinit__(self, siz n =0): * rlesInit(&self._R, n) # <<<<<<<<<<<<<< * self._n = n * */ rlesInit((&__pyx_v_self->_R), __pyx_v_n); /* "pysobatools/_mask.pyx":62 * def __cinit__(self, siz n =0): * rlesInit(&self._R, n) * self._n = n # <<<<<<<<<<<<<< * * # free the RLE array here */ __pyx_v_self->_n = __pyx_v_n; /* "pysobatools/_mask.pyx":60 * cdef siz _n * * def __cinit__(self, siz n =0): # <<<<<<<<<<<<<< * rlesInit(&self._R, n) * self._n = n */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pysobatools/_mask.pyx":65 * * # free the RLE array here * def __dealloc__(self): # <<<<<<<<<<<<<< * if self._R is not NULL: * for i in range(self._n): */ /* Python wrapper */ static void __pyx_pw_11pysobatools_5_mask_4RLEs_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_11pysobatools_5_mask_4RLEs_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_11pysobatools_5_mask_4RLEs_2__dealloc__(((struct __pyx_obj_11pysobatools_5_mask_RLEs *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_11pysobatools_5_mask_4RLEs_2__dealloc__(struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_self) { siz __pyx_v_i; __Pyx_RefNannyDeclarations int __pyx_t_1; siz __pyx_t_2; siz __pyx_t_3; siz __pyx_t_4; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "pysobatools/_mask.pyx":66 * # free the RLE array here * def __dealloc__(self): * if self._R is not NULL: # <<<<<<<<<<<<<< * for i in range(self._n): * free(self._R[i].cnts) */ __pyx_t_1 = ((__pyx_v_self->_R != NULL) != 0); if (__pyx_t_1) { /* "pysobatools/_mask.pyx":67 * def __dealloc__(self): * if self._R is not NULL: * for i in range(self._n): # <<<<<<<<<<<<<< * free(self._R[i].cnts) * free(self._R) */ __pyx_t_2 = __pyx_v_self->_n; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pysobatools/_mask.pyx":68 * if self._R is not NULL: * for i in range(self._n): * free(self._R[i].cnts) # <<<<<<<<<<<<<< * free(self._R) * def __getattr__(self, key): */ free((__pyx_v_self->_R[__pyx_v_i]).cnts); } /* "pysobatools/_mask.pyx":69 * for i in range(self._n): * free(self._R[i].cnts) * free(self._R) # <<<<<<<<<<<<<< * def __getattr__(self, key): * if key == 'n': */ free(__pyx_v_self->_R); /* "pysobatools/_mask.pyx":66 * # free the RLE array here * def __dealloc__(self): * if self._R is not NULL: # <<<<<<<<<<<<<< * for i in range(self._n): * free(self._R[i].cnts) */ } /* "pysobatools/_mask.pyx":65 * * # free the RLE array here * def __dealloc__(self): # <<<<<<<<<<<<<< * if self._R is not NULL: * for i in range(self._n): */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "pysobatools/_mask.pyx":70 * free(self._R[i].cnts) * free(self._R) * def __getattr__(self, key): # <<<<<<<<<<<<<< * if key == 'n': * return self._n */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_4RLEs_5__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/ static PyObject *__pyx_pw_11pysobatools_5_mask_4RLEs_5__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0); __pyx_r = __pyx_pf_11pysobatools_5_mask_4RLEs_4__getattr__(((struct __pyx_obj_11pysobatools_5_mask_RLEs *)__pyx_v_self), ((PyObject *)__pyx_v_key)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11pysobatools_5_mask_4RLEs_4__getattr__(struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_self, PyObject *__pyx_v_key) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__getattr__", 0); /* "pysobatools/_mask.pyx":71 * free(self._R) * def __getattr__(self, key): * if key == 'n': # <<<<<<<<<<<<<< * return self._n * raise AttributeError(key) */ __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_key, __pyx_n_s_n, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 71, __pyx_L1_error) if (__pyx_t_1) { /* "pysobatools/_mask.pyx":72 * def __getattr__(self, key): * if key == 'n': * return self._n # <<<<<<<<<<<<<< * raise AttributeError(key) * */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyInt_From_siz(__pyx_v_self->_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "pysobatools/_mask.pyx":71 * free(self._R) * def __getattr__(self, key): * if key == 'n': # <<<<<<<<<<<<<< * return self._n * raise AttributeError(key) */ } /* "pysobatools/_mask.pyx":73 * if key == 'n': * return self._n * raise AttributeError(key) # <<<<<<<<<<<<<< * * # python class to wrap Mask array in C */ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_AttributeError, __pyx_v_key); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(0, 73, __pyx_L1_error) /* "pysobatools/_mask.pyx":70 * free(self._R[i].cnts) * free(self._R) * def __getattr__(self, key): # <<<<<<<<<<<<<< * if key == 'n': * return self._n */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pysobatools._mask.RLEs.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("no default __reduce__ due to non-trivial __cinit__") * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_4RLEs_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_11pysobatools_5_mask_4RLEs_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_11pysobatools_5_mask_4RLEs_6__reduce_cython__(((struct __pyx_obj_11pysobatools_5_mask_RLEs *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11pysobatools_5_mask_4RLEs_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("no default __reduce__ due to non-trivial __cinit__") * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pysobatools._mask.RLEs.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("no default __reduce__ due to non-trivial __cinit__") */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_4RLEs_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_11pysobatools_5_mask_4RLEs_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_11pysobatools_5_mask_4RLEs_8__setstate_cython__(((struct __pyx_obj_11pysobatools_5_mask_RLEs *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11pysobatools_5_mask_4RLEs_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 * raise TypeError("no default __reduce__ due to non-trivial __cinit__") * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("no default __reduce__ due to non-trivial __cinit__") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pysobatools._mask.RLEs.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pysobatools/_mask.pyx":83 * cdef siz _n * * def __cinit__(self, h, w, n): # <<<<<<<<<<<<<< * self._mask = malloc(h*w*n* sizeof(byte)) * self._h = h */ /* Python wrapper */ static int __pyx_pw_11pysobatools_5_mask_5Masks_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_11pysobatools_5_mask_5Masks_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_h = 0; PyObject *__pyx_v_w = 0; PyObject *__pyx_v_n = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_h,&__pyx_n_s_w,&__pyx_n_s_n,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 1); __PYX_ERR(0, 83, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, 2); __PYX_ERR(0, 83, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 83, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_h = values[0]; __pyx_v_w = values[1]; __pyx_v_n = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 83, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pysobatools._mask.Masks.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_11pysobatools_5_mask_5Masks___cinit__(((struct __pyx_obj_11pysobatools_5_mask_Masks *)__pyx_v_self), __pyx_v_h, __pyx_v_w, __pyx_v_n); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_11pysobatools_5_mask_5Masks___cinit__(struct __pyx_obj_11pysobatools_5_mask_Masks *__pyx_v_self, PyObject *__pyx_v_h, PyObject *__pyx_v_w, PyObject *__pyx_v_n) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; siz __pyx_t_5; __Pyx_RefNannySetupContext("__cinit__", 0); /* "pysobatools/_mask.pyx":84 * * def __cinit__(self, h, w, n): * self._mask = malloc(h*w*n* sizeof(byte)) # <<<<<<<<<<<<<< * self._h = h * self._w = w */ __pyx_t_1 = PyNumber_Multiply(__pyx_v_h, __pyx_v_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(byte))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_self->_mask = ((byte *)malloc(__pyx_t_4)); /* "pysobatools/_mask.pyx":85 * def __cinit__(self, h, w, n): * self._mask = malloc(h*w*n* sizeof(byte)) * self._h = h # <<<<<<<<<<<<<< * self._w = w * self._n = n */ __pyx_t_5 = __Pyx_PyInt_As_siz(__pyx_v_h); if (unlikely((__pyx_t_5 == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 85, __pyx_L1_error) __pyx_v_self->_h = __pyx_t_5; /* "pysobatools/_mask.pyx":86 * self._mask = malloc(h*w*n* sizeof(byte)) * self._h = h * self._w = w # <<<<<<<<<<<<<< * self._n = n * # def __dealloc__(self): */ __pyx_t_5 = __Pyx_PyInt_As_siz(__pyx_v_w); if (unlikely((__pyx_t_5 == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 86, __pyx_L1_error) __pyx_v_self->_w = __pyx_t_5; /* "pysobatools/_mask.pyx":87 * self._h = h * self._w = w * self._n = n # <<<<<<<<<<<<<< * # def __dealloc__(self): * # the memory management of _mask has been passed to np.ndarray */ __pyx_t_5 = __Pyx_PyInt_As_siz(__pyx_v_n); if (unlikely((__pyx_t_5 == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 87, __pyx_L1_error) __pyx_v_self->_n = __pyx_t_5; /* "pysobatools/_mask.pyx":83 * cdef siz _n * * def __cinit__(self, h, w, n): # <<<<<<<<<<<<<< * self._mask = malloc(h*w*n* sizeof(byte)) * self._h = h */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pysobatools._mask.Masks.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pysobatools/_mask.pyx":93 * * # called when passing into np.array() and return an np.ndarray in column-major order * def __array__(self): # <<<<<<<<<<<<<< * cdef np.npy_intp shape[1] * shape[0] = self._h*self._w*self._n */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_5Masks_3__array__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_11pysobatools_5_mask_5Masks_3__array__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__array__ (wrapper)", 0); __pyx_r = __pyx_pf_11pysobatools_5_mask_5Masks_2__array__(((struct __pyx_obj_11pysobatools_5_mask_Masks *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11pysobatools_5_mask_5Masks_2__array__(struct __pyx_obj_11pysobatools_5_mask_Masks *__pyx_v_self) { npy_intp __pyx_v_shape[1]; PyObject *__pyx_v_ndarray = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__array__", 0); /* "pysobatools/_mask.pyx":95 * def __array__(self): * cdef np.npy_intp shape[1] * shape[0] = self._h*self._w*self._n # <<<<<<<<<<<<<< * # Create a 1D array, and reshape it to fortran/Matlab column-major array * ndarray = np.PyArray_SimpleNewFromData(1, shape, np.NPY_UINT8, self._mask).reshape((self._h, self._w, self._n), order='F') */ (__pyx_v_shape[0]) = ((((npy_intp)__pyx_v_self->_h) * __pyx_v_self->_w) * __pyx_v_self->_n); /* "pysobatools/_mask.pyx":97 * shape[0] = self._h*self._w*self._n * # Create a 1D array, and reshape it to fortran/Matlab column-major array * ndarray = np.PyArray_SimpleNewFromData(1, shape, np.NPY_UINT8, self._mask).reshape((self._h, self._w, self._n), order='F') # <<<<<<<<<<<<<< * # The _mask allocated by Masks is now handled by ndarray * PyArray_ENABLEFLAGS(ndarray, np.NPY_OWNDATA) */ __pyx_t_1 = PyArray_SimpleNewFromData(1, __pyx_v_shape, NPY_UINT8, __pyx_v_self->_mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_reshape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_siz(__pyx_v_self->_h); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_From_siz(__pyx_v_self->_w); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyInt_From_siz(__pyx_v_self->_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4); __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(0, 97, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_ndarray = __pyx_t_3; __pyx_t_3 = 0; /* "pysobatools/_mask.pyx":99 * ndarray = np.PyArray_SimpleNewFromData(1, shape, np.NPY_UINT8, self._mask).reshape((self._h, self._w, self._n), order='F') * # The _mask allocated by Masks is now handled by ndarray * PyArray_ENABLEFLAGS(ndarray, np.NPY_OWNDATA) # <<<<<<<<<<<<<< * return ndarray * */ if (!(likely(((__pyx_v_ndarray) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_ndarray, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 99, __pyx_L1_error) PyArray_ENABLEFLAGS(((PyArrayObject *)__pyx_v_ndarray), NPY_OWNDATA); /* "pysobatools/_mask.pyx":100 * # The _mask allocated by Masks is now handled by ndarray * PyArray_ENABLEFLAGS(ndarray, np.NPY_OWNDATA) * return ndarray # <<<<<<<<<<<<<< * * # internal conversion from Python RLEs object to compressed RLE format */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_ndarray); __pyx_r = __pyx_v_ndarray; goto __pyx_L0; /* "pysobatools/_mask.pyx":93 * * # called when passing into np.array() and return an np.ndarray in column-major order * def __array__(self): # <<<<<<<<<<<<<< * cdef np.npy_intp shape[1] * shape[0] = self._h*self._w*self._n */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pysobatools._mask.Masks.__array__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ndarray); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("no default __reduce__ due to non-trivial __cinit__") * def __setstate_cython__(self, __pyx_state): */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_5Masks_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_11pysobatools_5_mask_5Masks_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_11pysobatools_5_mask_5Masks_4__reduce_cython__(((struct __pyx_obj_11pysobatools_5_mask_Masks *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11pysobatools_5_mask_5Masks_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_11pysobatools_5_mask_Masks *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError("no default __reduce__ due to non-trivial __cinit__") * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pysobatools._mask.Masks.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("no default __reduce__ due to non-trivial __cinit__") */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_5Masks_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyObject *__pyx_pw_11pysobatools_5_mask_5Masks_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_r = __pyx_pf_11pysobatools_5_mask_5Masks_6__setstate_cython__(((struct __pyx_obj_11pysobatools_5_mask_Masks *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11pysobatools_5_mask_5Masks_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_11pysobatools_5_mask_Masks *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 * raise TypeError("no default __reduce__ due to non-trivial __cinit__") * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError("no default __reduce__ due to non-trivial __cinit__") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pysobatools._mask.Masks.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pysobatools/_mask.pyx":103 * * # internal conversion from Python RLEs object to compressed RLE format * def _toString(RLEs Rs): # <<<<<<<<<<<<<< * cdef siz n = Rs.n * cdef bytes py_string */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_1_toString(PyObject *__pyx_self, PyObject *__pyx_v_Rs); /*proto*/ static PyMethodDef __pyx_mdef_11pysobatools_5_mask_1_toString = {"_toString", (PyCFunction)__pyx_pw_11pysobatools_5_mask_1_toString, METH_O, 0}; static PyObject *__pyx_pw_11pysobatools_5_mask_1_toString(PyObject *__pyx_self, PyObject *__pyx_v_Rs) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_toString (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Rs), __pyx_ptype_11pysobatools_5_mask_RLEs, 1, "Rs", 0))) __PYX_ERR(0, 103, __pyx_L1_error) __pyx_r = __pyx_pf_11pysobatools_5_mask__toString(__pyx_self, ((struct __pyx_obj_11pysobatools_5_mask_RLEs *)__pyx_v_Rs)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11pysobatools_5_mask__toString(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_Rs) { siz __pyx_v_n; PyObject *__pyx_v_py_string = 0; char *__pyx_v_c_string; PyObject *__pyx_v_objs = NULL; siz __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; siz __pyx_t_2; siz __pyx_t_3; siz __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; int __pyx_t_8; __Pyx_RefNannySetupContext("_toString", 0); /* "pysobatools/_mask.pyx":104 * # internal conversion from Python RLEs object to compressed RLE format * def _toString(RLEs Rs): * cdef siz n = Rs.n # <<<<<<<<<<<<<< * cdef bytes py_string * cdef char* c_string */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_Rs), __pyx_n_s_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_siz(__pyx_t_1); if (unlikely((__pyx_t_2 == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_n = __pyx_t_2; /* "pysobatools/_mask.pyx":107 * cdef bytes py_string * cdef char* c_string * objs = [] # <<<<<<<<<<<<<< * for i in range(n): * c_string = rleToString( &Rs._R[i] ) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_objs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":108 * cdef char* c_string * objs = [] * for i in range(n): # <<<<<<<<<<<<<< * c_string = rleToString( &Rs._R[i] ) * py_string = c_string */ __pyx_t_2 = __pyx_v_n; __pyx_t_3 = __pyx_t_2; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pysobatools/_mask.pyx":109 * objs = [] * for i in range(n): * c_string = rleToString( &Rs._R[i] ) # <<<<<<<<<<<<<< * py_string = c_string * objs.append({ */ __pyx_v_c_string = rleToString(((RLE *)(&(__pyx_v_Rs->_R[__pyx_v_i])))); /* "pysobatools/_mask.pyx":110 * for i in range(n): * c_string = rleToString( &Rs._R[i] ) * py_string = c_string # <<<<<<<<<<<<<< * objs.append({ * 'size': [Rs._R[i].h, Rs._R[i].w], */ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_c_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_py_string, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":112 * py_string = c_string * objs.append({ * 'size': [Rs._R[i].h, Rs._R[i].w], # <<<<<<<<<<<<<< * 'counts': py_string * }) */ __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyInt_From_siz((__pyx_v_Rs->_R[__pyx_v_i]).h); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_siz((__pyx_v_Rs->_R[__pyx_v_i]).w); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PyList_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __pyx_t_5 = 0; __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_size, __pyx_t_7) < 0) __PYX_ERR(0, 112, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "pysobatools/_mask.pyx":113 * objs.append({ * 'size': [Rs._R[i].h, Rs._R[i].w], * 'counts': py_string # <<<<<<<<<<<<<< * }) * free(c_string) */ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_counts, __pyx_v_py_string) < 0) __PYX_ERR(0, 112, __pyx_L1_error) /* "pysobatools/_mask.pyx":111 * c_string = rleToString( &Rs._R[i] ) * py_string = c_string * objs.append({ # <<<<<<<<<<<<<< * 'size': [Rs._R[i].h, Rs._R[i].w], * 'counts': py_string */ __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_objs, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 111, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":115 * 'counts': py_string * }) * free(c_string) # <<<<<<<<<<<<<< * return objs * */ free(__pyx_v_c_string); } /* "pysobatools/_mask.pyx":116 * }) * free(c_string) * return objs # <<<<<<<<<<<<<< * * # internal conversion from compressed RLE format to Python RLEs object */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_objs); __pyx_r = __pyx_v_objs; goto __pyx_L0; /* "pysobatools/_mask.pyx":103 * * # internal conversion from Python RLEs object to compressed RLE format * def _toString(RLEs Rs): # <<<<<<<<<<<<<< * cdef siz n = Rs.n * cdef bytes py_string */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pysobatools._mask._toString", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_py_string); __Pyx_XDECREF(__pyx_v_objs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pysobatools/_mask.pyx":119 * * # internal conversion from compressed RLE format to Python RLEs object * def _frString(rleObjs): # <<<<<<<<<<<<<< * cdef siz n = len(rleObjs) * Rs = RLEs(n) */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_3_frString(PyObject *__pyx_self, PyObject *__pyx_v_rleObjs); /*proto*/ static PyMethodDef __pyx_mdef_11pysobatools_5_mask_3_frString = {"_frString", (PyCFunction)__pyx_pw_11pysobatools_5_mask_3_frString, METH_O, 0}; static PyObject *__pyx_pw_11pysobatools_5_mask_3_frString(PyObject *__pyx_self, PyObject *__pyx_v_rleObjs) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_frString (wrapper)", 0); __pyx_r = __pyx_pf_11pysobatools_5_mask_2_frString(__pyx_self, ((PyObject *)__pyx_v_rleObjs)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11pysobatools_5_mask_2_frString(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rleObjs) { siz __pyx_v_n; struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_Rs = NULL; PyObject *__pyx_v_py_string = 0; char *__pyx_v_c_string; PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_obj = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; char *__pyx_t_11; Py_ssize_t __pyx_t_12; siz __pyx_t_13; siz __pyx_t_14; __Pyx_RefNannySetupContext("_frString", 0); /* "pysobatools/_mask.pyx":120 * # internal conversion from compressed RLE format to Python RLEs object * def _frString(rleObjs): * cdef siz n = len(rleObjs) # <<<<<<<<<<<<<< * Rs = RLEs(n) * cdef bytes py_string */ __pyx_t_1 = PyObject_Length(__pyx_v_rleObjs); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 120, __pyx_L1_error) __pyx_v_n = __pyx_t_1; /* "pysobatools/_mask.pyx":121 * def _frString(rleObjs): * cdef siz n = len(rleObjs) * Rs = RLEs(n) # <<<<<<<<<<<<<< * cdef bytes py_string * cdef char* c_string */ __pyx_t_2 = __Pyx_PyInt_From_siz(__pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_11pysobatools_5_mask_RLEs), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_Rs = ((struct __pyx_obj_11pysobatools_5_mask_RLEs *)__pyx_t_3); __pyx_t_3 = 0; /* "pysobatools/_mask.pyx":124 * cdef bytes py_string * cdef char* c_string * for i, obj in enumerate(rleObjs): # <<<<<<<<<<<<<< * if PYTHON_VERSION == 2: * py_string = str(obj['counts']).encode('utf8') */ __Pyx_INCREF(__pyx_int_0); __pyx_t_3 = __pyx_int_0; if (likely(PyList_CheckExact(__pyx_v_rleObjs)) || PyTuple_CheckExact(__pyx_v_rleObjs)) { __pyx_t_2 = __pyx_v_rleObjs; __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_4 = NULL; } else { __pyx_t_1 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_rleObjs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 124, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 124, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 124, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 124, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_obj, __pyx_t_5); __pyx_t_5 = 0; __Pyx_INCREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = __pyx_t_5; __pyx_t_5 = 0; /* "pysobatools/_mask.pyx":125 * cdef char* c_string * for i, obj in enumerate(rleObjs): * if PYTHON_VERSION == 2: # <<<<<<<<<<<<<< * py_string = str(obj['counts']).encode('utf8') * elif PYTHON_VERSION == 3: */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PYTHON_VERSION); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_5, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 125, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_7) { /* "pysobatools/_mask.pyx":126 * for i, obj in enumerate(rleObjs): * if PYTHON_VERSION == 2: * py_string = str(obj['counts']).encode('utf8') # <<<<<<<<<<<<<< * elif PYTHON_VERSION == 3: * py_string = str.encode(obj['counts']) if type(obj['counts']) == str else obj['counts'] */ __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_counts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_8, __pyx_n_s_utf8) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_utf8); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(0, 126, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_py_string, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; /* "pysobatools/_mask.pyx":125 * cdef char* c_string * for i, obj in enumerate(rleObjs): * if PYTHON_VERSION == 2: # <<<<<<<<<<<<<< * py_string = str(obj['counts']).encode('utf8') * elif PYTHON_VERSION == 3: */ goto __pyx_L5; } /* "pysobatools/_mask.pyx":127 * if PYTHON_VERSION == 2: * py_string = str(obj['counts']).encode('utf8') * elif PYTHON_VERSION == 3: # <<<<<<<<<<<<<< * py_string = str.encode(obj['counts']) if type(obj['counts']) == str else obj['counts'] * else: */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PYTHON_VERSION); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 127, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(__pyx_t_7)) { /* "pysobatools/_mask.pyx":128 * py_string = str(obj['counts']).encode('utf8') * elif PYTHON_VERSION == 3: * py_string = str.encode(obj['counts']) if type(obj['counts']) == str else obj['counts'] # <<<<<<<<<<<<<< * else: * raise Exception('Python version must be 2 or 3') */ __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_counts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_t_6)), ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_7) { __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyString_Type)), __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_counts); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_8)->tp_name), 0))) __PYX_ERR(0, 128, __pyx_L1_error) __pyx_t_5 = __pyx_t_8; __pyx_t_8 = 0; } else { __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_counts); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (!(likely(PyBytes_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_8)->tp_name), 0))) __PYX_ERR(0, 128, __pyx_L1_error) __pyx_t_5 = __pyx_t_8; __pyx_t_8 = 0; } __Pyx_XDECREF_SET(__pyx_v_py_string, ((PyObject*)__pyx_t_5)); __pyx_t_5 = 0; /* "pysobatools/_mask.pyx":127 * if PYTHON_VERSION == 2: * py_string = str(obj['counts']).encode('utf8') * elif PYTHON_VERSION == 3: # <<<<<<<<<<<<<< * py_string = str.encode(obj['counts']) if type(obj['counts']) == str else obj['counts'] * else: */ goto __pyx_L5; } /* "pysobatools/_mask.pyx":130 * py_string = str.encode(obj['counts']) if type(obj['counts']) == str else obj['counts'] * else: * raise Exception('Python version must be 2 or 3') # <<<<<<<<<<<<<< * c_string = py_string * rleFrString( &Rs._R[i], c_string, obj['size'][0], obj['size'][1] ) */ /*else*/ { __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(0, 130, __pyx_L1_error) } __pyx_L5:; /* "pysobatools/_mask.pyx":131 * else: * raise Exception('Python version must be 2 or 3') * c_string = py_string # <<<<<<<<<<<<<< * rleFrString( &Rs._R[i], c_string, obj['size'][0], obj['size'][1] ) * return Rs */ if (unlikely(__pyx_v_py_string == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); __PYX_ERR(0, 131, __pyx_L1_error) } __pyx_t_11 = __Pyx_PyBytes_AsWritableString(__pyx_v_py_string); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L1_error) __pyx_v_c_string = __pyx_t_11; /* "pysobatools/_mask.pyx":132 * raise Exception('Python version must be 2 or 3') * c_string = py_string * rleFrString( &Rs._R[i], c_string, obj['size'][0], obj['size'][1] ) # <<<<<<<<<<<<<< * return Rs * */ __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L1_error) __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_13 = __Pyx_PyInt_As_siz(__pyx_t_8); if (unlikely((__pyx_t_13 == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_8, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_14 = __Pyx_PyInt_As_siz(__pyx_t_5); if (unlikely((__pyx_t_14 == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; rleFrString(((RLE *)(&(__pyx_v_Rs->_R[__pyx_t_12]))), ((char *)__pyx_v_c_string), __pyx_t_13, __pyx_t_14); /* "pysobatools/_mask.pyx":124 * cdef bytes py_string * cdef char* c_string * for i, obj in enumerate(rleObjs): # <<<<<<<<<<<<<< * if PYTHON_VERSION == 2: * py_string = str(obj['counts']).encode('utf8') */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pysobatools/_mask.pyx":133 * c_string = py_string * rleFrString( &Rs._R[i], c_string, obj['size'][0], obj['size'][1] ) * return Rs # <<<<<<<<<<<<<< * * # encode mask to RLEs objects */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_Rs)); __pyx_r = ((PyObject *)__pyx_v_Rs); goto __pyx_L0; /* "pysobatools/_mask.pyx":119 * * # internal conversion from compressed RLE format to Python RLEs object * def _frString(rleObjs): # <<<<<<<<<<<<<< * cdef siz n = len(rleObjs) * Rs = RLEs(n) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pysobatools._mask._frString", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_Rs); __Pyx_XDECREF(__pyx_v_py_string); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pysobatools/_mask.pyx":137 * # encode mask to RLEs objects * # list of RLE string can be generated by RLEs member function * def encode(np.ndarray[np.uint8_t, ndim=3, mode='fortran'] mask): # <<<<<<<<<<<<<< * h, w, n = mask.shape[0], mask.shape[1], mask.shape[2] * cdef RLEs Rs = RLEs(n) */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_5encode(PyObject *__pyx_self, PyObject *__pyx_v_mask); /*proto*/ static PyMethodDef __pyx_mdef_11pysobatools_5_mask_5encode = {"encode", (PyCFunction)__pyx_pw_11pysobatools_5_mask_5encode, METH_O, 0}; static PyObject *__pyx_pw_11pysobatools_5_mask_5encode(PyObject *__pyx_self, PyObject *__pyx_v_mask) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("encode (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mask), __pyx_ptype_5numpy_ndarray, 1, "mask", 0))) __PYX_ERR(0, 137, __pyx_L1_error) __pyx_r = __pyx_pf_11pysobatools_5_mask_4encode(__pyx_self, ((PyArrayObject *)__pyx_v_mask)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11pysobatools_5_mask_4encode(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_mask) { npy_intp __pyx_v_h; npy_intp __pyx_v_w; npy_intp __pyx_v_n; struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_Rs = 0; PyObject *__pyx_v_objs = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_mask; __Pyx_Buffer __pyx_pybuffer_mask; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations npy_intp __pyx_t_1; npy_intp __pyx_t_2; npy_intp __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("encode", 0); __pyx_pybuffer_mask.pybuffer.buf = NULL; __pyx_pybuffer_mask.refcount = 0; __pyx_pybuffernd_mask.data = NULL; __pyx_pybuffernd_mask.rcbuffer = &__pyx_pybuffer_mask; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_mask.rcbuffer->pybuffer, (PyObject*)__pyx_v_mask, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_F_CONTIGUOUS, 3, 0, __pyx_stack) == -1)) __PYX_ERR(0, 137, __pyx_L1_error) } __pyx_pybuffernd_mask.diminfo[0].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_mask.diminfo[0].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_mask.diminfo[1].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_mask.diminfo[1].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[1]; __pyx_pybuffernd_mask.diminfo[2].strides = __pyx_pybuffernd_mask.rcbuffer->pybuffer.strides[2]; __pyx_pybuffernd_mask.diminfo[2].shape = __pyx_pybuffernd_mask.rcbuffer->pybuffer.shape[2]; /* "pysobatools/_mask.pyx":138 * # list of RLE string can be generated by RLEs member function * def encode(np.ndarray[np.uint8_t, ndim=3, mode='fortran'] mask): * h, w, n = mask.shape[0], mask.shape[1], mask.shape[2] # <<<<<<<<<<<<<< * cdef RLEs Rs = RLEs(n) * rleEncode(Rs._R,mask.data,h,w,n) */ __pyx_t_1 = (__pyx_v_mask->dimensions[0]); __pyx_t_2 = (__pyx_v_mask->dimensions[1]); __pyx_t_3 = (__pyx_v_mask->dimensions[2]); __pyx_v_h = __pyx_t_1; __pyx_v_w = __pyx_t_2; __pyx_v_n = __pyx_t_3; /* "pysobatools/_mask.pyx":139 * def encode(np.ndarray[np.uint8_t, ndim=3, mode='fortran'] mask): * h, w, n = mask.shape[0], mask.shape[1], mask.shape[2] * cdef RLEs Rs = RLEs(n) # <<<<<<<<<<<<<< * rleEncode(Rs._R,mask.data,h,w,n) * objs = _toString(Rs) */ __pyx_t_4 = __Pyx_PyInt_From_Py_intptr_t(__pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_11pysobatools_5_mask_RLEs), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_Rs = ((struct __pyx_obj_11pysobatools_5_mask_RLEs *)__pyx_t_5); __pyx_t_5 = 0; /* "pysobatools/_mask.pyx":140 * h, w, n = mask.shape[0], mask.shape[1], mask.shape[2] * cdef RLEs Rs = RLEs(n) * rleEncode(Rs._R,mask.data,h,w,n) # <<<<<<<<<<<<<< * objs = _toString(Rs) * return objs */ rleEncode(__pyx_v_Rs->_R, ((byte *)__pyx_v_mask->data), __pyx_v_h, __pyx_v_w, __pyx_v_n); /* "pysobatools/_mask.pyx":141 * cdef RLEs Rs = RLEs(n) * rleEncode(Rs._R,mask.data,h,w,n) * objs = _toString(Rs) # <<<<<<<<<<<<<< * return objs * */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_toString); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, ((PyObject *)__pyx_v_Rs)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_Rs)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_objs = __pyx_t_5; __pyx_t_5 = 0; /* "pysobatools/_mask.pyx":142 * rleEncode(Rs._R,mask.data,h,w,n) * objs = _toString(Rs) * return objs # <<<<<<<<<<<<<< * * # decode mask from compressed list of RLE string or RLEs object */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_objs); __pyx_r = __pyx_v_objs; goto __pyx_L0; /* "pysobatools/_mask.pyx":137 * # encode mask to RLEs objects * # list of RLE string can be generated by RLEs member function * def encode(np.ndarray[np.uint8_t, ndim=3, mode='fortran'] mask): # <<<<<<<<<<<<<< * h, w, n = mask.shape[0], mask.shape[1], mask.shape[2] * cdef RLEs Rs = RLEs(n) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pysobatools._mask.encode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_mask.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_Rs); __Pyx_XDECREF(__pyx_v_objs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pysobatools/_mask.pyx":145 * * # decode mask from compressed list of RLE string or RLEs object * def decode(rleObjs): # <<<<<<<<<<<<<< * cdef RLEs Rs = _frString(rleObjs) * h, w, n = Rs._R[0].h, Rs._R[0].w, Rs._n */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_7decode(PyObject *__pyx_self, PyObject *__pyx_v_rleObjs); /*proto*/ static PyMethodDef __pyx_mdef_11pysobatools_5_mask_7decode = {"decode", (PyCFunction)__pyx_pw_11pysobatools_5_mask_7decode, METH_O, 0}; static PyObject *__pyx_pw_11pysobatools_5_mask_7decode(PyObject *__pyx_self, PyObject *__pyx_v_rleObjs) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("decode (wrapper)", 0); __pyx_r = __pyx_pf_11pysobatools_5_mask_6decode(__pyx_self, ((PyObject *)__pyx_v_rleObjs)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11pysobatools_5_mask_6decode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rleObjs) { struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_Rs = 0; siz __pyx_v_h; siz __pyx_v_w; siz __pyx_v_n; struct __pyx_obj_11pysobatools_5_mask_Masks *__pyx_v_masks = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; siz __pyx_t_4; siz __pyx_t_5; siz __pyx_t_6; PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("decode", 0); /* "pysobatools/_mask.pyx":146 * # decode mask from compressed list of RLE string or RLEs object * def decode(rleObjs): * cdef RLEs Rs = _frString(rleObjs) # <<<<<<<<<<<<<< * h, w, n = Rs._R[0].h, Rs._R[0].w, Rs._n * masks = Masks(h, w, n) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_frString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_rleObjs) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_rleObjs); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11pysobatools_5_mask_RLEs))))) __PYX_ERR(0, 146, __pyx_L1_error) __pyx_v_Rs = ((struct __pyx_obj_11pysobatools_5_mask_RLEs *)__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":147 * def decode(rleObjs): * cdef RLEs Rs = _frString(rleObjs) * h, w, n = Rs._R[0].h, Rs._R[0].w, Rs._n # <<<<<<<<<<<<<< * masks = Masks(h, w, n) * rleDecode(Rs._R, masks._mask, n); */ __pyx_t_4 = (__pyx_v_Rs->_R[0]).h; __pyx_t_5 = (__pyx_v_Rs->_R[0]).w; __pyx_t_6 = __pyx_v_Rs->_n; __pyx_v_h = __pyx_t_4; __pyx_v_w = __pyx_t_5; __pyx_v_n = __pyx_t_6; /* "pysobatools/_mask.pyx":148 * cdef RLEs Rs = _frString(rleObjs) * h, w, n = Rs._R[0].h, Rs._R[0].w, Rs._n * masks = Masks(h, w, n) # <<<<<<<<<<<<<< * rleDecode(Rs._R, masks._mask, n); * return np.array(masks) */ __pyx_t_1 = __Pyx_PyInt_From_siz(__pyx_v_h); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_siz(__pyx_v_w); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_From_siz(__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11pysobatools_5_mask_Masks), __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_masks = ((struct __pyx_obj_11pysobatools_5_mask_Masks *)__pyx_t_3); __pyx_t_3 = 0; /* "pysobatools/_mask.pyx":149 * h, w, n = Rs._R[0].h, Rs._R[0].w, Rs._n * masks = Masks(h, w, n) * rleDecode(Rs._R, masks._mask, n); # <<<<<<<<<<<<<< * return np.array(masks) * */ rleDecode(((RLE *)__pyx_v_Rs->_R), __pyx_v_masks->_mask, __pyx_v_n); /* "pysobatools/_mask.pyx":150 * masks = Masks(h, w, n) * rleDecode(Rs._R, masks._mask, n); * return np.array(masks) # <<<<<<<<<<<<<< * * def merge(rleObjs, intersect=0): */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, ((PyObject *)__pyx_v_masks)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_masks)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pysobatools/_mask.pyx":145 * * # decode mask from compressed list of RLE string or RLEs object * def decode(rleObjs): # <<<<<<<<<<<<<< * cdef RLEs Rs = _frString(rleObjs) * h, w, n = Rs._R[0].h, Rs._R[0].w, Rs._n */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pysobatools._mask.decode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_Rs); __Pyx_XDECREF((PyObject *)__pyx_v_masks); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pysobatools/_mask.pyx":152 * return np.array(masks) * * def merge(rleObjs, intersect=0): # <<<<<<<<<<<<<< * cdef RLEs Rs = _frString(rleObjs) * cdef RLEs R = RLEs(1) */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_9merge(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_11pysobatools_5_mask_9merge = {"merge", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11pysobatools_5_mask_9merge, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_11pysobatools_5_mask_9merge(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_rleObjs = 0; PyObject *__pyx_v_intersect = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("merge (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rleObjs,&__pyx_n_s_intersect,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)__pyx_int_0); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rleObjs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (kw_args > 0) { PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_intersect); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "merge") < 0)) __PYX_ERR(0, 152, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_rleObjs = values[0]; __pyx_v_intersect = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("merge", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 152, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pysobatools._mask.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_11pysobatools_5_mask_8merge(__pyx_self, __pyx_v_rleObjs, __pyx_v_intersect); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11pysobatools_5_mask_8merge(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rleObjs, PyObject *__pyx_v_intersect) { struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_Rs = 0; struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_R = 0; PyObject *__pyx_v_obj = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; __Pyx_RefNannySetupContext("merge", 0); /* "pysobatools/_mask.pyx":153 * * def merge(rleObjs, intersect=0): * cdef RLEs Rs = _frString(rleObjs) # <<<<<<<<<<<<<< * cdef RLEs R = RLEs(1) * rleMerge(Rs._R, R._R, Rs._n, intersect) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_frString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_rleObjs) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_rleObjs); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11pysobatools_5_mask_RLEs))))) __PYX_ERR(0, 153, __pyx_L1_error) __pyx_v_Rs = ((struct __pyx_obj_11pysobatools_5_mask_RLEs *)__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":154 * def merge(rleObjs, intersect=0): * cdef RLEs Rs = _frString(rleObjs) * cdef RLEs R = RLEs(1) # <<<<<<<<<<<<<< * rleMerge(Rs._R, R._R, Rs._n, intersect) * obj = _toString(R)[0] */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11pysobatools_5_mask_RLEs), __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_R = ((struct __pyx_obj_11pysobatools_5_mask_RLEs *)__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":155 * cdef RLEs Rs = _frString(rleObjs) * cdef RLEs R = RLEs(1) * rleMerge(Rs._R, R._R, Rs._n, intersect) # <<<<<<<<<<<<<< * obj = _toString(R)[0] * return obj */ __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_intersect); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 155, __pyx_L1_error) rleMerge(((RLE *)__pyx_v_Rs->_R), ((RLE *)__pyx_v_R->_R), ((siz)__pyx_v_Rs->_n), __pyx_t_4); /* "pysobatools/_mask.pyx":156 * cdef RLEs R = RLEs(1) * rleMerge(Rs._R, R._R, Rs._n, intersect) * obj = _toString(R)[0] # <<<<<<<<<<<<<< * return obj * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_R)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_R)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_obj = __pyx_t_2; __pyx_t_2 = 0; /* "pysobatools/_mask.pyx":157 * rleMerge(Rs._R, R._R, Rs._n, intersect) * obj = _toString(R)[0] * return obj # <<<<<<<<<<<<<< * * def area(rleObjs): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_obj); __pyx_r = __pyx_v_obj; goto __pyx_L0; /* "pysobatools/_mask.pyx":152 * return np.array(masks) * * def merge(rleObjs, intersect=0): # <<<<<<<<<<<<<< * cdef RLEs Rs = _frString(rleObjs) * cdef RLEs R = RLEs(1) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pysobatools._mask.merge", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_Rs); __Pyx_XDECREF((PyObject *)__pyx_v_R); __Pyx_XDECREF(__pyx_v_obj); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pysobatools/_mask.pyx":159 * return obj * * def area(rleObjs): # <<<<<<<<<<<<<< * cdef RLEs Rs = _frString(rleObjs) * cdef uint* _a = malloc(Rs._n* sizeof(uint)) */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_11area(PyObject *__pyx_self, PyObject *__pyx_v_rleObjs); /*proto*/ static PyMethodDef __pyx_mdef_11pysobatools_5_mask_11area = {"area", (PyCFunction)__pyx_pw_11pysobatools_5_mask_11area, METH_O, 0}; static PyObject *__pyx_pw_11pysobatools_5_mask_11area(PyObject *__pyx_self, PyObject *__pyx_v_rleObjs) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("area (wrapper)", 0); __pyx_r = __pyx_pf_11pysobatools_5_mask_10area(__pyx_self, ((PyObject *)__pyx_v_rleObjs)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11pysobatools_5_mask_10area(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rleObjs) { struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_Rs = 0; uint *__pyx_v__a; npy_intp __pyx_v_shape[1]; PyObject *__pyx_v_a = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("area", 0); /* "pysobatools/_mask.pyx":160 * * def area(rleObjs): * cdef RLEs Rs = _frString(rleObjs) # <<<<<<<<<<<<<< * cdef uint* _a = malloc(Rs._n* sizeof(uint)) * rleArea(Rs._R, Rs._n, _a) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_frString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_rleObjs) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_rleObjs); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11pysobatools_5_mask_RLEs))))) __PYX_ERR(0, 160, __pyx_L1_error) __pyx_v_Rs = ((struct __pyx_obj_11pysobatools_5_mask_RLEs *)__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":161 * def area(rleObjs): * cdef RLEs Rs = _frString(rleObjs) * cdef uint* _a = malloc(Rs._n* sizeof(uint)) # <<<<<<<<<<<<<< * rleArea(Rs._R, Rs._n, _a) * cdef np.npy_intp shape[1] */ __pyx_v__a = ((uint *)malloc((__pyx_v_Rs->_n * (sizeof(unsigned int))))); /* "pysobatools/_mask.pyx":162 * cdef RLEs Rs = _frString(rleObjs) * cdef uint* _a = malloc(Rs._n* sizeof(uint)) * rleArea(Rs._R, Rs._n, _a) # <<<<<<<<<<<<<< * cdef np.npy_intp shape[1] * shape[0] = Rs._n */ rleArea(__pyx_v_Rs->_R, __pyx_v_Rs->_n, __pyx_v__a); /* "pysobatools/_mask.pyx":164 * rleArea(Rs._R, Rs._n, _a) * cdef np.npy_intp shape[1] * shape[0] = Rs._n # <<<<<<<<<<<<<< * a = np.array((Rs._n, ), dtype=np.uint8) * a = np.PyArray_SimpleNewFromData(1, shape, np.NPY_UINT32, _a) */ (__pyx_v_shape[0]) = ((npy_intp)__pyx_v_Rs->_n); /* "pysobatools/_mask.pyx":165 * cdef np.npy_intp shape[1] * shape[0] = Rs._n * a = np.array((Rs._n, ), dtype=np.uint8) # <<<<<<<<<<<<<< * a = np.PyArray_SimpleNewFromData(1, shape, np.NPY_UINT32, _a) * PyArray_ENABLEFLAGS(a, np.NPY_OWNDATA) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_siz(__pyx_v_Rs->_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_a = __pyx_t_5; __pyx_t_5 = 0; /* "pysobatools/_mask.pyx":166 * shape[0] = Rs._n * a = np.array((Rs._n, ), dtype=np.uint8) * a = np.PyArray_SimpleNewFromData(1, shape, np.NPY_UINT32, _a) # <<<<<<<<<<<<<< * PyArray_ENABLEFLAGS(a, np.NPY_OWNDATA) * return a */ __pyx_t_5 = PyArray_SimpleNewFromData(1, __pyx_v_shape, NPY_UINT32, __pyx_v__a); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_a, __pyx_t_5); __pyx_t_5 = 0; /* "pysobatools/_mask.pyx":167 * a = np.array((Rs._n, ), dtype=np.uint8) * a = np.PyArray_SimpleNewFromData(1, shape, np.NPY_UINT32, _a) * PyArray_ENABLEFLAGS(a, np.NPY_OWNDATA) # <<<<<<<<<<<<<< * return a * */ if (!(likely(((__pyx_v_a) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_a, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 167, __pyx_L1_error) PyArray_ENABLEFLAGS(((PyArrayObject *)__pyx_v_a), NPY_OWNDATA); /* "pysobatools/_mask.pyx":168 * a = np.PyArray_SimpleNewFromData(1, shape, np.NPY_UINT32, _a) * PyArray_ENABLEFLAGS(a, np.NPY_OWNDATA) * return a # <<<<<<<<<<<<<< * * # iou computation. support function overload (RLEs-RLEs and bbox-bbox). */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_a); __pyx_r = __pyx_v_a; goto __pyx_L0; /* "pysobatools/_mask.pyx":159 * return obj * * def area(rleObjs): # <<<<<<<<<<<<<< * cdef RLEs Rs = _frString(rleObjs) * cdef uint* _a = malloc(Rs._n* sizeof(uint)) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pysobatools._mask.area", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_Rs); __Pyx_XDECREF(__pyx_v_a); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pysobatools/_mask.pyx":171 * * # iou computation. support function overload (RLEs-RLEs and bbox-bbox). * def iou( dt, gt, pyiscrowd ): # <<<<<<<<<<<<<< * def _preproc(objs): * if len(objs) == 0: */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_13iou(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_11pysobatools_5_mask_13iou = {"iou", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11pysobatools_5_mask_13iou, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_11pysobatools_5_mask_13iou(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_dt = 0; PyObject *__pyx_v_gt = 0; PyObject *__pyx_v_pyiscrowd = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("iou (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dt,&__pyx_n_s_gt,&__pyx_n_s_pyiscrowd,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gt)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("iou", 1, 3, 3, 1); __PYX_ERR(0, 171, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyiscrowd)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("iou", 1, 3, 3, 2); __PYX_ERR(0, 171, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "iou") < 0)) __PYX_ERR(0, 171, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_dt = values[0]; __pyx_v_gt = values[1]; __pyx_v_pyiscrowd = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("iou", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 171, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pysobatools._mask.iou", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_11pysobatools_5_mask_12iou(__pyx_self, __pyx_v_dt, __pyx_v_gt, __pyx_v_pyiscrowd); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pysobatools/_mask.pyx":172 * # iou computation. support function overload (RLEs-RLEs and bbox-bbox). * def iou( dt, gt, pyiscrowd ): * def _preproc(objs): # <<<<<<<<<<<<<< * if len(objs) == 0: * return objs */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_3iou_1_preproc(PyObject *__pyx_self, PyObject *__pyx_v_objs); /*proto*/ static PyMethodDef __pyx_mdef_11pysobatools_5_mask_3iou_1_preproc = {"_preproc", (PyCFunction)__pyx_pw_11pysobatools_5_mask_3iou_1_preproc, METH_O, 0}; static PyObject *__pyx_pw_11pysobatools_5_mask_3iou_1_preproc(PyObject *__pyx_self, PyObject *__pyx_v_objs) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_preproc (wrapper)", 0); __pyx_r = __pyx_pf_11pysobatools_5_mask_3iou__preproc(__pyx_self, ((PyObject *)__pyx_v_objs)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11pysobatools_5_mask_3iou__preproc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_objs) { PyObject *__pyx_v_isbox = NULL; PyObject *__pyx_v_isrle = NULL; PyObject *__pyx_v_obj = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *(*__pyx_t_11)(PyObject *); PyObject *__pyx_t_12 = NULL; Py_ssize_t __pyx_t_13; PyObject *__pyx_t_14 = NULL; __Pyx_RefNannySetupContext("_preproc", 0); __Pyx_INCREF(__pyx_v_objs); /* "pysobatools/_mask.pyx":173 * def iou( dt, gt, pyiscrowd ): * def _preproc(objs): * if len(objs) == 0: # <<<<<<<<<<<<<< * return objs * if type(objs) == np.ndarray: */ __pyx_t_1 = PyObject_Length(__pyx_v_objs); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 173, __pyx_L1_error) __pyx_t_2 = ((__pyx_t_1 == 0) != 0); if (__pyx_t_2) { /* "pysobatools/_mask.pyx":174 * def _preproc(objs): * if len(objs) == 0: * return objs # <<<<<<<<<<<<<< * if type(objs) == np.ndarray: * if len(objs.shape) == 1: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_objs); __pyx_r = __pyx_v_objs; goto __pyx_L0; /* "pysobatools/_mask.pyx":173 * def iou( dt, gt, pyiscrowd ): * def _preproc(objs): * if len(objs) == 0: # <<<<<<<<<<<<<< * return objs * if type(objs) == np.ndarray: */ } /* "pysobatools/_mask.pyx":175 * if len(objs) == 0: * return objs * if type(objs) == np.ndarray: # <<<<<<<<<<<<<< * if len(objs.shape) == 1: * objs = objs.reshape((objs[0], 1)) */ __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_objs)), ((PyObject *)__pyx_ptype_5numpy_ndarray), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 175, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 175, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { /* "pysobatools/_mask.pyx":176 * return objs * if type(objs) == np.ndarray: * if len(objs.shape) == 1: # <<<<<<<<<<<<<< * objs = objs.reshape((objs[0], 1)) * # check if it's Nx4 bbox */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_objs, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = ((__pyx_t_1 == 1) != 0); if (__pyx_t_2) { /* "pysobatools/_mask.pyx":177 * if type(objs) == np.ndarray: * if len(objs.shape) == 1: * objs = objs.reshape((objs[0], 1)) # <<<<<<<<<<<<<< * # check if it's Nx4 bbox * if not len(objs.shape) == 2 or not objs.shape[1] == 4: */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_objs, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_objs, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_1); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_objs, __pyx_t_3); __pyx_t_3 = 0; /* "pysobatools/_mask.pyx":176 * return objs * if type(objs) == np.ndarray: * if len(objs.shape) == 1: # <<<<<<<<<<<<<< * objs = objs.reshape((objs[0], 1)) * # check if it's Nx4 bbox */ } /* "pysobatools/_mask.pyx":179 * objs = objs.reshape((objs[0], 1)) * # check if it's Nx4 bbox * if not len(objs.shape) == 2 or not objs.shape[1] == 4: # <<<<<<<<<<<<<< * raise Exception('numpy ndarray input is only for *bounding boxes* and should have Nx4 dimension') * objs = objs.astype(np.double) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_objs, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = ((!((__pyx_t_1 == 2) != 0)) != 0); if (!__pyx_t_7) { } else { __pyx_t_2 = __pyx_t_7; goto __pyx_L7_bool_binop_done; } __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_objs, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_4, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = ((!__pyx_t_7) != 0); __pyx_t_2 = __pyx_t_8; __pyx_L7_bool_binop_done:; if (unlikely(__pyx_t_2)) { /* "pysobatools/_mask.pyx":180 * # check if it's Nx4 bbox * if not len(objs.shape) == 2 or not objs.shape[1] == 4: * raise Exception('numpy ndarray input is only for *bounding boxes* and should have Nx4 dimension') # <<<<<<<<<<<<<< * objs = objs.astype(np.double) * elif type(objs) == list: */ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(0, 180, __pyx_L1_error) /* "pysobatools/_mask.pyx":179 * objs = objs.reshape((objs[0], 1)) * # check if it's Nx4 bbox * if not len(objs.shape) == 2 or not objs.shape[1] == 4: # <<<<<<<<<<<<<< * raise Exception('numpy ndarray input is only for *bounding boxes* and should have Nx4 dimension') * objs = objs.astype(np.double) */ } /* "pysobatools/_mask.pyx":181 * if not len(objs.shape) == 2 or not objs.shape[1] == 4: * raise Exception('numpy ndarray input is only for *bounding boxes* and should have Nx4 dimension') * objs = objs.astype(np.double) # <<<<<<<<<<<<<< * elif type(objs) == list: * # check if list is in box format and convert it to np.ndarray */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_objs, __pyx_n_s_astype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_double); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_objs, __pyx_t_3); __pyx_t_3 = 0; /* "pysobatools/_mask.pyx":175 * if len(objs) == 0: * return objs * if type(objs) == np.ndarray: # <<<<<<<<<<<<<< * if len(objs.shape) == 1: * objs = objs.reshape((objs[0], 1)) */ goto __pyx_L4; } /* "pysobatools/_mask.pyx":182 * raise Exception('numpy ndarray input is only for *bounding boxes* and should have Nx4 dimension') * objs = objs.astype(np.double) * elif type(objs) == list: # <<<<<<<<<<<<<< * # check if list is in box format and convert it to np.ndarray * isbox = np.all(np.array([(len(obj)==4) and ((type(obj)==list) or (type(obj)==np.ndarray)) for obj in objs])) */ __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_objs)), ((PyObject *)(&PyList_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(__pyx_t_2)) { /* "pysobatools/_mask.pyx":184 * elif type(objs) == list: * # check if list is in box format and convert it to np.ndarray * isbox = np.all(np.array([(len(obj)==4) and ((type(obj)==list) or (type(obj)==np.ndarray)) for obj in objs])) # <<<<<<<<<<<<<< * isrle = np.all(np.array([type(obj) == dict for obj in objs])) * if isbox: */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_all); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (likely(PyList_CheckExact(__pyx_v_objs)) || PyTuple_CheckExact(__pyx_v_objs)) { __pyx_t_10 = __pyx_v_objs; __Pyx_INCREF(__pyx_t_10); __pyx_t_1 = 0; __pyx_t_11 = NULL; } else { __pyx_t_1 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_objs); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 184, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_11)) { if (likely(PyList_CheckExact(__pyx_t_10))) { if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_10)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_12 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_1); __Pyx_INCREF(__pyx_t_12); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 184, __pyx_L1_error) #else __pyx_t_12 = PySequence_ITEM(__pyx_t_10, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); #endif } else { if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_10)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_1); __Pyx_INCREF(__pyx_t_12); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 184, __pyx_L1_error) #else __pyx_t_12 = PySequence_ITEM(__pyx_t_10, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); #endif } } else { __pyx_t_12 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_12)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 184, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_12); } __Pyx_XDECREF_SET(__pyx_v_obj, __pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 184, __pyx_L1_error) __pyx_t_2 = (__pyx_t_13 == 4); if (__pyx_t_2) { } else { __pyx_t_14 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_12 = __pyx_t_14; __pyx_t_14 = 0; goto __pyx_L11_bool_binop_done; } __pyx_t_14 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_obj)), ((PyObject *)(&PyList_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 184, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 184, __pyx_L1_error) if (!__pyx_t_2) { __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } else { __Pyx_INCREF(__pyx_t_14); __pyx_t_12 = __pyx_t_14; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L11_bool_binop_done; } __pyx_t_14 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_obj)), ((PyObject *)__pyx_ptype_5numpy_ndarray), Py_EQ); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_INCREF(__pyx_t_14); __pyx_t_12 = __pyx_t_14; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_L11_bool_binop_done:; if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_9, function); } } __pyx_t_4 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_6); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_isbox = __pyx_t_3; __pyx_t_3 = 0; /* "pysobatools/_mask.pyx":185 * # check if list is in box format and convert it to np.ndarray * isbox = np.all(np.array([(len(obj)==4) and ((type(obj)==list) or (type(obj)==np.ndarray)) for obj in objs])) * isrle = np.all(np.array([type(obj) == dict for obj in objs])) # <<<<<<<<<<<<<< * if isbox: * objs = np.array(objs, dtype=np.double) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_all); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_np); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (likely(PyList_CheckExact(__pyx_v_objs)) || PyTuple_CheckExact(__pyx_v_objs)) { __pyx_t_10 = __pyx_v_objs; __Pyx_INCREF(__pyx_t_10); __pyx_t_1 = 0; __pyx_t_11 = NULL; } else { __pyx_t_1 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_objs); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 185, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_11)) { if (likely(PyList_CheckExact(__pyx_t_10))) { if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_10)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_12 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_1); __Pyx_INCREF(__pyx_t_12); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 185, __pyx_L1_error) #else __pyx_t_12 = PySequence_ITEM(__pyx_t_10, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); #endif } else { if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_10)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_1); __Pyx_INCREF(__pyx_t_12); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 185, __pyx_L1_error) #else __pyx_t_12 = PySequence_ITEM(__pyx_t_10, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); #endif } } else { __pyx_t_12 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_12)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 185, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_12); } __Pyx_XDECREF_SET(__pyx_v_obj, __pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_obj)), ((PyObject *)(&PyDict_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_12); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 185, __pyx_L1_error) if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_12))) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_5 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_isrle = __pyx_t_3; __pyx_t_3 = 0; /* "pysobatools/_mask.pyx":186 * isbox = np.all(np.array([(len(obj)==4) and ((type(obj)==list) or (type(obj)==np.ndarray)) for obj in objs])) * isrle = np.all(np.array([type(obj) == dict for obj in objs])) * if isbox: # <<<<<<<<<<<<<< * objs = np.array(objs, dtype=np.double) * if len(objs.shape) == 1: */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_isbox); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 186, __pyx_L1_error) if (__pyx_t_2) { /* "pysobatools/_mask.pyx":187 * isrle = np.all(np.array([type(obj) == dict for obj in objs])) * if isbox: * objs = np.array(objs, dtype=np.double) # <<<<<<<<<<<<<< * if len(objs.shape) == 1: * objs = objs.reshape((1,objs.shape[0])) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_objs); __Pyx_GIVEREF(__pyx_v_objs); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_objs); __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_double); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_objs, __pyx_t_9); __pyx_t_9 = 0; /* "pysobatools/_mask.pyx":188 * if isbox: * objs = np.array(objs, dtype=np.double) * if len(objs.shape) == 1: # <<<<<<<<<<<<<< * objs = objs.reshape((1,objs.shape[0])) * elif isrle: */ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_objs, __pyx_n_s_shape); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_2 = ((__pyx_t_1 == 1) != 0); if (__pyx_t_2) { /* "pysobatools/_mask.pyx":189 * objs = np.array(objs, dtype=np.double) * if len(objs.shape) == 1: * objs = objs.reshape((1,objs.shape[0])) # <<<<<<<<<<<<<< * elif isrle: * objs = _frString(objs) */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_objs, __pyx_n_s_reshape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_objs, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_1); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_9 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_objs, __pyx_t_9); __pyx_t_9 = 0; /* "pysobatools/_mask.pyx":188 * if isbox: * objs = np.array(objs, dtype=np.double) * if len(objs.shape) == 1: # <<<<<<<<<<<<<< * objs = objs.reshape((1,objs.shape[0])) * elif isrle: */ } /* "pysobatools/_mask.pyx":186 * isbox = np.all(np.array([(len(obj)==4) and ((type(obj)==list) or (type(obj)==np.ndarray)) for obj in objs])) * isrle = np.all(np.array([type(obj) == dict for obj in objs])) * if isbox: # <<<<<<<<<<<<<< * objs = np.array(objs, dtype=np.double) * if len(objs.shape) == 1: */ goto __pyx_L16; } /* "pysobatools/_mask.pyx":190 * if len(objs.shape) == 1: * objs = objs.reshape((1,objs.shape[0])) * elif isrle: # <<<<<<<<<<<<<< * objs = _frString(objs) * else: */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_isrle); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 190, __pyx_L1_error) if (likely(__pyx_t_2)) { /* "pysobatools/_mask.pyx":191 * objs = objs.reshape((1,objs.shape[0])) * elif isrle: * objs = _frString(objs) # <<<<<<<<<<<<<< * else: * raise Exception('list input can be bounding box (Nx4) or RLEs ([RLE])') */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_frString); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } __pyx_t_9 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_3, __pyx_v_objs) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_objs); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_objs, __pyx_t_9); __pyx_t_9 = 0; /* "pysobatools/_mask.pyx":190 * if len(objs.shape) == 1: * objs = objs.reshape((1,objs.shape[0])) * elif isrle: # <<<<<<<<<<<<<< * objs = _frString(objs) * else: */ goto __pyx_L16; } /* "pysobatools/_mask.pyx":193 * objs = _frString(objs) * else: * raise Exception('list input can be bounding box (Nx4) or RLEs ([RLE])') # <<<<<<<<<<<<<< * else: * raise Exception('unrecognized type. The following type: RLEs (rle), np.ndarray (box), and list (box) are supported.') */ /*else*/ { __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __PYX_ERR(0, 193, __pyx_L1_error) } __pyx_L16:; /* "pysobatools/_mask.pyx":182 * raise Exception('numpy ndarray input is only for *bounding boxes* and should have Nx4 dimension') * objs = objs.astype(np.double) * elif type(objs) == list: # <<<<<<<<<<<<<< * # check if list is in box format and convert it to np.ndarray * isbox = np.all(np.array([(len(obj)==4) and ((type(obj)==list) or (type(obj)==np.ndarray)) for obj in objs])) */ goto __pyx_L4; } /* "pysobatools/_mask.pyx":195 * raise Exception('list input can be bounding box (Nx4) or RLEs ([RLE])') * else: * raise Exception('unrecognized type. The following type: RLEs (rle), np.ndarray (box), and list (box) are supported.') # <<<<<<<<<<<<<< * return objs * def _rleIou(RLEs dt, RLEs gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): */ /*else*/ { __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __PYX_ERR(0, 195, __pyx_L1_error) } __pyx_L4:; /* "pysobatools/_mask.pyx":196 * else: * raise Exception('unrecognized type. The following type: RLEs (rle), np.ndarray (box), and list (box) are supported.') * return objs # <<<<<<<<<<<<<< * def _rleIou(RLEs dt, RLEs gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): * rleIou( dt._R, gt._R, m, n, iscrowd.data, _iou.data ) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_objs); __pyx_r = __pyx_v_objs; goto __pyx_L0; /* "pysobatools/_mask.pyx":172 * # iou computation. support function overload (RLEs-RLEs and bbox-bbox). * def iou( dt, gt, pyiscrowd ): * def _preproc(objs): # <<<<<<<<<<<<<< * if len(objs) == 0: * return objs */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_14); __Pyx_AddTraceback("pysobatools._mask.iou._preproc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_isbox); __Pyx_XDECREF(__pyx_v_isrle); __Pyx_XDECREF(__pyx_v_obj); __Pyx_XDECREF(__pyx_v_objs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pysobatools/_mask.pyx":197 * raise Exception('unrecognized type. The following type: RLEs (rle), np.ndarray (box), and list (box) are supported.') * return objs * def _rleIou(RLEs dt, RLEs gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): # <<<<<<<<<<<<<< * rleIou( dt._R, gt._R, m, n, iscrowd.data, _iou.data ) * def _bbIou(np.ndarray[np.double_t, ndim=2] dt, np.ndarray[np.double_t, ndim=2] gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_3iou_3_rleIou(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_11pysobatools_5_mask_3iou_3_rleIou = {"_rleIou", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11pysobatools_5_mask_3iou_3_rleIou, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_11pysobatools_5_mask_3iou_3_rleIou(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_dt = 0; struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_gt = 0; PyArrayObject *__pyx_v_iscrowd = 0; siz __pyx_v_m; siz __pyx_v_n; PyArrayObject *__pyx_v__iou = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_rleIou (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dt,&__pyx_n_s_gt,&__pyx_n_s_iscrowd,&__pyx_n_s_m,&__pyx_n_s_n,&__pyx_n_s_iou,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gt)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_rleIou", 1, 6, 6, 1); __PYX_ERR(0, 197, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iscrowd)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_rleIou", 1, 6, 6, 2); __PYX_ERR(0, 197, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_rleIou", 1, 6, 6, 3); __PYX_ERR(0, 197, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_rleIou", 1, 6, 6, 4); __PYX_ERR(0, 197, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iou)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_rleIou", 1, 6, 6, 5); __PYX_ERR(0, 197, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_rleIou") < 0)) __PYX_ERR(0, 197, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_dt = ((struct __pyx_obj_11pysobatools_5_mask_RLEs *)values[0]); __pyx_v_gt = ((struct __pyx_obj_11pysobatools_5_mask_RLEs *)values[1]); __pyx_v_iscrowd = ((PyArrayObject *)values[2]); __pyx_v_m = __Pyx_PyInt_As_siz(values[3]); if (unlikely((__pyx_v_m == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 197, __pyx_L3_error) __pyx_v_n = __Pyx_PyInt_As_siz(values[4]); if (unlikely((__pyx_v_n == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 197, __pyx_L3_error) __pyx_v__iou = ((PyArrayObject *)values[5]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_rleIou", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 197, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pysobatools._mask.iou._rleIou", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_11pysobatools_5_mask_RLEs, 1, "dt", 0))) __PYX_ERR(0, 197, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gt), __pyx_ptype_11pysobatools_5_mask_RLEs, 1, "gt", 0))) __PYX_ERR(0, 197, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iscrowd), __pyx_ptype_5numpy_ndarray, 1, "iscrowd", 0))) __PYX_ERR(0, 197, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v__iou), __pyx_ptype_5numpy_ndarray, 1, "_iou", 0))) __PYX_ERR(0, 197, __pyx_L1_error) __pyx_r = __pyx_pf_11pysobatools_5_mask_3iou_2_rleIou(__pyx_self, __pyx_v_dt, __pyx_v_gt, __pyx_v_iscrowd, __pyx_v_m, __pyx_v_n, __pyx_v__iou); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11pysobatools_5_mask_3iou_2_rleIou(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_dt, struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_gt, PyArrayObject *__pyx_v_iscrowd, siz __pyx_v_m, siz __pyx_v_n, PyArrayObject *__pyx_v__iou) { __Pyx_LocalBuf_ND __pyx_pybuffernd__iou; __Pyx_Buffer __pyx_pybuffer__iou; __Pyx_LocalBuf_ND __pyx_pybuffernd_iscrowd; __Pyx_Buffer __pyx_pybuffer_iscrowd; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_rleIou", 0); __pyx_pybuffer_iscrowd.pybuffer.buf = NULL; __pyx_pybuffer_iscrowd.refcount = 0; __pyx_pybuffernd_iscrowd.data = NULL; __pyx_pybuffernd_iscrowd.rcbuffer = &__pyx_pybuffer_iscrowd; __pyx_pybuffer__iou.pybuffer.buf = NULL; __pyx_pybuffer__iou.refcount = 0; __pyx_pybuffernd__iou.data = NULL; __pyx_pybuffernd__iou.rcbuffer = &__pyx_pybuffer__iou; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iscrowd.rcbuffer->pybuffer, (PyObject*)__pyx_v_iscrowd, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 197, __pyx_L1_error) } __pyx_pybuffernd_iscrowd.diminfo[0].strides = __pyx_pybuffernd_iscrowd.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_iscrowd.diminfo[0].shape = __pyx_pybuffernd_iscrowd.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd__iou.rcbuffer->pybuffer, (PyObject*)__pyx_v__iou, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 197, __pyx_L1_error) } __pyx_pybuffernd__iou.diminfo[0].strides = __pyx_pybuffernd__iou.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd__iou.diminfo[0].shape = __pyx_pybuffernd__iou.rcbuffer->pybuffer.shape[0]; /* "pysobatools/_mask.pyx":198 * return objs * def _rleIou(RLEs dt, RLEs gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): * rleIou( dt._R, gt._R, m, n, iscrowd.data, _iou.data ) # <<<<<<<<<<<<<< * def _bbIou(np.ndarray[np.double_t, ndim=2] dt, np.ndarray[np.double_t, ndim=2] gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): * bbIou( dt.data, gt.data, m, n, iscrowd.data, _iou.data ) */ rleIou(((RLE *)__pyx_v_dt->_R), ((RLE *)__pyx_v_gt->_R), __pyx_v_m, __pyx_v_n, ((byte *)__pyx_v_iscrowd->data), ((double *)__pyx_v__iou->data)); /* "pysobatools/_mask.pyx":197 * raise Exception('unrecognized type. The following type: RLEs (rle), np.ndarray (box), and list (box) are supported.') * return objs * def _rleIou(RLEs dt, RLEs gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): # <<<<<<<<<<<<<< * rleIou( dt._R, gt._R, m, n, iscrowd.data, _iou.data ) * def _bbIou(np.ndarray[np.double_t, ndim=2] dt, np.ndarray[np.double_t, ndim=2] gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd__iou.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iscrowd.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pysobatools._mask.iou._rleIou", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd__iou.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iscrowd.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pysobatools/_mask.pyx":199 * def _rleIou(RLEs dt, RLEs gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): * rleIou( dt._R, gt._R, m, n, iscrowd.data, _iou.data ) * def _bbIou(np.ndarray[np.double_t, ndim=2] dt, np.ndarray[np.double_t, ndim=2] gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): # <<<<<<<<<<<<<< * bbIou( dt.data, gt.data, m, n, iscrowd.data, _iou.data ) * def _len(obj): */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_3iou_5_bbIou(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_11pysobatools_5_mask_3iou_5_bbIou = {"_bbIou", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11pysobatools_5_mask_3iou_5_bbIou, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_11pysobatools_5_mask_3iou_5_bbIou(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_dt = 0; PyArrayObject *__pyx_v_gt = 0; PyArrayObject *__pyx_v_iscrowd = 0; siz __pyx_v_m; siz __pyx_v_n; PyArrayObject *__pyx_v__iou = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_bbIou (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dt,&__pyx_n_s_gt,&__pyx_n_s_iscrowd,&__pyx_n_s_m,&__pyx_n_s_n,&__pyx_n_s_iou,0}; PyObject* values[6] = {0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); CYTHON_FALLTHROUGH; case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); CYTHON_FALLTHROUGH; case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); CYTHON_FALLTHROUGH; case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_gt)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_bbIou", 1, 6, 6, 1); __PYX_ERR(0, 199, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iscrowd)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_bbIou", 1, 6, 6, 2); __PYX_ERR(0, 199, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_bbIou", 1, 6, 6, 3); __PYX_ERR(0, 199, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_bbIou", 1, 6, 6, 4); __PYX_ERR(0, 199, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iou)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_bbIou", 1, 6, 6, 5); __PYX_ERR(0, 199, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_bbIou") < 0)) __PYX_ERR(0, 199, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } __pyx_v_dt = ((PyArrayObject *)values[0]); __pyx_v_gt = ((PyArrayObject *)values[1]); __pyx_v_iscrowd = ((PyArrayObject *)values[2]); __pyx_v_m = __Pyx_PyInt_As_siz(values[3]); if (unlikely((__pyx_v_m == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 199, __pyx_L3_error) __pyx_v_n = __Pyx_PyInt_As_siz(values[4]); if (unlikely((__pyx_v_n == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 199, __pyx_L3_error) __pyx_v__iou = ((PyArrayObject *)values[5]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_bbIou", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 199, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pysobatools._mask.iou._bbIou", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dt), __pyx_ptype_5numpy_ndarray, 1, "dt", 0))) __PYX_ERR(0, 199, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_gt), __pyx_ptype_5numpy_ndarray, 1, "gt", 0))) __PYX_ERR(0, 199, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iscrowd), __pyx_ptype_5numpy_ndarray, 1, "iscrowd", 0))) __PYX_ERR(0, 199, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v__iou), __pyx_ptype_5numpy_ndarray, 1, "_iou", 0))) __PYX_ERR(0, 199, __pyx_L1_error) __pyx_r = __pyx_pf_11pysobatools_5_mask_3iou_4_bbIou(__pyx_self, __pyx_v_dt, __pyx_v_gt, __pyx_v_iscrowd, __pyx_v_m, __pyx_v_n, __pyx_v__iou); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11pysobatools_5_mask_3iou_4_bbIou(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_dt, PyArrayObject *__pyx_v_gt, PyArrayObject *__pyx_v_iscrowd, siz __pyx_v_m, siz __pyx_v_n, PyArrayObject *__pyx_v__iou) { __Pyx_LocalBuf_ND __pyx_pybuffernd__iou; __Pyx_Buffer __pyx_pybuffer__iou; __Pyx_LocalBuf_ND __pyx_pybuffernd_dt; __Pyx_Buffer __pyx_pybuffer_dt; __Pyx_LocalBuf_ND __pyx_pybuffernd_gt; __Pyx_Buffer __pyx_pybuffer_gt; __Pyx_LocalBuf_ND __pyx_pybuffernd_iscrowd; __Pyx_Buffer __pyx_pybuffer_iscrowd; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_bbIou", 0); __pyx_pybuffer_dt.pybuffer.buf = NULL; __pyx_pybuffer_dt.refcount = 0; __pyx_pybuffernd_dt.data = NULL; __pyx_pybuffernd_dt.rcbuffer = &__pyx_pybuffer_dt; __pyx_pybuffer_gt.pybuffer.buf = NULL; __pyx_pybuffer_gt.refcount = 0; __pyx_pybuffernd_gt.data = NULL; __pyx_pybuffernd_gt.rcbuffer = &__pyx_pybuffer_gt; __pyx_pybuffer_iscrowd.pybuffer.buf = NULL; __pyx_pybuffer_iscrowd.refcount = 0; __pyx_pybuffernd_iscrowd.data = NULL; __pyx_pybuffernd_iscrowd.rcbuffer = &__pyx_pybuffer_iscrowd; __pyx_pybuffer__iou.pybuffer.buf = NULL; __pyx_pybuffer__iou.refcount = 0; __pyx_pybuffernd__iou.data = NULL; __pyx_pybuffernd__iou.rcbuffer = &__pyx_pybuffer__iou; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dt.rcbuffer->pybuffer, (PyObject*)__pyx_v_dt, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 199, __pyx_L1_error) } __pyx_pybuffernd_dt.diminfo[0].strides = __pyx_pybuffernd_dt.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dt.diminfo[0].shape = __pyx_pybuffernd_dt.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_dt.diminfo[1].strides = __pyx_pybuffernd_dt.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_dt.diminfo[1].shape = __pyx_pybuffernd_dt.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_gt.rcbuffer->pybuffer, (PyObject*)__pyx_v_gt, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 199, __pyx_L1_error) } __pyx_pybuffernd_gt.diminfo[0].strides = __pyx_pybuffernd_gt.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_gt.diminfo[0].shape = __pyx_pybuffernd_gt.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_gt.diminfo[1].strides = __pyx_pybuffernd_gt.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_gt.diminfo[1].shape = __pyx_pybuffernd_gt.rcbuffer->pybuffer.shape[1]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iscrowd.rcbuffer->pybuffer, (PyObject*)__pyx_v_iscrowd, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 199, __pyx_L1_error) } __pyx_pybuffernd_iscrowd.diminfo[0].strides = __pyx_pybuffernd_iscrowd.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_iscrowd.diminfo[0].shape = __pyx_pybuffernd_iscrowd.rcbuffer->pybuffer.shape[0]; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd__iou.rcbuffer->pybuffer, (PyObject*)__pyx_v__iou, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 199, __pyx_L1_error) } __pyx_pybuffernd__iou.diminfo[0].strides = __pyx_pybuffernd__iou.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd__iou.diminfo[0].shape = __pyx_pybuffernd__iou.rcbuffer->pybuffer.shape[0]; /* "pysobatools/_mask.pyx":200 * rleIou( dt._R, gt._R, m, n, iscrowd.data, _iou.data ) * def _bbIou(np.ndarray[np.double_t, ndim=2] dt, np.ndarray[np.double_t, ndim=2] gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): * bbIou( dt.data, gt.data, m, n, iscrowd.data, _iou.data ) # <<<<<<<<<<<<<< * def _len(obj): * cdef siz N = 0 */ bbIou(((BB)__pyx_v_dt->data), ((BB)__pyx_v_gt->data), __pyx_v_m, __pyx_v_n, ((byte *)__pyx_v_iscrowd->data), ((double *)__pyx_v__iou->data)); /* "pysobatools/_mask.pyx":199 * def _rleIou(RLEs dt, RLEs gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): * rleIou( dt._R, gt._R, m, n, iscrowd.data, _iou.data ) * def _bbIou(np.ndarray[np.double_t, ndim=2] dt, np.ndarray[np.double_t, ndim=2] gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): # <<<<<<<<<<<<<< * bbIou( dt.data, gt.data, m, n, iscrowd.data, _iou.data ) * def _len(obj): */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd__iou.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dt.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_gt.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iscrowd.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pysobatools._mask.iou._bbIou", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd__iou.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dt.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_gt.rcbuffer->pybuffer); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iscrowd.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pysobatools/_mask.pyx":201 * def _bbIou(np.ndarray[np.double_t, ndim=2] dt, np.ndarray[np.double_t, ndim=2] gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): * bbIou( dt.data, gt.data, m, n, iscrowd.data, _iou.data ) * def _len(obj): # <<<<<<<<<<<<<< * cdef siz N = 0 * if type(obj) == RLEs: */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_3iou_7_len(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/ static PyMethodDef __pyx_mdef_11pysobatools_5_mask_3iou_7_len = {"_len", (PyCFunction)__pyx_pw_11pysobatools_5_mask_3iou_7_len, METH_O, 0}; static PyObject *__pyx_pw_11pysobatools_5_mask_3iou_7_len(PyObject *__pyx_self, PyObject *__pyx_v_obj) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_len (wrapper)", 0); __pyx_r = __pyx_pf_11pysobatools_5_mask_3iou_6_len(__pyx_self, ((PyObject *)__pyx_v_obj)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11pysobatools_5_mask_3iou_6_len(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) { siz __pyx_v_N; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; siz __pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_len", 0); /* "pysobatools/_mask.pyx":202 * bbIou( dt.data, gt.data, m, n, iscrowd.data, _iou.data ) * def _len(obj): * cdef siz N = 0 # <<<<<<<<<<<<<< * if type(obj) == RLEs: * N = obj.n */ __pyx_v_N = 0; /* "pysobatools/_mask.pyx":203 * def _len(obj): * cdef siz N = 0 * if type(obj) == RLEs: # <<<<<<<<<<<<<< * N = obj.n * elif len(obj)==0: */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_obj)), ((PyObject *)__pyx_ptype_11pysobatools_5_mask_RLEs), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pysobatools/_mask.pyx":204 * cdef siz N = 0 * if type(obj) == RLEs: * N = obj.n # <<<<<<<<<<<<<< * elif len(obj)==0: * pass */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_As_siz(__pyx_t_1); if (unlikely((__pyx_t_3 == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_3; /* "pysobatools/_mask.pyx":203 * def _len(obj): * cdef siz N = 0 * if type(obj) == RLEs: # <<<<<<<<<<<<<< * N = obj.n * elif len(obj)==0: */ goto __pyx_L3; } /* "pysobatools/_mask.pyx":205 * if type(obj) == RLEs: * N = obj.n * elif len(obj)==0: # <<<<<<<<<<<<<< * pass * elif type(obj) == np.ndarray: */ __pyx_t_4 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 205, __pyx_L1_error) __pyx_t_2 = ((__pyx_t_4 == 0) != 0); if (__pyx_t_2) { goto __pyx_L3; } /* "pysobatools/_mask.pyx":207 * elif len(obj)==0: * pass * elif type(obj) == np.ndarray: # <<<<<<<<<<<<<< * N = obj.shape[0] * return N */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_obj)), ((PyObject *)__pyx_ptype_5numpy_ndarray), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 207, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pysobatools/_mask.pyx":208 * pass * elif type(obj) == np.ndarray: * N = obj.shape[0] # <<<<<<<<<<<<<< * return N * # convert iscrowd to numpy array */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = __Pyx_PyInt_As_siz(__pyx_t_5); if (unlikely((__pyx_t_3 == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_N = __pyx_t_3; /* "pysobatools/_mask.pyx":207 * elif len(obj)==0: * pass * elif type(obj) == np.ndarray: # <<<<<<<<<<<<<< * N = obj.shape[0] * return N */ } __pyx_L3:; /* "pysobatools/_mask.pyx":209 * elif type(obj) == np.ndarray: * N = obj.shape[0] * return N # <<<<<<<<<<<<<< * # convert iscrowd to numpy array * cdef np.ndarray[np.uint8_t, ndim=1] iscrowd = np.array(pyiscrowd, dtype=np.uint8) */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyInt_From_siz(__pyx_v_N); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pysobatools/_mask.pyx":201 * def _bbIou(np.ndarray[np.double_t, ndim=2] dt, np.ndarray[np.double_t, ndim=2] gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): * bbIou( dt.data, gt.data, m, n, iscrowd.data, _iou.data ) * def _len(obj): # <<<<<<<<<<<<<< * cdef siz N = 0 * if type(obj) == RLEs: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pysobatools._mask.iou._len", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pysobatools/_mask.pyx":171 * * # iou computation. support function overload (RLEs-RLEs and bbox-bbox). * def iou( dt, gt, pyiscrowd ): # <<<<<<<<<<<<<< * def _preproc(objs): * if len(objs) == 0: */ static PyObject *__pyx_pf_11pysobatools_5_mask_12iou(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_dt, PyObject *__pyx_v_gt, PyObject *__pyx_v_pyiscrowd) { PyObject *__pyx_v__preproc = 0; PyObject *__pyx_v__rleIou = 0; PyObject *__pyx_v__bbIou = 0; PyObject *__pyx_v__len = 0; PyArrayObject *__pyx_v_iscrowd = 0; siz __pyx_v_m; siz __pyx_v_n; double *__pyx_v__iou; npy_intp __pyx_v_shape[1]; PyObject *__pyx_v__iouFun = NULL; PyObject *__pyx_v_iou = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_iscrowd; __Pyx_Buffer __pyx_pybuffer_iscrowd; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyArrayObject *__pyx_t_6 = NULL; siz __pyx_t_7; int __pyx_t_8; int __pyx_t_9; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; __Pyx_RefNannySetupContext("iou", 0); __Pyx_INCREF(__pyx_v_dt); __Pyx_INCREF(__pyx_v_gt); __pyx_pybuffer_iscrowd.pybuffer.buf = NULL; __pyx_pybuffer_iscrowd.refcount = 0; __pyx_pybuffernd_iscrowd.data = NULL; __pyx_pybuffernd_iscrowd.rcbuffer = &__pyx_pybuffer_iscrowd; /* "pysobatools/_mask.pyx":172 * # iou computation. support function overload (RLEs-RLEs and bbox-bbox). * def iou( dt, gt, pyiscrowd ): * def _preproc(objs): # <<<<<<<<<<<<<< * if len(objs) == 0: * return objs */ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11pysobatools_5_mask_3iou_1_preproc, 0, __pyx_n_s_iou_locals__preproc, NULL, __pyx_n_s_pysobatools__mask, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__preproc = __pyx_t_1; __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":197 * raise Exception('unrecognized type. The following type: RLEs (rle), np.ndarray (box), and list (box) are supported.') * return objs * def _rleIou(RLEs dt, RLEs gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): # <<<<<<<<<<<<<< * rleIou( dt._R, gt._R, m, n, iscrowd.data, _iou.data ) * def _bbIou(np.ndarray[np.double_t, ndim=2] dt, np.ndarray[np.double_t, ndim=2] gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): */ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11pysobatools_5_mask_3iou_3_rleIou, 0, __pyx_n_s_iou_locals__rleIou, NULL, __pyx_n_s_pysobatools__mask, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__rleIou = __pyx_t_1; __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":199 * def _rleIou(RLEs dt, RLEs gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): * rleIou( dt._R, gt._R, m, n, iscrowd.data, _iou.data ) * def _bbIou(np.ndarray[np.double_t, ndim=2] dt, np.ndarray[np.double_t, ndim=2] gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): # <<<<<<<<<<<<<< * bbIou( dt.data, gt.data, m, n, iscrowd.data, _iou.data ) * def _len(obj): */ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11pysobatools_5_mask_3iou_5_bbIou, 0, __pyx_n_s_iou_locals__bbIou, NULL, __pyx_n_s_pysobatools__mask, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__bbIou = __pyx_t_1; __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":201 * def _bbIou(np.ndarray[np.double_t, ndim=2] dt, np.ndarray[np.double_t, ndim=2] gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): * bbIou( dt.data, gt.data, m, n, iscrowd.data, _iou.data ) * def _len(obj): # <<<<<<<<<<<<<< * cdef siz N = 0 * if type(obj) == RLEs: */ __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_11pysobatools_5_mask_3iou_7_len, 0, __pyx_n_s_iou_locals__len, NULL, __pyx_n_s_pysobatools__mask, __pyx_d, ((PyObject *)__pyx_codeobj__17)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__len = __pyx_t_1; __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":211 * return N * # convert iscrowd to numpy array * cdef np.ndarray[np.uint8_t, ndim=1] iscrowd = np.array(pyiscrowd, dtype=np.uint8) # <<<<<<<<<<<<<< * # simple type checking * cdef siz m, n */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_pyiscrowd); __Pyx_GIVEREF(__pyx_v_pyiscrowd); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_pyiscrowd); __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_uint8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 211, __pyx_L1_error) __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_iscrowd.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_iscrowd = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_iscrowd.rcbuffer->pybuffer.buf = NULL; __PYX_ERR(0, 211, __pyx_L1_error) } else {__pyx_pybuffernd_iscrowd.diminfo[0].strides = __pyx_pybuffernd_iscrowd.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_iscrowd.diminfo[0].shape = __pyx_pybuffernd_iscrowd.rcbuffer->pybuffer.shape[0]; } } __pyx_t_6 = 0; __pyx_v_iscrowd = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; /* "pysobatools/_mask.pyx":214 * # simple type checking * cdef siz m, n * dt = _preproc(dt) # <<<<<<<<<<<<<< * gt = _preproc(gt) * m = _len(dt) */ __pyx_t_5 = __pyx_pf_11pysobatools_5_mask_3iou__preproc(__pyx_v__preproc, __pyx_v_dt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_dt, __pyx_t_5); __pyx_t_5 = 0; /* "pysobatools/_mask.pyx":215 * cdef siz m, n * dt = _preproc(dt) * gt = _preproc(gt) # <<<<<<<<<<<<<< * m = _len(dt) * n = _len(gt) */ __pyx_t_5 = __pyx_pf_11pysobatools_5_mask_3iou__preproc(__pyx_v__preproc, __pyx_v_gt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_gt, __pyx_t_5); __pyx_t_5 = 0; /* "pysobatools/_mask.pyx":216 * dt = _preproc(dt) * gt = _preproc(gt) * m = _len(dt) # <<<<<<<<<<<<<< * n = _len(gt) * if m == 0 or n == 0: */ __pyx_t_5 = __pyx_pf_11pysobatools_5_mask_3iou_6_len(__pyx_v__len, __pyx_v_dt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyInt_As_siz(__pyx_t_5); if (unlikely((__pyx_t_7 == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 216, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_m = __pyx_t_7; /* "pysobatools/_mask.pyx":217 * gt = _preproc(gt) * m = _len(dt) * n = _len(gt) # <<<<<<<<<<<<<< * if m == 0 or n == 0: * return [] */ __pyx_t_5 = __pyx_pf_11pysobatools_5_mask_3iou_6_len(__pyx_v__len, __pyx_v_gt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = __Pyx_PyInt_As_siz(__pyx_t_5); if (unlikely((__pyx_t_7 == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_n = __pyx_t_7; /* "pysobatools/_mask.pyx":218 * m = _len(dt) * n = _len(gt) * if m == 0 or n == 0: # <<<<<<<<<<<<<< * return [] * if not type(dt) == type(gt): */ __pyx_t_9 = ((__pyx_v_m == 0) != 0); if (!__pyx_t_9) { } else { __pyx_t_8 = __pyx_t_9; goto __pyx_L4_bool_binop_done; } __pyx_t_9 = ((__pyx_v_n == 0) != 0); __pyx_t_8 = __pyx_t_9; __pyx_L4_bool_binop_done:; if (__pyx_t_8) { /* "pysobatools/_mask.pyx":219 * n = _len(gt) * if m == 0 or n == 0: * return [] # <<<<<<<<<<<<<< * if not type(dt) == type(gt): * raise Exception('The dt and gt should have the same data type, either RLEs, list or np.ndarray') */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "pysobatools/_mask.pyx":218 * m = _len(dt) * n = _len(gt) * if m == 0 or n == 0: # <<<<<<<<<<<<<< * return [] * if not type(dt) == type(gt): */ } /* "pysobatools/_mask.pyx":220 * if m == 0 or n == 0: * return [] * if not type(dt) == type(gt): # <<<<<<<<<<<<<< * raise Exception('The dt and gt should have the same data type, either RLEs, list or np.ndarray') * */ __pyx_t_5 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_dt)), ((PyObject *)Py_TYPE(__pyx_v_gt)), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 220, __pyx_L1_error) __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = ((!__pyx_t_8) != 0); if (unlikely(__pyx_t_9)) { /* "pysobatools/_mask.pyx":221 * return [] * if not type(dt) == type(gt): * raise Exception('The dt and gt should have the same data type, either RLEs, list or np.ndarray') # <<<<<<<<<<<<<< * * # define local variables */ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(0, 221, __pyx_L1_error) /* "pysobatools/_mask.pyx":220 * if m == 0 or n == 0: * return [] * if not type(dt) == type(gt): # <<<<<<<<<<<<<< * raise Exception('The dt and gt should have the same data type, either RLEs, list or np.ndarray') * */ } /* "pysobatools/_mask.pyx":224 * * # define local variables * cdef double* _iou = 0 # <<<<<<<<<<<<<< * cdef np.npy_intp shape[1] * # check type and assign iou function */ __pyx_v__iou = ((double *)0); /* "pysobatools/_mask.pyx":227 * cdef np.npy_intp shape[1] * # check type and assign iou function * if type(dt) == RLEs: # <<<<<<<<<<<<<< * _iouFun = _rleIou * elif type(dt) == np.ndarray: */ __pyx_t_5 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_dt)), ((PyObject *)__pyx_ptype_11pysobatools_5_mask_RLEs), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 227, __pyx_L1_error) __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_9) { /* "pysobatools/_mask.pyx":228 * # check type and assign iou function * if type(dt) == RLEs: * _iouFun = _rleIou # <<<<<<<<<<<<<< * elif type(dt) == np.ndarray: * _iouFun = _bbIou */ __Pyx_INCREF(__pyx_v__rleIou); __pyx_v__iouFun = __pyx_v__rleIou; /* "pysobatools/_mask.pyx":227 * cdef np.npy_intp shape[1] * # check type and assign iou function * if type(dt) == RLEs: # <<<<<<<<<<<<<< * _iouFun = _rleIou * elif type(dt) == np.ndarray: */ goto __pyx_L7; } /* "pysobatools/_mask.pyx":229 * if type(dt) == RLEs: * _iouFun = _rleIou * elif type(dt) == np.ndarray: # <<<<<<<<<<<<<< * _iouFun = _bbIou * else: */ __pyx_t_5 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_dt)), ((PyObject *)__pyx_ptype_5numpy_ndarray), Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 229, __pyx_L1_error) __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(__pyx_t_9)) { /* "pysobatools/_mask.pyx":230 * _iouFun = _rleIou * elif type(dt) == np.ndarray: * _iouFun = _bbIou # <<<<<<<<<<<<<< * else: * raise Exception('input data type not allowed.') */ __Pyx_INCREF(__pyx_v__bbIou); __pyx_v__iouFun = __pyx_v__bbIou; /* "pysobatools/_mask.pyx":229 * if type(dt) == RLEs: * _iouFun = _rleIou * elif type(dt) == np.ndarray: # <<<<<<<<<<<<<< * _iouFun = _bbIou * else: */ goto __pyx_L7; } /* "pysobatools/_mask.pyx":232 * _iouFun = _bbIou * else: * raise Exception('input data type not allowed.') # <<<<<<<<<<<<<< * _iou = malloc(m*n* sizeof(double)) * iou = np.zeros((m*n, ), dtype=np.double) */ /*else*/ { __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __PYX_ERR(0, 232, __pyx_L1_error) } __pyx_L7:; /* "pysobatools/_mask.pyx":233 * else: * raise Exception('input data type not allowed.') * _iou = malloc(m*n* sizeof(double)) # <<<<<<<<<<<<<< * iou = np.zeros((m*n, ), dtype=np.double) * shape[0] = m*n */ __pyx_v__iou = ((double *)malloc(((__pyx_v_m * __pyx_v_n) * (sizeof(double))))); /* "pysobatools/_mask.pyx":234 * raise Exception('input data type not allowed.') * _iou = malloc(m*n* sizeof(double)) * iou = np.zeros((m*n, ), dtype=np.double) # <<<<<<<<<<<<<< * shape[0] = m*n * iou = np.PyArray_SimpleNewFromData(1, shape, np.NPY_DOUBLE, _iou) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyInt_From_siz((__pyx_v_m * __pyx_v_n)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_double); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_iou = __pyx_t_4; __pyx_t_4 = 0; /* "pysobatools/_mask.pyx":235 * _iou = malloc(m*n* sizeof(double)) * iou = np.zeros((m*n, ), dtype=np.double) * shape[0] = m*n # <<<<<<<<<<<<<< * iou = np.PyArray_SimpleNewFromData(1, shape, np.NPY_DOUBLE, _iou) * PyArray_ENABLEFLAGS(iou, np.NPY_OWNDATA) */ (__pyx_v_shape[0]) = (((npy_intp)__pyx_v_m) * __pyx_v_n); /* "pysobatools/_mask.pyx":236 * iou = np.zeros((m*n, ), dtype=np.double) * shape[0] = m*n * iou = np.PyArray_SimpleNewFromData(1, shape, np.NPY_DOUBLE, _iou) # <<<<<<<<<<<<<< * PyArray_ENABLEFLAGS(iou, np.NPY_OWNDATA) * _iouFun(dt, gt, iscrowd, m, n, iou) */ __pyx_t_4 = PyArray_SimpleNewFromData(1, __pyx_v_shape, NPY_DOUBLE, __pyx_v__iou); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_iou, __pyx_t_4); __pyx_t_4 = 0; /* "pysobatools/_mask.pyx":237 * shape[0] = m*n * iou = np.PyArray_SimpleNewFromData(1, shape, np.NPY_DOUBLE, _iou) * PyArray_ENABLEFLAGS(iou, np.NPY_OWNDATA) # <<<<<<<<<<<<<< * _iouFun(dt, gt, iscrowd, m, n, iou) * return iou.reshape((m,n), order='F') */ if (!(likely(((__pyx_v_iou) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_iou, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 237, __pyx_L1_error) PyArray_ENABLEFLAGS(((PyArrayObject *)__pyx_v_iou), NPY_OWNDATA); /* "pysobatools/_mask.pyx":238 * iou = np.PyArray_SimpleNewFromData(1, shape, np.NPY_DOUBLE, _iou) * PyArray_ENABLEFLAGS(iou, np.NPY_OWNDATA) * _iouFun(dt, gt, iscrowd, m, n, iou) # <<<<<<<<<<<<<< * return iou.reshape((m,n), order='F') * */ __pyx_t_1 = __Pyx_PyInt_From_siz(__pyx_v_m); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyInt_From_siz(__pyx_v_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v__iouFun); __pyx_t_3 = __pyx_v__iouFun; __pyx_t_2 = NULL; __pyx_t_10 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_10 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[7] = {__pyx_t_2, __pyx_v_dt, __pyx_v_gt, ((PyObject *)__pyx_v_iscrowd), __pyx_t_1, __pyx_t_5, __pyx_v_iou}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 6+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[7] = {__pyx_t_2, __pyx_v_dt, __pyx_v_gt, ((PyObject *)__pyx_v_iscrowd), __pyx_t_1, __pyx_t_5, __pyx_v_iou}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 6+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_11 = PyTuple_New(6+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2); __pyx_t_2 = NULL; } __Pyx_INCREF(__pyx_v_dt); __Pyx_GIVEREF(__pyx_v_dt); PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_v_dt); __Pyx_INCREF(__pyx_v_gt); __Pyx_GIVEREF(__pyx_v_gt); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_v_gt); __Pyx_INCREF(((PyObject *)__pyx_v_iscrowd)); __Pyx_GIVEREF(((PyObject *)__pyx_v_iscrowd)); PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, ((PyObject *)__pyx_v_iscrowd)); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_10, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_11, 4+__pyx_t_10, __pyx_t_5); __Pyx_INCREF(__pyx_v_iou); __Pyx_GIVEREF(__pyx_v_iou); PyTuple_SET_ITEM(__pyx_t_11, 5+__pyx_t_10, __pyx_v_iou); __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "pysobatools/_mask.pyx":239 * PyArray_ENABLEFLAGS(iou, np.NPY_OWNDATA) * _iouFun(dt, gt, iscrowd, m, n, iou) * return iou.reshape((m,n), order='F') # <<<<<<<<<<<<<< * * def toBbox( rleObjs ): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_iou, __pyx_n_s_reshape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyInt_From_siz(__pyx_v_m); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = __Pyx_PyInt_From_siz(__pyx_v_n); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_11); __pyx_t_3 = 0; __pyx_t_11 = 0; __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(0, 239, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "pysobatools/_mask.pyx":171 * * # iou computation. support function overload (RLEs-RLEs and bbox-bbox). * def iou( dt, gt, pyiscrowd ): # <<<<<<<<<<<<<< * def _preproc(objs): * if len(objs) == 0: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_11); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iscrowd.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pysobatools._mask.iou", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_iscrowd.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF(__pyx_v__preproc); __Pyx_XDECREF(__pyx_v__rleIou); __Pyx_XDECREF(__pyx_v__bbIou); __Pyx_XDECREF(__pyx_v__len); __Pyx_XDECREF((PyObject *)__pyx_v_iscrowd); __Pyx_XDECREF(__pyx_v__iouFun); __Pyx_XDECREF(__pyx_v_iou); __Pyx_XDECREF(__pyx_v_dt); __Pyx_XDECREF(__pyx_v_gt); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pysobatools/_mask.pyx":241 * return iou.reshape((m,n), order='F') * * def toBbox( rleObjs ): # <<<<<<<<<<<<<< * cdef RLEs Rs = _frString(rleObjs) * cdef siz n = Rs.n */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_15toBbox(PyObject *__pyx_self, PyObject *__pyx_v_rleObjs); /*proto*/ static PyMethodDef __pyx_mdef_11pysobatools_5_mask_15toBbox = {"toBbox", (PyCFunction)__pyx_pw_11pysobatools_5_mask_15toBbox, METH_O, 0}; static PyObject *__pyx_pw_11pysobatools_5_mask_15toBbox(PyObject *__pyx_self, PyObject *__pyx_v_rleObjs) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("toBbox (wrapper)", 0); __pyx_r = __pyx_pf_11pysobatools_5_mask_14toBbox(__pyx_self, ((PyObject *)__pyx_v_rleObjs)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11pysobatools_5_mask_14toBbox(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rleObjs) { struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_Rs = 0; siz __pyx_v_n; BB __pyx_v__bb; npy_intp __pyx_v_shape[1]; PyObject *__pyx_v_bb = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; siz __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("toBbox", 0); /* "pysobatools/_mask.pyx":242 * * def toBbox( rleObjs ): * cdef RLEs Rs = _frString(rleObjs) # <<<<<<<<<<<<<< * cdef siz n = Rs.n * cdef BB _bb = malloc(4*n* sizeof(double)) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_frString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_rleObjs) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_rleObjs); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_11pysobatools_5_mask_RLEs))))) __PYX_ERR(0, 242, __pyx_L1_error) __pyx_v_Rs = ((struct __pyx_obj_11pysobatools_5_mask_RLEs *)__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":243 * def toBbox( rleObjs ): * cdef RLEs Rs = _frString(rleObjs) * cdef siz n = Rs.n # <<<<<<<<<<<<<< * cdef BB _bb = malloc(4*n* sizeof(double)) * rleToBbox( Rs._R, _bb, n ) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_Rs), __pyx_n_s_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_As_siz(__pyx_t_1); if (unlikely((__pyx_t_4 == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_n = __pyx_t_4; /* "pysobatools/_mask.pyx":244 * cdef RLEs Rs = _frString(rleObjs) * cdef siz n = Rs.n * cdef BB _bb = malloc(4*n* sizeof(double)) # <<<<<<<<<<<<<< * rleToBbox( Rs._R, _bb, n ) * cdef np.npy_intp shape[1] */ __pyx_v__bb = ((BB)malloc(((4 * __pyx_v_n) * (sizeof(double))))); /* "pysobatools/_mask.pyx":245 * cdef siz n = Rs.n * cdef BB _bb = malloc(4*n* sizeof(double)) * rleToBbox( Rs._R, _bb, n ) # <<<<<<<<<<<<<< * cdef np.npy_intp shape[1] * shape[0] = 4*n */ rleToBbox(((RLE const *)__pyx_v_Rs->_R), __pyx_v__bb, __pyx_v_n); /* "pysobatools/_mask.pyx":247 * rleToBbox( Rs._R, _bb, n ) * cdef np.npy_intp shape[1] * shape[0] = 4*n # <<<<<<<<<<<<<< * bb = np.array((1,4*n), dtype=np.double) * bb = np.PyArray_SimpleNewFromData(1, shape, np.NPY_DOUBLE, _bb).reshape((n, 4)) */ (__pyx_v_shape[0]) = (((npy_intp)4) * __pyx_v_n); /* "pysobatools/_mask.pyx":248 * cdef np.npy_intp shape[1] * shape[0] = 4*n * bb = np.array((1,4*n), dtype=np.double) # <<<<<<<<<<<<<< * bb = np.PyArray_SimpleNewFromData(1, shape, np.NPY_DOUBLE, _bb).reshape((n, 4)) * PyArray_ENABLEFLAGS(bb, np.NPY_OWNDATA) */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyInt_From_siz((4 * __pyx_v_n)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_double); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_bb = __pyx_t_6; __pyx_t_6 = 0; /* "pysobatools/_mask.pyx":249 * shape[0] = 4*n * bb = np.array((1,4*n), dtype=np.double) * bb = np.PyArray_SimpleNewFromData(1, shape, np.NPY_DOUBLE, _bb).reshape((n, 4)) # <<<<<<<<<<<<<< * PyArray_ENABLEFLAGS(bb, np.NPY_OWNDATA) * return bb */ __pyx_t_3 = PyArray_SimpleNewFromData(1, __pyx_v_shape, NPY_DOUBLE, __pyx_v__bb); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_reshape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_From_siz(__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_4); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_6 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_bb, __pyx_t_6); __pyx_t_6 = 0; /* "pysobatools/_mask.pyx":250 * bb = np.array((1,4*n), dtype=np.double) * bb = np.PyArray_SimpleNewFromData(1, shape, np.NPY_DOUBLE, _bb).reshape((n, 4)) * PyArray_ENABLEFLAGS(bb, np.NPY_OWNDATA) # <<<<<<<<<<<<<< * return bb * */ if (!(likely(((__pyx_v_bb) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_bb, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 250, __pyx_L1_error) PyArray_ENABLEFLAGS(((PyArrayObject *)__pyx_v_bb), NPY_OWNDATA); /* "pysobatools/_mask.pyx":251 * bb = np.PyArray_SimpleNewFromData(1, shape, np.NPY_DOUBLE, _bb).reshape((n, 4)) * PyArray_ENABLEFLAGS(bb, np.NPY_OWNDATA) * return bb # <<<<<<<<<<<<<< * * def frBbox(np.ndarray[np.double_t, ndim=2] bb, siz h, siz w ): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_bb); __pyx_r = __pyx_v_bb; goto __pyx_L0; /* "pysobatools/_mask.pyx":241 * return iou.reshape((m,n), order='F') * * def toBbox( rleObjs ): # <<<<<<<<<<<<<< * cdef RLEs Rs = _frString(rleObjs) * cdef siz n = Rs.n */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pysobatools._mask.toBbox", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_Rs); __Pyx_XDECREF(__pyx_v_bb); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pysobatools/_mask.pyx":253 * return bb * * def frBbox(np.ndarray[np.double_t, ndim=2] bb, siz h, siz w ): # <<<<<<<<<<<<<< * cdef siz n = bb.shape[0] * Rs = RLEs(n) */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_17frBbox(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_11pysobatools_5_mask_17frBbox = {"frBbox", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11pysobatools_5_mask_17frBbox, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_11pysobatools_5_mask_17frBbox(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyArrayObject *__pyx_v_bb = 0; siz __pyx_v_h; siz __pyx_v_w; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("frBbox (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bb,&__pyx_n_s_h,&__pyx_n_s_w,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bb)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("frBbox", 1, 3, 3, 1); __PYX_ERR(0, 253, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("frBbox", 1, 3, 3, 2); __PYX_ERR(0, 253, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "frBbox") < 0)) __PYX_ERR(0, 253, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_bb = ((PyArrayObject *)values[0]); __pyx_v_h = __Pyx_PyInt_As_siz(values[1]); if (unlikely((__pyx_v_h == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 253, __pyx_L3_error) __pyx_v_w = __Pyx_PyInt_As_siz(values[2]); if (unlikely((__pyx_v_w == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 253, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("frBbox", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 253, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pysobatools._mask.frBbox", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_bb), __pyx_ptype_5numpy_ndarray, 1, "bb", 0))) __PYX_ERR(0, 253, __pyx_L1_error) __pyx_r = __pyx_pf_11pysobatools_5_mask_16frBbox(__pyx_self, __pyx_v_bb, __pyx_v_h, __pyx_v_w); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11pysobatools_5_mask_16frBbox(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_bb, siz __pyx_v_h, siz __pyx_v_w) { siz __pyx_v_n; struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_Rs = NULL; PyObject *__pyx_v_objs = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_bb; __Pyx_Buffer __pyx_pybuffer_bb; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("frBbox", 0); __pyx_pybuffer_bb.pybuffer.buf = NULL; __pyx_pybuffer_bb.refcount = 0; __pyx_pybuffernd_bb.data = NULL; __pyx_pybuffernd_bb.rcbuffer = &__pyx_pybuffer_bb; { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_bb.rcbuffer->pybuffer, (PyObject*)__pyx_v_bb, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 253, __pyx_L1_error) } __pyx_pybuffernd_bb.diminfo[0].strides = __pyx_pybuffernd_bb.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_bb.diminfo[0].shape = __pyx_pybuffernd_bb.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_bb.diminfo[1].strides = __pyx_pybuffernd_bb.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_bb.diminfo[1].shape = __pyx_pybuffernd_bb.rcbuffer->pybuffer.shape[1]; /* "pysobatools/_mask.pyx":254 * * def frBbox(np.ndarray[np.double_t, ndim=2] bb, siz h, siz w ): * cdef siz n = bb.shape[0] # <<<<<<<<<<<<<< * Rs = RLEs(n) * rleFrBbox( Rs._R, bb.data, h, w, n ) */ __pyx_v_n = (__pyx_v_bb->dimensions[0]); /* "pysobatools/_mask.pyx":255 * def frBbox(np.ndarray[np.double_t, ndim=2] bb, siz h, siz w ): * cdef siz n = bb.shape[0] * Rs = RLEs(n) # <<<<<<<<<<<<<< * rleFrBbox( Rs._R, bb.data, h, w, n ) * objs = _toString(Rs) */ __pyx_t_1 = __Pyx_PyInt_From_siz(__pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_11pysobatools_5_mask_RLEs), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_Rs = ((struct __pyx_obj_11pysobatools_5_mask_RLEs *)__pyx_t_2); __pyx_t_2 = 0; /* "pysobatools/_mask.pyx":256 * cdef siz n = bb.shape[0] * Rs = RLEs(n) * rleFrBbox( Rs._R, bb.data, h, w, n ) # <<<<<<<<<<<<<< * objs = _toString(Rs) * return objs */ rleFrBbox(((RLE *)__pyx_v_Rs->_R), ((BB const )__pyx_v_bb->data), __pyx_v_h, __pyx_v_w, __pyx_v_n); /* "pysobatools/_mask.pyx":257 * Rs = RLEs(n) * rleFrBbox( Rs._R, bb.data, h, w, n ) * objs = _toString(Rs) # <<<<<<<<<<<<<< * return objs * */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_toString); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, ((PyObject *)__pyx_v_Rs)) : __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_Rs)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_objs = __pyx_t_2; __pyx_t_2 = 0; /* "pysobatools/_mask.pyx":258 * rleFrBbox( Rs._R, bb.data, h, w, n ) * objs = _toString(Rs) * return objs # <<<<<<<<<<<<<< * * def frPoly( poly, siz h, siz w ): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_objs); __pyx_r = __pyx_v_objs; goto __pyx_L0; /* "pysobatools/_mask.pyx":253 * return bb * * def frBbox(np.ndarray[np.double_t, ndim=2] bb, siz h, siz w ): # <<<<<<<<<<<<<< * cdef siz n = bb.shape[0] * Rs = RLEs(n) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bb.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pysobatools._mask.frBbox", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_bb.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_Rs); __Pyx_XDECREF(__pyx_v_objs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pysobatools/_mask.pyx":260 * return objs * * def frPoly( poly, siz h, siz w ): # <<<<<<<<<<<<<< * cdef np.ndarray[np.double_t, ndim=1] np_poly * n = len(poly) */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_19frPoly(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_11pysobatools_5_mask_19frPoly = {"frPoly", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11pysobatools_5_mask_19frPoly, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_11pysobatools_5_mask_19frPoly(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_poly = 0; siz __pyx_v_h; siz __pyx_v_w; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("frPoly (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_poly,&__pyx_n_s_h,&__pyx_n_s_w,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_poly)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("frPoly", 1, 3, 3, 1); __PYX_ERR(0, 260, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("frPoly", 1, 3, 3, 2); __PYX_ERR(0, 260, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "frPoly") < 0)) __PYX_ERR(0, 260, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_poly = values[0]; __pyx_v_h = __Pyx_PyInt_As_siz(values[1]); if (unlikely((__pyx_v_h == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 260, __pyx_L3_error) __pyx_v_w = __Pyx_PyInt_As_siz(values[2]); if (unlikely((__pyx_v_w == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 260, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("frPoly", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 260, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pysobatools._mask.frPoly", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_11pysobatools_5_mask_18frPoly(__pyx_self, __pyx_v_poly, __pyx_v_h, __pyx_v_w); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11pysobatools_5_mask_18frPoly(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_poly, siz __pyx_v_h, siz __pyx_v_w) { PyArrayObject *__pyx_v_np_poly = 0; Py_ssize_t __pyx_v_n; struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_Rs = NULL; PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_p = NULL; PyObject *__pyx_v_objs = NULL; __Pyx_LocalBuf_ND __pyx_pybuffernd_np_poly; __Pyx_Buffer __pyx_pybuffer_np_poly; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyArrayObject *__pyx_t_10 = NULL; int __pyx_t_11; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; PyObject *__pyx_t_14 = NULL; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; __Pyx_RefNannySetupContext("frPoly", 0); __pyx_pybuffer_np_poly.pybuffer.buf = NULL; __pyx_pybuffer_np_poly.refcount = 0; __pyx_pybuffernd_np_poly.data = NULL; __pyx_pybuffernd_np_poly.rcbuffer = &__pyx_pybuffer_np_poly; /* "pysobatools/_mask.pyx":262 * def frPoly( poly, siz h, siz w ): * cdef np.ndarray[np.double_t, ndim=1] np_poly * n = len(poly) # <<<<<<<<<<<<<< * Rs = RLEs(n) * for i, p in enumerate(poly): */ __pyx_t_1 = PyObject_Length(__pyx_v_poly); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 262, __pyx_L1_error) __pyx_v_n = __pyx_t_1; /* "pysobatools/_mask.pyx":263 * cdef np.ndarray[np.double_t, ndim=1] np_poly * n = len(poly) * Rs = RLEs(n) # <<<<<<<<<<<<<< * for i, p in enumerate(poly): * np_poly = np.array(p, dtype=np.double, order='F') */ __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_11pysobatools_5_mask_RLEs), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_Rs = ((struct __pyx_obj_11pysobatools_5_mask_RLEs *)__pyx_t_3); __pyx_t_3 = 0; /* "pysobatools/_mask.pyx":264 * n = len(poly) * Rs = RLEs(n) * for i, p in enumerate(poly): # <<<<<<<<<<<<<< * np_poly = np.array(p, dtype=np.double, order='F') * rleFrPoly( &Rs._R[i], np_poly.data, int(len(p)/2), h, w ) */ __Pyx_INCREF(__pyx_int_0); __pyx_t_3 = __pyx_int_0; if (likely(PyList_CheckExact(__pyx_v_poly)) || PyTuple_CheckExact(__pyx_v_poly)) { __pyx_t_2 = __pyx_v_poly; __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_4 = NULL; } else { __pyx_t_1 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_poly); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 264, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 264, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 264, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 264, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_5); __pyx_t_5 = 0; __Pyx_INCREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = __pyx_t_5; __pyx_t_5 = 0; /* "pysobatools/_mask.pyx":265 * Rs = RLEs(n) * for i, p in enumerate(poly): * np_poly = np.array(p, dtype=np.double, order='F') # <<<<<<<<<<<<<< * rleFrPoly( &Rs._R[i], np_poly.data, int(len(p)/2), h, w ) * objs = _toString(Rs) */ __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_p); __Pyx_GIVEREF(__pyx_v_p); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_p); __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_double); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_order, __pyx_n_s_F) < 0) __PYX_ERR(0, 265, __pyx_L1_error) __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 265, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_np_poly.rcbuffer->pybuffer); __pyx_t_11 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_np_poly.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_11 < 0)) { PyErr_Fetch(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_np_poly.rcbuffer->pybuffer, (PyObject*)__pyx_v_np_poly, &__Pyx_TypeInfo_nn___pyx_t_5numpy_double_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); Py_XDECREF(__pyx_t_14); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_12, __pyx_t_13, __pyx_t_14); } __pyx_t_12 = __pyx_t_13 = __pyx_t_14 = 0; } __pyx_pybuffernd_np_poly.diminfo[0].strides = __pyx_pybuffernd_np_poly.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_np_poly.diminfo[0].shape = __pyx_pybuffernd_np_poly.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 265, __pyx_L1_error) } __pyx_t_10 = 0; __Pyx_XDECREF_SET(__pyx_v_np_poly, ((PyArrayObject *)__pyx_t_9)); __pyx_t_9 = 0; /* "pysobatools/_mask.pyx":266 * for i, p in enumerate(poly): * np_poly = np.array(p, dtype=np.double, order='F') * rleFrPoly( &Rs._R[i], np_poly.data, int(len(p)/2), h, w ) # <<<<<<<<<<<<<< * objs = _toString(Rs) * return objs */ __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 266, __pyx_L1_error) __pyx_t_16 = PyObject_Length(__pyx_v_p); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 266, __pyx_L1_error) rleFrPoly(((RLE *)(&(__pyx_v_Rs->_R[__pyx_t_15]))), ((double const *)__pyx_v_np_poly->data), ((siz)__Pyx_div_Py_ssize_t(__pyx_t_16, 2)), __pyx_v_h, __pyx_v_w); /* "pysobatools/_mask.pyx":264 * n = len(poly) * Rs = RLEs(n) * for i, p in enumerate(poly): # <<<<<<<<<<<<<< * np_poly = np.array(p, dtype=np.double, order='F') * rleFrPoly( &Rs._R[i], np_poly.data, int(len(p)/2), h, w ) */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "pysobatools/_mask.pyx":267 * np_poly = np.array(p, dtype=np.double, order='F') * rleFrPoly( &Rs._R[i], np_poly.data, int(len(p)/2), h, w ) * objs = _toString(Rs) # <<<<<<<<<<<<<< * return objs * */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_toString); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_9, ((PyObject *)__pyx_v_Rs)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_Rs)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_objs = __pyx_t_3; __pyx_t_3 = 0; /* "pysobatools/_mask.pyx":268 * rleFrPoly( &Rs._R[i], np_poly.data, int(len(p)/2), h, w ) * objs = _toString(Rs) * return objs # <<<<<<<<<<<<<< * * def frUncompressedRLE(ucRles, siz h, siz w): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_objs); __pyx_r = __pyx_v_objs; goto __pyx_L0; /* "pysobatools/_mask.pyx":260 * return objs * * def frPoly( poly, siz h, siz w ): # <<<<<<<<<<<<<< * cdef np.ndarray[np.double_t, ndim=1] np_poly * n = len(poly) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_np_poly.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pysobatools._mask.frPoly", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_np_poly.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_np_poly); __Pyx_XDECREF((PyObject *)__pyx_v_Rs); __Pyx_XDECREF(__pyx_v_i); __Pyx_XDECREF(__pyx_v_p); __Pyx_XDECREF(__pyx_v_objs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pysobatools/_mask.pyx":270 * return objs * * def frUncompressedRLE(ucRles, siz h, siz w): # <<<<<<<<<<<<<< * cdef np.ndarray[np.uint32_t, ndim=1] cnts * cdef RLE R */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_21frUncompressedRLE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_11pysobatools_5_mask_21frUncompressedRLE = {"frUncompressedRLE", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11pysobatools_5_mask_21frUncompressedRLE, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_11pysobatools_5_mask_21frUncompressedRLE(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ucRles = 0; CYTHON_UNUSED siz __pyx_v_h; CYTHON_UNUSED siz __pyx_v_w; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("frUncompressedRLE (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ucRles,&__pyx_n_s_h,&__pyx_n_s_w,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ucRles)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("frUncompressedRLE", 1, 3, 3, 1); __PYX_ERR(0, 270, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("frUncompressedRLE", 1, 3, 3, 2); __PYX_ERR(0, 270, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "frUncompressedRLE") < 0)) __PYX_ERR(0, 270, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_ucRles = values[0]; __pyx_v_h = __Pyx_PyInt_As_siz(values[1]); if (unlikely((__pyx_v_h == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 270, __pyx_L3_error) __pyx_v_w = __Pyx_PyInt_As_siz(values[2]); if (unlikely((__pyx_v_w == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 270, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("frUncompressedRLE", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 270, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pysobatools._mask.frUncompressedRLE", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_11pysobatools_5_mask_20frUncompressedRLE(__pyx_self, __pyx_v_ucRles, __pyx_v_h, __pyx_v_w); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11pysobatools_5_mask_20frUncompressedRLE(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ucRles, CYTHON_UNUSED siz __pyx_v_h, CYTHON_UNUSED siz __pyx_v_w) { PyArrayObject *__pyx_v_cnts = 0; RLE __pyx_v_R; uint *__pyx_v_data; Py_ssize_t __pyx_v_n; PyObject *__pyx_v_objs = NULL; Py_ssize_t __pyx_v_i; struct __pyx_obj_11pysobatools_5_mask_RLEs *__pyx_v_Rs = NULL; Py_ssize_t __pyx_v_j; __Pyx_LocalBuf_ND __pyx_pybuffernd_cnts; __Pyx_Buffer __pyx_pybuffer_cnts; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyArrayObject *__pyx_t_9 = NULL; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; RLE __pyx_t_18; siz __pyx_t_19; int __pyx_t_20; __Pyx_RefNannySetupContext("frUncompressedRLE", 0); __pyx_pybuffer_cnts.pybuffer.buf = NULL; __pyx_pybuffer_cnts.refcount = 0; __pyx_pybuffernd_cnts.data = NULL; __pyx_pybuffernd_cnts.rcbuffer = &__pyx_pybuffer_cnts; /* "pysobatools/_mask.pyx":274 * cdef RLE R * cdef uint *data * n = len(ucRles) # <<<<<<<<<<<<<< * objs = [] * for i in range(n): */ __pyx_t_1 = PyObject_Length(__pyx_v_ucRles); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 274, __pyx_L1_error) __pyx_v_n = __pyx_t_1; /* "pysobatools/_mask.pyx":275 * cdef uint *data * n = len(ucRles) * objs = [] # <<<<<<<<<<<<<< * for i in range(n): * Rs = RLEs(1) */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_objs = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "pysobatools/_mask.pyx":276 * n = len(ucRles) * objs = [] * for i in range(n): # <<<<<<<<<<<<<< * Rs = RLEs(1) * cnts = np.array(ucRles[i]['counts'], dtype=np.uint32) */ __pyx_t_1 = __pyx_v_n; __pyx_t_3 = __pyx_t_1; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "pysobatools/_mask.pyx":277 * objs = [] * for i in range(n): * Rs = RLEs(1) # <<<<<<<<<<<<<< * cnts = np.array(ucRles[i]['counts'], dtype=np.uint32) * # time for malloc can be saved here but it's fine */ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_11pysobatools_5_mask_RLEs), __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_Rs, ((struct __pyx_obj_11pysobatools_5_mask_RLEs *)__pyx_t_2)); __pyx_t_2 = 0; /* "pysobatools/_mask.pyx":278 * for i in range(n): * Rs = RLEs(1) * cnts = np.array(ucRles[i]['counts'], dtype=np.uint32) # <<<<<<<<<<<<<< * # time for malloc can be saved here but it's fine * data = malloc(len(cnts)* sizeof(uint)) */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_ucRles, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_s_counts); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_uint32); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 278, __pyx_L1_error) __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cnts.rcbuffer->pybuffer); __pyx_t_10 = __Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cnts.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack); if (unlikely(__pyx_t_10 < 0)) { PyErr_Fetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cnts.rcbuffer->pybuffer, (PyObject*)__pyx_v_cnts, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint32_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { Py_XDECREF(__pyx_t_11); Py_XDECREF(__pyx_t_12); Py_XDECREF(__pyx_t_13); __Pyx_RaiseBufferFallbackError(); } else { PyErr_Restore(__pyx_t_11, __pyx_t_12, __pyx_t_13); } __pyx_t_11 = __pyx_t_12 = __pyx_t_13 = 0; } __pyx_pybuffernd_cnts.diminfo[0].strides = __pyx_pybuffernd_cnts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cnts.diminfo[0].shape = __pyx_pybuffernd_cnts.rcbuffer->pybuffer.shape[0]; if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 278, __pyx_L1_error) } __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_cnts, ((PyArrayObject *)__pyx_t_8)); __pyx_t_8 = 0; /* "pysobatools/_mask.pyx":280 * cnts = np.array(ucRles[i]['counts'], dtype=np.uint32) * # time for malloc can be saved here but it's fine * data = malloc(len(cnts)* sizeof(uint)) # <<<<<<<<<<<<<< * for j in range(len(cnts)): * data[j] = cnts[j] */ __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_cnts)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 280, __pyx_L1_error) __pyx_v_data = ((uint *)malloc((__pyx_t_14 * (sizeof(unsigned int))))); /* "pysobatools/_mask.pyx":281 * # time for malloc can be saved here but it's fine * data = malloc(len(cnts)* sizeof(uint)) * for j in range(len(cnts)): # <<<<<<<<<<<<<< * data[j] = cnts[j] * R = RLE(ucRles[i]['size'][0], ucRles[i]['size'][1], len(cnts), data) */ __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_cnts)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 281, __pyx_L1_error) __pyx_t_15 = __pyx_t_14; for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_j = __pyx_t_16; /* "pysobatools/_mask.pyx":282 * data = malloc(len(cnts)* sizeof(uint)) * for j in range(len(cnts)): * data[j] = cnts[j] # <<<<<<<<<<<<<< * R = RLE(ucRles[i]['size'][0], ucRles[i]['size'][1], len(cnts), data) * Rs._R[0] = R */ __pyx_t_17 = __pyx_v_j; __pyx_t_10 = -1; if (__pyx_t_17 < 0) { __pyx_t_17 += __pyx_pybuffernd_cnts.diminfo[0].shape; if (unlikely(__pyx_t_17 < 0)) __pyx_t_10 = 0; } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_cnts.diminfo[0].shape)) __pyx_t_10 = 0; if (unlikely(__pyx_t_10 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_10); __PYX_ERR(0, 282, __pyx_L1_error) } (__pyx_v_data[__pyx_v_j]) = ((uint)(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint32_t *, __pyx_pybuffernd_cnts.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_cnts.diminfo[0].strides))); } /* "pysobatools/_mask.pyx":283 * for j in range(len(cnts)): * data[j] = cnts[j] * R = RLE(ucRles[i]['size'][0], ucRles[i]['size'][1], len(cnts), data) # <<<<<<<<<<<<<< * Rs._R[0] = R * objs.append(_toString(Rs)[0]) */ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_ucRles, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_19 = __Pyx_PyInt_As_siz(__pyx_t_8); if (unlikely((__pyx_t_19 == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_18.h = __pyx_t_19; __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_ucRles, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_8, __pyx_n_s_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_6, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_19 = __Pyx_PyInt_As_siz(__pyx_t_8); if (unlikely((__pyx_t_19 == ((siz)-1)) && PyErr_Occurred())) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_18.w = __pyx_t_19; __pyx_t_14 = PyObject_Length(((PyObject *)__pyx_v_cnts)); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 283, __pyx_L1_error) __pyx_t_18.m = __pyx_t_14; __pyx_t_18.cnts = ((uint *)__pyx_v_data); __pyx_v_R = __pyx_t_18; /* "pysobatools/_mask.pyx":284 * data[j] = cnts[j] * R = RLE(ucRles[i]['size'][0], ucRles[i]['size'][1], len(cnts), data) * Rs._R[0] = R # <<<<<<<<<<<<<< * objs.append(_toString(Rs)[0]) * return objs */ (__pyx_v_Rs->_R[0]) = __pyx_v_R; /* "pysobatools/_mask.pyx":285 * R = RLE(ucRles[i]['size'][0], ucRles[i]['size'][1], len(cnts), data) * Rs._R[0] = R * objs.append(_toString(Rs)[0]) # <<<<<<<<<<<<<< * return objs * */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_toString); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_8 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_2, ((PyObject *)__pyx_v_Rs)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_Rs)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_objs, __pyx_t_6); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } /* "pysobatools/_mask.pyx":286 * Rs._R[0] = R * objs.append(_toString(Rs)[0]) * return objs # <<<<<<<<<<<<<< * * def frPyObjects(pyobj, h, w): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_objs); __pyx_r = __pyx_v_objs; goto __pyx_L0; /* "pysobatools/_mask.pyx":270 * return objs * * def frUncompressedRLE(ucRles, siz h, siz w): # <<<<<<<<<<<<<< * cdef np.ndarray[np.uint32_t, ndim=1] cnts * cdef RLE R */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cnts.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("pysobatools._mask.frUncompressedRLE", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_cnts.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_cnts); __Pyx_XDECREF(__pyx_v_objs); __Pyx_XDECREF((PyObject *)__pyx_v_Rs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "pysobatools/_mask.pyx":288 * return objs * * def frPyObjects(pyobj, h, w): # <<<<<<<<<<<<<< * # encode rle from a list of python objects * if type(pyobj) == np.ndarray: */ /* Python wrapper */ static PyObject *__pyx_pw_11pysobatools_5_mask_23frPyObjects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_11pysobatools_5_mask_23frPyObjects = {"frPyObjects", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_11pysobatools_5_mask_23frPyObjects, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_11pysobatools_5_mask_23frPyObjects(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_pyobj = 0; PyObject *__pyx_v_h = 0; PyObject *__pyx_v_w = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("frPyObjects (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyobj,&__pyx_n_s_h,&__pyx_n_s_w,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyobj)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("frPyObjects", 1, 3, 3, 1); __PYX_ERR(0, 288, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("frPyObjects", 1, 3, 3, 2); __PYX_ERR(0, 288, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "frPyObjects") < 0)) __PYX_ERR(0, 288, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_pyobj = values[0]; __pyx_v_h = values[1]; __pyx_v_w = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("frPyObjects", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 288, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pysobatools._mask.frPyObjects", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_11pysobatools_5_mask_22frPyObjects(__pyx_self, __pyx_v_pyobj, __pyx_v_h, __pyx_v_w); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_11pysobatools_5_mask_22frPyObjects(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_pyobj, PyObject *__pyx_v_h, PyObject *__pyx_v_w) { PyObject *__pyx_v_objs = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; int __pyx_t_7; Py_ssize_t __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("frPyObjects", 0); /* "pysobatools/_mask.pyx":290 * def frPyObjects(pyobj, h, w): * # encode rle from a list of python objects * if type(pyobj) == np.ndarray: # <<<<<<<<<<<<<< * objs = frBbox(pyobj, h, w) * elif type(pyobj) == list and len(pyobj[0]) == 4: */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_pyobj)), ((PyObject *)__pyx_ptype_5numpy_ndarray), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 290, __pyx_L1_error) __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "pysobatools/_mask.pyx":291 * # encode rle from a list of python objects * if type(pyobj) == np.ndarray: * objs = frBbox(pyobj, h, w) # <<<<<<<<<<<<<< * elif type(pyobj) == list and len(pyobj[0]) == 4: * objs = frBbox(pyobj, h, w) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_frBbox); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_pyobj, __pyx_v_h, __pyx_v_w}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_pyobj, __pyx_v_h, __pyx_v_w}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_pyobj); __Pyx_GIVEREF(__pyx_v_pyobj); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_pyobj); __Pyx_INCREF(__pyx_v_h); __Pyx_GIVEREF(__pyx_v_h); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_h); __Pyx_INCREF(__pyx_v_w); __Pyx_GIVEREF(__pyx_v_w); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_w); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_objs = __pyx_t_1; __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":290 * def frPyObjects(pyobj, h, w): * # encode rle from a list of python objects * if type(pyobj) == np.ndarray: # <<<<<<<<<<<<<< * objs = frBbox(pyobj, h, w) * elif type(pyobj) == list and len(pyobj[0]) == 4: */ goto __pyx_L3; } /* "pysobatools/_mask.pyx":292 * if type(pyobj) == np.ndarray: * objs = frBbox(pyobj, h, w) * elif type(pyobj) == list and len(pyobj[0]) == 4: # <<<<<<<<<<<<<< * objs = frBbox(pyobj, h, w) * elif type(pyobj) == list and len(pyobj[0]) > 4: */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_pyobj)), ((PyObject *)(&PyList_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 292, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { } else { __pyx_t_2 = __pyx_t_7; goto __pyx_L4_bool_binop_done; } __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_pyobj, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 292, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = ((__pyx_t_8 == 4) != 0); __pyx_t_2 = __pyx_t_7; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "pysobatools/_mask.pyx":293 * objs = frBbox(pyobj, h, w) * elif type(pyobj) == list and len(pyobj[0]) == 4: * objs = frBbox(pyobj, h, w) # <<<<<<<<<<<<<< * elif type(pyobj) == list and len(pyobj[0]) > 4: * objs = frPoly(pyobj, h, w) */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_frBbox); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_pyobj, __pyx_v_h, __pyx_v_w}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_pyobj, __pyx_v_h, __pyx_v_w}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_4 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_v_pyobj); __Pyx_GIVEREF(__pyx_v_pyobj); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_v_pyobj); __Pyx_INCREF(__pyx_v_h); __Pyx_GIVEREF(__pyx_v_h); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_v_h); __Pyx_INCREF(__pyx_v_w); __Pyx_GIVEREF(__pyx_v_w); PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_5, __pyx_v_w); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_objs = __pyx_t_1; __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":292 * if type(pyobj) == np.ndarray: * objs = frBbox(pyobj, h, w) * elif type(pyobj) == list and len(pyobj[0]) == 4: # <<<<<<<<<<<<<< * objs = frBbox(pyobj, h, w) * elif type(pyobj) == list and len(pyobj[0]) > 4: */ goto __pyx_L3; } /* "pysobatools/_mask.pyx":294 * elif type(pyobj) == list and len(pyobj[0]) == 4: * objs = frBbox(pyobj, h, w) * elif type(pyobj) == list and len(pyobj[0]) > 4: # <<<<<<<<<<<<<< * objs = frPoly(pyobj, h, w) * elif type(pyobj) == list and type(pyobj[0]) == dict \ */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_pyobj)), ((PyObject *)(&PyList_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 294, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { } else { __pyx_t_2 = __pyx_t_7; goto __pyx_L6_bool_binop_done; } __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_pyobj, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_8 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = ((__pyx_t_8 > 4) != 0); __pyx_t_2 = __pyx_t_7; __pyx_L6_bool_binop_done:; if (__pyx_t_2) { /* "pysobatools/_mask.pyx":295 * objs = frBbox(pyobj, h, w) * elif type(pyobj) == list and len(pyobj[0]) > 4: * objs = frPoly(pyobj, h, w) # <<<<<<<<<<<<<< * elif type(pyobj) == list and type(pyobj[0]) == dict \ * and 'counts' in pyobj[0] and 'size' in pyobj[0]: */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_frPoly); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_pyobj, __pyx_v_h, __pyx_v_w}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_pyobj, __pyx_v_h, __pyx_v_w}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_pyobj); __Pyx_GIVEREF(__pyx_v_pyobj); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_pyobj); __Pyx_INCREF(__pyx_v_h); __Pyx_GIVEREF(__pyx_v_h); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_h); __Pyx_INCREF(__pyx_v_w); __Pyx_GIVEREF(__pyx_v_w); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_w); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_objs = __pyx_t_1; __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":294 * elif type(pyobj) == list and len(pyobj[0]) == 4: * objs = frBbox(pyobj, h, w) * elif type(pyobj) == list and len(pyobj[0]) > 4: # <<<<<<<<<<<<<< * objs = frPoly(pyobj, h, w) * elif type(pyobj) == list and type(pyobj[0]) == dict \ */ goto __pyx_L3; } /* "pysobatools/_mask.pyx":296 * elif type(pyobj) == list and len(pyobj[0]) > 4: * objs = frPoly(pyobj, h, w) * elif type(pyobj) == list and type(pyobj[0]) == dict \ # <<<<<<<<<<<<<< * and 'counts' in pyobj[0] and 'size' in pyobj[0]: * objs = frUncompressedRLE(pyobj, h, w) */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_pyobj)), ((PyObject *)(&PyList_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { } else { __pyx_t_2 = __pyx_t_7; goto __pyx_L8_bool_binop_done; } /* "pysobatools/_mask.pyx":297 * objs = frPoly(pyobj, h, w) * elif type(pyobj) == list and type(pyobj[0]) == dict \ * and 'counts' in pyobj[0] and 'size' in pyobj[0]: # <<<<<<<<<<<<<< * objs = frUncompressedRLE(pyobj, h, w) * # encode rle from single python object */ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_pyobj, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "pysobatools/_mask.pyx":296 * elif type(pyobj) == list and len(pyobj[0]) > 4: * objs = frPoly(pyobj, h, w) * elif type(pyobj) == list and type(pyobj[0]) == dict \ # <<<<<<<<<<<<<< * and 'counts' in pyobj[0] and 'size' in pyobj[0]: * objs = frUncompressedRLE(pyobj, h, w) */ __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_t_1)), ((PyObject *)(&PyDict_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 296, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { } else { __pyx_t_2 = __pyx_t_7; goto __pyx_L8_bool_binop_done; } /* "pysobatools/_mask.pyx":297 * objs = frPoly(pyobj, h, w) * elif type(pyobj) == list and type(pyobj[0]) == dict \ * and 'counts' in pyobj[0] and 'size' in pyobj[0]: # <<<<<<<<<<<<<< * objs = frUncompressedRLE(pyobj, h, w) * # encode rle from single python object */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_pyobj, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_counts, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = (__pyx_t_7 != 0); if (__pyx_t_9) { } else { __pyx_t_2 = __pyx_t_9; goto __pyx_L8_bool_binop_done; } __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_pyobj, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_size, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 297, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = (__pyx_t_9 != 0); __pyx_t_2 = __pyx_t_7; __pyx_L8_bool_binop_done:; /* "pysobatools/_mask.pyx":296 * elif type(pyobj) == list and len(pyobj[0]) > 4: * objs = frPoly(pyobj, h, w) * elif type(pyobj) == list and type(pyobj[0]) == dict \ # <<<<<<<<<<<<<< * and 'counts' in pyobj[0] and 'size' in pyobj[0]: * objs = frUncompressedRLE(pyobj, h, w) */ if (__pyx_t_2) { /* "pysobatools/_mask.pyx":298 * elif type(pyobj) == list and type(pyobj[0]) == dict \ * and 'counts' in pyobj[0] and 'size' in pyobj[0]: * objs = frUncompressedRLE(pyobj, h, w) # <<<<<<<<<<<<<< * # encode rle from single python object * elif type(pyobj) == list and len(pyobj) == 4: */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_frUncompressedRLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_pyobj, __pyx_v_h, __pyx_v_w}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_pyobj, __pyx_v_h, __pyx_v_w}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { __pyx_t_4 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_v_pyobj); __Pyx_GIVEREF(__pyx_v_pyobj); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_v_pyobj); __Pyx_INCREF(__pyx_v_h); __Pyx_GIVEREF(__pyx_v_h); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_v_h); __Pyx_INCREF(__pyx_v_w); __Pyx_GIVEREF(__pyx_v_w); PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_5, __pyx_v_w); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_objs = __pyx_t_3; __pyx_t_3 = 0; /* "pysobatools/_mask.pyx":296 * elif type(pyobj) == list and len(pyobj[0]) > 4: * objs = frPoly(pyobj, h, w) * elif type(pyobj) == list and type(pyobj[0]) == dict \ # <<<<<<<<<<<<<< * and 'counts' in pyobj[0] and 'size' in pyobj[0]: * objs = frUncompressedRLE(pyobj, h, w) */ goto __pyx_L3; } /* "pysobatools/_mask.pyx":300 * objs = frUncompressedRLE(pyobj, h, w) * # encode rle from single python object * elif type(pyobj) == list and len(pyobj) == 4: # <<<<<<<<<<<<<< * objs = frBbox([pyobj], h, w)[0] * elif type(pyobj) == list and len(pyobj) > 4: */ __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_pyobj)), ((PyObject *)(&PyList_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 300, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { } else { __pyx_t_2 = __pyx_t_7; goto __pyx_L12_bool_binop_done; } __pyx_t_8 = PyObject_Length(__pyx_v_pyobj); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 300, __pyx_L1_error) __pyx_t_7 = ((__pyx_t_8 == 4) != 0); __pyx_t_2 = __pyx_t_7; __pyx_L12_bool_binop_done:; if (__pyx_t_2) { /* "pysobatools/_mask.pyx":301 * # encode rle from single python object * elif type(pyobj) == list and len(pyobj) == 4: * objs = frBbox([pyobj], h, w)[0] # <<<<<<<<<<<<<< * elif type(pyobj) == list and len(pyobj) > 4: * objs = frPoly([pyobj], h, w)[0] */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_frBbox); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_pyobj); __Pyx_GIVEREF(__pyx_v_pyobj); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_pyobj); __pyx_t_6 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_v_h, __pyx_v_w}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_v_h, __pyx_v_w}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_10 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_v_h); __Pyx_GIVEREF(__pyx_v_h); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_5, __pyx_v_h); __Pyx_INCREF(__pyx_v_w); __Pyx_GIVEREF(__pyx_v_w); PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_5, __pyx_v_w); __pyx_t_4 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_objs = __pyx_t_1; __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":300 * objs = frUncompressedRLE(pyobj, h, w) * # encode rle from single python object * elif type(pyobj) == list and len(pyobj) == 4: # <<<<<<<<<<<<<< * objs = frBbox([pyobj], h, w)[0] * elif type(pyobj) == list and len(pyobj) > 4: */ goto __pyx_L3; } /* "pysobatools/_mask.pyx":302 * elif type(pyobj) == list and len(pyobj) == 4: * objs = frBbox([pyobj], h, w)[0] * elif type(pyobj) == list and len(pyobj) > 4: # <<<<<<<<<<<<<< * objs = frPoly([pyobj], h, w)[0] * elif type(pyobj) == dict and 'counts' in pyobj and 'size' in pyobj: */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_pyobj)), ((PyObject *)(&PyList_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { } else { __pyx_t_2 = __pyx_t_7; goto __pyx_L14_bool_binop_done; } __pyx_t_8 = PyObject_Length(__pyx_v_pyobj); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 302, __pyx_L1_error) __pyx_t_7 = ((__pyx_t_8 > 4) != 0); __pyx_t_2 = __pyx_t_7; __pyx_L14_bool_binop_done:; if (__pyx_t_2) { /* "pysobatools/_mask.pyx":303 * objs = frBbox([pyobj], h, w)[0] * elif type(pyobj) == list and len(pyobj) > 4: * objs = frPoly([pyobj], h, w)[0] # <<<<<<<<<<<<<< * elif type(pyobj) == dict and 'counts' in pyobj and 'size' in pyobj: * objs = frUncompressedRLE([pyobj], h, w)[0] */ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_frPoly); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = PyList_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_pyobj); __Pyx_GIVEREF(__pyx_v_pyobj); PyList_SET_ITEM(__pyx_t_10, 0, __pyx_v_pyobj); __pyx_t_4 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_10, __pyx_v_h, __pyx_v_w}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_10, __pyx_v_h, __pyx_v_w}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else #endif { __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_v_h); __Pyx_GIVEREF(__pyx_v_h); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_h); __Pyx_INCREF(__pyx_v_w); __Pyx_GIVEREF(__pyx_v_w); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_w); __pyx_t_10 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_objs = __pyx_t_3; __pyx_t_3 = 0; /* "pysobatools/_mask.pyx":302 * elif type(pyobj) == list and len(pyobj) == 4: * objs = frBbox([pyobj], h, w)[0] * elif type(pyobj) == list and len(pyobj) > 4: # <<<<<<<<<<<<<< * objs = frPoly([pyobj], h, w)[0] * elif type(pyobj) == dict and 'counts' in pyobj and 'size' in pyobj: */ goto __pyx_L3; } /* "pysobatools/_mask.pyx":304 * elif type(pyobj) == list and len(pyobj) > 4: * objs = frPoly([pyobj], h, w)[0] * elif type(pyobj) == dict and 'counts' in pyobj and 'size' in pyobj: # <<<<<<<<<<<<<< * objs = frUncompressedRLE([pyobj], h, w)[0] * else: */ __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_pyobj)), ((PyObject *)(&PyDict_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 304, __pyx_L1_error) __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_7) { } else { __pyx_t_2 = __pyx_t_7; goto __pyx_L16_bool_binop_done; } __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_counts, __pyx_v_pyobj, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 304, __pyx_L1_error) __pyx_t_9 = (__pyx_t_7 != 0); if (__pyx_t_9) { } else { __pyx_t_2 = __pyx_t_9; goto __pyx_L16_bool_binop_done; } __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_size, __pyx_v_pyobj, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 304, __pyx_L1_error) __pyx_t_7 = (__pyx_t_9 != 0); __pyx_t_2 = __pyx_t_7; __pyx_L16_bool_binop_done:; if (likely(__pyx_t_2)) { /* "pysobatools/_mask.pyx":305 * objs = frPoly([pyobj], h, w)[0] * elif type(pyobj) == dict and 'counts' in pyobj and 'size' in pyobj: * objs = frUncompressedRLE([pyobj], h, w)[0] # <<<<<<<<<<<<<< * else: * raise Exception('input type is not supported.') */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_frUncompressedRLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_pyobj); __Pyx_GIVEREF(__pyx_v_pyobj); PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v_pyobj); __pyx_t_10 = NULL; __pyx_t_5 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_5 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_t_6, __pyx_v_h, __pyx_v_w}; __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_t_6, __pyx_v_h, __pyx_v_w}; __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { __pyx_t_4 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_v_h); __Pyx_GIVEREF(__pyx_v_h); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_v_h); __Pyx_INCREF(__pyx_v_w); __Pyx_GIVEREF(__pyx_v_w); PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_5, __pyx_v_w); __pyx_t_6 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_objs = __pyx_t_1; __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":304 * elif type(pyobj) == list and len(pyobj) > 4: * objs = frPoly([pyobj], h, w)[0] * elif type(pyobj) == dict and 'counts' in pyobj and 'size' in pyobj: # <<<<<<<<<<<<<< * objs = frUncompressedRLE([pyobj], h, w)[0] * else: */ goto __pyx_L3; } /* "pysobatools/_mask.pyx":307 * objs = frUncompressedRLE([pyobj], h, w)[0] * else: * raise Exception('input type is not supported.') # <<<<<<<<<<<<<< * return objs */ /*else*/ { __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(0, 307, __pyx_L1_error) } __pyx_L3:; /* "pysobatools/_mask.pyx":308 * else: * raise Exception('input type is not supported.') * return objs # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_objs); __pyx_r = __pyx_v_objs; goto __pyx_L0; /* "pysobatools/_mask.pyx":288 * return objs * * def frPyObjects(pyobj, h, w): # <<<<<<<<<<<<<< * # encode rle from a list of python objects * if type(pyobj) == np.ndarray: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pysobatools._mask.frPyObjects", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_objs); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< * # This implementation of getbuffer is geared towards Cython * # requirements, and does not yet fulfill the PEP. */ /* Python wrapper */ static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { int __pyx_v_i; int __pyx_v_ndim; int __pyx_v_endian_detector; int __pyx_v_little_endian; int __pyx_v_t; char *__pyx_v_f; PyArray_Descr *__pyx_v_descr = 0; int __pyx_v_offset; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyArray_Descr *__pyx_t_7; PyObject *__pyx_t_8 = NULL; char *__pyx_t_9; if (__pyx_v_info == NULL) { PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); return -1; } __Pyx_RefNannySetupContext("__getbuffer__", 0); __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":265 * * cdef int i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * */ __pyx_v_endian_detector = 1; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":266 * cdef int i, ndim * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< * * ndim = PyArray_NDIM(self) */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":268 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270 * ndim = PyArray_NDIM(self) * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L4_bool_binop_done; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":271 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< * raise ValueError(u"ndarray is not C contiguous") * */ __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270 * ndim = PyArray_NDIM(self) * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ if (unlikely(__pyx_t_1)) { /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(2, 272, __pyx_L1_error) /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270 * ndim = PyArray_NDIM(self) * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L7_bool_binop_done; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":275 * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< * raise ValueError(u"ndarray is not Fortran contiguous") * */ __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L7_bool_binop_done:; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ if (unlikely(__pyx_t_1)) { /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< * * info.buf = PyArray_DATA(self) */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(2, 276, __pyx_L1_error) /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":278 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< * info.ndim = ndim * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":279 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * # Allocate new buffer for strides and shape info. */ __pyx_v_info->ndim = __pyx_v_ndim; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":283 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< * info.shape = info.strides + ndim * for i in range(ndim): */ __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":284 * # This is allocated as one block, strides first. * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) * info.shape = info.strides + ndim # <<<<<<<<<<<<<< * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] */ __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":285 * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) * info.shape = info.strides + ndim * for i in range(ndim): # <<<<<<<<<<<<<< * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] */ __pyx_t_4 = __pyx_v_ndim; __pyx_t_5 = __pyx_t_4; for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":286 * info.shape = info.strides + ndim * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< * info.shape[i] = PyArray_DIMS(self)[i] * else: */ (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":287 * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< * else: * info.strides = PyArray_STRIDES(self) */ (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. */ goto __pyx_L9; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":289 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL */ /*else*/ { __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":290 * else: * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) */ __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); } __pyx_L9:; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":291 * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL # <<<<<<<<<<<<<< * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) */ __pyx_v_info->suboffsets = NULL; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":292 * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< * info.readonly = not PyArray_ISWRITEABLE(self) * */ __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":293 * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< * * cdef int t */ __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":296 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< * cdef dtype descr = PyArray_DESCR(self) * cdef int offset */ __pyx_v_f = NULL; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":297 * cdef int t * cdef char* f = NULL * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< * cdef int offset * */ __pyx_t_7 = PyArray_DESCR(__pyx_v_self); __pyx_t_3 = ((PyObject *)__pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); __pyx_t_3 = 0; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":300 * cdef int offset * * info.obj = self # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(descr): */ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = ((PyObject *)__pyx_v_self); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302 * info.obj = self * * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or */ __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); if (__pyx_t_1) { /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":303 * * if not PyDataType_HASFIELDS(descr): * t = descr.type_num # <<<<<<<<<<<<<< * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): */ __pyx_t_4 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_4; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304 * if not PyDataType_HASFIELDS(descr): * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); if (!__pyx_t_2) { goto __pyx_L15_next_or; } else { } __pyx_t_2 = (__pyx_v_little_endian != 0); if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L14_bool_binop_done; } __pyx_L15_next_or:; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":305 * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" */ __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L14_bool_binop_done; } __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L14_bool_binop_done:; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304 * if not PyDataType_HASFIELDS(descr): * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ if (unlikely(__pyx_t_1)) { /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":306 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(2, 306, __pyx_L1_error) /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":304 * if not PyDataType_HASFIELDS(descr): * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":307 * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" */ switch (__pyx_v_t) { case NPY_BYTE: __pyx_v_f = ((char *)"b"); break; case NPY_UBYTE: /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":308 * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" */ __pyx_v_f = ((char *)"B"); break; case NPY_SHORT: /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":309 * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" */ __pyx_v_f = ((char *)"h"); break; case NPY_USHORT: /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":310 * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" */ __pyx_v_f = ((char *)"H"); break; case NPY_INT: /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":311 * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" */ __pyx_v_f = ((char *)"i"); break; case NPY_UINT: /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":312 * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" */ __pyx_v_f = ((char *)"I"); break; case NPY_LONG: /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":313 * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" */ __pyx_v_f = ((char *)"l"); break; case NPY_ULONG: /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":314 * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" */ __pyx_v_f = ((char *)"L"); break; case NPY_LONGLONG: /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":315 * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" */ __pyx_v_f = ((char *)"q"); break; case NPY_ULONGLONG: /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":316 * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" */ __pyx_v_f = ((char *)"Q"); break; case NPY_FLOAT: /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":317 * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" */ __pyx_v_f = ((char *)"f"); break; case NPY_DOUBLE: /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":318 * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" */ __pyx_v_f = ((char *)"d"); break; case NPY_LONGDOUBLE: /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":319 * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" */ __pyx_v_f = ((char *)"g"); break; case NPY_CFLOAT: /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":320 * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" */ __pyx_v_f = ((char *)"Zf"); break; case NPY_CDOUBLE: /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":321 * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" */ __pyx_v_f = ((char *)"Zd"); break; case NPY_CLONGDOUBLE: /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":322 * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f = "O" * else: */ __pyx_v_f = ((char *)"Zg"); break; case NPY_OBJECT: /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":323 * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ __pyx_v_f = ((char *)"O"); break; default: /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":325 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(2, 325, __pyx_L1_error) break; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":326 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< * return * else: */ __pyx_v_info->format = __pyx_v_f; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":327 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< * else: * info.format = PyObject_Malloc(_buffer_format_string_len) */ __pyx_r = 0; goto __pyx_L0; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":302 * info.obj = self * * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or */ } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":329 * return * else: * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 */ /*else*/ { __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":330 * else: * info.format = PyObject_Malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< * offset = 0 * f = _util_dtypestring(descr, info.format + 1, */ (__pyx_v_info->format[0]) = '^'; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":331 * info.format = PyObject_Malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< * f = _util_dtypestring(descr, info.format + 1, * info.format + _buffer_format_string_len, */ __pyx_v_offset = 0; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":332 * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< * info.format + _buffer_format_string_len, * &offset) */ __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error) __pyx_v_f = __pyx_t_9; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":335 * info.format + _buffer_format_string_len, * &offset) * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< * * def __releasebuffer__(ndarray self, Py_buffer* info): */ (__pyx_v_f[0]) = '\x00'; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":258 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< * # This implementation of getbuffer is geared towards Cython * # requirements, and does not yet fulfill the PEP. */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info->obj != NULL) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; } goto __pyx_L2; __pyx_L0:; if (__pyx_v_info->obj == Py_None) { __Pyx_GOTREF(__pyx_v_info->obj); __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; } __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_descr); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337 * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * PyObject_Free(info.format) */ /* Python wrapper */ static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__releasebuffer__", 0); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * PyObject_Free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":339 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * PyObject_Free(info.format) # <<<<<<<<<<<<<< * if sizeof(npy_intp) != sizeof(Py_ssize_t): * PyObject_Free(info.strides) */ PyObject_Free(__pyx_v_info->format); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":338 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< * PyObject_Free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): */ } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340 * if PyArray_HASFIELDS(self): * PyObject_Free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * PyObject_Free(info.strides) * # info.shape was stored after info.strides in the same block */ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":341 * PyObject_Free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * PyObject_Free(info.strides) # <<<<<<<<<<<<<< * # info.shape was stored after info.strides in the same block * */ PyObject_Free(__pyx_v_info->strides); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":340 * if PyArray_HASFIELDS(self): * PyObject_Free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< * PyObject_Free(info.strides) * # info.shape was stored after info.strides in the same block */ } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":337 * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< * if PyArray_HASFIELDS(self): * PyObject_Free(info.format) */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(1, a) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":822 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew2(a, b): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":821 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(1, a) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(2, a, b) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":825 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew3(a, b, c): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(2, a, b) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(3, a, b, c) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":828 * * cdef inline object PyArray_MultiIterNew3(a, b, c): * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(3, a, b, c) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(4, a, b, c, d) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":831 * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":830 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(4, a, b, c, d) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(5, a, b, c, d, e) * */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":834 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< * * cdef inline tuple PyDataType_SHAPE(dtype d): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< * return PyArray_MultiIterNew(5, a, b, c, d, e) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< * if PyDataType_HASSUBARRAY(d): * return d.subarray.shape */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< * return d.subarray.shape * else: */ __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); if (__pyx_t_1) { /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":838 * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): * return d.subarray.shape # <<<<<<<<<<<<<< * else: * return () */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); goto __pyx_L0; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< * return d.subarray.shape * else: */ } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":840 * return d.subarray.shape * else: * return () # <<<<<<<<<<<<<< * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_empty_tuple); __pyx_r = __pyx_empty_tuple; goto __pyx_L0; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":836 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< * if PyDataType_HASSUBARRAY(d): * return d.subarray.shape */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842 * return () * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< * # Recursive utility function used in __getbuffer__ to get format * # string. The new location in the format string is returned. */ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { PyArray_Descr *__pyx_v_child = 0; int __pyx_v_endian_detector; int __pyx_v_little_endian; PyObject *__pyx_v_fields = 0; PyObject *__pyx_v_childname = NULL; PyObject *__pyx_v_new_offset = NULL; PyObject *__pyx_v_t = NULL; char *__pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; long __pyx_t_8; char *__pyx_t_9; __Pyx_RefNannySetupContext("_util_dtypestring", 0); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":847 * * cdef dtype child * cdef int endian_detector = 1 # <<<<<<<<<<<<<< * cdef bint little_endian = ((&endian_detector)[0] != 0) * cdef tuple fields */ __pyx_v_endian_detector = 1; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":848 * cdef dtype child * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< * cdef tuple fields * */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< * fields = descr.fields[childname] * child, new_offset = fields */ if (unlikely(__pyx_v_descr->names == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(2, 851, __pyx_L1_error) } __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error) #else __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":852 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< * child, new_offset = fields * */ if (unlikely(__pyx_v_descr->fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(2, 852, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":853 * for childname in descr.names: * fields = descr.fields[childname] * child, new_offset = fields # <<<<<<<<<<<<<< * * if (end - f) - (new_offset - offset[0]) < 15: */ if (likely(__pyx_v_fields != Py_None)) { PyObject* sequence = __pyx_v_fields; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); __PYX_ERR(2, 853, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error) } if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); __pyx_t_4 = 0; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855 * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * */ __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); if (unlikely(__pyx_t_6)) { /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == c'>' and little_endian) or */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(2, 856, __pyx_L1_error) /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855 * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * */ } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); if (!__pyx_t_7) { goto __pyx_L8_next_or; } else { } __pyx_t_7 = (__pyx_v_little_endian != 0); if (!__pyx_t_7) { } else { __pyx_t_6 = __pyx_t_7; goto __pyx_L7_bool_binop_done; } __pyx_L8_next_or:; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":859 * * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< * raise ValueError(u"Non-native byte order not supported") * # One could encode it in the format string and have Cython */ __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); if (__pyx_t_7) { } else { __pyx_t_6 = __pyx_t_7; goto __pyx_L7_bool_binop_done; } __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); __pyx_t_6 = __pyx_t_7; __pyx_L7_bool_binop_done:; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ if (unlikely(__pyx_t_6)) { /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":860 * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * # One could encode it in the format string and have Cython * # complain instead, BUT: < and > in format strings also imply */ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(2, 860, __pyx_L1_error) /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":858 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") */ } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":870 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< * f[0] = 120 # "x"; pad byte * f += 1 */ while (1) { __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_6) break; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":871 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< * f += 1 * offset[0] += 1 */ (__pyx_v_f[0]) = 0x78; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":872 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< * offset[0] += 1 * */ __pyx_v_f = (__pyx_v_f + 1); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":873 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< * * offset[0] += child.itemsize */ __pyx_t_8 = 0; (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":875 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< * * if not PyDataType_HASFIELDS(child): */ __pyx_t_8 = 0; (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":877 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); if (__pyx_t_6) { /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":878 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); __pyx_t_4 = 0; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":879 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short.") * */ __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); if (unlikely(__pyx_t_6)) { /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":880 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< * * # Until ticket #99 is fixed, use integers to avoid warnings */ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(2, 880, __pyx_L1_error) /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":879 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short.") * */ } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":883 * * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 98; goto __pyx_L15; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":884 * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 66; goto __pyx_L15; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":885 * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x68; goto __pyx_L15; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":886 * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 72; goto __pyx_L15; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":887 * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x69; goto __pyx_L15; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":888 * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 73; goto __pyx_L15; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":889 * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x6C; goto __pyx_L15; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":890 * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 76; goto __pyx_L15; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":891 * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x71; goto __pyx_L15; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":892 * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 81; goto __pyx_L15; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":893 * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x66; goto __pyx_L15; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":894 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x64; goto __pyx_L15; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":895 * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x67; goto __pyx_L15; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":896 * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 0x66; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L15; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":897 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 0x64; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L15; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":898 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: */ __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; (__pyx_v_f[1]) = 0x67; __pyx_v_f = (__pyx_v_f + 1); goto __pyx_L15; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":899 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(__pyx_t_6)) { (__pyx_v_f[0]) = 79; goto __pyx_L15; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":901 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * f += 1 * else: */ /*else*/ { __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(2, 901, __pyx_L1_error) } __pyx_L15:; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":902 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * f += 1 # <<<<<<<<<<<<<< * else: * # Cython ignores struct boundary information ("T{...}"), */ __pyx_v_f = (__pyx_v_f + 1); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":877 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< * t = child.type_num * if end - f < 5: */ goto __pyx_L13; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":906 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< * return f * */ /*else*/ { __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error) __pyx_v_f = __pyx_t_9; } __pyx_L13:; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< * fields = descr.fields[childname] * child, new_offset = fields */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":907 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< * * */ __pyx_r = __pyx_v_f; goto __pyx_L0; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842 * return () * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< * # Recursive utility function used in __getbuffer__ to get format * # string. The new location in the format string is returned. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_child); __Pyx_XDECREF(__pyx_v_fields); __Pyx_XDECREF(__pyx_v_childname); __Pyx_XDECREF(__pyx_v_new_offset); __Pyx_XDECREF(__pyx_v_t); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< * Py_INCREF(base) # important to do this before stealing the reference below! * PyArray_SetBaseObject(arr, base) */ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_array_base", 0); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1023 * * cdef inline void set_array_base(ndarray arr, object base): * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< * PyArray_SetBaseObject(arr, base) * */ Py_INCREF(__pyx_v_base); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1024 * cdef inline void set_array_base(ndarray arr, object base): * Py_INCREF(base) # important to do this before stealing the reference below! * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1022 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< * Py_INCREF(base) # important to do this before stealing the reference below! * PyArray_SetBaseObject(arr, base) */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1026 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * base = PyArray_BASE(arr) * if base is NULL: */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { PyObject *__pyx_v_base; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 0); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1027 * * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< * if base is NULL: * return None */ __pyx_v_base = PyArray_BASE(__pyx_v_arr); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1028 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< * return None * return base */ __pyx_t_1 = ((__pyx_v_base == NULL) != 0); if (__pyx_t_1) { /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1029 * base = PyArray_BASE(arr) * if base is NULL: * return None # <<<<<<<<<<<<<< * return base * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1028 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< * return None * return base */ } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1030 * if base is NULL: * return None * return base # <<<<<<<<<<<<<< * * # Versions of the import_* functions which are more suitable for */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_base)); __pyx_r = ((PyObject *)__pyx_v_base); goto __pyx_L0; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1026 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< * base = PyArray_BASE(arr) * if base is NULL: */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1034 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< * try: * _import_array() */ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("import_array", 0); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< * _import_array() * except Exception: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1036 * cdef inline int import_array() except -1: * try: * _import_array() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy.core.multiarray failed to import") */ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error) /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< * _import_array() * except Exception: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1037 * try: * _import_array() * except Exception: # <<<<<<<<<<<<<< * raise ImportError("numpy.core.multiarray failed to import") * */ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1038 * _import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_umath() except -1: */ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(2, 1038, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1035 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< * _import_array() * except Exception: */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L8_try_end:; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1034 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< * try: * _import_array() */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1040 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< * try: * _import_umath() */ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("import_umath", 0); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< * _import_umath() * except Exception: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1042 * cdef inline int import_umath() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy.core.umath failed to import") */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error) /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< * _import_umath() * except Exception: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1043 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< * raise ImportError("numpy.core.umath failed to import") * */ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1044 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_ufunc() except -1: */ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(2, 1044, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1041 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< * _import_umath() * except Exception: */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L8_try_end:; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1040 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< * try: * _import_umath() */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1046 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< * try: * _import_umath() */ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("import_ufunc", 0); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< * _import_umath() * except Exception: */ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1048 * cdef inline int import_ufunc() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy.core.umath failed to import") */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error) /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< * _import_umath() * except Exception: */ } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L8_try_end; __pyx_L3_error:; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1049 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< * raise ImportError("numpy.core.umath failed to import") */ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1050 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< */ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __PYX_ERR(2, 1050, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1047 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< * _import_umath() * except Exception: */ __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); goto __pyx_L1_error; __pyx_L8_try_end:; } /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1046 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< * try: * _import_umath() */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_tp_new_11pysobatools_5_mask_RLEs(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_11pysobatools_5_mask_4RLEs_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_11pysobatools_5_mask_RLEs(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); Py_INCREF(o); __pyx_pw_11pysobatools_5_mask_4RLEs_3__dealloc__(o); Py_DECREF(o); PyErr_Restore(etype, eval, etb); } (*Py_TYPE(o)->tp_free)(o); } static PyObject *__pyx_tp_getattro_11pysobatools_5_mask_RLEs(PyObject *o, PyObject *n) { PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n); if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); v = __pyx_pw_11pysobatools_5_mask_4RLEs_5__getattr__(o, n); } return v; } static PyMethodDef __pyx_methods_11pysobatools_5_mask_RLEs[] = { {"__getattr__", (PyCFunction)__pyx_pw_11pysobatools_5_mask_4RLEs_5__getattr__, METH_O|METH_COEXIST, 0}, {"__reduce_cython__", (PyCFunction)__pyx_pw_11pysobatools_5_mask_4RLEs_7__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_11pysobatools_5_mask_4RLEs_9__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_11pysobatools_5_mask_RLEs = { PyVarObject_HEAD_INIT(0, 0) "pysobatools._mask.RLEs", /*tp_name*/ sizeof(struct __pyx_obj_11pysobatools_5_mask_RLEs), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_11pysobatools_5_mask_RLEs, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ __pyx_tp_getattro_11pysobatools_5_mask_RLEs, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_11pysobatools_5_mask_RLEs, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_11pysobatools_5_mask_RLEs, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif }; static PyObject *__pyx_tp_new_11pysobatools_5_mask_Masks(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_11pysobatools_5_mask_5Masks_1__cinit__(o, a, k) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_11pysobatools_5_mask_Masks(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif (*Py_TYPE(o)->tp_free)(o); } static PyMethodDef __pyx_methods_11pysobatools_5_mask_Masks[] = { {"__array__", (PyCFunction)__pyx_pw_11pysobatools_5_mask_5Masks_3__array__, METH_NOARGS, 0}, {"__reduce_cython__", (PyCFunction)__pyx_pw_11pysobatools_5_mask_5Masks_5__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_11pysobatools_5_mask_5Masks_7__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static PyTypeObject __pyx_type_11pysobatools_5_mask_Masks = { PyVarObject_HEAD_INIT(0, 0) "pysobatools._mask.Masks", /*tp_name*/ sizeof(struct __pyx_obj_11pysobatools_5_mask_Masks), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_11pysobatools_5_mask_Masks, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_11pysobatools_5_mask_Masks, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_11pysobatools_5_mask_Masks, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif #if PY_VERSION_HEX >= 0x030800b1 0, /*tp_vectorcall*/ #endif }; static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 #if CYTHON_PEP489_MULTI_PHASE_INIT static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ static int __pyx_pymod_exec__mask(PyObject* module); /*proto*/ static PyModuleDef_Slot __pyx_moduledef_slots[] = { {Py_mod_create, (void*)__pyx_pymod_create}, {Py_mod_exec, (void*)__pyx_pymod_exec__mask}, {0, NULL} }; #endif static struct PyModuleDef __pyx_moduledef = { PyModuleDef_HEAD_INIT, "_mask", 0, /* m_doc */ #if CYTHON_PEP489_MULTI_PHASE_INIT 0, /* m_size */ #else -1, /* m_size */ #endif __pyx_methods /* m_methods */, #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_moduledef_slots, /* m_slots */ #else NULL, /* m_reload */ #endif NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif #ifndef CYTHON_SMALL_CODE #if defined(__clang__) #define CYTHON_SMALL_CODE #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #define CYTHON_SMALL_CODE __attribute__((cold)) #else #define CYTHON_SMALL_CODE #endif #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1}, {&__pyx_n_s_F, __pyx_k_F, sizeof(__pyx_k_F), 0, 0, 1, 1}, {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, {&__pyx_n_s_Masks, __pyx_k_Masks, sizeof(__pyx_k_Masks), 0, 0, 1, 1}, {&__pyx_n_s_N, __pyx_k_N, sizeof(__pyx_k_N), 0, 0, 1, 1}, {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, {&__pyx_n_s_PYTHON_VERSION, __pyx_k_PYTHON_VERSION, sizeof(__pyx_k_PYTHON_VERSION), 0, 0, 1, 1}, {&__pyx_kp_s_Python_version_must_be_2_or_3, __pyx_k_Python_version_must_be_2_or_3, sizeof(__pyx_k_Python_version_must_be_2_or_3), 0, 0, 1, 0}, {&__pyx_n_s_R, __pyx_k_R, sizeof(__pyx_k_R), 0, 0, 1, 1}, {&__pyx_n_s_RLEs, __pyx_k_RLEs, sizeof(__pyx_k_RLEs), 0, 0, 1, 1}, {&__pyx_n_s_Rs, __pyx_k_Rs, sizeof(__pyx_k_Rs), 0, 0, 1, 1}, {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, {&__pyx_kp_s_The_dt_and_gt_should_have_the_sa, __pyx_k_The_dt_and_gt_should_have_the_sa, sizeof(__pyx_k_The_dt_and_gt_should_have_the_sa), 0, 0, 1, 0}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1}, {&__pyx_n_s_a_2, __pyx_k_a_2, sizeof(__pyx_k_a_2), 0, 0, 1, 1}, {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1}, {&__pyx_n_s_area, __pyx_k_area, sizeof(__pyx_k_area), 0, 0, 1, 1}, {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1}, {&__pyx_n_s_astype, __pyx_k_astype, sizeof(__pyx_k_astype), 0, 0, 1, 1}, {&__pyx_n_s_author, __pyx_k_author, sizeof(__pyx_k_author), 0, 0, 1, 1}, {&__pyx_n_s_bb, __pyx_k_bb, sizeof(__pyx_k_bb), 0, 0, 1, 1}, {&__pyx_n_s_bbIou, __pyx_k_bbIou, sizeof(__pyx_k_bbIou), 0, 0, 1, 1}, {&__pyx_n_s_bb_2, __pyx_k_bb_2, sizeof(__pyx_k_bb_2), 0, 0, 1, 1}, {&__pyx_n_s_c_string, __pyx_k_c_string, sizeof(__pyx_k_c_string), 0, 0, 1, 1}, {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_cnts, __pyx_k_cnts, sizeof(__pyx_k_cnts), 0, 0, 1, 1}, {&__pyx_n_s_counts, __pyx_k_counts, sizeof(__pyx_k_counts), 0, 0, 1, 1}, {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1}, {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1}, {&__pyx_n_s_double, __pyx_k_double, sizeof(__pyx_k_double), 0, 0, 1, 1}, {&__pyx_n_s_dt, __pyx_k_dt, sizeof(__pyx_k_dt), 0, 0, 1, 1}, {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1}, {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, {&__pyx_n_s_frBbox, __pyx_k_frBbox, sizeof(__pyx_k_frBbox), 0, 0, 1, 1}, {&__pyx_n_s_frPoly, __pyx_k_frPoly, sizeof(__pyx_k_frPoly), 0, 0, 1, 1}, {&__pyx_n_s_frPyObjects, __pyx_k_frPyObjects, sizeof(__pyx_k_frPyObjects), 0, 0, 1, 1}, {&__pyx_n_s_frString, __pyx_k_frString, sizeof(__pyx_k_frString), 0, 0, 1, 1}, {&__pyx_n_s_frUncompressedRLE, __pyx_k_frUncompressedRLE, sizeof(__pyx_k_frUncompressedRLE), 0, 0, 1, 1}, {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, {&__pyx_n_s_gt, __pyx_k_gt, sizeof(__pyx_k_gt), 0, 0, 1, 1}, {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_kp_s_input_data_type_not_allowed, __pyx_k_input_data_type_not_allowed, sizeof(__pyx_k_input_data_type_not_allowed), 0, 0, 1, 0}, {&__pyx_kp_s_input_type_is_not_supported, __pyx_k_input_type_is_not_supported, sizeof(__pyx_k_input_type_is_not_supported), 0, 0, 1, 0}, {&__pyx_n_s_intersect, __pyx_k_intersect, sizeof(__pyx_k_intersect), 0, 0, 1, 1}, {&__pyx_n_s_iou, __pyx_k_iou, sizeof(__pyx_k_iou), 0, 0, 1, 1}, {&__pyx_n_s_iouFun, __pyx_k_iouFun, sizeof(__pyx_k_iouFun), 0, 0, 1, 1}, {&__pyx_n_s_iou_2, __pyx_k_iou_2, sizeof(__pyx_k_iou_2), 0, 0, 1, 1}, {&__pyx_n_s_iou_locals__bbIou, __pyx_k_iou_locals__bbIou, sizeof(__pyx_k_iou_locals__bbIou), 0, 0, 1, 1}, {&__pyx_n_s_iou_locals__len, __pyx_k_iou_locals__len, sizeof(__pyx_k_iou_locals__len), 0, 0, 1, 1}, {&__pyx_n_s_iou_locals__preproc, __pyx_k_iou_locals__preproc, sizeof(__pyx_k_iou_locals__preproc), 0, 0, 1, 1}, {&__pyx_n_s_iou_locals__rleIou, __pyx_k_iou_locals__rleIou, sizeof(__pyx_k_iou_locals__rleIou), 0, 0, 1, 1}, {&__pyx_n_s_isbox, __pyx_k_isbox, sizeof(__pyx_k_isbox), 0, 0, 1, 1}, {&__pyx_n_s_iscrowd, __pyx_k_iscrowd, sizeof(__pyx_k_iscrowd), 0, 0, 1, 1}, {&__pyx_n_s_isrle, __pyx_k_isrle, sizeof(__pyx_k_isrle), 0, 0, 1, 1}, {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1}, {&__pyx_n_s_len, __pyx_k_len, sizeof(__pyx_k_len), 0, 0, 1, 1}, {&__pyx_kp_s_list_input_can_be_bounding_box_N, __pyx_k_list_input_can_be_bounding_box_N, sizeof(__pyx_k_list_input_can_be_bounding_box_N), 0, 0, 1, 0}, {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_mask, __pyx_k_mask, sizeof(__pyx_k_mask), 0, 0, 1, 1}, {&__pyx_n_s_masks, __pyx_k_masks, sizeof(__pyx_k_masks), 0, 0, 1, 1}, {&__pyx_n_s_merge, __pyx_k_merge, sizeof(__pyx_k_merge), 0, 0, 1, 1}, {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, {&__pyx_n_s_np_poly, __pyx_k_np_poly, sizeof(__pyx_k_np_poly), 0, 0, 1, 1}, {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, {&__pyx_kp_s_numpy_ndarray_input_is_only_for, __pyx_k_numpy_ndarray_input_is_only_for, sizeof(__pyx_k_numpy_ndarray_input_is_only_for), 0, 0, 1, 0}, {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1}, {&__pyx_n_s_objs, __pyx_k_objs, sizeof(__pyx_k_objs), 0, 0, 1, 1}, {&__pyx_n_s_order, __pyx_k_order, sizeof(__pyx_k_order), 0, 0, 1, 1}, {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1}, {&__pyx_n_s_poly, __pyx_k_poly, sizeof(__pyx_k_poly), 0, 0, 1, 1}, {&__pyx_n_s_preproc, __pyx_k_preproc, sizeof(__pyx_k_preproc), 0, 0, 1, 1}, {&__pyx_n_s_py_string, __pyx_k_py_string, sizeof(__pyx_k_py_string), 0, 0, 1, 1}, {&__pyx_n_s_pysobatools__mask, __pyx_k_pysobatools__mask, sizeof(__pyx_k_pysobatools__mask), 0, 0, 1, 1}, {&__pyx_kp_s_pysobatools__mask_pyx, __pyx_k_pysobatools__mask_pyx, sizeof(__pyx_k_pysobatools__mask_pyx), 0, 0, 1, 0}, {&__pyx_n_s_pyiscrowd, __pyx_k_pyiscrowd, sizeof(__pyx_k_pyiscrowd), 0, 0, 1, 1}, {&__pyx_n_s_pyobj, __pyx_k_pyobj, sizeof(__pyx_k_pyobj), 0, 0, 1, 1}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, {&__pyx_n_s_reshape, __pyx_k_reshape, sizeof(__pyx_k_reshape), 0, 0, 1, 1}, {&__pyx_n_s_rleIou, __pyx_k_rleIou, sizeof(__pyx_k_rleIou), 0, 0, 1, 1}, {&__pyx_n_s_rleObjs, __pyx_k_rleObjs, sizeof(__pyx_k_rleObjs), 0, 0, 1, 1}, {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1}, {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1}, {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_toBbox, __pyx_k_toBbox, sizeof(__pyx_k_toBbox), 0, 0, 1, 1}, {&__pyx_n_s_toString, __pyx_k_toString, sizeof(__pyx_k_toString), 0, 0, 1, 1}, {&__pyx_n_s_tsungyi, __pyx_k_tsungyi, sizeof(__pyx_k_tsungyi), 0, 0, 1, 1}, {&__pyx_n_s_ucRles, __pyx_k_ucRles, sizeof(__pyx_k_ucRles), 0, 0, 1, 1}, {&__pyx_n_s_uint32, __pyx_k_uint32, sizeof(__pyx_k_uint32), 0, 0, 1, 1}, {&__pyx_n_s_uint8, __pyx_k_uint8, sizeof(__pyx_k_uint8), 0, 0, 1, 1}, {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, {&__pyx_kp_s_unrecognized_type_The_following, __pyx_k_unrecognized_type_The_following, sizeof(__pyx_k_unrecognized_type_The_following), 0, 0, 1, 0}, {&__pyx_n_s_utf8, __pyx_k_utf8, sizeof(__pyx_k_utf8), 0, 0, 1, 1}, {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1}, {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1}, {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 67, __pyx_L1_error) __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 73, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 124, __pyx_L1_error) __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error) __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error) __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") */ __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); /* "(tree fragment)":4 * raise TypeError("no default __reduce__ due to non-trivial __cinit__") * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< */ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") */ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 2, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); /* "(tree fragment)":4 * raise TypeError("no default __reduce__ due to non-trivial __cinit__") * def __setstate_cython__(self, __pyx_state): * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< */ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); /* "pysobatools/_mask.pyx":130 * py_string = str.encode(obj['counts']) if type(obj['counts']) == str else obj['counts'] * else: * raise Exception('Python version must be 2 or 3') # <<<<<<<<<<<<<< * c_string = py_string * rleFrString( &Rs._R[i], c_string, obj['size'][0], obj['size'][1] ) */ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_Python_version_must_be_2_or_3); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); /* "pysobatools/_mask.pyx":154 * def merge(rleObjs, intersect=0): * cdef RLEs Rs = _frString(rleObjs) * cdef RLEs R = RLEs(1) # <<<<<<<<<<<<<< * rleMerge(Rs._R, R._R, Rs._n, intersect) * obj = _toString(R)[0] */ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); /* "pysobatools/_mask.pyx":180 * # check if it's Nx4 bbox * if not len(objs.shape) == 2 or not objs.shape[1] == 4: * raise Exception('numpy ndarray input is only for *bounding boxes* and should have Nx4 dimension') # <<<<<<<<<<<<<< * objs = objs.astype(np.double) * elif type(objs) == list: */ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_numpy_ndarray_input_is_only_for); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); /* "pysobatools/_mask.pyx":193 * objs = _frString(objs) * else: * raise Exception('list input can be bounding box (Nx4) or RLEs ([RLE])') # <<<<<<<<<<<<<< * else: * raise Exception('unrecognized type. The following type: RLEs (rle), np.ndarray (box), and list (box) are supported.') */ __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_list_input_can_be_bounding_box_N); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); /* "pysobatools/_mask.pyx":195 * raise Exception('list input can be bounding box (Nx4) or RLEs ([RLE])') * else: * raise Exception('unrecognized type. The following type: RLEs (rle), np.ndarray (box), and list (box) are supported.') # <<<<<<<<<<<<<< * return objs * def _rleIou(RLEs dt, RLEs gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): */ __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_unrecognized_type_The_following); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); /* "pysobatools/_mask.pyx":172 * # iou computation. support function overload (RLEs-RLEs and bbox-bbox). * def iou( dt, gt, pyiscrowd ): * def _preproc(objs): # <<<<<<<<<<<<<< * if len(objs) == 0: * return objs */ __pyx_tuple__10 = PyTuple_Pack(4, __pyx_n_s_objs, __pyx_n_s_isbox, __pyx_n_s_isrle, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysobatools__mask_pyx, __pyx_n_s_preproc, 172, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 172, __pyx_L1_error) /* "pysobatools/_mask.pyx":197 * raise Exception('unrecognized type. The following type: RLEs (rle), np.ndarray (box), and list (box) are supported.') * return objs * def _rleIou(RLEs dt, RLEs gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): # <<<<<<<<<<<<<< * rleIou( dt._R, gt._R, m, n, iscrowd.data, _iou.data ) * def _bbIou(np.ndarray[np.double_t, ndim=2] dt, np.ndarray[np.double_t, ndim=2] gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): */ __pyx_tuple__12 = PyTuple_Pack(6, __pyx_n_s_dt, __pyx_n_s_gt, __pyx_n_s_iscrowd, __pyx_n_s_m, __pyx_n_s_n, __pyx_n_s_iou); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysobatools__mask_pyx, __pyx_n_s_rleIou, 197, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 197, __pyx_L1_error) /* "pysobatools/_mask.pyx":199 * def _rleIou(RLEs dt, RLEs gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): * rleIou( dt._R, gt._R, m, n, iscrowd.data, _iou.data ) * def _bbIou(np.ndarray[np.double_t, ndim=2] dt, np.ndarray[np.double_t, ndim=2] gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): # <<<<<<<<<<<<<< * bbIou( dt.data, gt.data, m, n, iscrowd.data, _iou.data ) * def _len(obj): */ __pyx_tuple__14 = PyTuple_Pack(6, __pyx_n_s_dt, __pyx_n_s_gt, __pyx_n_s_iscrowd, __pyx_n_s_m, __pyx_n_s_n, __pyx_n_s_iou); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysobatools__mask_pyx, __pyx_n_s_bbIou, 199, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 199, __pyx_L1_error) /* "pysobatools/_mask.pyx":201 * def _bbIou(np.ndarray[np.double_t, ndim=2] dt, np.ndarray[np.double_t, ndim=2] gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): * bbIou( dt.data, gt.data, m, n, iscrowd.data, _iou.data ) * def _len(obj): # <<<<<<<<<<<<<< * cdef siz N = 0 * if type(obj) == RLEs: */ __pyx_tuple__16 = PyTuple_Pack(2, __pyx_n_s_obj, __pyx_n_s_N); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysobatools__mask_pyx, __pyx_n_s_len, 201, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 201, __pyx_L1_error) /* "pysobatools/_mask.pyx":221 * return [] * if not type(dt) == type(gt): * raise Exception('The dt and gt should have the same data type, either RLEs, list or np.ndarray') # <<<<<<<<<<<<<< * * # define local variables */ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_The_dt_and_gt_should_have_the_sa); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); /* "pysobatools/_mask.pyx":232 * _iouFun = _bbIou * else: * raise Exception('input data type not allowed.') # <<<<<<<<<<<<<< * _iou = malloc(m*n* sizeof(double)) * iou = np.zeros((m*n, ), dtype=np.double) */ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_input_data_type_not_allowed); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); /* "pysobatools/_mask.pyx":307 * objs = frUncompressedRLE([pyobj], h, w)[0] * else: * raise Exception('input type is not supported.') # <<<<<<<<<<<<<< * return objs */ __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_input_type_is_not_supported); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) */ __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(2, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< * * info.buf = PyArray_DATA(self) */ __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(2, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":306 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" */ __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(2, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__23); __Pyx_GIVEREF(__pyx_tuple__23); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == c'>' and little_endian) or */ __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(2, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":880 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< * * # Until ticket #99 is fixed, use integers to avoid warnings */ __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(2, 880, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1038 * _import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_umath() except -1: */ __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(2, 1038, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1044 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_ufunc() except -1: */ __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(2, 1044, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__27); __Pyx_GIVEREF(__pyx_tuple__27); /* "pysobatools/_mask.pyx":103 * * # internal conversion from Python RLEs object to compressed RLE format * def _toString(RLEs Rs): # <<<<<<<<<<<<<< * cdef siz n = Rs.n * cdef bytes py_string */ __pyx_tuple__28 = PyTuple_Pack(6, __pyx_n_s_Rs, __pyx_n_s_n, __pyx_n_s_py_string, __pyx_n_s_c_string, __pyx_n_s_objs, __pyx_n_s_i); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__28); __Pyx_GIVEREF(__pyx_tuple__28); __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysobatools__mask_pyx, __pyx_n_s_toString, 103, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 103, __pyx_L1_error) /* "pysobatools/_mask.pyx":119 * * # internal conversion from compressed RLE format to Python RLEs object * def _frString(rleObjs): # <<<<<<<<<<<<<< * cdef siz n = len(rleObjs) * Rs = RLEs(n) */ __pyx_tuple__30 = PyTuple_Pack(7, __pyx_n_s_rleObjs, __pyx_n_s_n, __pyx_n_s_Rs, __pyx_n_s_py_string, __pyx_n_s_c_string, __pyx_n_s_i, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__30); __Pyx_GIVEREF(__pyx_tuple__30); __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysobatools__mask_pyx, __pyx_n_s_frString, 119, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 119, __pyx_L1_error) /* "pysobatools/_mask.pyx":137 * # encode mask to RLEs objects * # list of RLE string can be generated by RLEs member function * def encode(np.ndarray[np.uint8_t, ndim=3, mode='fortran'] mask): # <<<<<<<<<<<<<< * h, w, n = mask.shape[0], mask.shape[1], mask.shape[2] * cdef RLEs Rs = RLEs(n) */ __pyx_tuple__32 = PyTuple_Pack(6, __pyx_n_s_mask, __pyx_n_s_h, __pyx_n_s_w, __pyx_n_s_n, __pyx_n_s_Rs, __pyx_n_s_objs); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__32); __Pyx_GIVEREF(__pyx_tuple__32); __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysobatools__mask_pyx, __pyx_n_s_encode, 137, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 137, __pyx_L1_error) /* "pysobatools/_mask.pyx":145 * * # decode mask from compressed list of RLE string or RLEs object * def decode(rleObjs): # <<<<<<<<<<<<<< * cdef RLEs Rs = _frString(rleObjs) * h, w, n = Rs._R[0].h, Rs._R[0].w, Rs._n */ __pyx_tuple__34 = PyTuple_Pack(6, __pyx_n_s_rleObjs, __pyx_n_s_Rs, __pyx_n_s_h, __pyx_n_s_w, __pyx_n_s_n, __pyx_n_s_masks); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__34); __Pyx_GIVEREF(__pyx_tuple__34); __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysobatools__mask_pyx, __pyx_n_s_decode, 145, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 145, __pyx_L1_error) /* "pysobatools/_mask.pyx":152 * return np.array(masks) * * def merge(rleObjs, intersect=0): # <<<<<<<<<<<<<< * cdef RLEs Rs = _frString(rleObjs) * cdef RLEs R = RLEs(1) */ __pyx_tuple__36 = PyTuple_Pack(5, __pyx_n_s_rleObjs, __pyx_n_s_intersect, __pyx_n_s_Rs, __pyx_n_s_R, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__36); __Pyx_GIVEREF(__pyx_tuple__36); __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysobatools__mask_pyx, __pyx_n_s_merge, 152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 152, __pyx_L1_error) /* "pysobatools/_mask.pyx":159 * return obj * * def area(rleObjs): # <<<<<<<<<<<<<< * cdef RLEs Rs = _frString(rleObjs) * cdef uint* _a = malloc(Rs._n* sizeof(uint)) */ __pyx_tuple__38 = PyTuple_Pack(5, __pyx_n_s_rleObjs, __pyx_n_s_Rs, __pyx_n_s_a, __pyx_n_s_shape, __pyx_n_s_a_2); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__38); __Pyx_GIVEREF(__pyx_tuple__38); __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysobatools__mask_pyx, __pyx_n_s_area, 159, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 159, __pyx_L1_error) /* "pysobatools/_mask.pyx":171 * * # iou computation. support function overload (RLEs-RLEs and bbox-bbox). * def iou( dt, gt, pyiscrowd ): # <<<<<<<<<<<<<< * def _preproc(objs): * if len(objs) == 0: */ __pyx_tuple__40 = PyTuple_Pack(18, __pyx_n_s_dt, __pyx_n_s_gt, __pyx_n_s_pyiscrowd, __pyx_n_s_preproc, __pyx_n_s_preproc, __pyx_n_s_rleIou, __pyx_n_s_rleIou, __pyx_n_s_bbIou, __pyx_n_s_bbIou, __pyx_n_s_len, __pyx_n_s_len, __pyx_n_s_iscrowd, __pyx_n_s_m, __pyx_n_s_n, __pyx_n_s_iou, __pyx_n_s_shape, __pyx_n_s_iouFun, __pyx_n_s_iou_2); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__40); __Pyx_GIVEREF(__pyx_tuple__40); __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(3, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysobatools__mask_pyx, __pyx_n_s_iou_2, 171, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 171, __pyx_L1_error) /* "pysobatools/_mask.pyx":241 * return iou.reshape((m,n), order='F') * * def toBbox( rleObjs ): # <<<<<<<<<<<<<< * cdef RLEs Rs = _frString(rleObjs) * cdef siz n = Rs.n */ __pyx_tuple__42 = PyTuple_Pack(6, __pyx_n_s_rleObjs, __pyx_n_s_Rs, __pyx_n_s_n, __pyx_n_s_bb_2, __pyx_n_s_shape, __pyx_n_s_bb); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__42); __Pyx_GIVEREF(__pyx_tuple__42); __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysobatools__mask_pyx, __pyx_n_s_toBbox, 241, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 241, __pyx_L1_error) /* "pysobatools/_mask.pyx":253 * return bb * * def frBbox(np.ndarray[np.double_t, ndim=2] bb, siz h, siz w ): # <<<<<<<<<<<<<< * cdef siz n = bb.shape[0] * Rs = RLEs(n) */ __pyx_tuple__44 = PyTuple_Pack(6, __pyx_n_s_bb, __pyx_n_s_h, __pyx_n_s_w, __pyx_n_s_n, __pyx_n_s_Rs, __pyx_n_s_objs); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__44); __Pyx_GIVEREF(__pyx_tuple__44); __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysobatools__mask_pyx, __pyx_n_s_frBbox, 253, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 253, __pyx_L1_error) /* "pysobatools/_mask.pyx":260 * return objs * * def frPoly( poly, siz h, siz w ): # <<<<<<<<<<<<<< * cdef np.ndarray[np.double_t, ndim=1] np_poly * n = len(poly) */ __pyx_tuple__46 = PyTuple_Pack(9, __pyx_n_s_poly, __pyx_n_s_h, __pyx_n_s_w, __pyx_n_s_np_poly, __pyx_n_s_n, __pyx_n_s_Rs, __pyx_n_s_i, __pyx_n_s_p, __pyx_n_s_objs); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__46); __Pyx_GIVEREF(__pyx_tuple__46); __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysobatools__mask_pyx, __pyx_n_s_frPoly, 260, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 260, __pyx_L1_error) /* "pysobatools/_mask.pyx":270 * return objs * * def frUncompressedRLE(ucRles, siz h, siz w): # <<<<<<<<<<<<<< * cdef np.ndarray[np.uint32_t, ndim=1] cnts * cdef RLE R */ __pyx_tuple__48 = PyTuple_Pack(11, __pyx_n_s_ucRles, __pyx_n_s_h, __pyx_n_s_w, __pyx_n_s_cnts, __pyx_n_s_R, __pyx_n_s_data, __pyx_n_s_n, __pyx_n_s_objs, __pyx_n_s_i, __pyx_n_s_Rs, __pyx_n_s_j); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__48); __Pyx_GIVEREF(__pyx_tuple__48); __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysobatools__mask_pyx, __pyx_n_s_frUncompressedRLE, 270, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 270, __pyx_L1_error) /* "pysobatools/_mask.pyx":288 * return objs * * def frPyObjects(pyobj, h, w): # <<<<<<<<<<<<<< * # encode rle from a list of python objects * if type(pyobj) == np.ndarray: */ __pyx_tuple__50 = PyTuple_Pack(4, __pyx_n_s_pyobj, __pyx_n_s_h, __pyx_n_s_w, __pyx_n_s_objs); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__50); __Pyx_GIVEREF(__pyx_tuple__50); __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysobatools__mask_pyx, __pyx_n_s_frPyObjects, 288, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error); __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ static int __Pyx_modinit_global_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); /*--- Global init code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); /*--- Variable export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_export_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); /*--- Function export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ if (PyType_Ready(&__pyx_type_11pysobatools_5_mask_RLEs) < 0) __PYX_ERR(0, 56, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_11pysobatools_5_mask_RLEs.tp_print = 0; #endif if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RLEs, (PyObject *)&__pyx_type_11pysobatools_5_mask_RLEs) < 0) __PYX_ERR(0, 56, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11pysobatools_5_mask_RLEs) < 0) __PYX_ERR(0, 56, __pyx_L1_error) __pyx_ptype_11pysobatools_5_mask_RLEs = &__pyx_type_11pysobatools_5_mask_RLEs; if (PyType_Ready(&__pyx_type_11pysobatools_5_mask_Masks) < 0) __PYX_ERR(0, 77, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_11pysobatools_5_mask_Masks.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_11pysobatools_5_mask_Masks.tp_dictoffset && __pyx_type_11pysobatools_5_mask_Masks.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_11pysobatools_5_mask_Masks.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Masks, (PyObject *)&__pyx_type_11pysobatools_5_mask_Masks) < 0) __PYX_ERR(0, 77, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject*)&__pyx_type_11pysobatools_5_mask_Masks) < 0) __PYX_ERR(0, 77, __pyx_L1_error) __pyx_ptype_11pysobatools_5_mask_Masks = &__pyx_type_11pysobatools_5_mask_Masks; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error) __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error) __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error) __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error) __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_variable_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); /*--- Variable import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_import_code(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); /*--- Function import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } #if PY_MAJOR_VERSION < 3 #ifdef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC void #else #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #endif #else #ifdef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyObject * #else #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #endif #endif #if PY_MAJOR_VERSION < 3 __Pyx_PyMODINIT_FUNC init_mask(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC init_mask(void) #else __Pyx_PyMODINIT_FUNC PyInit__mask(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC PyInit__mask(void) #if CYTHON_PEP489_MULTI_PHASE_INIT { return PyModuleDef_Init(&__pyx_moduledef); } static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { #if PY_VERSION_HEX >= 0x030700A1 static PY_INT64_T main_interpreter_id = -1; PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); if (main_interpreter_id == -1) { main_interpreter_id = current_id; return (unlikely(current_id == -1)) ? -1 : 0; } else if (unlikely(main_interpreter_id != current_id)) #else static PyInterpreterState *main_interpreter = NULL; PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; if (!main_interpreter) { main_interpreter = current_interpreter; } else if (unlikely(main_interpreter != current_interpreter)) #endif { PyErr_SetString( PyExc_ImportError, "Interpreter change detected - this module can only be loaded into one interpreter per process."); return -1; } return 0; } static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { PyObject *value = PyObject_GetAttrString(spec, from_name); int result = 0; if (likely(value)) { if (allow_none || value != Py_None) { result = PyDict_SetItemString(moddict, to_name, value); } Py_DECREF(value); } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); } else { result = -1; } return result; } static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { PyObject *module = NULL, *moddict, *modname; if (__Pyx_check_single_interpreter()) return NULL; if (__pyx_m) return __Pyx_NewRef(__pyx_m); modname = PyObject_GetAttrString(spec, "name"); if (unlikely(!modname)) goto bad; module = PyModule_NewObject(modname); Py_DECREF(modname); if (unlikely(!module)) goto bad; moddict = PyModule_GetDict(module); if (unlikely(!moddict)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; return module; bad: Py_XDECREF(module); return NULL; } static CYTHON_SMALL_CODE int __pyx_pymod_exec__mask(PyObject *__pyx_pyinit_module) #endif #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { if (__pyx_m == __pyx_pyinit_module) return 0; PyErr_SetString(PyExc_RuntimeError, "Module '_mask' has already been imported. Re-initialisation is not supported."); return -1; } #elif PY_MAJOR_VERSION >= 3 if (__pyx_m) return __Pyx_NewRef(__pyx_m); #endif #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit__mask(void)", 0); if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #ifdef __Pxy_PyFrame_Initialize_Offsets __Pxy_PyFrame_Initialize_Offsets(); #endif __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_AsyncGen_USED if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_m = __pyx_pyinit_module; Py_INCREF(__pyx_m); #else #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("_mask", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) #endif __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_b); __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_cython_runtime); if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error); /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif if (__pyx_module_is_main_pysobatools___mask) { if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) if (!PyDict_GetItemString(modules, "pysobatools._mask")) { if (unlikely(PyDict_SetItemString(modules, "pysobatools._mask", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error) } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(); (void)__Pyx_modinit_variable_export_code(); (void)__Pyx_modinit_function_export_code(); if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; (void)__Pyx_modinit_variable_import_code(); (void)__Pyx_modinit_function_import_code(); /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif /* "pysobatools/_mask.pyx":11 * #************************************************************************** * * __author__ = 'tsungyi' # <<<<<<<<<<<<<< * * import sys */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_author, __pyx_n_s_tsungyi) < 0) __PYX_ERR(0, 11, __pyx_L1_error) /* "pysobatools/_mask.pyx":13 * __author__ = 'tsungyi' * * import sys # <<<<<<<<<<<<<< * PYTHON_VERSION = sys.version_info[0] * */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":14 * * import sys * PYTHON_VERSION = sys.version_info[0] # <<<<<<<<<<<<<< * * # import both Python-level and C-level symbols of Numpy */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_version_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_PYTHON_VERSION, __pyx_t_1) < 0) __PYX_ERR(0, 14, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":18 * # import both Python-level and C-level symbols of Numpy * # the API uses Numpy to interface C and Python * import numpy as np # <<<<<<<<<<<<<< * cimport numpy as np * from libc.stdlib cimport malloc, free */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":23 * * # intialized Numpy. must do. * np.import_array() # <<<<<<<<<<<<<< * * # import numpy C function */ __pyx_t_3 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 23, __pyx_L1_error) /* "pysobatools/_mask.pyx":103 * * # internal conversion from Python RLEs object to compressed RLE format * def _toString(RLEs Rs): # <<<<<<<<<<<<<< * cdef siz n = Rs.n * cdef bytes py_string */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_11pysobatools_5_mask_1_toString, NULL, __pyx_n_s_pysobatools__mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_toString, __pyx_t_1) < 0) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":119 * * # internal conversion from compressed RLE format to Python RLEs object * def _frString(rleObjs): # <<<<<<<<<<<<<< * cdef siz n = len(rleObjs) * Rs = RLEs(n) */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_11pysobatools_5_mask_3_frString, NULL, __pyx_n_s_pysobatools__mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_frString, __pyx_t_1) < 0) __PYX_ERR(0, 119, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":137 * # encode mask to RLEs objects * # list of RLE string can be generated by RLEs member function * def encode(np.ndarray[np.uint8_t, ndim=3, mode='fortran'] mask): # <<<<<<<<<<<<<< * h, w, n = mask.shape[0], mask.shape[1], mask.shape[2] * cdef RLEs Rs = RLEs(n) */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_11pysobatools_5_mask_5encode, NULL, __pyx_n_s_pysobatools__mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_encode, __pyx_t_1) < 0) __PYX_ERR(0, 137, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":145 * * # decode mask from compressed list of RLE string or RLEs object * def decode(rleObjs): # <<<<<<<<<<<<<< * cdef RLEs Rs = _frString(rleObjs) * h, w, n = Rs._R[0].h, Rs._R[0].w, Rs._n */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_11pysobatools_5_mask_7decode, NULL, __pyx_n_s_pysobatools__mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_decode, __pyx_t_1) < 0) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":152 * return np.array(masks) * * def merge(rleObjs, intersect=0): # <<<<<<<<<<<<<< * cdef RLEs Rs = _frString(rleObjs) * cdef RLEs R = RLEs(1) */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_11pysobatools_5_mask_9merge, NULL, __pyx_n_s_pysobatools__mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_merge, __pyx_t_1) < 0) __PYX_ERR(0, 152, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":159 * return obj * * def area(rleObjs): # <<<<<<<<<<<<<< * cdef RLEs Rs = _frString(rleObjs) * cdef uint* _a = malloc(Rs._n* sizeof(uint)) */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_11pysobatools_5_mask_11area, NULL, __pyx_n_s_pysobatools__mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_area, __pyx_t_1) < 0) __PYX_ERR(0, 159, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":171 * * # iou computation. support function overload (RLEs-RLEs and bbox-bbox). * def iou( dt, gt, pyiscrowd ): # <<<<<<<<<<<<<< * def _preproc(objs): * if len(objs) == 0: */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_11pysobatools_5_mask_13iou, NULL, __pyx_n_s_pysobatools__mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_iou_2, __pyx_t_1) < 0) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":241 * return iou.reshape((m,n), order='F') * * def toBbox( rleObjs ): # <<<<<<<<<<<<<< * cdef RLEs Rs = _frString(rleObjs) * cdef siz n = Rs.n */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_11pysobatools_5_mask_15toBbox, NULL, __pyx_n_s_pysobatools__mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_toBbox, __pyx_t_1) < 0) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":253 * return bb * * def frBbox(np.ndarray[np.double_t, ndim=2] bb, siz h, siz w ): # <<<<<<<<<<<<<< * cdef siz n = bb.shape[0] * Rs = RLEs(n) */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_11pysobatools_5_mask_17frBbox, NULL, __pyx_n_s_pysobatools__mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_frBbox, __pyx_t_1) < 0) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":260 * return objs * * def frPoly( poly, siz h, siz w ): # <<<<<<<<<<<<<< * cdef np.ndarray[np.double_t, ndim=1] np_poly * n = len(poly) */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_11pysobatools_5_mask_19frPoly, NULL, __pyx_n_s_pysobatools__mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_frPoly, __pyx_t_1) < 0) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":270 * return objs * * def frUncompressedRLE(ucRles, siz h, siz w): # <<<<<<<<<<<<<< * cdef np.ndarray[np.uint32_t, ndim=1] cnts * cdef RLE R */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_11pysobatools_5_mask_21frUncompressedRLE, NULL, __pyx_n_s_pysobatools__mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_frUncompressedRLE, __pyx_t_1) < 0) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":288 * return objs * * def frPyObjects(pyobj, h, w): # <<<<<<<<<<<<<< * # encode rle from a list of python objects * if type(pyobj) == np.ndarray: */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_11pysobatools_5_mask_23frPyObjects, NULL, __pyx_n_s_pysobatools__mask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_frPyObjects, __pyx_t_1) < 0) __PYX_ERR(0, 288, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "pysobatools/_mask.pyx":1 * # distutils: language = c # <<<<<<<<<<<<<< * # distutils: sources = ../common/maskApi.c * */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "../../miniconda/envs/py36/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1046 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< * try: * _import_umath() */ /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); if (__pyx_m) { if (__pyx_d) { __Pyx_AddTraceback("init pysobatools._mask", __pyx_clineno, __pyx_lineno, __pyx_filename); } Py_CLEAR(__pyx_m); } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init pysobatools._mask"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if CYTHON_PEP489_MULTI_PHASE_INIT return (__pyx_m != NULL) ? 0 : -1; #elif PY_MAJOR_VERSION >= 3 return __pyx_m; #else return; #endif } /* --- Runtime support code --- */ /* Refnanny */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule(modname); if (!m) goto end; p = PyObject_GetAttrString(m, "RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif /* PyObjectGetAttrStr */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #endif /* GetBuiltinName */ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); if (unlikely(!result)) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } /* RaiseDoubleKeywords */ static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION >= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } /* ParseKeywords */ static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; while (PyDict_Next(kwds, &pos, &key, &value)) { name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; continue; } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } /* RaiseArgTupleInvalid */ static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } /* BytesEquals */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { const char *ps1, *ps2; Py_ssize_t length = PyBytes_GET_SIZE(s1); if (length != PyBytes_GET_SIZE(s2)) return (equals == Py_NE); ps1 = PyBytes_AS_STRING(s1); ps2 = PyBytes_AS_STRING(s2); if (ps1[0] != ps2[0]) { return (equals == Py_NE); } else if (length == 1) { return (equals == Py_EQ); } else { int result; #if CYTHON_USE_UNICODE_INTERNALS Py_hash_t hash1, hash2; hash1 = ((PyBytesObject*)s1)->ob_shash; hash2 = ((PyBytesObject*)s2)->ob_shash; if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { return (equals == Py_NE); } #endif result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } /* UnicodeEquals */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else #if PY_MAJOR_VERSION < 3 PyObject* owned_ref = NULL; #endif int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unicode = PyUnicode_CheckExact(s1); s2_is_unicode = PyUnicode_CheckExact(s2); #if PY_MAJOR_VERSION < 3 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { owned_ref = PyUnicode_FromObject(s2); if (unlikely(!owned_ref)) return -1; s2 = owned_ref; s2_is_unicode = 1; } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { owned_ref = PyUnicode_FromObject(s1); if (unlikely(!owned_ref)) return -1; s1 = owned_ref; s1_is_unicode = 1; } else if (((!s2_is_unicode) & (!s1_is_unicode))) { return __Pyx_PyBytes_Equals(s1, s2, equals); } #endif if (s1_is_unicode & s2_is_unicode) { Py_ssize_t length; int kind; void *data1, *data2; if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) return -1; length = __Pyx_PyUnicode_GET_LENGTH(s1); if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { goto return_ne; } #if CYTHON_USE_UNICODE_INTERNALS { Py_hash_t hash1, hash2; #if CYTHON_PEP393_ENABLED hash1 = ((PyASCIIObject*)s1)->hash; hash2 = ((PyASCIIObject*)s2)->hash; #else hash1 = ((PyUnicodeObject*)s1)->hash; hash2 = ((PyUnicodeObject*)s2)->hash; #endif if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { goto return_ne; } } #endif kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; } data1 = __Pyx_PyUnicode_DATA(s1); data2 = __Pyx_PyUnicode_DATA(s2); if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { goto return_ne; } else if (length == 1) { goto return_eq; } else { int result = memcmp(data1, data2, (size_t)(length * kind)); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & s2_is_unicode) { goto return_ne; } else if ((s2 == Py_None) & s1_is_unicode) { goto return_ne; } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } return_eq: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ); return_ne: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_NE); #endif } /* PyCFunctionFastCall */ #if CYTHON_FAST_PYCCALL static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { PyCFunctionObject *func = (PyCFunctionObject*)func_obj; PyCFunction meth = PyCFunction_GET_FUNCTION(func); PyObject *self = PyCFunction_GET_SELF(func); int flags = PyCFunction_GET_FLAGS(func); assert(PyCFunction_Check(func)); assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); assert(nargs >= 0); assert(nargs == 0 || args != NULL); /* _PyCFunction_FastCallDict() must not be called with an exception set, because it may clear it (directly or indirectly) and so the caller loses its exception */ assert(!PyErr_Occurred()); if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); } else { return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); } } #endif /* PyFunctionFastCall */ #if CYTHON_FAST_PYCALL static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, PyObject *globals) { PyFrameObject *f; PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject **fastlocals; Py_ssize_t i; PyObject *result; assert(globals != NULL); /* XXX Perhaps we should create a specialized PyFrame_New() that doesn't take locals, but does take builtins without sanity checking them. */ assert(tstate != NULL); f = PyFrame_New(tstate, co, globals, NULL); if (f == NULL) { return NULL; } fastlocals = __Pyx_PyFrame_GetLocalsplus(f); for (i = 0; i < na; i++) { Py_INCREF(*args); fastlocals[i] = *args++; } result = PyEval_EvalFrameEx(f,0); ++tstate->recursion_depth; Py_DECREF(f); --tstate->recursion_depth; return result; } #if 1 || PY_VERSION_HEX < 0x030600B1 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); PyObject *globals = PyFunction_GET_GLOBALS(func); PyObject *argdefs = PyFunction_GET_DEFAULTS(func); PyObject *closure; #if PY_MAJOR_VERSION >= 3 PyObject *kwdefs; #endif PyObject *kwtuple, **k; PyObject **d; Py_ssize_t nd; Py_ssize_t nk; PyObject *result; assert(kwargs == NULL || PyDict_Check(kwargs)); nk = kwargs ? PyDict_Size(kwargs) : 0; if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { return NULL; } if ( #if PY_MAJOR_VERSION >= 3 co->co_kwonlyargcount == 0 && #endif likely(kwargs == NULL || nk == 0) && co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { if (argdefs == NULL && co->co_argcount == nargs) { result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); goto done; } else if (nargs == 0 && argdefs != NULL && co->co_argcount == Py_SIZE(argdefs)) { /* function called with no arguments, but all parameters have a default value: use default values as arguments .*/ args = &PyTuple_GET_ITEM(argdefs, 0); result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); goto done; } } if (kwargs != NULL) { Py_ssize_t pos, i; kwtuple = PyTuple_New(2 * nk); if (kwtuple == NULL) { result = NULL; goto done; } k = &PyTuple_GET_ITEM(kwtuple, 0); pos = i = 0; while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { Py_INCREF(k[i]); Py_INCREF(k[i+1]); i += 2; } nk = i / 2; } else { kwtuple = NULL; k = NULL; } closure = PyFunction_GET_CLOSURE(func); #if PY_MAJOR_VERSION >= 3 kwdefs = PyFunction_GET_KW_DEFAULTS(func); #endif if (argdefs != NULL) { d = &PyTuple_GET_ITEM(argdefs, 0); nd = Py_SIZE(argdefs); } else { d = NULL; nd = 0; } #if PY_MAJOR_VERSION >= 3 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, kwdefs, closure); #else result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, args, (int)nargs, k, (int)nk, d, (int)nd, closure); #endif Py_XDECREF(kwtuple); done: Py_LeaveRecursiveCall(); return result; } #endif #endif /* PyObjectCall */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = func->ob_type->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectCallMethO */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; cfunc = PyCFunction_GET_FUNCTION(func); self = PyCFunction_GET_SELF(func); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectCallOneArg */ #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_New(1); if (unlikely(!args)) return NULL; Py_INCREF(arg); PyTuple_SET_ITEM(args, 0, arg); result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { #if CYTHON_FAST_PYCALL if (PyFunction_Check(func)) { return __Pyx_PyFunction_FastCall(func, &arg, 1); } #endif if (likely(PyCFunction_Check(func))) { if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { return __Pyx_PyObject_CallMethO(func, arg); #if CYTHON_FAST_PYCCALL } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { return __Pyx_PyCFunction_FastCall(func, &arg, 1); #endif } } return __Pyx__PyObject_CallOneArg(func, arg); } #else static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_Pack(1, arg); if (unlikely(!args)) return NULL; result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } #endif /* PyErrFetchRestore */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); } static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; } #endif /* RaiseException */ #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { __Pyx_PyThreadState_declare Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } if (PyType_Check(type)) { #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } } __Pyx_PyThreadState_assign __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *instance_class = NULL; if (value && PyExceptionInstance_Check(value)) { instance_class = (PyObject*) Py_TYPE(value); if (instance_class != type) { int is_subclass = PyObject_IsSubclass(instance_class, type); if (!is_subclass) { instance_class = NULL; } else if (unlikely(is_subclass == -1)) { goto bad; } else { type = instance_class; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } if (cause) { PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { #if CYTHON_COMPILING_IN_PYPY PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); Py_INCREF(tb); PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #else PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } #endif } bad: Py_XDECREF(owned_instance); return; } #endif /* ExtTypeTest */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(__Pyx_TypeCheck(obj, type))) return 1; PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", Py_TYPE(obj)->tp_name, type->tp_name); return 0; } /* ArgTypeTest */ static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } else if (exact) { #if PY_MAJOR_VERSION == 2 if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(__Pyx_TypeCheck(obj, type))) return 1; } PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", name, type->tp_name, Py_TYPE(obj)->tp_name); return 0; } /* PyIntBinop */ #if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { (void)inplace; (void)zerodivision_check; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long x; long a = PyInt_AS_LONG(op1); x = (long)((unsigned long)a + b); if (likely((x^a) >= 0 || (x^b) >= 0)) return PyInt_FromLong(x); return PyLong_Type.tp_as_number->nb_add(op1, op2); } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; #ifdef HAVE_LONG_LONG const PY_LONG_LONG llb = intval; PY_LONG_LONG lla, llx; #endif const digit* digits = ((PyLongObject*)op1)->ob_digit; const Py_ssize_t size = Py_SIZE(op1); if (likely(__Pyx_sst_abs(size) <= 1)) { a = likely(size) ? digits[0] : 0; if (size == -1) a = -a; } else { switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; #ifdef HAVE_LONG_LONG } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; #endif } CYTHON_FALLTHROUGH; default: return PyLong_Type.tp_as_number->nb_add(op1, op2); } } x = a + b; return PyLong_FromLong(x); #ifdef HAVE_LONG_LONG long_long: llx = lla + llb; return PyLong_FromLongLong(llx); #endif } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); double result; PyFPE_START_PROTECT("add", return NULL) result = ((double)a) + (double)b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); } #endif /* PyIntCompare */ static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) { if (op1 == op2) { Py_RETURN_TRUE; } #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long a = PyInt_AS_LONG(op1); if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE; } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { int unequal; unsigned long uintval; Py_ssize_t size = Py_SIZE(op1); const digit* digits = ((PyLongObject*)op1)->ob_digit; if (intval == 0) { if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; } else if (intval < 0) { if (size >= 0) Py_RETURN_FALSE; intval = -intval; size = -size; } else { if (size <= 0) Py_RETURN_FALSE; } uintval = (unsigned long) intval; #if PyLong_SHIFT * 4 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 4)) { unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif #if PyLong_SHIFT * 3 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 3)) { unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif #if PyLong_SHIFT * 2 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 2)) { unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif #if PyLong_SHIFT * 1 < SIZEOF_LONG*8 if (uintval >> (PyLong_SHIFT * 1)) { unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); } else #endif unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE; } return ( PyObject_RichCompare(op1, op2, Py_EQ)); } /* PyDictVersioning */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { PyObject *dict = Py_TYPE(obj)->tp_dict; return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; } static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { PyObject **dictptr = NULL; Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; if (offset) { #if CYTHON_COMPILING_IN_CPYTHON dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); #else dictptr = _PyObject_GetDictPtr(obj); #endif } return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; } static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { PyObject *dict = Py_TYPE(obj)->tp_dict; if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) return 0; return obj_dict_version == __Pyx_get_object_dict_version(obj); } #endif /* GetModuleGlobalName */ #if CYTHON_USE_DICT_VERSIONS static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) #else static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) #endif { PyObject *result; #if !CYTHON_AVOID_BORROWED_REFS #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } else if (unlikely(PyErr_Occurred())) { return NULL; } #else result = PyDict_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } #endif #else result = PyObject_GetItem(__pyx_d, name); __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } PyErr_Clear(); #endif return __Pyx_GetBuiltinName(name); } /* DictGetItem */ #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { PyObject *value; value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (!PyErr_Occurred()) { if (unlikely(PyTuple_Check(key))) { PyObject* args = PyTuple_Pack(1, key); if (likely(args)) { PyErr_SetObject(PyExc_KeyError, args); Py_DECREF(args); } } else { PyErr_SetObject(PyExc_KeyError, key); } } return NULL; } Py_INCREF(value); return value; } #endif /* PyObjectCall2Args */ static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { PyObject *args, *result = NULL; #if CYTHON_FAST_PYCALL if (PyFunction_Check(function)) { PyObject *args[2] = {arg1, arg2}; return __Pyx_PyFunction_FastCall(function, args, 2); } #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(function)) { PyObject *args[2] = {arg1, arg2}; return __Pyx_PyCFunction_FastCall(function, args, 2); } #endif args = PyTuple_New(2); if (unlikely(!args)) goto done; Py_INCREF(arg1); PyTuple_SET_ITEM(args, 0, arg1); Py_INCREF(arg2); PyTuple_SET_ITEM(args, 1, arg2); Py_INCREF(function); result = __Pyx_PyObject_Call(function, args, NULL); Py_DECREF(args); Py_DECREF(function); done: return result; } /* GetItemInt */ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyList_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyTuple_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) return NULL; PyErr_Clear(); } } return m->sq_item(o, i); } } #else if (is_list || PySequence_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } /* IsLittleEndian */ static CYTHON_INLINE int __Pyx_Is_Little_Endian(void) { union { uint32_t u32; uint8_t u8[4]; } S; S.u32 = 0x01020304; return S.u8[0] == 4; } /* BufferFormatCheck */ static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, __Pyx_BufFmt_StackElem* stack, __Pyx_TypeInfo* type) { stack[0].field = &ctx->root; stack[0].parent_offset = 0; ctx->root.type = type; ctx->root.name = "buffer dtype"; ctx->root.offset = 0; ctx->head = stack; ctx->head->field = &ctx->root; ctx->fmt_offset = 0; ctx->head->parent_offset = 0; ctx->new_packmode = '@'; ctx->enc_packmode = '@'; ctx->new_count = 1; ctx->enc_count = 0; ctx->enc_type = 0; ctx->is_complex = 0; ctx->is_valid_array = 0; ctx->struct_alignment = 0; while (type->typegroup == 'S') { ++ctx->head; ctx->head->field = type->fields; ctx->head->parent_offset = 0; type = type->fields->type; } } static int __Pyx_BufFmt_ParseNumber(const char** ts) { int count; const char* t = *ts; if (*t < '0' || *t > '9') { return -1; } else { count = *t++ - '0'; while (*t >= '0' && *t <= '9') { count *= 10; count += *t++ - '0'; } } *ts = t; return count; } static int __Pyx_BufFmt_ExpectNumber(const char **ts) { int number = __Pyx_BufFmt_ParseNumber(ts); if (number == -1) PyErr_Format(PyExc_ValueError,\ "Does not understand character buffer dtype format string ('%c')", **ts); return number; } static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { PyErr_Format(PyExc_ValueError, "Unexpected format string character: '%c'", ch); } static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { switch (ch) { case 'c': return "'char'"; case 'b': return "'signed char'"; case 'B': return "'unsigned char'"; case 'h': return "'short'"; case 'H': return "'unsigned short'"; case 'i': return "'int'"; case 'I': return "'unsigned int'"; case 'l': return "'long'"; case 'L': return "'unsigned long'"; case 'q': return "'long long'"; case 'Q': return "'unsigned long long'"; case 'f': return (is_complex ? "'complex float'" : "'float'"); case 'd': return (is_complex ? "'complex double'" : "'double'"); case 'g': return (is_complex ? "'complex long double'" : "'long double'"); case 'T': return "a struct"; case 'O': return "Python object"; case 'P': return "a pointer"; case 's': case 'p': return "a string"; case 0: return "end"; default: return "unparseable format string"; } } static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return 2; case 'i': case 'I': case 'l': case 'L': return 4; case 'q': case 'Q': return 8; case 'f': return (is_complex ? 8 : 4); case 'd': return (is_complex ? 16 : 8); case 'g': { PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); return 0; } case 'O': case 'P': return sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { switch (ch) { case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(short); case 'i': case 'I': return sizeof(int); case 'l': case 'L': return sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(float) * (is_complex ? 2 : 1); case 'd': return sizeof(double) * (is_complex ? 2 : 1); case 'g': return sizeof(long double) * (is_complex ? 2 : 1); case 'O': case 'P': return sizeof(void*); default: { __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } } typedef struct { char c; short x; } __Pyx_st_short; typedef struct { char c; int x; } __Pyx_st_int; typedef struct { char c; long x; } __Pyx_st_long; typedef struct { char c; float x; } __Pyx_st_float; typedef struct { char c; double x; } __Pyx_st_double; typedef struct { char c; long double x; } __Pyx_st_longdouble; typedef struct { char c; void *x; } __Pyx_st_void_p; #ifdef HAVE_LONG_LONG typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; #endif static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(__Pyx_st_float) - sizeof(float); case 'd': return sizeof(__Pyx_st_double) - sizeof(double); case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } /* These are for computing the padding at the end of the struct to align on the first member of the struct. This will probably the same as above, but we don't have any guarantees. */ typedef struct { short x; char c; } __Pyx_pad_short; typedef struct { int x; char c; } __Pyx_pad_int; typedef struct { long x; char c; } __Pyx_pad_long; typedef struct { float x; char c; } __Pyx_pad_float; typedef struct { double x; char c; } __Pyx_pad_double; typedef struct { long double x; char c; } __Pyx_pad_longdouble; typedef struct { void *x; char c; } __Pyx_pad_void_p; #ifdef HAVE_LONG_LONG typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; #endif static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) { switch (ch) { case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); #ifdef HAVE_LONG_LONG case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG); #endif case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); default: __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { switch (ch) { case 'c': return 'H'; case 'b': case 'h': case 'i': case 'l': case 'q': case 's': case 'p': return 'I'; case 'B': case 'H': case 'I': case 'L': case 'Q': return 'U'; case 'f': case 'd': case 'g': return (is_complex ? 'C' : 'R'); case 'O': return 'O'; case 'P': return 'P'; default: { __Pyx_BufFmt_RaiseUnexpectedChar(ch); return 0; } } } static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { if (ctx->head == NULL || ctx->head->field == &ctx->root) { const char* expected; const char* quote; if (ctx->head == NULL) { expected = "end"; quote = ""; } else { expected = ctx->head->field->type->name; quote = "'"; } PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch, expected %s%s%s but got %s", quote, expected, quote, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); } else { __Pyx_StructField* field = ctx->head->field; __Pyx_StructField* parent = (ctx->head - 1)->field; PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), parent->type->name, field->name); } } static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { char group; size_t size, offset, arraysize = 1; if (ctx->enc_type == 0) return 0; if (ctx->head->field->type->arraysize[0]) { int i, ndim = 0; if (ctx->enc_type == 's' || ctx->enc_type == 'p') { ctx->is_valid_array = ctx->head->field->type->ndim == 1; ndim = 1; if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { PyErr_Format(PyExc_ValueError, "Expected a dimension of size %zu, got %zu", ctx->head->field->type->arraysize[0], ctx->enc_count); return -1; } } if (!ctx->is_valid_array) { PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", ctx->head->field->type->ndim, ndim); return -1; } for (i = 0; i < ctx->head->field->type->ndim; i++) { arraysize *= ctx->head->field->type->arraysize[i]; } ctx->is_valid_array = 0; ctx->enc_count = 1; } group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); do { __Pyx_StructField* field = ctx->head->field; __Pyx_TypeInfo* type = field->type; if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); } else { size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); } if (ctx->enc_packmode == '@') { size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); size_t align_mod_offset; if (align_at == 0) return -1; align_mod_offset = ctx->fmt_offset % align_at; if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; if (ctx->struct_alignment == 0) ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, ctx->is_complex); } if (type->size != size || type->typegroup != group) { if (type->typegroup == 'C' && type->fields != NULL) { size_t parent_offset = ctx->head->parent_offset + field->offset; ++ctx->head; ctx->head->field = type->fields; ctx->head->parent_offset = parent_offset; continue; } if ((type->typegroup == 'H' || group == 'H') && type->size == size) { } else { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } } offset = ctx->head->parent_offset + field->offset; if (ctx->fmt_offset != offset) { PyErr_Format(PyExc_ValueError, "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected", (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); return -1; } ctx->fmt_offset += size; if (arraysize) ctx->fmt_offset += (arraysize - 1) * size; --ctx->enc_count; while (1) { if (field == &ctx->root) { ctx->head = NULL; if (ctx->enc_count != 0) { __Pyx_BufFmt_RaiseExpected(ctx); return -1; } break; } ctx->head->field = ++field; if (field->type == NULL) { --ctx->head; field = ctx->head->field; continue; } else if (field->type->typegroup == 'S') { size_t parent_offset = ctx->head->parent_offset + field->offset; if (field->type->fields->type == NULL) continue; field = field->type->fields; ++ctx->head; ctx->head->field = field; ctx->head->parent_offset = parent_offset; break; } else { break; } } } while (ctx->enc_count); ctx->enc_type = 0; ctx->is_complex = 0; return 0; } static PyObject * __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) { const char *ts = *tsp; int i = 0, number; int ndim = ctx->head->field->type->ndim; ; ++ts; if (ctx->new_count != 1) { PyErr_SetString(PyExc_ValueError, "Cannot handle repeated arrays in format string"); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; while (*ts && *ts != ')') { switch (*ts) { case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; default: break; } number = __Pyx_BufFmt_ExpectNumber(&ts); if (number == -1) return NULL; if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) return PyErr_Format(PyExc_ValueError, "Expected a dimension of size %zu, got %d", ctx->head->field->type->arraysize[i], number); if (*ts != ',' && *ts != ')') return PyErr_Format(PyExc_ValueError, "Expected a comma in format string, got '%c'", *ts); if (*ts == ',') ts++; i++; } if (i != ndim) return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", ctx->head->field->type->ndim, i); if (!*ts) { PyErr_SetString(PyExc_ValueError, "Unexpected end of format string, expected ')'"); return NULL; } ctx->is_valid_array = 1; ctx->new_count = 1; *tsp = ++ts; return Py_None; } static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { int got_Z = 0; while (1) { switch(*ts) { case 0: if (ctx->enc_type != 0 && ctx->head == NULL) { __Pyx_BufFmt_RaiseExpected(ctx); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; if (ctx->head != NULL) { __Pyx_BufFmt_RaiseExpected(ctx); return NULL; } return ts; case ' ': case '\r': case '\n': ++ts; break; case '<': if (!__Pyx_Is_Little_Endian()) { PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '>': case '!': if (__Pyx_Is_Little_Endian()) { PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); return NULL; } ctx->new_packmode = '='; ++ts; break; case '=': case '@': case '^': ctx->new_packmode = *ts++; break; case 'T': { const char* ts_after_sub; size_t i, struct_count = ctx->new_count; size_t struct_alignment = ctx->struct_alignment; ctx->new_count = 1; ++ts; if (*ts != '{') { PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); return NULL; } if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; ctx->enc_count = 0; ctx->struct_alignment = 0; ++ts; ts_after_sub = ts; for (i = 0; i != struct_count; ++i) { ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); if (!ts_after_sub) return NULL; } ts = ts_after_sub; if (struct_alignment) ctx->struct_alignment = struct_alignment; } break; case '}': { size_t alignment = ctx->struct_alignment; ++ts; if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_type = 0; if (alignment && ctx->fmt_offset % alignment) { ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); } } return ts; case 'x': if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->fmt_offset += ctx->new_count; ctx->new_count = 1; ctx->enc_count = 0; ctx->enc_type = 0; ctx->enc_packmode = ctx->new_packmode; ++ts; break; case 'Z': got_Z = 1; ++ts; if (*ts != 'f' && *ts != 'd' && *ts != 'g') { __Pyx_BufFmt_RaiseUnexpectedChar('Z'); return NULL; } CYTHON_FALLTHROUGH; case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': case 'l': case 'L': case 'q': case 'Q': case 'f': case 'd': case 'g': case 'O': case 'p': if (ctx->enc_type == *ts && got_Z == ctx->is_complex && ctx->enc_packmode == ctx->new_packmode) { ctx->enc_count += ctx->new_count; ctx->new_count = 1; got_Z = 0; ++ts; break; } CYTHON_FALLTHROUGH; case 's': if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; ctx->enc_count = ctx->new_count; ctx->enc_packmode = ctx->new_packmode; ctx->enc_type = *ts; ctx->is_complex = got_Z; ++ts; ctx->new_count = 1; got_Z = 0; break; case ':': ++ts; while(*ts != ':') ++ts; ++ts; break; case '(': if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL; break; default: { int number = __Pyx_BufFmt_ExpectNumber(&ts); if (number == -1) return NULL; ctx->new_count = (size_t)number; } } } } /* BufferGetAndValidate */ static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (unlikely(info->buf == NULL)) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); } static void __Pyx_ZeroBuffer(Py_buffer* buf) { buf->buf = NULL; buf->obj = NULL; buf->strides = __Pyx_zeros; buf->shape = __Pyx_zeros; buf->suboffsets = __Pyx_minusones; } static int __Pyx__GetBufferAndValidate( Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack) { buf->buf = NULL; if (unlikely(__Pyx_GetBuffer(obj, buf, flags) == -1)) { __Pyx_ZeroBuffer(buf); return -1; } if (unlikely(buf->ndim != nd)) { PyErr_Format(PyExc_ValueError, "Buffer has wrong number of dimensions (expected %d, got %d)", nd, buf->ndim); goto fail; } if (!cast) { __Pyx_BufFmt_Context ctx; __Pyx_BufFmt_Init(&ctx, stack, dtype); if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; } if (unlikely((size_t)buf->itemsize != dtype->size)) { PyErr_Format(PyExc_ValueError, "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)", buf->itemsize, (buf->itemsize > 1) ? "s" : "", dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : ""); goto fail; } if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones; return 0; fail:; __Pyx_SafeReleaseBuffer(buf); return -1; } /* FetchCommonType */ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* fake_module; PyTypeObject* cached_type = NULL; fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); if (!fake_module) return NULL; Py_INCREF(fake_module); cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); if (cached_type) { if (!PyType_Check((PyObject*)cached_type)) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s is not a type object", type->tp_name); goto bad; } if (cached_type->tp_basicsize != type->tp_basicsize) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s has the wrong size, try recompiling", type->tp_name); goto bad; } } else { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); if (PyType_Ready(type) < 0) goto bad; if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) goto bad; Py_INCREF(type); cached_type = type; } done: Py_DECREF(fake_module); return cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } /* CythonFunction */ #include static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { if (unlikely(op->func_doc == NULL)) { if (op->func.m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); #else op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp = op->func_doc; if (value == NULL) { value = Py_None; } Py_INCREF(value); op->func_doc = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { if (unlikely(op->func_name == NULL)) { #if PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); #else op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } tmp = op->func_name; Py_INCREF(value); op->func_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) #else if (unlikely(value == NULL || !PyString_Check(value))) #endif { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } tmp = op->func_qualname; Py_INCREF(value); op->func_qualname = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) { PyObject *self; self = m->func_closure; if (self == NULL) self = Py_None; Py_INCREF(self); return self; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } tmp = op->func_dict; Py_INCREF(value); op->func_dict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = (op->func_code) ? op->func_code : Py_None; Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { int result = 0; PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); #else op->defaults_tuple = PySequence_ITEM(res, 0); if (unlikely(!op->defaults_tuple)) result = -1; else { op->defaults_kwdict = PySequence_ITEM(res, 1); if (unlikely(!op->defaults_kwdict)) result = -1; } #endif Py_DECREF(res); return result; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyTuple_Check(value)) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } Py_INCREF(value); tmp = op->defaults_tuple; op->defaults_tuple = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } Py_INCREF(value); tmp = op->defaults_kwdict; op->defaults_kwdict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value || value == Py_None) { value = NULL; } else if (!PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); tmp = op->func_annotations; op->func_annotations = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->func_annotations; if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {0, 0, 0, 0, 0} }; static PyMemberDef __pyx_CyFunction_members[] = { {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0}, {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromString(m->func.m_ml->ml_name); #else return PyString_FromString(m->func.m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; #if PY_VERSION_HEX < 0x030500A0 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) #else #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist) #endif static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); if (op == NULL) return NULL; op->flags = flags; __Pyx_CyFunction_weakreflist(op) = NULL; op->func.m_ml = ml; op->func.m_self = (PyObject *) op; Py_XINCREF(closure); op->func_closure = closure; Py_XINCREF(module); op->func.m_module = module; op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; op->func_classobj = NULL; op->func_globals = globals; Py_INCREF(op->func_globals); Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; PyObject_GC_Track(op); return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); Py_CLEAR(m->func.m_module); Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); Py_CLEAR(m->func_classobj); Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyObject_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) { if (__Pyx_CyFunction_weakreflist(m) != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); PyObject_GC_Del(m); } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); __Pyx__CyFunction_dealloc(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); Py_VISIT(m->func.m_module); Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); Py_VISIT(m->func_code); Py_VISIT(m->func_classobj); Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { Py_INCREF(func); return func; } if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { if (type == NULL) type = (PyObject *)(Py_TYPE(obj)); return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); } if (obj == Py_None) obj = NULL; return __Pyx_PyMethod_New(func, obj, type); } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", op->func_qualname, (void *)op); #else return PyString_FromFormat("", PyString_AsString(op->func_qualname), (void *)op); #endif } static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = f->m_ml->ml_meth; Py_ssize_t size; switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { case METH_VARARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { size = PyTuple_GET_SIZE(arg); if (likely(size == 0)) return (*meth)(self, NULL); PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); return NULL; } break; case METH_O: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { size = PyTuple_GET_SIZE(arg); if (likely(size == 1)) { PyObject *result, *arg0; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS arg0 = PyTuple_GET_ITEM(arg, 0); #else arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; #endif result = (*meth)(self, arg0); #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) Py_DECREF(arg0); #endif return result; } PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags in " "__Pyx_CyFunction_Call. METH_OLDARGS is no " "longer supported!"); return NULL; } PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); return NULL; } static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw); } static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { PyObject *result; __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { Py_ssize_t argc; PyObject *new_args; PyObject *self; argc = PyTuple_GET_SIZE(args); new_args = PyTuple_GetSlice(args, 1, argc); if (unlikely(!new_args)) return NULL; self = PyTuple_GetItem(args, 0); if (unlikely(!self)) { Py_DECREF(new_args); return NULL; } result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); Py_DECREF(new_args); } else { result = __Pyx_CyFunction_Call(func, args, kw); } return result; } static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, (destructor) __Pyx_CyFunction_dealloc, 0, 0, 0, #if PY_MAJOR_VERSION < 3 0, #else 0, #endif (reprfunc) __Pyx_CyFunction_repr, 0, 0, 0, 0, __Pyx_CyFunction_CallAsMethod, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, 0, (traverseproc) __Pyx_CyFunction_traverse, (inquiry) __Pyx_CyFunction_clear, 0, #if PY_VERSION_HEX < 0x030500A0 offsetof(__pyx_CyFunctionObject, func_weakreflist), #else offsetof(PyCFunctionObject, m_weakreflist), #endif 0, 0, __pyx_CyFunction_methods, __pyx_CyFunction_members, __pyx_CyFunction_getsets, 0, 0, __Pyx_CyFunction_descr_get, 0, offsetof(__pyx_CyFunctionObject, func_dict), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #endif #if PY_VERSION_HEX >= 0x030800b1 0, #endif }; static int __pyx_CyFunction_init(void) { __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); if (unlikely(__pyx_CyFunctionType == NULL)) { return -1; } return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyObject_Malloc(size); if (unlikely(!m->defaults)) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } /* BufferFallbackError */ static void __Pyx_RaiseBufferFallbackError(void) { PyErr_SetString(PyExc_ValueError, "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); } /* None */ static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { Py_ssize_t q = a / b; Py_ssize_t r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } /* BufferIndexError */ static void __Pyx_RaiseBufferIndexError(int axis) { PyErr_Format(PyExc_IndexError, "Out of bounds on buffer access (axis %d)", axis); } /* RaiseTooManyValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } /* RaiseNeedMoreValuesToUnpack */ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } /* RaiseNoneIterError */ static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } /* GetTopmostException */ #if CYTHON_USE_EXC_INFO_STACK static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate) { _PyErr_StackItem *exc_info = tstate->exc_info; while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && exc_info->previous_item != NULL) { exc_info = exc_info->previous_item; } return exc_info; } #endif /* SaveResetException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); *type = exc_info->exc_type; *value = exc_info->exc_value; *tb = exc_info->exc_traceback; #else *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; #endif Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); } static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = type; exc_info->exc_value = value; exc_info->exc_traceback = tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); } #endif /* PyErrExceptionMatches */ #if CYTHON_FAST_THREAD_STATE static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; icurexc_type; if (exc_type == err) return 1; if (unlikely(!exc_type)) return 0; if (unlikely(PyTuple_Check(err))) return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); } #endif /* GetException */ #if CYTHON_FAST_THREAD_STATE static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) #endif { PyObject *local_type, *local_value, *local_tb; #if CYTHON_FAST_THREAD_STATE PyObject *tmp_type, *tmp_value, *tmp_tb; local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_FAST_THREAD_STATE if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; #if PY_MAJOR_VERSION >= 3 if (local_tb) { if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; } #endif Py_XINCREF(local_tb); Py_XINCREF(local_type); Py_XINCREF(local_value); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_FAST_THREAD_STATE #if CYTHON_USE_EXC_INFO_STACK { _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = local_type; exc_info->exc_value = local_value; exc_info->exc_traceback = local_tb; } #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_SetExcInfo(local_type, local_value, local_tb); #endif return 0; bad: *type = 0; *value = 0; *tb = 0; Py_XDECREF(local_type); Py_XDECREF(local_value); Py_XDECREF(local_tb); return -1; } /* PyObject_GenericGetAttrNoDict */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 "'%.50s' object has no attribute '%U'", tp->tp_name, attr_name); #else "'%.50s' object has no attribute '%.400s'", tp->tp_name, PyString_AS_STRING(attr_name)); #endif return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { PyObject *descr; PyTypeObject *tp = Py_TYPE(obj); if (unlikely(!PyString_Check(attr_name))) { return PyObject_GenericGetAttr(obj, attr_name); } assert(!tp->tp_dictoffset); descr = _PyType_Lookup(tp, attr_name); if (unlikely(!descr)) { return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); } Py_INCREF(descr); #if PY_MAJOR_VERSION < 3 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) #endif { descrgetfunc f = Py_TYPE(descr)->tp_descr_get; if (unlikely(f)) { PyObject *res = f(descr, obj, (PyObject *)tp); Py_DECREF(descr); return res; } } return descr; } #endif /* PyObject_GenericGetAttr */ #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { return PyObject_GenericGetAttr(obj, attr_name); } return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); } #endif /* SetupReduce */ static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { int ret; PyObject *name_attr; name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name); if (likely(name_attr)) { ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); } else { ret = -1; } if (unlikely(ret < 0)) { PyErr_Clear(); ret = 0; } Py_XDECREF(name_attr); return ret; } static int __Pyx_setup_reduce(PyObject* type_obj) { int ret = 0; PyObject *object_reduce = NULL; PyObject *object_reduce_ex = NULL; PyObject *reduce = NULL; PyObject *reduce_ex = NULL; PyObject *reduce_cython = NULL; PyObject *setstate = NULL; PyObject *setstate_cython = NULL; #if CYTHON_USE_PYTYPE_LOOKUP if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; #else if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; #endif #if CYTHON_USE_PYTYPE_LOOKUP object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; #else object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; #endif reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; if (reduce_ex == object_reduce_ex) { #if CYTHON_USE_PYTYPE_LOOKUP object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; #else object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; #endif reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); if (!setstate) PyErr_Clear(); if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; } PyType_Modified((PyTypeObject*)type_obj); } } goto GOOD; BAD: if (!PyErr_Occurred()) PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); ret = -1; GOOD: #if !CYTHON_USE_PYTYPE_LOOKUP Py_XDECREF(object_reduce); Py_XDECREF(object_reduce_ex); #endif Py_XDECREF(reduce); Py_XDECREF(reduce_ex); Py_XDECREF(reduce_cython); Py_XDECREF(setstate); Py_XDECREF(setstate_cython); return ret; } /* TypeImport */ #ifndef __PYX_HAVE_RT_ImportType #define __PYX_HAVE_RT_ImportType static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size) { PyObject *result = 0; char warning[200]; Py_ssize_t basicsize; #ifdef Py_LIMITED_API PyObject *py_basicsize; #endif result = PyObject_GetAttrString(module, class_name); if (!result) goto bad; if (!PyType_Check(result)) { PyErr_Format(PyExc_TypeError, "%.200s.%.200s is not a type object", module_name, class_name); goto bad; } #ifndef Py_LIMITED_API basicsize = ((PyTypeObject *)result)->tp_basicsize; #else py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); if (!py_basicsize) goto bad; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = 0; if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) goto bad; #endif if ((size_t)basicsize < size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize); goto bad; } if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize); goto bad; } else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize); if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; } return (PyTypeObject *)result; bad: Py_XDECREF(result); return NULL; } #endif /* Import */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_MAJOR_VERSION < 3 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; } #endif if (!module) { #if PY_MAJOR_VERSION < 3 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } bad: #if PY_MAJOR_VERSION < 3 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON PyObject **cython_runtime_dict; #endif if (unlikely(!__pyx_cython_runtime)) { return c_line; } __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); #if CYTHON_COMPILING_IN_CPYTHON cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); if (likely(cython_runtime_dict)) { __PYX_PY_DICT_LOOKUP_IF_MODIFIED( use_cline, *cython_runtime_dict, __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) } else #endif { PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); if (use_cline_obj) { use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; Py_DECREF(use_cline_obj); } else { PyErr_Clear(); use_cline = NULL; } } if (!use_cline) { c_line = 0; PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); } else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { c_line = 0; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); return c_line; } #endif /* CodeObjectCache */ static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } /* AddTraceback */ #include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyObject *py_srcfile = 0; PyObject *py_funcname = 0; #if PY_MAJOR_VERSION < 3 py_srcfile = PyString_FromString(filename); #else py_srcfile = PyUnicode_FromString(filename); #endif if (!py_srcfile) goto bad; if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); #else py_funcname = PyUnicode_FromString(funcname); #endif } if (!py_funcname) goto bad; py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); Py_DECREF(py_funcname); return py_code; bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; PyThreadState *tstate = __Pyx_PyThreadState_Current; if (c_line) { c_line = __Pyx_CLineForTraceback(tstate, c_line); } py_code = __pyx_find_code_object(c_line ? -c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); } py_frame = PyFrame_New( tstate, /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; __Pyx_PyFrame_SetLineNumber(py_frame, py_line); PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } #if PY_MAJOR_VERSION < 3 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); return -1; } static void __Pyx_ReleaseBuffer(Py_buffer *view) { PyObject *obj = view->obj; if (!obj) return; if (PyObject_CheckBuffer(obj)) { PyBuffer_Release(view); return; } if ((0)) {} else if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); view->obj = NULL; Py_DECREF(obj); } #endif /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } /* CIntFromPyVerify */ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_siz(siz value) { const siz neg_one = (siz) ((siz) 0 - (siz) 1), const_zero = (siz) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(siz) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(siz) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(siz) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(siz) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(siz) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(siz), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Py_intptr_t(Py_intptr_t value) { const Py_intptr_t neg_one = (Py_intptr_t) ((Py_intptr_t) 0 - (Py_intptr_t) 1), const_zero = (Py_intptr_t) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(Py_intptr_t) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(Py_intptr_t) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(Py_intptr_t) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(Py_intptr_t) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(Py_intptr_t) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(Py_intptr_t), little, !is_unsigned); } } /* Declarations */ #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { return ::std::complex< float >(x, y); } #else static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { return x + y*(__pyx_t_float_complex)_Complex_I; } #endif #else static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { __pyx_t_float_complex z; z.real = x; z.imag = y; return z; } #endif /* Arithmetic */ #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { return (a.real == b.real) && (a.imag == b.imag); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real + b.real; z.imag = a.imag + b.imag; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real - b.real; z.imag = a.imag - b.imag; return z; } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; z.real = a.real * b.real - a.imag * b.imag; z.imag = a.real * b.imag + a.imag * b.real; return z; } #if 1 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { if (b.imag == 0) { return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); } else if (fabsf(b.real) >= fabsf(b.imag)) { if (b.real == 0 && b.imag == 0) { return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag); } else { float r = b.imag / b.real; float s = (float)(1.0) / (b.real + b.imag * r); return __pyx_t_float_complex_from_parts( (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); } } else { float r = b.real / b.imag; float s = (float)(1.0) / (b.imag + b.real * r); return __pyx_t_float_complex_from_parts( (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); } } #else static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { if (b.imag == 0) { return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real); } else { float denom = b.real * b.real + b.imag * b.imag; return __pyx_t_float_complex_from_parts( (a.real * b.real + a.imag * b.imag) / denom, (a.imag * b.real - a.real * b.imag) / denom); } } #endif static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) { __pyx_t_float_complex z; z.real = -a.real; z.imag = -a.imag; return z; } static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) { __pyx_t_float_complex z; z.real = a.real; z.imag = -a.imag; return z; } #if 1 static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) { #if !defined(HAVE_HYPOT) || defined(_MSC_VER) return sqrtf(z.real*z.real + z.imag*z.imag); #else return hypotf(z.real, z.imag); #endif } static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { __pyx_t_float_complex z; float r, lnr, theta, z_r, z_theta; if (b.imag == 0 && b.real == (int)b.real) { if (b.real < 0) { float denom = a.real * a.real + a.imag * a.imag; a.real = a.real / denom; a.imag = -a.imag / denom; b.real = -b.real; } switch ((int)b.real) { case 0: z.real = 1; z.imag = 0; return z; case 1: return a; case 2: z = __Pyx_c_prod_float(a, a); return __Pyx_c_prod_float(a, a); case 3: z = __Pyx_c_prod_float(a, a); return __Pyx_c_prod_float(z, a); case 4: z = __Pyx_c_prod_float(a, a); return __Pyx_c_prod_float(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } else if (b.imag == 0) { z.real = powf(a.real, b.real); z.imag = 0; return z; } else if (a.real > 0) { r = a.real; theta = 0; } else { r = -a.real; theta = atan2f(0.0, -1.0); } } else { r = __Pyx_c_abs_float(a); theta = atan2f(a.imag, a.real); } lnr = logf(r); z_r = expf(lnr * b.real - theta * b.imag); z_theta = theta * b.real + lnr * b.imag; z.real = z_r * cosf(z_theta); z.imag = z_r * sinf(z_theta); return z; } #endif #endif /* Declarations */ #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { return ::std::complex< double >(x, y); } #else static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { return x + y*(__pyx_t_double_complex)_Complex_I; } #endif #else static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { __pyx_t_double_complex z; z.real = x; z.imag = y; return z; } #endif /* Arithmetic */ #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { return (a.real == b.real) && (a.imag == b.imag); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real + b.real; z.imag = a.imag + b.imag; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real - b.real; z.imag = a.imag - b.imag; return z; } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; z.real = a.real * b.real - a.imag * b.imag; z.imag = a.real * b.imag + a.imag * b.real; return z; } #if 1 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { if (b.imag == 0) { return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); } else if (fabs(b.real) >= fabs(b.imag)) { if (b.real == 0 && b.imag == 0) { return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag); } else { double r = b.imag / b.real; double s = (double)(1.0) / (b.real + b.imag * r); return __pyx_t_double_complex_from_parts( (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); } } else { double r = b.real / b.imag; double s = (double)(1.0) / (b.imag + b.real * r); return __pyx_t_double_complex_from_parts( (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); } } #else static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { if (b.imag == 0) { return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real); } else { double denom = b.real * b.real + b.imag * b.imag; return __pyx_t_double_complex_from_parts( (a.real * b.real + a.imag * b.imag) / denom, (a.imag * b.real - a.real * b.imag) / denom); } } #endif static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) { __pyx_t_double_complex z; z.real = -a.real; z.imag = -a.imag; return z; } static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) { return (a.real == 0) && (a.imag == 0); } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) { __pyx_t_double_complex z; z.real = a.real; z.imag = -a.imag; return z; } #if 1 static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) { #if !defined(HAVE_HYPOT) || defined(_MSC_VER) return sqrt(z.real*z.real + z.imag*z.imag); #else return hypot(z.real, z.imag); #endif } static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { __pyx_t_double_complex z; double r, lnr, theta, z_r, z_theta; if (b.imag == 0 && b.real == (int)b.real) { if (b.real < 0) { double denom = a.real * a.real + a.imag * a.imag; a.real = a.real / denom; a.imag = -a.imag / denom; b.real = -b.real; } switch ((int)b.real) { case 0: z.real = 1; z.imag = 0; return z; case 1: return a; case 2: z = __Pyx_c_prod_double(a, a); return __Pyx_c_prod_double(a, a); case 3: z = __Pyx_c_prod_double(a, a); return __Pyx_c_prod_double(z, a); case 4: z = __Pyx_c_prod_double(a, a); return __Pyx_c_prod_double(z, z); } } if (a.imag == 0) { if (a.real == 0) { return a; } else if (b.imag == 0) { z.real = pow(a.real, b.real); z.imag = 0; return z; } else if (a.real > 0) { r = a.real; theta = 0; } else { r = -a.real; theta = atan2(0.0, -1.0); } } else { r = __Pyx_c_abs_double(a); theta = atan2(a.imag, a.real); } lnr = log(r); z_r = exp(lnr * b.real - theta * b.imag); z_theta = theta * b.real + lnr * b.imag; z.real = z_r * cos(z_theta); z.imag = z_r * sin(z_theta); return z; } #endif #endif /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(enum NPY_TYPES) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(enum NPY_TYPES) <= sizeof(long)) { return PyInt_FromLong((long) value); #ifdef HAVE_LONG_LONG } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); #endif } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), little, !is_unsigned); } } /* CIntFromPy */ static CYTHON_INLINE siz __Pyx_PyInt_As_siz(PyObject *x) { const siz neg_one = (siz) ((siz) 0 - (siz) 1), const_zero = (siz) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(siz) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(siz, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (siz) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (siz) 0; case 1: __PYX_VERIFY_RETURN_INT(siz, digit, digits[0]) case 2: if (8 * sizeof(siz) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(siz, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(siz) >= 2 * PyLong_SHIFT) { return (siz) (((((siz)digits[1]) << PyLong_SHIFT) | (siz)digits[0])); } } break; case 3: if (8 * sizeof(siz) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(siz, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(siz) >= 3 * PyLong_SHIFT) { return (siz) (((((((siz)digits[2]) << PyLong_SHIFT) | (siz)digits[1]) << PyLong_SHIFT) | (siz)digits[0])); } } break; case 4: if (8 * sizeof(siz) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(siz, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(siz) >= 4 * PyLong_SHIFT) { return (siz) (((((((((siz)digits[3]) << PyLong_SHIFT) | (siz)digits[2]) << PyLong_SHIFT) | (siz)digits[1]) << PyLong_SHIFT) | (siz)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (siz) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(siz) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(siz, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(siz) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(siz, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (siz) 0; case -1: __PYX_VERIFY_RETURN_INT(siz, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(siz, digit, +digits[0]) case -2: if (8 * sizeof(siz) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(siz, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(siz) - 1 > 2 * PyLong_SHIFT) { return (siz) (((siz)-1)*(((((siz)digits[1]) << PyLong_SHIFT) | (siz)digits[0]))); } } break; case 2: if (8 * sizeof(siz) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(siz, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(siz) - 1 > 2 * PyLong_SHIFT) { return (siz) ((((((siz)digits[1]) << PyLong_SHIFT) | (siz)digits[0]))); } } break; case -3: if (8 * sizeof(siz) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(siz, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(siz) - 1 > 3 * PyLong_SHIFT) { return (siz) (((siz)-1)*(((((((siz)digits[2]) << PyLong_SHIFT) | (siz)digits[1]) << PyLong_SHIFT) | (siz)digits[0]))); } } break; case 3: if (8 * sizeof(siz) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(siz, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(siz) - 1 > 3 * PyLong_SHIFT) { return (siz) ((((((((siz)digits[2]) << PyLong_SHIFT) | (siz)digits[1]) << PyLong_SHIFT) | (siz)digits[0]))); } } break; case -4: if (8 * sizeof(siz) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(siz, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(siz) - 1 > 4 * PyLong_SHIFT) { return (siz) (((siz)-1)*(((((((((siz)digits[3]) << PyLong_SHIFT) | (siz)digits[2]) << PyLong_SHIFT) | (siz)digits[1]) << PyLong_SHIFT) | (siz)digits[0]))); } } break; case 4: if (8 * sizeof(siz) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(siz, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(siz) - 1 > 4 * PyLong_SHIFT) { return (siz) ((((((((((siz)digits[3]) << PyLong_SHIFT) | (siz)digits[2]) << PyLong_SHIFT) | (siz)digits[1]) << PyLong_SHIFT) | (siz)digits[0]))); } } break; } #endif if (sizeof(siz) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(siz, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(siz) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(siz, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else siz val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (siz) -1; } } else { siz val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (siz) -1; val = __Pyx_PyInt_As_siz(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to siz"); return (siz) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to siz"); return (siz) -1; } /* CIntFromPy */ static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { const size_t neg_one = (size_t) ((size_t) 0 - (size_t) 1), const_zero = (size_t) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(size_t) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (size_t) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (size_t) 0; case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0]) case 2: if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) { return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } } break; case 3: if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) { return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } } break; case 4: if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) { return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (size_t) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(size_t) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (size_t) 0; case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, +digits[0]) case -2: if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; case 2: if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; case -3: if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; case 3: if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; case -4: if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) { return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; case 4: if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) { return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); } } break; } #endif if (sizeof(size_t) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else size_t val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (size_t) -1; } } else { size_t val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (size_t) -1; val = __Pyx_PyInt_As_size_t(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to size_t"); return (size_t) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to size_t"); return (size_t) -1; } /* CIntFromPy */ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(int) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) case -2: if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else int val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (int) -1; } } else { int val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } /* CIntFromPy */ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(long) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) #endif } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) case -2: if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) #ifdef HAVE_LONG_LONG } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) #endif } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else long val; PyObject *v = __Pyx_PyNumber_IntOrLong(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (long) -1; } } else { long val; PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } /* FastTypeChecks */ #if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { while (a) { a = a->tp_base; if (a == b) return 1; } return b == &PyBaseObject_Type; } static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (a == b) return 1; mro = a->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(a, b); } #if PY_MAJOR_VERSION == 2 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { PyObject *exception, *value, *tb; int res; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ErrFetch(&exception, &value, &tb); res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } if (!res) { res = PyObject_IsSubclass(err, exc_type2); if (unlikely(res == -1)) { PyErr_WriteUnraisable(err); res = 0; } } __Pyx_ErrRestore(exception, value, tb); return res; } #else static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0; if (!res) { res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); } return res; } #endif static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; assert(PyExceptionClass_Check(exc_type)); n = PyTuple_GET_SIZE(tuple); #if PY_MAJOR_VERSION >= 3 for (i=0; ip) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; if (PyObject_Hash(*t->p) == -1) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); } static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT #if !CYTHON_PEP393_ENABLED static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; } #else static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (likely(PyUnicode_IS_ASCII(o))) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif } #endif #endif static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { return __Pyx_PyUnicode_AsStringAndSize(o, length); } else #endif #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { int retval; if (unlikely(!x)) return -1; retval = __Pyx_PyObject_IsTrue(x); Py_DECREF(x); return retval; } static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { #if PY_MAJOR_VERSION >= 3 if (PyLong_Check(result)) { if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, "__int__ returned non-int (type %.200s). " "The ability to return an instance of a strict subclass of int " "is deprecated, and may be removed in a future version of Python.", Py_TYPE(result)->tp_name)) { Py_DECREF(result); return NULL; } return result; } #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", type_name, type_name, Py_TYPE(result)->tp_name); Py_DECREF(result); return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { #if CYTHON_USE_TYPE_SLOTS PyNumberMethods *m; #endif const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x) || PyLong_Check(x))) #else if (likely(PyLong_Check(x))) #endif return __Pyx_NewRef(x); #if CYTHON_USE_TYPE_SLOTS m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = m->nb_int(x); } else if (m && m->nb_long) { name = "long"; res = m->nb_long(x); } #else if (likely(m && m->nb_int)) { name = "int"; res = m->nb_int(x); } #endif #else if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { res = PyNumber_Int(x); } #endif if (likely(res)) { #if PY_MAJOR_VERSION < 3 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { #else if (unlikely(!PyLong_CheckExact(res))) { #endif return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(b); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)b)->ob_digit; const Py_ssize_t size = Py_SIZE(b); if (likely(__Pyx_sst_abs(size) <= 1)) { ival = likely(size) ? digits[0] : 0; if (size == -1) ival = -ival; return ival; } else { switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } #endif /* Py_PYTHON_H */ ================================================ FILE: PythonAPI/pysobatools/_mask.pyx ================================================ # distutils: language = c # distutils: sources = ../common/maskApi.c #************************************************************************** # Microsoft COCO Toolbox. version 2.0 # Data, paper, and tutorials available at: http://mscoco.org/ # Code written by Piotr Dollar and Tsung-Yi Lin, 2015. # Licensed under the Simplified BSD License [see coco/license.txt] #************************************************************************** __author__ = 'tsungyi' import sys PYTHON_VERSION = sys.version_info[0] # import both Python-level and C-level symbols of Numpy # the API uses Numpy to interface C and Python import numpy as np cimport numpy as np from libc.stdlib cimport malloc, free # intialized Numpy. must do. np.import_array() # import numpy C function # we use PyArray_ENABLEFLAGS to make Numpy ndarray responsible to memoery management cdef extern from "numpy/arrayobject.h": void PyArray_ENABLEFLAGS(np.ndarray arr, int flags) # Declare the prototype of the C functions in MaskApi.h cdef extern from "maskApi.h": ctypedef unsigned int uint ctypedef unsigned long siz ctypedef unsigned char byte ctypedef double* BB ctypedef struct RLE: siz h, siz w, siz m, uint* cnts, void rlesInit( RLE **R, siz n ) void rleEncode( RLE *R, const byte *M, siz h, siz w, siz n ) void rleDecode( const RLE *R, byte *mask, siz n ) void rleMerge( const RLE *R, RLE *M, siz n, int intersect ) void rleArea( const RLE *R, siz n, uint *a ) void rleIou( RLE *dt, RLE *gt, siz m, siz n, byte *iscrowd, double *o ) void bbIou( BB dt, BB gt, siz m, siz n, byte *iscrowd, double *o ) void rleToBbox( const RLE *R, BB bb, siz n ) void rleFrBbox( RLE *R, const BB bb, siz h, siz w, siz n ) void rleFrPoly( RLE *R, const double *xy, siz k, siz h, siz w ) char* rleToString( const RLE *R ) void rleFrString( RLE *R, char *s, siz h, siz w ) # python class to wrap RLE array in C # the class handles the memory allocation and deallocation cdef class RLEs: cdef RLE *_R cdef siz _n def __cinit__(self, siz n =0): rlesInit(&self._R, n) self._n = n # free the RLE array here def __dealloc__(self): if self._R is not NULL: for i in range(self._n): free(self._R[i].cnts) free(self._R) def __getattr__(self, key): if key == 'n': return self._n raise AttributeError(key) # python class to wrap Mask array in C # the class handles the memory allocation and deallocation cdef class Masks: cdef byte *_mask cdef siz _h cdef siz _w cdef siz _n def __cinit__(self, h, w, n): self._mask = malloc(h*w*n* sizeof(byte)) self._h = h self._w = w self._n = n # def __dealloc__(self): # the memory management of _mask has been passed to np.ndarray # it doesn't need to be freed here # called when passing into np.array() and return an np.ndarray in column-major order def __array__(self): cdef np.npy_intp shape[1] shape[0] = self._h*self._w*self._n # Create a 1D array, and reshape it to fortran/Matlab column-major array ndarray = np.PyArray_SimpleNewFromData(1, shape, np.NPY_UINT8, self._mask).reshape((self._h, self._w, self._n), order='F') # The _mask allocated by Masks is now handled by ndarray PyArray_ENABLEFLAGS(ndarray, np.NPY_OWNDATA) return ndarray # internal conversion from Python RLEs object to compressed RLE format def _toString(RLEs Rs): cdef siz n = Rs.n cdef bytes py_string cdef char* c_string objs = [] for i in range(n): c_string = rleToString( &Rs._R[i] ) py_string = c_string objs.append({ 'size': [Rs._R[i].h, Rs._R[i].w], 'counts': py_string }) free(c_string) return objs # internal conversion from compressed RLE format to Python RLEs object def _frString(rleObjs): cdef siz n = len(rleObjs) Rs = RLEs(n) cdef bytes py_string cdef char* c_string for i, obj in enumerate(rleObjs): if PYTHON_VERSION == 2: py_string = str(obj['counts']).encode('utf8') elif PYTHON_VERSION == 3: py_string = str.encode(obj['counts']) if type(obj['counts']) == str else obj['counts'] else: raise Exception('Python version must be 2 or 3') c_string = py_string rleFrString( &Rs._R[i], c_string, obj['size'][0], obj['size'][1] ) return Rs # encode mask to RLEs objects # list of RLE string can be generated by RLEs member function def encode(np.ndarray[np.uint8_t, ndim=3, mode='fortran'] mask): h, w, n = mask.shape[0], mask.shape[1], mask.shape[2] cdef RLEs Rs = RLEs(n) rleEncode(Rs._R,mask.data,h,w,n) objs = _toString(Rs) return objs # decode mask from compressed list of RLE string or RLEs object def decode(rleObjs): cdef RLEs Rs = _frString(rleObjs) h, w, n = Rs._R[0].h, Rs._R[0].w, Rs._n masks = Masks(h, w, n) rleDecode(Rs._R, masks._mask, n); return np.array(masks) def merge(rleObjs, intersect=0): cdef RLEs Rs = _frString(rleObjs) cdef RLEs R = RLEs(1) rleMerge(Rs._R, R._R, Rs._n, intersect) obj = _toString(R)[0] return obj def area(rleObjs): cdef RLEs Rs = _frString(rleObjs) cdef uint* _a = malloc(Rs._n* sizeof(uint)) rleArea(Rs._R, Rs._n, _a) cdef np.npy_intp shape[1] shape[0] = Rs._n a = np.array((Rs._n, ), dtype=np.uint8) a = np.PyArray_SimpleNewFromData(1, shape, np.NPY_UINT32, _a) PyArray_ENABLEFLAGS(a, np.NPY_OWNDATA) return a # iou computation. support function overload (RLEs-RLEs and bbox-bbox). def iou( dt, gt, pyiscrowd ): def _preproc(objs): if len(objs) == 0: return objs if type(objs) == np.ndarray: if len(objs.shape) == 1: objs = objs.reshape((objs[0], 1)) # check if it's Nx4 bbox if not len(objs.shape) == 2 or not objs.shape[1] == 4: raise Exception('numpy ndarray input is only for *bounding boxes* and should have Nx4 dimension') objs = objs.astype(np.double) elif type(objs) == list: # check if list is in box format and convert it to np.ndarray isbox = np.all(np.array([(len(obj)==4) and ((type(obj)==list) or (type(obj)==np.ndarray)) for obj in objs])) isrle = np.all(np.array([type(obj) == dict for obj in objs])) if isbox: objs = np.array(objs, dtype=np.double) if len(objs.shape) == 1: objs = objs.reshape((1,objs.shape[0])) elif isrle: objs = _frString(objs) else: raise Exception('list input can be bounding box (Nx4) or RLEs ([RLE])') else: raise Exception('unrecognized type. The following type: RLEs (rle), np.ndarray (box), and list (box) are supported.') return objs def _rleIou(RLEs dt, RLEs gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): rleIou( dt._R, gt._R, m, n, iscrowd.data, _iou.data ) def _bbIou(np.ndarray[np.double_t, ndim=2] dt, np.ndarray[np.double_t, ndim=2] gt, np.ndarray[np.uint8_t, ndim=1] iscrowd, siz m, siz n, np.ndarray[np.double_t, ndim=1] _iou): bbIou( dt.data, gt.data, m, n, iscrowd.data, _iou.data ) def _len(obj): cdef siz N = 0 if type(obj) == RLEs: N = obj.n elif len(obj)==0: pass elif type(obj) == np.ndarray: N = obj.shape[0] return N # convert iscrowd to numpy array cdef np.ndarray[np.uint8_t, ndim=1] iscrowd = np.array(pyiscrowd, dtype=np.uint8) # simple type checking cdef siz m, n dt = _preproc(dt) gt = _preproc(gt) m = _len(dt) n = _len(gt) if m == 0 or n == 0: return [] if not type(dt) == type(gt): raise Exception('The dt and gt should have the same data type, either RLEs, list or np.ndarray') # define local variables cdef double* _iou = 0 cdef np.npy_intp shape[1] # check type and assign iou function if type(dt) == RLEs: _iouFun = _rleIou elif type(dt) == np.ndarray: _iouFun = _bbIou else: raise Exception('input data type not allowed.') _iou = malloc(m*n* sizeof(double)) iou = np.zeros((m*n, ), dtype=np.double) shape[0] = m*n iou = np.PyArray_SimpleNewFromData(1, shape, np.NPY_DOUBLE, _iou) PyArray_ENABLEFLAGS(iou, np.NPY_OWNDATA) _iouFun(dt, gt, iscrowd, m, n, iou) return iou.reshape((m,n), order='F') def toBbox( rleObjs ): cdef RLEs Rs = _frString(rleObjs) cdef siz n = Rs.n cdef BB _bb = malloc(4*n* sizeof(double)) rleToBbox( Rs._R, _bb, n ) cdef np.npy_intp shape[1] shape[0] = 4*n bb = np.array((1,4*n), dtype=np.double) bb = np.PyArray_SimpleNewFromData(1, shape, np.NPY_DOUBLE, _bb).reshape((n, 4)) PyArray_ENABLEFLAGS(bb, np.NPY_OWNDATA) return bb def frBbox(np.ndarray[np.double_t, ndim=2] bb, siz h, siz w ): cdef siz n = bb.shape[0] Rs = RLEs(n) rleFrBbox( Rs._R, bb.data, h, w, n ) objs = _toString(Rs) return objs def frPoly( poly, siz h, siz w ): cdef np.ndarray[np.double_t, ndim=1] np_poly n = len(poly) Rs = RLEs(n) for i, p in enumerate(poly): np_poly = np.array(p, dtype=np.double, order='F') rleFrPoly( &Rs._R[i], np_poly.data, int(len(p)/2), h, w ) objs = _toString(Rs) return objs def frUncompressedRLE(ucRles, siz h, siz w): cdef np.ndarray[np.uint32_t, ndim=1] cnts cdef RLE R cdef uint *data n = len(ucRles) objs = [] for i in range(n): Rs = RLEs(1) cnts = np.array(ucRles[i]['counts'], dtype=np.uint32) # time for malloc can be saved here but it's fine data = malloc(len(cnts)* sizeof(uint)) for j in range(len(cnts)): data[j] = cnts[j] R = RLE(ucRles[i]['size'][0], ucRles[i]['size'][1], len(cnts), data) Rs._R[0] = R objs.append(_toString(Rs)[0]) return objs def frPyObjects(pyobj, h, w): # encode rle from a list of python objects if type(pyobj) == np.ndarray: objs = frBbox(pyobj, h, w) elif type(pyobj) == list and len(pyobj[0]) == 4: objs = frBbox(pyobj, h, w) elif type(pyobj) == list and len(pyobj[0]) > 4: objs = frPoly(pyobj, h, w) elif type(pyobj) == list and type(pyobj[0]) == dict \ and 'counts' in pyobj[0] and 'size' in pyobj[0]: objs = frUncompressedRLE(pyobj, h, w) # encode rle from single python object elif type(pyobj) == list and len(pyobj) == 4: objs = frBbox([pyobj], h, w)[0] elif type(pyobj) == list and len(pyobj) > 4: objs = frPoly([pyobj], h, w)[0] elif type(pyobj) == dict and 'counts' in pyobj and 'size' in pyobj: objs = frUncompressedRLE([pyobj], h, w)[0] else: raise Exception('input type is not supported.') return objs ================================================ FILE: PythonAPI/pysobatools/cocoeval.py ================================================ __author__ = 'tsungyi' import numpy as np import datetime import time from collections import defaultdict from . import mask as maskUtils import copy class COCOeval: # Interface for evaluating detection on the Microsoft COCO dataset. # # The usage for CocoEval is as follows: # cocoGt=..., cocoDt=... # load dataset and results # E = CocoEval(cocoGt,cocoDt); # initialize CocoEval object # E.params.recThrs = ...; # set parameters as desired # E.evaluate(); # run per image evaluation # E.accumulate(); # accumulate per image results # E.summarize(); # display summary metrics of results # For example usage see evalDemo.m and http://mscoco.org/. # # The evaluation parameters are as follows (defaults in brackets): # imgIds - [all] N img ids to use for evaluation # catIds - [all] K cat ids to use for evaluation # iouThrs - [.5:.05:.95] T=10 IoU thresholds for evaluation # recThrs - [0:.01:1] R=101 recall thresholds for evaluation # areaRng - [...] A=4 object area ranges for evaluation # maxDets - [1 10 100] M=3 thresholds on max detections per image # iouType - ['segm'] set iouType to 'segm', 'bbox' or 'keypoints' # iouType replaced the now DEPRECATED useSegm parameter. # useCats - [1] if true use category labels for evaluation # Note: if useCats=0 category labels are ignored as in proposal scoring. # Note: multiple areaRngs [Ax2] and maxDets [Mx1] can be specified. # # evaluate(): evaluates detections on every image and every category and # concats the results into the "evalImgs" with fields: # dtIds - [1xD] id for each of the D detections (dt) # gtIds - [1xG] id for each of the G ground truths (gt) # dtMatches - [TxD] matching gt id at each IoU or 0 # gtMatches - [TxG] matching dt id at each IoU or 0 # dtScores - [1xD] confidence of each dt # gtIgnore - [1xG] ignore flag for each gt # dtIgnore - [TxD] ignore flag for each dt at each IoU # # accumulate(): accumulates the per-image, per-category evaluation # results in "evalImgs" into the dictionary "eval" with fields: # params - parameters used for evaluation # date - date evaluation was performed # counts - [T,R,K,A,M] parameter dimensions (see above) # precision - [TxRxKxAxM] precision for every evaluation setting # recall - [TxKxAxM] max recall for every evaluation setting # Note: precision and recall==-1 for settings with no gt objects. # # See also coco, mask, pycocoDemo, pycocoEvalDemo # # Microsoft COCO Toolbox. version 2.0 # Data, paper, and tutorials available at: http://mscoco.org/ # Code written by Piotr Dollar and Tsung-Yi Lin, 2015. # Licensed under the Simplified BSD License [see coco/license.txt] def __init__(self, cocoGt=None, cocoDt=None, iouType='segm'): ''' Initialize CocoEval using coco APIs for gt and dt :param cocoGt: coco object with ground truth annotations :param cocoDt: coco object with detection results :return: None ''' if not iouType: print('iouType not specified. use default iouType segm') self.cocoGt = cocoGt # ground truth COCO API self.cocoDt = cocoDt # detections COCO API self.evalImgs = defaultdict(list) # per-image per-category evaluation results [KxAxI] elements self.eval = {} # accumulated evaluation results self._gts = defaultdict(list) # gt for evaluation self._dts = defaultdict(list) # dt for evaluation self.params = Params(iouType=iouType) # parameters self._paramsEval = {} # parameters for evaluation self.stats = [] # result summarization self.ious = {} # ious between all gts and dts if not cocoGt is None: self.params.imgIds = sorted(cocoGt.getImgIds()) self.params.catIds = sorted(cocoGt.getCatIds()) def _prepare(self): ''' Prepare ._gts and ._dts for evaluation based on params :return: None ''' def _toMask(anns, coco): # modify ann['segmentation'] by reference for ann in anns: rle = coco.annToRLE(ann) ann['segmentation'] = rle p = self.params if p.useCats: gts=self.cocoGt.loadAnns(self.cocoGt.getAnnIds(imgIds=p.imgIds, catIds=p.catIds)) dts=self.cocoDt.loadAnns(self.cocoDt.getAnnIds(imgIds=p.imgIds, catIds=p.catIds)) else: gts=self.cocoGt.loadAnns(self.cocoGt.getAnnIds(imgIds=p.imgIds)) dts=self.cocoDt.loadAnns(self.cocoDt.getAnnIds(imgIds=p.imgIds)) # convert ground truth to mask if iouType == 'segm' if p.iouType == 'segm': _toMask(gts, self.cocoGt) _toMask(dts, self.cocoDt) # set ignore flag for gt in gts: gt['ignore'] = gt['ignore'] if 'ignore' in gt else 0 gt['ignore'] = 'iscrowd' in gt and gt['iscrowd'] if p.iouType == 'keypoints': gt['ignore'] = (gt['num_keypoints'] == 0) or gt['ignore'] self._gts = defaultdict(list) # gt for evaluation self._dts = defaultdict(list) # dt for evaluation for gt in gts: self._gts[gt['image_id'], gt['category_id']].append(gt) for dt in dts: self._dts[dt['image_id'], dt['category_id']].append(dt) self.evalImgs = defaultdict(list) # per-image per-category evaluation results self.eval = {} # accumulated evaluation results def _prepare_asso(self): ''' Prepare ._gts and ._dts for evaluation based on params :return: None ''' def _toMask(anns, coco): # modify ann['segmentation'] by reference for ann in anns: rle = coco.annToRLE(ann) ann['segmentation'] = rle self.params.catIds = sorted(self.cocoGt.getAssoIds()) p = self.params if p.useCats: gts=self.cocoGt.loadAssoAnns(self.cocoGt.getAssoAnnIds(imgIds=p.imgIds, catIds=p.catIds)) dts=self.cocoDt.loadAssoAnns(self.cocoDt.getAssoAnnIds(imgIds=p.imgIds, catIds=p.catIds)) else: gts=self.cocoGt.loadAssoAnns(self.cocoGt.getAssoAnnIds(imgIds=p.imgIds)) dts=self.cocoDt.loadAssoAnns(self.cocoDt.getAssoAnnIds(imgIds=p.imgIds)) # convert ground truth to mask if iouType == 'segm' if p.iouType == 'segm': _toMask(gts, self.cocoGt) _toMask(dts, self.cocoDt) # set ignore flag for gt in gts: gt['ignore'] = gt['ignore'] if 'ignore' in gt else 0 gt['ignore'] = 'iscrowd' in gt and gt['iscrowd'] if p.iouType == 'keypoints': gt['ignore'] = (gt['num_keypoints'] == 0) or gt['ignore'] self._gts = defaultdict(list) # gt for evaluation self._dts = defaultdict(list) # dt for evaluation for gt in gts: self._gts[gt['image_id'], gt['category_id']].append(gt) for dt in dts: self._dts[dt['image_id'], dt['category_id']].append(dt) self.evalImgs = defaultdict(list) # per-image per-category evaluation results self.eval = {} # accumulated evaluation results def evaluate(self): ''' Run per image evaluation on given images and store results (a list of dict) in self.evalImgs :return: None ''' tic = time.time() print('Running per image evaluation...') p = self.params # add backward compatibility if useSegm is specified in params if not p.useSegm is None: p.iouType = 'segm' if p.useSegm == 1 else 'bbox' print('useSegm (deprecated) is not None. Running {} evaluation'.format(p.iouType)) print('Evaluate annotation type *{}*'.format(p.iouType)) p.imgIds = list(np.unique(p.imgIds)) if p.useCats: p.catIds = list(np.unique(p.catIds)) p.maxDets = sorted(p.maxDets) self.params=p self._prepare() # loop through images, area range, max detection number catIds = p.catIds if p.useCats else [-1] if p.iouType == 'segm' or p.iouType == 'bbox': computeIoU = self.computeIoU elif p.iouType == 'keypoints': computeIoU = self.computeOks self.ious = {(imgId, catId): computeIoU(imgId, catId) \ for imgId in p.imgIds for catId in catIds} evaluateImg = self.evaluateImg maxDet = p.maxDets[-1] self.evalImgs = [evaluateImg(imgId, catId, areaRng, maxDet) for catId in catIds for areaRng in p.areaRng for imgId in p.imgIds ] self._paramsEval = copy.deepcopy(self.params) toc = time.time() print('DONE (t={:0.2f}s).'.format(toc-tic)) def evaluate_asso(self): ''' Run per image evaluation on given images and store results (a list of dict) in self.evalImgs :return: None ''' tic = time.time() print('Running per image evaluation...') p = self.params # add backward compatibility if useSegm is specified in params if not p.useSegm is None: p.iouType = 'segm' if p.useSegm == 1 else 'bbox' print('useSegm (deprecated) is not None. Running {} evaluation'.format(p.iouType)) print('Evaluate annotation type *{}*'.format(p.iouType)) p.imgIds = list(np.unique(p.imgIds)) if p.useCats: p.catIds = list(np.unique(p.catIds)) p.maxDets = sorted(p.maxDets) self.params=p self._prepare_asso() # loop through images, area range, max detection number catIds = p.catIds if p.useCats else [-1] if p.iouType == 'segm' or p.iouType == 'bbox': computeIoU = self.computeIoU elif p.iouType == 'keypoints': computeIoU = self.computeOks self.ious = {(imgId, catId): computeIoU(imgId, catId) \ for imgId in p.imgIds for catId in catIds} evaluateImg = self.evaluateImg maxDet = p.maxDets[-2] self.evalImgs = [evaluateImg(imgId, catId, areaRng, maxDet) for catId in catIds for areaRng in p.areaRng for imgId in p.imgIds ] self._paramsEval = copy.deepcopy(self.params) toc = time.time() print('DONE (t={:0.2f}s).'.format(toc-tic)) def computeIoU(self, imgId, catId): p = self.params if p.useCats: gt = self._gts[imgId,catId] dt = self._dts[imgId,catId] else: gt = [_ for cId in p.catIds for _ in self._gts[imgId,cId]] dt = [_ for cId in p.catIds for _ in self._dts[imgId,cId]] if len(gt) == 0 and len(dt) ==0: return [] inds = np.argsort([-d['score'] for d in dt], kind='mergesort') dt = [dt[i] for i in inds] if len(dt) > p.maxDets[-1]: dt=dt[0:p.maxDets[-1]] if p.iouType == 'segm': g = [g['segmentation'] for g in gt] d = [d['segmentation'] for d in dt] elif p.iouType == 'bbox': g = [g['bbox'] for g in gt] d = [d['bbox'] for d in dt] else: raise Exception('unknown iouType for iou computation') # compute iou between each dt and gt region iscrowd = [int(o['iscrowd']) for o in gt] ious = maskUtils.iou(d,g,iscrowd) return ious def computeOks(self, imgId, catId): p = self.params # dimention here should be Nxm gts = self._gts[imgId, catId] dts = self._dts[imgId, catId] inds = np.argsort([-d['score'] for d in dts], kind='mergesort') dts = [dts[i] for i in inds] if len(dts) > p.maxDets[-1]: dts = dts[0:p.maxDets[-1]] # if len(gts) == 0 and len(dts) == 0: if len(gts) == 0 or len(dts) == 0: return [] ious = np.zeros((len(dts), len(gts))) sigmas = p.kpt_oks_sigmas vars = (sigmas * 2)**2 k = len(sigmas) # compute oks between each detection and ground truth object for j, gt in enumerate(gts): # create bounds for ignore regions(double the gt bbox) g = np.array(gt['keypoints']) # print(g) xg = g[0::3]; yg = g[1::3]; vg = g[2::3] k1 = np.count_nonzero(vg > 0) bb = gt['bbox'] x0 = bb[0] - bb[2]; x1 = bb[0] + bb[2] * 2 y0 = bb[1] - bb[3]; y1 = bb[1] + bb[3] * 2 for i, dt in enumerate(dts): d = np.array(dt['keypoints']) # print(d) xd = d[0::3]; yd = d[1::3] if k1>0: # measure the per-keypoint distance if keypoints visible dx = xd - xg dy = yd - yg else: # measure minimum distance to keypoints in (x0,y0) & (x1,y1) z = np.zeros((k)) dx = np.max((z, x0-xd),axis=0)+np.max((z, xd-x1),axis=0) dy = np.max((z, y0-yd),axis=0)+np.max((z, yd-y1),axis=0) # print(dx,dy,vars,gt['area']) e = (dx**2 + dy**2) / vars / (gt['area']+np.spacing(1)) / 2 if k1 > 0: e=e[vg > 0] ious[i, j] = np.sum(np.exp(-e)) / e.shape[0] return ious def evaluateImg(self, imgId, catId, aRng, maxDet): ''' perform evaluation for single category and image :return: dict (single image results) ''' p = self.params if p.useCats: gt = self._gts[imgId,catId] dt = self._dts[imgId,catId] else: gt = [_ for cId in p.catIds for _ in self._gts[imgId,cId]] dt = [_ for cId in p.catIds for _ in self._dts[imgId,cId]] if len(gt) == 0 and len(dt) ==0: return None for g in gt: if g['ignore'] or (g['area']aRng[1]): g['_ignore'] = 1 else: g['_ignore'] = 0 # sort dt highest score first, sort gt ignore last gtind = np.argsort([g['_ignore'] for g in gt], kind='mergesort') gt = [gt[i] for i in gtind] dtind = np.argsort([-d['score'] for d in dt], kind='mergesort') dt = [dt[i] for i in dtind[0:maxDet]] iscrowd = [int(o['iscrowd']) for o in gt] # load computed ious ious = self.ious[imgId, catId][:, gtind] if len(self.ious[imgId, catId]) > 0 else self.ious[imgId, catId] T = len(p.iouThrs) G = len(gt) D = len(dt) gtm = np.zeros((T,G)) dtm = np.zeros((T,D)) gtIg = np.array([g['_ignore'] for g in gt]) dtIg = np.zeros((T,D)) if not len(ious)==0: for tind, t in enumerate(p.iouThrs): for dind, d in enumerate(dt): # information about best match so far (m=-1 -> unmatched) iou = min([t,1-1e-10]) m = -1 for gind, g in enumerate(gt): # if this gt already matched, and not a crowd, continue if gtm[tind,gind]>0 and not iscrowd[gind]: continue # if dt matched to reg gt, and on ignore gt, stop if m>-1 and gtIg[m]==0 and gtIg[gind]==1: break # continue to next gt unless better match made if ious[dind,gind] < iou: #######HERE ADD Assotion!!!!########## # print(dind,gind) continue # if match successful and best so far, store appropriately iou=ious[dind,gind] m=gind # if match made store id of match for both dt and gt if m ==-1: continue dtIg[tind,dind] = gtIg[m] dtm[tind,dind] = gt[m]['id'] gtm[tind,m] = d['id'] # set unmatched detections outside of area range to ignore a = np.array([d['area']aRng[1] for d in dt]).reshape((1, len(dt))) dtIg = np.logical_or(dtIg, np.logical_and(dtm==0, np.repeat(a,T,0))) # store results for given image and category return { 'image_id': imgId, 'category_id': catId, 'aRng': aRng, 'maxDet': maxDet, 'dtIds': [d['id'] for d in dt], 'gtIds': [g['id'] for g in gt], 'dtMatches': dtm, 'gtMatches': gtm, 'dtScores': [d['score'] for d in dt], 'gtIgnore': gtIg, 'dtIgnore': dtIg, } def accumulate(self, p = None): ''' Accumulate per image evaluation results and store the result in self.eval :param p: input params for evaluation :return: None ''' print('Accumulating evaluation results...') tic = time.time() if not self.evalImgs: print('Please run evaluate() first') # allows input customized parameters if p is None: p = self.params p.catIds = p.catIds if p.useCats == 1 else [-1] T = len(p.iouThrs) R = len(p.recThrs) K = len(p.catIds) if p.useCats else 1 A = len(p.areaRng) M = len(p.maxDets) precision = -np.ones((T,R,K,A,M)) # -1 for the precision of absent categories recall = -np.ones((T,K,A,M)) scores = -np.ones((T,R,K,A,M)) # create dictionary for future indexing _pe = self._paramsEval catIds = _pe.catIds if _pe.useCats else [-1] setK = set(catIds) setA = set(map(tuple, _pe.areaRng)) setM = set(_pe.maxDets) setI = set(_pe.imgIds) # get inds to evaluate k_list = [n for n, k in enumerate(p.catIds) if k in setK] m_list = [m for n, m in enumerate(p.maxDets) if m in setM] a_list = [n for n, a in enumerate(map(lambda x: tuple(x), p.areaRng)) if a in setA] i_list = [n for n, i in enumerate(p.imgIds) if i in setI] I0 = len(_pe.imgIds) A0 = len(_pe.areaRng) # retrieve E at each category, area range, and max number of detections for k, k0 in enumerate(k_list): Nk = k0*A0*I0 for a, a0 in enumerate(a_list): Na = a0*I0 for m, maxDet in enumerate(m_list): E = [self.evalImgs[Nk + Na + i] for i in i_list] E = [e for e in E if not e is None] if len(E) == 0: continue dtScores = np.concatenate([e['dtScores'][0:maxDet] for e in E]) # different sorting method generates slightly different results. # mergesort is used to be consistent as Matlab implementation. inds = np.argsort(-dtScores, kind='mergesort') dtScoresSorted = dtScores[inds] dtm = np.concatenate([e['dtMatches'][:,0:maxDet] for e in E], axis=1)[:,inds] dtIg = np.concatenate([e['dtIgnore'][:,0:maxDet] for e in E], axis=1)[:,inds] gtIg = np.concatenate([e['gtIgnore'] for e in E]) npig = np.count_nonzero(gtIg==0 ) if npig == 0: continue tps = np.logical_and( dtm, np.logical_not(dtIg) ) fps = np.logical_and(np.logical_not(dtm), np.logical_not(dtIg) ) tp_sum = np.cumsum(tps, axis=1).astype(dtype=np.float) fp_sum = np.cumsum(fps, axis=1).astype(dtype=np.float) for t, (tp, fp) in enumerate(zip(tp_sum, fp_sum)): tp = np.array(tp) fp = np.array(fp) nd = len(tp) rc = tp / npig pr = tp / (fp+tp+np.spacing(1)) q = np.zeros((R,)) ss = np.zeros((R,)) if nd: recall[t,k,a,m] = rc[-1] else: recall[t,k,a,m] = 0 # numpy is slow without cython optimization for accessing elements # use python array gets significant speed improvement pr = pr.tolist(); q = q.tolist() for i in range(nd-1, 0, -1): if pr[i] > pr[i-1]: pr[i-1] = pr[i] inds = np.searchsorted(rc, p.recThrs, side='left') try: for ri, pi in enumerate(inds): q[ri] = pr[pi] ss[ri] = dtScoresSorted[pi] except: pass precision[t,:,k,a,m] = np.array(q) scores[t,:,k,a,m] = np.array(ss) self.eval = { 'params': p, 'counts': [T, R, K, A, M], 'date': datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'), 'precision': precision, 'recall': recall, 'scores': scores, } toc = time.time() print('DONE (t={:0.2f}s).'.format( toc-tic)) def summarize(self): ''' Compute and display summary metrics for evaluation results. Note this functin can *only* be applied on the default parameter setting ''' def _summarize( ap=1, iouThr=None, areaRng='all', maxDets=100 ): p = self.params iStr = ' {:<18} {} @[ IoU={:<9} | area={:>6s} | maxDets={:>3d} ] = {:0.3f}' titleStr = 'Average Precision' if ap == 1 else 'Average Recall' typeStr = '(AP)' if ap==1 else '(AR)' iouStr = '{:0.2f}:{:0.2f}'.format(p.iouThrs[0], p.iouThrs[-1]) \ if iouThr is None else '{:0.2f}'.format(iouThr) aind = [i for i, aRng in enumerate(p.areaRngLbl) if aRng == areaRng] mind = [i for i, mDet in enumerate(p.maxDets) if mDet == maxDets] if ap == 1: # dimension of precision: [TxRxKxAxM] s = self.eval['precision'] # IoU if iouThr is not None: t = np.where(iouThr == p.iouThrs)[0] s = s[t] s = s[:,:,:,aind,mind] else: # dimension of recall: [TxKxAxM] s = self.eval['recall'] if iouThr is not None: t = np.where(iouThr == p.iouThrs)[0] s = s[t] s = s[:,:,aind,mind] if len(s[s>-1])==0: mean_s = -1 else: mean_s = np.mean(s[s>-1]) print(iStr.format(titleStr, typeStr, iouStr, areaRng, maxDets, mean_s)) return mean_s def _summarizeDets(): stats = np.zeros((12,)) stats[0] = _summarize(1) stats[1] = _summarize(1, iouThr=.5, maxDets=self.params.maxDets[2]) stats[2] = _summarize(1, iouThr=.75, maxDets=self.params.maxDets[2]) stats[3] = _summarize(1, areaRng='small', maxDets=self.params.maxDets[2]) stats[4] = _summarize(1, areaRng='medium', maxDets=self.params.maxDets[2]) stats[5] = _summarize(1, areaRng='large', maxDets=self.params.maxDets[2]) stats[6] = _summarize(0, maxDets=self.params.maxDets[0]) stats[7] = _summarize(0, maxDets=self.params.maxDets[1]) stats[8] = _summarize(0, maxDets=self.params.maxDets[2]) stats[9] = _summarize(0, areaRng='small', maxDets=self.params.maxDets[2]) stats[10] = _summarize(0, areaRng='medium', maxDets=self.params.maxDets[2]) stats[11] = _summarize(0, areaRng='large', maxDets=self.params.maxDets[2]) return stats def _summarizeKps(): stats = np.zeros((10,)) stats[0] = _summarize(1, maxDets=20) stats[1] = _summarize(1, maxDets=20, iouThr=.5) stats[2] = _summarize(1, maxDets=20, iouThr=.75) stats[3] = _summarize(1, maxDets=20, areaRng='medium') stats[4] = _summarize(1, maxDets=20, areaRng='large') stats[5] = _summarize(0, maxDets=20) stats[6] = _summarize(0, maxDets=20, iouThr=.5) stats[7] = _summarize(0, maxDets=20, iouThr=.75) stats[8] = _summarize(0, maxDets=20, areaRng='medium') stats[9] = _summarize(0, maxDets=20, areaRng='large') return stats if not self.eval: raise Exception('Please run accumulate() first') iouType = self.params.iouType if iouType == 'segm' or iouType == 'bbox': summarize = _summarizeDets elif iouType == 'keypoints': summarize = _summarizeKps self.stats = summarize() def __str__(self): self.summarize() class Params: ''' Params for coco evaluation api ''' def setDetParams(self): self.imgIds = [] self.catIds = [] # np.arange causes trouble. the data point on arange is slightly larger than the true value self.iouThrs = np.linspace(.5, 0.95, int(np.round((0.95 - .5) / .05)) + 1, endpoint=True) self.recThrs = np.linspace(.0, 1.00, int(np.round((1.00 - .0) / .01)) + 1, endpoint=True) self.maxDets = [1, 10, 100] self.areaRng = [[0 ** 2, 1e5 ** 2], [0 ** 2, 32 ** 2], [32 ** 2, 96 ** 2], [96 ** 2, 1e5 ** 2]] self.areaRngLbl = ['all', 'small', 'medium', 'large'] self.useCats = 1 def setKpParams(self): self.imgIds = [] self.catIds = [] # np.arange causes trouble. the data point on arange is slightly larger than the true value self.iouThrs = np.linspace(.5, 0.95, int(np.round((0.95 - .5) / .05)) + 1, endpoint=True) self.recThrs = np.linspace(.0, 1.00, int(np.round((1.00 - .0) / .01)) + 1, endpoint=True) self.maxDets = [20,20,20] self.areaRng = [[0 ** 2, 1e5 ** 2], [32 ** 2, 96 ** 2], [96 ** 2, 1e5 ** 2]] self.areaRngLbl = ['all', 'medium', 'large'] self.useCats = 1 self.kpt_oks_sigmas = np.array([.26, .25])/10.0 def __init__(self, iouType='segm'): if iouType == 'segm' or iouType == 'bbox': self.setDetParams() elif iouType == 'keypoints': self.setKpParams() else: raise Exception('iouType not supported') self.iouType = iouType # useSegm is deprecated self.useSegm = None ================================================ FILE: PythonAPI/pysobatools/mask.py ================================================ __author__ = 'tsungyi' import pysobatools._mask as _mask # Interface for manipulating masks stored in RLE format. # # RLE is a simple yet efficient format for storing binary masks. RLE # first divides a vector (or vectorized image) into a series of piecewise # constant regions and then for each piece simply stores the length of # that piece. For example, given M=[0 0 1 1 1 0 1] the RLE counts would # be [2 3 1 1], or for M=[1 1 1 1 1 1 0] the counts would be [0 6 1] # (note that the odd counts are always the numbers of zeros). Instead of # storing the counts directly, additional compression is achieved with a # variable bitrate representation based on a common scheme called LEB128. # # Compression is greatest given large piecewise constant regions. # Specifically, the size of the RLE is proportional to the number of # *boundaries* in M (or for an image the number of boundaries in the y # direction). Assuming fairly simple shapes, the RLE representation is # O(sqrt(n)) where n is number of pixels in the object. Hence space usage # is substantially lower, especially for large simple objects (large n). # # Many common operations on masks can be computed directly using the RLE # (without need for decoding). This includes computations such as area, # union, intersection, etc. All of these operations are linear in the # size of the RLE, in other words they are O(sqrt(n)) where n is the area # of the object. Computing these operations on the original mask is O(n). # Thus, using the RLE can result in substantial computational savings. # # The following API functions are defined: # encode - Encode binary masks using RLE. # decode - Decode binary masks encoded via RLE. # merge - Compute union or intersection of encoded masks. # iou - Compute intersection over union between masks. # area - Compute area of encoded masks. # toBbox - Get bounding boxes surrounding encoded masks. # frPyObjects - Convert polygon, bbox, and uncompressed RLE to encoded RLE mask. # # Usage: # Rs = encode( masks ) # masks = decode( Rs ) # R = merge( Rs, intersect=false ) # o = iou( dt, gt, iscrowd ) # a = area( Rs ) # bbs = toBbox( Rs ) # Rs = frPyObjects( [pyObjects], h, w ) # # In the API the following formats are used: # Rs - [dict] Run-length encoding of binary masks # R - dict Run-length encoding of binary mask # masks - [hxwxn] Binary mask(s) (must have type np.ndarray(dtype=uint8) in column-major order) # iscrowd - [nx1] list of np.ndarray. 1 indicates corresponding gt image has crowd region to ignore # bbs - [nx4] Bounding box(es) stored as [x y w h] # poly - Polygon stored as [[x1 y1 x2 y2...],[x1 y1 ...],...] (2D list) # dt,gt - May be either bounding boxes or encoded masks # Both poly and bbs are 0-indexed (bbox=[0 0 1 1] encloses first pixel). # # Finally, a note about the intersection over union (iou) computation. # The standard iou of a ground truth (gt) and detected (dt) object is # iou(gt,dt) = area(intersect(gt,dt)) / area(union(gt,dt)) # For "crowd" regions, we use a modified criteria. If a gt object is # marked as "iscrowd", we allow a dt to match any subregion of the gt. # Choosing gt' in the crowd gt that best matches the dt can be done using # gt'=intersect(dt,gt). Since by definition union(gt',dt)=dt, computing # iou(gt,dt,iscrowd) = iou(gt',dt) = area(intersect(gt,dt)) / area(dt) # For crowd gt regions we use this modified criteria above for the iou. # # To compile run "python setup.py build_ext --inplace" # Please do not contact us for help with compiling. # # Microsoft soba Toolbox. version 2.0 # Data, paper, and tutorials available at: http://mssoba.org/ # Code written by Piotr Dollar and Tsung-Yi Lin, 2015. # Licensed under the Simplified BSD License [see soba/license.txt] iou = _mask.iou merge = _mask.merge frPyObjects = _mask.frPyObjects def encode(bimask): if len(bimask.shape) == 3: return _mask.encode(bimask) elif len(bimask.shape) == 2: h, w = bimask.shape return _mask.encode(bimask.reshape((h, w, 1), order='F'))[0] def decode(rleObjs): if type(rleObjs) == list: return _mask.decode(rleObjs) else: return _mask.decode([rleObjs])[:,:,0] def area(rleObjs): if type(rleObjs) == list: return _mask.area(rleObjs) else: return _mask.area([rleObjs])[0] def toBbox(rleObjs): if type(rleObjs) == list: return _mask.toBbox(rleObjs) else: return _mask.toBbox([rleObjs])[0] ================================================ FILE: PythonAPI/pysobatools/soba.py ================================================ __author__ = 'tylin' __version__ = '2.0' # Interface for accessing the Microsoft SOBA dataset. # Microsoft SOBA is a large image dataset designed for object detection, # segmentation, and caption generation. pysobatools is a Python API that # assists in loading, parsing and visualizing the annotations in SOBA. # Please visit http://mssoba.org/ for more information on SOBA, including # for the data, paper, and tutorials. The exact format of the annotations # is also described on the SOBA website. For example usage of the pysobatools # please see pysobatools_demo.ipynb. In addition to this API, please download both # the SOBA images and annotations in order to run the demo. # An alternative to using the API is to load the annotations directly # into Python dictionary # Using the API provides additional utility functions. Note that this API # supports both *instance* and *caption* annotations. In the case of # captions not all functions are defined (e.g. categories are undefined). # The following API functions are defined: # SOBA - SOBA api class that loads SOBA annotation file and prepare data structures. # decodeMask - Decode binary mask M encoded via run-length encoding. # encodeMask - Encode binary mask M using run-length encoding. # getAnnIds - Get ann ids that satisfy given filter conditions. # getCatIds - Get cat ids that satisfy given filter conditions. # getImgIds - Get img ids that satisfy given filter conditions. # loadAnns - Load anns with the specified ids. # loadCats - Load cats with the specified ids. # loadImgs - Load imgs with the specified ids. # annToMask - Convert segmentation in an annotation to binary mask. # showAnns - Display the specified annotations. # loadRes - Load algorithm results and create API for accessing them. # download - Download SOBA images from mssoba.org server. # Throughout the API "ann"=annotation, "cat"=category, and "img"=image. # Help on each functions can be accessed by: "help SOBA>function". # See also SOBA>decodeMask, # SOBA>encodeMask, SOBA>getAnnIds, SOBA>getCatIds, # SOBA>getImgIds, SOBA>loadAnns, SOBA>loadCats, # SOBA>loadImgs, SOBA>annToMask, SOBA>showAnns # Microsoft SOBA Toolbox. version 2.0 # Data, paper, and tutorials available at: http://mssoba.org/ # Code written by Piotr Dollar and Tsung-Yi Lin, 2014. # Licensed under the Simplified BSD License [see bsd.txt] import json import time import matplotlib.pyplot as plt from matplotlib.collections import PatchCollection from matplotlib.patches import Polygon import numpy as np import copy import itertools from . import mask as maskUtils import os from collections import defaultdict import sys PYTHON_VERSION = sys.version_info[0] if PYTHON_VERSION == 2: from urllib import urlretrieve elif PYTHON_VERSION == 3: from urllib.request import urlretrieve def _isArrayLike(obj): return hasattr(obj, '__iter__') and hasattr(obj, '__len__') class SOBA: def __init__(self, annotation_file=None): """ Constructor of Microsoft SOBA helper class for reading and visualizing annotations. :param annotation_file (str): location of annotation file :param image_folder (str): location to the folder that hosts images. :return: """ # load dataset self.dataset,self.anns,self.cats,self.imgs = dict(),dict(),dict(),dict() self.association,self.association_anns = dict(),dict() self.imgToAnns, self.catToImgs = defaultdict(list), defaultdict(list) self.imgToAssoAnns,self.assoToImgs = defaultdict(list), defaultdict(list) if not annotation_file == None: print('loading annotations into memory...') tic = time.time() dataset = json.load(open(annotation_file, 'r')) assert type(dataset)==dict, 'annotation file format {} not supported'.format(type(dataset)) print('Done (t={:0.2f}s)'.format(time.time()- tic)) self.dataset = dataset self.createIndex() def createIndex(self): # create index print('creating index...') anns, cats, imgs = {}, {}, {} association,association_anns = {},{} imgToAnns,catToImgs = defaultdict(list),defaultdict(list) imgToAssoAnns,assoToImgs = defaultdict(list),defaultdict(list) if 'annotations' in self.dataset: for ann in self.dataset['annotations']: imgToAnns[ann['image_id']].append(ann) anns[ann['id']] = ann if 'images' in self.dataset: for img in self.dataset['images']: imgs[img['id']] = img if 'categories' in self.dataset: for cat in self.dataset['categories']: cats[cat['id']] = cat if 'annotations' in self.dataset and 'categories' in self.dataset: for ann in self.dataset['annotations']: catToImgs[ann['category_id']].append(ann['image_id']) if 'association' in self.dataset: for cat in self.dataset['association']: association[cat['id']] = cat if 'association_anno'in self.dataset: for ann in self.dataset['association_anno']: imgToAssoAnns[ann['image_id']].append(ann) association_anns[ann['id']] = ann if 'association_anno' in self.dataset and 'association' in self.dataset: for ann in self.dataset['association_anno']: assoToImgs[ann['category_id']].append(ann['image_id']) print('index created!') # create class members self.anns = anns self.imgToAnns = imgToAnns self.catToImgs = catToImgs self.imgs = imgs self.cats = cats self.association_anns = association_anns self.assoToImgs = assoToImgs self.association = association self.imgToAssoAnns = imgToAssoAnns def info(self): """ Print information about the annotation file. :return: """ for key, value in self.dataset['info'].items(): print('{}: {}'.format(key, value)) def getAssoAnnIds(self, imgIds=[], catIds=[], areaRng=[], iscrowd=None): """ Get ann ids that satisfy given filter conditions. default skips that filter :param imgIds (int array) : get anns for given imgs catIds (int array) : get anns for given cats areaRng (float array) : get anns for given area range (e.g. [0 inf]) iscrowd (boolean) : get anns for given crowd label (False or True) :return: ids (int array) : integer array of ann ids """ imgIds = imgIds if _isArrayLike(imgIds) else [imgIds] catIds = catIds if _isArrayLike(catIds) else [catIds] if len(imgIds) == len(catIds) == len(areaRng) == 0: anns = self.dataset['association_anno'] else: if not len(imgIds) == 0: lists = [self.imgToAssoAnns[imgId] for imgId in imgIds if imgId in self.imgToAssoAnns] anns = list(itertools.chain.from_iterable(lists)) else: anns = self.dataset['association_anno'] anns = anns if len(catIds) == 0 else [ann for ann in anns if ann['category_id'] in catIds] anns = anns if len(areaRng) == 0 else [ann for ann in anns if ann['area'] > areaRng[0] and ann['area'] < areaRng[1]] if not iscrowd == None: ids = [ann['id'] for ann in anns if ann['iscrowd'] == iscrowd] else: ids = [ann['id'] for ann in anns] return ids def getAnnIds(self, imgIds=[], catIds=[], areaRng=[], iscrowd=None): """ Get ann ids that satisfy given filter conditions. default skips that filter :param imgIds (int array) : get anns for given imgs catIds (int array) : get anns for given cats areaRng (float array) : get anns for given area range (e.g. [0 inf]) iscrowd (boolean) : get anns for given crowd label (False or True) :return: ids (int array) : integer array of ann ids """ imgIds = imgIds if _isArrayLike(imgIds) else [imgIds] catIds = catIds if _isArrayLike(catIds) else [catIds] if len(imgIds) == len(catIds) == len(areaRng) == 0: anns = self.dataset['annotations'] else: if not len(imgIds) == 0: lists = [self.imgToAnns[imgId] for imgId in imgIds if imgId in self.imgToAnns] anns = list(itertools.chain.from_iterable(lists)) else: anns = self.dataset['annotations'] anns = anns if len(catIds) == 0 else [ann for ann in anns if ann['category_id'] in catIds] anns = anns if len(areaRng) == 0 else [ann for ann in anns if ann['area'] > areaRng[0] and ann['area'] < areaRng[1]] if not iscrowd == None: ids = [ann['id'] for ann in anns if ann['iscrowd'] == iscrowd] else: ids = [ann['id'] for ann in anns] return ids def getAssoIds(self, catNms=[], supNms=[], catIds=[]): """ filtering parameters. default skips that filter. :param catNms (str array) : get cats for given cat names :param supNms (str array) : get cats for given supercategory names :param catIds (int array) : get cats for given cat ids :return: ids (int array) : integer array of cat ids """ catNms = catNms if _isArrayLike(catNms) else [catNms] supNms = supNms if _isArrayLike(supNms) else [supNms] catIds = catIds if _isArrayLike(catIds) else [catIds] if len(catNms) == len(supNms) == len(catIds) == 0: cats = self.dataset['association'] else: cats = self.dataset['association'] cats = cats if len(catNms) == 0 else [cat for cat in cats if cat['name'] in catNms] cats = cats if len(supNms) == 0 else [cat for cat in cats if cat['supercategory'] in supNms] cats = cats if len(catIds) == 0 else [cat for cat in cats if cat['id'] in catIds] ids = [cat['id'] for cat in cats] return ids def getCatIds(self, catNms=[], supNms=[], catIds=[]): """ filtering parameters. default skips that filter. :param catNms (str array) : get cats for given cat names :param supNms (str array) : get cats for given supercategory names :param catIds (int array) : get cats for given cat ids :return: ids (int array) : integer array of cat ids """ catNms = catNms if _isArrayLike(catNms) else [catNms] supNms = supNms if _isArrayLike(supNms) else [supNms] catIds = catIds if _isArrayLike(catIds) else [catIds] if len(catNms) == len(supNms) == len(catIds) == 0: cats = self.dataset['categories'] else: cats = self.dataset['categories'] cats = cats if len(catNms) == 0 else [cat for cat in cats if cat['name'] in catNms] cats = cats if len(supNms) == 0 else [cat for cat in cats if cat['supercategory'] in supNms] cats = cats if len(catIds) == 0 else [cat for cat in cats if cat['id'] in catIds] ids = [cat['id'] for cat in cats] return ids def getImgIds(self, imgIds=[], catIds=[]): ''' Get img ids that satisfy given filter conditions. :param imgIds (int array) : get imgs for given ids :param catIds (int array) : get imgs with all given cats :return: ids (int array) : integer array of img ids ''' imgIds = imgIds if _isArrayLike(imgIds) else [imgIds] catIds = catIds if _isArrayLike(catIds) else [catIds] if len(imgIds) == len(catIds) == 0: ids = self.imgs.keys() else: ids = set(imgIds) for i, catId in enumerate(catIds): if i == 0 and len(ids) == 0: ids = set(self.catToImgs[catId]) else: ids &= set(self.catToImgs[catId]) return list(ids) def loadAnns(self, ids=[]): """ Load anns with the specified ids. :param ids (int array) : integer ids specifying anns :return: anns (object array) : loaded ann objects """ if _isArrayLike(ids): return [self.anns[id] for id in ids] elif type(ids) == int: return [self.anns[ids]] def loadAssoAnns(self, ids=[]): if _isArrayLike(ids): return [self.association_anns[id] for id in ids] elif type(ids) == int: return [self.association_anns[ids]] def loadCats(self, ids=[]): """ Load cats with the specified ids. :param ids (int array) : integer ids specifying cats :return: cats (object array) : loaded cat objects """ if _isArrayLike(ids): return [self.cats[id] for id in ids] elif type(ids) == int: return [self.cats[ids]] def loadAsso(self, ids=[]): if _isArrayLike(ids): return [self.association[id] for id in ids] elif type(ids) == int: return [self.association[ids]] def loadImgs(self, ids=[]): """ Load anns with the specified ids. :param ids (int array) : integer ids specifying img :return: imgs (object array) : loaded img objects """ if _isArrayLike(ids): return [self.imgs[id] for id in ids] elif type(ids) == int: return [self.imgs[ids]] def showAnns(self, anns): """ Display the specified annotations. :param anns (array of object): annotations to display :return: None """ if len(anns) == 0: return 0 if 'segmentation' in anns[0] or 'keypoints' in anns[0]: datasetType = 'instances' elif 'caption' in anns[0]: datasetType = 'captions' else: raise Exception('datasetType not supported') if datasetType == 'instances': ax = plt.gca() ax.set_autoscale_on(False) polygons = [] color = [] for ann in anns: c = (np.random.random((1, 3))*0.6+0.4).tolist()[0] if 'segmentation' in ann: if type(ann['segmentation']) == list: # polygon for seg in ann['segmentation']: poly = np.array(seg).reshape((int(len(seg)/2), 2)) polygons.append(Polygon(poly)) color.append(c) else: # mask t = self.imgs[ann['image_id']] if type(ann['segmentation']['counts']) == list: rle = maskUtils.frPyObjects([ann['segmentation']], t['height'], t['width']) else: rle = [ann['segmentation']] m = maskUtils.decode(rle) img = np.ones( (m.shape[0], m.shape[1], 3) ) if ann['iscrowd'] == 1: color_mask = np.array([2.0,166.0,101.0])/255 if ann['iscrowd'] == 0: color_mask = np.random.random((1, 3)).tolist()[0] for i in range(3): img[:,:,i] = color_mask[i] ax.imshow(np.dstack( (img, m*0.5) )) if 'keypoints' in ann and type(ann['keypoints']) == list: # turn skeleton into zero-based index sks = np.array(self.loadCats(ann['category_id'])[0]['skeleton'])-1 kp = np.array(ann['keypoints']) x = kp[0::3] y = kp[1::3] v = kp[2::3] for sk in sks: if np.all(v[sk]>0): plt.plot(x[sk],y[sk], linewidth=3, color=c) plt.plot(x[v>0], y[v>0],'o',markersize=8, markerfacecolor=c, markeredgecolor='k',markeredgewidth=2) plt.plot(x[v>1], y[v>1],'o',markersize=8, markerfacecolor=c, markeredgecolor=c, markeredgewidth=2) p = PatchCollection(polygons, facecolor=color, linewidths=0, alpha=0.4) ax.add_collection(p) p = PatchCollection(polygons, facecolor='none', edgecolors=color, linewidths=2) ax.add_collection(p) elif datasetType == 'captions': for ann in anns: print(ann['caption']) def loadRes(self, resFile): """ Load result file and return a result api object. :param resFile (str) : file name of result file :return: res (obj) : result api object """ res = SOBA() res.dataset['images'] = [img for img in self.dataset['images']] print('Loading and preparing results...') tic = time.time() if type(resFile) == str or (PYTHON_VERSION == 2 and type(resFile) == unicode): anns = json.load(open(resFile)) elif type(resFile) == np.ndarray: anns = self.loadNumpyAnnotations(resFile) else: anns = resFile assert type(anns) == list, 'results in not an array of objects' annsImgIds = [ann['image_id'] for ann in anns] assert set(annsImgIds) == (set(annsImgIds) & set(self.getImgIds())), \ 'Results do not correspond to current soba set' if 'caption' in anns[0]: imgIds = set([img['id'] for img in res.dataset['images']]) & set([ann['image_id'] for ann in anns]) res.dataset['images'] = [img for img in res.dataset['images'] if img['id'] in imgIds] for id, ann in enumerate(anns): ann['id'] = id+1 elif 'bbox' in anns[0] and not anns[0]['bbox'] == []: res.dataset['categories'] = copy.deepcopy(self.dataset['categories']) for id, ann in enumerate(anns): bb = ann['bbox'] x1, x2, y1, y2 = [bb[0], bb[0]+bb[2], bb[1], bb[1]+bb[3]] if not 'segmentation' in ann: ann['segmentation'] = [[x1, y1, x1, y2, x2, y2, x2, y1]] ann['area'] = bb[2]*bb[3] ann['id'] = id+1 ann['iscrowd'] = 0 elif 'segmentation' in anns[0]: res.dataset['categories'] = copy.deepcopy(self.dataset['categories']) for id, ann in enumerate(anns): # now only support compressed RLE format as segmentation results ann['area'] = maskUtils.area(ann['segmentation']) if not 'bbox' in ann: ann['bbox'] = maskUtils.toBbox(ann['segmentation']) ann['id'] = id+1 ann['iscrowd'] = 0 elif 'keypoints' in anns[0]: res.dataset['categories'] = copy.deepcopy(self.dataset['categories']) for id, ann in enumerate(anns): s = ann['keypoints'] x = s[0::3] y = s[1::3] x0,x1,y0,y1 = np.min(x), np.max(x), np.min(y), np.max(y) ann['area'] = (x1-x0)*(y1-y0) ann['id'] = id + 1 ann['bbox'] = [x0,y0,x1-x0,y1-y0] print('DONE (t={:0.2f}s)'.format(time.time()- tic)) res.dataset['annotations'] = anns res.createIndex() return res def loadRes_asso(self, resFile): """ Load result file and return a result api object. :param resFile (str) : file name of result file :return: res (obj) : result api object """ res = SOBA() res.dataset['images'] = [img for img in self.dataset['images']] print('Loading and preparing results...') tic = time.time() if type(resFile) == str or (PYTHON_VERSION == 2 and type(resFile) == unicode): anns = json.load(open(resFile)) elif type(resFile) == np.ndarray: anns = self.loadNumpyAnnotations(resFile) else: anns = resFile assert type(anns) == list, 'results in not an array of objects' annsImgIds = [ann['image_id'] for ann in anns] assert set(annsImgIds) == (set(annsImgIds) & set(self.getImgIds())), \ 'Results do not correspond to current soba set' if 'caption' in anns[0]: imgIds = set([img['id'] for img in res.dataset['images']]) & set([ann['image_id'] for ann in anns]) res.dataset['images'] = [img for img in res.dataset['images'] if img['id'] in imgIds] for id, ann in enumerate(anns): ann['id'] = id+1 elif 'bbox' in anns[0] and not anns[0]['bbox'] == []: res.dataset['categories'] = copy.deepcopy(self.dataset['categories']) for id, ann in enumerate(anns): bb = ann['bbox'] x1, x2, y1, y2 = [bb[0], bb[0]+bb[2], bb[1], bb[1]+bb[3]] if not 'segmentation' in ann: ann['segmentation'] = [[x1, y1, x1, y2, x2, y2, x2, y1]] ann['area'] = bb[2]*bb[3] ann['id'] = id+1 ann['iscrowd'] = 0 elif 'segmentation' in anns[0]: res.dataset['categories'] = copy.deepcopy(self.dataset['categories']) for id, ann in enumerate(anns): # now only support compressed RLE format as segmentation results ann['area'] = maskUtils.area(ann['segmentation']) if not 'bbox' in ann: ann['bbox'] = maskUtils.toBbox(ann['segmentation']) ann['id'] = id+1 ann['iscrowd'] = 0 elif 'keypoints' in anns[0]: res.dataset['categories'] = copy.deepcopy(self.dataset['categories']) for id, ann in enumerate(anns): s = ann['keypoints'] x = s[0::3] y = s[1::3] x0,x1,y0,y1 = np.min(x), np.max(x), np.min(y), np.max(y) ann['area'] = (x1-x0)*(y1-y0) ann['id'] = id + 1 ann['bbox'] = [x0,y0,x1-x0,y1-y0] print('DONE (t={:0.2f}s)'.format(time.time()- tic)) res.dataset['association_anno'] = anns res.createIndex() return res def download(self, tarDir = None, imgIds = [] ): ''' Download SOBA images from mssoba.org server. :param tarDir (str): SOBA results directory name imgIds (list): images to be downloaded :return: ''' if tarDir is None: print('Please specify target directory') return -1 if len(imgIds) == 0: imgs = self.imgs.values() else: imgs = self.loadImgs(imgIds) N = len(imgs) if not os.path.exists(tarDir): os.makedirs(tarDir) for i, img in enumerate(imgs): tic = time.time() fname = os.path.join(tarDir, img['file_name']) if not os.path.exists(fname): urlretrieve(img['soba_url'], fname) print('downloaded {}/{} images (t={:0.1f}s)'.format(i, N, time.time()- tic)) def loadNumpyAnnotations(self, data): """ Convert result data from a numpy array [Nx7] where each row contains {imageID,x1,y1,w,h,score,class} :param data (numpy.ndarray) :return: annotations (python nested list) """ print('Converting ndarray to lists...') assert(type(data) == np.ndarray) print(data.shape) assert(data.shape[1] == 7) N = data.shape[0] ann = [] for i in range(N): if i % 1000000 == 0: print('{}/{}'.format(i,N)) ann += [{ 'image_id' : int(data[i, 0]), 'bbox' : [ data[i, 1], data[i, 2], data[i, 3], data[i, 4] ], 'score' : data[i, 5], 'category_id': int(data[i, 6]), }] return ann def annToRLE(self, ann): """ Convert annotation which can be polygons, uncompressed RLE to RLE. :return: binary mask (numpy 2D array) """ t = self.imgs[ann['image_id']] h, w = t['height'], t['width'] segm = ann['segmentation'] if type(segm) == list: # polygon -- a single object might consist of multiple parts # we merge all parts into one mask rle code rles = maskUtils.frPyObjects(segm, h, w) rle = maskUtils.merge(rles) elif type(segm['counts']) == list: # uncompressed RLE rle = maskUtils.frPyObjects(segm, h, w) else: # rle rle = ann['segmentation'] return rle def annToMask(self, ann): """ Convert annotation which can be polygons, uncompressed RLE, or RLE to binary mask. :return: binary mask (numpy 2D array) """ rle = self.annToRLE(ann) m = maskUtils.decode(rle) return m ================================================ FILE: PythonAPI/pysobatools/sobaeval.py ================================================ __author__ = 'tianyu' import numpy as np import datetime import time from collections import defaultdict from . import mask as maskUtils import copy class SOAPeval: # Interface for evaluating detection on the SOBA dataset. # # The usage for isdEval is as follows: # isdGt=..., isdDt=... # load dataset and results # E = isdEval(isdGt,isdDt); # initialize isdEval object # E.params.recThrs = ...; # set parameters as desired # E.evaluate(); # run per image evaluation # E.accumulate(); # accumulate per image results # E.summarize(); # display summary metrics of results # For example usage see evalDemo.m and http://msisd.org/. # # The evaluation parameters are as follows (defaults in brackets): # imgIds - [all] N img ids to use for evaluation # catIds - [all] K cat ids to use for evaluation # iouThrs - [.5:.05:.95] T=10 IoU thresholds for evaluation # recThrs - [0:.01:1] R=101 recall thresholds for evaluation # areaRng - [...] A=4 object area ranges for evaluation # maxDets - [1 10 100] M=3 thresholds on max detections per image # iouType - ['segm'] set iouType to 'segm', 'bbox' or 'keypoints' # iouType replaced the now DEPRECATED useSegm parameter. # useCats - [1] if true use category labels for evaluation # Note: if useCats=0 category labels are ignored as in proposal scoring. # Note: multiple areaRngs [Ax2] and maxDets [Mx1] can be specified. # # evaluate(): evaluates detections on every image and every category and # concats the results into the "evalImgs" with fields: # dtIds - [1xD] id for each of the D detections (dt) # gtIds - [1xG] id for each of the G ground truths (gt) # dtMatches - [TxD] matching gt id at each IoU or 0 # gtMatches - [TxG] matching dt id at each IoU or 0 # dtScores - [1xD] confidence of each dt # gtIgnore - [1xG] ignore flag for each gt # dtIgnore - [TxD] ignore flag for each dt at each IoU # # accumulate(): accumulates the per-image, per-category evaluation # results in "evalImgs" into the dictionary "eval" with fields: # params - parameters used for evaluation # date - date evaluation was performed # counts - [T,R,K,A,M] parameter dimensions (see above) # precision - [TxRxKxAxM] precision for every evaluation setting # recall - [TxKxAxM] max recall for every evaluation setting # Note: precision and recall==-1 for settings with no gt objects. # # See also isd, mask, pyisdDemo, pyisdEvalDemo # # Microsoft isd Toolbox. version 2.0 # Data, paper, and tutorials available at: http://msisd.org/ # Code written by Piotr Dollar and Tsung-Yi Lin, 2015. # Licensed under the Simplified BSD License [see isd/license.txt] def __init__(self, isdGt=None, isdDt=None, isdRel = None,iouType='segm'): ''' Initialize isdEval using isd APIs for gt and dt :param isdGt: isd object with ground truth annotations :param isdDt: isd object with detection results :return: None ''' if not iouType: print('iouType not specified. use default iouType segm') self.isdGt = isdGt # ground truth isd API self.isdDt = isdDt # detections isd API self.isdRel = isdRel # associations isd API self.evalImgs = defaultdict(list) # per-image per-category evaluation results [KxAxI] elements self.eval = {} # accumulated evaluation results self._gts = defaultdict(list) # gt for evaluation self._dts = defaultdict(list) # dt for evaluation self._rel_gts = defaultdict(list) # gt for evaluation self._rel_dts = defaultdict(list) # dt for evaluation self.params = Params(iouType=iouType) # parameters self._paramsEval = {} # parameters for evaluation self.stats = [] # result summarization self.ious = {} # ious between all gts and dts if not isdGt is None: self.params.imgIds = sorted(isdGt.getImgIds()) # self.params.catIds = sorted(isdGt.getCatIds()) def _prepare(self): ''' Prepare ._gts and ._dts for evaluation based on params :return: None ''' def _toMask(anns, isd): # modify ann['segmentation'] by reference for ann in anns: rle = isd.annToRLE(ann) ann['segmentation'] = rle p = self.params if p.useCats: gts=self.isdGt.loadAnns(self.isdGt.getAnnIds(imgIds=p.imgIds, catIds=p.catIds)) dts=self.isdDt.loadAnns(self.isdDt.getAnnIds(imgIds=p.imgIds, catIds=p.catIds)) else: gts=self.isdGt.loadAnns(self.isdGt.getAnnIds(imgIds=p.imgIds)) dts=self.isdDt.loadAnns(self.isdDt.getAnnIds(imgIds=p.imgIds)) # convert ground truth to mask if iouType == 'segm' if p.iouType == 'segm': _toMask(gts, self.isdGt) _toMask(dts, self.isdDt) # set ignore flag for gt in gts: gt['ignore'] = gt['ignore'] if 'ignore' in gt else 0 gt['ignore'] = 'iscrowd' in gt and gt['iscrowd'] if p.iouType == 'keypoints': gt['ignore'] = (gt['num_keypoints'] == 0) or gt['ignore'] self._gts = defaultdict(list) # gt for evaluation self._dts = defaultdict(list) # dt for evaluation for gt in gts: self._gts[gt['image_id'], gt['category_id']].append(gt) for dt in dts: self._dts[dt['image_id'], dt['category_id']].append(dt) # self.evalImgs = defaultdict(list) # per-image per-category evaluation results # self.eval = {} # accumulated evaluation results def _prepare_asso(self): ''' Prepare ._gts and ._dts for evaluation based on params :return: None ''' def _toMask(anns, isd): # modify ann['segmentation'] by reference for ann in anns: rle = isd.annToRLE(ann) ann['segmentation'] = rle self.params.catIds = sorted(self.isdGt.getAssoIds()) p = self.params if p.useCats: rel_gts=self.isdGt.loadAssoAnns(self.isdGt.getAssoAnnIds(imgIds=p.imgIds, catIds=1)) rel_dts=self.isdRel.loadAssoAnns(self.isdRel.getAssoAnnIds(imgIds=p.imgIds, catIds=1)) else: rel_gts=self.isdGt.loadAssoAnns(self.isdGt.getAssoAnnIds(imgIds=p.imgIds)) rel_dts=self.isdDt.loadAssoAnns(self.isdDt.getAssoAnnIds(imgIds=p.imgIds)) # convert ground truth to mask if iouType == 'segm' if p.iouType == 'segm': _toMask(rel_gts, self.isdGt) _toMask(rel_dts, self.isdRel) # set ignore flag for gt in rel_gts: gt['ignore'] = gt['ignore'] if 'ignore' in gt else 0 gt['ignore'] = 'iscrowd' in gt and gt['iscrowd'] if p.iouType == 'keypoints': gt['ignore'] = (gt['num_keypoints'] == 0) or gt['ignore'] self._rel_gts = defaultdict(list) # gt for evaluation self._rel_dts = defaultdict(list) # dt for evaluation for gt in rel_gts: self._rel_gts[gt['image_id'], gt['category_id']].append(gt) for dt in rel_dts: self._rel_dts[dt['image_id'], dt['category_id']].append(dt) self.evalImgs = defaultdict(list) # per-image per-category evaluation results self.eval = {} # accumulated evaluation results def evaluate(self): ''' Run per image evaluation on given images and store results (a list of dict) in self.evalImgs :return: None ''' tic = time.time() print('Running per image evaluation...') p = self.params # add backward compatibility if useSegm is specified in params if not p.useSegm is None: p.iouType = 'segm' if p.useSegm == 1 else 'bbox' print('useSegm (deprecated) is not None. Running {} evaluation'.format(p.iouType)) print('Evaluate annotation type *{}*'.format(p.iouType)) p.imgIds = list(np.unique(p.imgIds)) if p.useCats: p.catIds = list(np.unique(p.catIds)) p.maxDets = sorted(p.maxDets) self.params=p self._prepare() # loop through images, area range, max detection number catIds = p.catIds if p.useCats else [-1] if p.iouType == 'segm' or p.iouType == 'bbox': computeIoU = self.computeIoU elif p.iouType == 'keypoints': computeIoU = self.computeOks self.ious = {(imgId, catId): computeIoU(imgId, catId) \ for imgId in p.imgIds for catId in catIds} evaluateImg = self.evaluateImg maxDet = p.maxDets[-1] self.evalImgs = [evaluateImg(imgId, catId, areaRng, maxDet) for catId in catIds for areaRng in p.areaRng for imgId in p.imgIds ] self._paramsEval = copy.deepcopy(self.params) toc = time.time() print('DONE (t={:0.2f}s).'.format(toc-tic)) def evaluate_asso(self): ''' Run per image evaluation on given images and store results (a list of dict) in self.evalImgs :return: None ''' tic = time.time() print('Running per image evaluation...') p = self.params # add backward compatibility if useSegm is specified in params if not p.useSegm is None: p.iouType = 'segm' if p.useSegm == 1 else 'bbox' print('useSegm (deprecated) is not None. Running {} evaluation'.format(p.iouType)) print('Evaluate annotation type *{}*'.format(p.iouType)) p.imgIds = list(np.unique(p.imgIds)) if p.useCats: p.catIds = list(np.unique(p.catIds)) p.maxDets = sorted(p.maxDets) self.params=p self._prepare() self._prepare_asso() # loop through images, area range, max detection number catIds = [1] if p.iouType == 'segm' or p.iouType == 'bbox': computeIoU = self.computeIoU elif p.iouType == 'keypoints': computeIoU = self.computeOks self.ious = {(imgId, catId): computeIoU(imgId, catId) \ for imgId in p.imgIds for catId in catIds} evaluateImg = self.evaluateImg maxDet = p.maxDets[-2] # a,b,c,d = evaluateImg(9,1,p.areaRng[0],maxDet) # return a,b,c,d self.evalImgs = [evaluateImg(imgId, catId, areaRng, maxDet) for catId in catIds for areaRng in p.areaRng for imgId in p.imgIds ] self._paramsEval = copy.deepcopy(self.params) toc = time.time() print('DONE (t={:0.2f}s).'.format(toc-tic)) def computeIoU(self, imgId, catId): p = self.params if p.useCats: gt = self._gts[imgId,catId] dt = self._dts[imgId,catId] else: gt = [_ for cId in p.catIds for _ in self._gts[imgId,cId]] dt = [_ for cId in p.catIds for _ in self._dts[imgId,cId]] if len(gt) == 0 and len(dt) ==0: return [] inds = np.argsort([-d['score'] for d in dt], kind='mergesort') dt = [dt[i] for i in inds] if len(dt) > p.maxDets[-1]: dt=dt[0:p.maxDets[-1]] if p.iouType == 'segm': g = [g['segmentation'] for g in gt] d = [d['segmentation'] for d in dt] elif p.iouType == 'bbox': g = [g['bbox'] for g in gt] d = [d['bbox'] for d in dt] else: raise Exception('unknown iouType for iou computation') # compute iou between each dt and gt region iscrowd = [int(o['iscrowd']) for o in gt] ious = maskUtils.iou(d,g,iscrowd) return ious def computeOks(self, imgId, catId): p = self.params # dimention here should be Nxm gts = self._gts[imgId, catId] dts = self._dts[imgId, catId] inds = np.argsort([-d['score'] for d in dts], kind='mergesort') dts = [dts[i] for i in inds] if len(dts) > p.maxDets[-1]: dts = dts[0:p.maxDets[-1]] # if len(gts) == 0 and len(dts) == 0: if len(gts) == 0 or len(dts) == 0: return [] ious = np.zeros((len(dts), len(gts))) sigmas = p.kpt_oks_sigmas vars = (sigmas * 2)**2 k = len(sigmas) # compute oks between each detection and ground truth object for j, gt in enumerate(gts): # create bounds for ignore regions(double the gt bbox) g = np.array(gt['keypoints']) xg = g[0::3]; yg = g[1::3]; vg = g[2::3] k1 = np.count_nonzero(vg > 0) bb = gt['bbox'] x0 = bb[0] - bb[2]; x1 = bb[0] + bb[2] * 2 y0 = bb[1] - bb[3]; y1 = bb[1] + bb[3] * 2 for i, dt in enumerate(dts): d = np.array(dt['keypoints']) xd = d[0::3]; yd = d[1::3] if k1>0: # measure the per-keypoint distance if keypoints visible dx = xd - xg dy = yd - yg else: # measure minimum distance to keypoints in (x0,y0) & (x1,y1) z = np.zeros((k)) dx = np.max((z, x0-xd),axis=0)+np.max((z, xd-x1),axis=0) dy = np.max((z, y0-yd),axis=0)+np.max((z, yd-y1),axis=0) e = (dx**2 + dy**2) / vars / (gt['area']+np.spacing(1)) / 2 if k1 > 0: e=e[vg > 0] ious[i, j] = np.sum(np.exp(-e)) / e.shape[0] return ious def evaluateImg(self, imgId, catId, aRng, maxDet): ''' perform evaluation for single category and image :return: dict (single image results) ''' p = self.params gt = self._rel_gts[imgId,1] dt = self._rel_dts[imgId,1] ins_gt = [_ for cId in [1,2] for _ in self._gts[imgId,cId]] ins_dt = [_ for cId in [1,2] for _ in self._dts[imgId,cId]] ins_pred_class_ids = [cId for cId in [1,2] for _ in self._dts[imgId,cId]] if len(gt) == 0 and len(dt) ==0: return None for g in gt: if g['ignore'] or (g['area']aRng[1]): g['_ignore'] = 1 else: g['_ignore'] = 0 # sort dt highest score first, sort gt ignore last gtind = np.argsort([g['_ignore'] for g in gt], kind='mergesort') gt = [gt[i] for i in gtind] dtind = np.argsort([-d['score'] for d in dt], kind='mergesort') dt = [dt[i] for i in dtind[0:maxDet]] iscrowd = [int(o['iscrowd']) for o in gt] # load computed ious ious = self.ious[imgId, catId][:, gtind] if len(self.ious[imgId, catId]) > 0 else self.ious[imgId, catId] # match association with instances pred_association = [dt_['association_id'] for dt_ in dt] instance_association = [dt_['association_id'] for dt_ in ins_dt] association_map = ['']*len(pred_association) for x,i in enumerate(pred_association): if i == 0: association_map[x]=(None,None) continue idx = [] for j,r in enumerate(instance_association): if r == i: if len(idx)==1: if ins_pred_class_ids[j] == 1: idx = [j,idx[0]] else: idx.append(j) if len(idx) == 2: idx = tuple(idx) break else: idx.append(j) association_map[x] = idx T = len(p.iouThrs) #Threshold G = len(gt) D = len(dt) gtm = np.zeros((T,G)) dtm = np.zeros((T,D)) gtIg = np.array([g['_ignore'] for g in gt]) dtIg = np.zeros((T,D)) if not len(ious)==0: for tind, t in enumerate(p.iouThrs): for dind, d in enumerate(dt): # information about best match so far (m=-1 -> unmatched) iou = min([t,1-1e-10]) m = -1 for gind, g in enumerate(gt): # if this gt already matched, and not a crowd, continue if gtm[tind,gind]>0 and not iscrowd[gind]: continue # if dt matched to reg gt, and on ignore gt, stop if m>-1 and gtIg[m]==0 and gtIg[gind]==1: break # continue to next gt unless better match made if p.iouType =='segm': ious = maskUtils.iou([gt[gind]['segmentation']],[dt[dind]['segmentation']],[0]) elif p.iouType =='bbox': ious = maskUtils.iou([gt[gind]['bbox']],[dt[dind]['bbox']],[0]) if ious < iou: #######HERE ADD Assotion!!!!########## # print(dind,gind) continue # print(dind,gind) if p.iouType =='segm': gt_o = [ins_gt[gind]['segmentation']] gt_s = [ins_gt[gind+G]['segmentation']] ins_o = [ins_dt[association_map[dind][0]]['segmentation']] ins_s = [ins_dt[association_map[dind][1]]['segmentation']] ious_o = maskUtils.iou(gt_o,ins_o,[0]) ious_s = maskUtils.iou(gt_s,ins_s,[0]) if ious_s[0][0] < iou or ious_o[0][0] < iou: continue elif p.iouType =='bbox': gt_o = [ins_gt[gind]['bbox']] gt_s = [ins_gt[gind+G]['bbox']] try: ins_o = [ins_dt[association_map[dind][0]]['bbox']] ins_s = [ins_dt[association_map[dind][1]]['bbox']] except: continue ious_o = maskUtils.iou(ins_o,gt_o,[0]) ious_s = maskUtils.iou(ins_s,gt_s,[0]) if ious_s[0][0] < iou or ious_o[0][0] < iou: continue # if match successful and best so far, store appropriately iou=ious m=gind # if match made store id of match for both dt and gt if m ==-1: continue dtIg[tind,dind] = gtIg[m] dtm[tind,dind] = gt[m]['id'] gtm[tind,m] = d['id'] # set unmatched detections outside of area range to ignore a = np.array([d['area']aRng[1] for d in dt]).reshape((1, len(dt))) dtIg = np.logical_or(dtIg, np.logical_and(dtm==0, np.repeat(a,T,0))) # store results for given image and category return { 'image_id': imgId, 'category_id': catId, 'aRng': aRng, 'maxDet': maxDet, 'dtIds': [d['id'] for d in dt], 'gtIds': [g['id'] for g in gt], 'dtMatches': dtm, 'gtMatches': gtm, 'dtScores': [d['score'] for d in dt], 'gtIgnore': gtIg, 'dtIgnore': dtIg, } def accumulate(self, p = None): ''' Accumulate per image evaluation results and store the result in self.eval :param p: input params for evaluation :return: None ''' print('Accumulating evaluation results...') tic = time.time() if not self.evalImgs: print('Please run evaluate() first') # allows input customized parameters if p is None: p = self.params p.catIds = p.catIds if p.useCats == 1 else [-1] T = len(p.iouThrs) R = len(p.recThrs) K = len(p.catIds) if p.useCats else 1 A = len(p.areaRng) M = len(p.maxDets) precision = -np.ones((T,R,K,A,M)) # -1 for the precision of absent categories recall = -np.ones((T,K,A,M)) scores = -np.ones((T,R,K,A,M)) # create dictionary for future indexing _pe = self._paramsEval catIds = _pe.catIds if _pe.useCats else [-1] setK = set(catIds) setA = set(map(tuple, _pe.areaRng)) setM = set(_pe.maxDets) setI = set(_pe.imgIds) # get inds to evaluate k_list = [n for n, k in enumerate(p.catIds) if k in setK] m_list = [m for n, m in enumerate(p.maxDets) if m in setM] a_list = [n for n, a in enumerate(map(lambda x: tuple(x), p.areaRng)) if a in setA] i_list = [n for n, i in enumerate(p.imgIds) if i in setI] I0 = len(_pe.imgIds) A0 = len(_pe.areaRng) # retrieve E at each category, area range, and max number of detections for k, k0 in enumerate(k_list): Nk = k0*A0*I0 for a, a0 in enumerate(a_list): Na = a0*I0 for m, maxDet in enumerate(m_list): E = [self.evalImgs[Nk + Na + i] for i in i_list] E = [e for e in E if not e is None] if len(E) == 0: continue dtScores = np.concatenate([e['dtScores'][0:maxDet] for e in E]) # different sorting method generates slightly different results. # mergesort is used to be consistent as Matlab implementation. inds = np.argsort(-dtScores, kind='mergesort') dtScoresSorted = dtScores[inds] dtm = np.concatenate([e['dtMatches'][:,0:maxDet] for e in E], axis=1)[:,inds] dtIg = np.concatenate([e['dtIgnore'][:,0:maxDet] for e in E], axis=1)[:,inds] gtIg = np.concatenate([e['gtIgnore'] for e in E]) npig = np.count_nonzero(gtIg==0 ) if npig == 0: continue tps = np.logical_and( dtm, np.logical_not(dtIg) ) fps = np.logical_and(np.logical_not(dtm), np.logical_not(dtIg) ) tp_sum = np.cumsum(tps, axis=1).astype(dtype=np.float) fp_sum = np.cumsum(fps, axis=1).astype(dtype=np.float) for t, (tp, fp) in enumerate(zip(tp_sum, fp_sum)): tp = np.array(tp) fp = np.array(fp) nd = len(tp) rc = tp / npig pr = tp / (fp+tp+np.spacing(1)) q = np.zeros((R,)) ss = np.zeros((R,)) if nd: recall[t,k,a,m] = rc[-1] else: recall[t,k,a,m] = 0 # numpy is slow without cython optimization for accessing elements # use python array gets significant speed improvement pr = pr.tolist(); q = q.tolist() for i in range(nd-1, 0, -1): if pr[i] > pr[i-1]: pr[i-1] = pr[i] inds = np.searchsorted(rc, p.recThrs, side='left') try: for ri, pi in enumerate(inds): q[ri] = pr[pi] ss[ri] = dtScoresSorted[pi] except: pass precision[t,:,k,a,m] = np.array(q) scores[t,:,k,a,m] = np.array(ss) self.eval = { 'params': p, 'counts': [T, R, K, A, M], 'date': datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'), 'precision': precision, 'recall': recall, 'scores': scores, } toc = time.time() print('DONE (t={:0.2f}s).'.format( toc-tic)) def summarize(self): ''' Compute and display summary metrics for evaluation results. Note this functin can *only* be applied on the default parameter setting ''' def _summarize( ap=1, iouThr=None, areaRng='all', maxDets=100 ): p = self.params iStr = ' {:<18} {} @[ IoU={:<9} | area={:>6s} | maxDets={:>3d} ] = {:0.3f}' titleStr = 'Average Precision' if ap == 1 else 'Average Recall' typeStr = '(AP)' if ap==1 else '(AR)' iouStr = '{:0.2f}:{:0.2f}'.format(p.iouThrs[0], p.iouThrs[-1]) \ if iouThr is None else '{:0.2f}'.format(iouThr) aind = [i for i, aRng in enumerate(p.areaRngLbl) if aRng == areaRng] mind = [i for i, mDet in enumerate(p.maxDets) if mDet == maxDets] if ap == 1: # dimension of precision: [TxRxKxAxM] s = self.eval['precision'] # IoU if iouThr is not None: t = np.where(iouThr == p.iouThrs)[0] s = s[t] s = s[:,:,:,aind,mind] else: # dimension of recall: [TxKxAxM] s = self.eval['recall'] if iouThr is not None: t = np.where(iouThr == p.iouThrs)[0] s = s[t] s = s[:,:,aind,mind] if len(s[s>-1])==0: mean_s = -1 else: mean_s = np.mean(s[s>-1]) print(iStr.format(titleStr, typeStr, iouStr, areaRng, maxDets, mean_s)) return mean_s def _summarizeDets(): stats = np.zeros((12,)) stats[0] = _summarize(1) stats[1] = _summarize(1, iouThr=.5, maxDets=self.params.maxDets[2]) stats[2] = _summarize(1, iouThr=.75, maxDets=self.params.maxDets[2]) # stats[3] = _summarize(1, areaRng='small', maxDets=self.params.maxDets[2]) # stats[4] = _summarize(1, areaRng='medium', maxDets=self.params.maxDets[2]) # stats[5] = _summarize(1, areaRng='large', maxDets=self.params.maxDets[2]) stats[6] = _summarize(0, maxDets=self.params.maxDets[0]) stats[7] = _summarize(0, maxDets=self.params.maxDets[1]) stats[8] = _summarize(0, maxDets=self.params.maxDets[2]) # stats[9] = _summarize(0, areaRng='small', maxDets=self.params.maxDets[2]) # stats[10] = _summarize(0, areaRng='medium', maxDets=self.params.maxDets[2]) # stats[11] = _summarize(0, areaRng='large', maxDets=self.params.maxDets[2]) return stats def _summarizeKps(): stats = np.zeros((10,)) stats[0] = _summarize(1, maxDets=20) stats[1] = _summarize(1, maxDets=20, iouThr=.5) stats[2] = _summarize(1, maxDets=20, iouThr=.75) stats[3] = _summarize(1, maxDets=20, areaRng='medium') stats[4] = _summarize(1, maxDets=20, areaRng='large') stats[5] = _summarize(0, maxDets=20) stats[6] = _summarize(0, maxDets=20, iouThr=.5) stats[7] = _summarize(0, maxDets=20, iouThr=.75) stats[8] = _summarize(0, maxDets=20, areaRng='medium') stats[9] = _summarize(0, maxDets=20, areaRng='large') return stats if not self.eval: raise Exception('Please run accumulate() first') iouType = self.params.iouType if iouType == 'segm' or iouType == 'bbox': summarize = _summarizeDets elif iouType == 'keypoints': summarize = _summarizeKps self.stats = summarize() def __str__(self): self.summarize() class Params: ''' Params for isd evaluation api ''' def setDetParams(self): self.imgIds = [] self.catIds = [] # np.arange causes trouble. the data point on arange is slightly larger than the true value self.iouThrs = np.linspace(.5, 0.95, int(np.round((0.95 - .5) / .05)) + 1, endpoint=True) self.recThrs = np.linspace(.0, 1.00, int(np.round((1.00 - .0) / .01)) + 1, endpoint=True) self.maxDets = [1, 20, 100] self.areaRng = [[0 ** 2, 1e5 ** 2]]#, [0 ** 2, 32 ** 2], [32 ** 2, 96 ** 2], [96 ** 2, 1e5 ** 2]] self.areaRngLbl = ['all', 'small', 'medium', 'large'] self.useCats = 1 def setKpParams(self): self.imgIds = [] self.catIds = [] # np.arange causes trouble. the data point on arange is slightly larger than the true value self.iouThrs = np.linspace(.5, 0.95, int(np.round((0.95 - .5) / .05)) + 1, endpoint=True) self.recThrs = np.linspace(.0, 1.00, int(np.round((1.00 - .0) / .01)) + 1, endpoint=True) self.maxDets = [20] self.areaRng = [[0 ** 2, 1e5 ** 2], [32 ** 2, 96 ** 2], [96 ** 2, 1e5 ** 2]] self.areaRngLbl = ['all', 'medium', 'large'] self.useCats = 1 self.kpt_oks_sigmas = np.array([.26, .25, .25, .35, .35, .79, .79, .72, .72, .62,.62, 1.07, 1.07, .87, .87, .89, .89])/10.0 def __init__(self, iouType='segm'): if iouType == 'segm' or iouType == 'bbox': self.setDetParams() elif iouType == 'keypoints': self.setKpParams() else: raise Exception('iouType not supported') self.iouType = iouType # useSegm is deprecated self.useSegm = None ================================================ FILE: PythonAPI/setup.py ================================================ from setuptools import setup, Extension import numpy as np # To compile and install locally run "python setup.py build_ext --inplace" # To install library to Python site-packages run "python setup.py build_ext install" ext_modules = [ Extension( 'pysobatools._mask', sources=['./common/maskApi.c', 'pysobatools/_mask.pyx'], include_dirs = [np.get_include(), './common'], extra_compile_args=['-Wno-cpp', '-Wno-unused-function', '-std=c99'], ) ] setup( name='pysobatools', packages=['pysobatools'], package_dir = {'pysobatools': 'pysobatools'}, install_requires=[ 'setuptools>=18.0', 'cython>=0.27.3', 'matplotlib>=2.1.0' ], version='2.0', ext_modules= ext_modules ) ================================================ FILE: README.md ================================================ # Instance Shadow Detection (CVPR’ 20) [Tianyu Wang](https://stevewongv.github.io)\*, [Xiaowei Hu](https://xw-hu.github.io)\*, Qiong Wang, Pheng-Ann Heng, and [Chi-Wing Fu](http://www.cse.cuhk.edu.hk/~cwfu/) (\* Joint first authors.) [[`openaccess`](http://openaccess.thecvf.com/content_CVPR_2020/papers/Wang_Instance_Shadow_Detection_CVPR_2020_paper.pdf)][[`arXiv`](https://arxiv.org/abs/1911.07034)] [[`BibTeX`](#CitingLISA)] **News: Our new work on instance shadow detection was accepted in CVPR 2021 as Oral presentation, check [here](https://github.com/stevewongv/SSIS)!** ![-c](demo/demo.jpeg) Instance shadow detection aims to find shadow instances paired with object instances. We present a dataset, a deep framework, and an evaluation metric to approach this new task. This repo is implemented on [Detectron2](https://github.com/facebookresearch/detectron2). ## Dependences * python>=3.6 * torch (tested on 1.3.0+cu100 and 1.12.0+cu113) * torchvision (tested on 0.4.1+cu100 and 0.13.0+cu113) * tensorboard * cython * jupyter * scikit-image * numpy * opencv-python * pycocotools ## Installation Install LISA and pysobatools ```bash $ cd InstanceShadowDetection $ python setup.py install $ cd PythonAPI $ python setup.py install ``` ## Docker ```bash $ cd InstanceShadowDetection/docker $ docker build --network=host --tag="instanceshadow" -f ./Dockerfile . $ docker run --gpus all -it --ipc=host --name=instanceshadow --network=host -v /YOURPATH:/data instanceshadow:latest ``` **(Nvidia-docker)[https://github.com/NVIDIA/nvidia-docker] is needed.** ## Model, dataset and our results Please download from [Google Drive](https://drive.google.com/drive/folders/1MKxyq3R6AUeyLai9i9XWzG2C_n5f0ppP). Put the model and dataset follow the directory layout below. . ├── ... ├── dataset │ ├── SOBA # put dataset here ├── InstanceShadowDetection # this repo │ ├── projects │ │ ├── LISA │ │ │ ├── output_light │ │ │ │ ├── last_checkpoint.pth │ │ │ │ └── ... │ │ │ └── ... │ └── ... └── ... ## Demo ```bash $ cd projects/LISA/ $ python demo.py --input ./demo/web-shadow0573.jpg --output ./ --config ./config/LISA_101_FPN_3x_demo.yaml ``` ## Train ```bash $ python train_net.py --num-gpus 2 --config-file ./config/LISA_101_FPN_3x.yaml ``` ## Evaluation ```bash $ python train_net.py --num-gpus 2 --config-file ./config/LISA_101_FPN_3x.yaml --eval-only --resume $ python SOAP.py ``` ## Visualize ```bash python visualize_json_results.py --ins_input ./output_light/inference/soba_instances_results.json --ass_input ./output_light/inference/soba_association_results.json --output ./output_light/results --dataset soba_cast_shadow_val_full ``` ## Citation If you use LISA, SISS, SOBA, or SOAP, please use the following BibTeX entry. ``` @InProceedings{Wang_2020_CVPR, author = {Wang, Tianyu and Hu, Xiaowei and Wang, Qiong and Heng, Pheng-Ann and Fu, Chi-Wing}, title = {Instance Shadow Detection}, booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, month = {June}, year = {2020} } @InProceedings{Wang_2021_CVPR, author = {Wang, Tianyu and Hu, Xiaowei and Fu, Chi-Wing and Heng, Pheng-Ann}, title = {Single-Stage Instance Shadow Detection With Bidirectional Relation Learning}, booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, month = {June}, Year = {2021}, pages = {1-11} } ``` ================================================ FILE: configs/Base-RCNN-C4.yaml ================================================ MODEL: META_ARCHITECTURE: "GeneralizedRCNN" RPN: PRE_NMS_TOPK_TEST: 6000 POST_NMS_TOPK_TEST: 1000 ROI_HEADS: NAME: "Res5ROIHeads" DATASETS: TRAIN: ("coco_2017_train",) TEST: ("coco_2017_val",) SOLVER: IMS_PER_BATCH: 16 BASE_LR: 0.02 STEPS: (60000, 80000) MAX_ITER: 90000 INPUT: MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) VERSION: 2 ================================================ FILE: configs/Base-RCNN-DilatedC5.yaml ================================================ MODEL: META_ARCHITECTURE: "GeneralizedRCNN" RESNETS: OUT_FEATURES: ["res5"] RES5_DILATION: 2 RPN: IN_FEATURES: ["res5"] PRE_NMS_TOPK_TEST: 6000 POST_NMS_TOPK_TEST: 1000 ROI_HEADS: NAME: "StandardROIHeads" IN_FEATURES: ["res5"] ROI_BOX_HEAD: NAME: "FastRCNNConvFCHead" NUM_FC: 2 POOLER_RESOLUTION: 7 ROI_MASK_HEAD: NAME: "MaskRCNNConvUpsampleHead" NUM_CONV: 4 POOLER_RESOLUTION: 14 DATASETS: TRAIN: ("coco_2017_train",) TEST: ("coco_2017_val",) SOLVER: IMS_PER_BATCH: 16 BASE_LR: 0.02 STEPS: (60000, 80000) MAX_ITER: 90000 INPUT: MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) VERSION: 2 ================================================ FILE: configs/Base-RCNN-FPN.yaml ================================================ MODEL: META_ARCHITECTURE: "GeneralizedRCNN" BACKBONE: NAME: "build_resnet_fpn_backbone" RESNETS: OUT_FEATURES: ["res2", "res3", "res4", "res5"] FPN: IN_FEATURES: ["res2", "res3", "res4", "res5"] ANCHOR_GENERATOR: SIZES: [[32], [64], [128], [256], [512]] # One size for each in feature map ASPECT_RATIOS: [[0.5, 1.0, 2.0]] # Three aspect ratios (same for all in feature maps) RPN: IN_FEATURES: ["p2", "p3", "p4", "p5", "p6"] PRE_NMS_TOPK_TRAIN: 2000 # Per FPN level PRE_NMS_TOPK_TEST: 1000 # Per FPN level # Detectron1 uses 2000 proposals per-batch, # (See "modeling/rpn/rpn_outputs.py" for details of this legacy issue) # which is approximately 1000 proposals per-image since the default batch size for FPN is 2. POST_NMS_TOPK_TRAIN: 1000 POST_NMS_TOPK_TEST: 1000 ROI_HEADS: NAME: "StandardROIHeads" IN_FEATURES: ["p2", "p3", "p4", "p5"] ROI_BOX_HEAD: NAME: "FastRCNNConvFCHead" NUM_FC: 2 POOLER_RESOLUTION: 7 ROI_MASK_HEAD: NAME: "MaskRCNNConvUpsampleHead" NUM_CONV: 4 POOLER_RESOLUTION: 14 DATASETS: TRAIN: ("coco_2017_train",) TEST: ("coco_2017_val",) SOLVER: IMS_PER_BATCH: 16 BASE_LR: 0.02 STEPS: (60000, 80000) MAX_ITER: 90000 INPUT: MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) VERSION: 2 ================================================ FILE: configs/Base-RetinaNet.yaml ================================================ MODEL: META_ARCHITECTURE: "RetinaNet" BACKBONE: NAME: "build_retinanet_resnet_fpn_backbone" RESNETS: OUT_FEATURES: ["res3", "res4", "res5"] ANCHOR_GENERATOR: SIZES: !!python/object/apply:eval ["[[x, x * 2**(1.0/3), x * 2**(2.0/3) ] for x in [32, 64, 128, 256, 512 ]]"] FPN: IN_FEATURES: ["res3", "res4", "res5"] RETINANET: IOU_THRESHOLDS: [0.4, 0.5] IOU_LABELS: [0, -1, 1] DATASETS: TRAIN: ("coco_2017_train",) TEST: ("coco_2017_val",) SOLVER: IMS_PER_BATCH: 16 BASE_LR: 0.01 # Note that RetinaNet uses a different default learning rate STEPS: (60000, 80000) MAX_ITER: 90000 INPUT: MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) VERSION: 2 ================================================ FILE: configs/COCO-Detection/fast_rcnn_R_50_FPN_1x.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: False LOAD_PROPOSALS: True RESNETS: DEPTH: 50 PROPOSAL_GENERATOR: NAME: "PrecomputedProposals" DATASETS: TRAIN: ("coco_2017_train",) PROPOSAL_FILES_TRAIN: ("detectron2://COCO-Detection/rpn_R_50_FPN_1x/137258492/coco_2017_train_box_proposals_21bc3a.pkl", ) TEST: ("coco_2017_val",) PROPOSAL_FILES_TEST: ("detectron2://COCO-Detection/rpn_R_50_FPN_1x/137258492/coco_2017_val_box_proposals_ee0dad.pkl", ) DATALOADER: # proposals are part of the dataset_dicts, and take a lot of RAM NUM_WORKERS: 2 ================================================ FILE: configs/COCO-Detection/faster_rcnn_R_101_C4_3x.yaml ================================================ _BASE_: "../Base-RCNN-C4.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" MASK_ON: False RESNETS: DEPTH: 101 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/COCO-Detection/faster_rcnn_R_101_DC5_3x.yaml ================================================ _BASE_: "../Base-RCNN-DilatedC5.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" MASK_ON: False RESNETS: DEPTH: 101 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/COCO-Detection/faster_rcnn_R_101_FPN_3x.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" MASK_ON: False RESNETS: DEPTH: 101 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/COCO-Detection/faster_rcnn_R_50_C4_1x.yaml ================================================ _BASE_: "../Base-RCNN-C4.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: False RESNETS: DEPTH: 50 ================================================ FILE: configs/COCO-Detection/faster_rcnn_R_50_C4_3x.yaml ================================================ _BASE_: "../Base-RCNN-C4.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: False RESNETS: DEPTH: 50 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/COCO-Detection/faster_rcnn_R_50_DC5_1x.yaml ================================================ _BASE_: "../Base-RCNN-DilatedC5.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: False RESNETS: DEPTH: 50 ================================================ FILE: configs/COCO-Detection/faster_rcnn_R_50_DC5_3x.yaml ================================================ _BASE_: "../Base-RCNN-DilatedC5.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: False RESNETS: DEPTH: 50 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/COCO-Detection/faster_rcnn_R_50_FPN_1x.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: False RESNETS: DEPTH: 50 ================================================ FILE: configs/COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: False RESNETS: DEPTH: 50 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/COCO-Detection/faster_rcnn_X_101_32x8d_FPN_3x.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: MASK_ON: False WEIGHTS: "detectron2://ImageNetPretrained/FAIR/X-101-32x8d.pkl" PIXEL_STD: [57.375, 57.120, 58.395] RESNETS: STRIDE_IN_1X1: False # this is a C2 model NUM_GROUPS: 32 WIDTH_PER_GROUP: 8 DEPTH: 101 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/COCO-Detection/retinanet_R_101_FPN_3x.yaml ================================================ _BASE_: "../Base-RetinaNet.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" RESNETS: DEPTH: 101 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/COCO-Detection/retinanet_R_50_FPN_1x.yaml ================================================ _BASE_: "../Base-RetinaNet.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" RESNETS: DEPTH: 50 ================================================ FILE: configs/COCO-Detection/retinanet_R_50_FPN_3x.yaml ================================================ _BASE_: "../Base-RetinaNet.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" RESNETS: DEPTH: 50 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/COCO-Detection/rpn_R_50_C4_1x.yaml ================================================ _BASE_: "../Base-RCNN-C4.yaml" MODEL: META_ARCHITECTURE: "ProposalNetwork" WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: False RESNETS: DEPTH: 50 RPN: PRE_NMS_TOPK_TEST: 12000 POST_NMS_TOPK_TEST: 2000 ================================================ FILE: configs/COCO-Detection/rpn_R_50_FPN_1x.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: META_ARCHITECTURE: "ProposalNetwork" WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: False RESNETS: DEPTH: 50 RPN: POST_NMS_TOPK_TEST: 2000 ================================================ FILE: configs/COCO-InstanceSegmentation/mask_rcnn_R_101_C4_3x.yaml ================================================ _BASE_: "../Base-RCNN-C4.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" MASK_ON: True RESNETS: DEPTH: 101 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/COCO-InstanceSegmentation/mask_rcnn_R_101_DC5_3x.yaml ================================================ _BASE_: "../Base-RCNN-DilatedC5.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" MASK_ON: True RESNETS: DEPTH: 101 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/COCO-InstanceSegmentation/mask_rcnn_R_101_FPN_3x.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" MASK_ON: True RESNETS: DEPTH: 101 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/COCO-InstanceSegmentation/mask_rcnn_R_50_C4_1x.yaml ================================================ _BASE_: "../Base-RCNN-C4.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: True RESNETS: DEPTH: 50 ================================================ FILE: configs/COCO-InstanceSegmentation/mask_rcnn_R_50_C4_3x.yaml ================================================ _BASE_: "../Base-RCNN-C4.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: True RESNETS: DEPTH: 50 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/COCO-InstanceSegmentation/mask_rcnn_R_50_DC5_1x.yaml ================================================ _BASE_: "../Base-RCNN-DilatedC5.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: True RESNETS: DEPTH: 50 ================================================ FILE: configs/COCO-InstanceSegmentation/mask_rcnn_R_50_DC5_3x.yaml ================================================ _BASE_: "../Base-RCNN-DilatedC5.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: True RESNETS: DEPTH: 50 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: True RESNETS: DEPTH: 50 ================================================ FILE: configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: True RESNETS: DEPTH: 50 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/COCO-InstanceSegmentation/mask_rcnn_X_101_32x8d_FPN_3x.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: MASK_ON: True WEIGHTS: "detectron2://ImageNetPretrained/FAIR/X-101-32x8d.pkl" PIXEL_STD: [57.375, 57.120, 58.395] RESNETS: STRIDE_IN_1X1: False # this is a C2 model NUM_GROUPS: 32 WIDTH_PER_GROUP: 8 DEPTH: 101 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/COCO-Keypoints/Base-Keypoint-RCNN-FPN.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: KEYPOINT_ON: True ROI_HEADS: NUM_CLASSES: 1 ROI_BOX_HEAD: SMOOTH_L1_BETA: 0.5 # Keypoint AP degrades (though box AP improves) when using plain L1 loss RPN: # Detectron1 uses 2000 proposals per-batch, but this option is per-image in detectron2. # 1000 proposals per-image is found to hurt box AP. # Therefore we increase it to 1500 per-image. POST_NMS_TOPK_TRAIN: 1500 DATASETS: TRAIN: ("keypoints_coco_2017_train",) TEST: ("keypoints_coco_2017_val",) ================================================ FILE: configs/COCO-Keypoints/keypoint_rcnn_R_101_FPN_3x.yaml ================================================ _BASE_: "Base-Keypoint-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" RESNETS: DEPTH: 101 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/COCO-Keypoints/keypoint_rcnn_R_50_FPN_1x.yaml ================================================ _BASE_: "Base-Keypoint-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" RESNETS: DEPTH: 50 ================================================ FILE: configs/COCO-Keypoints/keypoint_rcnn_R_50_FPN_3x.yaml ================================================ _BASE_: "Base-Keypoint-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" RESNETS: DEPTH: 50 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/COCO-Keypoints/keypoint_rcnn_X_101_32x8d_FPN_3x.yaml ================================================ _BASE_: "Base-Keypoint-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/FAIR/X-101-32x8d.pkl" PIXEL_STD: [57.375, 57.120, 58.395] RESNETS: STRIDE_IN_1X1: False # this is a C2 model NUM_GROUPS: 32 WIDTH_PER_GROUP: 8 DEPTH: 101 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/COCO-PanopticSegmentation/Base-Panoptic-FPN.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: META_ARCHITECTURE: "PanopticFPN" MASK_ON: True SEM_SEG_HEAD: LOSS_WEIGHT: 0.5 DATASETS: TRAIN: ("coco_2017_train_panoptic_separated",) TEST: ("coco_2017_val_panoptic_separated",) ================================================ FILE: configs/COCO-PanopticSegmentation/panoptic_fpn_R_101_3x.yaml ================================================ _BASE_: "Base-Panoptic-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" RESNETS: DEPTH: 101 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/COCO-PanopticSegmentation/panoptic_fpn_R_50_1x.yaml ================================================ _BASE_: "Base-Panoptic-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" RESNETS: DEPTH: 50 ================================================ FILE: configs/COCO-PanopticSegmentation/panoptic_fpn_R_50_3x.yaml ================================================ _BASE_: "Base-Panoptic-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" RESNETS: DEPTH: 50 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/Cityscapes/mask_rcnn_R_50_FPN.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: # WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" # For better, more stable performance initialize from COCO WEIGHTS: "detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl" MASK_ON: True ROI_HEADS: NUM_CLASSES: 8 # This is similar to the setting used in Mask R-CNN paper, Appendix A # But there are some differences, e.g., we did not initialize the output # layer using the corresponding classes from COCO INPUT: MIN_SIZE_TRAIN: (800, 832, 864, 896, 928, 960, 992, 1024) MIN_SIZE_TRAIN_SAMPLING: "choice" MIN_SIZE_TEST: 1024 MAX_SIZE_TRAIN: 2048 MAX_SIZE_TEST: 2048 DATASETS: TRAIN: ("cityscapes_fine_instance_seg_train",) TEST: ("cityscapes_fine_instance_seg_val",) SOLVER: BASE_LR: 0.01 STEPS: (18000,) MAX_ITER: 24000 IMS_PER_BATCH: 8 TEST: EVAL_PERIOD: 8000 ================================================ FILE: configs/Detectron1-Comparisons/README.md ================================================ Detectron2's default settings and a few implementation details are different from Detectron. The differences in implementation details are shared in [Compatibility with Other Libraries](../../docs/notes/compatibility.md). The differences in default config includes: * Use scale augmentation during training. * Use L1 loss instead of smooth L1 loss. * Use `POOLER_SAMPLING_RATIO=0` instead of 2. * Use `ROIAlignV2`. In this directory, we provide a few configs that mimic Detectron's behavior as close as possible. This provides a fair comparison of accuracy and speed against Detectron.
Name lr
sched
train
time
(s/iter)
inference
time
(s/im)
train
mem
(GB)
box
AP
mask
AP
kp.
AP
model id download
Faster R-CNN 1x 0.219 0.048 3.1 36.9 137781054 model | metrics
Keypoint R-CNN 1x 0.313 0.082 5.0 53.1 64.2 137781195 model | metrics
Mask R-CNN 1x 0.273 0.052 3.4 37.8 34.9 137781281 model | metrics
## Comparisons: * Faster R-CNN: Detectron's AP is 36.7, similar to ours. * Keypoint R-CNN: Detectron's AP is box 53.6, keypoint 64.2. Fixing a Detectron's [bug](https://github.com/facebookresearch/Detectron/issues/459) lead to a drop in box AP, and can be compensated back by some parameter tuning. * Mask R-CNN: Detectron's AP is box 37.7, mask 33.9. We're 1 AP better in mask AP, due to more correct implementation. For speed comparison, see [benchmarks](https://detectron2.readthedocs.io/notes/benchmarks.html). ================================================ FILE: configs/Detectron1-Comparisons/faster_rcnn_R_50_FPN_noaug_1x.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: False RESNETS: DEPTH: 50 # Detectron1 uses smooth L1 loss with some magic beta values. # The defaults are changed to L1 loss in Detectron2. RPN: SMOOTH_L1_BETA: 0.1111 ROI_BOX_HEAD: SMOOTH_L1_BETA: 1.0 POOLER_SAMPLING_RATIO: 2 POOLER_TYPE: "ROIAlign" INPUT: # no scale augmentation MIN_SIZE_TRAIN: (800, ) ================================================ FILE: configs/Detectron1-Comparisons/keypoint_rcnn_R_50_FPN_1x.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" KEYPOINT_ON: True RESNETS: DEPTH: 50 ROI_HEADS: NUM_CLASSES: 1 ROI_KEYPOINT_HEAD: POOLER_RESOLUTION: 14 POOLER_SAMPLING_RATIO: 2 POOLER_TYPE: "ROIAlign" # Detectron1 uses smooth L1 loss with some magic beta values. # The defaults are changed to L1 loss in Detectron2. ROI_BOX_HEAD: SMOOTH_L1_BETA: 1.0 POOLER_SAMPLING_RATIO: 2 POOLER_TYPE: "ROIAlign" RPN: SMOOTH_L1_BETA: 0.1111 # Detectron1 uses 2000 proposals per-batch, but this option is per-image in detectron2 # 1000 proposals per-image is found to hurt box AP. # Therefore we increase it to 1500 per-image. POST_NMS_TOPK_TRAIN: 1500 DATASETS: TRAIN: ("keypoints_coco_2017_train",) TEST: ("keypoints_coco_2017_val",) ================================================ FILE: configs/Detectron1-Comparisons/mask_rcnn_R_50_FPN_noaug_1x.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: True RESNETS: DEPTH: 50 # Detectron1 uses smooth L1 loss with some magic beta values. # The defaults are changed to L1 loss in Detectron2. RPN: SMOOTH_L1_BETA: 0.1111 ROI_BOX_HEAD: SMOOTH_L1_BETA: 1.0 POOLER_SAMPLING_RATIO: 2 POOLER_TYPE: "ROIAlign" ROI_MASK_HEAD: POOLER_SAMPLING_RATIO: 2 POOLER_TYPE: "ROIAlign" INPUT: # no scale augmentation MIN_SIZE_TRAIN: (800, ) ================================================ FILE: configs/LVIS-InstanceSegmentation/mask_rcnn_R_101_FPN_1x.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-101.pkl" MASK_ON: True RESNETS: DEPTH: 101 ROI_HEADS: NUM_CLASSES: 1230 SCORE_THRESH_TEST: 0.0001 INPUT: MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) DATASETS: TRAIN: ("lvis_v0.5_train",) TEST: ("lvis_v0.5_val",) TEST: DETECTIONS_PER_IMAGE: 300 # LVIS allows up to 300 DATALOADER: SAMPLER_TRAIN: "RepeatFactorTrainingSampler" REPEAT_THRESHOLD: 0.001 ================================================ FILE: configs/LVIS-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: True RESNETS: DEPTH: 50 ROI_HEADS: NUM_CLASSES: 1230 SCORE_THRESH_TEST: 0.0001 INPUT: MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) DATASETS: TRAIN: ("lvis_v0.5_train",) TEST: ("lvis_v0.5_val",) TEST: DETECTIONS_PER_IMAGE: 300 # LVIS allows up to 300 DATALOADER: SAMPLER_TRAIN: "RepeatFactorTrainingSampler" REPEAT_THRESHOLD: 0.001 ================================================ FILE: configs/LVIS-InstanceSegmentation/mask_rcnn_X_101_32x8d_FPN_1x.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/FAIR/X-101-32x8d.pkl" PIXEL_STD: [57.375, 57.120, 58.395] MASK_ON: True RESNETS: STRIDE_IN_1X1: False # this is a C2 model NUM_GROUPS: 32 WIDTH_PER_GROUP: 8 DEPTH: 101 ROI_HEADS: NUM_CLASSES: 1230 SCORE_THRESH_TEST: 0.0001 INPUT: MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) DATASETS: TRAIN: ("lvis_v0.5_train",) TEST: ("lvis_v0.5_val",) TEST: DETECTIONS_PER_IMAGE: 300 # LVIS allows up to 300 DATALOADER: SAMPLER_TRAIN: "RepeatFactorTrainingSampler" REPEAT_THRESHOLD: 0.001 ================================================ FILE: configs/Misc/cascade_mask_rcnn_R_50_FPN_1x.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: True RESNETS: DEPTH: 50 ROI_HEADS: NAME: CascadeROIHeads ROI_BOX_HEAD: CLS_AGNOSTIC_BBOX_REG: True RPN: POST_NMS_TOPK_TRAIN: 2000 ================================================ FILE: configs/Misc/cascade_mask_rcnn_R_50_FPN_3x.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: True RESNETS: DEPTH: 50 ROI_HEADS: NAME: CascadeROIHeads ROI_BOX_HEAD: CLS_AGNOSTIC_BBOX_REG: True RPN: POST_NMS_TOPK_TRAIN: 2000 SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/Misc/cascade_mask_rcnn_X_152_32x8d_FPN_IN5k_gn_dconv.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: MASK_ON: True WEIGHTS: "catalog://ImageNetPretrained/FAIR/X-152-32x8d-IN5k" RESNETS: STRIDE_IN_1X1: False # this is a C2 model NUM_GROUPS: 32 WIDTH_PER_GROUP: 8 DEPTH: 152 DEFORM_ON_PER_STAGE: [False, True, True, True] ROI_HEADS: NAME: "CascadeROIHeads" ROI_BOX_HEAD: NAME: "FastRCNNConvFCHead" NUM_CONV: 4 NUM_FC: 1 NORM: "GN" CLS_AGNOSTIC_BBOX_REG: True ROI_MASK_HEAD: NUM_CONV: 8 NORM: "GN" RPN: POST_NMS_TOPK_TRAIN: 2000 SOLVER: IMS_PER_BATCH: 128 STEPS: (35000, 45000) MAX_ITER: 50000 BASE_LR: 0.16 INPUT: MIN_SIZE_TRAIN: (640, 864) MIN_SIZE_TRAIN_SAMPLING: "range" MAX_SIZE_TRAIN: 1440 CROP: ENABLED: True TEST: EVAL_PERIOD: 2500 ================================================ FILE: configs/Misc/mask_rcnn_R_50_FPN_1x_cls_agnostic.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: True RESNETS: DEPTH: 50 ROI_BOX_HEAD: CLS_AGNOSTIC_BBOX_REG: True ROI_MASK_HEAD: CLS_AGNOSTIC_MASK: True ================================================ FILE: configs/Misc/mask_rcnn_R_50_FPN_1x_dconv_c3-c5.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: True RESNETS: DEPTH: 50 DEFORM_ON_PER_STAGE: [False, True, True, True] # on Res3,Res4,Res5 DEFORM_MODULATED: False ================================================ FILE: configs/Misc/mask_rcnn_R_50_FPN_3x_dconv_c3-c5.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: True RESNETS: DEPTH: 50 DEFORM_ON_PER_STAGE: [False, True, True, True] # on Res3,Res4,Res5 DEFORM_MODULATED: False SOLVER: STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/Misc/mask_rcnn_R_50_FPN_3x_gn.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "catalog://ImageNetPretrained/FAIR/R-50-GN" MASK_ON: True RESNETS: DEPTH: 50 NORM: "GN" STRIDE_IN_1X1: False FPN: NORM: "GN" ROI_BOX_HEAD: NAME: "FastRCNNConvFCHead" NUM_CONV: 4 NUM_FC: 1 NORM: "GN" ROI_MASK_HEAD: NORM: "GN" SOLVER: # 3x schedule STEPS: (210000, 250000) MAX_ITER: 270000 ================================================ FILE: configs/Misc/mask_rcnn_R_50_FPN_3x_syncbn.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: True RESNETS: DEPTH: 50 NORM: "SyncBN" STRIDE_IN_1X1: False FPN: NORM: "SyncBN" ROI_BOX_HEAD: NAME: "FastRCNNConvFCHead" NUM_CONV: 4 NUM_FC: 1 NORM: "SyncBN" ROI_MASK_HEAD: NORM: "SyncBN" SOLVER: # 3x schedule STEPS: (210000, 250000) MAX_ITER: 270000 TEST: PRECISE_BN: ENABLED: True ================================================ FILE: configs/Misc/panoptic_fpn_R_101_dconv_cascade_gn_3x.yaml ================================================ # A large PanopticFPN for demo purposes. # Use GN on backbone to support semantic seg. # Use Cascade + Deform Conv to improve localization. _BASE_: "../COCO-PanopticSegmentation/Base-Panoptic-FPN.yaml" MODEL: WEIGHTS: "catalog://ImageNetPretrained/FAIR/R-101-GN" RESNETS: DEPTH: 101 NORM: "GN" DEFORM_ON_PER_STAGE: [False, True, True, True] STRIDE_IN_1X1: False FPN: NORM: "GN" ROI_HEADS: NAME: CascadeROIHeads ROI_BOX_HEAD: CLS_AGNOSTIC_BBOX_REG: True ROI_MASK_HEAD: NORM: "GN" RPN: POST_NMS_TOPK_TRAIN: 2000 SOLVER: STEPS: (105000, 125000) MAX_ITER: 135000 IMS_PER_BATCH: 32 BASE_LR: 0.04 ================================================ FILE: configs/Misc/scratch_mask_rcnn_R_50_FPN_3x_gn.yaml ================================================ _BASE_: "mask_rcnn_R_50_FPN_3x_gn.yaml" # INPUT: # It makes sense to divide by STD when training from scratch # But it seems to make no difference on the results and C2's models didn't do this. # So we keep things consistent with C2. # PIXEL_STD: [57.375, 57.12, 58.395] MODEL: # Train from random initialization. WEIGHTS: "" MASK_ON: True BACKBONE: FREEZE_AT: 0 # NOTE: Please refer to Rethinking ImageNet Pre-training https://arxiv.org/abs/1811.08883 # to learn what you need for training from scratch. ================================================ FILE: configs/Misc/semantic_R_50_FPN_1x.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: META_ARCHITECTURE: "SemanticSegmentor" WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" RESNETS: DEPTH: 50 DATASETS: TRAIN: ("coco_2017_train_panoptic_stuffonly",) TEST: ("coco_2017_val_panoptic_stuffonly",) INPUT: MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) ================================================ FILE: configs/PascalVOC-Detection/faster_rcnn_R_50_C4.yaml ================================================ _BASE_: "../Base-RCNN-C4.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: False RESNETS: DEPTH: 50 ROI_HEADS: NUM_CLASSES: 20 INPUT: MIN_SIZE_TRAIN: (480, 512, 544, 576, 608, 640, 672, 704, 736, 768, 800) MIN_SIZE_TEST: 800 DATASETS: TRAIN: ('voc_2007_trainval', 'voc_2012_trainval') TEST: ('voc_2007_test',) SOLVER: STEPS: (12000, 16000) MAX_ITER: 18000 # 17.4 epochs WARMUP_ITERS: 100 ================================================ FILE: configs/PascalVOC-Detection/faster_rcnn_R_50_FPN.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: False RESNETS: DEPTH: 50 ROI_HEADS: NUM_CLASSES: 20 INPUT: MIN_SIZE_TRAIN: (480, 512, 544, 576, 608, 640, 672, 704, 736, 768, 800) MIN_SIZE_TEST: 800 DATASETS: TRAIN: ('voc_2007_trainval', 'voc_2012_trainval') TEST: ('voc_2007_test',) SOLVER: STEPS: (12000, 16000) MAX_ITER: 18000 # 17.4 epochs WARMUP_ITERS: 100 ================================================ FILE: configs/quick_schedules/README.md ================================================ These are quick configs for performance or accuracy regression tracking purposes. ================================================ FILE: configs/quick_schedules/fast_rcnn_R_50_FPN_inference_acc_test.yaml ================================================ _BASE_: "../COCO-Detection/fast_rcnn_R_50_FPN_1x.yaml" MODEL: WEIGHTS: "detectron2://COCO-Detection/fast_rcnn_R_50_FPN_1x/137635226/model_final_e5f7ce.pkl" DATASETS: TEST: ("coco_2017_val_100",) TEST: EXPECTED_RESULTS: [["bbox", "AP", 45.70, 0.02]] ================================================ FILE: configs/quick_schedules/fast_rcnn_R_50_FPN_instant_test.yaml ================================================ _BASE_: "../COCO-Detection/fast_rcnn_R_50_FPN_1x.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" DATASETS: TRAIN: ("coco_2017_val_100",) PROPOSAL_FILES_TRAIN: ("detectron2://COCO-Detection/rpn_R_50_FPN_1x/137258492/coco_2017_val_box_proposals_ee0dad.pkl", ) TEST: ("coco_2017_val_100",) PROPOSAL_FILES_TEST: ("detectron2://COCO-Detection/rpn_R_50_FPN_1x/137258492/coco_2017_val_box_proposals_ee0dad.pkl", ) SOLVER: BASE_LR: 0.005 STEPS: (30,) MAX_ITER: 40 IMS_PER_BATCH: 4 DATALOADER: NUM_WORKERS: 2 ================================================ FILE: configs/quick_schedules/keypoint_rcnn_R_50_FPN_inference_acc_test.yaml ================================================ _BASE_: "../COCO-Keypoints/keypoint_rcnn_R_50_FPN_3x.yaml" MODEL: WEIGHTS: "detectron2://COCO-Keypoints/keypoint_rcnn_R_50_FPN_3x/137849621/model_final_a6e10b.pkl" DATASETS: TEST: ("keypoints_coco_2017_val_100",) TEST: EXPECTED_RESULTS: [["bbox", "AP", 52.47, 0.02], ["keypoints", "AP", 67.36, 0.02]] ================================================ FILE: configs/quick_schedules/keypoint_rcnn_R_50_FPN_instant_test.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" KEYPOINT_ON: True DATASETS: TRAIN: ("keypoints_coco_2017_val_100",) TEST: ("keypoints_coco_2017_val_100",) SOLVER: BASE_LR: 0.005 STEPS: (30,) MAX_ITER: 40 IMS_PER_BATCH: 4 DATALOADER: NUM_WORKERS: 2 ================================================ FILE: configs/quick_schedules/keypoint_rcnn_R_50_FPN_normalized_training_acc_test.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" KEYPOINT_ON: True RESNETS: DEPTH: 50 ROI_HEADS: BATCH_SIZE_PER_IMAGE: 256 NUM_CLASSES: 1 ROI_KEYPOINT_HEAD: POOLER_RESOLUTION: 14 POOLER_SAMPLING_RATIO: 2 NORMALIZE_LOSS_BY_VISIBLE_KEYPOINTS: False LOSS_WEIGHT: 4.0 ROI_BOX_HEAD: SMOOTH_L1_BETA: 1.0 # Keypoint AP degrades when using plain L1 loss RPN: SMOOTH_L1_BETA: 0.2 # Keypoint AP degrades when using plain L1 loss DATASETS: TRAIN: ("keypoints_coco_2017_val",) TEST: ("keypoints_coco_2017_val",) INPUT: MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) SOLVER: WARMUP_FACTOR: 0.33333333 WARMUP_ITERS: 100 STEPS: (5500, 5800) MAX_ITER: 6000 TEST: EXPECTED_RESULTS: [["bbox", "AP", 55.35, 1.0], ["keypoints", "AP", 76.91, 1.0]] ================================================ FILE: configs/quick_schedules/keypoint_rcnn_R_50_FPN_training_acc_test.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" KEYPOINT_ON: True RESNETS: DEPTH: 50 ROI_HEADS: BATCH_SIZE_PER_IMAGE: 256 NUM_CLASSES: 1 ROI_KEYPOINT_HEAD: POOLER_RESOLUTION: 14 POOLER_SAMPLING_RATIO: 2 ROI_BOX_HEAD: SMOOTH_L1_BETA: 1.0 # Keypoint AP degrades when using plain L1 loss RPN: SMOOTH_L1_BETA: 0.2 # Keypoint AP degrades when using plain L1 loss DATASETS: TRAIN: ("keypoints_coco_2017_val",) TEST: ("keypoints_coco_2017_val",) INPUT: MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) SOLVER: WARMUP_FACTOR: 0.33333333 WARMUP_ITERS: 100 STEPS: (5500, 5800) MAX_ITER: 6000 TEST: EXPECTED_RESULTS: [["bbox", "AP", 53.5, 1.0], ["keypoints", "AP", 72.4, 1.0]] ================================================ FILE: configs/quick_schedules/mask_rcnn_R_50_C4_inference_acc_test.yaml ================================================ _BASE_: "../COCO-InstanceSegmentation/mask_rcnn_R_50_C4_3x.yaml" MODEL: WEIGHTS: "detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_C4_3x/137849525/model_final_4ce675.pkl" DATASETS: TEST: ("coco_2017_val_100",) TEST: EXPECTED_RESULTS: [["bbox", "AP", 47.37, 0.02], ["segm", "AP", 40.99, 0.02]] ================================================ FILE: configs/quick_schedules/mask_rcnn_R_50_C4_instant_test.yaml ================================================ _BASE_: "../Base-RCNN-C4.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: True DATASETS: TRAIN: ("coco_2017_val_100",) TEST: ("coco_2017_val_100",) SOLVER: BASE_LR: 0.001 STEPS: (30,) MAX_ITER: 40 IMS_PER_BATCH: 4 DATALOADER: NUM_WORKERS: 2 ================================================ FILE: configs/quick_schedules/mask_rcnn_R_50_C4_training_acc_test.yaml ================================================ _BASE_: "../Base-RCNN-C4.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" ROI_HEADS: BATCH_SIZE_PER_IMAGE: 256 MASK_ON: True DATASETS: TRAIN: ("coco_2017_val",) TEST: ("coco_2017_val",) INPUT: MIN_SIZE_TRAIN: (600,) MAX_SIZE_TRAIN: 1000 MIN_SIZE_TEST: 800 MAX_SIZE_TEST: 1000 SOLVER: IMS_PER_BATCH: 8 # base uses 16 WARMUP_FACTOR: 0.33333 WARMUP_ITERS: 100 STEPS: (11000, 11600) MAX_ITER: 12000 TEST: EXPECTED_RESULTS: [["bbox", "AP", 41.88, 0.7], ["segm", "AP", 33.79, 0.5]] ================================================ FILE: configs/quick_schedules/mask_rcnn_R_50_DC5_inference_acc_test.yaml ================================================ _BASE_: "../COCO-InstanceSegmentation/mask_rcnn_R_50_DC5_3x.yaml" MODEL: WEIGHTS: "detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_DC5_3x/137849551/model_final_84107b.pkl" DATASETS: TEST: ("coco_2017_val_100",) TEST: EXPECTED_RESULTS: [["bbox", "AP", 47.44, 0.02], ["segm", "AP", 42.94, 0.02]] ================================================ FILE: configs/quick_schedules/mask_rcnn_R_50_FPN_inference_acc_test.yaml ================================================ _BASE_: "../COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml" MODEL: WEIGHTS: "detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl" DATASETS: TEST: ("coco_2017_val_100",) TEST: EXPECTED_RESULTS: [["bbox", "AP", 47.34, 0.02], ["segm", "AP", 42.67, 0.02]] # expected results do not use test-time augmentation. TTA results are not verified. AUG: ENABLED: True MIN_SIZES: (400, 500) # to save some time ================================================ FILE: configs/quick_schedules/mask_rcnn_R_50_FPN_instant_test.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: True DATASETS: TRAIN: ("coco_2017_val_100",) TEST: ("coco_2017_val_100",) SOLVER: BASE_LR: 0.005 STEPS: (30,) MAX_ITER: 40 IMS_PER_BATCH: 4 DATALOADER: NUM_WORKERS: 2 ================================================ FILE: configs/quick_schedules/mask_rcnn_R_50_FPN_training_acc_test.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" ROI_HEADS: BATCH_SIZE_PER_IMAGE: 256 MASK_ON: True DATASETS: TRAIN: ("coco_2017_val",) TEST: ("coco_2017_val",) INPUT: MIN_SIZE_TRAIN: (600,) MAX_SIZE_TRAIN: 1000 MIN_SIZE_TEST: 800 MAX_SIZE_TEST: 1000 SOLVER: WARMUP_FACTOR: 0.3333333 WARMUP_ITERS: 100 STEPS: (5500, 5800) MAX_ITER: 6000 TEST: EXPECTED_RESULTS: [["bbox", "AP", 42.0, 1.6], ["segm", "AP", 35.4, 1.25]] ================================================ FILE: configs/quick_schedules/panoptic_fpn_R_50_inference_acc_test.yaml ================================================ _BASE_: "../COCO-PanopticSegmentation/panoptic_fpn_R_50_3x.yaml" MODEL: WEIGHTS: "detectron2://COCO-PanopticSegmentation/panoptic_fpn_R_50_3x/139514569/model_final_c10459.pkl" DATASETS: TEST: ("coco_2017_val_100_panoptic_separated",) TEST: EXPECTED_RESULTS: [["bbox", "AP", 46.47, 0.02], ["segm", "AP", 43.39, 0.02], ["sem_seg", "mIoU", 42.55, 0.02], ["panoptic_seg", "PQ", 38.99, 0.02]] ================================================ FILE: configs/quick_schedules/panoptic_fpn_R_50_instant_test.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: META_ARCHITECTURE: "PanopticFPN" WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: True RESNETS: DEPTH: 50 SEM_SEG_HEAD: LOSS_WEIGHT: 0.5 DATASETS: TRAIN: ("coco_2017_val_100_panoptic_separated",) TEST: ("coco_2017_val_100_panoptic_separated",) SOLVER: BASE_LR: 0.005 STEPS: (30,) MAX_ITER: 40 IMS_PER_BATCH: 4 DATALOADER: NUM_WORKERS: 1 ================================================ FILE: configs/quick_schedules/panoptic_fpn_R_50_training_acc_test.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: META_ARCHITECTURE: "PanopticFPN" WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" MASK_ON: True RESNETS: DEPTH: 50 SEM_SEG_HEAD: LOSS_WEIGHT: 0.5 DATASETS: TRAIN: ("coco_2017_val_panoptic_separated",) TEST: ("coco_2017_val_panoptic_separated",) SOLVER: BASE_LR: 0.01 WARMUP_FACTOR: 0.001 WARMUP_ITERS: 500 STEPS: (5500,) MAX_ITER: 7000 TEST: EXPECTED_RESULTS: [["bbox", "AP", 46.80, 1.1], ["segm", "AP", 38.93, 0.7], ["sem_seg", "mIoU", 64.53, 1.0], ["panoptic_seg", "PQ", 48.23, 0.8]] ================================================ FILE: configs/quick_schedules/retinanet_R_50_FPN_inference_acc_test.yaml ================================================ _BASE_: "../COCO-Detection/retinanet_R_50_FPN_3x.yaml" MODEL: WEIGHTS: "detectron2://COCO-Detection/retinanet_R_50_FPN_3x/137849486/model_final_4cafe0.pkl" DATASETS: TEST: ("coco_2017_val_100",) TEST: EXPECTED_RESULTS: [["bbox", "AP", 44.36, 0.02]] ================================================ FILE: configs/quick_schedules/retinanet_R_50_FPN_instant_test.yaml ================================================ _BASE_: "../COCO-Detection/retinanet_R_50_FPN_1x.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" DATASETS: TRAIN: ("coco_2017_val_100",) TEST: ("coco_2017_val_100",) SOLVER: BASE_LR: 0.005 STEPS: (30,) MAX_ITER: 40 IMS_PER_BATCH: 4 DATALOADER: NUM_WORKERS: 2 ================================================ FILE: configs/quick_schedules/rpn_R_50_FPN_inference_acc_test.yaml ================================================ _BASE_: "../COCO-Detection/rpn_R_50_FPN_1x.yaml" MODEL: WEIGHTS: "detectron2://COCO-Detection/rpn_R_50_FPN_1x/137258492/model_final_02ce48.pkl" DATASETS: TEST: ("coco_2017_val_100",) TEST: EXPECTED_RESULTS: [["box_proposals", "AR@1000", 58.16, 0.02]] ================================================ FILE: configs/quick_schedules/rpn_R_50_FPN_instant_test.yaml ================================================ _BASE_: "../COCO-Detection/rpn_R_50_FPN_1x.yaml" MODEL: WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" DATASETS: TRAIN: ("coco_2017_val_100",) TEST: ("coco_2017_val_100",) SOLVER: STEPS: (30,) MAX_ITER: 40 BASE_LR: 0.005 IMS_PER_BATCH: 4 DATALOADER: NUM_WORKERS: 2 ================================================ FILE: configs/quick_schedules/semantic_R_50_FPN_inference_acc_test.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: META_ARCHITECTURE: "SemanticSegmentor" WEIGHTS: "detectron2://semantic_R_50_FPN_1x/111802073/model_final_c18079783c55a94968edc28b7101c5f0.pkl" RESNETS: DEPTH: 50 DATASETS: TEST: ("coco_2017_val_100_panoptic_stuffonly",) TEST: EXPECTED_RESULTS: [["sem_seg", "mIoU", 39.53, 0.02], ["sem_seg", "mACC", 51.50, 0.02]] ================================================ FILE: configs/quick_schedules/semantic_R_50_FPN_instant_test.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: META_ARCHITECTURE: "SemanticSegmentor" WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" RESNETS: DEPTH: 50 DATASETS: TRAIN: ("coco_2017_val_100_panoptic_stuffonly",) TEST: ("coco_2017_val_100_panoptic_stuffonly",) INPUT: MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) SOLVER: BASE_LR: 0.005 STEPS: (30,) MAX_ITER: 40 IMS_PER_BATCH: 4 DATALOADER: NUM_WORKERS: 2 ================================================ FILE: configs/quick_schedules/semantic_R_50_FPN_training_acc_test.yaml ================================================ _BASE_: "../Base-RCNN-FPN.yaml" MODEL: META_ARCHITECTURE: "SemanticSegmentor" WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" RESNETS: DEPTH: 50 DATASETS: TRAIN: ("coco_2017_val_panoptic_stuffonly",) TEST: ("coco_2017_val_panoptic_stuffonly",) SOLVER: BASE_LR: 0.01 WARMUP_FACTOR: 0.001 WARMUP_ITERS: 300 STEPS: (5500,) MAX_ITER: 7000 TEST: EXPECTED_RESULTS: [["sem_seg", "mIoU", 76.51, 1.0], ["sem_seg", "mACC", 83.25, 1.0]] INPUT: # no scale augmentation MIN_SIZE_TRAIN: (800, ) ================================================ FILE: datasets/README.md ================================================ For a few datasets that detectron2 natively supports, the datasets are assumed to exist in a directory called "datasets/", under the directory where you launch the program. They need to have the following directory structure: ## Expected dataset structure for COCO instance/keypoint detection: ``` coco/ annotations/ instances_{train,val}2017.json person_keypoints_{train,val}2017.json {train,val}2017/ # image files that are mentioned in the corresponding json ``` You can use the 2014 version of the dataset as well. Some of the builtin tests (`dev/run_*_tests.sh`) uses a tiny version of the COCO dataset, which you can download with `./prepare_for_tests.sh`. ## Expected dataset structure for PanopticFPN: ``` coco/ annotations/ panoptic_{train,val}2017.json panoptic_{train,val}2017/ # png annotations panoptic_stuff_{train,val}2017/ # generated by the script mentioned below ``` Install panopticapi by: ``` pip install git+https://github.com/cocodataset/panopticapi.git ``` Then, run `python prepare_panoptic_fpn.py`, to extract semantic annotations from panoptic annotations. ## Expected dataset structure for LVIS instance segmentation: ``` coco/ {train,val,test}2017/ lvis/ lvis_v0.5_{train,val}.json lvis_v0.5_image_info_test.json ``` Install lvis-api by: ``` pip install git+https://github.com/lvis-dataset/lvis-api.git ``` ## Expected dataset structure for cityscapes: ``` cityscapes/ gtFine/ train/ aachen/ color.png, instanceIds.png, labelIds.png, polygons.json, labelTrainIds.png ... val/ test/ leftImg8bit/ train/ val/ test/ ``` Install cityscapes scripts by: ``` pip install git+https://github.com/mcordts/cityscapesScripts.git ``` Note: labelTrainIds.png are created by `cityscapesscripts/preparation/createTrainIdLabelImgs.py`. They are not needed for instance segmentation. ## Expected dataset structure for Pascal VOC: ``` VOC20{07,12}/ Annotations/ ImageSets/ Main/ trainval.txt test.txt # train.txt or val.txt, if you use these splits JPEGImages/ ``` ================================================ FILE: datasets/prepare_for_tests.sh ================================================ #!/bin/bash -e # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # Download some files needed for running tests. cd "${0%/*}" BASE=https://dl.fbaipublicfiles.com/detectron2 mkdir -p coco/annotations for anno in instances_val2017_100 \ person_keypoints_val2017_100 \ instances_minival2014_100 \ person_keypoints_minival2014_100; do dest=coco/annotations/$anno.json [[ -s $dest ]] && { echo "$dest exists. Skipping ..." } || { wget $BASE/annotations/coco/$anno.json -O $dest } done ================================================ FILE: datasets/prepare_panoptic_fpn.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import time import functools import json import multiprocessing as mp import numpy as np import os from PIL import Image from detectron2.data.datasets.builtin_meta import COCO_CATEGORIES from fvcore.common.download import download from panopticapi.utils import rgb2id def _process_panoptic_to_semantic(input_panoptic, output_semantic, segments, id_map): panoptic = np.asarray(Image.open(input_panoptic), dtype=np.uint32) panoptic = rgb2id(panoptic) output = np.zeros_like(panoptic, dtype=np.uint8) + 255 for seg in segments: cat_id = seg["category_id"] new_cat_id = id_map[cat_id] output[panoptic == seg["id"]] = new_cat_id Image.fromarray(output).save(output_semantic) def separate_coco_semantic_from_panoptic(panoptic_json, panoptic_root, sem_seg_root, categories): """ Create semantic segmentation annotations from panoptic segmentation annotations, to be used by PanopticFPN. It maps all thing categories to class 0, and maps all unlabeled pixels to class 255. It maps all stuff categories to contiguous ids starting from 1. Args: panoptic_json (str): path to the panoptic json file, in COCO's format. panoptic_root (str): a directory with panoptic annotation files, in COCO's format. sem_seg_root (str): a directory to output semantic annotation files categories (list[dict]): category metadata. Each dict needs to have: "id": corresponds to the "category_id" in the json annotations "isthing": 0 or 1 """ os.makedirs(sem_seg_root, exist_ok=True) stuff_ids = [k["id"] for k in categories if k["isthing"] == 0] thing_ids = [k["id"] for k in categories if k["isthing"] == 1] id_map = {} # map from category id to id in the output semantic annotation assert len(stuff_ids) <= 254 for i, stuff_id in enumerate(stuff_ids): id_map[stuff_id] = i + 1 for thing_id in thing_ids: id_map[thing_id] = 0 id_map[0] = 255 with open(panoptic_json) as f: obj = json.load(f) pool = mp.Pool(processes=max(mp.cpu_count() // 2, 4)) def iter_annotations(): for anno in obj["annotations"]: file_name = anno["file_name"] segments = anno["segments_info"] input = os.path.join(panoptic_root, file_name) output = os.path.join(sem_seg_root, file_name) yield input, output, segments print("Start writing to {} ...".format(sem_seg_root)) start = time.time() pool.starmap( functools.partial(_process_panoptic_to_semantic, id_map=id_map), iter_annotations(), chunksize=100, ) print("Finished. time: {:.2f}s".format(time.time() - start)) if __name__ == "__main__": dataset_dir = os.path.join(os.path.dirname(__file__), "coco") for s in ["val2017", "train2017"]: separate_coco_semantic_from_panoptic( os.path.join(dataset_dir, "annotations/panoptic_{}.json".format(s)), os.path.join(dataset_dir, "panoptic_{}".format(s)), os.path.join(dataset_dir, "panoptic_stuff_{}".format(s)), COCO_CATEGORIES, ) # Prepare val2017_100 for quick testing: dest_dir = os.path.join(dataset_dir, "annotations/") URL_PREFIX = "https://dl.fbaipublicfiles.com/detectron2/" download(URL_PREFIX + "annotations/coco/panoptic_val2017_100.json", dest_dir) with open(os.path.join(dest_dir, "panoptic_val2017_100.json")) as f: obj = json.load(f) def link_val100(dir_full, dir_100): print("Creating " + dir_100 + " ...") os.makedirs(dir_100, exist_ok=True) for img in obj["images"]: basename = os.path.splitext(img["file_name"])[0] src = os.path.join(dir_full, basename + ".png") dst = os.path.join(dir_100, basename + ".png") src = os.path.relpath(src, start=dir_100) os.symlink(src, dst) link_val100( os.path.join(dataset_dir, "panoptic_val2017"), os.path.join(dataset_dir, "panoptic_val2017_100"), ) link_val100( os.path.join(dataset_dir, "panoptic_stuff_val2017"), os.path.join(dataset_dir, "panoptic_stuff_val2017_100"), ) ================================================ FILE: demo/README.md ================================================ ## Detectron2 Demo We provide a command line tool to run a simple demo of builtin models. The usage is explained in [GETTING_STARTED.md](../GETTING_STARTED.md). See our [blog post](https://ai.facebook.com/blog/-detectron2-a-pytorch-based-modular-object-detection-library-) for a high-quality demo generated with this tool. ================================================ FILE: demo/demo.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import argparse import glob import multiprocessing as mp import os import time import cv2 import tqdm from detectron2.config import get_cfg from detectron2.data.detection_utils import read_image from detectron2.utils.logger import setup_logger from predictor import VisualizationDemo # constants WINDOW_NAME = "COCO detections" def setup_cfg(args): # load config from file and command-line arguments cfg = get_cfg() cfg.merge_from_file(args.config_file) cfg.merge_from_list(args.opts) # Set score_threshold for builtin models cfg.MODEL.RETINANET.SCORE_THRESH_TEST = args.confidence_threshold cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = args.confidence_threshold cfg.MODEL.PANOPTIC_FPN.COMBINE.INSTANCES_CONFIDENCE_THRESH = args.confidence_threshold cfg.freeze() return cfg def get_parser(): parser = argparse.ArgumentParser(description="Detectron2 demo for builtin models") parser.add_argument( "--config-file", default="configs/quick_schedules/mask_rcnn_R_50_FPN_inference_acc_test.yaml", metavar="FILE", help="path to config file", ) parser.add_argument("--webcam", action="store_true", help="Take inputs from webcam.") parser.add_argument("--video-input", help="Path to video file.") parser.add_argument("--input", nargs="+", help="A list of space separated input images") parser.add_argument( "--output", help="A file or directory to save output visualizations. " "If not given, will show output in an OpenCV window.", ) parser.add_argument( "--confidence-threshold", type=float, default=0.5, help="Minimum score for instance predictions to be shown", ) parser.add_argument( "--opts", help="Modify config options using the command-line 'KEY VALUE' pairs", default=[], nargs=argparse.REMAINDER, ) return parser if __name__ == "__main__": mp.set_start_method("spawn", force=True) args = get_parser().parse_args() setup_logger(name="fvcore") logger = setup_logger() logger.info("Arguments: " + str(args)) cfg = setup_cfg(args) demo = VisualizationDemo(cfg) if args.input: if len(args.input) == 1: args.input = glob.glob(os.path.expanduser(args.input[0])) assert args.input, "The input path(s) was not found" for path in tqdm.tqdm(args.input, disable=not args.output): # use PIL, to be consistent with evaluation img = read_image(path, format="BGR") start_time = time.time() predictions, visualized_output = demo.run_on_image(img) logger.info( "{}: detected {} instances in {:.2f}s".format( path, len(predictions["instances"]), time.time() - start_time ) ) if args.output: if os.path.isdir(args.output): assert os.path.isdir(args.output), args.output out_filename = os.path.join(args.output, os.path.basename(path)) else: assert len(args.input) == 1, "Please specify a directory with args.output" out_filename = args.output visualized_output.save(out_filename) else: cv2.namedWindow(WINDOW_NAME, cv2.WINDOW_NORMAL) cv2.imshow(WINDOW_NAME, visualized_output.get_image()[:, :, ::-1]) if cv2.waitKey(0) == 27: break # esc to quit elif args.webcam: assert args.input is None, "Cannot have both --input and --webcam!" cam = cv2.VideoCapture(0) for vis in tqdm.tqdm(demo.run_on_video(cam)): cv2.namedWindow(WINDOW_NAME, cv2.WINDOW_NORMAL) cv2.imshow(WINDOW_NAME, vis) if cv2.waitKey(1) == 27: break # esc to quit cv2.destroyAllWindows() elif args.video_input: video = cv2.VideoCapture(args.video_input) width = int(video.get(cv2.CAP_PROP_FRAME_WIDTH)) height = int(video.get(cv2.CAP_PROP_FRAME_HEIGHT)) frames_per_second = video.get(cv2.CAP_PROP_FPS) num_frames = int(video.get(cv2.CAP_PROP_FRAME_COUNT)) basename = os.path.basename(args.video_input) if args.output: if os.path.isdir(args.output): output_fname = os.path.join(args.output, basename) output_fname = os.path.splitext(output_fname)[0] + ".mkv" else: output_fname = args.output assert not os.path.isfile(output_fname), output_fname output_file = cv2.VideoWriter( filename=output_fname, # some installation of opencv may not support x264 (due to its license), # you can try other format (e.g. MPEG) fourcc=cv2.VideoWriter_fourcc(*"x264"), fps=float(frames_per_second), frameSize=(width, height), isColor=True, ) assert os.path.isfile(args.video_input) for vis_frame in tqdm.tqdm(demo.run_on_video(video), total=num_frames): if args.output: output_file.write(vis_frame) else: cv2.namedWindow(basename, cv2.WINDOW_NORMAL) cv2.imshow(basename, vis_frame) if cv2.waitKey(1) == 27: break # esc to quit video.release() if args.output: output_file.release() else: cv2.destroyAllWindows() ================================================ FILE: demo/predictor.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import atexit import bisect import multiprocessing as mp from collections import deque import cv2 import torch from detectron2.data import MetadataCatalog from detectron2.engine.defaults import DefaultPredictor from detectron2.utils.video_visualizer import VideoVisualizer from detectron2.utils.visualizer import ColorMode, Visualizer class VisualizationDemo(object): def __init__(self, cfg, instance_mode=ColorMode.IMAGE, parallel=False): """ Args: cfg (CfgNode): instance_mode (ColorMode): parallel (bool): whether to run the model in different processes from visualization. Useful since the visualization logic can be slow. """ self.metadata = MetadataCatalog.get( cfg.DATASETS.TEST[0] if len(cfg.DATASETS.TEST) else "__unused" ) self.cpu_device = torch.device("cpu") self.instance_mode = instance_mode self.parallel = parallel if parallel: num_gpu = torch.cuda.device_count() self.predictor = AsyncPredictor(cfg, num_gpus=num_gpu) else: self.predictor = DefaultPredictor(cfg) def run_on_image(self, image): """ Args: image (np.ndarray): an image of shape (H, W, C) (in BGR order). This is the format used by OpenCV. Returns: predictions (dict): the output of the model. vis_output (VisImage): the visualized image output. """ vis_output = None predictions = self.predictor(image) # Convert image from OpenCV BGR format to Matplotlib RGB format. image = image[:, :, ::-1] visualizer = Visualizer(image, self.metadata, instance_mode=self.instance_mode) if "panoptic_seg" in predictions: panoptic_seg, segments_info = predictions["panoptic_seg"] vis_output = visualizer.draw_panoptic_seg_predictions( panoptic_seg.to(self.cpu_device), segments_info ) else: if "sem_seg" in predictions: vis_output = visualizer.draw_sem_seg( predictions["sem_seg"].argmax(dim=0).to(self.cpu_device) ) if "instances" in predictions: instances = predictions["instances"].to(self.cpu_device) vis_output = visualizer.draw_instance_predictions(predictions=instances) return predictions, vis_output def _frame_from_video(self, video): while video.isOpened(): success, frame = video.read() if success: yield frame else: break def run_on_video(self, video): """ Visualizes predictions on frames of the input video. Args: video (cv2.VideoCapture): a :class:`VideoCapture` object, whose source can be either a webcam or a video file. Yields: ndarray: BGR visualizations of each video frame. """ video_visualizer = VideoVisualizer(self.metadata, self.instance_mode) def process_predictions(frame, predictions): frame = cv2.cvtColor(frame, cv2.COLOR_RGB2BGR) if "panoptic_seg" in predictions: panoptic_seg, segments_info = predictions["panoptic_seg"] vis_frame = video_visualizer.draw_panoptic_seg_predictions( frame, panoptic_seg.to(self.cpu_device), segments_info ) elif "instances" in predictions: predictions = predictions["instances"].to(self.cpu_device) vis_frame = video_visualizer.draw_instance_predictions(frame, predictions) elif "sem_seg" in predictions: vis_frame = video_visualizer.draw_sem_seg( frame, predictions["sem_seg"].argmax(dim=0).to(self.cpu_device) ) # Converts Matplotlib RGB format to OpenCV BGR format vis_frame = cv2.cvtColor(vis_frame.get_image(), cv2.COLOR_RGB2BGR) return vis_frame frame_gen = self._frame_from_video(video) if self.parallel: buffer_size = self.predictor.default_buffer_size frame_data = deque() for cnt, frame in enumerate(frame_gen): frame_data.append(frame) self.predictor.put(frame) if cnt >= buffer_size: frame = frame_data.popleft() predictions = self.predictor.get() yield process_predictions(frame, predictions) while len(frame_data): frame = frame_data.popleft() predictions = self.predictor.get() yield process_predictions(frame, predictions) else: for frame in frame_gen: yield process_predictions(frame, self.predictor(frame)) class AsyncPredictor: """ A predictor that runs the model asynchronously, possibly on >1 GPUs. Because rendering the visualization takes considerably amount of time, this helps improve throughput when rendering videos. """ class _StopToken: pass class _PredictWorker(mp.Process): def __init__(self, cfg, task_queue, result_queue): self.cfg = cfg self.task_queue = task_queue self.result_queue = result_queue super().__init__() def run(self): predictor = DefaultPredictor(self.cfg) while True: task = self.task_queue.get() if isinstance(task, AsyncPredictor._StopToken): break idx, data = task result = predictor(data) self.result_queue.put((idx, result)) def __init__(self, cfg, num_gpus: int = 1): """ Args: cfg (CfgNode): num_gpus (int): if 0, will run on CPU """ num_workers = max(num_gpus, 1) self.task_queue = mp.Queue(maxsize=num_workers * 3) self.result_queue = mp.Queue(maxsize=num_workers * 3) self.procs = [] for gpuid in range(max(num_gpus, 1)): cfg = cfg.clone() cfg.defrost() cfg.MODEL.DEVICE = "cuda:{}".format(gpuid) if num_gpus > 0 else "cpu" self.procs.append( AsyncPredictor._PredictWorker(cfg, self.task_queue, self.result_queue) ) self.put_idx = 0 self.get_idx = 0 self.result_rank = [] self.result_data = [] for p in self.procs: p.start() atexit.register(self.shutdown) def put(self, image): self.put_idx += 1 self.task_queue.put((self.put_idx, image)) def get(self): self.get_idx += 1 # the index needed for this request if len(self.result_rank) and self.result_rank[0] == self.get_idx: res = self.result_data[0] del self.result_data[0], self.result_rank[0] return res while True: # make sure the results are returned in the correct order idx, res = self.result_queue.get() if idx == self.get_idx: return res insert = bisect.bisect(self.result_rank, idx) self.result_rank.insert(insert, idx) self.result_data.insert(insert, res) def __len__(self): return self.put_idx - self.get_idx def __call__(self, image): self.put(image) return self.get() def shutdown(self): for _ in self.procs: self.task_queue.put(AsyncPredictor._StopToken()) @property def default_buffer_size(self): return len(self.procs) * 5 ================================================ FILE: detectron2/__init__.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. from .utils.env import setup_environment setup_environment() __version__ = "0.1" ================================================ FILE: detectron2/checkpoint/__init__.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # File: from . import model_zoo as _UNUSED # register the handler from .detection_checkpoint import DetectionCheckpointer from fvcore.common.checkpoint import Checkpointer, PeriodicCheckpointer __all__ = ["Checkpointer", "PeriodicCheckpointer", "DetectionCheckpointer"] ================================================ FILE: detectron2/checkpoint/c2_model_loading.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy import logging import re import torch from fvcore.common.checkpoint import ( get_missing_parameters_message, get_unexpected_parameters_message, ) def convert_basic_c2_names(original_keys): """ Apply some basic name conversion to names in C2 weights. It only deals with typical backbone models. Args: original_keys (list[str]): Returns: list[str]: The same number of strings matching those in original_keys. """ layer_keys = copy.deepcopy(original_keys) layer_keys = [ {"pred_b": "linear_b", "pred_w": "linear_w"}.get(k, k) for k in layer_keys ] # some hard-coded mappings layer_keys = [k.replace("_", ".") for k in layer_keys] layer_keys = [re.sub("\\.b$", ".bias", k) for k in layer_keys] layer_keys = [re.sub("\\.w$", ".weight", k) for k in layer_keys] # Uniform both bn and gn names to "norm" layer_keys = [re.sub("bn\\.s$", "norm.weight", k) for k in layer_keys] layer_keys = [re.sub("bn\\.bias$", "norm.bias", k) for k in layer_keys] layer_keys = [re.sub("bn\\.rm", "norm.running_mean", k) for k in layer_keys] layer_keys = [re.sub("bn\\.running.mean$", "norm.running_mean", k) for k in layer_keys] layer_keys = [re.sub("bn\\.riv$", "norm.running_var", k) for k in layer_keys] layer_keys = [re.sub("bn\\.running.var$", "norm.running_var", k) for k in layer_keys] layer_keys = [re.sub("bn\\.gamma$", "norm.weight", k) for k in layer_keys] layer_keys = [re.sub("bn\\.beta$", "norm.bias", k) for k in layer_keys] layer_keys = [re.sub("gn\\.s$", "norm.weight", k) for k in layer_keys] layer_keys = [re.sub("gn\\.bias$", "norm.bias", k) for k in layer_keys] # stem layer_keys = [re.sub("^res\\.conv1\\.norm\\.", "conv1.norm.", k) for k in layer_keys] # to avoid mis-matching with "conv1" in other components (e.g. detection head) layer_keys = [re.sub("^conv1\\.", "stem.conv1.", k) for k in layer_keys] # layer1-4 is used by torchvision, however we follow the C2 naming strategy (res2-5) # layer_keys = [re.sub("^res2.", "layer1.", k) for k in layer_keys] # layer_keys = [re.sub("^res3.", "layer2.", k) for k in layer_keys] # layer_keys = [re.sub("^res4.", "layer3.", k) for k in layer_keys] # layer_keys = [re.sub("^res5.", "layer4.", k) for k in layer_keys] # blocks layer_keys = [k.replace(".branch1.", ".shortcut.") for k in layer_keys] layer_keys = [k.replace(".branch2a.", ".conv1.") for k in layer_keys] layer_keys = [k.replace(".branch2b.", ".conv2.") for k in layer_keys] layer_keys = [k.replace(".branch2c.", ".conv3.") for k in layer_keys] # DensePose substitutions layer_keys = [re.sub("^body.conv.fcn", "body_conv_fcn", k) for k in layer_keys] layer_keys = [k.replace("AnnIndex.lowres", "ann_index_lowres") for k in layer_keys] layer_keys = [k.replace("Index.UV.lowres", "index_uv_lowres") for k in layer_keys] layer_keys = [k.replace("U.lowres", "u_lowres") for k in layer_keys] layer_keys = [k.replace("V.lowres", "v_lowres") for k in layer_keys] return layer_keys def convert_c2_detectron_names(weights): """ Map Caffe2 Detectron weight names to Detectron2 names. Args: weights (dict): name -> tensor Returns: dict: detectron2 names -> tensor dict: detectron2 names -> C2 names """ logger = logging.getLogger(__name__) logger.info("Remapping C2 weights ......") original_keys = sorted(weights.keys()) layer_keys = copy.deepcopy(original_keys) layer_keys = convert_basic_c2_names(layer_keys) # -------------------------------------------------------------------------- # RPN hidden representation conv # -------------------------------------------------------------------------- # FPN case # In the C2 model, the RPN hidden layer conv is defined for FPN level 2 and then # shared for all other levels, hence the appearance of "fpn2" layer_keys = [ k.replace("conv.rpn.fpn2", "proposal_generator.rpn_head.conv") for k in layer_keys ] # Non-FPN case layer_keys = [k.replace("conv.rpn", "proposal_generator.rpn_head.conv") for k in layer_keys] # -------------------------------------------------------------------------- # RPN box transformation conv # -------------------------------------------------------------------------- # FPN case (see note above about "fpn2") layer_keys = [ k.replace("rpn.bbox.pred.fpn2", "proposal_generator.rpn_head.anchor_deltas") for k in layer_keys ] layer_keys = [ k.replace("rpn.cls.logits.fpn2", "proposal_generator.rpn_head.objectness_logits") for k in layer_keys ] # Non-FPN case layer_keys = [ k.replace("rpn.bbox.pred", "proposal_generator.rpn_head.anchor_deltas") for k in layer_keys ] layer_keys = [ k.replace("rpn.cls.logits", "proposal_generator.rpn_head.objectness_logits") for k in layer_keys ] # -------------------------------------------------------------------------- # Fast R-CNN box head # -------------------------------------------------------------------------- layer_keys = [re.sub("^bbox\\.pred", "bbox_pred", k) for k in layer_keys] layer_keys = [re.sub("^cls\\.score", "cls_score", k) for k in layer_keys] layer_keys = [re.sub("^fc6\\.", "box_head.fc1.", k) for k in layer_keys] layer_keys = [re.sub("^fc7\\.", "box_head.fc2.", k) for k in layer_keys] # 4conv1fc head tensor names: head_conv1_w, head_conv1_gn_s layer_keys = [re.sub("^head\\.conv", "box_head.conv", k) for k in layer_keys] # -------------------------------------------------------------------------- # FPN lateral and output convolutions # -------------------------------------------------------------------------- def fpn_map(name): """ Look for keys with the following patterns: 1) Starts with "fpn.inner." Example: "fpn.inner.res2.2.sum.lateral.weight" Meaning: These are lateral pathway convolutions 2) Starts with "fpn.res" Example: "fpn.res2.2.sum.weight" Meaning: These are FPN output convolutions """ splits = name.split(".") norm = ".norm" if "norm" in splits else "" if name.startswith("fpn.inner."): # splits example: ['fpn', 'inner', 'res2', '2', 'sum', 'lateral', 'weight'] stage = int(splits[2][len("res") :]) return "fpn_lateral{}{}.{}".format(stage, norm, splits[-1]) elif name.startswith("fpn.res"): # splits example: ['fpn', 'res2', '2', 'sum', 'weight'] stage = int(splits[1][len("res") :]) return "fpn_output{}{}.{}".format(stage, norm, splits[-1]) return name layer_keys = [fpn_map(k) for k in layer_keys] # -------------------------------------------------------------------------- # Mask R-CNN mask head # -------------------------------------------------------------------------- # roi_heads.StandardROIHeads case layer_keys = [k.replace(".[mask].fcn", "mask_head.mask_fcn") for k in layer_keys] layer_keys = [re.sub("^\\.mask\\.fcn", "mask_head.mask_fcn", k) for k in layer_keys] layer_keys = [k.replace("mask.fcn.logits", "mask_head.predictor") for k in layer_keys] # roi_heads.Res5ROIHeads case layer_keys = [k.replace("conv5.mask", "mask_head.deconv") for k in layer_keys] # -------------------------------------------------------------------------- # Keypoint R-CNN head # -------------------------------------------------------------------------- # interestingly, the keypoint head convs have blob names that are simply "conv_fcnX" layer_keys = [k.replace("conv.fcn", "roi_heads.keypoint_head.conv_fcn") for k in layer_keys] layer_keys = [ k.replace("kps.score.lowres", "roi_heads.keypoint_head.score_lowres") for k in layer_keys ] layer_keys = [k.replace("kps.score.", "roi_heads.keypoint_head.score.") for k in layer_keys] # -------------------------------------------------------------------------- # Done with replacements # -------------------------------------------------------------------------- assert len(set(layer_keys)) == len(layer_keys) assert len(original_keys) == len(layer_keys) new_weights = {} new_keys_to_original_keys = {} for orig, renamed in zip(original_keys, layer_keys): new_keys_to_original_keys[renamed] = orig if renamed.startswith("bbox_pred.") or renamed.startswith("mask_head.predictor."): # remove the meaningless prediction weight for background class new_start_idx = 4 if renamed.startswith("bbox_pred.") else 1 new_weights[renamed] = weights[orig][new_start_idx:] logger.info( "Remove prediction weight for background class in {}. The shape changes from " "{} to {}.".format( renamed, tuple(weights[orig].shape), tuple(new_weights[renamed].shape) ) ) elif renamed.startswith("cls_score."): # move weights of bg class from original index 0 to last index logger.info( "Move classification weights for background class in {} from index 0 to " "index {}.".format(renamed, weights[orig].shape[0] - 1) ) new_weights[renamed] = torch.cat([weights[orig][1:], weights[orig][:1]]) else: new_weights[renamed] = weights[orig] return new_weights, new_keys_to_original_keys # Note the current matching is not symmetric. # it assumes model_state_dict will have longer names. def align_and_update_state_dicts(model_state_dict, ckpt_state_dict, c2_conversion=True): """ Match names between the two state-dict, and update the values of model_state_dict in-place with copies of the matched tensor in ckpt_state_dict. If `c2_conversion==True`, `ckpt_state_dict` is assumed to be a Caffe2 model and will be renamed at first. Strategy: suppose that the models that we will create will have prefixes appended to each of its keys, for example due to an extra level of nesting that the original pre-trained weights from ImageNet won't contain. For example, model.state_dict() might return backbone[0].body.res2.conv1.weight, while the pre-trained model contains res2.conv1.weight. We thus want to match both parameters together. For that, we look for each model weight, look among all loaded keys if there is one that is a suffix of the current weight name, and use it if that's the case. If multiple matches exist, take the one with longest size of the corresponding name. For example, for the same model as before, the pretrained weight file can contain both res2.conv1.weight, as well as conv1.weight. In this case, we want to match backbone[0].body.conv1.weight to conv1.weight, and backbone[0].body.res2.conv1.weight to res2.conv1.weight. """ model_keys = sorted(list(model_state_dict.keys())) if c2_conversion: ckpt_state_dict, original_keys = convert_c2_detectron_names(ckpt_state_dict) # original_keys: the name in the original dict (before renaming) else: original_keys = {x: x for x in ckpt_state_dict.keys()} ckpt_keys = sorted(list(ckpt_state_dict.keys())) def match(a, b): # Matched ckpt_key should be a complete (starts with '.') suffix. # For example, roi_heads.mesh_head.whatever_conv1 does not match conv1, # but matches whatever_conv1 or mesh_head.whatever_conv1. return a == b or a.endswith("." + b) # get a matrix of string matches, where each (i, j) entry correspond to the size of the # ckpt_key string, if it matches match_matrix = [len(j) if match(i, j) else 0 for i in model_keys for j in ckpt_keys] match_matrix = torch.as_tensor(match_matrix).view(len(model_keys), len(ckpt_keys)) # use the matched one with longest size in case of multiple matches max_match_size, idxs = match_matrix.max(1) # remove indices that correspond to no-match idxs[max_match_size == 0] = -1 # used for logging max_len_model = max(len(key) for key in model_keys) if model_keys else 1 max_len_ckpt = max(len(key) for key in ckpt_keys) if ckpt_keys else 1 log_str_template = "{: <{}} loaded from {: <{}} of shape {}" logger = logging.getLogger(__name__) # matched_pairs (matched checkpoint key --> matched model key) matched_keys = {} for idx_model, idx_ckpt in enumerate(idxs.tolist()): if idx_ckpt == -1: continue key_model = model_keys[idx_model] key_ckpt = ckpt_keys[idx_ckpt] value_ckpt = ckpt_state_dict[key_ckpt] shape_in_model = model_state_dict[key_model].shape if shape_in_model != value_ckpt.shape: logger.warning( "Shape of {} in checkpoint is {}, while shape of {} in model is {}.".format( key_ckpt, value_ckpt.shape, key_model, shape_in_model ) ) logger.warning( "{} will not be loaded. Please double check and see if this is desired.".format( key_ckpt ) ) continue model_state_dict[key_model] = value_ckpt.clone() if key_ckpt in matched_keys: # already added to matched_keys logger.error( "Ambiguity found for {} in checkpoint!" "It matches at least two keys in the model ({} and {}).".format( key_ckpt, key_model, matched_keys[key_ckpt] ) ) raise ValueError("Cannot match one checkpoint key to multiple keys in the model.") matched_keys[key_ckpt] = key_model logger.info( log_str_template.format( key_model, max_len_model, original_keys[key_ckpt], max_len_ckpt, tuple(shape_in_model), ) ) matched_model_keys = matched_keys.values() matched_ckpt_keys = matched_keys.keys() # print warnings about unmatched keys on both side unmatched_model_keys = [k for k in model_keys if k not in matched_model_keys] if len(unmatched_model_keys): logger.info(get_missing_parameters_message(unmatched_model_keys)) unmatched_ckpt_keys = [k for k in ckpt_keys if k not in matched_ckpt_keys] if len(unmatched_ckpt_keys): logger.info( get_unexpected_parameters_message(original_keys[x] for x in unmatched_ckpt_keys) ) ================================================ FILE: detectron2/checkpoint/catalog.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging from fvcore.common.file_io import PathHandler, PathManager class ModelCatalog(object): """ Store mappings from names to third-party models. """ S3_C2_DETECTRON_PREFIX = "https://dl.fbaipublicfiles.com/detectron" # MSRA models have STRIDE_IN_1X1=True. False otherwise. # NOTE: all BN models here have fused BN into an affine layer. # As a result, you should only load them to a model with "FrozenBN". # Loading them to a model with regular BN or SyncBN is wrong. # Even when loaded to FrozenBN, it is still different from affine by an epsilon, # which should be negligible for training. # NOTE: all models here uses PIXEL_STD=[1,1,1] C2_IMAGENET_MODELS = { "MSRA/R-50": "ImageNetPretrained/MSRA/R-50.pkl", "MSRA/R-101": "ImageNetPretrained/MSRA/R-101.pkl", "FAIR/R-50-GN": "ImageNetPretrained/47261647/R-50-GN.pkl", "FAIR/R-101-GN": "ImageNetPretrained/47592356/R-101-GN.pkl", "FAIR/X-101-32x8d": "ImageNetPretrained/20171220/X-101-32x8d.pkl", "FAIR/X-101-64x4d": "ImageNetPretrained/FBResNeXt/X-101-64x4d.pkl", "FAIR/X-152-32x8d-IN5k": "ImageNetPretrained/25093814/X-152-32x8d-IN5k.pkl", } C2_DETECTRON_PATH_FORMAT = ( "{prefix}/{url}/output/train/{dataset}/{type}/model_final.pkl" ) # noqa B950 C2_DATASET_COCO = "coco_2014_train%3Acoco_2014_valminusminival" C2_DATASET_COCO_KEYPOINTS = "keypoints_coco_2014_train%3Akeypoints_coco_2014_valminusminival" # format: {model_name} -> part of the url C2_DETECTRON_MODELS = { "35857197/e2e_faster_rcnn_R-50-C4_1x": "35857197/12_2017_baselines/e2e_faster_rcnn_R-50-C4_1x.yaml.01_33_49.iAX0mXvW", # noqa B950 "35857345/e2e_faster_rcnn_R-50-FPN_1x": "35857345/12_2017_baselines/e2e_faster_rcnn_R-50-FPN_1x.yaml.01_36_30.cUF7QR7I", # noqa B950 "35857890/e2e_faster_rcnn_R-101-FPN_1x": "35857890/12_2017_baselines/e2e_faster_rcnn_R-101-FPN_1x.yaml.01_38_50.sNxI7sX7", # noqa B950 "36761737/e2e_faster_rcnn_X-101-32x8d-FPN_1x": "36761737/12_2017_baselines/e2e_faster_rcnn_X-101-32x8d-FPN_1x.yaml.06_31_39.5MIHi1fZ", # noqa B950 "35858791/e2e_mask_rcnn_R-50-C4_1x": "35858791/12_2017_baselines/e2e_mask_rcnn_R-50-C4_1x.yaml.01_45_57.ZgkA7hPB", # noqa B950 "35858933/e2e_mask_rcnn_R-50-FPN_1x": "35858933/12_2017_baselines/e2e_mask_rcnn_R-50-FPN_1x.yaml.01_48_14.DzEQe4wC", # noqa B950 "35861795/e2e_mask_rcnn_R-101-FPN_1x": "35861795/12_2017_baselines/e2e_mask_rcnn_R-101-FPN_1x.yaml.02_31_37.KqyEK4tT", # noqa B950 "36761843/e2e_mask_rcnn_X-101-32x8d-FPN_1x": "36761843/12_2017_baselines/e2e_mask_rcnn_X-101-32x8d-FPN_1x.yaml.06_35_59.RZotkLKI", # noqa B950 "48616381/e2e_mask_rcnn_R-50-FPN_2x_gn": "GN/48616381/04_2018_gn_baselines/e2e_mask_rcnn_R-50-FPN_2x_gn_0416.13_23_38.bTlTI97Q", # noqa B950 "37697547/e2e_keypoint_rcnn_R-50-FPN_1x": "37697547/12_2017_baselines/e2e_keypoint_rcnn_R-50-FPN_1x.yaml.08_42_54.kdzV35ao", # noqa B950 "35998355/rpn_R-50-C4_1x": "35998355/12_2017_baselines/rpn_R-50-C4_1x.yaml.08_00_43.njH5oD9L", # noqa B950 "35998814/rpn_R-50-FPN_1x": "35998814/12_2017_baselines/rpn_R-50-FPN_1x.yaml.08_06_03.Axg0r179", # noqa B950 "36225147/fast_R-50-FPN_1x": "36225147/12_2017_baselines/fast_rcnn_R-50-FPN_1x.yaml.08_39_09.L3obSdQ2", # noqa B950 } @staticmethod def get(name): if name.startswith("Caffe2Detectron/COCO"): return ModelCatalog._get_c2_detectron_baseline(name) if name.startswith("ImageNetPretrained/"): return ModelCatalog._get_c2_imagenet_pretrained(name) raise RuntimeError("model not present in the catalog: {}".format(name)) @staticmethod def _get_c2_imagenet_pretrained(name): prefix = ModelCatalog.S3_C2_DETECTRON_PREFIX name = name[len("ImageNetPretrained/") :] name = ModelCatalog.C2_IMAGENET_MODELS[name] url = "/".join([prefix, name]) return url @staticmethod def _get_c2_detectron_baseline(name): name = name[len("Caffe2Detectron/COCO/") :] url = ModelCatalog.C2_DETECTRON_MODELS[name] if "keypoint_rcnn" in name: dataset = ModelCatalog.C2_DATASET_COCO_KEYPOINTS else: dataset = ModelCatalog.C2_DATASET_COCO if "35998355/rpn_R-50-C4_1x" in name: # this one model is somehow different from others .. type = "rpn" else: type = "generalized_rcnn" # Detectron C2 models are stored in the structure defined in `C2_DETECTRON_PATH_FORMAT`. url = ModelCatalog.C2_DETECTRON_PATH_FORMAT.format( prefix=ModelCatalog.S3_C2_DETECTRON_PREFIX, url=url, type=type, dataset=dataset ) return url class ModelCatalogHandler(PathHandler): """ Resolve URL like catalog://. """ PREFIX = "catalog://" def _get_supported_prefixes(self): return [self.PREFIX] def _get_local_path(self, path): logger = logging.getLogger(__name__) catalog_path = ModelCatalog.get(path[len(self.PREFIX) :]) logger.info("Catalog entry {} points to {}".format(path, catalog_path)) return PathManager.get_local_path(catalog_path) def _open(self, path, mode="r", **kwargs): return PathManager.open(self._get_local_path(path), mode, **kwargs) class Detectron2Handler(PathHandler): """ Resolve anything that's in Detectron2 model zoo. """ PREFIX = "detectron2://" S3_DETECTRON2_PREFIX = "https://dl.fbaipublicfiles.com/detectron2/" def _get_supported_prefixes(self): return [self.PREFIX] def _get_local_path(self, path): name = path[len(self.PREFIX) :] return PathManager.get_local_path(self.S3_DETECTRON2_PREFIX + name) def _open(self, path, mode="r", **kwargs): return PathManager.open(self._get_local_path(path), mode, **kwargs) PathManager.register_handler(ModelCatalogHandler()) PathManager.register_handler(Detectron2Handler()) ================================================ FILE: detectron2/checkpoint/detection_checkpoint.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import pickle from fvcore.common.checkpoint import Checkpointer from fvcore.common.file_io import PathManager import detectron2.utils.comm as comm from .c2_model_loading import align_and_update_state_dicts class DetectionCheckpointer(Checkpointer): """ Same as :class:`Checkpointer`, but is able to handle models in detectron & detectron2 model zoo, and apply conversions for legacy models. """ def __init__(self, model, save_dir="", *, save_to_disk=None, **checkpointables): is_main_process = comm.is_main_process() super().__init__( model, save_dir, save_to_disk=is_main_process if save_to_disk is None else save_to_disk, **checkpointables, ) def _load_file(self, filename): if filename.endswith(".pkl"): with PathManager.open(filename, "rb") as f: data = pickle.load(f, encoding="latin1") if "model" in data and "__author__" in data: # file is in Detectron2 model zoo format self.logger.info("Reading a file from '{}'".format(data["__author__"])) return data else: # assume file is from Caffe2 / Detectron1 model zoo if "blobs" in data: # Detection models have "blobs", but ImageNet models don't data = data["blobs"] data = {k: v for k, v in data.items() if not k.endswith("_momentum")} return {"model": data, "__author__": "Caffe2", "matching_heuristics": True} loaded = super()._load_file(filename) # load native pth checkpoint if "model" not in loaded: loaded = {"model": loaded} return loaded def _load_model(self, checkpoint): if checkpoint.get("matching_heuristics", False): self._convert_ndarray_to_tensor(checkpoint["model"]) # convert weights by name-matching heuristics model_state_dict = self.model.state_dict() align_and_update_state_dicts( model_state_dict, checkpoint["model"], c2_conversion=checkpoint.get("__author__", None) == "Caffe2", ) checkpoint["model"] = model_state_dict # for non-caffe2 models, use standard ways to load it super()._load_model(checkpoint) ================================================ FILE: detectron2/checkpoint/model_zoo.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging from fvcore.common.file_io import PathHandler, PathManager class ModelCatalog(object): """ Store mappings from names to third-party models. """ S3_C2_DETECTRON_PREFIX = "https://dl.fbaipublicfiles.com/detectron" # MSRA models have STRIDE_IN_1X1=True. False otherwise. # NOTE: all BN models here have fused BN into an affine layer. # As a result, you should only load them to a model with "FrozenBN". # Loading them to a model with regular BN or SyncBN is wrong. # Even when loaded to FrozenBN, it is still different from affine by an epsilon, # which should be negligible for training. # NOTE: all models here uses PIXEL_STD=[1,1,1] C2_IMAGENET_MODELS = { "MSRA/R-50": "ImageNetPretrained/MSRA/R-50.pkl", "MSRA/R-101": "ImageNetPretrained/MSRA/R-101.pkl", "FAIR/R-50-GN": "ImageNetPretrained/47261647/R-50-GN.pkl", "FAIR/R-101-GN": "ImageNetPretrained/47592356/R-101-GN.pkl", "FAIR/X-101-32x8d": "ImageNetPretrained/20171220/X-101-32x8d.pkl", "FAIR/X-101-64x4d": "ImageNetPretrained/FBResNeXt/X-101-64x4d.pkl", "FAIR/X-152-32x8d-IN5k": "ImageNetPretrained/25093814/X-152-32x8d-IN5k.pkl", } C2_DETECTRON_PATH_FORMAT = ( "{prefix}/{url}/output/train/{dataset}/{type}/model_final.pkl" ) # noqa B950 C2_DATASET_COCO = "coco_2014_train%3Acoco_2014_valminusminival" C2_DATASET_COCO_KEYPOINTS = "keypoints_coco_2014_train%3Akeypoints_coco_2014_valminusminival" # format: {model_name} -> part of the url C2_DETECTRON_MODELS = { "35857197/e2e_faster_rcnn_R-50-C4_1x": "35857197/12_2017_baselines/e2e_faster_rcnn_R-50-C4_1x.yaml.01_33_49.iAX0mXvW", # noqa B950 "35857345/e2e_faster_rcnn_R-50-FPN_1x": "35857345/12_2017_baselines/e2e_faster_rcnn_R-50-FPN_1x.yaml.01_36_30.cUF7QR7I", # noqa B950 "35857890/e2e_faster_rcnn_R-101-FPN_1x": "35857890/12_2017_baselines/e2e_faster_rcnn_R-101-FPN_1x.yaml.01_38_50.sNxI7sX7", # noqa B950 "36761737/e2e_faster_rcnn_X-101-32x8d-FPN_1x": "36761737/12_2017_baselines/e2e_faster_rcnn_X-101-32x8d-FPN_1x.yaml.06_31_39.5MIHi1fZ", # noqa B950 "35858791/e2e_mask_rcnn_R-50-C4_1x": "35858791/12_2017_baselines/e2e_mask_rcnn_R-50-C4_1x.yaml.01_45_57.ZgkA7hPB", # noqa B950 "35858933/e2e_mask_rcnn_R-50-FPN_1x": "35858933/12_2017_baselines/e2e_mask_rcnn_R-50-FPN_1x.yaml.01_48_14.DzEQe4wC", # noqa B950 "35861795/e2e_mask_rcnn_R-101-FPN_1x": "35861795/12_2017_baselines/e2e_mask_rcnn_R-101-FPN_1x.yaml.02_31_37.KqyEK4tT", # noqa B950 "36761843/e2e_mask_rcnn_X-101-32x8d-FPN_1x": "36761843/12_2017_baselines/e2e_mask_rcnn_X-101-32x8d-FPN_1x.yaml.06_35_59.RZotkLKI", # noqa B950 "48616381/e2e_mask_rcnn_R-50-FPN_2x_gn": "GN/48616381/04_2018_gn_baselines/e2e_mask_rcnn_R-50-FPN_2x_gn_0416.13_23_38.bTlTI97Q", # noqa B950 "37697547/e2e_keypoint_rcnn_R-50-FPN_1x": "37697547/12_2017_baselines/e2e_keypoint_rcnn_R-50-FPN_1x.yaml.08_42_54.kdzV35ao", # noqa B950 "35998355/rpn_R-50-C4_1x": "35998355/12_2017_baselines/rpn_R-50-C4_1x.yaml.08_00_43.njH5oD9L", # noqa B950 "35998814/rpn_R-50-FPN_1x": "35998814/12_2017_baselines/rpn_R-50-FPN_1x.yaml.08_06_03.Axg0r179", # noqa B950 "36225147/fast_R-50-FPN_1x": "36225147/12_2017_baselines/fast_rcnn_R-50-FPN_1x.yaml.08_39_09.L3obSdQ2", # noqa B950 } @staticmethod def get(name): if name.startswith("Caffe2Detectron/COCO"): return ModelCatalog._get_c2_detectron_baseline(name) if name.startswith("ImageNetPretrained/"): return ModelCatalog._get_c2_imagenet_pretrained(name) raise RuntimeError("model not present in the catalog: {}".format(name)) @staticmethod def _get_c2_imagenet_pretrained(name): prefix = ModelCatalog.S3_C2_DETECTRON_PREFIX name = name[len("ImageNetPretrained/") :] name = ModelCatalog.C2_IMAGENET_MODELS[name] url = "/".join([prefix, name]) return url @staticmethod def _get_c2_detectron_baseline(name): name = name[len("Caffe2Detectron/COCO/") :] url = ModelCatalog.C2_DETECTRON_MODELS[name] if "keypoint_rcnn" in name: dataset = ModelCatalog.C2_DATASET_COCO_KEYPOINTS else: dataset = ModelCatalog.C2_DATASET_COCO if "35998355/rpn_R-50-C4_1x" in name: # this one model is somehow different from others .. type = "rpn" else: type = "generalized_rcnn" # Detectron C2 models are stored in the structure defined in `C2_DETECTRON_PATH_FORMAT`. url = ModelCatalog.C2_DETECTRON_PATH_FORMAT.format( prefix=ModelCatalog.S3_C2_DETECTRON_PREFIX, url=url, type=type, dataset=dataset ) return url class ModelCatalogHandler(PathHandler): """ Resolve URL like catalog://. """ PREFIX = "catalog://" def _get_supported_prefixes(self): return [self.PREFIX] def _get_local_path(self, path): logger = logging.getLogger(__name__) catalog_path = ModelCatalog.get(path[len(self.PREFIX) :]) logger.info("Catalog entry {} points to {}".format(path, catalog_path)) return PathManager.get_local_path(catalog_path) def _open(self, path, mode="r"): return PathManager.open(self._get_local_path(path), mode) class Detectron2Handler(PathHandler): """ Resolve anything that's in Detectron2 model zoo. """ PREFIX = "detectron2://" S3_DETECTRON2_PREFIX = "https://dl.fbaipublicfiles.com/detectron2/" def _get_supported_prefixes(self): return [self.PREFIX] def _get_local_path(self, path): name = path[len(self.PREFIX) :] return PathManager.get_local_path(self.S3_DETECTRON2_PREFIX + name) def _open(self, path, mode="r"): return PathManager.open(self._get_local_path(path), mode) PathManager.register_handler(ModelCatalogHandler()) PathManager.register_handler(Detectron2Handler()) ================================================ FILE: detectron2/config/__init__.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .compat import downgrade_config, upgrade_config from .config import CfgNode, get_cfg, global_cfg, set_global_cfg __all__ = [ "CfgNode", "get_cfg", "global_cfg", "set_global_cfg", "downgrade_config", "upgrade_config", ] ================================================ FILE: detectron2/config/compat.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ Backward compatibility of configs. Instructions to bump version: + It's not needed to bump version if new keys are added. It's only needed when backward-incompatible changes happen (i.e., some existing keys disappear, or the meaning of a key changes) + To bump version, do the following: 1. Increment _C.VERSION in defaults.py 2. Add a converter in this file. Each ConverterVX has a function "upgrade" which in-place upgrades config from X-1 to X, and a function "downgrade" which in-place downgrades config from X to X-1 In each function, VERSION is left unchanged. Each converter assumes that its input has the relevant keys (i.e., the input is not a partial config). 3. Run the tests (test_config.py) to make sure the upgrade & downgrade functions are consistent. """ import logging from typing import List, Optional, Tuple from .config import CfgNode as CN from .defaults import _C __all__ = ["upgrade_config", "downgrade_config"] def upgrade_config(cfg: CN, to_version: Optional[int] = None) -> CN: """ Upgrade a config from its current version to a newer version. Args: cfg (CfgNode): to_version (int): defaults to the latest version. """ cfg = cfg.clone() if to_version is None: to_version = _C.VERSION assert cfg.VERSION <= to_version, "Cannot upgrade from v{} to v{}!".format( cfg.VERSION, to_version ) for k in range(cfg.VERSION, to_version): converter = globals()["ConverterV" + str(k + 1)] converter.upgrade(cfg) cfg.VERSION = k + 1 return cfg def downgrade_config(cfg: CN, to_version: int) -> CN: """ Downgrade a config from its current version to an older version. Args: cfg (CfgNode): to_version (int): Note: A general downgrade of arbitrary configs is not always possible due to the different functionalities in different versions. The purpose of downgrade is only to recover the defaults in old versions, allowing it to load an old partial yaml config. Therefore, the implementation only needs to fill in the default values in the old version when a general downgrade is not possible. """ cfg = cfg.clone() assert cfg.VERSION >= to_version, "Cannot downgrade from v{} to v{}!".format( cfg.VERSION, to_version ) for k in range(cfg.VERSION, to_version, -1): converter = globals()["ConverterV" + str(k)] converter.downgrade(cfg) cfg.VERSION = k - 1 return cfg def guess_version(cfg: CN, filename: str) -> int: """ Guess the version of a partial config where the VERSION field is not specified. Returns the version, or the latest if cannot make a guess. This makes it easier for users to migrate. """ logger = logging.getLogger(__name__) def _has(name: str) -> bool: cur = cfg for n in name.split("."): if n not in cur: return False cur = cur[n] return True # Most users' partial configs have "MODEL.WEIGHT", so guess on it ret = None if _has("MODEL.WEIGHT") or _has("TEST.AUG_ON"): ret = 1 if ret is not None: logger.warning("Config '{}' has no VERSION. Assuming it to be v{}.".format(filename, ret)) else: ret = _C.VERSION logger.warning( "Config '{}' has no VERSION. Assuming it to be compatible with latest v{}.".format( filename, ret ) ) return ret def _rename(cfg: CN, old: str, new: str) -> None: old_keys = old.split(".") new_keys = new.split(".") def _set(key_seq: List[str], val: str) -> None: cur = cfg for k in key_seq[:-1]: if k not in cur: cur[k] = CN() cur = cur[k] cur[key_seq[-1]] = val def _get(key_seq: List[str]) -> CN: cur = cfg for k in key_seq: cur = cur[k] return cur def _del(key_seq: List[str]) -> None: cur = cfg for k in key_seq[:-1]: cur = cur[k] del cur[key_seq[-1]] if len(cur) == 0 and len(key_seq) > 1: _del(key_seq[:-1]) _set(new_keys, _get(old_keys)) _del(old_keys) class _RenameConverter: """ A converter that handles simple rename. """ RENAME: List[Tuple[str, str]] = [] # list of tuples of (old name, new name) @classmethod def upgrade(cls, cfg: CN) -> None: for old, new in cls.RENAME: _rename(cfg, old, new) @classmethod def downgrade(cls, cfg: CN) -> None: for old, new in cls.RENAME[::-1]: _rename(cfg, new, old) class ConverterV1(_RenameConverter): RENAME = [("MODEL.RPN_HEAD.NAME", "MODEL.RPN.HEAD_NAME")] class ConverterV2(_RenameConverter): """ A large bulk of rename, before public release. """ RENAME = [ ("MODEL.WEIGHT", "MODEL.WEIGHTS"), ("MODEL.PANOPTIC_FPN.SEMANTIC_LOSS_SCALE", "MODEL.SEM_SEG_HEAD.LOSS_WEIGHT"), ("MODEL.PANOPTIC_FPN.RPN_LOSS_SCALE", "MODEL.RPN.LOSS_WEIGHT"), ("MODEL.PANOPTIC_FPN.INSTANCE_LOSS_SCALE", "MODEL.PANOPTIC_FPN.INSTANCE_LOSS_WEIGHT"), ("MODEL.PANOPTIC_FPN.COMBINE_ON", "MODEL.PANOPTIC_FPN.COMBINE.ENABLED"), ( "MODEL.PANOPTIC_FPN.COMBINE_OVERLAP_THRESHOLD", "MODEL.PANOPTIC_FPN.COMBINE.OVERLAP_THRESH", ), ( "MODEL.PANOPTIC_FPN.COMBINE_STUFF_AREA_LIMIT", "MODEL.PANOPTIC_FPN.COMBINE.STUFF_AREA_LIMIT", ), ( "MODEL.PANOPTIC_FPN.COMBINE_INSTANCES_CONFIDENCE_THRESHOLD", "MODEL.PANOPTIC_FPN.COMBINE.INSTANCES_CONFIDENCE_THRESH", ), ("MODEL.ROI_HEADS.SCORE_THRESH", "MODEL.ROI_HEADS.SCORE_THRESH_TEST"), ("MODEL.ROI_HEADS.NMS", "MODEL.ROI_HEADS.NMS_THRESH_TEST"), ("MODEL.RETINANET.INFERENCE_SCORE_THRESHOLD", "MODEL.RETINANET.SCORE_THRESH_TEST"), ("MODEL.RETINANET.INFERENCE_TOPK_CANDIDATES", "MODEL.RETINANET.TOPK_CANDIDATES_TEST"), ("MODEL.RETINANET.INFERENCE_NMS_THRESHOLD", "MODEL.RETINANET.NMS_THRESH_TEST"), ("TEST.DETECTIONS_PER_IMG", "TEST.DETECTIONS_PER_IMAGE"), ("TEST.AUG_ON", "TEST.AUG.ENABLED"), ("TEST.AUG_MIN_SIZES", "TEST.AUG.MIN_SIZES"), ("TEST.AUG_MAX_SIZE", "TEST.AUG.MAX_SIZE"), ("TEST.AUG_FLIP", "TEST.AUG.FLIP"), ] @classmethod def upgrade(cls, cfg: CN) -> None: super().upgrade(cfg) if cfg.MODEL.META_ARCHITECTURE == "RetinaNet": _rename( cfg, "MODEL.RETINANET.ANCHOR_ASPECT_RATIOS", "MODEL.ANCHOR_GENERATOR.ASPECT_RATIOS" ) _rename(cfg, "MODEL.RETINANET.ANCHOR_SIZES", "MODEL.ANCHOR_GENERATOR.SIZES") del cfg["MODEL"]["RPN"]["ANCHOR_SIZES"] del cfg["MODEL"]["RPN"]["ANCHOR_ASPECT_RATIOS"] else: _rename(cfg, "MODEL.RPN.ANCHOR_ASPECT_RATIOS", "MODEL.ANCHOR_GENERATOR.ASPECT_RATIOS") _rename(cfg, "MODEL.RPN.ANCHOR_SIZES", "MODEL.ANCHOR_GENERATOR.SIZES") del cfg["MODEL"]["RETINANET"]["ANCHOR_SIZES"] del cfg["MODEL"]["RETINANET"]["ANCHOR_ASPECT_RATIOS"] del cfg["MODEL"]["RETINANET"]["ANCHOR_STRIDES"] @classmethod def downgrade(cls, cfg: CN) -> None: super().downgrade(cfg) _rename(cfg, "MODEL.ANCHOR_GENERATOR.ASPECT_RATIOS", "MODEL.RPN.ANCHOR_ASPECT_RATIOS") _rename(cfg, "MODEL.ANCHOR_GENERATOR.SIZES", "MODEL.RPN.ANCHOR_SIZES") cfg.MODEL.RETINANET.ANCHOR_ASPECT_RATIOS = cfg.MODEL.RPN.ANCHOR_ASPECT_RATIOS cfg.MODEL.RETINANET.ANCHOR_SIZES = cfg.MODEL.RPN.ANCHOR_SIZES cfg.MODEL.RETINANET.ANCHOR_STRIDES = [] # this is not used anywhere in any version ================================================ FILE: detectron2/config/config.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging from fvcore.common.config import CfgNode as _CfgNode class CfgNode(_CfgNode): """ The same as `fvcore.common.config.CfgNode`, but different in: 1. Use unsafe yaml loading by default. Note that this may lead to arbitrary code execution: you must not load a config file from untrusted sources before manually inspecting the content of the file. 2. Support config versioning. When attempting to merge an old config, it will convert the old config automatically. """ # Note that the default value of allow_unsafe is changed to True def merge_from_file(self, cfg_filename: str, allow_unsafe: bool = True) -> None: loaded_cfg = _CfgNode.load_yaml_with_base(cfg_filename, allow_unsafe=allow_unsafe) loaded_cfg = type(self)(loaded_cfg) # defaults.py needs to import CfgNode from .defaults import _C latest_ver = _C.VERSION assert ( latest_ver == self.VERSION ), "CfgNode.merge_from_file is only allowed on a config of latest version!" logger = logging.getLogger(__name__) loaded_ver = loaded_cfg.get("VERSION", None) if loaded_ver is None: from .compat import guess_version loaded_ver = guess_version(loaded_cfg, cfg_filename) assert loaded_ver <= self.VERSION, "Cannot merge a v{} config into a v{} config.".format( loaded_ver, self.VERSION ) if loaded_ver == self.VERSION: self.merge_from_other_cfg(loaded_cfg) else: # compat.py needs to import CfgNode from .compat import upgrade_config, downgrade_config logger.warning( "Loading an old v{} config file '{}' by automatically upgrading to v{}. " "See docs/CHANGELOG.md for instructions to update your files.".format( loaded_ver, cfg_filename, self.VERSION ) ) # To convert, first obtain a full config at an old version old_self = downgrade_config(self, to_version=loaded_ver) old_self.merge_from_other_cfg(loaded_cfg) new_config = upgrade_config(old_self) self.clear() self.update(new_config) global_cfg = CfgNode() def get_cfg() -> CfgNode: """ Get a copy of the default config. Returns: a detectron2 CfgNode instance. """ from .defaults import _C return _C.clone() def set_global_cfg(cfg: CfgNode) -> None: """ Let the global config point to the given cfg. Assume that the given "cfg" has the key "KEY", after calling `set_global_cfg(cfg)`, the key can be accessed by: .. code-block:: python from detectron2.config import global_cfg print(global_cfg.KEY) By using a hacky global config, you can access these configs anywhere, without having to pass the config object or the values deep into the code. This is a hacky feature introduced for quick prototyping / research exploration. """ global global_cfg global_cfg.clear() global_cfg.update(cfg) ================================================ FILE: detectron2/config/defaults.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .config import CfgNode as CN # ----------------------------------------------------------------------------- # Convention about Training / Test specific parameters # ----------------------------------------------------------------------------- # Whenever an argument can be either used for training or for testing, the # corresponding name will be post-fixed by a _TRAIN for a training parameter, # or _TEST for a test-specific parameter. # For example, the number of images during training will be # IMAGES_PER_BATCH_TRAIN, while the number of images for testing will be # IMAGES_PER_BATCH_TEST # ----------------------------------------------------------------------------- # Config definition # ----------------------------------------------------------------------------- _C = CN() _C.VERSION = 2 _C.MODEL = CN() _C.MODEL.LOAD_PROPOSALS = False _C.MODEL.MASK_ON = False _C.MODEL.KEYPOINT_ON = False _C.MODEL.DEVICE = "cuda" _C.MODEL.META_ARCHITECTURE = "GeneralizedRCNN" # If the WEIGHT starts with a catalog://, like :R-50, the code will look for # the path in ModelCatalog. Else, it will use it as the specified absolute # path _C.MODEL.WEIGHTS = "" # Values to be used for image normalization (BGR order) # Default values are the mean pixel value from ImageNet: [103.53, 116.28, 123.675] _C.MODEL.PIXEL_MEAN = [103.530, 116.280, 123.675] # When using pre-trained models in Detectron1 or any MSRA models, # std has been absorbed into its conv1 weights, so the std needs to be set 1. # Otherwise, you can use [57.375, 57.120, 58.395] (ImageNet std) _C.MODEL.PIXEL_STD = [1.0, 1.0, 1.0] # ----------------------------------------------------------------------------- # INPUT # ----------------------------------------------------------------------------- _C.INPUT = CN() # Size of the smallest side of the image during training _C.INPUT.MIN_SIZE_TRAIN = (800,) # Sample size of smallest side by choice or random selection from range give by # INPUT.MIN_SIZE_TRAIN _C.INPUT.MIN_SIZE_TRAIN_SAMPLING = "choice" # Maximum size of the side of the image during training _C.INPUT.MAX_SIZE_TRAIN = 1333 # Size of the smallest side of the image during testing. Set to zero to disable resize in testing. _C.INPUT.MIN_SIZE_TEST = 800 # Maximum size of the side of the image during testing _C.INPUT.MAX_SIZE_TEST = 1333 # `True` if cropping is used for data augmentation during training _C.INPUT.CROP = CN({"ENABLED": False}) # Cropping type: # - "relative" crop (H * CROP.SIZE[0], W * CROP.SIZE[1]) part of an input of size (H, W) # - "relative_range" uniformly sample relative crop size from between [CROP.SIZE[0], [CROP.SIZE[1]]. # and [1, 1] and use it as in "relative" scenario. # - "absolute" crop part of an input with absolute size: (CROP.SIZE[0], CROP.SIZE[1]). _C.INPUT.CROP.TYPE = "relative_range" # Size of crop in range (0, 1] if CROP.TYPE is "relative" or "relative_range" and in number of # pixels if CROP.TYPE is "absolute" _C.INPUT.CROP.SIZE = [0.9, 0.9] # Whether the model needs RGB, YUV, HSV etc. # Should be one of the modes defined here, as we use PIL to read the image: # https://pillow.readthedocs.io/en/stable/handbook/concepts.html#concept-modes # with BGR being the one exception. One can set image format to BGR, we will # internally use RGB for conversion and flip the channels over _C.INPUT.FORMAT = "BGR" _C.INPUT.MASK_FORMAT = "polygon" # alternative: "bitmask" # ----------------------------------------------------------------------------- # Dataset # ----------------------------------------------------------------------------- _C.DATASETS = CN() # List of the dataset names for training. Must be registered in DatasetCatalog _C.DATASETS.TRAIN = () # List of the pre-computed proposal files for training, which must be consistent # with datasets listed in DATASETS.TRAIN. _C.DATASETS.PROPOSAL_FILES_TRAIN = () # Number of top scoring precomputed proposals to keep for training _C.DATASETS.PRECOMPUTED_PROPOSAL_TOPK_TRAIN = 2000 # List of the dataset names for testing. Must be registered in DatasetCatalog _C.DATASETS.TEST = () # List of the pre-computed proposal files for test, which must be consistent # with datasets listed in DATASETS.TEST. _C.DATASETS.PROPOSAL_FILES_TEST = () # Number of top scoring precomputed proposals to keep for test _C.DATASETS.PRECOMPUTED_PROPOSAL_TOPK_TEST = 1000 # ----------------------------------------------------------------------------- # DataLoader # ----------------------------------------------------------------------------- _C.DATALOADER = CN() # Number of data loading threads _C.DATALOADER.NUM_WORKERS = 4 # If True, each batch should contain only images for which the aspect ratio # is compatible. This groups portrait images together, and landscape images # are not batched with portrait images. _C.DATALOADER.ASPECT_RATIO_GROUPING = True # Options: TrainingSampler, RepeatFactorTrainingSampler _C.DATALOADER.SAMPLER_TRAIN = "TrainingSampler" # Repeat threshold for RepeatFactorTrainingSampler _C.DATALOADER.REPEAT_THRESHOLD = 0.0 # ---------------------------------------------------------------------------- # # Backbone options # ---------------------------------------------------------------------------- # _C.MODEL.BACKBONE = CN() _C.MODEL.BACKBONE.NAME = "build_resnet_backbone" # Add StopGrad at a specified stage so the bottom layers are frozen _C.MODEL.BACKBONE.FREEZE_AT = 2 # ---------------------------------------------------------------------------- # # FPN options # ---------------------------------------------------------------------------- # _C.MODEL.FPN = CN() # Names of the input feature maps to be used by FPN # They must have contiguous power of 2 strides # e.g., ["res2", "res3", "res4", "res5"] _C.MODEL.FPN.IN_FEATURES = [] _C.MODEL.FPN.OUT_CHANNELS = 256 # Options: "" (no norm), "GN" _C.MODEL.FPN.NORM = "" # Types for fusing the FPN top-down and lateral features. Can be either "sum" or "avg" _C.MODEL.FPN.FUSE_TYPE = "sum" # ---------------------------------------------------------------------------- # # Proposal generator options # ---------------------------------------------------------------------------- # _C.MODEL.PROPOSAL_GENERATOR = CN() # Current proposal generators include "RPN", "RRPN" and "PrecomputedProposals" _C.MODEL.PROPOSAL_GENERATOR.NAME = "RPN" # Proposal height and width both need to be greater than MIN_SIZE # (a the scale used during training or inference) _C.MODEL.PROPOSAL_GENERATOR.MIN_SIZE = 0 # ---------------------------------------------------------------------------- # # Anchor generator options # ---------------------------------------------------------------------------- # _C.MODEL.ANCHOR_GENERATOR = CN() # The generator can be any name in the ANCHOR_GENERATOR registry _C.MODEL.ANCHOR_GENERATOR.NAME = "DefaultAnchorGenerator" # anchor sizes given in absolute pixels w.r.t. the scaled network input. # Format: list of lists of sizes. SIZES[i] specifies the list of sizes # to use for IN_FEATURES[i]; len(SIZES) == len(IN_FEATURES) must be true, # or len(SIZES) == 1 is true and size list SIZES[0] is used for all # IN_FEATURES. _C.MODEL.ANCHOR_GENERATOR.SIZES = [[32, 64, 128, 256, 512]] # Anchor aspect ratios. # Format is list of lists of sizes. ASPECT_RATIOS[i] specifies the list of aspect ratios # to use for IN_FEATURES[i]; len(ASPECT_RATIOS) == len(IN_FEATURES) must be true, # or len(ASPECT_RATIOS) == 1 is true and aspect ratio list ASPECT_RATIOS[0] is used # for all IN_FEATURES. _C.MODEL.ANCHOR_GENERATOR.ASPECT_RATIOS = [[0.5, 1.0, 2.0]] # Anchor angles. # list[float], the angle in degrees, for each input feature map. # ANGLES[i] specifies the list of angles for IN_FEATURES[i]. _C.MODEL.ANCHOR_GENERATOR.ANGLES = [[-90, 0, 90]] # ---------------------------------------------------------------------------- # # RPN options # ---------------------------------------------------------------------------- # _C.MODEL.RPN = CN() _C.MODEL.RPN.HEAD_NAME = "StandardRPNHead" # used by RPN_HEAD_REGISTRY # Names of the input feature maps to be used by RPN # e.g., ["p2", "p3", "p4", "p5", "p6"] for FPN _C.MODEL.RPN.IN_FEATURES = ["res4"] # Remove RPN anchors that go outside the image by BOUNDARY_THRESH pixels # Set to -1 or a large value, e.g. 100000, to disable pruning anchors _C.MODEL.RPN.BOUNDARY_THRESH = -1 # IOU overlap ratios [BG_IOU_THRESHOLD, FG_IOU_THRESHOLD] # Minimum overlap required between an anchor and ground-truth box for the # (anchor, gt box) pair to be a positive example (IoU >= FG_IOU_THRESHOLD # ==> positive RPN example: 1) # Maximum overlap allowed between an anchor and ground-truth box for the # (anchor, gt box) pair to be a negative examples (IoU < BG_IOU_THRESHOLD # ==> negative RPN example: 0) # Anchors with overlap in between (BG_IOU_THRESHOLD <= IoU < FG_IOU_THRESHOLD) # are ignored (-1) _C.MODEL.RPN.IOU_THRESHOLDS = [0.3, 0.7] _C.MODEL.RPN.IOU_LABELS = [0, -1, 1] # Total number of RPN examples per image _C.MODEL.RPN.BATCH_SIZE_PER_IMAGE = 256 # Target fraction of foreground (positive) examples per RPN minibatch _C.MODEL.RPN.POSITIVE_FRACTION = 0.5 # Weights on (dx, dy, dw, dh) for normalizing RPN anchor regression targets _C.MODEL.RPN.BBOX_REG_WEIGHTS = (1.0, 1.0, 1.0, 1.0) # The transition point from L1 to L2 loss. Set to 0.0 to make the loss simply L1. _C.MODEL.RPN.SMOOTH_L1_BETA = 0.0 _C.MODEL.RPN.LOSS_WEIGHT = 1.0 # Number of top scoring RPN proposals to keep before applying NMS # When FPN is used, this is *per FPN level* (not total) _C.MODEL.RPN.PRE_NMS_TOPK_TRAIN = 12000 _C.MODEL.RPN.PRE_NMS_TOPK_TEST = 6000 # Number of top scoring RPN proposals to keep after applying NMS # When FPN is used, this limit is applied per level and then again to the union # of proposals from all levels # NOTE: When FPN is used, the meaning of this config is different from Detectron1. # It means per-batch topk in Detectron1, but per-image topk here. # See "modeling/rpn/rpn_outputs.py" for details. _C.MODEL.RPN.POST_NMS_TOPK_TRAIN = 2000 _C.MODEL.RPN.POST_NMS_TOPK_TEST = 1000 # NMS threshold used on RPN proposals _C.MODEL.RPN.NMS_THRESH = 0.7 # ---------------------------------------------------------------------------- # # ROI HEADS options # ---------------------------------------------------------------------------- # _C.MODEL.ROI_HEADS = CN() _C.MODEL.ROI_HEADS.NAME = "Res5ROIHeads" # Number of foreground classes _C.MODEL.ROI_HEADS.NUM_CLASSES = 80 # Names of the input feature maps to be used by ROI heads # Currently all heads (box, mask, ...) use the same input feature map list # e.g., ["p2", "p3", "p4", "p5"] is commonly used for FPN _C.MODEL.ROI_HEADS.IN_FEATURES = ["res4"] # IOU overlap ratios [IOU_THRESHOLD] # Overlap threshold for an RoI to be considered background (if < IOU_THRESHOLD) # Overlap threshold for an RoI to be considered foreground (if >= IOU_THRESHOLD) _C.MODEL.ROI_HEADS.IOU_THRESHOLDS = [0.5] _C.MODEL.ROI_HEADS.IOU_LABELS = [0, 1] # RoI minibatch size *per image* (number of regions of interest [ROIs]) # Total number of RoIs per training minibatch = # ROI_HEADS.BATCH_SIZE_PER_IMAGE * SOLVER.IMS_PER_BATCH # E.g., a common configuration is: 512 * 16 = 8192 _C.MODEL.ROI_HEADS.BATCH_SIZE_PER_IMAGE = 512 # Target fraction of RoI minibatch that is labeled foreground (i.e. class > 0) _C.MODEL.ROI_HEADS.POSITIVE_FRACTION = 0.25 # Only used on test mode # Minimum score threshold (assuming scores in a [0, 1] range); a value chosen to # balance obtaining high recall with not having too many low precision # detections that will slow down inference post processing steps (like NMS) # A default threshold of 0.0 increases AP by ~0.2-0.3 but significantly slows down # inference. _C.MODEL.ROI_HEADS.SCORE_THRESH_TEST = 0.05 # Overlap threshold used for non-maximum suppression (suppress boxes with # IoU >= this threshold) _C.MODEL.ROI_HEADS.NMS_THRESH_TEST = 0.5 # If True, augment proposals with ground-truth boxes before sampling proposals to # train ROI heads. _C.MODEL.ROI_HEADS.PROPOSAL_APPEND_GT = True # ---------------------------------------------------------------------------- # # Box Head # ---------------------------------------------------------------------------- # _C.MODEL.ROI_BOX_HEAD = CN() # C4 don't use head name option # Options for non-C4 models: FastRCNNConvFCHead, _C.MODEL.ROI_BOX_HEAD.NAME = "" # Default weights on (dx, dy, dw, dh) for normalizing bbox regression targets # These are empirically chosen to approximately lead to unit variance targets _C.MODEL.ROI_BOX_HEAD.BBOX_REG_WEIGHTS = (10.0, 10.0, 5.0, 5.0) # The transition point from L1 to L2 loss. Set to 0.0 to make the loss simply L1. _C.MODEL.ROI_BOX_HEAD.SMOOTH_L1_BETA = 0.0 _C.MODEL.ROI_BOX_HEAD.POOLER_RESOLUTION = 14 _C.MODEL.ROI_BOX_HEAD.POOLER_SAMPLING_RATIO = 0 # Type of pooling operation applied to the incoming feature map for each RoI _C.MODEL.ROI_BOX_HEAD.POOLER_TYPE = "ROIAlignV2" _C.MODEL.ROI_BOX_HEAD.NUM_FC = 0 # Hidden layer dimension for FC layers in the RoI box head _C.MODEL.ROI_BOX_HEAD.FC_DIM = 1024 _C.MODEL.ROI_BOX_HEAD.NUM_CONV = 0 # Channel dimension for Conv layers in the RoI box head _C.MODEL.ROI_BOX_HEAD.CONV_DIM = 256 # Normalization method for the convolution layers. # Options: "" (no norm), "GN", "SyncBN". _C.MODEL.ROI_BOX_HEAD.NORM = "" # Whether to use class agnostic for bbox regression _C.MODEL.ROI_BOX_HEAD.CLS_AGNOSTIC_BBOX_REG = False # ---------------------------------------------------------------------------- # # Cascaded Box Head # ---------------------------------------------------------------------------- # _C.MODEL.ROI_BOX_CASCADE_HEAD = CN() # The number of cascade stages is implicitly defined by the length of the following two configs. _C.MODEL.ROI_BOX_CASCADE_HEAD.BBOX_REG_WEIGHTS = ( (10.0, 10.0, 5.0, 5.0), (20.0, 20.0, 10.0, 10.0), (30.0, 30.0, 15.0, 15.0), ) _C.MODEL.ROI_BOX_CASCADE_HEAD.IOUS = (0.5, 0.6, 0.7) # ---------------------------------------------------------------------------- # # Mask Head # ---------------------------------------------------------------------------- # _C.MODEL.ROI_MASK_HEAD = CN() _C.MODEL.ROI_MASK_HEAD.NAME = "MaskRCNNConvUpsampleHead" _C.MODEL.ROI_MASK_HEAD.POOLER_RESOLUTION = 14 _C.MODEL.ROI_MASK_HEAD.POOLER_SAMPLING_RATIO = 0 _C.MODEL.ROI_MASK_HEAD.NUM_CONV = 0 # The number of convs in the mask head _C.MODEL.ROI_MASK_HEAD.CONV_DIM = 256 # Normalization method for the convolution layers. # Options: "" (no norm), "GN", "SyncBN". _C.MODEL.ROI_MASK_HEAD.NORM = "" # Whether to use class agnostic for mask prediction _C.MODEL.ROI_MASK_HEAD.CLS_AGNOSTIC_MASK = False # Type of pooling operation applied to the incoming feature map for each RoI _C.MODEL.ROI_MASK_HEAD.POOLER_TYPE = "ROIAlignV2" # ---------------------------------------------------------------------------- # # Keypoint Head # ---------------------------------------------------------------------------- # _C.MODEL.ROI_KEYPOINT_HEAD = CN() _C.MODEL.ROI_KEYPOINT_HEAD.NAME = "KRCNNConvDeconvUpsampleHead" _C.MODEL.ROI_KEYPOINT_HEAD.POOLER_RESOLUTION = 14 _C.MODEL.ROI_KEYPOINT_HEAD.POOLER_SAMPLING_RATIO = 0 _C.MODEL.ROI_KEYPOINT_HEAD.CONV_DIMS = tuple(512 for _ in range(8)) _C.MODEL.ROI_KEYPOINT_HEAD.NUM_KEYPOINTS = 17 # 17 is the number of keypoints in COCO. # Images with too few (or no) keypoints are excluded from training. _C.MODEL.ROI_KEYPOINT_HEAD.MIN_KEYPOINTS_PER_IMAGE = 1 # Normalize by the total number of visible keypoints in the minibatch if True. # Otherwise, normalize by the total number of keypoints that could ever exist # in the minibatch. # The keypoint softmax loss is only calculated on visible keypoints. # Since the number of visible keypoints can vary significantly between # minibatches, this has the effect of up-weighting the importance of # minibatches with few visible keypoints. (Imagine the extreme case of # only one visible keypoint versus N: in the case of N, each one # contributes 1/N to the gradient compared to the single keypoint # determining the gradient direction). Instead, we can normalize the # loss by the total number of keypoints, if it were the case that all # keypoints were visible in a full minibatch. (Returning to the example, # this means that the one visible keypoint contributes as much as each # of the N keypoints.) _C.MODEL.ROI_KEYPOINT_HEAD.NORMALIZE_LOSS_BY_VISIBLE_KEYPOINTS = True # Multi-task loss weight to use for keypoints # Recommended values: # - use 1.0 if NORMALIZE_LOSS_BY_VISIBLE_KEYPOINTS is True # - use 4.0 if NORMALIZE_LOSS_BY_VISIBLE_KEYPOINTS is False _C.MODEL.ROI_KEYPOINT_HEAD.LOSS_WEIGHT = 1.0 # Type of pooling operation applied to the incoming feature map for each RoI _C.MODEL.ROI_KEYPOINT_HEAD.POOLER_TYPE = "ROIAlignV2" # ---------------------------------------------------------------------------- # # Semantic Segmentation Head # ---------------------------------------------------------------------------- # _C.MODEL.SEM_SEG_HEAD = CN() _C.MODEL.SEM_SEG_HEAD.NAME = "SemSegFPNHead" _C.MODEL.SEM_SEG_HEAD.IN_FEATURES = ["p2", "p3", "p4", "p5"] # Label in the semantic segmentation ground truth that is ignored, i.e., no loss is calculated for # the correposnding pixel. _C.MODEL.SEM_SEG_HEAD.IGNORE_VALUE = 255 # Number of classes in the semantic segmentation head _C.MODEL.SEM_SEG_HEAD.NUM_CLASSES = 54 # Number of channels in the 3x3 convs inside semantic-FPN heads. _C.MODEL.SEM_SEG_HEAD.CONVS_DIM = 128 # Outputs from semantic-FPN heads are up-scaled to the COMMON_STRIDE stride. _C.MODEL.SEM_SEG_HEAD.COMMON_STRIDE = 4 # Normalization method for the convolution layers. Options: "" (no norm), "GN". _C.MODEL.SEM_SEG_HEAD.NORM = "GN" _C.MODEL.SEM_SEG_HEAD.LOSS_WEIGHT = 1.0 _C.MODEL.PANOPTIC_FPN = CN() # Scaling of all losses from instance detection / segmentation head. _C.MODEL.PANOPTIC_FPN.INSTANCE_LOSS_WEIGHT = 1.0 # options when combining instance & semantic segmentation outputs _C.MODEL.PANOPTIC_FPN.COMBINE = CN({"ENABLED": True}) _C.MODEL.PANOPTIC_FPN.COMBINE.OVERLAP_THRESH = 0.5 _C.MODEL.PANOPTIC_FPN.COMBINE.STUFF_AREA_LIMIT = 4096 _C.MODEL.PANOPTIC_FPN.COMBINE.INSTANCES_CONFIDENCE_THRESH = 0.5 # ---------------------------------------------------------------------------- # # RetinaNet Head # ---------------------------------------------------------------------------- # _C.MODEL.RETINANET = CN() # This is the number of foreground classes. _C.MODEL.RETINANET.NUM_CLASSES = 80 _C.MODEL.RETINANET.IN_FEATURES = ["p3", "p4", "p5", "p6", "p7"] # Convolutions to use in the cls and bbox tower # NOTE: this doesn't include the last conv for logits _C.MODEL.RETINANET.NUM_CONVS = 4 # IoU overlap ratio [bg, fg] for labeling anchors. # Anchors with < bg are labeled negative (0) # Anchors with >= bg and < fg are ignored (-1) # Anchors with >= fg are labeled positive (1) _C.MODEL.RETINANET.IOU_THRESHOLDS = [0.4, 0.5] _C.MODEL.RETINANET.IOU_LABELS = [0, -1, 1] # Prior prob for rare case (i.e. foreground) at the beginning of training. # This is used to set the bias for the logits layer of the classifier subnet. # This improves training stability in the case of heavy class imbalance. _C.MODEL.RETINANET.PRIOR_PROB = 0.01 # Inference cls score threshold, only anchors with score > INFERENCE_TH are # considered for inference (to improve speed) _C.MODEL.RETINANET.SCORE_THRESH_TEST = 0.05 _C.MODEL.RETINANET.TOPK_CANDIDATES_TEST = 1000 _C.MODEL.RETINANET.NMS_THRESH_TEST = 0.5 # Weights on (dx, dy, dw, dh) for normalizing Retinanet anchor regression targets _C.MODEL.RETINANET.BBOX_REG_WEIGHTS = (1.0, 1.0, 1.0, 1.0) # Loss parameters _C.MODEL.RETINANET.FOCAL_LOSS_GAMMA = 2.0 _C.MODEL.RETINANET.FOCAL_LOSS_ALPHA = 0.25 _C.MODEL.RETINANET.SMOOTH_L1_LOSS_BETA = 0.1 # ---------------------------------------------------------------------------- # # ResNe[X]t options (ResNets = {ResNet, ResNeXt} # Note that parts of a resnet may be used for both the backbone and the head # These options apply to both # ---------------------------------------------------------------------------- # _C.MODEL.RESNETS = CN() _C.MODEL.RESNETS.DEPTH = 50 _C.MODEL.RESNETS.OUT_FEATURES = ["res4"] # res4 for C4 backbone, res2..5 for FPN backbone # Number of groups to use; 1 ==> ResNet; > 1 ==> ResNeXt _C.MODEL.RESNETS.NUM_GROUPS = 1 # Options: FrozenBN, GN, "SyncBN", "BN" _C.MODEL.RESNETS.NORM = "FrozenBN" # Baseline width of each group. # Scaling this parameters will scale the width of all bottleneck layers. _C.MODEL.RESNETS.WIDTH_PER_GROUP = 64 # Place the stride 2 conv on the 1x1 filter # Use True only for the original MSRA ResNet; use False for C2 and Torch models _C.MODEL.RESNETS.STRIDE_IN_1X1 = True # Apply dilation in stage "res5" _C.MODEL.RESNETS.RES5_DILATION = 1 # Output width of res2. Scaling this parameters will scale the width of all 1x1 convs in ResNet _C.MODEL.RESNETS.RES2_OUT_CHANNELS = 256 _C.MODEL.RESNETS.STEM_OUT_CHANNELS = 64 # Apply Deformable Convolution in stages # Specify if apply deform_conv on Res2, Res3, Res4, Res5 _C.MODEL.RESNETS.DEFORM_ON_PER_STAGE = [False, False, False, False] # Use True to use modulated deform_conv (DeformableV2, https://arxiv.org/abs/1811.11168); # Use False for DeformableV1. _C.MODEL.RESNETS.DEFORM_MODULATED = False # Number of groups in deformable conv. _C.MODEL.RESNETS.DEFORM_NUM_GROUPS = 1 # ---------------------------------------------------------------------------- # # Solver # ---------------------------------------------------------------------------- # _C.SOLVER = CN() # See detectron2/solver/build.py for LR scheduler options _C.SOLVER.LR_SCHEDULER_NAME = "WarmupMultiStepLR" _C.SOLVER.MAX_ITER = 40000 _C.SOLVER.BASE_LR = 0.001 _C.SOLVER.MOMENTUM = 0.9 _C.SOLVER.WEIGHT_DECAY = 0.0001 # The weight decay that's applied to parameters of normalization layers # (typically the affine transformation) _C.SOLVER.WEIGHT_DECAY_NORM = 0.0 _C.SOLVER.GAMMA = 0.1 _C.SOLVER.STEPS = (30000,) _C.SOLVER.WARMUP_FACTOR = 1.0 / 1000 _C.SOLVER.WARMUP_ITERS = 1000 _C.SOLVER.WARMUP_METHOD = "linear" _C.SOLVER.CHECKPOINT_PERIOD = 5000 # Number of images per batch across all machines. # If we have 16 GPUs and IMS_PER_BATCH = 32, # each GPU will see 2 images per batch. _C.SOLVER.IMS_PER_BATCH = 16 # Detectron v1 (and previous detection code) used a 2x higher LR and 0 WD for # biases. This is not useful (at least for recent models). You should avoid # changing these and they exist only to reproduce Detectron v1 training if # desired. _C.SOLVER.BIAS_LR_FACTOR = 1.0 _C.SOLVER.WEIGHT_DECAY_BIAS = _C.SOLVER.WEIGHT_DECAY # ---------------------------------------------------------------------------- # # Specific test options # ---------------------------------------------------------------------------- # _C.TEST = CN() # For end-to-end tests to verify the expected accuracy. # Each item is [task, metric, value, tolerance] # e.g.: [['bbox', 'AP', 38.5, 0.2]] _C.TEST.EXPECTED_RESULTS = [] # The period (in terms of steps) to evaluate the model during training. # Set to 0 to disable. _C.TEST.EVAL_PERIOD = 0 # The sigmas used to calculate keypoint OKS. # When empty it will use the defaults in COCO. # Otherwise it should have the same length as ROI_KEYPOINT_HEAD.NUM_KEYPOINTS. _C.TEST.KEYPOINT_OKS_SIGMAS = [] # Maximum number of detections to return per image during inference (100 is # based on the limit established for the COCO dataset). _C.TEST.DETECTIONS_PER_IMAGE = 100 _C.TEST.AUG = CN({"ENABLED": False}) _C.TEST.AUG.MIN_SIZES = (400, 500, 600, 700, 800, 900, 1000, 1100, 1200) _C.TEST.AUG.MAX_SIZE = 4000 _C.TEST.AUG.FLIP = True _C.TEST.PRECISE_BN = CN({"ENABLED": False}) _C.TEST.PRECISE_BN.NUM_ITER = 200 # ---------------------------------------------------------------------------- # # Misc options # ---------------------------------------------------------------------------- # # Directory where output files are written _C.OUTPUT_DIR = "./output" # Set seed to negative to fully randomize everything. # Set seed to positive to use a fixed seed. Note that a fixed seed does not # guarantee fully deterministic behavior. _C.SEED = -1 # Benchmark different cudnn algorithms. It has large overhead for about 10k # iterations. It usually hurts total time, but can benefit for certain models. _C.CUDNN_BENCHMARK = False # global config is for quick hack purposes. # You can set them in command line or config files, # and access it with: # # from detectron2.config import global_cfg # print(global_cfg.HACK) # # Do not commit any configs into it. _C.GLOBAL = CN() _C.GLOBAL.HACK = 1.0 ================================================ FILE: detectron2/data/__init__.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from . import transforms # isort:skip from .build import ( build_detection_test_loader, build_detection_train_loader, get_detection_dataset_dicts, load_proposals_into_dataset, print_instances_class_histogram, ) from .catalog import DatasetCatalog, MetadataCatalog from .common import DatasetFromList, MapDataset from .dataset_mapper import DatasetMapper # ensure the builtin datasets are registered from . import datasets, samplers # isort:skip __all__ = [k for k in globals().keys() if not k.startswith("_")] ================================================ FILE: detectron2/data/build.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import bisect import copy import itertools import logging import numpy as np import pickle import torch.utils.data from fvcore.common.file_io import PathManager from tabulate import tabulate from termcolor import colored from detectron2.structures import BoxMode from detectron2.utils.comm import get_world_size from detectron2.utils.env import seed_all_rng from detectron2.utils.logger import log_first_n from . import samplers from .catalog import DatasetCatalog, MetadataCatalog from .common import DatasetFromList, MapDataset from .dataset_mapper import DatasetMapper from .detection_utils import check_metadata_consistency """ This file contains the default logic to build a dataloader for training or testing. """ __all__ = [ "build_detection_train_loader", "build_detection_test_loader", "get_detection_dataset_dicts", "load_proposals_into_dataset", "print_instances_class_histogram", ] def filter_images_with_only_crowd_annotations(dataset_dicts): """ Filter out images with none annotations or only crowd annotations (i.e., images without non-crowd annotations). A common training-time preprocessing on COCO dataset. Args: dataset_dicts (list[dict]): annotations in Detectron2 Dataset format. Returns: list[dict]: the same format, but filtered. """ num_before = len(dataset_dicts) def valid(anns): for ann in anns: if ann.get("iscrowd", 0) == 0: return True return False dataset_dicts = [x for x in dataset_dicts if valid(x["annotations"])] num_after = len(dataset_dicts) logger = logging.getLogger(__name__) logger.info( "Removed {} images with no usable annotations. {} images left.".format( num_before - num_after, num_after ) ) return dataset_dicts def filter_images_with_few_keypoints(dataset_dicts, min_keypoints_per_image): """ Filter out images with too few number of keypoints. Args: dataset_dicts (list[dict]): annotations in Detectron2 Dataset format. Returns: list[dict]: the same format as dataset_dicts, but filtered. """ num_before = len(dataset_dicts) def visible_keypoints_in_image(dic): # Each keypoints field has the format [x1, y1, v1, ...], where v is visibility annotations = dic["association_anno"] return sum( (np.array(ann["keypoints"][2::3]) > 0).sum() for ann in annotations if "keypoints" in ann ) dataset_dicts = [ x for x in dataset_dicts if visible_keypoints_in_image(x) >= min_keypoints_per_image ] num_after = len(dataset_dicts) logger = logging.getLogger(__name__) logger.info( "Removed {} images with fewer than {} keypoints.".format( num_before - num_after, min_keypoints_per_image ) ) return dataset_dicts def load_proposals_into_dataset(dataset_dicts, proposal_file): """ Load precomputed object proposals into the dataset. Args: dataset_dicts (list[dict]): annotations in Detectron2 Dataset format. proposal_file (str): file path of pre-computed proposals, in pkl format. Returns: list[dict]: the same format as dataset_dicts, but added proposal field. """ logger = logging.getLogger(__name__) logger.info("Loading proposals from: {}".format(proposal_file)) with PathManager.open(proposal_file, "rb") as f: proposals = pickle.load(f, encoding="latin1") # Rename the key names in D1 proposal files rename_keys = {"indexes": "ids", "scores": "objectness_logits"} for key in rename_keys: if key in proposals: proposals[rename_keys[key]] = proposals.pop(key) # Remove proposals whose ids are not in dataset img_ids = set({entry["image_id"] for entry in dataset_dicts}) keep = [i for i, id in enumerate(proposals["ids"]) if id in img_ids] # Sort proposals by ids following the image order in dataset keep = sorted(keep) for key in ["boxes", "ids", "objectness_logits"]: proposals[key] = [proposals[key][i] for i in keep] # Assuming default bbox_mode of precomputed proposals are 'XYXY_ABS' bbox_mode = BoxMode(proposals["bbox_mode"]) if "bbox_mode" in proposals else BoxMode.XYXY_ABS for i, record in enumerate(dataset_dicts): # Sanity check that these proposals are for the correct image id assert record["image_id"] == proposals["ids"][i] boxes = proposals["boxes"][i] objectness_logits = proposals["objectness_logits"][i] # Sort the proposals in descending order of the scores inds = objectness_logits.argsort()[::-1] record["proposal_boxes"] = boxes[inds] record["proposal_objectness_logits"] = objectness_logits[inds] record["proposal_bbox_mode"] = bbox_mode record["proposal_light"] = proposals['light'][i][inds] return dataset_dicts def _quantize(x, bin_edges): bin_edges = copy.copy(bin_edges) bin_edges = sorted(bin_edges) quantized = list(map(lambda y: bisect.bisect_right(bin_edges, y), x)) return quantized def print_instances_class_histogram(dataset_dicts, class_names): """ Args: dataset_dicts (list[dict]): list of dataset dicts. class_names (list[str]): list of class names (zero-indexed). """ num_classes = len(class_names) hist_bins = np.arange(num_classes + 1) histogram = np.zeros((num_classes,), dtype=np.int) for entry in dataset_dicts: annos = entry["annotations"] classes = [x["category_id"] for x in annos if not x.get("iscrowd", 0)] histogram += np.histogram(classes, bins=hist_bins)[0] N_COLS = min(6, len(class_names) * 2) def short_name(x): # make long class names shorter. useful for lvis if len(x) > 13: return x[:11] + ".." return x data = list( itertools.chain(*[[short_name(class_names[i]), int(v)] for i, v in enumerate(histogram)]) ) total_num_instances = sum(data[1::2]) data.extend([None] * (N_COLS - (len(data) % N_COLS))) if num_classes > 1: data.extend(["total", total_num_instances]) data = itertools.zip_longest(*[data[i::N_COLS] for i in range(N_COLS)]) table = tabulate( data, headers=["category", "#instances"] * (N_COLS // 2), tablefmt="pipe", numalign="left", stralign="center", ) log_first_n( logging.INFO, "Distribution of training instances among all {} categories:\n".format(num_classes) + colored(table, "cyan"), key="message", ) def build_batch_data_sampler( sampler, images_per_batch, group_bin_edges=None, grouping_features=None ): """ Return a dataset index sampler that batches dataset indices possibly with grouping to improve training efficiency. Args: sampler (torch.utils.data.sampler.Sampler): any subclass of :class:`torch.utils.data.sampler.Sampler`. images_per_batch (int): the batch size. Note that the sampler may return batches that have between 1 and images_per_batch (inclusive) elements because the underlying index set (and grouping partitions, if grouping is used) may not be divisible by images_per_batch. group_bin_edges (None, list[number], tuple[number]): If None, then grouping is disabled. If a list or tuple is given, the values are used as bin edges for defining len(group_bin_edges) + 1 groups. When batches are sampled, only elements from the same group are returned together. grouping_features (None, list[number], tuple[number]): If None, then grouping is disabled. If a list or tuple is given, it must specify for each index in the underlying dataset the value to be used for placing that dataset index into one of the grouping bins. Returns: A BatchSampler or subclass of BatchSampler. """ if group_bin_edges and grouping_features: assert isinstance(group_bin_edges, (list, tuple)) assert isinstance(grouping_features, (list, tuple)) group_ids = _quantize(grouping_features, group_bin_edges) batch_sampler = samplers.GroupedBatchSampler(sampler, group_ids, images_per_batch) else: batch_sampler = torch.utils.data.sampler.BatchSampler( sampler, images_per_batch, drop_last=True ) # drop last so the batch always have the same size # NOTE when we add batch inference support, make sure not to use this. return batch_sampler def get_detection_dataset_dicts( dataset_names, filter_empty=True, min_keypoints=0, proposal_files=None ): """ Load and prepare dataset dicts for instance detection/segmentation and semantic segmentation. Args: dataset_names (list[str]): a list of dataset names filter_empty (bool): whether to filter out images without instance annotations min_keypoints (int): filter out images with fewer keypoints than `min_keypoints`. Set to 0 to do nothing. proposal_files (list[str]): if given, a list of object proposal files that match each dataset in `dataset_names`. """ assert len(dataset_names) dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in dataset_names] if proposal_files is not None: assert len(dataset_names) == len(proposal_files) # load precomputed proposals from proposal files dataset_dicts = [ load_proposals_into_dataset(dataset_i_dicts, proposal_file) for dataset_i_dicts, proposal_file in zip(dataset_dicts, proposal_files) ] dataset_dicts = list(itertools.chain.from_iterable(dataset_dicts)) has_instances = "annotations" in dataset_dicts[0] # Keep images without instance-level GT if the dataset has semantic labels. if filter_empty and has_instances and "sem_seg_file_name" not in dataset_dicts[0]: dataset_dicts = filter_images_with_only_crowd_annotations(dataset_dicts) if min_keypoints > 0 and has_instances: dataset_dicts = filter_images_with_few_keypoints(dataset_dicts, min_keypoints) if has_instances: try: class_names = MetadataCatalog.get(dataset_names[0]).thing_classes check_metadata_consistency("thing_classes", dataset_names) print_instances_class_histogram(dataset_dicts, class_names) except AttributeError: # class names are not available for this dataset pass return dataset_dicts def build_detection_train_loader(cfg, mapper=None): """ A data loader is created by the following steps: 1. Use the dataset names in config to query :class:`DatasetCatalog`, and obtain a list of dicts. 2. Start workers to work on the dicts. Each worker will: * Map each metadata dict into another format to be consumed by the model. * Batch them by simply putting dicts into a list. The batched ``list[mapped_dict]`` is what this dataloader will return. Args: cfg (CfgNode): the config mapper (callable): a callable which takes a sample (dict) from dataset and returns the format to be consumed by the model. By default it will be `DatasetMapper(cfg, True)`. Returns: a torch DataLoader object """ num_workers = get_world_size() images_per_batch = cfg.SOLVER.IMS_PER_BATCH assert ( images_per_batch % num_workers == 0 ), "SOLVER.IMS_PER_BATCH ({}) must be divisible by the number of workers ({}).".format( images_per_batch, num_workers ) assert ( images_per_batch >= num_workers ), "SOLVER.IMS_PER_BATCH ({}) must be larger than the number of workers ({}).".format( images_per_batch, num_workers ) images_per_worker = images_per_batch // num_workers dataset_dicts = get_detection_dataset_dicts( cfg.DATASETS.TRAIN, filter_empty=True, min_keypoints=cfg.MODEL.ROI_KEYPOINT_HEAD.MIN_KEYPOINTS_PER_IMAGE if cfg.MODEL.KEYPOINT_ON else 0, proposal_files=cfg.DATASETS.PROPOSAL_FILES_TRAIN if cfg.MODEL.LOAD_PROPOSALS else None, ) # print(dataset_dicts[0]) # assert 1 ==0 dataset = DatasetFromList(dataset_dicts, copy=False) # Bin edges for batching images with similar aspect ratios. If ASPECT_RATIO_GROUPING # is enabled, we define two bins with an edge at height / width = 1. group_bin_edges = [1] if cfg.DATALOADER.ASPECT_RATIO_GROUPING else [] aspect_ratios = [float(img["height"]) / float(img["width"]) for img in dataset] if mapper is None: mapper = DatasetMapper(cfg, True) dataset = MapDataset(dataset, mapper) sampler_name = cfg.DATALOADER.SAMPLER_TRAIN logger = logging.getLogger(__name__) logger.info("Using training sampler {}".format(sampler_name)) if sampler_name == "TrainingSampler": sampler = samplers.TrainingSampler(len(dataset)) elif sampler_name == "RepeatFactorTrainingSampler": sampler = samplers.RepeatFactorTrainingSampler( dataset_dicts, cfg.DATALOADER.REPEAT_THRESHOLD ) else: raise ValueError("Unknown training sampler: {}".format(sampler_name)) batch_sampler = build_batch_data_sampler( sampler, images_per_worker, group_bin_edges, aspect_ratios ) data_loader = torch.utils.data.DataLoader( dataset, num_workers=cfg.DATALOADER.NUM_WORKERS, batch_sampler=batch_sampler, collate_fn=trivial_batch_collator, worker_init_fn=worker_init_reset_seed, ) return data_loader def build_detection_test_loader(cfg, dataset_name, mapper=None): """ Similar to `build_detection_train_loader`. But this function uses the given `dataset_name` argument (instead of the names in cfg), and uses batch size 1. Args: cfg: a detectron2 CfgNode dataset_name (str): a name of the dataset that's available in the DatasetCatalog mapper (callable): a callable which takes a sample (dict) from dataset and returns the format to be consumed by the model. By default it will be `DatasetMapper(cfg, False)`. Returns: DataLoader: a torch DataLoader, that loads the given detection dataset, with test-time transformation and batching. """ dataset_dicts = get_detection_dataset_dicts( [dataset_name], filter_empty=False, proposal_files=[ cfg.DATASETS.PROPOSAL_FILES_TEST[list(cfg.DATASETS.TEST).index(dataset_name)] ] if cfg.MODEL.LOAD_PROPOSALS else None, ) dataset = DatasetFromList(dataset_dicts) if mapper is None: mapper = DatasetMapper(cfg, False) dataset = MapDataset(dataset, mapper) sampler = samplers.InferenceSampler(len(dataset)) # Always use 1 image per worker during inference since this is the # standard when reporting inference time in papers. batch_sampler = torch.utils.data.sampler.BatchSampler(sampler, 1, drop_last=False) data_loader = torch.utils.data.DataLoader( dataset, num_workers=cfg.DATALOADER.NUM_WORKERS, batch_sampler=batch_sampler, collate_fn=trivial_batch_collator, ) return data_loader def trivial_batch_collator(batch): """ A batch collator that does nothing. """ return batch def worker_init_reset_seed(worker_id): seed_all_rng(np.random.randint(2 ** 31) + worker_id) ================================================ FILE: detectron2/data/catalog.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy import logging import types from typing import List from detectron2.utils.logger import log_first_n __all__ = ["DatasetCatalog", "MetadataCatalog"] class DatasetCatalog(object): """ A catalog that stores information about the datasets and how to obtain them. It contains a mapping from strings (which are names that identify a dataset, e.g. "coco_2014_train") to a function which parses the dataset and returns the samples in the format of `list[dict]`. The returned dicts should be in Detectron2 Dataset format (See DATASETS.md for details) if used with the data loader functionalities in `data/build.py,data/detection_transform.py`. The purpose of having this catalog is to make it easy to choose different datasets, by just using the strings in the config. """ _REGISTERED = {} @staticmethod def register(name, func): """ Args: name (str): the name that identifies a dataset, e.g. "coco_2014_train". func (callable): a callable which takes no arguments and returns a list of dicts. """ DatasetCatalog._REGISTERED[name] = func @staticmethod def get(name): """ Call the registered function and return its results. Args: name (str): the name that identifies a dataset, e.g. "coco_2014_train". Returns: list[dict]: dataset annotations.0 """ try: f = DatasetCatalog._REGISTERED[name] except KeyError: raise KeyError( "Dataset '{}' is not registered! Available datasets are: {}".format( name, ", ".join(DatasetCatalog._REGISTERED.keys()) ) ) return f() @staticmethod def list() -> List[str]: """ List all registered datasets. Returns: list[str] """ return list(DatasetCatalog._REGISTERED.keys()) @staticmethod def clear(): """ Remove all registered dataset. """ DatasetCatalog._REGISTERED.clear() class Metadata(types.SimpleNamespace): """ A class that supports simple attribute setter/getter. It is intended for storing metadata of a dataset and make it accessible globally. Examples: .. code-block:: python # somewhere when you load the data: MetadataCatalog.get("mydataset").thing_classes = ["person", "dog"] # somewhere when you print statistics or visualize: classes = MetadataCatalog.get("mydataset").thing_classes """ # the name of the dataset # set default to N/A so that `self.name` in the errors will not trigger getattr again name: str = "N/A" _RENAMED = { "class_names": "thing_classes", "dataset_id_to_contiguous_id": "thing_dataset_id_to_contiguous_id", "stuff_class_names": "stuff_classes", } def __getattr__(self, key): if key in self._RENAMED: log_first_n( logging.WARNING, "Metadata '{}' was renamed to '{}'!".format(key, self._RENAMED[key]), n=10, ) return getattr(self, self._RENAMED[key]) raise AttributeError( "Attribute '{}' does not exist in the metadata of '{}'. Available keys are {}.".format( key, self.name, str(self.__dict__.keys()) ) ) def __setattr__(self, key, val): if key in self._RENAMED: log_first_n( logging.WARNING, "Metadata '{}' was renamed to '{}'!".format(key, self._RENAMED[key]), n=10, ) setattr(self, self._RENAMED[key], val) # Ensure that metadata of the same name stays consistent try: oldval = getattr(self, key) assert oldval == val, ( "Attribute '{}' in the metadata of '{}' cannot be set " "to a different value!\n{} != {}".format(key, self.name, oldval, val) ) except AttributeError: super().__setattr__(key, val) def as_dict(self): """ Returns all the metadata as a dict. Note that modifications to the returned dict will not reflect on the Metadata object. """ return copy.copy(self.__dict__) def set(self, **kwargs): """ Set multiple metadata with kwargs. """ for k, v in kwargs.items(): setattr(self, k, v) return self def get(self, key, default=None): """ Access an attribute and return its value if exists. Otherwise return default. """ try: return getattr(self, key) except AttributeError: return default class MetadataCatalog: """ MetadataCatalog provides access to "Metadata" of a given dataset. The metadata associated with a certain name is a singleton: once created, the metadata will stay alive and will be returned by future calls to `get(name)`. It's like global variables, so don't abuse it. It's meant for storing knowledge that's constant and shared across the execution of the program, e.g.: the class names in COCO. """ _NAME_TO_META = {} @staticmethod def get(name): """ Args: name (str): name of a dataset (e.g. coco_2014_train). Returns: Metadata: The :class:`Metadata` instance associated with this name, or create an empty one if none is available. """ assert len(name) if name in MetadataCatalog._NAME_TO_META: ret = MetadataCatalog._NAME_TO_META[name] # TODO this is for the BC breaking change in D15247032. # Remove this in the future. if hasattr(ret, "dataset_name"): logger = logging.getLogger() logger.warning( """ The 'dataset_name' key in metadata is no longer used for sharing metadata among splits after D15247032! Add metadata to each split (now called dataset) separately! """ ) parent_meta = MetadataCatalog.get(ret.dataset_name).as_dict() ret.set(**parent_meta) return ret else: m = MetadataCatalog._NAME_TO_META[name] = Metadata(name=name) return m ================================================ FILE: detectron2/data/common.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy import logging import random import torch.utils.data as data from detectron2.utils.serialize import PicklableWrapper __all__ = ["MapDataset", "DatasetFromList"] class MapDataset(data.Dataset): """ Map a function over the elements in a dataset. Args: dataset: a dataset where map function is applied. map_func: a callable which maps the element in dataset. map_func is responsible for error handling, when error happens, it needs to return None so the MapDataset will randomly use other elements from the dataset. """ def __init__(self, dataset, map_func): self._dataset = dataset self._map_func = PicklableWrapper(map_func) # wrap so that a lambda will work self._rng = random.Random(42) self._fallback_candidates = set(range(len(dataset))) def __len__(self): return len(self._dataset) def __getitem__(self, idx): retry_count = 0 cur_idx = int(idx) while True: data = self._map_func(self._dataset[cur_idx]) if data is not None: self._fallback_candidates.add(cur_idx) return data # _map_func fails for this idx, use a random new index from the pool retry_count += 1 self._fallback_candidates.discard(cur_idx) cur_idx = self._rng.sample(self._fallback_candidates, k=1)[0] if retry_count >= 3: logger = logging.getLogger(__name__) logger.warning( "Failed to apply `_map_func` for idx: {}, retry count: {}".format( idx, retry_count ) ) class DatasetFromList(data.Dataset): """ Wrap a list to a torch Dataset. It produces elements of the list as data. """ def __init__(self, lst: list, copy: bool = True): """ Args: lst (list): a list which contains elements to produce. copy (bool): whether to deepcopy the element when producing it, so that the result can be modified in place without affecting the source in the list. """ self._lst = lst self._copy = copy def __len__(self): return len(self._lst) def __getitem__(self, idx): if self._copy: return copy.deepcopy(self._lst[idx]) else: return self._lst[idx] ================================================ FILE: detectron2/data/dataset_mapper.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy import numpy as np import torch from fvcore.common.file_io import PathManager from PIL import Image from . import detection_utils as utils from . import transforms as T """ This file contains the default mapping that's applied to "dataset dicts". """ __all__ = ["DatasetMapper"] class DatasetMapper: """ A callable which takes a dataset dict in Detectron2 Dataset format, and map it into a format used by the model. This is the default callable to be used to map your dataset dict into training data. You may need to follow it to implement your own one for customized logic. The callable currently does the following: 1. Read the image from "file_name" 2. Applies cropping/geometric transforms to the image and annotations 3. Prepare data and annotations to Tensor and :class:`Instances` """ def __init__(self, cfg, is_train=True): self.tfm_gens = utils.build_transform_gen(cfg, is_train) if cfg.INPUT.CROP.ENABLED and is_train: self.crop_gen = T.RandomCrop(cfg.INPUT.CROP.TYPE, cfg.INPUT.CROP.SIZE) else: self.crop_gen = None # fmt: off self.img_format = cfg.INPUT.FORMAT self.mask_on = cfg.MODEL.MASK_ON self.mask_format = cfg.INPUT.MASK_FORMAT self.keypoint_on = cfg.MODEL.KEYPOINT_ON self.load_proposals = cfg.MODEL.LOAD_PROPOSALS # fmt: on if self.keypoint_on and is_train: # Flip only makes sense in training self.keypoint_hflip_indices = utils.create_keypoint_hflip_indices(cfg.DATASETS.TRAIN) else: self.keypoint_hflip_indices = None if self.load_proposals: self.min_box_side_len = cfg.MODEL.PROPOSAL_GENERATOR.MIN_SIZE self.proposal_topk = ( cfg.DATASETS.PRECOMPUTED_PROPOSAL_TOPK_TRAIN if is_train else cfg.DATASETS.PRECOMPUTED_PROPOSAL_TOPK_TEST ) self.is_train = is_train def __call__(self, dataset_dict): """ Args: dataset_dict (dict): Metadata of one image, in Detectron2 Dataset format. Returns: dict: a format that builtin models in detectron2 accept """ dataset_dict = copy.deepcopy(dataset_dict) # it will be modified by code below # USER: Write your own image loading if it's not from a file image = utils.read_image(dataset_dict["file_name"], format=self.img_format) utils.check_image_size(dataset_dict, image) if "annotations" not in dataset_dict: image, transforms = T.apply_transform_gens( ([self.crop_gen] if self.crop_gen else []) + self.tfm_gens, image ) else: # Crop around an instance if there are instances in the image. # USER: Remove if you don't use cropping if self.crop_gen: crop_tfm = utils.gen_crop_transform_with_instance( self.crop_gen.get_crop_size(image.shape[:2]), image.shape[:2], np.random.choice(dataset_dict["annotations"]), ) image = crop_tfm.apply_image(image) image, transforms = T.apply_transform_gens(self.tfm_gens, image) if self.crop_gen: transforms = crop_tfm + transforms image_shape = image.shape[:2] # h, w # Pytorch's dataloader is efficient on torch.Tensor due to shared-memory, # but not efficient on large generic data structures due to the use of pickle & mp.Queue. # Therefore it's important to use torch.Tensor. dataset_dict["image"] = torch.as_tensor(image.transpose(2, 0, 1).astype("float32")) # Can use uint8 if it turns out to be slow some day # USER: Remove if you don't use pre-computed proposals. if self.load_proposals: utils.transform_proposals( dataset_dict, image_shape, transforms, self.min_box_side_len, self.proposal_topk ) if not self.is_train: dataset_dict.pop("annotations", None) dataset_dict.pop("sem_seg_file_name", None) return dataset_dict if "annotations" in dataset_dict: # USER: Modify this if you want to keep them for some reason. for anno in dataset_dict["annotations"]: if not self.mask_on: anno.pop("segmentation", None) if not self.keypoint_on: anno.pop("keypoints", None) # USER: Implement additional transformations if you have other types of data annos = [ utils.transform_instance_annotations( obj, transforms, image_shape, keypoint_hflip_indices=self.keypoint_hflip_indices ) for obj in dataset_dict.pop("annotations") if obj.get("iscrowd", 0) == 0 ] rela_annos = [ utils.transform_instance_annotations( obj, transforms, image_shape, keypoint_hflip_indices=self.keypoint_hflip_indices ) for obj in dataset_dict.pop("association_anno") if obj.get("iscrowd", 0) == 0 ] instances = utils.annotations_to_instances( annos, image_shape, mask_format="bitmask" ) associations = utils.annotations_to_instances( rela_annos, image_shape, mask_format="bitmask" ) # Create a tight bounding box from masks, useful when image is cropped if self.crop_gen and instances.has("gt_masks"): instances.gt_boxes = instances.gt_masks.get_bounding_boxes() dataset_dict["instances"] = utils.filter_empty_instances(instances) dataset_dict["associations"] = utils.filter_empty_instances(associations) # USER: Remove if you don't do semantic/panoptic segmentation. if "sem_seg_file_name" in dataset_dict: with PathManager.open(dataset_dict.pop("sem_seg_file_name"), "rb") as f: sem_seg_gt = Image.open(f) sem_seg_gt = np.asarray(sem_seg_gt, dtype="uint8") sem_seg_gt = transforms.apply_segmentation(sem_seg_gt) sem_seg_gt = torch.as_tensor(sem_seg_gt.astype("long")) dataset_dict["sem_seg"] = sem_seg_gt return dataset_dict ================================================ FILE: detectron2/data/dataset_mapper.py.bak ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy import numpy as np import torch from fvcore.common.file_io import PathManager from PIL import Image from . import detection_utils as utils from . import transforms as T """ This file contains the default mapping that's applied to "dataset dicts". """ __all__ = ["DatasetMapper"] class DatasetMapper: """ A callable which takes a dataset dict in Detectron2 Dataset format, and map it into a format used by the model. This is the default callable to be used to map your dataset dict into training data. You may need to follow it to implement your own one for customized logic. The callable currently does the following: 1. Read the image from "file_name" 2. Applies cropping/geometric transforms to the image and annotations 3. Prepare data and annotations to Tensor and :class:`Instances` """ def __init__(self, cfg, is_train=True): self.tfm_gens = utils.build_transform_gen(cfg, is_train) if cfg.INPUT.CROP.ENABLED and is_train: self.crop_gen = T.RandomCrop(cfg.INPUT.CROP.TYPE, cfg.INPUT.CROP.SIZE) else: self.crop_gen = None # fmt: off self.img_format = cfg.INPUT.FORMAT self.mask_on = cfg.MODEL.MASK_ON self.mask_format = cfg.INPUT.MASK_FORMAT self.keypoint_on = cfg.MODEL.KEYPOINT_ON self.load_proposals = cfg.MODEL.LOAD_PROPOSALS # fmt: on if self.keypoint_on and is_train: # Flip only makes sense in training self.keypoint_hflip_indices = utils.create_keypoint_hflip_indices(cfg.DATASETS.TRAIN) else: self.keypoint_hflip_indices = None if self.load_proposals: self.min_box_side_len = cfg.MODEL.PROPOSAL_GENERATOR.MIN_SIZE self.proposal_topk = ( cfg.DATASETS.PRECOMPUTED_PROPOSAL_TOPK_TRAIN if is_train else cfg.DATASETS.PRECOMPUTED_PROPOSAL_TOPK_TEST ) self.is_train = is_train def __call__(self, dataset_dict): """ Args: dataset_dict (dict): Metadata of one image, in Detectron2 Dataset format. Returns: dict: a format that builtin models in detectron2 accept """ dataset_dict = copy.deepcopy(dataset_dict) # it will be modified by code below # USER: Write your own image loading if it's not from a file image = utils.read_image(dataset_dict["file_name"], format=self.img_format) utils.check_image_size(dataset_dict, image) if "annotations" not in dataset_dict: image, transforms = T.apply_transform_gens( ([self.crop_gen] if self.crop_gen else []) + self.tfm_gens, image ) else: # Crop around an instance if there are instances in the image. # USER: Remove if you don't use cropping if self.crop_gen: crop_tfm = utils.gen_crop_transform_with_instance( self.crop_gen.get_crop_size(image.shape[:2]), image.shape[:2], np.random.choice(dataset_dict["annotations"]), ) image = crop_tfm.apply_image(image) image, transforms = T.apply_transform_gens(self.tfm_gens, image) if self.crop_gen: transforms = crop_tfm + transforms image_shape = image.shape[:2] # h, w # Pytorch's dataloader is efficient on torch.Tensor due to shared-memory, # but not efficient on large generic data structures due to the use of pickle & mp.Queue. # Therefore it's important to use torch.Tensor. dataset_dict["image"] = torch.as_tensor(image.transpose(2, 0, 1).astype("float32")) # Can use uint8 if it turns out to be slow some day # USER: Remove if you don't use pre-computed proposals. if self.load_proposals: utils.transform_proposals( dataset_dict, image_shape, transforms, self.min_box_side_len, self.proposal_topk ) if not self.is_train: dataset_dict.pop("annotations", None) dataset_dict.pop("sem_seg_file_name", None) return dataset_dict if "annotations" in dataset_dict: # USER: Modify this if you want to keep them for some reason. for anno in dataset_dict["annotations"]: if not self.mask_on: anno.pop("segmentation", None) if not self.keypoint_on: anno.pop("keypoints", None) # USER: Implement additional transformations if you have other types of data annos = [ utils.transform_instance_annotations( obj, transforms, image_shape, keypoint_hflip_indices=self.keypoint_hflip_indices ) for obj in dataset_dict.pop("annotations") if obj.get("iscrowd", 0) == 0 ] instances = utils.annotations_to_instances( annos, image_shape, mask_format=self.mask_format ) # Create a tight bounding box from masks, useful when image is cropped if self.crop_gen and instances.has("gt_masks"): instances.gt_boxes = instances.gt_masks.get_bounding_boxes() dataset_dict["instances"] = utils.filter_empty_instances(instances) # USER: Remove if you don't do semantic/panoptic segmentation. if "sem_seg_file_name" in dataset_dict: with PathManager.open(dataset_dict.pop("sem_seg_file_name"), "rb") as f: sem_seg_gt = Image.open(f) sem_seg_gt = np.asarray(sem_seg_gt, dtype="uint8") sem_seg_gt = transforms.apply_segmentation(sem_seg_gt) sem_seg_gt = torch.as_tensor(sem_seg_gt.astype("long")) dataset_dict["sem_seg"] = sem_seg_gt return dataset_dict ================================================ FILE: detectron2/data/datasets/README.md ================================================ ### Common Datasets The dataset implemented here do not need to load the data into the final format. It should provide the minimal data structure needed to use the dataset, so it can be very efficient. For example, for an image dataset, just provide the file names and labels, but don't read the images. Let the downstream decide how to read. ================================================ FILE: detectron2/data/datasets/__init__.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .cityscapes import load_cityscapes_instances from .soba import load_soba_json, load_sem_seg from .lvis import load_lvis_json, register_lvis_instances, get_lvis_instances_meta from .register_soba import register_soba_instances from . import builtin # ensure the builtin datasets are registered __all__ = [k for k in globals().keys() if "builtin" not in k and not k.startswith("_")] ================================================ FILE: detectron2/data/datasets/builtin.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ This file registers pre-defined datasets at hard-coded paths, and their metadata. We hard-code metadata for common datasets. This will enable: 1. Consistency check when loading the datasets 2. Use models on these standard datasets directly and run demos, without having to download the dataset annotations We hard-code some paths to the dataset that's assumed to exist in "./datasets/". Users SHOULD NOT use this file to create new dataset / metadata for new dataset. To add new dataset, refer to the tutorial "docs/DATASETS.md". """ import os from detectron2.data import MetadataCatalog, DatasetCatalog from .register_coco import register_coco_instances, register_coco_panoptic_separated from .lvis import register_lvis_instances, get_lvis_instances_meta from .cityscapes import load_cityscapes_instances, load_cityscapes_semantic from .pascal_voc import register_pascal_voc from .builtin_meta import _get_builtin_metadata # ==== Predefined datasets and splits for COCO ========== _PREDEFINED_SPLITS_COCO = {} _PREDEFINED_SPLITS_COCO["coco"] = { "coco_2014_train": ("coco/train2014", "coco/annotations/instances_train2014.json"), "coco_2014_val": ("coco/val2014", "coco/annotations/instances_val2014.json"), "coco_2014_minival": ("coco/val2014", "coco/annotations/instances_minival2014.json"), "coco_2014_minival_100": ("coco/val2014", "coco/annotations/instances_minival2014_100.json"), "coco_2014_valminusminival": ( "coco/val2014", "coco/annotations/instances_valminusminival2014.json", ), "coco_2017_train": ("coco/train2017", "coco/annotations/instances_train2017.json"), "coco_2017_val": ("coco/val2017", "coco/annotations/instances_val2017.json"), "coco_2017_val_100": ("coco/val2017", "coco/annotations/instances_val2017_100.json"), } _PREDEFINED_SPLITS_COCO["coco_person"] = { "keypoints_coco_2014_train": ( "coco/train2014", "coco/annotations/person_keypoints_train2014.json", ), "keypoints_coco_2014_val": ("coco/val2014", "coco/annotations/person_keypoints_val2014.json"), "keypoints_coco_2014_minival": ( "coco/val2014", "coco/annotations/person_keypoints_minival2014.json", ), "keypoints_coco_2014_valminusminival": ( "coco/val2014", "coco/annotations/person_keypoints_valminusminival2014.json", ), "keypoints_coco_2014_minival_100": ( "coco/val2014", "coco/annotations/person_keypoints_minival2014_100.json", ), "keypoints_coco_2017_train": ( "coco/train2017", "coco/annotations/person_keypoints_train2017.json", ), "keypoints_coco_2017_val": ("coco/val2017", "coco/annotations/person_keypoints_val2017.json"), "keypoints_coco_2017_val_100": ( "coco/val2017", "coco/annotations/person_keypoints_val2017_100.json", ), } _PREDEFINED_SPLITS_COCO_PANOPTIC = { "coco_2017_train_panoptic": ( # This is the original panoptic annotation directory "coco/panoptic_train2017", "coco/annotations/panoptic_train2017.json", # This directory contains semantic annotations that are # converted from panoptic annotations. # It is used by PanopticFPN. # You can use the script at detectron2/datasets/prepare_panoptic_fpn.py # to create these directories. "coco/panoptic_stuff_train2017", ), "coco_2017_val_panoptic": ( "coco/panoptic_val2017", "coco/annotations/panoptic_val2017.json", "coco/panoptic_stuff_val2017", ), "coco_2017_val_100_panoptic": ( "coco/panoptic_val2017_100", "coco/annotations/panoptic_val2017_100.json", "coco/panoptic_stuff_val2017_100", ), } def register_all_coco(root="datasets"): for dataset_name, splits_per_dataset in _PREDEFINED_SPLITS_COCO.items(): for key, (image_root, json_file) in splits_per_dataset.items(): # Assume pre-defined datasets live in `./datasets`. register_coco_instances( key, _get_builtin_metadata(dataset_name), os.path.join(root, json_file) if "://" not in json_file else json_file, os.path.join(root, image_root), ) for ( prefix, (panoptic_root, panoptic_json, semantic_root), ) in _PREDEFINED_SPLITS_COCO_PANOPTIC.items(): prefix_instances = prefix[: -len("_panoptic")] instances_meta = MetadataCatalog.get(prefix_instances) image_root, instances_json = instances_meta.image_root, instances_meta.json_file register_coco_panoptic_separated( prefix, _get_builtin_metadata("coco_panoptic_separated"), image_root, os.path.join(root, panoptic_root), os.path.join(root, panoptic_json), os.path.join(root, semantic_root), instances_json, ) # ==== Predefined datasets and splits for LVIS ========== _PREDEFINED_SPLITS_LVIS = { "lvis_v0.5": { "lvis_v0.5_train": ("coco/train2017", "lvis/lvis_v0.5_train.json"), "lvis_v0.5_val": ("coco/val2017", "lvis/lvis_v0.5_val.json"), "lvis_v0.5_val_rand_100": ("coco/val2017", "lvis/lvis_v0.5_val_rand_100.json"), "lvis_v0.5_test": ("coco/test2017", "lvis/lvis_v0.5_image_info_test.json"), } } def register_all_lvis(root="datasets"): for dataset_name, splits_per_dataset in _PREDEFINED_SPLITS_LVIS.items(): for key, (image_root, json_file) in splits_per_dataset.items(): # Assume pre-defined datasets live in `./datasets`. register_lvis_instances( key, get_lvis_instances_meta(dataset_name), os.path.join(root, json_file) if "://" not in json_file else json_file, os.path.join(root, image_root), ) # ==== Predefined splits for raw cityscapes images =========== _RAW_CITYSCAPES_SPLITS = { "cityscapes_fine_{task}_train": ("cityscapes/leftImg8bit/train", "cityscapes/gtFine/train"), "cityscapes_fine_{task}_val": ("cityscapes/leftImg8bit/val", "cityscapes/gtFine/val"), "cityscapes_fine_{task}_test": ("cityscapes/leftImg8bit/test", "cityscapes/gtFine/test"), } def register_all_cityscapes(root="datasets"): for key, (image_dir, gt_dir) in _RAW_CITYSCAPES_SPLITS.items(): meta = _get_builtin_metadata("cityscapes") image_dir = os.path.join(root, image_dir) gt_dir = os.path.join(root, gt_dir) inst_key = key.format(task="instance_seg") DatasetCatalog.register( inst_key, lambda x=image_dir, y=gt_dir: load_cityscapes_instances( x, y, from_json=True, to_polygons=True ), ) MetadataCatalog.get(inst_key).set( image_dir=image_dir, gt_dir=gt_dir, evaluator_type="cityscapes", **meta ) sem_key = key.format(task="sem_seg") DatasetCatalog.register( sem_key, lambda x=image_dir, y=gt_dir: load_cityscapes_semantic(x, y) ) MetadataCatalog.get(sem_key).set( image_dir=image_dir, gt_dir=gt_dir, evaluator_type="sem_seg", **meta ) # ==== Predefined splits for PASCAL VOC =========== def register_all_pascal_voc(root="datasets"): SPLITS = [ ("voc_2007_trainval", "VOC2007", "trainval"), ("voc_2007_train", "VOC2007", "train"), ("voc_2007_val", "VOC2007", "val"), ("voc_2007_test", "VOC2007", "test"), ("voc_2012_trainval", "VOC2012", "trainval"), ("voc_2012_train", "VOC2012", "train"), ("voc_2012_val", "VOC2012", "val"), ] for name, dirname, split in SPLITS: year = 2007 if "2007" in name else 2012 register_pascal_voc(name, os.path.join(root, dirname), split, year) MetadataCatalog.get(name).evaluator_type = "pascal_voc" # Register them all under "./datasets" register_all_coco() register_all_lvis() register_all_cityscapes() register_all_pascal_voc() ================================================ FILE: detectron2/data/datasets/builtin_meta.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # All coco categories, together with their nice-looking visualization colors # It's from https://github.com/cocodataset/panopticapi/blob/master/panoptic_coco_categories.json COCO_CATEGORIES = [ {"color": [220, 20, 60], "isthing": 1, "id": 1, "name": "person"}, {"color": [119, 11, 32], "isthing": 1, "id": 2, "name": "bicycle"}, {"color": [0, 0, 142], "isthing": 1, "id": 3, "name": "car"}, {"color": [0, 0, 230], "isthing": 1, "id": 4, "name": "motorcycle"}, {"color": [106, 0, 228], "isthing": 1, "id": 5, "name": "airplane"}, {"color": [0, 60, 100], "isthing": 1, "id": 6, "name": "bus"}, {"color": [0, 80, 100], "isthing": 1, "id": 7, "name": "train"}, {"color": [0, 0, 70], "isthing": 1, "id": 8, "name": "truck"}, {"color": [0, 0, 192], "isthing": 1, "id": 9, "name": "boat"}, {"color": [250, 170, 30], "isthing": 1, "id": 10, "name": "traffic light"}, {"color": [100, 170, 30], "isthing": 1, "id": 11, "name": "fire hydrant"}, {"color": [220, 220, 0], "isthing": 1, "id": 13, "name": "stop sign"}, {"color": [175, 116, 175], "isthing": 1, "id": 14, "name": "parking meter"}, {"color": [250, 0, 30], "isthing": 1, "id": 15, "name": "bench"}, {"color": [165, 42, 42], "isthing": 1, "id": 16, "name": "bird"}, {"color": [255, 77, 255], "isthing": 1, "id": 17, "name": "cat"}, {"color": [0, 226, 252], "isthing": 1, "id": 18, "name": "dog"}, {"color": [182, 182, 255], "isthing": 1, "id": 19, "name": "horse"}, {"color": [0, 82, 0], "isthing": 1, "id": 20, "name": "sheep"}, {"color": [120, 166, 157], "isthing": 1, "id": 21, "name": "cow"}, {"color": [110, 76, 0], "isthing": 1, "id": 22, "name": "elephant"}, {"color": [174, 57, 255], "isthing": 1, "id": 23, "name": "bear"}, {"color": [199, 100, 0], "isthing": 1, "id": 24, "name": "zebra"}, {"color": [72, 0, 118], "isthing": 1, "id": 25, "name": "giraffe"}, {"color": [255, 179, 240], "isthing": 1, "id": 27, "name": "backpack"}, {"color": [0, 125, 92], "isthing": 1, "id": 28, "name": "umbrella"}, {"color": [209, 0, 151], "isthing": 1, "id": 31, "name": "handbag"}, {"color": [188, 208, 182], "isthing": 1, "id": 32, "name": "tie"}, {"color": [0, 220, 176], "isthing": 1, "id": 33, "name": "suitcase"}, {"color": [255, 99, 164], "isthing": 1, "id": 34, "name": "frisbee"}, {"color": [92, 0, 73], "isthing": 1, "id": 35, "name": "skis"}, {"color": [133, 129, 255], "isthing": 1, "id": 36, "name": "snowboard"}, {"color": [78, 180, 255], "isthing": 1, "id": 37, "name": "sports ball"}, {"color": [0, 228, 0], "isthing": 1, "id": 38, "name": "kite"}, {"color": [174, 255, 243], "isthing": 1, "id": 39, "name": "baseball bat"}, {"color": [45, 89, 255], "isthing": 1, "id": 40, "name": "baseball glove"}, {"color": [134, 134, 103], "isthing": 1, "id": 41, "name": "skateboard"}, {"color": [145, 148, 174], "isthing": 1, "id": 42, "name": "surfboard"}, {"color": [255, 208, 186], "isthing": 1, "id": 43, "name": "tennis racket"}, {"color": [197, 226, 255], "isthing": 1, "id": 44, "name": "bottle"}, {"color": [171, 134, 1], "isthing": 1, "id": 46, "name": "wine glass"}, {"color": [109, 63, 54], "isthing": 1, "id": 47, "name": "cup"}, {"color": [207, 138, 255], "isthing": 1, "id": 48, "name": "fork"}, {"color": [151, 0, 95], "isthing": 1, "id": 49, "name": "knife"}, {"color": [9, 80, 61], "isthing": 1, "id": 50, "name": "spoon"}, {"color": [84, 105, 51], "isthing": 1, "id": 51, "name": "bowl"}, {"color": [74, 65, 105], "isthing": 1, "id": 52, "name": "banana"}, {"color": [166, 196, 102], "isthing": 1, "id": 53, "name": "apple"}, {"color": [208, 195, 210], "isthing": 1, "id": 54, "name": "sandwich"}, {"color": [255, 109, 65], "isthing": 1, "id": 55, "name": "orange"}, {"color": [0, 143, 149], "isthing": 1, "id": 56, "name": "broccoli"}, {"color": [179, 0, 194], "isthing": 1, "id": 57, "name": "carrot"}, {"color": [209, 99, 106], "isthing": 1, "id": 58, "name": "hot dog"}, {"color": [5, 121, 0], "isthing": 1, "id": 59, "name": "pizza"}, {"color": [227, 255, 205], "isthing": 1, "id": 60, "name": "donut"}, {"color": [147, 186, 208], "isthing": 1, "id": 61, "name": "cake"}, {"color": [153, 69, 1], "isthing": 1, "id": 62, "name": "chair"}, {"color": [3, 95, 161], "isthing": 1, "id": 63, "name": "couch"}, {"color": [163, 255, 0], "isthing": 1, "id": 64, "name": "potted plant"}, {"color": [119, 0, 170], "isthing": 1, "id": 65, "name": "bed"}, {"color": [0, 182, 199], "isthing": 1, "id": 67, "name": "dining table"}, {"color": [0, 165, 120], "isthing": 1, "id": 70, "name": "toilet"}, {"color": [183, 130, 88], "isthing": 1, "id": 72, "name": "tv"}, {"color": [95, 32, 0], "isthing": 1, "id": 73, "name": "laptop"}, {"color": [130, 114, 135], "isthing": 1, "id": 74, "name": "mouse"}, {"color": [110, 129, 133], "isthing": 1, "id": 75, "name": "remote"}, {"color": [166, 74, 118], "isthing": 1, "id": 76, "name": "keyboard"}, {"color": [219, 142, 185], "isthing": 1, "id": 77, "name": "cell phone"}, {"color": [79, 210, 114], "isthing": 1, "id": 78, "name": "microwave"}, {"color": [178, 90, 62], "isthing": 1, "id": 79, "name": "oven"}, {"color": [65, 70, 15], "isthing": 1, "id": 80, "name": "toaster"}, {"color": [127, 167, 115], "isthing": 1, "id": 81, "name": "sink"}, {"color": [59, 105, 106], "isthing": 1, "id": 82, "name": "refrigerator"}, {"color": [142, 108, 45], "isthing": 1, "id": 84, "name": "book"}, {"color": [196, 172, 0], "isthing": 1, "id": 85, "name": "clock"}, {"color": [95, 54, 80], "isthing": 1, "id": 86, "name": "vase"}, {"color": [128, 76, 255], "isthing": 1, "id": 87, "name": "scissors"}, {"color": [201, 57, 1], "isthing": 1, "id": 88, "name": "teddy bear"}, {"color": [246, 0, 122], "isthing": 1, "id": 89, "name": "hair drier"}, {"color": [191, 162, 208], "isthing": 1, "id": 90, "name": "toothbrush"}, {"color": [255, 255, 128], "isthing": 0, "id": 92, "name": "banner"}, {"color": [147, 211, 203], "isthing": 0, "id": 93, "name": "blanket"}, {"color": [150, 100, 100], "isthing": 0, "id": 95, "name": "bridge"}, {"color": [168, 171, 172], "isthing": 0, "id": 100, "name": "cardboard"}, {"color": [146, 112, 198], "isthing": 0, "id": 107, "name": "counter"}, {"color": [210, 170, 100], "isthing": 0, "id": 109, "name": "curtain"}, {"color": [92, 136, 89], "isthing": 0, "id": 112, "name": "door-stuff"}, {"color": [218, 88, 184], "isthing": 0, "id": 118, "name": "floor-wood"}, {"color": [241, 129, 0], "isthing": 0, "id": 119, "name": "flower"}, {"color": [217, 17, 255], "isthing": 0, "id": 122, "name": "fruit"}, {"color": [124, 74, 181], "isthing": 0, "id": 125, "name": "gravel"}, {"color": [70, 70, 70], "isthing": 0, "id": 128, "name": "house"}, {"color": [255, 228, 255], "isthing": 0, "id": 130, "name": "light"}, {"color": [154, 208, 0], "isthing": 0, "id": 133, "name": "mirror-stuff"}, {"color": [193, 0, 92], "isthing": 0, "id": 138, "name": "net"}, {"color": [76, 91, 113], "isthing": 0, "id": 141, "name": "pillow"}, {"color": [255, 180, 195], "isthing": 0, "id": 144, "name": "platform"}, {"color": [106, 154, 176], "isthing": 0, "id": 145, "name": "playingfield"}, {"color": [230, 150, 140], "isthing": 0, "id": 147, "name": "railroad"}, {"color": [60, 143, 255], "isthing": 0, "id": 148, "name": "river"}, {"color": [128, 64, 128], "isthing": 0, "id": 149, "name": "road"}, {"color": [92, 82, 55], "isthing": 0, "id": 151, "name": "roof"}, {"color": [254, 212, 124], "isthing": 0, "id": 154, "name": "sand"}, {"color": [73, 77, 174], "isthing": 0, "id": 155, "name": "sea"}, {"color": [255, 160, 98], "isthing": 0, "id": 156, "name": "shelf"}, {"color": [255, 255, 255], "isthing": 0, "id": 159, "name": "snow"}, {"color": [104, 84, 109], "isthing": 0, "id": 161, "name": "stairs"}, {"color": [169, 164, 131], "isthing": 0, "id": 166, "name": "tent"}, {"color": [225, 199, 255], "isthing": 0, "id": 168, "name": "towel"}, {"color": [137, 54, 74], "isthing": 0, "id": 171, "name": "wall-brick"}, {"color": [135, 158, 223], "isthing": 0, "id": 175, "name": "wall-stone"}, {"color": [7, 246, 231], "isthing": 0, "id": 176, "name": "wall-tile"}, {"color": [107, 255, 200], "isthing": 0, "id": 177, "name": "wall-wood"}, {"color": [58, 41, 149], "isthing": 0, "id": 178, "name": "water-other"}, {"color": [183, 121, 142], "isthing": 0, "id": 180, "name": "window-blind"}, {"color": [255, 73, 97], "isthing": 0, "id": 181, "name": "window-other"}, {"color": [107, 142, 35], "isthing": 0, "id": 184, "name": "tree-merged"}, {"color": [190, 153, 153], "isthing": 0, "id": 185, "name": "fence-merged"}, {"color": [146, 139, 141], "isthing": 0, "id": 186, "name": "ceiling-merged"}, {"color": [70, 130, 180], "isthing": 0, "id": 187, "name": "sky-other-merged"}, {"color": [134, 199, 156], "isthing": 0, "id": 188, "name": "cabinet-merged"}, {"color": [209, 226, 140], "isthing": 0, "id": 189, "name": "table-merged"}, {"color": [96, 36, 108], "isthing": 0, "id": 190, "name": "floor-other-merged"}, {"color": [96, 96, 96], "isthing": 0, "id": 191, "name": "pavement-merged"}, {"color": [64, 170, 64], "isthing": 0, "id": 192, "name": "mountain-merged"}, {"color": [152, 251, 152], "isthing": 0, "id": 193, "name": "grass-merged"}, {"color": [208, 229, 228], "isthing": 0, "id": 194, "name": "dirt-merged"}, {"color": [206, 186, 171], "isthing": 0, "id": 195, "name": "paper-merged"}, {"color": [152, 161, 64], "isthing": 0, "id": 196, "name": "food-other-merged"}, {"color": [116, 112, 0], "isthing": 0, "id": 197, "name": "building-other-merged"}, {"color": [0, 114, 143], "isthing": 0, "id": 198, "name": "rock-merged"}, {"color": [102, 102, 156], "isthing": 0, "id": 199, "name": "wall-other-merged"}, {"color": [250, 141, 255], "isthing": 0, "id": 200, "name": "rug-merged"}, ] # fmt: off COCO_PERSON_KEYPOINT_NAMES = ( "nose", "left_eye", "right_eye", "left_ear", "right_ear", "left_shoulder", "right_shoulder", "left_elbow", "right_elbow", "left_wrist", "right_wrist", "left_hip", "right_hip", "left_knee", "right_knee", "left_ankle", "right_ankle", ) # fmt: on # Pairs of keypoints that should be exchanged under horizontal flipping COCO_PERSON_KEYPOINT_FLIP_MAP = ( ("left_eye", "right_eye"), ("left_ear", "right_ear"), ("left_shoulder", "right_shoulder"), ("left_elbow", "right_elbow"), ("left_wrist", "right_wrist"), ("left_hip", "right_hip"), ("left_knee", "right_knee"), ("left_ankle", "right_ankle"), ) # rules for pairs of keypoints to draw a line between, and the line color to use. KEYPOINT_CONNECTION_RULES = [ # face ("left_ear", "left_eye", (102, 204, 255)), ("right_ear", "right_eye", (51, 153, 255)), ("left_eye", "nose", (102, 0, 204)), ("nose", "right_eye", (51, 102, 255)), # upper-body ("left_shoulder", "right_shoulder", (255, 128, 0)), ("left_shoulder", "left_elbow", (153, 255, 204)), ("right_shoulder", "right_elbow", (128, 229, 255)), ("left_elbow", "left_wrist", (153, 255, 153)), ("right_elbow", "right_wrist", (102, 255, 224)), # lower-body ("left_hip", "right_hip", (255, 102, 0)), ("left_hip", "left_knee", (255, 255, 77)), ("right_hip", "right_knee", (153, 255, 204)), ("left_knee", "left_ankle", (191, 255, 128)), ("right_knee", "right_ankle", (255, 195, 77)), ] def _get_coco_instances_meta(): thing_ids = [k["id"] for k in COCO_CATEGORIES if k["isthing"] == 1] thing_colors = [k["color"] for k in COCO_CATEGORIES if k["isthing"] == 1] assert len(thing_ids) == 80, len(thing_ids) # Mapping from the incontiguous COCO category id to an id in [0, 79] thing_dataset_id_to_contiguous_id = {k: i for i, k in enumerate(thing_ids)} thing_classes = [k["name"] for k in COCO_CATEGORIES if k["isthing"] == 1] ret = { "thing_dataset_id_to_contiguous_id": thing_dataset_id_to_contiguous_id, "thing_classes": thing_classes, "thing_colors": thing_colors, } return ret def _get_coco_panoptic_separated_meta(): """ Returns metadata for "separated" version of the panoptic segmentation dataset. """ stuff_ids = [k["id"] for k in COCO_CATEGORIES if k["isthing"] == 0] assert len(stuff_ids) == 53, len(stuff_ids) # For semantic segmentation, this mapping maps from contiguous stuff id # (in [0, 53], used in models) to ids in the dataset (used for processing results) # The id 0 is mapped to an extra category "thing". stuff_dataset_id_to_contiguous_id = {k: i + 1 for i, k in enumerate(stuff_ids)} # When converting COCO panoptic annotations to semantic annotations # We label the "thing" category to 0 stuff_dataset_id_to_contiguous_id[0] = 0 # 54 names for COCO stuff categories (including "things") stuff_classes = ["things"] + [ k["name"].replace("-other", "").replace("-merged", "") for k in COCO_CATEGORIES if k["isthing"] == 0 ] # NOTE: I randomly picked a color for things stuff_colors = [[82, 18, 128]] + [k["color"] for k in COCO_CATEGORIES if k["isthing"] == 0] ret = { "stuff_dataset_id_to_contiguous_id": stuff_dataset_id_to_contiguous_id, "stuff_classes": stuff_classes, "stuff_colors": stuff_colors, } ret.update(_get_coco_instances_meta()) return ret def _get_builtin_metadata(dataset_name): if dataset_name == "coco": return _get_coco_instances_meta() if dataset_name == "coco_panoptic_separated": return _get_coco_panoptic_separated_meta() elif dataset_name == "coco_person": return { "thing_classes": ["person"], "keypoint_names": COCO_PERSON_KEYPOINT_NAMES, "keypoint_flip_map": COCO_PERSON_KEYPOINT_FLIP_MAP, "keypoint_connection_rules": KEYPOINT_CONNECTION_RULES, } elif dataset_name == "cityscapes": # fmt: off CITYSCAPES_THING_CLASSES = [ "person", "rider", "car", "truck", "bus", "train", "motorcycle", "bicycle", ] CITYSCAPES_STUFF_CLASSES = [ "road", "sidewalk", "building", "wall", "fence", "pole", "traffic light", "traffic sign", "vegetation", "terrain", "sky", "person", "rider", "car", "truck", "bus", "train", "motorcycle", "bicycle", "license plate", ] # fmt: on return { "thing_classes": CITYSCAPES_THING_CLASSES, "stuff_classes": CITYSCAPES_STUFF_CLASSES, } raise KeyError("No built-in metadata for dataset {}".format(dataset_name)) ================================================ FILE: detectron2/data/datasets/cityscapes.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import functools import glob import json import logging import multiprocessing as mp import numpy as np import os from itertools import chain import pycocotools.mask as mask_util from PIL import Image from detectron2.structures import BoxMode from detectron2.utils.logger import setup_logger from detectron2.utils.comm import get_world_size from fvcore.common.file_io import PathManager try: import cv2 # noqa except ImportError: # OpenCV is an optional dependency at the moment pass def load_cityscapes_instances(image_dir, gt_dir, from_json=True, to_polygons=True): """ Args: image_dir (str): path to the raw dataset. e.g., "~/cityscapes/leftImg8bit/train". gt_dir (str): path to the raw annotations. e.g., "~/cityscapes/gtFine/train". from_json (bool): whether to read annotations from the raw json file or the png files. to_polygons (bool): whether to represent the segmentation as polygons (COCO's format) instead of masks (cityscapes's format). Returns: list[dict]: a list of dicts in Detectron2 standard format. (See `Using Custom Datasets `_ ) """ if from_json: assert to_polygons, ( "Cityscapes's json annotations are in polygon format. " "Converting to mask format is not supported now." ) files = [] for image_file in glob.glob(os.path.join(image_dir, "**/*.png")): suffix = "leftImg8bit.png" assert image_file.endswith(suffix) prefix = image_dir instance_file = gt_dir + image_file[len(prefix) : -len(suffix)] + "gtFine_instanceIds.png" assert os.path.isfile(instance_file), instance_file label_file = gt_dir + image_file[len(prefix) : -len(suffix)] + "gtFine_labelIds.png" assert os.path.isfile(label_file), label_file json_file = gt_dir + image_file[len(prefix) : -len(suffix)] + "gtFine_polygons.json" files.append((image_file, instance_file, label_file, json_file)) assert len(files), "No images found in {}".format(image_dir) logger = logging.getLogger(__name__) logger.info("Preprocessing cityscapes annotations ...") # This is still not fast: all workers will execute duplicate works and will # take up to 10m on a 8GPU server. pool = mp.Pool(processes=max(mp.cpu_count() // get_world_size() // 2, 4)) ret = pool.map( functools.partial(cityscapes_files_to_dict, from_json=from_json, to_polygons=to_polygons), files, ) logger.info("Loaded {} images from {}".format(len(ret), image_dir)) # Map cityscape ids to contiguous ids from cityscapesscripts.helpers.labels import labels labels = [l for l in labels if l.hasInstances and not l.ignoreInEval] dataset_id_to_contiguous_id = {l.id: idx for idx, l in enumerate(labels)} for dict_per_image in ret: for anno in dict_per_image["annotations"]: anno["category_id"] = dataset_id_to_contiguous_id[anno["category_id"]] return ret def load_cityscapes_semantic(image_dir, gt_dir): """ Args: image_dir (str): path to the raw dataset. e.g., "~/cityscapes/leftImg8bit/train". gt_dir (str): path to the raw annotations. e.g., "~/cityscapes/gtFine/train". Returns: list[dict]: a list of dict, each has "file_name" and "sem_seg_file_name". """ ret = [] for image_file in glob.glob(os.path.join(image_dir, "**/*.png")): suffix = "leftImg8bit.png" assert image_file.endswith(suffix) prefix = image_dir label_file = gt_dir + image_file[len(prefix) : -len(suffix)] + "gtFine_labelTrainIds.png" assert os.path.isfile( label_file ), "Please generate labelTrainIds.png with cityscapesscripts/preparation/createTrainIdLabelImgs.py" # noqa json_file = gt_dir + image_file[len(prefix) : -len(suffix)] + "gtFine_polygons.json" with PathManager.open(json_file, "r") as f: jsonobj = json.load(f) ret.append( { "file_name": image_file, "sem_seg_file_name": label_file, "height": jsonobj["imgHeight"], "width": jsonobj["imgWidth"], } ) return ret def cityscapes_files_to_dict(files, from_json, to_polygons): """ Parse cityscapes annotation files to a dict. Args: files (tuple): consists of (image_file, instance_id_file, label_id_file, json_file) from_json (bool): whether to read annotations from the raw json file or the png files. to_polygons (bool): whether to represent the segmentation as polygons (COCO's format) instead of masks (cityscapes's format). Returns: A dict in Detectron2 Dataset format. """ from cityscapesscripts.helpers.labels import id2label, name2label image_file, instance_id_file, _, json_file = files annos = [] if from_json: from shapely.geometry import MultiPolygon, Polygon with PathManager.open(json_file, "r") as f: jsonobj = json.load(f) ret = { "file_name": image_file, "image_id": os.path.basename(image_file), "height": jsonobj["imgHeight"], "width": jsonobj["imgWidth"], } # `polygons_union` contains the union of all valid polygons. polygons_union = Polygon() # CityscapesScripts draw the polygons in sequential order # and each polygon *overwrites* existing ones. See # (https://github.com/mcordts/cityscapesScripts/blob/master/cityscapesscripts/preparation/json2instanceImg.py) # noqa # We use reverse order, and each polygon *avoids* early ones. # This will resolve the ploygon overlaps in the same way as CityscapesScripts. for obj in jsonobj["objects"][::-1]: if "deleted" in obj: # cityscapes data format specific continue label_name = obj["label"] try: label = name2label[label_name] except KeyError: if label_name.endswith("group"): # crowd area label = name2label[label_name[: -len("group")]] else: raise if label.id < 0: # cityscapes data format continue # Cityscapes's raw annotations uses integer coordinates # Therefore +0.5 here poly_coord = np.asarray(obj["polygon"], dtype="f4") + 0.5 # CityscapesScript uses PIL.ImageDraw.polygon to rasterize # polygons for evaluation. This function operates in integer space # and draws each pixel whose center falls into the polygon. # Therefore it draws a polygon which is 0.5 "fatter" in expectation. # We therefore dilate the input polygon by 0.5 as our input. poly = Polygon(poly_coord).buffer(0.5, resolution=4) if not label.hasInstances or label.ignoreInEval: # even if we won't store the polygon it still contributes to overlaps resolution polygons_union = polygons_union.union(poly) continue # Take non-overlapping part of the polygon poly_wo_overlaps = poly.difference(polygons_union) if poly_wo_overlaps.is_empty: continue polygons_union = polygons_union.union(poly) anno = {} anno["iscrowd"] = label_name.endswith("group") anno["category_id"] = label.id if isinstance(poly_wo_overlaps, Polygon): poly_list = [poly_wo_overlaps] elif isinstance(poly_wo_overlaps, MultiPolygon): poly_list = poly_wo_overlaps.geoms else: raise NotImplementedError("Unknown geometric structure {}".format(poly_wo_overlaps)) poly_coord = [] for poly_el in poly_list: # COCO API can work only with exterior boundaries now, hence we store only them. # TODO: store both exterior and interior boundaries once other parts of the # codebase support holes in polygons. poly_coord.append(list(chain(*poly_el.exterior.coords))) anno["segmentation"] = poly_coord (xmin, ymin, xmax, ymax) = poly_wo_overlaps.bounds anno["bbox"] = (xmin, ymin, xmax, ymax) anno["bbox_mode"] = BoxMode.XYXY_ABS annos.append(anno) else: # See also the official annotation parsing scripts at # https://github.com/mcordts/cityscapesScripts/blob/master/cityscapesscripts/evaluation/instances2dict.py # noqa with PathManager.open(instance_id_file, "rb") as f: inst_image = np.asarray(Image.open(f), order="F") # ids < 24 are stuff labels (filtering them first is about 5% faster) flattened_ids = np.unique(inst_image[inst_image >= 24]) ret = { "file_name": image_file, "image_id": os.path.basename(image_file), "height": inst_image.shape[0], "width": inst_image.shape[1], } for instance_id in flattened_ids: # For non-crowd annotations, instance_id // 1000 is the label_id # Crowd annotations have <1000 instance ids label_id = instance_id // 1000 if instance_id >= 1000 else instance_id label = id2label[label_id] if not label.hasInstances or label.ignoreInEval: continue anno = {} anno["iscrowd"] = instance_id < 1000 anno["category_id"] = label.id mask = np.asarray(inst_image == instance_id, dtype=np.uint8, order="F") inds = np.nonzero(mask) ymin, ymax = inds[0].min(), inds[0].max() xmin, xmax = inds[1].min(), inds[1].max() anno["bbox"] = (xmin, ymin, xmax, ymax) if xmax <= xmin or ymax <= ymin: continue anno["bbox_mode"] = BoxMode.XYXY_ABS if to_polygons: # This conversion comes from D4809743 and D5171122, # when Mask-RCNN was first developed. contours = cv2.findContours(mask.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE)[ -2 ] polygons = [c.reshape(-1).tolist() for c in contours if len(c) >= 3] # opencv's can produce invalid polygons if len(polygons) == 0: continue anno["segmentation"] = polygons else: anno["segmentation"] = mask_util.encode(mask[:, :, None])[0] annos.append(anno) ret["annotations"] = annos return ret if __name__ == "__main__": """ Test the cityscapes dataset loader. Usage: python -m detectron2.data.datasets.cityscapes \ cityscapes/leftImg8bit/train cityscapes/gtFine/train """ import argparse parser = argparse.ArgumentParser() parser.add_argument("image_dir") parser.add_argument("gt_dir") parser.add_argument("--type", choices=["instance", "semantic"], default="instance") args = parser.parse_args() from detectron2.data.catalog import Metadata from detectron2.utils.visualizer import Visualizer from cityscapesscripts.helpers.labels import labels logger = setup_logger(name=__name__) dirname = "cityscapes-data-vis" os.makedirs(dirname, exist_ok=True) if args.type == "instance": dicts = load_cityscapes_instances( args.image_dir, args.gt_dir, from_json=True, to_polygons=True ) logger.info("Done loading {} samples.".format(len(dicts))) thing_classes = [k.name for k in labels if k.hasInstances and not k.ignoreInEval] meta = Metadata().set(thing_classes=thing_classes) else: dicts = load_cityscapes_semantic(args.image_dir, args.gt_dir) logger.info("Done loading {} samples.".format(len(dicts))) stuff_names = [k.name for k in labels if k.trainId != 255] stuff_colors = [k.color for k in labels if k.trainId != 255] meta = Metadata().set(stuff_names=stuff_names, stuff_colors=stuff_colors) for d in dicts: img = np.array(Image.open(d["file_name"])) visualizer = Visualizer(img, metadata=meta) vis = visualizer.draw_dataset_dict(d) # cv2.imshow("a", vis.get_image()[:, :, ::-1]) # cv2.waitKey() fpath = os.path.join(dirname, os.path.basename(d["file_name"])) vis.save(fpath) ================================================ FILE: detectron2/data/datasets/coco.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import io import logging import contextlib import os from PIL import Image from fvcore.common.timer import Timer from detectron2.structures import BoxMode from fvcore.common.file_io import PathManager from .. import MetadataCatalog, DatasetCatalog """ This file contains functions to parse COCO-format annotations into dicts in "Detectron2 format". """ logger = logging.getLogger(__name__) __all__ = ["load_coco_json", "load_sem_seg"] def load_coco_json(json_file, image_root, dataset_name=None): """ Load a json file with COCO's instances annotation format. Currently supports instance detection, instance segmentation, person keypoints and densepose annotations. Args: json_file (str): full path to the json file in COCO instances annotation format. image_root (str): the directory where the images in this json file exists. dataset_name (str): the name of the dataset (e.g., coco_2017_train). If provided, this function will also put "thing_classes" into the metadata associated with this dataset. Returns: list[dict]: a list of dicts in Detectron2 standard format. (See `Using Custom Datasets `_ ) Notes: 1. This function does not read the image files. The results do not have the "image" field. """ from pycocotools.coco import COCO timer = Timer() json_file = PathManager.get_local_path(json_file) with contextlib.redirect_stdout(io.StringIO()): coco_api = COCO(json_file) if timer.seconds() > 1: logger.info("Loading {} takes {:.2f} seconds.".format(json_file, timer.seconds())) id_map = None if dataset_name is not None: meta = MetadataCatalog.get(dataset_name) cat_ids = sorted(coco_api.getCatIds()) association_ids = coco_api.getRelaIds() cats = coco_api.loadCats(cat_ids) # association_cats = coco_api.loadRela(association_ids) association = coco_api.loadRela(association_ids) # The categories in a custom json file may not be sorted. thing_classes = [c["name"] for c in sorted(cats, key=lambda x: x["id"])] association_classes = [c["name"] for c in sorted(association, key=lambda x: x["id"])] meta.association_classes = association_classes meta.thing_classes = thing_classes meta.keypoint_names = ['Object','Shadow'] meta.keypoint_flip_map = ({'Object':'Shadow'}) meta.keypoint_connection_rules = [('Object','Shadow',(255,255,255))] # meta # In COCO, certain category ids are artificially removed, # and by convention they are always ignored. # We deal with COCO's id issue and translate # the category ids to contiguous ids in [0, 80). # It works by looking at the "categories" field in the json, therefore # if users' own json also have incontiguous ids, we'll # apply this mapping as well but print a warning. if not (min(cat_ids) == 1 and max(cat_ids) == len(cat_ids)): if "coco" not in dataset_name: logger.warning( """ Category ids in annotations are not in [1, #categories]! We'll apply a mapping for you. """ ) id_map = {v: i for i, v in enumerate(cat_ids)} association_id_map = {v:i for i,v in enumerate(association_ids)} meta.association_dataset_id_to_contiguous_id = association_id_map meta.thing_dataset_id_to_contiguous_id = id_map # sort indices for reproducible results img_ids = sorted(list(coco_api.imgs.keys())) # imgs is a list of dicts, each looks something like: # {'license': 4, # 'url': 'http://farm6.staticflickr.com/5454/9413846304_881d5e5c3b_z.jpg', # 'file_name': 'COCO_val2014_000000001268.jpg', # 'height': 427, # 'width': 640, # 'date_captured': '2013-11-17 05:57:24', # 'id': 1268} imgs = coco_api.loadImgs(img_ids) # anns is a list[list[dict]], where each dict is an annotation # record for an object. The inner list enumerates the objects in an image # and the outer list enumerates over images. Example of anns[0]: # [{'segmentation': [[192.81, # 247.09, # ... # 219.03, # 249.06]], # 'area': 1035.749, # 'iscrowd': 0, # 'image_id': 1268, # 'bbox': [192.81, 224.8, 74.73, 33.43], # 'category_id': 16, # 'id': 42986}, # ...] anns = [coco_api.imgToAnns[img_id] for img_id in img_ids] assoAnns = [coco_api.imgToRelaAnns[img_id] for img_id in img_ids] if "minival" not in json_file: # The popular valminusminival & minival annotations for COCO2014 contain this bug. # However the ratio of buggy annotations there is tiny and does not affect accuracy. # Therefore we explicitly white-list them. ann_ids = [ann["id"] for anns_per_image in anns for ann in anns_per_image] asso_ann_ids = [assoAnn["id"] for anns_per_image in assoAnns for assoAnn in anns_per_image ] assert len(set(ann_ids)) == len(ann_ids), "Annotation ids in '{}' are not unique!".format( json_file ) imgs_anns = list(zip(imgs, anns)) imgs_asso_anns = list(zip(imgs,assoAnns)) logger.info("Loaded {} images in COCO format from {}".format(len(imgs_anns), json_file)) dataset_dicts = [] # TODO: refactoring candidate, one should not have to alter DB reader # every time new data type is added DENSEPOSE_KEYS = ["dp_x", "dp_y", "dp_I", "dp_U", "dp_V", "dp_masks"] num_instances_without_valid_segmentation = 0 for (img_dict, anno_dict_list),(_,asso_anno_dict_list) in zip(imgs_anns,imgs_asso_anns): record = {} record["file_name"] = os.path.join(image_root, img_dict["file_name"]) record["height"] = img_dict["height"] record["width"] = img_dict["width"] image_id = record["image_id"] = img_dict["id"] objs = [] for anno in anno_dict_list: # Check that the image_id in this annotation is the same as # the image_id we're looking at. # This fails only when the data parsing logic or the annotation file is buggy. # The original COCO valminusminival2014 & minival2014 annotation files # actually contains bugs that, together with certain ways of using COCO API, # can trigger this assertion. assert anno["image_id"] == image_id assert anno.get("ignore", 0) == 0 obj = { field: anno[field] for field in ["iscrowd", "bbox","keypoints", "category_id"] + DENSEPOSE_KEYS if field in anno } segm = anno.get("segmentation", None) if segm: # either list[list[float]] or dict(RLE) if not isinstance(segm, dict): # filter out invalid polygons (< 3 points) segm = [poly for poly in segm if len(poly) % 2 == 0 and len(poly) >= 6] if len(segm) == 0: num_instances_without_valid_segmentation += 1 continue # ignore this instance obj["segmentation"] = segm keypts = anno.get("keypoints", None) if keypts: # list[int] for idx, v in enumerate(keypts): if idx % 3 != 2: # COCO's segmentation coordinates are floating points in [0, H or W], # but keypoint coordinates are integers in [0, H-1 or W-1] # Therefore we assume the coordinates are "pixel indices" and # add 0.5 to convert to floating point coordinates. keypts[idx] = v + 0.5 obj["keypoints"] = keypts obj["bbox_mode"] = BoxMode.XYWH_ABS if id_map: obj["category_id"] = id_map[obj["category_id"]] objs.append(obj) record["annotations"] = objs objs = [] for anno in asso_anno_dict_list: # Check that the image_id in this annotation is the same as # the image_id we're looking at. # This fails only when the data parsing logic or the annotation file is buggy. # The original COCO valminusminival2014 & minival2014 annotation files # actually contains bugs that, together with certain ways of using COCO API, # can trigger this assertion. assert anno["image_id"] == image_id assert anno.get("ignore", 0) == 0 obj = { field: anno[field] for field in ["iscrowd", "bbox",'light', "keypoints", "category_id"] + DENSEPOSE_KEYS if field in anno } segm = anno.get("segmentation", None) if segm: # either list[list[float]] or dict(RLE) if not isinstance(segm, dict): # filter out invalid polygons (< 3 points) segm = [poly for poly in segm if len(poly) % 2 == 0 and len(poly) >= 6] if len(segm) == 0: num_instances_without_valid_segmentation += 1 continue # ignore this instance obj["segmentation"] = segm keypts = anno.get("keypoints", None) if keypts: # list[int] for idx, v in enumerate(keypts): if idx % 3 != 2: # COCO's segmentation coordinates are floating points in [0, H or W], # but keypoint coordinates are integers in [0, H-1 or W-1] # Therefore we assume the coordinates are "pixel indices" and # add 0.5 to convert to floating point coordinates. keypts[idx] = v + 0.5 obj["keypoints"] = keypts obj["bbox_mode"] = BoxMode.XYWH_ABS if id_map: obj["category_id"] = id_map[obj["category_id"]] objs.append(obj) record["association_anno"] = objs dataset_dicts.append(record) if num_instances_without_valid_segmentation > 0: logger.warn( "Filtered out {} instances without valid segmentation. " "There might be issues in your dataset generation process.".format( num_instances_without_valid_segmentation ) ) return dataset_dicts # TODO this function is not specific to COCO, except for the "image_id" logic. def load_sem_seg(gt_root, image_root, gt_ext="png", image_ext="jpg"): """ Load semantic segmentation datasets. All files under "gt_root" with "gt_ext" extension are treated as ground truth annotations and all files under "image_root" with "image_ext" extension as input images. Ground truth and input images are matched using file paths relative to "gt_root" and "image_root" respectively without taking into account file extensions. Args: gt_root (str): full path to ground truth semantic segmentation files. Semantic segmentation annotations are stored as images with integer values in pixels that represent corresponding semantic labels. image_root (str): the directory where the input images are. gt_ext (str): file extension for ground truth annotations. image_ext (str): file extension for input images. Returns: list[dict]: a list of dicts in detectron2 standard format without instance-level annotation. Notes: 1. This function does not read the image and ground truth files. The results do not have the "image" and "sem_seg" fields. """ # We match input images with ground truth based on their relative filepaths (without file # extensions) starting from 'image_root' and 'gt_root' respectively. COCO API works with integer # IDs, hence, we try to convert these paths to int if possible. def file2id(folder_path, file_path): # TODO id is not used. # extract relative path starting from `folder_path` image_id = os.path.normpath(os.path.relpath(file_path, start=folder_path)) # remove file extension image_id = os.path.splitext(image_id)[0] try: image_id = int(image_id) except ValueError: pass return image_id input_files = sorted( (os.path.join(image_root, f) for f in PathManager.ls(image_root) if f.endswith(image_ext)), key=lambda file_path: file2id(image_root, file_path), ) gt_files = sorted( (os.path.join(gt_root, f) for f in PathManager.ls(gt_root) if f.endswith(gt_ext)), key=lambda file_path: file2id(gt_root, file_path), ) assert len(gt_files) > 0, "No annotations found in {}.".format(gt_root) # Use the intersection, so that val2017_100 annotations can run smoothly with val2017 images if len(input_files) != len(gt_files): logger.warn( "Directory {} and {} has {} and {} files, respectively.".format( image_root, gt_root, len(input_files), len(gt_files) ) ) input_basenames = [os.path.basename(f)[: -len(image_ext)] for f in input_files] gt_basenames = [os.path.basename(f)[: -len(gt_ext)] for f in gt_files] intersect = list(set(input_basenames) & set(gt_basenames)) # sort, otherwise each worker may obtain a list[dict] in different order intersect = sorted(intersect) logger.warn("Will use their intersection of {} files.".format(len(intersect))) input_files = [os.path.join(image_root, f + image_ext) for f in intersect] gt_files = [os.path.join(gt_root, f + gt_ext) for f in intersect] logger.info( "Loaded {} images with semantic segmentation from {}".format(len(input_files), image_root) ) dataset_dicts = [] for (img_path, gt_path) in zip(input_files, gt_files): record = {} record["file_name"] = img_path record["sem_seg_file_name"] = gt_path record["image_id"] = file2id(image_root, img_path) assert record["image_id"] == file2id( gt_root, gt_path ), "there is no ground truth for {}".format(img_path) with PathManager.open(gt_path, "rb") as f: img = Image.open(f) w, h = img.size record["height"] = h record["width"] = w dataset_dicts.append(record) return dataset_dicts if __name__ == "__main__": """ Test the COCO json dataset loader. Usage: python -m detectron2.data.datasets.coco \ path/to/json path/to/image_root dataset_name "dataset_name" can be "coco_2014_minival_100", or other pre-registered ones """ import numpy as np from detectron2.utils.logger import setup_logger from detectron2.utils.visualizer import Visualizer import detectron2.data.datasets # noqa # add pre-defined metadata import sys logger = setup_logger(name=__name__) assert sys.argv[3] in DatasetCatalog.list() meta = MetadataCatalog.get(sys.argv[3]) dicts = load_coco_json(sys.argv[1], sys.argv[2], sys.argv[3]) logger.info("Done loading {} samples.".format(len(dicts))) dirname = "coco-data-vis" os.makedirs(dirname, exist_ok=True) for d in dicts: img = np.array(Image.open(d["file_name"])) visualizer = Visualizer(img, metadata=meta) vis = visualizer.draw_dataset_dict(d) fpath = os.path.join(dirname, os.path.basename(d["file_name"])) vis.save(fpath) ================================================ FILE: detectron2/data/datasets/lvis.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import os from fvcore.common.timer import Timer from detectron2.structures import BoxMode from fvcore.common.file_io import PathManager from detectron2.data import DatasetCatalog, MetadataCatalog from .lvis_v0_5_categories import LVIS_CATEGORIES """ This file contains functions to parse LVIS-format annotations into dicts in the "Detectron2 format". """ logger = logging.getLogger(__name__) __all__ = ["load_lvis_json", "register_lvis_instances", "get_lvis_instances_meta"] def register_lvis_instances(name, metadata, json_file, image_root): """ Register a dataset in LVIS's json annotation format for instance detection and segmentation. Args: name (str): a name that identifies the dataset, e.g. "lvis_v0.5_train". metadata (dict): extra metadata associated with this dataset. It can be an empty dict. json_file (str): path to the json instance annotation file. image_root (str): directory which contains all the images. """ DatasetCatalog.register(name, lambda: load_lvis_json(json_file, image_root, name)) MetadataCatalog.get(name).set( json_file=json_file, image_root=image_root, evaluator_type="lvis", **metadata ) def load_lvis_json(json_file, image_root, dataset_name=None): """ Load a json file in LVIS's annotation format. Args: json_file (str): full path to the LVIS json annotation file. image_root (str): the directory where the images in this json file exists. dataset_name (str): the name of the dataset (e.g., "lvis_v0.5_train"). If provided, this function will put "thing_classes" into the metadata associated with this dataset. Returns: list[dict]: a list of dicts in Detectron2 standard format. (See `Using Custom Datasets `_ ) Notes: 1. This function does not read the image files. The results do not have the "image" field. """ from lvis import LVIS json_file = PathManager.get_local_path(json_file) timer = Timer() lvis_api = LVIS(json_file) if timer.seconds() > 1: logger.info("Loading {} takes {:.2f} seconds.".format(json_file, timer.seconds())) if dataset_name is not None: meta = get_lvis_instances_meta(dataset_name) MetadataCatalog.get(dataset_name).set(**meta) # sort indices for reproducible results img_ids = sorted(list(lvis_api.imgs.keys())) # imgs is a list of dicts, each looks something like: # {'license': 4, # 'url': 'http://farm6.staticflickr.com/5454/9413846304_881d5e5c3b_z.jpg', # 'file_name': 'COCO_val2014_000000001268.jpg', # 'height': 427, # 'width': 640, # 'date_captured': '2013-11-17 05:57:24', # 'id': 1268} imgs = lvis_api.load_imgs(img_ids) # anns is a list[list[dict]], where each dict is an annotation # record for an object. The inner list enumerates the objects in an image # and the outer list enumerates over images. Example of anns[0]: # [{'segmentation': [[192.81, # 247.09, # ... # 219.03, # 249.06]], # 'area': 1035.749, # 'image_id': 1268, # 'bbox': [192.81, 224.8, 74.73, 33.43], # 'category_id': 16, # 'id': 42986}, # ...] anns = [lvis_api.img_ann_map[img_id] for img_id in img_ids] # Sanity check that each annotation has a unique id ann_ids = [ann["id"] for anns_per_image in anns for ann in anns_per_image] assert len(set(ann_ids)) == len(ann_ids), "Annotation ids in '{}' are not unique".format( json_file ) imgs_anns = list(zip(imgs, anns)) logger.info("Loaded {} images in the LVIS format from {}".format(len(imgs_anns), json_file)) dataset_dicts = [] for (img_dict, anno_dict_list) in imgs_anns: record = {} file_name = img_dict["file_name"] if img_dict["file_name"].startswith("COCO"): # Convert form the COCO 2014 file naming convention of # COCO_[train/val/test]2014_000000000000.jpg to the 2017 naming convention of # 000000000000.jpg (LVIS v1 will fix this naming issue) file_name = file_name[-16:] record["file_name"] = os.path.join(image_root, file_name) record["height"] = img_dict["height"] record["width"] = img_dict["width"] record["not_exhaustive_category_ids"] = img_dict.get("not_exhaustive_category_ids", []) record["neg_category_ids"] = img_dict.get("neg_category_ids", []) image_id = record["image_id"] = img_dict["id"] objs = [] for anno in anno_dict_list: # Check that the image_id in this annotation is the same as # the image_id we're looking at. # This fails only when the data parsing logic or the annotation file is buggy. assert anno["image_id"] == image_id obj = {"bbox": anno["bbox"], "bbox_mode": BoxMode.XYWH_ABS} obj["category_id"] = anno["category_id"] - 1 # Convert 1-indexed to 0-indexed segm = anno["segmentation"] # list[list[float]] # filter out invalid polygons (< 3 points) valid_segm = [poly for poly in segm if len(poly) % 2 == 0 and len(poly) >= 6] assert len(segm) == len( valid_segm ), "Annotation contains an invalid polygon with < 3 points" assert len(segm) > 0 obj["segmentation"] = segm objs.append(obj) record["annotations"] = objs dataset_dicts.append(record) return dataset_dicts def get_lvis_instances_meta(dataset_name): """ Load LVIS metadata. Args: dataset_name (str): LVIS dataset name without the split name (e.g., "lvis_v0.5"). Returns: dict: LVIS metadata with keys: thing_classes """ if "v0.5" in dataset_name: return _get_lvis_instances_meta_v0_5() # There will be a v1 in the future # elif dataset_name == "lvis_v1": # return get_lvis_instances_meta_v1() raise ValueError("No built-in metadata for dataset {}".format(dataset_name)) def _get_lvis_instances_meta_v0_5(): assert len(LVIS_CATEGORIES) == 1230 cat_ids = [k["id"] for k in LVIS_CATEGORIES] assert min(cat_ids) == 1 and max(cat_ids) == len( cat_ids ), "Category ids are not in [1, #categories], as expected" # Ensure that the category list is sorted by id lvis_categories = [k for k in sorted(LVIS_CATEGORIES, key=lambda x: x["id"])] thing_classes = [k["synonyms"][0] for k in lvis_categories] meta = {"thing_classes": thing_classes} return meta if __name__ == "__main__": """ Test the LVIS json dataset loader. Usage: python -m detectron2.data.datasets.lvis \ path/to/json path/to/image_root dataset_name vis_limit """ import sys import numpy as np from detectron2.utils.logger import setup_logger from PIL import Image import detectron2.data.datasets # noqa # add pre-defined metadata from detectron2.utils.visualizer import Visualizer logger = setup_logger(name=__name__) meta = MetadataCatalog.get(sys.argv[3]) dicts = load_lvis_json(sys.argv[1], sys.argv[2], sys.argv[3]) logger.info("Done loading {} samples.".format(len(dicts))) dirname = "lvis-data-vis" os.makedirs(dirname, exist_ok=True) for d in dicts[: int(sys.argv[4])]: img = np.array(Image.open(d["file_name"])) visualizer = Visualizer(img, metadata=meta) vis = visualizer.draw_dataset_dict(d) fpath = os.path.join(dirname, os.path.basename(d["file_name"])) vis.save(fpath) ================================================ FILE: detectron2/data/datasets/lvis_v0_5_categories.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # Autogen with # with open("lvis_v0.5_val.json", "r") as f: # a = json.load(f) # c = a["categories"] # for x in c: # del x["image_count"] # del x["instance_count"] # LVIS_CATEGORIES = repr(c) + " # noqa" # fmt: off LVIS_CATEGORIES = [{'frequency': 'r', 'id': 1, 'synset': 'acorn.n.01', 'synonyms': ['acorn'], 'def': 'nut from an oak tree', 'name': 'acorn'}, {'frequency': 'c', 'id': 2, 'synset': 'aerosol.n.02', 'synonyms': ['aerosol_can', 'spray_can'], 'def': 'a dispenser that holds a substance under pressure', 'name': 'aerosol_can'}, {'frequency': 'f', 'id': 3, 'synset': 'air_conditioner.n.01', 'synonyms': ['air_conditioner'], 'def': 'a machine that keeps air cool and dry', 'name': 'air_conditioner'}, {'frequency': 'f', 'id': 4, 'synset': 'airplane.n.01', 'synonyms': ['airplane', 'aeroplane'], 'def': 'an aircraft that has a fixed wing and is powered by propellers or jets', 'name': 'airplane'}, {'frequency': 'c', 'id': 5, 'synset': 'alarm_clock.n.01', 'synonyms': ['alarm_clock'], 'def': 'a clock that wakes a sleeper at some preset time', 'name': 'alarm_clock'}, {'frequency': 'c', 'id': 6, 'synset': 'alcohol.n.01', 'synonyms': ['alcohol', 'alcoholic_beverage'], 'def': 'a liquor or brew containing alcohol as the active agent', 'name': 'alcohol'}, {'frequency': 'r', 'id': 7, 'synset': 'alligator.n.02', 'synonyms': ['alligator', 'gator'], 'def': 'amphibious reptiles related to crocodiles but with shorter broader snouts', 'name': 'alligator'}, {'frequency': 'c', 'id': 8, 'synset': 'almond.n.02', 'synonyms': ['almond'], 'def': 'oval-shaped edible seed of the almond tree', 'name': 'almond'}, {'frequency': 'c', 'id': 9, 'synset': 'ambulance.n.01', 'synonyms': ['ambulance'], 'def': 'a vehicle that takes people to and from hospitals', 'name': 'ambulance'}, {'frequency': 'r', 'id': 10, 'synset': 'amplifier.n.01', 'synonyms': ['amplifier'], 'def': 'electronic equipment that increases strength of signals', 'name': 'amplifier'}, {'frequency': 'c', 'id': 11, 'synset': 'anklet.n.03', 'synonyms': ['anklet', 'ankle_bracelet'], 'def': 'an ornament worn around the ankle', 'name': 'anklet'}, {'frequency': 'f', 'id': 12, 'synset': 'antenna.n.01', 'synonyms': ['antenna', 'aerial', 'transmitting_aerial'], 'def': 'an electrical device that sends or receives radio or television signals', 'name': 'antenna'}, {'frequency': 'f', 'id': 13, 'synset': 'apple.n.01', 'synonyms': ['apple'], 'def': 'fruit with red or yellow or green skin and sweet to tart crisp whitish flesh', 'name': 'apple'}, {'frequency': 'r', 'id': 14, 'synset': 'apple_juice.n.01', 'synonyms': ['apple_juice'], 'def': 'the juice of apples', 'name': 'apple_juice'}, {'frequency': 'r', 'id': 15, 'synset': 'applesauce.n.01', 'synonyms': ['applesauce'], 'def': 'puree of stewed apples usually sweetened and spiced', 'name': 'applesauce'}, {'frequency': 'r', 'id': 16, 'synset': 'apricot.n.02', 'synonyms': ['apricot'], 'def': 'downy yellow to rosy-colored fruit resembling a small peach', 'name': 'apricot'}, {'frequency': 'f', 'id': 17, 'synset': 'apron.n.01', 'synonyms': ['apron'], 'def': 'a garment of cloth that is tied about the waist and worn to protect clothing', 'name': 'apron'}, {'frequency': 'c', 'id': 18, 'synset': 'aquarium.n.01', 'synonyms': ['aquarium', 'fish_tank'], 'def': 'a tank/pool/bowl filled with water for keeping live fish and underwater animals', 'name': 'aquarium'}, {'frequency': 'c', 'id': 19, 'synset': 'armband.n.02', 'synonyms': ['armband'], 'def': 'a band worn around the upper arm', 'name': 'armband'}, {'frequency': 'f', 'id': 20, 'synset': 'armchair.n.01', 'synonyms': ['armchair'], 'def': 'chair with a support on each side for arms', 'name': 'armchair'}, {'frequency': 'r', 'id': 21, 'synset': 'armoire.n.01', 'synonyms': ['armoire'], 'def': 'a large wardrobe or cabinet', 'name': 'armoire'}, {'frequency': 'r', 'id': 22, 'synset': 'armor.n.01', 'synonyms': ['armor', 'armour'], 'def': 'protective covering made of metal and used in combat', 'name': 'armor'}, {'frequency': 'c', 'id': 23, 'synset': 'artichoke.n.02', 'synonyms': ['artichoke'], 'def': 'a thistlelike flower head with edible fleshy leaves and heart', 'name': 'artichoke'}, {'frequency': 'f', 'id': 24, 'synset': 'ashcan.n.01', 'synonyms': ['trash_can', 'garbage_can', 'wastebin', 'dustbin', 'trash_barrel', 'trash_bin'], 'def': 'a bin that holds rubbish until it is collected', 'name': 'trash_can'}, {'frequency': 'c', 'id': 25, 'synset': 'ashtray.n.01', 'synonyms': ['ashtray'], 'def': "a receptacle for the ash from smokers' cigars or cigarettes", 'name': 'ashtray'}, {'frequency': 'c', 'id': 26, 'synset': 'asparagus.n.02', 'synonyms': ['asparagus'], 'def': 'edible young shoots of the asparagus plant', 'name': 'asparagus'}, {'frequency': 'c', 'id': 27, 'synset': 'atomizer.n.01', 'synonyms': ['atomizer', 'atomiser', 'spray', 'sprayer', 'nebulizer', 'nebuliser'], 'def': 'a dispenser that turns a liquid (such as perfume) into a fine mist', 'name': 'atomizer'}, {'frequency': 'c', 'id': 28, 'synset': 'avocado.n.01', 'synonyms': ['avocado'], 'def': 'a pear-shaped fruit with green or blackish skin and rich yellowish pulp enclosing a single large seed', 'name': 'avocado'}, {'frequency': 'c', 'id': 29, 'synset': 'award.n.02', 'synonyms': ['award', 'accolade'], 'def': 'a tangible symbol signifying approval or distinction', 'name': 'award'}, {'frequency': 'f', 'id': 30, 'synset': 'awning.n.01', 'synonyms': ['awning'], 'def': 'a canopy made of canvas to shelter people or things from rain or sun', 'name': 'awning'}, {'frequency': 'r', 'id': 31, 'synset': 'ax.n.01', 'synonyms': ['ax', 'axe'], 'def': 'an edge tool with a heavy bladed head mounted across a handle', 'name': 'ax'}, {'frequency': 'f', 'id': 32, 'synset': 'baby_buggy.n.01', 'synonyms': ['baby_buggy', 'baby_carriage', 'perambulator', 'pram', 'stroller'], 'def': 'a small vehicle with four wheels in which a baby or child is pushed around', 'name': 'baby_buggy'}, {'frequency': 'c', 'id': 33, 'synset': 'backboard.n.01', 'synonyms': ['basketball_backboard'], 'def': 'a raised vertical board with basket attached; used to play basketball', 'name': 'basketball_backboard'}, {'frequency': 'f', 'id': 34, 'synset': 'backpack.n.01', 'synonyms': ['backpack', 'knapsack', 'packsack', 'rucksack', 'haversack'], 'def': 'a bag carried by a strap on your back or shoulder', 'name': 'backpack'}, {'frequency': 'f', 'id': 35, 'synset': 'bag.n.04', 'synonyms': ['handbag', 'purse', 'pocketbook'], 'def': 'a container used for carrying money and small personal items or accessories', 'name': 'handbag'}, {'frequency': 'f', 'id': 36, 'synset': 'bag.n.06', 'synonyms': ['suitcase', 'baggage', 'luggage'], 'def': 'cases used to carry belongings when traveling', 'name': 'suitcase'}, {'frequency': 'c', 'id': 37, 'synset': 'bagel.n.01', 'synonyms': ['bagel', 'beigel'], 'def': 'glazed yeast-raised doughnut-shaped roll with hard crust', 'name': 'bagel'}, {'frequency': 'r', 'id': 38, 'synset': 'bagpipe.n.01', 'synonyms': ['bagpipe'], 'def': 'a tubular wind instrument; the player blows air into a bag and squeezes it out', 'name': 'bagpipe'}, {'frequency': 'r', 'id': 39, 'synset': 'baguet.n.01', 'synonyms': ['baguet', 'baguette'], 'def': 'narrow French stick loaf', 'name': 'baguet'}, {'frequency': 'r', 'id': 40, 'synset': 'bait.n.02', 'synonyms': ['bait', 'lure'], 'def': 'something used to lure fish or other animals into danger so they can be trapped or killed', 'name': 'bait'}, {'frequency': 'f', 'id': 41, 'synset': 'ball.n.06', 'synonyms': ['ball'], 'def': 'a spherical object used as a plaything', 'name': 'ball'}, {'frequency': 'r', 'id': 42, 'synset': 'ballet_skirt.n.01', 'synonyms': ['ballet_skirt', 'tutu'], 'def': 'very short skirt worn by ballerinas', 'name': 'ballet_skirt'}, {'frequency': 'f', 'id': 43, 'synset': 'balloon.n.01', 'synonyms': ['balloon'], 'def': 'large tough nonrigid bag filled with gas or heated air', 'name': 'balloon'}, {'frequency': 'c', 'id': 44, 'synset': 'bamboo.n.02', 'synonyms': ['bamboo'], 'def': 'woody tropical grass having hollow woody stems', 'name': 'bamboo'}, {'frequency': 'f', 'id': 45, 'synset': 'banana.n.02', 'synonyms': ['banana'], 'def': 'elongated crescent-shaped yellow fruit with soft sweet flesh', 'name': 'banana'}, {'frequency': 'r', 'id': 46, 'synset': 'band_aid.n.01', 'synonyms': ['Band_Aid'], 'def': 'trade name for an adhesive bandage to cover small cuts or blisters', 'name': 'Band_Aid'}, {'frequency': 'c', 'id': 47, 'synset': 'bandage.n.01', 'synonyms': ['bandage'], 'def': 'a piece of soft material that covers and protects an injured part of the body', 'name': 'bandage'}, {'frequency': 'c', 'id': 48, 'synset': 'bandanna.n.01', 'synonyms': ['bandanna', 'bandana'], 'def': 'large and brightly colored handkerchief; often used as a neckerchief', 'name': 'bandanna'}, {'frequency': 'r', 'id': 49, 'synset': 'banjo.n.01', 'synonyms': ['banjo'], 'def': 'a stringed instrument of the guitar family with a long neck and circular body', 'name': 'banjo'}, {'frequency': 'f', 'id': 50, 'synset': 'banner.n.01', 'synonyms': ['banner', 'streamer'], 'def': 'long strip of cloth or paper used for decoration or advertising', 'name': 'banner'}, {'frequency': 'r', 'id': 51, 'synset': 'barbell.n.01', 'synonyms': ['barbell'], 'def': 'a bar to which heavy discs are attached at each end; used in weightlifting', 'name': 'barbell'}, {'frequency': 'r', 'id': 52, 'synset': 'barge.n.01', 'synonyms': ['barge'], 'def': 'a flatbottom boat for carrying heavy loads (especially on canals)', 'name': 'barge'}, {'frequency': 'f', 'id': 53, 'synset': 'barrel.n.02', 'synonyms': ['barrel', 'cask'], 'def': 'a cylindrical container that holds liquids', 'name': 'barrel'}, {'frequency': 'c', 'id': 54, 'synset': 'barrette.n.01', 'synonyms': ['barrette'], 'def': "a pin for holding women's hair in place", 'name': 'barrette'}, {'frequency': 'c', 'id': 55, 'synset': 'barrow.n.03', 'synonyms': ['barrow', 'garden_cart', 'lawn_cart', 'wheelbarrow'], 'def': 'a cart for carrying small loads; has handles and one or more wheels', 'name': 'barrow'}, {'frequency': 'f', 'id': 56, 'synset': 'base.n.03', 'synonyms': ['baseball_base'], 'def': 'a place that the runner must touch before scoring', 'name': 'baseball_base'}, {'frequency': 'f', 'id': 57, 'synset': 'baseball.n.02', 'synonyms': ['baseball'], 'def': 'a ball used in playing baseball', 'name': 'baseball'}, {'frequency': 'f', 'id': 58, 'synset': 'baseball_bat.n.01', 'synonyms': ['baseball_bat'], 'def': 'an implement used in baseball by the batter', 'name': 'baseball_bat'}, {'frequency': 'f', 'id': 59, 'synset': 'baseball_cap.n.01', 'synonyms': ['baseball_cap', 'jockey_cap', 'golf_cap'], 'def': 'a cap with a bill', 'name': 'baseball_cap'}, {'frequency': 'f', 'id': 60, 'synset': 'baseball_glove.n.01', 'synonyms': ['baseball_glove', 'baseball_mitt'], 'def': 'the handwear used by fielders in playing baseball', 'name': 'baseball_glove'}, {'frequency': 'f', 'id': 61, 'synset': 'basket.n.01', 'synonyms': ['basket', 'handbasket'], 'def': 'a container that is usually woven and has handles', 'name': 'basket'}, {'frequency': 'c', 'id': 62, 'synset': 'basket.n.03', 'synonyms': ['basketball_hoop'], 'def': 'metal hoop supporting a net through which players try to throw the basketball', 'name': 'basketball_hoop'}, {'frequency': 'c', 'id': 63, 'synset': 'basketball.n.02', 'synonyms': ['basketball'], 'def': 'an inflated ball used in playing basketball', 'name': 'basketball'}, {'frequency': 'r', 'id': 64, 'synset': 'bass_horn.n.01', 'synonyms': ['bass_horn', 'sousaphone', 'tuba'], 'def': 'the lowest brass wind instrument', 'name': 'bass_horn'}, {'frequency': 'r', 'id': 65, 'synset': 'bat.n.01', 'synonyms': ['bat_(animal)'], 'def': 'nocturnal mouselike mammal with forelimbs modified to form membranous wings', 'name': 'bat_(animal)'}, {'frequency': 'f', 'id': 66, 'synset': 'bath_mat.n.01', 'synonyms': ['bath_mat'], 'def': 'a heavy towel or mat to stand on while drying yourself after a bath', 'name': 'bath_mat'}, {'frequency': 'f', 'id': 67, 'synset': 'bath_towel.n.01', 'synonyms': ['bath_towel'], 'def': 'a large towel; to dry yourself after a bath', 'name': 'bath_towel'}, {'frequency': 'c', 'id': 68, 'synset': 'bathrobe.n.01', 'synonyms': ['bathrobe'], 'def': 'a loose-fitting robe of towelling; worn after a bath or swim', 'name': 'bathrobe'}, {'frequency': 'f', 'id': 69, 'synset': 'bathtub.n.01', 'synonyms': ['bathtub', 'bathing_tub'], 'def': 'a large open container that you fill with water and use to wash the body', 'name': 'bathtub'}, {'frequency': 'r', 'id': 70, 'synset': 'batter.n.02', 'synonyms': ['batter_(food)'], 'def': 'a liquid or semiliquid mixture, as of flour, eggs, and milk, used in cooking', 'name': 'batter_(food)'}, {'frequency': 'c', 'id': 71, 'synset': 'battery.n.02', 'synonyms': ['battery'], 'def': 'a portable device that produces electricity', 'name': 'battery'}, {'frequency': 'r', 'id': 72, 'synset': 'beach_ball.n.01', 'synonyms': ['beachball'], 'def': 'large and light ball; for play at the seaside', 'name': 'beachball'}, {'frequency': 'c', 'id': 73, 'synset': 'bead.n.01', 'synonyms': ['bead'], 'def': 'a small ball with a hole through the middle used for ornamentation, jewellery, etc.', 'name': 'bead'}, {'frequency': 'r', 'id': 74, 'synset': 'beaker.n.01', 'synonyms': ['beaker'], 'def': 'a flatbottomed jar made of glass or plastic; used for chemistry', 'name': 'beaker'}, {'frequency': 'c', 'id': 75, 'synset': 'bean_curd.n.01', 'synonyms': ['bean_curd', 'tofu'], 'def': 'cheeselike food made of curdled soybean milk', 'name': 'bean_curd'}, {'frequency': 'c', 'id': 76, 'synset': 'beanbag.n.01', 'synonyms': ['beanbag'], 'def': 'a bag filled with dried beans or similar items; used in games or to sit on', 'name': 'beanbag'}, {'frequency': 'f', 'id': 77, 'synset': 'beanie.n.01', 'synonyms': ['beanie', 'beany'], 'def': 'a small skullcap; formerly worn by schoolboys and college freshmen', 'name': 'beanie'}, {'frequency': 'f', 'id': 78, 'synset': 'bear.n.01', 'synonyms': ['bear'], 'def': 'large carnivorous or omnivorous mammals with shaggy coats and claws', 'name': 'bear'}, {'frequency': 'f', 'id': 79, 'synset': 'bed.n.01', 'synonyms': ['bed'], 'def': 'a piece of furniture that provides a place to sleep', 'name': 'bed'}, {'frequency': 'c', 'id': 80, 'synset': 'bedspread.n.01', 'synonyms': ['bedspread', 'bedcover', 'bed_covering', 'counterpane', 'spread'], 'def': 'decorative cover for a bed', 'name': 'bedspread'}, {'frequency': 'f', 'id': 81, 'synset': 'beef.n.01', 'synonyms': ['cow'], 'def': 'cattle that are reared for their meat', 'name': 'cow'}, {'frequency': 'c', 'id': 82, 'synset': 'beef.n.02', 'synonyms': ['beef_(food)', 'boeuf_(food)'], 'def': 'meat from an adult domestic bovine', 'name': 'beef_(food)'}, {'frequency': 'r', 'id': 83, 'synset': 'beeper.n.01', 'synonyms': ['beeper', 'pager'], 'def': 'an device that beeps when the person carrying it is being paged', 'name': 'beeper'}, {'frequency': 'f', 'id': 84, 'synset': 'beer_bottle.n.01', 'synonyms': ['beer_bottle'], 'def': 'a bottle that holds beer', 'name': 'beer_bottle'}, {'frequency': 'c', 'id': 85, 'synset': 'beer_can.n.01', 'synonyms': ['beer_can'], 'def': 'a can that holds beer', 'name': 'beer_can'}, {'frequency': 'r', 'id': 86, 'synset': 'beetle.n.01', 'synonyms': ['beetle'], 'def': 'insect with hard wing covers', 'name': 'beetle'}, {'frequency': 'f', 'id': 87, 'synset': 'bell.n.01', 'synonyms': ['bell'], 'def': 'a hollow device made of metal that makes a ringing sound when struck', 'name': 'bell'}, {'frequency': 'f', 'id': 88, 'synset': 'bell_pepper.n.02', 'synonyms': ['bell_pepper', 'capsicum'], 'def': 'large bell-shaped sweet pepper in green or red or yellow or orange or black varieties', 'name': 'bell_pepper'}, {'frequency': 'f', 'id': 89, 'synset': 'belt.n.02', 'synonyms': ['belt'], 'def': 'a band to tie or buckle around the body (usually at the waist)', 'name': 'belt'}, {'frequency': 'f', 'id': 90, 'synset': 'belt_buckle.n.01', 'synonyms': ['belt_buckle'], 'def': 'the buckle used to fasten a belt', 'name': 'belt_buckle'}, {'frequency': 'f', 'id': 91, 'synset': 'bench.n.01', 'synonyms': ['bench'], 'def': 'a long seat for more than one person', 'name': 'bench'}, {'frequency': 'c', 'id': 92, 'synset': 'beret.n.01', 'synonyms': ['beret'], 'def': 'a cap with no brim or bill; made of soft cloth', 'name': 'beret'}, {'frequency': 'c', 'id': 93, 'synset': 'bib.n.02', 'synonyms': ['bib'], 'def': 'a napkin tied under the chin of a child while eating', 'name': 'bib'}, {'frequency': 'r', 'id': 94, 'synset': 'bible.n.01', 'synonyms': ['Bible'], 'def': 'the sacred writings of the Christian religions', 'name': 'Bible'}, {'frequency': 'f', 'id': 95, 'synset': 'bicycle.n.01', 'synonyms': ['bicycle', 'bike_(bicycle)'], 'def': 'a wheeled vehicle that has two wheels and is moved by foot pedals', 'name': 'bicycle'}, {'frequency': 'f', 'id': 96, 'synset': 'bill.n.09', 'synonyms': ['visor', 'vizor'], 'def': 'a brim that projects to the front to shade the eyes', 'name': 'visor'}, {'frequency': 'c', 'id': 97, 'synset': 'binder.n.03', 'synonyms': ['binder', 'ring-binder'], 'def': 'holds loose papers or magazines', 'name': 'binder'}, {'frequency': 'c', 'id': 98, 'synset': 'binoculars.n.01', 'synonyms': ['binoculars', 'field_glasses', 'opera_glasses'], 'def': 'an optical instrument designed for simultaneous use by both eyes', 'name': 'binoculars'}, {'frequency': 'f', 'id': 99, 'synset': 'bird.n.01', 'synonyms': ['bird'], 'def': 'animal characterized by feathers and wings', 'name': 'bird'}, {'frequency': 'r', 'id': 100, 'synset': 'bird_feeder.n.01', 'synonyms': ['birdfeeder'], 'def': 'an outdoor device that supplies food for wild birds', 'name': 'birdfeeder'}, {'frequency': 'r', 'id': 101, 'synset': 'birdbath.n.01', 'synonyms': ['birdbath'], 'def': 'an ornamental basin (usually in a garden) for birds to bathe in', 'name': 'birdbath'}, {'frequency': 'c', 'id': 102, 'synset': 'birdcage.n.01', 'synonyms': ['birdcage'], 'def': 'a cage in which a bird can be kept', 'name': 'birdcage'}, {'frequency': 'c', 'id': 103, 'synset': 'birdhouse.n.01', 'synonyms': ['birdhouse'], 'def': 'a shelter for birds', 'name': 'birdhouse'}, {'frequency': 'f', 'id': 104, 'synset': 'birthday_cake.n.01', 'synonyms': ['birthday_cake'], 'def': 'decorated cake served at a birthday party', 'name': 'birthday_cake'}, {'frequency': 'r', 'id': 105, 'synset': 'birthday_card.n.01', 'synonyms': ['birthday_card'], 'def': 'a card expressing a birthday greeting', 'name': 'birthday_card'}, {'frequency': 'r', 'id': 106, 'synset': 'biscuit.n.01', 'synonyms': ['biscuit_(bread)'], 'def': 'small round bread leavened with baking-powder or soda', 'name': 'biscuit_(bread)'}, {'frequency': 'r', 'id': 107, 'synset': 'black_flag.n.01', 'synonyms': ['pirate_flag'], 'def': 'a flag usually bearing a white skull and crossbones on a black background', 'name': 'pirate_flag'}, {'frequency': 'c', 'id': 108, 'synset': 'black_sheep.n.02', 'synonyms': ['black_sheep'], 'def': 'sheep with a black coat', 'name': 'black_sheep'}, {'frequency': 'c', 'id': 109, 'synset': 'blackboard.n.01', 'synonyms': ['blackboard', 'chalkboard'], 'def': 'sheet of slate; for writing with chalk', 'name': 'blackboard'}, {'frequency': 'f', 'id': 110, 'synset': 'blanket.n.01', 'synonyms': ['blanket'], 'def': 'bedding that keeps a person warm in bed', 'name': 'blanket'}, {'frequency': 'c', 'id': 111, 'synset': 'blazer.n.01', 'synonyms': ['blazer', 'sport_jacket', 'sport_coat', 'sports_jacket', 'sports_coat'], 'def': 'lightweight jacket; often striped in the colors of a club or school', 'name': 'blazer'}, {'frequency': 'f', 'id': 112, 'synset': 'blender.n.01', 'synonyms': ['blender', 'liquidizer', 'liquidiser'], 'def': 'an electrically powered mixer that mix or chop or liquefy foods', 'name': 'blender'}, {'frequency': 'r', 'id': 113, 'synset': 'blimp.n.02', 'synonyms': ['blimp'], 'def': 'a small nonrigid airship used for observation or as a barrage balloon', 'name': 'blimp'}, {'frequency': 'c', 'id': 114, 'synset': 'blinker.n.01', 'synonyms': ['blinker', 'flasher'], 'def': 'a light that flashes on and off; used as a signal or to send messages', 'name': 'blinker'}, {'frequency': 'c', 'id': 115, 'synset': 'blueberry.n.02', 'synonyms': ['blueberry'], 'def': 'sweet edible dark-blue berries of blueberry plants', 'name': 'blueberry'}, {'frequency': 'r', 'id': 116, 'synset': 'boar.n.02', 'synonyms': ['boar'], 'def': 'an uncastrated male hog', 'name': 'boar'}, {'frequency': 'r', 'id': 117, 'synset': 'board.n.09', 'synonyms': ['gameboard'], 'def': 'a flat portable surface (usually rectangular) designed for board games', 'name': 'gameboard'}, {'frequency': 'f', 'id': 118, 'synset': 'boat.n.01', 'synonyms': ['boat', 'ship_(boat)'], 'def': 'a vessel for travel on water', 'name': 'boat'}, {'frequency': 'c', 'id': 119, 'synset': 'bobbin.n.01', 'synonyms': ['bobbin', 'spool', 'reel'], 'def': 'a thing around which thread/tape/film or other flexible materials can be wound', 'name': 'bobbin'}, {'frequency': 'r', 'id': 120, 'synset': 'bobby_pin.n.01', 'synonyms': ['bobby_pin', 'hairgrip'], 'def': 'a flat wire hairpin used to hold bobbed hair in place', 'name': 'bobby_pin'}, {'frequency': 'c', 'id': 121, 'synset': 'boiled_egg.n.01', 'synonyms': ['boiled_egg', 'coddled_egg'], 'def': 'egg cooked briefly in the shell in gently boiling water', 'name': 'boiled_egg'}, {'frequency': 'r', 'id': 122, 'synset': 'bolo_tie.n.01', 'synonyms': ['bolo_tie', 'bolo', 'bola_tie', 'bola'], 'def': 'a cord fastened around the neck with an ornamental clasp and worn as a necktie', 'name': 'bolo_tie'}, {'frequency': 'c', 'id': 123, 'synset': 'bolt.n.03', 'synonyms': ['deadbolt'], 'def': 'the part of a lock that is engaged or withdrawn with a key', 'name': 'deadbolt'}, {'frequency': 'f', 'id': 124, 'synset': 'bolt.n.06', 'synonyms': ['bolt'], 'def': 'a screw that screws into a nut to form a fastener', 'name': 'bolt'}, {'frequency': 'r', 'id': 125, 'synset': 'bonnet.n.01', 'synonyms': ['bonnet'], 'def': 'a hat tied under the chin', 'name': 'bonnet'}, {'frequency': 'f', 'id': 126, 'synset': 'book.n.01', 'synonyms': ['book'], 'def': 'a written work or composition that has been published', 'name': 'book'}, {'frequency': 'r', 'id': 127, 'synset': 'book_bag.n.01', 'synonyms': ['book_bag'], 'def': 'a bag in which students carry their books', 'name': 'book_bag'}, {'frequency': 'c', 'id': 128, 'synset': 'bookcase.n.01', 'synonyms': ['bookcase'], 'def': 'a piece of furniture with shelves for storing books', 'name': 'bookcase'}, {'frequency': 'c', 'id': 129, 'synset': 'booklet.n.01', 'synonyms': ['booklet', 'brochure', 'leaflet', 'pamphlet'], 'def': 'a small book usually having a paper cover', 'name': 'booklet'}, {'frequency': 'r', 'id': 130, 'synset': 'bookmark.n.01', 'synonyms': ['bookmark', 'bookmarker'], 'def': 'a marker (a piece of paper or ribbon) placed between the pages of a book', 'name': 'bookmark'}, {'frequency': 'r', 'id': 131, 'synset': 'boom.n.04', 'synonyms': ['boom_microphone', 'microphone_boom'], 'def': 'a pole carrying an overhead microphone projected over a film or tv set', 'name': 'boom_microphone'}, {'frequency': 'f', 'id': 132, 'synset': 'boot.n.01', 'synonyms': ['boot'], 'def': 'footwear that covers the whole foot and lower leg', 'name': 'boot'}, {'frequency': 'f', 'id': 133, 'synset': 'bottle.n.01', 'synonyms': ['bottle'], 'def': 'a glass or plastic vessel used for storing drinks or other liquids', 'name': 'bottle'}, {'frequency': 'c', 'id': 134, 'synset': 'bottle_opener.n.01', 'synonyms': ['bottle_opener'], 'def': 'an opener for removing caps or corks from bottles', 'name': 'bottle_opener'}, {'frequency': 'c', 'id': 135, 'synset': 'bouquet.n.01', 'synonyms': ['bouquet'], 'def': 'an arrangement of flowers that is usually given as a present', 'name': 'bouquet'}, {'frequency': 'r', 'id': 136, 'synset': 'bow.n.04', 'synonyms': ['bow_(weapon)'], 'def': 'a weapon for shooting arrows', 'name': 'bow_(weapon)'}, {'frequency': 'f', 'id': 137, 'synset': 'bow.n.08', 'synonyms': ['bow_(decorative_ribbons)'], 'def': 'a decorative interlacing of ribbons', 'name': 'bow_(decorative_ribbons)'}, {'frequency': 'f', 'id': 138, 'synset': 'bow_tie.n.01', 'synonyms': ['bow-tie', 'bowtie'], 'def': "a man's tie that ties in a bow", 'name': 'bow-tie'}, {'frequency': 'f', 'id': 139, 'synset': 'bowl.n.03', 'synonyms': ['bowl'], 'def': 'a dish that is round and open at the top for serving foods', 'name': 'bowl'}, {'frequency': 'r', 'id': 140, 'synset': 'bowl.n.08', 'synonyms': ['pipe_bowl'], 'def': 'a small round container that is open at the top for holding tobacco', 'name': 'pipe_bowl'}, {'frequency': 'c', 'id': 141, 'synset': 'bowler_hat.n.01', 'synonyms': ['bowler_hat', 'bowler', 'derby_hat', 'derby', 'plug_hat'], 'def': 'a felt hat that is round and hard with a narrow brim', 'name': 'bowler_hat'}, {'frequency': 'r', 'id': 142, 'synset': 'bowling_ball.n.01', 'synonyms': ['bowling_ball'], 'def': 'a large ball with finger holes used in the sport of bowling', 'name': 'bowling_ball'}, {'frequency': 'r', 'id': 143, 'synset': 'bowling_pin.n.01', 'synonyms': ['bowling_pin'], 'def': 'a club-shaped wooden object used in bowling', 'name': 'bowling_pin'}, {'frequency': 'r', 'id': 144, 'synset': 'boxing_glove.n.01', 'synonyms': ['boxing_glove'], 'def': 'large glove coverings the fists of a fighter worn for the sport of boxing', 'name': 'boxing_glove'}, {'frequency': 'c', 'id': 145, 'synset': 'brace.n.06', 'synonyms': ['suspenders'], 'def': 'elastic straps that hold trousers up (usually used in the plural)', 'name': 'suspenders'}, {'frequency': 'f', 'id': 146, 'synset': 'bracelet.n.02', 'synonyms': ['bracelet', 'bangle'], 'def': 'jewelry worn around the wrist for decoration', 'name': 'bracelet'}, {'frequency': 'r', 'id': 147, 'synset': 'brass.n.07', 'synonyms': ['brass_plaque'], 'def': 'a memorial made of brass', 'name': 'brass_plaque'}, {'frequency': 'c', 'id': 148, 'synset': 'brassiere.n.01', 'synonyms': ['brassiere', 'bra', 'bandeau'], 'def': 'an undergarment worn by women to support their breasts', 'name': 'brassiere'}, {'frequency': 'c', 'id': 149, 'synset': 'bread-bin.n.01', 'synonyms': ['bread-bin', 'breadbox'], 'def': 'a container used to keep bread or cake in', 'name': 'bread-bin'}, {'frequency': 'r', 'id': 150, 'synset': 'breechcloth.n.01', 'synonyms': ['breechcloth', 'breechclout', 'loincloth'], 'def': 'a garment that provides covering for the loins', 'name': 'breechcloth'}, {'frequency': 'c', 'id': 151, 'synset': 'bridal_gown.n.01', 'synonyms': ['bridal_gown', 'wedding_gown', 'wedding_dress'], 'def': 'a gown worn by the bride at a wedding', 'name': 'bridal_gown'}, {'frequency': 'c', 'id': 152, 'synset': 'briefcase.n.01', 'synonyms': ['briefcase'], 'def': 'a case with a handle; for carrying papers or files or books', 'name': 'briefcase'}, {'frequency': 'c', 'id': 153, 'synset': 'bristle_brush.n.01', 'synonyms': ['bristle_brush'], 'def': 'a brush that is made with the short stiff hairs of an animal or plant', 'name': 'bristle_brush'}, {'frequency': 'f', 'id': 154, 'synset': 'broccoli.n.01', 'synonyms': ['broccoli'], 'def': 'plant with dense clusters of tight green flower buds', 'name': 'broccoli'}, {'frequency': 'r', 'id': 155, 'synset': 'brooch.n.01', 'synonyms': ['broach'], 'def': 'a decorative pin worn by women', 'name': 'broach'}, {'frequency': 'c', 'id': 156, 'synset': 'broom.n.01', 'synonyms': ['broom'], 'def': 'bundle of straws or twigs attached to a long handle; used for cleaning', 'name': 'broom'}, {'frequency': 'c', 'id': 157, 'synset': 'brownie.n.03', 'synonyms': ['brownie'], 'def': 'square or bar of very rich chocolate cake usually with nuts', 'name': 'brownie'}, {'frequency': 'c', 'id': 158, 'synset': 'brussels_sprouts.n.01', 'synonyms': ['brussels_sprouts'], 'def': 'the small edible cabbage-like buds growing along a stalk', 'name': 'brussels_sprouts'}, {'frequency': 'r', 'id': 159, 'synset': 'bubble_gum.n.01', 'synonyms': ['bubble_gum'], 'def': 'a kind of chewing gum that can be blown into bubbles', 'name': 'bubble_gum'}, {'frequency': 'f', 'id': 160, 'synset': 'bucket.n.01', 'synonyms': ['bucket', 'pail'], 'def': 'a roughly cylindrical vessel that is open at the top', 'name': 'bucket'}, {'frequency': 'r', 'id': 161, 'synset': 'buggy.n.01', 'synonyms': ['horse_buggy'], 'def': 'a small lightweight carriage; drawn by a single horse', 'name': 'horse_buggy'}, {'frequency': 'c', 'id': 162, 'synset': 'bull.n.11', 'synonyms': ['bull'], 'def': 'mature male cow', 'name': 'bull'}, {'frequency': 'r', 'id': 163, 'synset': 'bulldog.n.01', 'synonyms': ['bulldog'], 'def': 'a thickset short-haired dog with a large head and strong undershot lower jaw', 'name': 'bulldog'}, {'frequency': 'r', 'id': 164, 'synset': 'bulldozer.n.01', 'synonyms': ['bulldozer', 'dozer'], 'def': 'large powerful tractor; a large blade in front flattens areas of ground', 'name': 'bulldozer'}, {'frequency': 'c', 'id': 165, 'synset': 'bullet_train.n.01', 'synonyms': ['bullet_train'], 'def': 'a high-speed passenger train', 'name': 'bullet_train'}, {'frequency': 'c', 'id': 166, 'synset': 'bulletin_board.n.02', 'synonyms': ['bulletin_board', 'notice_board'], 'def': 'a board that hangs on a wall; displays announcements', 'name': 'bulletin_board'}, {'frequency': 'r', 'id': 167, 'synset': 'bulletproof_vest.n.01', 'synonyms': ['bulletproof_vest'], 'def': 'a vest capable of resisting the impact of a bullet', 'name': 'bulletproof_vest'}, {'frequency': 'c', 'id': 168, 'synset': 'bullhorn.n.01', 'synonyms': ['bullhorn', 'megaphone'], 'def': 'a portable loudspeaker with built-in microphone and amplifier', 'name': 'bullhorn'}, {'frequency': 'r', 'id': 169, 'synset': 'bully_beef.n.01', 'synonyms': ['corned_beef', 'corn_beef'], 'def': 'beef cured or pickled in brine', 'name': 'corned_beef'}, {'frequency': 'f', 'id': 170, 'synset': 'bun.n.01', 'synonyms': ['bun', 'roll'], 'def': 'small rounded bread either plain or sweet', 'name': 'bun'}, {'frequency': 'c', 'id': 171, 'synset': 'bunk_bed.n.01', 'synonyms': ['bunk_bed'], 'def': 'beds built one above the other', 'name': 'bunk_bed'}, {'frequency': 'f', 'id': 172, 'synset': 'buoy.n.01', 'synonyms': ['buoy'], 'def': 'a float attached by rope to the seabed to mark channels in a harbor or underwater hazards', 'name': 'buoy'}, {'frequency': 'r', 'id': 173, 'synset': 'burrito.n.01', 'synonyms': ['burrito'], 'def': 'a flour tortilla folded around a filling', 'name': 'burrito'}, {'frequency': 'f', 'id': 174, 'synset': 'bus.n.01', 'synonyms': ['bus_(vehicle)', 'autobus', 'charabanc', 'double-decker', 'motorbus', 'motorcoach'], 'def': 'a vehicle carrying many passengers; used for public transport', 'name': 'bus_(vehicle)'}, {'frequency': 'c', 'id': 175, 'synset': 'business_card.n.01', 'synonyms': ['business_card'], 'def': "a card on which are printed the person's name and business affiliation", 'name': 'business_card'}, {'frequency': 'c', 'id': 176, 'synset': 'butcher_knife.n.01', 'synonyms': ['butcher_knife'], 'def': 'a large sharp knife for cutting or trimming meat', 'name': 'butcher_knife'}, {'frequency': 'c', 'id': 177, 'synset': 'butter.n.01', 'synonyms': ['butter'], 'def': 'an edible emulsion of fat globules made by churning milk or cream; for cooking and table use', 'name': 'butter'}, {'frequency': 'c', 'id': 178, 'synset': 'butterfly.n.01', 'synonyms': ['butterfly'], 'def': 'insect typically having a slender body with knobbed antennae and broad colorful wings', 'name': 'butterfly'}, {'frequency': 'f', 'id': 179, 'synset': 'button.n.01', 'synonyms': ['button'], 'def': 'a round fastener sewn to shirts and coats etc to fit through buttonholes', 'name': 'button'}, {'frequency': 'f', 'id': 180, 'synset': 'cab.n.03', 'synonyms': ['cab_(taxi)', 'taxi', 'taxicab'], 'def': 'a car that takes passengers where they want to go in exchange for money', 'name': 'cab_(taxi)'}, {'frequency': 'r', 'id': 181, 'synset': 'cabana.n.01', 'synonyms': ['cabana'], 'def': 'a small tent used as a dressing room beside the sea or a swimming pool', 'name': 'cabana'}, {'frequency': 'r', 'id': 182, 'synset': 'cabin_car.n.01', 'synonyms': ['cabin_car', 'caboose'], 'def': 'a car on a freight train for use of the train crew; usually the last car on the train', 'name': 'cabin_car'}, {'frequency': 'f', 'id': 183, 'synset': 'cabinet.n.01', 'synonyms': ['cabinet'], 'def': 'a piece of furniture resembling a cupboard with doors and shelves and drawers', 'name': 'cabinet'}, {'frequency': 'r', 'id': 184, 'synset': 'cabinet.n.03', 'synonyms': ['locker', 'storage_locker'], 'def': 'a storage compartment for clothes and valuables; usually it has a lock', 'name': 'locker'}, {'frequency': 'f', 'id': 185, 'synset': 'cake.n.03', 'synonyms': ['cake'], 'def': 'baked goods made from or based on a mixture of flour, sugar, eggs, and fat', 'name': 'cake'}, {'frequency': 'c', 'id': 186, 'synset': 'calculator.n.02', 'synonyms': ['calculator'], 'def': 'a small machine that is used for mathematical calculations', 'name': 'calculator'}, {'frequency': 'f', 'id': 187, 'synset': 'calendar.n.02', 'synonyms': ['calendar'], 'def': 'a list or register of events (appointments/social events/court cases, etc)', 'name': 'calendar'}, {'frequency': 'c', 'id': 188, 'synset': 'calf.n.01', 'synonyms': ['calf'], 'def': 'young of domestic cattle', 'name': 'calf'}, {'frequency': 'c', 'id': 189, 'synset': 'camcorder.n.01', 'synonyms': ['camcorder'], 'def': 'a portable television camera and videocassette recorder', 'name': 'camcorder'}, {'frequency': 'c', 'id': 190, 'synset': 'camel.n.01', 'synonyms': ['camel'], 'def': 'cud-chewing mammal used as a draft or saddle animal in desert regions', 'name': 'camel'}, {'frequency': 'f', 'id': 191, 'synset': 'camera.n.01', 'synonyms': ['camera'], 'def': 'equipment for taking photographs', 'name': 'camera'}, {'frequency': 'c', 'id': 192, 'synset': 'camera_lens.n.01', 'synonyms': ['camera_lens'], 'def': 'a lens that focuses the image in a camera', 'name': 'camera_lens'}, {'frequency': 'c', 'id': 193, 'synset': 'camper.n.02', 'synonyms': ['camper_(vehicle)', 'camping_bus', 'motor_home'], 'def': 'a recreational vehicle equipped for camping out while traveling', 'name': 'camper_(vehicle)'}, {'frequency': 'f', 'id': 194, 'synset': 'can.n.01', 'synonyms': ['can', 'tin_can'], 'def': 'airtight sealed metal container for food or drink or paint etc.', 'name': 'can'}, {'frequency': 'c', 'id': 195, 'synset': 'can_opener.n.01', 'synonyms': ['can_opener', 'tin_opener'], 'def': 'a device for cutting cans open', 'name': 'can_opener'}, {'frequency': 'r', 'id': 196, 'synset': 'candelabrum.n.01', 'synonyms': ['candelabrum', 'candelabra'], 'def': 'branched candlestick; ornamental; has several lights', 'name': 'candelabrum'}, {'frequency': 'f', 'id': 197, 'synset': 'candle.n.01', 'synonyms': ['candle', 'candlestick'], 'def': 'stick of wax with a wick in the middle', 'name': 'candle'}, {'frequency': 'f', 'id': 198, 'synset': 'candlestick.n.01', 'synonyms': ['candle_holder'], 'def': 'a holder with sockets for candles', 'name': 'candle_holder'}, {'frequency': 'r', 'id': 199, 'synset': 'candy_bar.n.01', 'synonyms': ['candy_bar'], 'def': 'a candy shaped as a bar', 'name': 'candy_bar'}, {'frequency': 'c', 'id': 200, 'synset': 'candy_cane.n.01', 'synonyms': ['candy_cane'], 'def': 'a hard candy in the shape of a rod (usually with stripes)', 'name': 'candy_cane'}, {'frequency': 'c', 'id': 201, 'synset': 'cane.n.01', 'synonyms': ['walking_cane'], 'def': 'a stick that people can lean on to help them walk', 'name': 'walking_cane'}, {'frequency': 'c', 'id': 202, 'synset': 'canister.n.02', 'synonyms': ['canister', 'cannister'], 'def': 'metal container for storing dry foods such as tea or flour', 'name': 'canister'}, {'frequency': 'r', 'id': 203, 'synset': 'cannon.n.02', 'synonyms': ['cannon'], 'def': 'heavy gun fired from a tank', 'name': 'cannon'}, {'frequency': 'c', 'id': 204, 'synset': 'canoe.n.01', 'synonyms': ['canoe'], 'def': 'small and light boat; pointed at both ends; propelled with a paddle', 'name': 'canoe'}, {'frequency': 'r', 'id': 205, 'synset': 'cantaloup.n.02', 'synonyms': ['cantaloup', 'cantaloupe'], 'def': 'the fruit of a cantaloup vine; small to medium-sized melon with yellowish flesh', 'name': 'cantaloup'}, {'frequency': 'r', 'id': 206, 'synset': 'canteen.n.01', 'synonyms': ['canteen'], 'def': 'a flask for carrying water; used by soldiers or travelers', 'name': 'canteen'}, {'frequency': 'c', 'id': 207, 'synset': 'cap.n.01', 'synonyms': ['cap_(headwear)'], 'def': 'a tight-fitting headwear', 'name': 'cap_(headwear)'}, {'frequency': 'f', 'id': 208, 'synset': 'cap.n.02', 'synonyms': ['bottle_cap', 'cap_(container_lid)'], 'def': 'a top (as for a bottle)', 'name': 'bottle_cap'}, {'frequency': 'r', 'id': 209, 'synset': 'cape.n.02', 'synonyms': ['cape'], 'def': 'a sleeveless garment like a cloak but shorter', 'name': 'cape'}, {'frequency': 'c', 'id': 210, 'synset': 'cappuccino.n.01', 'synonyms': ['cappuccino', 'coffee_cappuccino'], 'def': 'equal parts of espresso and steamed milk', 'name': 'cappuccino'}, {'frequency': 'f', 'id': 211, 'synset': 'car.n.01', 'synonyms': ['car_(automobile)', 'auto_(automobile)', 'automobile'], 'def': 'a motor vehicle with four wheels', 'name': 'car_(automobile)'}, {'frequency': 'f', 'id': 212, 'synset': 'car.n.02', 'synonyms': ['railcar_(part_of_a_train)', 'railway_car_(part_of_a_train)', 'railroad_car_(part_of_a_train)'], 'def': 'a wheeled vehicle adapted to the rails of railroad', 'name': 'railcar_(part_of_a_train)'}, {'frequency': 'r', 'id': 213, 'synset': 'car.n.04', 'synonyms': ['elevator_car'], 'def': 'where passengers ride up and down', 'name': 'elevator_car'}, {'frequency': 'r', 'id': 214, 'synset': 'car_battery.n.01', 'synonyms': ['car_battery', 'automobile_battery'], 'def': 'a battery in a motor vehicle', 'name': 'car_battery'}, {'frequency': 'c', 'id': 215, 'synset': 'card.n.02', 'synonyms': ['identity_card'], 'def': 'a card certifying the identity of the bearer', 'name': 'identity_card'}, {'frequency': 'c', 'id': 216, 'synset': 'card.n.03', 'synonyms': ['card'], 'def': 'a rectangular piece of paper used to send messages (e.g. greetings or pictures)', 'name': 'card'}, {'frequency': 'r', 'id': 217, 'synset': 'cardigan.n.01', 'synonyms': ['cardigan'], 'def': 'knitted jacket that is fastened up the front with buttons or a zipper', 'name': 'cardigan'}, {'frequency': 'r', 'id': 218, 'synset': 'cargo_ship.n.01', 'synonyms': ['cargo_ship', 'cargo_vessel'], 'def': 'a ship designed to carry cargo', 'name': 'cargo_ship'}, {'frequency': 'r', 'id': 219, 'synset': 'carnation.n.01', 'synonyms': ['carnation'], 'def': 'plant with pink to purple-red spice-scented usually double flowers', 'name': 'carnation'}, {'frequency': 'c', 'id': 220, 'synset': 'carriage.n.02', 'synonyms': ['horse_carriage'], 'def': 'a vehicle with wheels drawn by one or more horses', 'name': 'horse_carriage'}, {'frequency': 'f', 'id': 221, 'synset': 'carrot.n.01', 'synonyms': ['carrot'], 'def': 'deep orange edible root of the cultivated carrot plant', 'name': 'carrot'}, {'frequency': 'c', 'id': 222, 'synset': 'carryall.n.01', 'synonyms': ['tote_bag'], 'def': 'a capacious bag or basket', 'name': 'tote_bag'}, {'frequency': 'c', 'id': 223, 'synset': 'cart.n.01', 'synonyms': ['cart'], 'def': 'a heavy open wagon usually having two wheels and drawn by an animal', 'name': 'cart'}, {'frequency': 'c', 'id': 224, 'synset': 'carton.n.02', 'synonyms': ['carton'], 'def': 'a box made of cardboard; opens by flaps on top', 'name': 'carton'}, {'frequency': 'c', 'id': 225, 'synset': 'cash_register.n.01', 'synonyms': ['cash_register', 'register_(for_cash_transactions)'], 'def': 'a cashbox with an adding machine to register transactions', 'name': 'cash_register'}, {'frequency': 'r', 'id': 226, 'synset': 'casserole.n.01', 'synonyms': ['casserole'], 'def': 'food cooked and served in a casserole', 'name': 'casserole'}, {'frequency': 'r', 'id': 227, 'synset': 'cassette.n.01', 'synonyms': ['cassette'], 'def': 'a container that holds a magnetic tape used for recording or playing sound or video', 'name': 'cassette'}, {'frequency': 'c', 'id': 228, 'synset': 'cast.n.05', 'synonyms': ['cast', 'plaster_cast', 'plaster_bandage'], 'def': 'bandage consisting of a firm covering that immobilizes broken bones while they heal', 'name': 'cast'}, {'frequency': 'f', 'id': 229, 'synset': 'cat.n.01', 'synonyms': ['cat'], 'def': 'a domestic house cat', 'name': 'cat'}, {'frequency': 'c', 'id': 230, 'synset': 'cauliflower.n.02', 'synonyms': ['cauliflower'], 'def': 'edible compact head of white undeveloped flowers', 'name': 'cauliflower'}, {'frequency': 'r', 'id': 231, 'synset': 'caviar.n.01', 'synonyms': ['caviar', 'caviare'], 'def': "salted roe of sturgeon or other large fish; usually served as an hors d'oeuvre", 'name': 'caviar'}, {'frequency': 'c', 'id': 232, 'synset': 'cayenne.n.02', 'synonyms': ['cayenne_(spice)', 'cayenne_pepper_(spice)', 'red_pepper_(spice)'], 'def': 'ground pods and seeds of pungent red peppers of the genus Capsicum', 'name': 'cayenne_(spice)'}, {'frequency': 'c', 'id': 233, 'synset': 'cd_player.n.01', 'synonyms': ['CD_player'], 'def': 'electronic equipment for playing compact discs (CDs)', 'name': 'CD_player'}, {'frequency': 'c', 'id': 234, 'synset': 'celery.n.01', 'synonyms': ['celery'], 'def': 'widely cultivated herb with aromatic leaf stalks that are eaten raw or cooked', 'name': 'celery'}, {'frequency': 'f', 'id': 235, 'synset': 'cellular_telephone.n.01', 'synonyms': ['cellular_telephone', 'cellular_phone', 'cellphone', 'mobile_phone', 'smart_phone'], 'def': 'a hand-held mobile telephone', 'name': 'cellular_telephone'}, {'frequency': 'r', 'id': 236, 'synset': 'chain_mail.n.01', 'synonyms': ['chain_mail', 'ring_mail', 'chain_armor', 'chain_armour', 'ring_armor', 'ring_armour'], 'def': '(Middle Ages) flexible armor made of interlinked metal rings', 'name': 'chain_mail'}, {'frequency': 'f', 'id': 237, 'synset': 'chair.n.01', 'synonyms': ['chair'], 'def': 'a seat for one person, with a support for the back', 'name': 'chair'}, {'frequency': 'r', 'id': 238, 'synset': 'chaise_longue.n.01', 'synonyms': ['chaise_longue', 'chaise', 'daybed'], 'def': 'a long chair; for reclining', 'name': 'chaise_longue'}, {'frequency': 'r', 'id': 239, 'synset': 'champagne.n.01', 'synonyms': ['champagne'], 'def': 'a white sparkling wine produced in Champagne or resembling that produced there', 'name': 'champagne'}, {'frequency': 'f', 'id': 240, 'synset': 'chandelier.n.01', 'synonyms': ['chandelier'], 'def': 'branched lighting fixture; often ornate; hangs from the ceiling', 'name': 'chandelier'}, {'frequency': 'r', 'id': 241, 'synset': 'chap.n.04', 'synonyms': ['chap'], 'def': 'leather leggings without a seat; worn over trousers by cowboys to protect their legs', 'name': 'chap'}, {'frequency': 'r', 'id': 242, 'synset': 'checkbook.n.01', 'synonyms': ['checkbook', 'chequebook'], 'def': 'a book issued to holders of checking accounts', 'name': 'checkbook'}, {'frequency': 'r', 'id': 243, 'synset': 'checkerboard.n.01', 'synonyms': ['checkerboard'], 'def': 'a board having 64 squares of two alternating colors', 'name': 'checkerboard'}, {'frequency': 'c', 'id': 244, 'synset': 'cherry.n.03', 'synonyms': ['cherry'], 'def': 'a red fruit with a single hard stone', 'name': 'cherry'}, {'frequency': 'r', 'id': 245, 'synset': 'chessboard.n.01', 'synonyms': ['chessboard'], 'def': 'a checkerboard used to play chess', 'name': 'chessboard'}, {'frequency': 'r', 'id': 246, 'synset': 'chest_of_drawers.n.01', 'synonyms': ['chest_of_drawers_(furniture)', 'bureau_(furniture)', 'chest_(furniture)'], 'def': 'furniture with drawers for keeping clothes', 'name': 'chest_of_drawers_(furniture)'}, {'frequency': 'c', 'id': 247, 'synset': 'chicken.n.02', 'synonyms': ['chicken_(animal)'], 'def': 'a domestic fowl bred for flesh or eggs', 'name': 'chicken_(animal)'}, {'frequency': 'c', 'id': 248, 'synset': 'chicken_wire.n.01', 'synonyms': ['chicken_wire'], 'def': 'a galvanized wire network with a hexagonal mesh; used to build fences', 'name': 'chicken_wire'}, {'frequency': 'r', 'id': 249, 'synset': 'chickpea.n.01', 'synonyms': ['chickpea', 'garbanzo'], 'def': 'the seed of the chickpea plant; usually dried', 'name': 'chickpea'}, {'frequency': 'r', 'id': 250, 'synset': 'chihuahua.n.03', 'synonyms': ['Chihuahua'], 'def': 'an old breed of tiny short-haired dog with protruding eyes from Mexico', 'name': 'Chihuahua'}, {'frequency': 'r', 'id': 251, 'synset': 'chili.n.02', 'synonyms': ['chili_(vegetable)', 'chili_pepper_(vegetable)', 'chilli_(vegetable)', 'chilly_(vegetable)', 'chile_(vegetable)'], 'def': 'very hot and finely tapering pepper of special pungency', 'name': 'chili_(vegetable)'}, {'frequency': 'r', 'id': 252, 'synset': 'chime.n.01', 'synonyms': ['chime', 'gong'], 'def': 'an instrument consisting of a set of bells that are struck with a hammer', 'name': 'chime'}, {'frequency': 'r', 'id': 253, 'synset': 'chinaware.n.01', 'synonyms': ['chinaware'], 'def': 'dishware made of high quality porcelain', 'name': 'chinaware'}, {'frequency': 'c', 'id': 254, 'synset': 'chip.n.04', 'synonyms': ['crisp_(potato_chip)', 'potato_chip'], 'def': 'a thin crisp slice of potato fried in deep fat', 'name': 'crisp_(potato_chip)'}, {'frequency': 'r', 'id': 255, 'synset': 'chip.n.06', 'synonyms': ['poker_chip'], 'def': 'a small disk-shaped counter used to represent money when gambling', 'name': 'poker_chip'}, {'frequency': 'c', 'id': 256, 'synset': 'chocolate_bar.n.01', 'synonyms': ['chocolate_bar'], 'def': 'a bar of chocolate candy', 'name': 'chocolate_bar'}, {'frequency': 'c', 'id': 257, 'synset': 'chocolate_cake.n.01', 'synonyms': ['chocolate_cake'], 'def': 'cake containing chocolate', 'name': 'chocolate_cake'}, {'frequency': 'r', 'id': 258, 'synset': 'chocolate_milk.n.01', 'synonyms': ['chocolate_milk'], 'def': 'milk flavored with chocolate syrup', 'name': 'chocolate_milk'}, {'frequency': 'r', 'id': 259, 'synset': 'chocolate_mousse.n.01', 'synonyms': ['chocolate_mousse'], 'def': 'dessert mousse made with chocolate', 'name': 'chocolate_mousse'}, {'frequency': 'f', 'id': 260, 'synset': 'choker.n.03', 'synonyms': ['choker', 'collar', 'neckband'], 'def': 'necklace that fits tightly around the neck', 'name': 'choker'}, {'frequency': 'f', 'id': 261, 'synset': 'chopping_board.n.01', 'synonyms': ['chopping_board', 'cutting_board', 'chopping_block'], 'def': 'a wooden board where meats or vegetables can be cut', 'name': 'chopping_board'}, {'frequency': 'c', 'id': 262, 'synset': 'chopstick.n.01', 'synonyms': ['chopstick'], 'def': 'one of a pair of slender sticks used as oriental tableware to eat food with', 'name': 'chopstick'}, {'frequency': 'f', 'id': 263, 'synset': 'christmas_tree.n.05', 'synonyms': ['Christmas_tree'], 'def': 'an ornamented evergreen used as a Christmas decoration', 'name': 'Christmas_tree'}, {'frequency': 'c', 'id': 264, 'synset': 'chute.n.02', 'synonyms': ['slide'], 'def': 'sloping channel through which things can descend', 'name': 'slide'}, {'frequency': 'r', 'id': 265, 'synset': 'cider.n.01', 'synonyms': ['cider', 'cyder'], 'def': 'a beverage made from juice pressed from apples', 'name': 'cider'}, {'frequency': 'r', 'id': 266, 'synset': 'cigar_box.n.01', 'synonyms': ['cigar_box'], 'def': 'a box for holding cigars', 'name': 'cigar_box'}, {'frequency': 'c', 'id': 267, 'synset': 'cigarette.n.01', 'synonyms': ['cigarette'], 'def': 'finely ground tobacco wrapped in paper; for smoking', 'name': 'cigarette'}, {'frequency': 'c', 'id': 268, 'synset': 'cigarette_case.n.01', 'synonyms': ['cigarette_case', 'cigarette_pack'], 'def': 'a small flat case for holding cigarettes', 'name': 'cigarette_case'}, {'frequency': 'f', 'id': 269, 'synset': 'cistern.n.02', 'synonyms': ['cistern', 'water_tank'], 'def': 'a tank that holds the water used to flush a toilet', 'name': 'cistern'}, {'frequency': 'r', 'id': 270, 'synset': 'clarinet.n.01', 'synonyms': ['clarinet'], 'def': 'a single-reed instrument with a straight tube', 'name': 'clarinet'}, {'frequency': 'r', 'id': 271, 'synset': 'clasp.n.01', 'synonyms': ['clasp'], 'def': 'a fastener (as a buckle or hook) that is used to hold two things together', 'name': 'clasp'}, {'frequency': 'c', 'id': 272, 'synset': 'cleansing_agent.n.01', 'synonyms': ['cleansing_agent', 'cleanser', 'cleaner'], 'def': 'a preparation used in cleaning something', 'name': 'cleansing_agent'}, {'frequency': 'r', 'id': 273, 'synset': 'clementine.n.01', 'synonyms': ['clementine'], 'def': 'a variety of mandarin orange', 'name': 'clementine'}, {'frequency': 'c', 'id': 274, 'synset': 'clip.n.03', 'synonyms': ['clip'], 'def': 'any of various small fasteners used to hold loose articles together', 'name': 'clip'}, {'frequency': 'c', 'id': 275, 'synset': 'clipboard.n.01', 'synonyms': ['clipboard'], 'def': 'a small writing board with a clip at the top for holding papers', 'name': 'clipboard'}, {'frequency': 'f', 'id': 276, 'synset': 'clock.n.01', 'synonyms': ['clock', 'timepiece', 'timekeeper'], 'def': 'a timepiece that shows the time of day', 'name': 'clock'}, {'frequency': 'f', 'id': 277, 'synset': 'clock_tower.n.01', 'synonyms': ['clock_tower'], 'def': 'a tower with a large clock visible high up on an outside face', 'name': 'clock_tower'}, {'frequency': 'c', 'id': 278, 'synset': 'clothes_hamper.n.01', 'synonyms': ['clothes_hamper', 'laundry_basket', 'clothes_basket'], 'def': 'a hamper that holds dirty clothes to be washed or wet clothes to be dried', 'name': 'clothes_hamper'}, {'frequency': 'c', 'id': 279, 'synset': 'clothespin.n.01', 'synonyms': ['clothespin', 'clothes_peg'], 'def': 'wood or plastic fastener; for holding clothes on a clothesline', 'name': 'clothespin'}, {'frequency': 'r', 'id': 280, 'synset': 'clutch_bag.n.01', 'synonyms': ['clutch_bag'], 'def': "a woman's strapless purse that is carried in the hand", 'name': 'clutch_bag'}, {'frequency': 'f', 'id': 281, 'synset': 'coaster.n.03', 'synonyms': ['coaster'], 'def': 'a covering (plate or mat) that protects the surface of a table', 'name': 'coaster'}, {'frequency': 'f', 'id': 282, 'synset': 'coat.n.01', 'synonyms': ['coat'], 'def': 'an outer garment that has sleeves and covers the body from shoulder down', 'name': 'coat'}, {'frequency': 'c', 'id': 283, 'synset': 'coat_hanger.n.01', 'synonyms': ['coat_hanger', 'clothes_hanger', 'dress_hanger'], 'def': "a hanger that is shaped like a person's shoulders", 'name': 'coat_hanger'}, {'frequency': 'r', 'id': 284, 'synset': 'coatrack.n.01', 'synonyms': ['coatrack', 'hatrack'], 'def': 'a rack with hooks for temporarily holding coats and hats', 'name': 'coatrack'}, {'frequency': 'c', 'id': 285, 'synset': 'cock.n.04', 'synonyms': ['cock', 'rooster'], 'def': 'adult male chicken', 'name': 'cock'}, {'frequency': 'c', 'id': 286, 'synset': 'coconut.n.02', 'synonyms': ['coconut', 'cocoanut'], 'def': 'large hard-shelled brown oval nut with a fibrous husk', 'name': 'coconut'}, {'frequency': 'r', 'id': 287, 'synset': 'coffee_filter.n.01', 'synonyms': ['coffee_filter'], 'def': 'filter (usually of paper) that passes the coffee and retains the coffee grounds', 'name': 'coffee_filter'}, {'frequency': 'f', 'id': 288, 'synset': 'coffee_maker.n.01', 'synonyms': ['coffee_maker', 'coffee_machine'], 'def': 'a kitchen appliance for brewing coffee automatically', 'name': 'coffee_maker'}, {'frequency': 'f', 'id': 289, 'synset': 'coffee_table.n.01', 'synonyms': ['coffee_table', 'cocktail_table'], 'def': 'low table where magazines can be placed and coffee or cocktails are served', 'name': 'coffee_table'}, {'frequency': 'c', 'id': 290, 'synset': 'coffeepot.n.01', 'synonyms': ['coffeepot'], 'def': 'tall pot in which coffee is brewed', 'name': 'coffeepot'}, {'frequency': 'r', 'id': 291, 'synset': 'coil.n.05', 'synonyms': ['coil'], 'def': 'tubing that is wound in a spiral', 'name': 'coil'}, {'frequency': 'c', 'id': 292, 'synset': 'coin.n.01', 'synonyms': ['coin'], 'def': 'a flat metal piece (usually a disc) used as money', 'name': 'coin'}, {'frequency': 'r', 'id': 293, 'synset': 'colander.n.01', 'synonyms': ['colander', 'cullender'], 'def': 'bowl-shaped strainer; used to wash or drain foods', 'name': 'colander'}, {'frequency': 'c', 'id': 294, 'synset': 'coleslaw.n.01', 'synonyms': ['coleslaw', 'slaw'], 'def': 'basically shredded cabbage', 'name': 'coleslaw'}, {'frequency': 'r', 'id': 295, 'synset': 'coloring_material.n.01', 'synonyms': ['coloring_material', 'colouring_material'], 'def': 'any material used for its color', 'name': 'coloring_material'}, {'frequency': 'r', 'id': 296, 'synset': 'combination_lock.n.01', 'synonyms': ['combination_lock'], 'def': 'lock that can be opened only by turning dials in a special sequence', 'name': 'combination_lock'}, {'frequency': 'c', 'id': 297, 'synset': 'comforter.n.04', 'synonyms': ['pacifier', 'teething_ring'], 'def': 'device used for an infant to suck or bite on', 'name': 'pacifier'}, {'frequency': 'r', 'id': 298, 'synset': 'comic_book.n.01', 'synonyms': ['comic_book'], 'def': 'a magazine devoted to comic strips', 'name': 'comic_book'}, {'frequency': 'f', 'id': 299, 'synset': 'computer_keyboard.n.01', 'synonyms': ['computer_keyboard', 'keyboard_(computer)'], 'def': 'a keyboard that is a data input device for computers', 'name': 'computer_keyboard'}, {'frequency': 'r', 'id': 300, 'synset': 'concrete_mixer.n.01', 'synonyms': ['concrete_mixer', 'cement_mixer'], 'def': 'a machine with a large revolving drum in which cement/concrete is mixed', 'name': 'concrete_mixer'}, {'frequency': 'f', 'id': 301, 'synset': 'cone.n.01', 'synonyms': ['cone', 'traffic_cone'], 'def': 'a cone-shaped object used to direct traffic', 'name': 'cone'}, {'frequency': 'f', 'id': 302, 'synset': 'control.n.09', 'synonyms': ['control', 'controller'], 'def': 'a mechanism that controls the operation of a machine', 'name': 'control'}, {'frequency': 'r', 'id': 303, 'synset': 'convertible.n.01', 'synonyms': ['convertible_(automobile)'], 'def': 'a car that has top that can be folded or removed', 'name': 'convertible_(automobile)'}, {'frequency': 'r', 'id': 304, 'synset': 'convertible.n.03', 'synonyms': ['sofa_bed'], 'def': 'a sofa that can be converted into a bed', 'name': 'sofa_bed'}, {'frequency': 'c', 'id': 305, 'synset': 'cookie.n.01', 'synonyms': ['cookie', 'cooky', 'biscuit_(cookie)'], 'def': "any of various small flat sweet cakes (`biscuit' is the British term)", 'name': 'cookie'}, {'frequency': 'r', 'id': 306, 'synset': 'cookie_jar.n.01', 'synonyms': ['cookie_jar', 'cooky_jar'], 'def': 'a jar in which cookies are kept (and sometimes money is hidden)', 'name': 'cookie_jar'}, {'frequency': 'r', 'id': 307, 'synset': 'cooking_utensil.n.01', 'synonyms': ['cooking_utensil'], 'def': 'a kitchen utensil made of material that does not melt easily; used for cooking', 'name': 'cooking_utensil'}, {'frequency': 'f', 'id': 308, 'synset': 'cooler.n.01', 'synonyms': ['cooler_(for_food)', 'ice_chest'], 'def': 'an insulated box for storing food often with ice', 'name': 'cooler_(for_food)'}, {'frequency': 'c', 'id': 309, 'synset': 'cork.n.04', 'synonyms': ['cork_(bottle_plug)', 'bottle_cork'], 'def': 'the plug in the mouth of a bottle (especially a wine bottle)', 'name': 'cork_(bottle_plug)'}, {'frequency': 'r', 'id': 310, 'synset': 'corkboard.n.01', 'synonyms': ['corkboard'], 'def': 'a sheet consisting of cork granules', 'name': 'corkboard'}, {'frequency': 'r', 'id': 311, 'synset': 'corkscrew.n.01', 'synonyms': ['corkscrew', 'bottle_screw'], 'def': 'a bottle opener that pulls corks', 'name': 'corkscrew'}, {'frequency': 'c', 'id': 312, 'synset': 'corn.n.03', 'synonyms': ['edible_corn', 'corn', 'maize'], 'def': 'ears of corn that can be prepared and served for human food', 'name': 'edible_corn'}, {'frequency': 'r', 'id': 313, 'synset': 'cornbread.n.01', 'synonyms': ['cornbread'], 'def': 'bread made primarily of cornmeal', 'name': 'cornbread'}, {'frequency': 'c', 'id': 314, 'synset': 'cornet.n.01', 'synonyms': ['cornet', 'horn', 'trumpet'], 'def': 'a brass musical instrument with a narrow tube and a flared bell and many valves', 'name': 'cornet'}, {'frequency': 'c', 'id': 315, 'synset': 'cornice.n.01', 'synonyms': ['cornice', 'valance', 'valance_board', 'pelmet'], 'def': 'a decorative framework to conceal curtain fixtures at the top of a window casing', 'name': 'cornice'}, {'frequency': 'r', 'id': 316, 'synset': 'cornmeal.n.01', 'synonyms': ['cornmeal'], 'def': 'coarsely ground corn', 'name': 'cornmeal'}, {'frequency': 'r', 'id': 317, 'synset': 'corset.n.01', 'synonyms': ['corset', 'girdle'], 'def': "a woman's close-fitting foundation garment", 'name': 'corset'}, {'frequency': 'r', 'id': 318, 'synset': 'cos.n.02', 'synonyms': ['romaine_lettuce'], 'def': 'lettuce with long dark-green leaves in a loosely packed elongated head', 'name': 'romaine_lettuce'}, {'frequency': 'c', 'id': 319, 'synset': 'costume.n.04', 'synonyms': ['costume'], 'def': 'the attire characteristic of a country or a time or a social class', 'name': 'costume'}, {'frequency': 'r', 'id': 320, 'synset': 'cougar.n.01', 'synonyms': ['cougar', 'puma', 'catamount', 'mountain_lion', 'panther'], 'def': 'large American feline resembling a lion', 'name': 'cougar'}, {'frequency': 'r', 'id': 321, 'synset': 'coverall.n.01', 'synonyms': ['coverall'], 'def': 'a loose-fitting protective garment that is worn over other clothing', 'name': 'coverall'}, {'frequency': 'r', 'id': 322, 'synset': 'cowbell.n.01', 'synonyms': ['cowbell'], 'def': 'a bell hung around the neck of cow so that the cow can be easily located', 'name': 'cowbell'}, {'frequency': 'f', 'id': 323, 'synset': 'cowboy_hat.n.01', 'synonyms': ['cowboy_hat', 'ten-gallon_hat'], 'def': 'a hat with a wide brim and a soft crown; worn by American ranch hands', 'name': 'cowboy_hat'}, {'frequency': 'r', 'id': 324, 'synset': 'crab.n.01', 'synonyms': ['crab_(animal)'], 'def': 'decapod having eyes on short stalks and a broad flattened shell and pincers', 'name': 'crab_(animal)'}, {'frequency': 'c', 'id': 325, 'synset': 'cracker.n.01', 'synonyms': ['cracker'], 'def': 'a thin crisp wafer', 'name': 'cracker'}, {'frequency': 'r', 'id': 326, 'synset': 'crape.n.01', 'synonyms': ['crape', 'crepe', 'French_pancake'], 'def': 'small very thin pancake', 'name': 'crape'}, {'frequency': 'f', 'id': 327, 'synset': 'crate.n.01', 'synonyms': ['crate'], 'def': 'a rugged box (usually made of wood); used for shipping', 'name': 'crate'}, {'frequency': 'r', 'id': 328, 'synset': 'crayon.n.01', 'synonyms': ['crayon', 'wax_crayon'], 'def': 'writing or drawing implement made of a colored stick of composition wax', 'name': 'crayon'}, {'frequency': 'r', 'id': 329, 'synset': 'cream_pitcher.n.01', 'synonyms': ['cream_pitcher'], 'def': 'a small pitcher for serving cream', 'name': 'cream_pitcher'}, {'frequency': 'r', 'id': 330, 'synset': 'credit_card.n.01', 'synonyms': ['credit_card', 'charge_card', 'debit_card'], 'def': 'a card, usually plastic, used to pay for goods and services', 'name': 'credit_card'}, {'frequency': 'c', 'id': 331, 'synset': 'crescent_roll.n.01', 'synonyms': ['crescent_roll', 'croissant'], 'def': 'very rich flaky crescent-shaped roll', 'name': 'crescent_roll'}, {'frequency': 'c', 'id': 332, 'synset': 'crib.n.01', 'synonyms': ['crib', 'cot'], 'def': 'baby bed with high sides made of slats', 'name': 'crib'}, {'frequency': 'c', 'id': 333, 'synset': 'crock.n.03', 'synonyms': ['crock_pot', 'earthenware_jar'], 'def': 'an earthen jar (made of baked clay)', 'name': 'crock_pot'}, {'frequency': 'f', 'id': 334, 'synset': 'crossbar.n.01', 'synonyms': ['crossbar'], 'def': 'a horizontal bar that goes across something', 'name': 'crossbar'}, {'frequency': 'r', 'id': 335, 'synset': 'crouton.n.01', 'synonyms': ['crouton'], 'def': 'a small piece of toasted or fried bread; served in soup or salads', 'name': 'crouton'}, {'frequency': 'r', 'id': 336, 'synset': 'crow.n.01', 'synonyms': ['crow'], 'def': 'black birds having a raucous call', 'name': 'crow'}, {'frequency': 'c', 'id': 337, 'synset': 'crown.n.04', 'synonyms': ['crown'], 'def': 'an ornamental jeweled headdress signifying sovereignty', 'name': 'crown'}, {'frequency': 'c', 'id': 338, 'synset': 'crucifix.n.01', 'synonyms': ['crucifix'], 'def': 'representation of the cross on which Jesus died', 'name': 'crucifix'}, {'frequency': 'c', 'id': 339, 'synset': 'cruise_ship.n.01', 'synonyms': ['cruise_ship', 'cruise_liner'], 'def': 'a passenger ship used commercially for pleasure cruises', 'name': 'cruise_ship'}, {'frequency': 'c', 'id': 340, 'synset': 'cruiser.n.01', 'synonyms': ['police_cruiser', 'patrol_car', 'police_car', 'squad_car'], 'def': 'a car in which policemen cruise the streets', 'name': 'police_cruiser'}, {'frequency': 'c', 'id': 341, 'synset': 'crumb.n.03', 'synonyms': ['crumb'], 'def': 'small piece of e.g. bread or cake', 'name': 'crumb'}, {'frequency': 'r', 'id': 342, 'synset': 'crutch.n.01', 'synonyms': ['crutch'], 'def': 'a wooden or metal staff that fits under the armpit and reaches to the ground', 'name': 'crutch'}, {'frequency': 'c', 'id': 343, 'synset': 'cub.n.03', 'synonyms': ['cub_(animal)'], 'def': 'the young of certain carnivorous mammals such as the bear or wolf or lion', 'name': 'cub_(animal)'}, {'frequency': 'r', 'id': 344, 'synset': 'cube.n.05', 'synonyms': ['cube', 'square_block'], 'def': 'a block in the (approximate) shape of a cube', 'name': 'cube'}, {'frequency': 'f', 'id': 345, 'synset': 'cucumber.n.02', 'synonyms': ['cucumber', 'cuke'], 'def': 'cylindrical green fruit with thin green rind and white flesh eaten as a vegetable', 'name': 'cucumber'}, {'frequency': 'c', 'id': 346, 'synset': 'cufflink.n.01', 'synonyms': ['cufflink'], 'def': 'jewelry consisting of linked buttons used to fasten the cuffs of a shirt', 'name': 'cufflink'}, {'frequency': 'f', 'id': 347, 'synset': 'cup.n.01', 'synonyms': ['cup'], 'def': 'a small open container usually used for drinking; usually has a handle', 'name': 'cup'}, {'frequency': 'c', 'id': 348, 'synset': 'cup.n.08', 'synonyms': ['trophy_cup'], 'def': 'a metal vessel with handles that is awarded as a trophy to a competition winner', 'name': 'trophy_cup'}, {'frequency': 'c', 'id': 349, 'synset': 'cupcake.n.01', 'synonyms': ['cupcake'], 'def': 'small cake baked in a muffin tin', 'name': 'cupcake'}, {'frequency': 'r', 'id': 350, 'synset': 'curler.n.01', 'synonyms': ['hair_curler', 'hair_roller', 'hair_crimper'], 'def': 'a cylindrical tube around which the hair is wound to curl it', 'name': 'hair_curler'}, {'frequency': 'r', 'id': 351, 'synset': 'curling_iron.n.01', 'synonyms': ['curling_iron'], 'def': 'a cylindrical home appliance that heats hair that has been curled around it', 'name': 'curling_iron'}, {'frequency': 'f', 'id': 352, 'synset': 'curtain.n.01', 'synonyms': ['curtain', 'drapery'], 'def': 'hanging cloth used as a blind (especially for a window)', 'name': 'curtain'}, {'frequency': 'f', 'id': 353, 'synset': 'cushion.n.03', 'synonyms': ['cushion'], 'def': 'a soft bag filled with air or padding such as feathers or foam rubber', 'name': 'cushion'}, {'frequency': 'r', 'id': 354, 'synset': 'custard.n.01', 'synonyms': ['custard'], 'def': 'sweetened mixture of milk and eggs baked or boiled or frozen', 'name': 'custard'}, {'frequency': 'c', 'id': 355, 'synset': 'cutter.n.06', 'synonyms': ['cutting_tool'], 'def': 'a cutting implement; a tool for cutting', 'name': 'cutting_tool'}, {'frequency': 'r', 'id': 356, 'synset': 'cylinder.n.04', 'synonyms': ['cylinder'], 'def': 'a cylindrical container', 'name': 'cylinder'}, {'frequency': 'r', 'id': 357, 'synset': 'cymbal.n.01', 'synonyms': ['cymbal'], 'def': 'a percussion instrument consisting of a concave brass disk', 'name': 'cymbal'}, {'frequency': 'r', 'id': 358, 'synset': 'dachshund.n.01', 'synonyms': ['dachshund', 'dachsie', 'badger_dog'], 'def': 'small long-bodied short-legged breed of dog having a short sleek coat and long drooping ears', 'name': 'dachshund'}, {'frequency': 'r', 'id': 359, 'synset': 'dagger.n.01', 'synonyms': ['dagger'], 'def': 'a short knife with a pointed blade used for piercing or stabbing', 'name': 'dagger'}, {'frequency': 'r', 'id': 360, 'synset': 'dartboard.n.01', 'synonyms': ['dartboard'], 'def': 'a circular board of wood or cork used as the target in the game of darts', 'name': 'dartboard'}, {'frequency': 'r', 'id': 361, 'synset': 'date.n.08', 'synonyms': ['date_(fruit)'], 'def': 'sweet edible fruit of the date palm with a single long woody seed', 'name': 'date_(fruit)'}, {'frequency': 'f', 'id': 362, 'synset': 'deck_chair.n.01', 'synonyms': ['deck_chair', 'beach_chair'], 'def': 'a folding chair for use outdoors; a wooden frame supports a length of canvas', 'name': 'deck_chair'}, {'frequency': 'c', 'id': 363, 'synset': 'deer.n.01', 'synonyms': ['deer', 'cervid'], 'def': "distinguished from Bovidae by the male's having solid deciduous antlers", 'name': 'deer'}, {'frequency': 'c', 'id': 364, 'synset': 'dental_floss.n.01', 'synonyms': ['dental_floss', 'floss'], 'def': 'a soft thread for cleaning the spaces between the teeth', 'name': 'dental_floss'}, {'frequency': 'f', 'id': 365, 'synset': 'desk.n.01', 'synonyms': ['desk'], 'def': 'a piece of furniture with a writing surface and usually drawers or other compartments', 'name': 'desk'}, {'frequency': 'r', 'id': 366, 'synset': 'detergent.n.01', 'synonyms': ['detergent'], 'def': 'a surface-active chemical widely used in industry and laundering', 'name': 'detergent'}, {'frequency': 'c', 'id': 367, 'synset': 'diaper.n.01', 'synonyms': ['diaper'], 'def': 'garment consisting of a folded cloth drawn up between the legs and fastened at the waist', 'name': 'diaper'}, {'frequency': 'r', 'id': 368, 'synset': 'diary.n.01', 'synonyms': ['diary', 'journal'], 'def': 'a daily written record of (usually personal) experiences and observations', 'name': 'diary'}, {'frequency': 'r', 'id': 369, 'synset': 'die.n.01', 'synonyms': ['die', 'dice'], 'def': 'a small cube with 1 to 6 spots on the six faces; used in gambling', 'name': 'die'}, {'frequency': 'r', 'id': 370, 'synset': 'dinghy.n.01', 'synonyms': ['dinghy', 'dory', 'rowboat'], 'def': 'a small boat of shallow draft with seats and oars with which it is propelled', 'name': 'dinghy'}, {'frequency': 'f', 'id': 371, 'synset': 'dining_table.n.01', 'synonyms': ['dining_table'], 'def': 'a table at which meals are served', 'name': 'dining_table'}, {'frequency': 'r', 'id': 372, 'synset': 'dinner_jacket.n.01', 'synonyms': ['tux', 'tuxedo'], 'def': 'semiformal evening dress for men', 'name': 'tux'}, {'frequency': 'c', 'id': 373, 'synset': 'dish.n.01', 'synonyms': ['dish'], 'def': 'a piece of dishware normally used as a container for holding or serving food', 'name': 'dish'}, {'frequency': 'c', 'id': 374, 'synset': 'dish.n.05', 'synonyms': ['dish_antenna'], 'def': 'directional antenna consisting of a parabolic reflector', 'name': 'dish_antenna'}, {'frequency': 'c', 'id': 375, 'synset': 'dishrag.n.01', 'synonyms': ['dishrag', 'dishcloth'], 'def': 'a cloth for washing dishes', 'name': 'dishrag'}, {'frequency': 'c', 'id': 376, 'synset': 'dishtowel.n.01', 'synonyms': ['dishtowel', 'tea_towel'], 'def': 'a towel for drying dishes', 'name': 'dishtowel'}, {'frequency': 'f', 'id': 377, 'synset': 'dishwasher.n.01', 'synonyms': ['dishwasher', 'dishwashing_machine'], 'def': 'a machine for washing dishes', 'name': 'dishwasher'}, {'frequency': 'r', 'id': 378, 'synset': 'dishwasher_detergent.n.01', 'synonyms': ['dishwasher_detergent', 'dishwashing_detergent', 'dishwashing_liquid'], 'def': 'a low-sudsing detergent designed for use in dishwashers', 'name': 'dishwasher_detergent'}, {'frequency': 'r', 'id': 379, 'synset': 'diskette.n.01', 'synonyms': ['diskette', 'floppy', 'floppy_disk'], 'def': 'a small plastic magnetic disk enclosed in a stiff envelope used to store data', 'name': 'diskette'}, {'frequency': 'c', 'id': 380, 'synset': 'dispenser.n.01', 'synonyms': ['dispenser'], 'def': 'a container so designed that the contents can be used in prescribed amounts', 'name': 'dispenser'}, {'frequency': 'c', 'id': 381, 'synset': 'dixie_cup.n.01', 'synonyms': ['Dixie_cup', 'paper_cup'], 'def': 'a disposable cup made of paper; for holding drinks', 'name': 'Dixie_cup'}, {'frequency': 'f', 'id': 382, 'synset': 'dog.n.01', 'synonyms': ['dog'], 'def': 'a common domesticated dog', 'name': 'dog'}, {'frequency': 'f', 'id': 383, 'synset': 'dog_collar.n.01', 'synonyms': ['dog_collar'], 'def': 'a collar for a dog', 'name': 'dog_collar'}, {'frequency': 'c', 'id': 384, 'synset': 'doll.n.01', 'synonyms': ['doll'], 'def': 'a toy replica of a HUMAN (NOT AN ANIMAL)', 'name': 'doll'}, {'frequency': 'r', 'id': 385, 'synset': 'dollar.n.02', 'synonyms': ['dollar', 'dollar_bill', 'one_dollar_bill'], 'def': 'a piece of paper money worth one dollar', 'name': 'dollar'}, {'frequency': 'r', 'id': 386, 'synset': 'dolphin.n.02', 'synonyms': ['dolphin'], 'def': 'any of various small toothed whales with a beaklike snout; larger than porpoises', 'name': 'dolphin'}, {'frequency': 'c', 'id': 387, 'synset': 'domestic_ass.n.01', 'synonyms': ['domestic_ass', 'donkey'], 'def': 'domestic beast of burden descended from the African wild ass; patient but stubborn', 'name': 'domestic_ass'}, {'frequency': 'r', 'id': 388, 'synset': 'domino.n.03', 'synonyms': ['eye_mask'], 'def': 'a mask covering the upper part of the face but with holes for the eyes', 'name': 'eye_mask'}, {'frequency': 'r', 'id': 389, 'synset': 'doorbell.n.01', 'synonyms': ['doorbell', 'buzzer'], 'def': 'a button at an outer door that gives a ringing or buzzing signal when pushed', 'name': 'doorbell'}, {'frequency': 'f', 'id': 390, 'synset': 'doorknob.n.01', 'synonyms': ['doorknob', 'doorhandle'], 'def': "a knob used to open a door (often called `doorhandle' in Great Britain)", 'name': 'doorknob'}, {'frequency': 'c', 'id': 391, 'synset': 'doormat.n.02', 'synonyms': ['doormat', 'welcome_mat'], 'def': 'a mat placed outside an exterior door for wiping the shoes before entering', 'name': 'doormat'}, {'frequency': 'f', 'id': 392, 'synset': 'doughnut.n.02', 'synonyms': ['doughnut', 'donut'], 'def': 'a small ring-shaped friedcake', 'name': 'doughnut'}, {'frequency': 'r', 'id': 393, 'synset': 'dove.n.01', 'synonyms': ['dove'], 'def': 'any of numerous small pigeons', 'name': 'dove'}, {'frequency': 'r', 'id': 394, 'synset': 'dragonfly.n.01', 'synonyms': ['dragonfly'], 'def': 'slender-bodied non-stinging insect having iridescent wings that are outspread at rest', 'name': 'dragonfly'}, {'frequency': 'f', 'id': 395, 'synset': 'drawer.n.01', 'synonyms': ['drawer'], 'def': 'a boxlike container in a piece of furniture; made so as to slide in and out', 'name': 'drawer'}, {'frequency': 'c', 'id': 396, 'synset': 'drawers.n.01', 'synonyms': ['underdrawers', 'boxers', 'boxershorts'], 'def': 'underpants worn by men', 'name': 'underdrawers'}, {'frequency': 'f', 'id': 397, 'synset': 'dress.n.01', 'synonyms': ['dress', 'frock'], 'def': 'a one-piece garment for a woman; has skirt and bodice', 'name': 'dress'}, {'frequency': 'c', 'id': 398, 'synset': 'dress_hat.n.01', 'synonyms': ['dress_hat', 'high_hat', 'opera_hat', 'silk_hat', 'top_hat'], 'def': "a man's hat with a tall crown; usually covered with silk or with beaver fur", 'name': 'dress_hat'}, {'frequency': 'c', 'id': 399, 'synset': 'dress_suit.n.01', 'synonyms': ['dress_suit'], 'def': 'formalwear consisting of full evening dress for men', 'name': 'dress_suit'}, {'frequency': 'c', 'id': 400, 'synset': 'dresser.n.05', 'synonyms': ['dresser'], 'def': 'a cabinet with shelves', 'name': 'dresser'}, {'frequency': 'c', 'id': 401, 'synset': 'drill.n.01', 'synonyms': ['drill'], 'def': 'a tool with a sharp rotating point for making holes in hard materials', 'name': 'drill'}, {'frequency': 'r', 'id': 402, 'synset': 'drinking_fountain.n.01', 'synonyms': ['drinking_fountain'], 'def': 'a public fountain to provide a jet of drinking water', 'name': 'drinking_fountain'}, {'frequency': 'r', 'id': 403, 'synset': 'drone.n.04', 'synonyms': ['drone'], 'def': 'an aircraft without a pilot that is operated by remote control', 'name': 'drone'}, {'frequency': 'r', 'id': 404, 'synset': 'dropper.n.01', 'synonyms': ['dropper', 'eye_dropper'], 'def': 'pipet consisting of a small tube with a vacuum bulb at one end for drawing liquid in and releasing it a drop at a time', 'name': 'dropper'}, {'frequency': 'c', 'id': 405, 'synset': 'drum.n.01', 'synonyms': ['drum_(musical_instrument)'], 'def': 'a musical percussion instrument; usually consists of a hollow cylinder with a membrane stretched across each end', 'name': 'drum_(musical_instrument)'}, {'frequency': 'r', 'id': 406, 'synset': 'drumstick.n.02', 'synonyms': ['drumstick'], 'def': 'a stick used for playing a drum', 'name': 'drumstick'}, {'frequency': 'f', 'id': 407, 'synset': 'duck.n.01', 'synonyms': ['duck'], 'def': 'small web-footed broad-billed swimming bird', 'name': 'duck'}, {'frequency': 'r', 'id': 408, 'synset': 'duckling.n.02', 'synonyms': ['duckling'], 'def': 'young duck', 'name': 'duckling'}, {'frequency': 'c', 'id': 409, 'synset': 'duct_tape.n.01', 'synonyms': ['duct_tape'], 'def': 'a wide silvery adhesive tape', 'name': 'duct_tape'}, {'frequency': 'f', 'id': 410, 'synset': 'duffel_bag.n.01', 'synonyms': ['duffel_bag', 'duffle_bag', 'duffel', 'duffle'], 'def': 'a large cylindrical bag of heavy cloth', 'name': 'duffel_bag'}, {'frequency': 'r', 'id': 411, 'synset': 'dumbbell.n.01', 'synonyms': ['dumbbell'], 'def': 'an exercising weight with two ball-like ends connected by a short handle', 'name': 'dumbbell'}, {'frequency': 'c', 'id': 412, 'synset': 'dumpster.n.01', 'synonyms': ['dumpster'], 'def': 'a container designed to receive and transport and dump waste', 'name': 'dumpster'}, {'frequency': 'r', 'id': 413, 'synset': 'dustpan.n.02', 'synonyms': ['dustpan'], 'def': 'a short-handled receptacle into which dust can be swept', 'name': 'dustpan'}, {'frequency': 'r', 'id': 414, 'synset': 'dutch_oven.n.02', 'synonyms': ['Dutch_oven'], 'def': 'iron or earthenware cooking pot; used for stews', 'name': 'Dutch_oven'}, {'frequency': 'c', 'id': 415, 'synset': 'eagle.n.01', 'synonyms': ['eagle'], 'def': 'large birds of prey noted for their broad wings and strong soaring flight', 'name': 'eagle'}, {'frequency': 'f', 'id': 416, 'synset': 'earphone.n.01', 'synonyms': ['earphone', 'earpiece', 'headphone'], 'def': 'device for listening to audio that is held over or inserted into the ear', 'name': 'earphone'}, {'frequency': 'r', 'id': 417, 'synset': 'earplug.n.01', 'synonyms': ['earplug'], 'def': 'a soft plug that is inserted into the ear canal to block sound', 'name': 'earplug'}, {'frequency': 'f', 'id': 418, 'synset': 'earring.n.01', 'synonyms': ['earring'], 'def': 'jewelry to ornament the ear', 'name': 'earring'}, {'frequency': 'c', 'id': 419, 'synset': 'easel.n.01', 'synonyms': ['easel'], 'def': "an upright tripod for displaying something (usually an artist's canvas)", 'name': 'easel'}, {'frequency': 'r', 'id': 420, 'synset': 'eclair.n.01', 'synonyms': ['eclair'], 'def': 'oblong cream puff', 'name': 'eclair'}, {'frequency': 'r', 'id': 421, 'synset': 'eel.n.01', 'synonyms': ['eel'], 'def': 'an elongate fish with fatty flesh', 'name': 'eel'}, {'frequency': 'f', 'id': 422, 'synset': 'egg.n.02', 'synonyms': ['egg', 'eggs'], 'def': 'oval reproductive body of a fowl (especially a hen) used as food', 'name': 'egg'}, {'frequency': 'r', 'id': 423, 'synset': 'egg_roll.n.01', 'synonyms': ['egg_roll', 'spring_roll'], 'def': 'minced vegetables and meat wrapped in a pancake and fried', 'name': 'egg_roll'}, {'frequency': 'c', 'id': 424, 'synset': 'egg_yolk.n.01', 'synonyms': ['egg_yolk', 'yolk_(egg)'], 'def': 'the yellow spherical part of an egg', 'name': 'egg_yolk'}, {'frequency': 'c', 'id': 425, 'synset': 'eggbeater.n.02', 'synonyms': ['eggbeater', 'eggwhisk'], 'def': 'a mixer for beating eggs or whipping cream', 'name': 'eggbeater'}, {'frequency': 'c', 'id': 426, 'synset': 'eggplant.n.01', 'synonyms': ['eggplant', 'aubergine'], 'def': 'egg-shaped vegetable having a shiny skin typically dark purple', 'name': 'eggplant'}, {'frequency': 'r', 'id': 427, 'synset': 'electric_chair.n.01', 'synonyms': ['electric_chair'], 'def': 'a chair-shaped instrument of execution by electrocution', 'name': 'electric_chair'}, {'frequency': 'f', 'id': 428, 'synset': 'electric_refrigerator.n.01', 'synonyms': ['refrigerator'], 'def': 'a refrigerator in which the coolant is pumped around by an electric motor', 'name': 'refrigerator'}, {'frequency': 'f', 'id': 429, 'synset': 'elephant.n.01', 'synonyms': ['elephant'], 'def': 'a common elephant', 'name': 'elephant'}, {'frequency': 'r', 'id': 430, 'synset': 'elk.n.01', 'synonyms': ['elk', 'moose'], 'def': 'large northern deer with enormous flattened antlers in the male', 'name': 'elk'}, {'frequency': 'c', 'id': 431, 'synset': 'envelope.n.01', 'synonyms': ['envelope'], 'def': 'a flat (usually rectangular) container for a letter, thin package, etc.', 'name': 'envelope'}, {'frequency': 'c', 'id': 432, 'synset': 'eraser.n.01', 'synonyms': ['eraser'], 'def': 'an implement used to erase something', 'name': 'eraser'}, {'frequency': 'r', 'id': 433, 'synset': 'escargot.n.01', 'synonyms': ['escargot'], 'def': 'edible snail usually served in the shell with a sauce of melted butter and garlic', 'name': 'escargot'}, {'frequency': 'r', 'id': 434, 'synset': 'eyepatch.n.01', 'synonyms': ['eyepatch'], 'def': 'a protective cloth covering for an injured eye', 'name': 'eyepatch'}, {'frequency': 'r', 'id': 435, 'synset': 'falcon.n.01', 'synonyms': ['falcon'], 'def': 'birds of prey having long pointed powerful wings adapted for swift flight', 'name': 'falcon'}, {'frequency': 'f', 'id': 436, 'synset': 'fan.n.01', 'synonyms': ['fan'], 'def': 'a device for creating a current of air by movement of a surface or surfaces', 'name': 'fan'}, {'frequency': 'f', 'id': 437, 'synset': 'faucet.n.01', 'synonyms': ['faucet', 'spigot', 'tap'], 'def': 'a regulator for controlling the flow of a liquid from a reservoir', 'name': 'faucet'}, {'frequency': 'r', 'id': 438, 'synset': 'fedora.n.01', 'synonyms': ['fedora'], 'def': 'a hat made of felt with a creased crown', 'name': 'fedora'}, {'frequency': 'r', 'id': 439, 'synset': 'ferret.n.02', 'synonyms': ['ferret'], 'def': 'domesticated albino variety of the European polecat bred for hunting rats and rabbits', 'name': 'ferret'}, {'frequency': 'c', 'id': 440, 'synset': 'ferris_wheel.n.01', 'synonyms': ['Ferris_wheel'], 'def': 'a large wheel with suspended seats that remain upright as the wheel rotates', 'name': 'Ferris_wheel'}, {'frequency': 'r', 'id': 441, 'synset': 'ferry.n.01', 'synonyms': ['ferry', 'ferryboat'], 'def': 'a boat that transports people or vehicles across a body of water and operates on a regular schedule', 'name': 'ferry'}, {'frequency': 'r', 'id': 442, 'synset': 'fig.n.04', 'synonyms': ['fig_(fruit)'], 'def': 'fleshy sweet pear-shaped yellowish or purple fruit eaten fresh or preserved or dried', 'name': 'fig_(fruit)'}, {'frequency': 'c', 'id': 443, 'synset': 'fighter.n.02', 'synonyms': ['fighter_jet', 'fighter_aircraft', 'attack_aircraft'], 'def': 'a high-speed military or naval airplane designed to destroy enemy targets', 'name': 'fighter_jet'}, {'frequency': 'f', 'id': 444, 'synset': 'figurine.n.01', 'synonyms': ['figurine'], 'def': 'a small carved or molded figure', 'name': 'figurine'}, {'frequency': 'c', 'id': 445, 'synset': 'file.n.03', 'synonyms': ['file_cabinet', 'filing_cabinet'], 'def': 'office furniture consisting of a container for keeping papers in order', 'name': 'file_cabinet'}, {'frequency': 'r', 'id': 446, 'synset': 'file.n.04', 'synonyms': ['file_(tool)'], 'def': 'a steel hand tool with small sharp teeth on some or all of its surfaces; used for smoothing wood or metal', 'name': 'file_(tool)'}, {'frequency': 'f', 'id': 447, 'synset': 'fire_alarm.n.02', 'synonyms': ['fire_alarm', 'smoke_alarm'], 'def': 'an alarm that is tripped off by fire or smoke', 'name': 'fire_alarm'}, {'frequency': 'c', 'id': 448, 'synset': 'fire_engine.n.01', 'synonyms': ['fire_engine', 'fire_truck'], 'def': 'large trucks that carry firefighters and equipment to the site of a fire', 'name': 'fire_engine'}, {'frequency': 'c', 'id': 449, 'synset': 'fire_extinguisher.n.01', 'synonyms': ['fire_extinguisher', 'extinguisher'], 'def': 'a manually operated device for extinguishing small fires', 'name': 'fire_extinguisher'}, {'frequency': 'c', 'id': 450, 'synset': 'fire_hose.n.01', 'synonyms': ['fire_hose'], 'def': 'a large hose that carries water from a fire hydrant to the site of the fire', 'name': 'fire_hose'}, {'frequency': 'f', 'id': 451, 'synset': 'fireplace.n.01', 'synonyms': ['fireplace'], 'def': 'an open recess in a wall at the base of a chimney where a fire can be built', 'name': 'fireplace'}, {'frequency': 'f', 'id': 452, 'synset': 'fireplug.n.01', 'synonyms': ['fireplug', 'fire_hydrant', 'hydrant'], 'def': 'an upright hydrant for drawing water to use in fighting a fire', 'name': 'fireplug'}, {'frequency': 'c', 'id': 453, 'synset': 'fish.n.01', 'synonyms': ['fish'], 'def': 'any of various mostly cold-blooded aquatic vertebrates usually having scales and breathing through gills', 'name': 'fish'}, {'frequency': 'r', 'id': 454, 'synset': 'fish.n.02', 'synonyms': ['fish_(food)'], 'def': 'the flesh of fish used as food', 'name': 'fish_(food)'}, {'frequency': 'r', 'id': 455, 'synset': 'fishbowl.n.02', 'synonyms': ['fishbowl', 'goldfish_bowl'], 'def': 'a transparent bowl in which small fish are kept', 'name': 'fishbowl'}, {'frequency': 'r', 'id': 456, 'synset': 'fishing_boat.n.01', 'synonyms': ['fishing_boat', 'fishing_vessel'], 'def': 'a vessel for fishing', 'name': 'fishing_boat'}, {'frequency': 'c', 'id': 457, 'synset': 'fishing_rod.n.01', 'synonyms': ['fishing_rod', 'fishing_pole'], 'def': 'a rod that is used in fishing to extend the fishing line', 'name': 'fishing_rod'}, {'frequency': 'f', 'id': 458, 'synset': 'flag.n.01', 'synonyms': ['flag'], 'def': 'emblem usually consisting of a rectangular piece of cloth of distinctive design (do not include pole)', 'name': 'flag'}, {'frequency': 'f', 'id': 459, 'synset': 'flagpole.n.02', 'synonyms': ['flagpole', 'flagstaff'], 'def': 'a tall staff or pole on which a flag is raised', 'name': 'flagpole'}, {'frequency': 'c', 'id': 460, 'synset': 'flamingo.n.01', 'synonyms': ['flamingo'], 'def': 'large pink web-footed bird with down-bent bill', 'name': 'flamingo'}, {'frequency': 'c', 'id': 461, 'synset': 'flannel.n.01', 'synonyms': ['flannel'], 'def': 'a soft light woolen fabric; used for clothing', 'name': 'flannel'}, {'frequency': 'r', 'id': 462, 'synset': 'flash.n.10', 'synonyms': ['flash', 'flashbulb'], 'def': 'a lamp for providing momentary light to take a photograph', 'name': 'flash'}, {'frequency': 'c', 'id': 463, 'synset': 'flashlight.n.01', 'synonyms': ['flashlight', 'torch'], 'def': 'a small portable battery-powered electric lamp', 'name': 'flashlight'}, {'frequency': 'r', 'id': 464, 'synset': 'fleece.n.03', 'synonyms': ['fleece'], 'def': 'a soft bulky fabric with deep pile; used chiefly for clothing', 'name': 'fleece'}, {'frequency': 'f', 'id': 465, 'synset': 'flip-flop.n.02', 'synonyms': ['flip-flop_(sandal)'], 'def': 'a backless sandal held to the foot by a thong between two toes', 'name': 'flip-flop_(sandal)'}, {'frequency': 'c', 'id': 466, 'synset': 'flipper.n.01', 'synonyms': ['flipper_(footwear)', 'fin_(footwear)'], 'def': 'a shoe to aid a person in swimming', 'name': 'flipper_(footwear)'}, {'frequency': 'f', 'id': 467, 'synset': 'flower_arrangement.n.01', 'synonyms': ['flower_arrangement', 'floral_arrangement'], 'def': 'a decorative arrangement of flowers', 'name': 'flower_arrangement'}, {'frequency': 'c', 'id': 468, 'synset': 'flute.n.02', 'synonyms': ['flute_glass', 'champagne_flute'], 'def': 'a tall narrow wineglass', 'name': 'flute_glass'}, {'frequency': 'r', 'id': 469, 'synset': 'foal.n.01', 'synonyms': ['foal'], 'def': 'a young horse', 'name': 'foal'}, {'frequency': 'c', 'id': 470, 'synset': 'folding_chair.n.01', 'synonyms': ['folding_chair'], 'def': 'a chair that can be folded flat for storage', 'name': 'folding_chair'}, {'frequency': 'c', 'id': 471, 'synset': 'food_processor.n.01', 'synonyms': ['food_processor'], 'def': 'a kitchen appliance for shredding, blending, chopping, or slicing food', 'name': 'food_processor'}, {'frequency': 'c', 'id': 472, 'synset': 'football.n.02', 'synonyms': ['football_(American)'], 'def': 'the inflated oblong ball used in playing American football', 'name': 'football_(American)'}, {'frequency': 'r', 'id': 473, 'synset': 'football_helmet.n.01', 'synonyms': ['football_helmet'], 'def': 'a padded helmet with a face mask to protect the head of football players', 'name': 'football_helmet'}, {'frequency': 'c', 'id': 474, 'synset': 'footstool.n.01', 'synonyms': ['footstool', 'footrest'], 'def': 'a low seat or a stool to rest the feet of a seated person', 'name': 'footstool'}, {'frequency': 'f', 'id': 475, 'synset': 'fork.n.01', 'synonyms': ['fork'], 'def': 'cutlery used for serving and eating food', 'name': 'fork'}, {'frequency': 'r', 'id': 476, 'synset': 'forklift.n.01', 'synonyms': ['forklift'], 'def': 'an industrial vehicle with a power operated fork in front that can be inserted under loads to lift and move them', 'name': 'forklift'}, {'frequency': 'r', 'id': 477, 'synset': 'freight_car.n.01', 'synonyms': ['freight_car'], 'def': 'a railway car that carries freight', 'name': 'freight_car'}, {'frequency': 'r', 'id': 478, 'synset': 'french_toast.n.01', 'synonyms': ['French_toast'], 'def': 'bread slice dipped in egg and milk and fried', 'name': 'French_toast'}, {'frequency': 'c', 'id': 479, 'synset': 'freshener.n.01', 'synonyms': ['freshener', 'air_freshener'], 'def': 'anything that freshens', 'name': 'freshener'}, {'frequency': 'f', 'id': 480, 'synset': 'frisbee.n.01', 'synonyms': ['frisbee'], 'def': 'a light, plastic disk propelled with a flip of the wrist for recreation or competition', 'name': 'frisbee'}, {'frequency': 'c', 'id': 481, 'synset': 'frog.n.01', 'synonyms': ['frog', 'toad', 'toad_frog'], 'def': 'a tailless stout-bodied amphibians with long hind limbs for leaping', 'name': 'frog'}, {'frequency': 'c', 'id': 482, 'synset': 'fruit_juice.n.01', 'synonyms': ['fruit_juice'], 'def': 'drink produced by squeezing or crushing fruit', 'name': 'fruit_juice'}, {'frequency': 'r', 'id': 483, 'synset': 'fruit_salad.n.01', 'synonyms': ['fruit_salad'], 'def': 'salad composed of fruits', 'name': 'fruit_salad'}, {'frequency': 'c', 'id': 484, 'synset': 'frying_pan.n.01', 'synonyms': ['frying_pan', 'frypan', 'skillet'], 'def': 'a pan used for frying foods', 'name': 'frying_pan'}, {'frequency': 'r', 'id': 485, 'synset': 'fudge.n.01', 'synonyms': ['fudge'], 'def': 'soft creamy candy', 'name': 'fudge'}, {'frequency': 'r', 'id': 486, 'synset': 'funnel.n.02', 'synonyms': ['funnel'], 'def': 'a cone-shaped utensil used to channel a substance into a container with a small mouth', 'name': 'funnel'}, {'frequency': 'c', 'id': 487, 'synset': 'futon.n.01', 'synonyms': ['futon'], 'def': 'a pad that is used for sleeping on the floor or on a raised frame', 'name': 'futon'}, {'frequency': 'r', 'id': 488, 'synset': 'gag.n.02', 'synonyms': ['gag', 'muzzle'], 'def': "restraint put into a person's mouth to prevent speaking or shouting", 'name': 'gag'}, {'frequency': 'r', 'id': 489, 'synset': 'garbage.n.03', 'synonyms': ['garbage'], 'def': 'a receptacle where waste can be discarded', 'name': 'garbage'}, {'frequency': 'c', 'id': 490, 'synset': 'garbage_truck.n.01', 'synonyms': ['garbage_truck'], 'def': 'a truck for collecting domestic refuse', 'name': 'garbage_truck'}, {'frequency': 'c', 'id': 491, 'synset': 'garden_hose.n.01', 'synonyms': ['garden_hose'], 'def': 'a hose used for watering a lawn or garden', 'name': 'garden_hose'}, {'frequency': 'c', 'id': 492, 'synset': 'gargle.n.01', 'synonyms': ['gargle', 'mouthwash'], 'def': 'a medicated solution used for gargling and rinsing the mouth', 'name': 'gargle'}, {'frequency': 'r', 'id': 493, 'synset': 'gargoyle.n.02', 'synonyms': ['gargoyle'], 'def': 'an ornament consisting of a grotesquely carved figure of a person or animal', 'name': 'gargoyle'}, {'frequency': 'c', 'id': 494, 'synset': 'garlic.n.02', 'synonyms': ['garlic', 'ail'], 'def': 'aromatic bulb used as seasoning', 'name': 'garlic'}, {'frequency': 'r', 'id': 495, 'synset': 'gasmask.n.01', 'synonyms': ['gasmask', 'respirator', 'gas_helmet'], 'def': 'a protective face mask with a filter', 'name': 'gasmask'}, {'frequency': 'r', 'id': 496, 'synset': 'gazelle.n.01', 'synonyms': ['gazelle'], 'def': 'small swift graceful antelope of Africa and Asia having lustrous eyes', 'name': 'gazelle'}, {'frequency': 'c', 'id': 497, 'synset': 'gelatin.n.02', 'synonyms': ['gelatin', 'jelly'], 'def': 'an edible jelly made with gelatin and used as a dessert or salad base or a coating for foods', 'name': 'gelatin'}, {'frequency': 'r', 'id': 498, 'synset': 'gem.n.02', 'synonyms': ['gemstone'], 'def': 'a crystalline rock that can be cut and polished for jewelry', 'name': 'gemstone'}, {'frequency': 'c', 'id': 499, 'synset': 'giant_panda.n.01', 'synonyms': ['giant_panda', 'panda', 'panda_bear'], 'def': 'large black-and-white herbivorous mammal of bamboo forests of China and Tibet', 'name': 'giant_panda'}, {'frequency': 'c', 'id': 500, 'synset': 'gift_wrap.n.01', 'synonyms': ['gift_wrap'], 'def': 'attractive wrapping paper suitable for wrapping gifts', 'name': 'gift_wrap'}, {'frequency': 'c', 'id': 501, 'synset': 'ginger.n.03', 'synonyms': ['ginger', 'gingerroot'], 'def': 'the root of the common ginger plant; used fresh as a seasoning', 'name': 'ginger'}, {'frequency': 'f', 'id': 502, 'synset': 'giraffe.n.01', 'synonyms': ['giraffe'], 'def': 'tall animal having a spotted coat and small horns and very long neck and legs', 'name': 'giraffe'}, {'frequency': 'c', 'id': 503, 'synset': 'girdle.n.02', 'synonyms': ['cincture', 'sash', 'waistband', 'waistcloth'], 'def': 'a band of material around the waist that strengthens a skirt or trousers', 'name': 'cincture'}, {'frequency': 'f', 'id': 504, 'synset': 'glass.n.02', 'synonyms': ['glass_(drink_container)', 'drinking_glass'], 'def': 'a container for holding liquids while drinking', 'name': 'glass_(drink_container)'}, {'frequency': 'c', 'id': 505, 'synset': 'globe.n.03', 'synonyms': ['globe'], 'def': 'a sphere on which a map (especially of the earth) is represented', 'name': 'globe'}, {'frequency': 'f', 'id': 506, 'synset': 'glove.n.02', 'synonyms': ['glove'], 'def': 'handwear covering the hand', 'name': 'glove'}, {'frequency': 'c', 'id': 507, 'synset': 'goat.n.01', 'synonyms': ['goat'], 'def': 'a common goat', 'name': 'goat'}, {'frequency': 'f', 'id': 508, 'synset': 'goggles.n.01', 'synonyms': ['goggles'], 'def': 'tight-fitting spectacles worn to protect the eyes', 'name': 'goggles'}, {'frequency': 'r', 'id': 509, 'synset': 'goldfish.n.01', 'synonyms': ['goldfish'], 'def': 'small golden or orange-red freshwater fishes used as pond or aquarium pets', 'name': 'goldfish'}, {'frequency': 'r', 'id': 510, 'synset': 'golf_club.n.02', 'synonyms': ['golf_club', 'golf-club'], 'def': 'golf equipment used by a golfer to hit a golf ball', 'name': 'golf_club'}, {'frequency': 'c', 'id': 511, 'synset': 'golfcart.n.01', 'synonyms': ['golfcart'], 'def': 'a small motor vehicle in which golfers can ride between shots', 'name': 'golfcart'}, {'frequency': 'r', 'id': 512, 'synset': 'gondola.n.02', 'synonyms': ['gondola_(boat)'], 'def': 'long narrow flat-bottomed boat propelled by sculling; traditionally used on canals of Venice', 'name': 'gondola_(boat)'}, {'frequency': 'c', 'id': 513, 'synset': 'goose.n.01', 'synonyms': ['goose'], 'def': 'loud, web-footed long-necked aquatic birds usually larger than ducks', 'name': 'goose'}, {'frequency': 'r', 'id': 514, 'synset': 'gorilla.n.01', 'synonyms': ['gorilla'], 'def': 'largest ape', 'name': 'gorilla'}, {'frequency': 'r', 'id': 515, 'synset': 'gourd.n.02', 'synonyms': ['gourd'], 'def': 'any of numerous inedible fruits with hard rinds', 'name': 'gourd'}, {'frequency': 'r', 'id': 516, 'synset': 'gown.n.04', 'synonyms': ['surgical_gown', 'scrubs_(surgical_clothing)'], 'def': 'protective garment worn by surgeons during operations', 'name': 'surgical_gown'}, {'frequency': 'f', 'id': 517, 'synset': 'grape.n.01', 'synonyms': ['grape'], 'def': 'any of various juicy fruit with green or purple skins; grow in clusters', 'name': 'grape'}, {'frequency': 'r', 'id': 518, 'synset': 'grasshopper.n.01', 'synonyms': ['grasshopper'], 'def': 'plant-eating insect with hind legs adapted for leaping', 'name': 'grasshopper'}, {'frequency': 'c', 'id': 519, 'synset': 'grater.n.01', 'synonyms': ['grater'], 'def': 'utensil with sharp perforations for shredding foods (as vegetables or cheese)', 'name': 'grater'}, {'frequency': 'c', 'id': 520, 'synset': 'gravestone.n.01', 'synonyms': ['gravestone', 'headstone', 'tombstone'], 'def': 'a stone that is used to mark a grave', 'name': 'gravestone'}, {'frequency': 'r', 'id': 521, 'synset': 'gravy_boat.n.01', 'synonyms': ['gravy_boat', 'gravy_holder'], 'def': 'a dish (often boat-shaped) for serving gravy or sauce', 'name': 'gravy_boat'}, {'frequency': 'c', 'id': 522, 'synset': 'green_bean.n.02', 'synonyms': ['green_bean'], 'def': 'a common bean plant cultivated for its slender green edible pods', 'name': 'green_bean'}, {'frequency': 'c', 'id': 523, 'synset': 'green_onion.n.01', 'synonyms': ['green_onion', 'spring_onion', 'scallion'], 'def': 'a young onion before the bulb has enlarged', 'name': 'green_onion'}, {'frequency': 'r', 'id': 524, 'synset': 'griddle.n.01', 'synonyms': ['griddle'], 'def': 'cooking utensil consisting of a flat heated surface on which food is cooked', 'name': 'griddle'}, {'frequency': 'r', 'id': 525, 'synset': 'grillroom.n.01', 'synonyms': ['grillroom', 'grill_(restaurant)'], 'def': 'a restaurant where food is cooked on a grill', 'name': 'grillroom'}, {'frequency': 'r', 'id': 526, 'synset': 'grinder.n.04', 'synonyms': ['grinder_(tool)'], 'def': 'a machine tool that polishes metal', 'name': 'grinder_(tool)'}, {'frequency': 'r', 'id': 527, 'synset': 'grits.n.01', 'synonyms': ['grits', 'hominy_grits'], 'def': 'coarsely ground corn boiled as a breakfast dish', 'name': 'grits'}, {'frequency': 'c', 'id': 528, 'synset': 'grizzly.n.01', 'synonyms': ['grizzly', 'grizzly_bear'], 'def': 'powerful brownish-yellow bear of the uplands of western North America', 'name': 'grizzly'}, {'frequency': 'c', 'id': 529, 'synset': 'grocery_bag.n.01', 'synonyms': ['grocery_bag'], 'def': "a sack for holding customer's groceries", 'name': 'grocery_bag'}, {'frequency': 'r', 'id': 530, 'synset': 'guacamole.n.01', 'synonyms': ['guacamole'], 'def': 'a dip made of mashed avocado mixed with chopped onions and other seasonings', 'name': 'guacamole'}, {'frequency': 'f', 'id': 531, 'synset': 'guitar.n.01', 'synonyms': ['guitar'], 'def': 'a stringed instrument usually having six strings; played by strumming or plucking', 'name': 'guitar'}, {'frequency': 'c', 'id': 532, 'synset': 'gull.n.02', 'synonyms': ['gull', 'seagull'], 'def': 'mostly white aquatic bird having long pointed wings and short legs', 'name': 'gull'}, {'frequency': 'c', 'id': 533, 'synset': 'gun.n.01', 'synonyms': ['gun'], 'def': 'a weapon that discharges a bullet at high velocity from a metal tube', 'name': 'gun'}, {'frequency': 'r', 'id': 534, 'synset': 'hair_spray.n.01', 'synonyms': ['hair_spray'], 'def': 'substance sprayed on the hair to hold it in place', 'name': 'hair_spray'}, {'frequency': 'c', 'id': 535, 'synset': 'hairbrush.n.01', 'synonyms': ['hairbrush'], 'def': "a brush used to groom a person's hair", 'name': 'hairbrush'}, {'frequency': 'c', 'id': 536, 'synset': 'hairnet.n.01', 'synonyms': ['hairnet'], 'def': 'a small net that someone wears over their hair to keep it in place', 'name': 'hairnet'}, {'frequency': 'c', 'id': 537, 'synset': 'hairpin.n.01', 'synonyms': ['hairpin'], 'def': "a double pronged pin used to hold women's hair in place", 'name': 'hairpin'}, {'frequency': 'f', 'id': 538, 'synset': 'ham.n.01', 'synonyms': ['ham', 'jambon', 'gammon'], 'def': 'meat cut from the thigh of a hog (usually smoked)', 'name': 'ham'}, {'frequency': 'c', 'id': 539, 'synset': 'hamburger.n.01', 'synonyms': ['hamburger', 'beefburger', 'burger'], 'def': 'a sandwich consisting of a patty of minced beef served on a bun', 'name': 'hamburger'}, {'frequency': 'c', 'id': 540, 'synset': 'hammer.n.02', 'synonyms': ['hammer'], 'def': 'a hand tool with a heavy head and a handle; used to deliver an impulsive force by striking', 'name': 'hammer'}, {'frequency': 'r', 'id': 541, 'synset': 'hammock.n.02', 'synonyms': ['hammock'], 'def': 'a hanging bed of canvas or rope netting (usually suspended between two trees)', 'name': 'hammock'}, {'frequency': 'r', 'id': 542, 'synset': 'hamper.n.02', 'synonyms': ['hamper'], 'def': 'a basket usually with a cover', 'name': 'hamper'}, {'frequency': 'r', 'id': 543, 'synset': 'hamster.n.01', 'synonyms': ['hamster'], 'def': 'short-tailed burrowing rodent with large cheek pouches', 'name': 'hamster'}, {'frequency': 'c', 'id': 544, 'synset': 'hand_blower.n.01', 'synonyms': ['hair_dryer'], 'def': 'a hand-held electric blower that can blow warm air onto the hair', 'name': 'hair_dryer'}, {'frequency': 'r', 'id': 545, 'synset': 'hand_glass.n.01', 'synonyms': ['hand_glass', 'hand_mirror'], 'def': 'a mirror intended to be held in the hand', 'name': 'hand_glass'}, {'frequency': 'f', 'id': 546, 'synset': 'hand_towel.n.01', 'synonyms': ['hand_towel', 'face_towel'], 'def': 'a small towel used to dry the hands or face', 'name': 'hand_towel'}, {'frequency': 'c', 'id': 547, 'synset': 'handcart.n.01', 'synonyms': ['handcart', 'pushcart', 'hand_truck'], 'def': 'wheeled vehicle that can be pushed by a person', 'name': 'handcart'}, {'frequency': 'r', 'id': 548, 'synset': 'handcuff.n.01', 'synonyms': ['handcuff'], 'def': 'shackle that consists of a metal loop that can be locked around the wrist', 'name': 'handcuff'}, {'frequency': 'c', 'id': 549, 'synset': 'handkerchief.n.01', 'synonyms': ['handkerchief'], 'def': 'a square piece of cloth used for wiping the eyes or nose or as a costume accessory', 'name': 'handkerchief'}, {'frequency': 'f', 'id': 550, 'synset': 'handle.n.01', 'synonyms': ['handle', 'grip', 'handgrip'], 'def': 'the appendage to an object that is designed to be held in order to use or move it', 'name': 'handle'}, {'frequency': 'r', 'id': 551, 'synset': 'handsaw.n.01', 'synonyms': ['handsaw', "carpenter's_saw"], 'def': 'a saw used with one hand for cutting wood', 'name': 'handsaw'}, {'frequency': 'r', 'id': 552, 'synset': 'hardback.n.01', 'synonyms': ['hardback_book', 'hardcover_book'], 'def': 'a book with cardboard or cloth or leather covers', 'name': 'hardback_book'}, {'frequency': 'r', 'id': 553, 'synset': 'harmonium.n.01', 'synonyms': ['harmonium', 'organ_(musical_instrument)', 'reed_organ_(musical_instrument)'], 'def': 'a free-reed instrument in which air is forced through the reeds by bellows', 'name': 'harmonium'}, {'frequency': 'f', 'id': 554, 'synset': 'hat.n.01', 'synonyms': ['hat'], 'def': 'headwear that protects the head from bad weather, sun, or worn for fashion', 'name': 'hat'}, {'frequency': 'r', 'id': 555, 'synset': 'hatbox.n.01', 'synonyms': ['hatbox'], 'def': 'a round piece of luggage for carrying hats', 'name': 'hatbox'}, {'frequency': 'r', 'id': 556, 'synset': 'hatch.n.03', 'synonyms': ['hatch'], 'def': 'a movable barrier covering a hatchway', 'name': 'hatch'}, {'frequency': 'c', 'id': 557, 'synset': 'head_covering.n.01', 'synonyms': ['veil'], 'def': 'a garment that covers the head and face', 'name': 'veil'}, {'frequency': 'f', 'id': 558, 'synset': 'headband.n.01', 'synonyms': ['headband'], 'def': 'a band worn around or over the head', 'name': 'headband'}, {'frequency': 'f', 'id': 559, 'synset': 'headboard.n.01', 'synonyms': ['headboard'], 'def': 'a vertical board or panel forming the head of a bedstead', 'name': 'headboard'}, {'frequency': 'f', 'id': 560, 'synset': 'headlight.n.01', 'synonyms': ['headlight', 'headlamp'], 'def': 'a powerful light with reflector; attached to the front of an automobile or locomotive', 'name': 'headlight'}, {'frequency': 'c', 'id': 561, 'synset': 'headscarf.n.01', 'synonyms': ['headscarf'], 'def': 'a kerchief worn over the head and tied under the chin', 'name': 'headscarf'}, {'frequency': 'r', 'id': 562, 'synset': 'headset.n.01', 'synonyms': ['headset'], 'def': 'receiver consisting of a pair of headphones', 'name': 'headset'}, {'frequency': 'c', 'id': 563, 'synset': 'headstall.n.01', 'synonyms': ['headstall_(for_horses)', 'headpiece_(for_horses)'], 'def': "the band that is the part of a bridle that fits around a horse's head", 'name': 'headstall_(for_horses)'}, {'frequency': 'r', 'id': 564, 'synset': 'hearing_aid.n.02', 'synonyms': ['hearing_aid'], 'def': 'an acoustic device used to direct sound to the ear of a hearing-impaired person', 'name': 'hearing_aid'}, {'frequency': 'c', 'id': 565, 'synset': 'heart.n.02', 'synonyms': ['heart'], 'def': 'a muscular organ; its contractions move the blood through the body', 'name': 'heart'}, {'frequency': 'c', 'id': 566, 'synset': 'heater.n.01', 'synonyms': ['heater', 'warmer'], 'def': 'device that heats water or supplies warmth to a room', 'name': 'heater'}, {'frequency': 'c', 'id': 567, 'synset': 'helicopter.n.01', 'synonyms': ['helicopter'], 'def': 'an aircraft without wings that obtains its lift from the rotation of overhead blades', 'name': 'helicopter'}, {'frequency': 'f', 'id': 568, 'synset': 'helmet.n.02', 'synonyms': ['helmet'], 'def': 'a protective headgear made of hard material to resist blows', 'name': 'helmet'}, {'frequency': 'r', 'id': 569, 'synset': 'heron.n.02', 'synonyms': ['heron'], 'def': 'grey or white wading bird with long neck and long legs and (usually) long bill', 'name': 'heron'}, {'frequency': 'c', 'id': 570, 'synset': 'highchair.n.01', 'synonyms': ['highchair', 'feeding_chair'], 'def': 'a chair for feeding a very young child', 'name': 'highchair'}, {'frequency': 'f', 'id': 571, 'synset': 'hinge.n.01', 'synonyms': ['hinge'], 'def': 'a joint that holds two parts together so that one can swing relative to the other', 'name': 'hinge'}, {'frequency': 'r', 'id': 572, 'synset': 'hippopotamus.n.01', 'synonyms': ['hippopotamus'], 'def': 'massive thick-skinned animal living in or around rivers of tropical Africa', 'name': 'hippopotamus'}, {'frequency': 'r', 'id': 573, 'synset': 'hockey_stick.n.01', 'synonyms': ['hockey_stick'], 'def': 'sports implement consisting of a stick used by hockey players to move the puck', 'name': 'hockey_stick'}, {'frequency': 'c', 'id': 574, 'synset': 'hog.n.03', 'synonyms': ['hog', 'pig'], 'def': 'domestic swine', 'name': 'hog'}, {'frequency': 'f', 'id': 575, 'synset': 'home_plate.n.01', 'synonyms': ['home_plate_(baseball)', 'home_base_(baseball)'], 'def': '(baseball) a rubber slab where the batter stands; it must be touched by a base runner in order to score', 'name': 'home_plate_(baseball)'}, {'frequency': 'c', 'id': 576, 'synset': 'honey.n.01', 'synonyms': ['honey'], 'def': 'a sweet yellow liquid produced by bees', 'name': 'honey'}, {'frequency': 'f', 'id': 577, 'synset': 'hood.n.06', 'synonyms': ['fume_hood', 'exhaust_hood'], 'def': 'metal covering leading to a vent that exhausts smoke or fumes', 'name': 'fume_hood'}, {'frequency': 'f', 'id': 578, 'synset': 'hook.n.05', 'synonyms': ['hook'], 'def': 'a curved or bent implement for suspending or pulling something', 'name': 'hook'}, {'frequency': 'f', 'id': 579, 'synset': 'horse.n.01', 'synonyms': ['horse'], 'def': 'a common horse', 'name': 'horse'}, {'frequency': 'f', 'id': 580, 'synset': 'hose.n.03', 'synonyms': ['hose', 'hosepipe'], 'def': 'a flexible pipe for conveying a liquid or gas', 'name': 'hose'}, {'frequency': 'r', 'id': 581, 'synset': 'hot-air_balloon.n.01', 'synonyms': ['hot-air_balloon'], 'def': 'balloon for travel through the air in a basket suspended below a large bag of heated air', 'name': 'hot-air_balloon'}, {'frequency': 'r', 'id': 582, 'synset': 'hot_plate.n.01', 'synonyms': ['hotplate'], 'def': 'a portable electric appliance for heating or cooking or keeping food warm', 'name': 'hotplate'}, {'frequency': 'c', 'id': 583, 'synset': 'hot_sauce.n.01', 'synonyms': ['hot_sauce'], 'def': 'a pungent peppery sauce', 'name': 'hot_sauce'}, {'frequency': 'r', 'id': 584, 'synset': 'hourglass.n.01', 'synonyms': ['hourglass'], 'def': 'a sandglass timer that runs for sixty minutes', 'name': 'hourglass'}, {'frequency': 'r', 'id': 585, 'synset': 'houseboat.n.01', 'synonyms': ['houseboat'], 'def': 'a barge that is designed and equipped for use as a dwelling', 'name': 'houseboat'}, {'frequency': 'r', 'id': 586, 'synset': 'hummingbird.n.01', 'synonyms': ['hummingbird'], 'def': 'tiny American bird having brilliant iridescent plumage and long slender bills', 'name': 'hummingbird'}, {'frequency': 'r', 'id': 587, 'synset': 'hummus.n.01', 'synonyms': ['hummus', 'humus', 'hommos', 'hoummos', 'humous'], 'def': 'a thick spread made from mashed chickpeas', 'name': 'hummus'}, {'frequency': 'c', 'id': 588, 'synset': 'ice_bear.n.01', 'synonyms': ['polar_bear'], 'def': 'white bear of Arctic regions', 'name': 'polar_bear'}, {'frequency': 'c', 'id': 589, 'synset': 'ice_cream.n.01', 'synonyms': ['icecream'], 'def': 'frozen dessert containing cream and sugar and flavoring', 'name': 'icecream'}, {'frequency': 'r', 'id': 590, 'synset': 'ice_lolly.n.01', 'synonyms': ['popsicle'], 'def': 'ice cream or water ice on a small wooden stick', 'name': 'popsicle'}, {'frequency': 'c', 'id': 591, 'synset': 'ice_maker.n.01', 'synonyms': ['ice_maker'], 'def': 'an appliance included in some electric refrigerators for making ice cubes', 'name': 'ice_maker'}, {'frequency': 'r', 'id': 592, 'synset': 'ice_pack.n.01', 'synonyms': ['ice_pack', 'ice_bag'], 'def': 'a waterproof bag filled with ice: applied to the body (especially the head) to cool or reduce swelling', 'name': 'ice_pack'}, {'frequency': 'r', 'id': 593, 'synset': 'ice_skate.n.01', 'synonyms': ['ice_skate'], 'def': 'skate consisting of a boot with a steel blade fitted to the sole', 'name': 'ice_skate'}, {'frequency': 'r', 'id': 594, 'synset': 'ice_tea.n.01', 'synonyms': ['ice_tea', 'iced_tea'], 'def': 'strong tea served over ice', 'name': 'ice_tea'}, {'frequency': 'c', 'id': 595, 'synset': 'igniter.n.01', 'synonyms': ['igniter', 'ignitor', 'lighter'], 'def': 'a substance or device used to start a fire', 'name': 'igniter'}, {'frequency': 'r', 'id': 596, 'synset': 'incense.n.01', 'synonyms': ['incense'], 'def': 'a substance that produces a fragrant odor when burned', 'name': 'incense'}, {'frequency': 'r', 'id': 597, 'synset': 'inhaler.n.01', 'synonyms': ['inhaler', 'inhalator'], 'def': 'a dispenser that produces a chemical vapor to be inhaled through mouth or nose', 'name': 'inhaler'}, {'frequency': 'c', 'id': 598, 'synset': 'ipod.n.01', 'synonyms': ['iPod'], 'def': 'a pocket-sized device used to play music files', 'name': 'iPod'}, {'frequency': 'c', 'id': 599, 'synset': 'iron.n.04', 'synonyms': ['iron_(for_clothing)', 'smoothing_iron_(for_clothing)'], 'def': 'home appliance consisting of a flat metal base that is heated and used to smooth cloth', 'name': 'iron_(for_clothing)'}, {'frequency': 'r', 'id': 600, 'synset': 'ironing_board.n.01', 'synonyms': ['ironing_board'], 'def': 'narrow padded board on collapsible supports; used for ironing clothes', 'name': 'ironing_board'}, {'frequency': 'f', 'id': 601, 'synset': 'jacket.n.01', 'synonyms': ['jacket'], 'def': 'a waist-length coat', 'name': 'jacket'}, {'frequency': 'r', 'id': 602, 'synset': 'jam.n.01', 'synonyms': ['jam'], 'def': 'preserve of crushed fruit', 'name': 'jam'}, {'frequency': 'f', 'id': 603, 'synset': 'jean.n.01', 'synonyms': ['jean', 'blue_jean', 'denim'], 'def': '(usually plural) close-fitting trousers of heavy denim for manual work or casual wear', 'name': 'jean'}, {'frequency': 'c', 'id': 604, 'synset': 'jeep.n.01', 'synonyms': ['jeep', 'landrover'], 'def': 'a car suitable for traveling over rough terrain', 'name': 'jeep'}, {'frequency': 'r', 'id': 605, 'synset': 'jelly_bean.n.01', 'synonyms': ['jelly_bean', 'jelly_egg'], 'def': 'sugar-glazed jellied candy', 'name': 'jelly_bean'}, {'frequency': 'f', 'id': 606, 'synset': 'jersey.n.03', 'synonyms': ['jersey', 'T-shirt', 'tee_shirt'], 'def': 'a close-fitting pullover shirt', 'name': 'jersey'}, {'frequency': 'c', 'id': 607, 'synset': 'jet.n.01', 'synonyms': ['jet_plane', 'jet-propelled_plane'], 'def': 'an airplane powered by one or more jet engines', 'name': 'jet_plane'}, {'frequency': 'c', 'id': 608, 'synset': 'jewelry.n.01', 'synonyms': ['jewelry', 'jewellery'], 'def': 'an adornment (as a bracelet or ring or necklace) made of precious metals and set with gems (or imitation gems)', 'name': 'jewelry'}, {'frequency': 'r', 'id': 609, 'synset': 'joystick.n.02', 'synonyms': ['joystick'], 'def': 'a control device for computers consisting of a vertical handle that can move freely in two directions', 'name': 'joystick'}, {'frequency': 'r', 'id': 610, 'synset': 'jump_suit.n.01', 'synonyms': ['jumpsuit'], 'def': "one-piece garment fashioned after a parachutist's uniform", 'name': 'jumpsuit'}, {'frequency': 'c', 'id': 611, 'synset': 'kayak.n.01', 'synonyms': ['kayak'], 'def': 'a small canoe consisting of a light frame made watertight with animal skins', 'name': 'kayak'}, {'frequency': 'r', 'id': 612, 'synset': 'keg.n.02', 'synonyms': ['keg'], 'def': 'small cask or barrel', 'name': 'keg'}, {'frequency': 'r', 'id': 613, 'synset': 'kennel.n.01', 'synonyms': ['kennel', 'doghouse'], 'def': 'outbuilding that serves as a shelter for a dog', 'name': 'kennel'}, {'frequency': 'c', 'id': 614, 'synset': 'kettle.n.01', 'synonyms': ['kettle', 'boiler'], 'def': 'a metal pot for stewing or boiling; usually has a lid', 'name': 'kettle'}, {'frequency': 'f', 'id': 615, 'synset': 'key.n.01', 'synonyms': ['key'], 'def': 'metal instrument used to unlock a lock', 'name': 'key'}, {'frequency': 'r', 'id': 616, 'synset': 'keycard.n.01', 'synonyms': ['keycard'], 'def': 'a plastic card used to gain access typically to a door', 'name': 'keycard'}, {'frequency': 'r', 'id': 617, 'synset': 'kilt.n.01', 'synonyms': ['kilt'], 'def': 'a knee-length pleated tartan skirt worn by men as part of the traditional dress in the Highlands of northern Scotland', 'name': 'kilt'}, {'frequency': 'c', 'id': 618, 'synset': 'kimono.n.01', 'synonyms': ['kimono'], 'def': 'a loose robe; imitated from robes originally worn by Japanese', 'name': 'kimono'}, {'frequency': 'f', 'id': 619, 'synset': 'kitchen_sink.n.01', 'synonyms': ['kitchen_sink'], 'def': 'a sink in a kitchen', 'name': 'kitchen_sink'}, {'frequency': 'c', 'id': 620, 'synset': 'kitchen_table.n.01', 'synonyms': ['kitchen_table'], 'def': 'a table in the kitchen', 'name': 'kitchen_table'}, {'frequency': 'f', 'id': 621, 'synset': 'kite.n.03', 'synonyms': ['kite'], 'def': 'plaything consisting of a light frame covered with tissue paper; flown in wind at end of a string', 'name': 'kite'}, {'frequency': 'c', 'id': 622, 'synset': 'kitten.n.01', 'synonyms': ['kitten', 'kitty'], 'def': 'young domestic cat', 'name': 'kitten'}, {'frequency': 'c', 'id': 623, 'synset': 'kiwi.n.03', 'synonyms': ['kiwi_fruit'], 'def': 'fuzzy brown egg-shaped fruit with slightly tart green flesh', 'name': 'kiwi_fruit'}, {'frequency': 'f', 'id': 624, 'synset': 'knee_pad.n.01', 'synonyms': ['knee_pad'], 'def': 'protective garment consisting of a pad worn by football or baseball or hockey players', 'name': 'knee_pad'}, {'frequency': 'f', 'id': 625, 'synset': 'knife.n.01', 'synonyms': ['knife'], 'def': 'tool with a blade and point used as a cutting instrument', 'name': 'knife'}, {'frequency': 'r', 'id': 626, 'synset': 'knight.n.02', 'synonyms': ['knight_(chess_piece)', 'horse_(chess_piece)'], 'def': 'a chess game piece shaped to resemble the head of a horse', 'name': 'knight_(chess_piece)'}, {'frequency': 'r', 'id': 627, 'synset': 'knitting_needle.n.01', 'synonyms': ['knitting_needle'], 'def': 'needle consisting of a slender rod with pointed ends; usually used in pairs', 'name': 'knitting_needle'}, {'frequency': 'f', 'id': 628, 'synset': 'knob.n.02', 'synonyms': ['knob'], 'def': 'a round handle often found on a door', 'name': 'knob'}, {'frequency': 'r', 'id': 629, 'synset': 'knocker.n.05', 'synonyms': ['knocker_(on_a_door)', 'doorknocker'], 'def': 'a device (usually metal and ornamental) attached by a hinge to a door', 'name': 'knocker_(on_a_door)'}, {'frequency': 'r', 'id': 630, 'synset': 'koala.n.01', 'synonyms': ['koala', 'koala_bear'], 'def': 'sluggish tailless Australian marsupial with grey furry ears and coat', 'name': 'koala'}, {'frequency': 'r', 'id': 631, 'synset': 'lab_coat.n.01', 'synonyms': ['lab_coat', 'laboratory_coat'], 'def': 'a light coat worn to protect clothing from substances used while working in a laboratory', 'name': 'lab_coat'}, {'frequency': 'f', 'id': 632, 'synset': 'ladder.n.01', 'synonyms': ['ladder'], 'def': 'steps consisting of two parallel members connected by rungs', 'name': 'ladder'}, {'frequency': 'c', 'id': 633, 'synset': 'ladle.n.01', 'synonyms': ['ladle'], 'def': 'a spoon-shaped vessel with a long handle frequently used to transfer liquids', 'name': 'ladle'}, {'frequency': 'r', 'id': 634, 'synset': 'ladybug.n.01', 'synonyms': ['ladybug', 'ladybeetle', 'ladybird_beetle'], 'def': 'small round bright-colored and spotted beetle, typically red and black', 'name': 'ladybug'}, {'frequency': 'c', 'id': 635, 'synset': 'lamb.n.01', 'synonyms': ['lamb_(animal)'], 'def': 'young sheep', 'name': 'lamb_(animal)'}, {'frequency': 'r', 'id': 636, 'synset': 'lamb_chop.n.01', 'synonyms': ['lamb-chop', 'lambchop'], 'def': 'chop cut from a lamb', 'name': 'lamb-chop'}, {'frequency': 'f', 'id': 637, 'synset': 'lamp.n.02', 'synonyms': ['lamp'], 'def': 'a piece of furniture holding one or more electric light bulbs', 'name': 'lamp'}, {'frequency': 'f', 'id': 638, 'synset': 'lamppost.n.01', 'synonyms': ['lamppost'], 'def': 'a metal post supporting an outdoor lamp (such as a streetlight)', 'name': 'lamppost'}, {'frequency': 'f', 'id': 639, 'synset': 'lampshade.n.01', 'synonyms': ['lampshade'], 'def': 'a protective ornamental shade used to screen a light bulb from direct view', 'name': 'lampshade'}, {'frequency': 'c', 'id': 640, 'synset': 'lantern.n.01', 'synonyms': ['lantern'], 'def': 'light in a transparent protective case', 'name': 'lantern'}, {'frequency': 'f', 'id': 641, 'synset': 'lanyard.n.02', 'synonyms': ['lanyard', 'laniard'], 'def': 'a cord worn around the neck to hold a knife or whistle, etc.', 'name': 'lanyard'}, {'frequency': 'f', 'id': 642, 'synset': 'laptop.n.01', 'synonyms': ['laptop_computer', 'notebook_computer'], 'def': 'a portable computer small enough to use in your lap', 'name': 'laptop_computer'}, {'frequency': 'r', 'id': 643, 'synset': 'lasagna.n.01', 'synonyms': ['lasagna', 'lasagne'], 'def': 'baked dish of layers of lasagna pasta with sauce and cheese and meat or vegetables', 'name': 'lasagna'}, {'frequency': 'c', 'id': 644, 'synset': 'latch.n.02', 'synonyms': ['latch'], 'def': 'a bar that can be lowered or slid into a groove to fasten a door or gate', 'name': 'latch'}, {'frequency': 'r', 'id': 645, 'synset': 'lawn_mower.n.01', 'synonyms': ['lawn_mower'], 'def': 'garden tool for mowing grass on lawns', 'name': 'lawn_mower'}, {'frequency': 'r', 'id': 646, 'synset': 'leather.n.01', 'synonyms': ['leather'], 'def': 'an animal skin made smooth and flexible by removing the hair and then tanning', 'name': 'leather'}, {'frequency': 'c', 'id': 647, 'synset': 'legging.n.01', 'synonyms': ['legging_(clothing)', 'leging_(clothing)', 'leg_covering'], 'def': 'a garment covering the leg (usually extending from the knee to the ankle)', 'name': 'legging_(clothing)'}, {'frequency': 'c', 'id': 648, 'synset': 'lego.n.01', 'synonyms': ['Lego', 'Lego_set'], 'def': "a child's plastic construction set for making models from blocks", 'name': 'Lego'}, {'frequency': 'f', 'id': 649, 'synset': 'lemon.n.01', 'synonyms': ['lemon'], 'def': 'yellow oval fruit with juicy acidic flesh', 'name': 'lemon'}, {'frequency': 'r', 'id': 650, 'synset': 'lemonade.n.01', 'synonyms': ['lemonade'], 'def': 'sweetened beverage of diluted lemon juice', 'name': 'lemonade'}, {'frequency': 'f', 'id': 651, 'synset': 'lettuce.n.02', 'synonyms': ['lettuce'], 'def': 'leafy plant commonly eaten in salad or on sandwiches', 'name': 'lettuce'}, {'frequency': 'f', 'id': 652, 'synset': 'license_plate.n.01', 'synonyms': ['license_plate', 'numberplate'], 'def': "a plate mounted on the front and back of car and bearing the car's registration number", 'name': 'license_plate'}, {'frequency': 'f', 'id': 653, 'synset': 'life_buoy.n.01', 'synonyms': ['life_buoy', 'lifesaver', 'life_belt', 'life_ring'], 'def': 'a ring-shaped life preserver used to prevent drowning (NOT a life-jacket or vest)', 'name': 'life_buoy'}, {'frequency': 'f', 'id': 654, 'synset': 'life_jacket.n.01', 'synonyms': ['life_jacket', 'life_vest'], 'def': 'life preserver consisting of a sleeveless jacket of buoyant or inflatable design', 'name': 'life_jacket'}, {'frequency': 'f', 'id': 655, 'synset': 'light_bulb.n.01', 'synonyms': ['lightbulb'], 'def': 'glass bulb or tube shaped electric device that emits light (DO NOT MARK LAMPS AS A WHOLE)', 'name': 'lightbulb'}, {'frequency': 'r', 'id': 656, 'synset': 'lightning_rod.n.02', 'synonyms': ['lightning_rod', 'lightning_conductor'], 'def': 'a metallic conductor that is attached to a high point and leads to the ground', 'name': 'lightning_rod'}, {'frequency': 'c', 'id': 657, 'synset': 'lime.n.06', 'synonyms': ['lime'], 'def': 'the green acidic fruit of any of various lime trees', 'name': 'lime'}, {'frequency': 'r', 'id': 658, 'synset': 'limousine.n.01', 'synonyms': ['limousine'], 'def': 'long luxurious car; usually driven by a chauffeur', 'name': 'limousine'}, {'frequency': 'r', 'id': 659, 'synset': 'linen.n.02', 'synonyms': ['linen_paper'], 'def': 'a high-quality paper made of linen fibers or with a linen finish', 'name': 'linen_paper'}, {'frequency': 'c', 'id': 660, 'synset': 'lion.n.01', 'synonyms': ['lion'], 'def': 'large gregarious predatory cat of Africa and India', 'name': 'lion'}, {'frequency': 'c', 'id': 661, 'synset': 'lip_balm.n.01', 'synonyms': ['lip_balm'], 'def': 'a balm applied to the lips', 'name': 'lip_balm'}, {'frequency': 'c', 'id': 662, 'synset': 'lipstick.n.01', 'synonyms': ['lipstick', 'lip_rouge'], 'def': 'makeup that is used to color the lips', 'name': 'lipstick'}, {'frequency': 'r', 'id': 663, 'synset': 'liquor.n.01', 'synonyms': ['liquor', 'spirits', 'hard_liquor', 'liqueur', 'cordial'], 'def': 'an alcoholic beverage that is distilled rather than fermented', 'name': 'liquor'}, {'frequency': 'r', 'id': 664, 'synset': 'lizard.n.01', 'synonyms': ['lizard'], 'def': 'a reptile with usually two pairs of legs and a tapering tail', 'name': 'lizard'}, {'frequency': 'r', 'id': 665, 'synset': 'loafer.n.02', 'synonyms': ['Loafer_(type_of_shoe)'], 'def': 'a low leather step-in shoe', 'name': 'Loafer_(type_of_shoe)'}, {'frequency': 'f', 'id': 666, 'synset': 'log.n.01', 'synonyms': ['log'], 'def': 'a segment of the trunk of a tree when stripped of branches', 'name': 'log'}, {'frequency': 'c', 'id': 667, 'synset': 'lollipop.n.02', 'synonyms': ['lollipop'], 'def': 'hard candy on a stick', 'name': 'lollipop'}, {'frequency': 'c', 'id': 668, 'synset': 'lotion.n.01', 'synonyms': ['lotion'], 'def': 'any of various cosmetic preparations that are applied to the skin', 'name': 'lotion'}, {'frequency': 'f', 'id': 669, 'synset': 'loudspeaker.n.01', 'synonyms': ['speaker_(stero_equipment)'], 'def': 'electronic device that produces sound often as part of a stereo system', 'name': 'speaker_(stero_equipment)'}, {'frequency': 'c', 'id': 670, 'synset': 'love_seat.n.01', 'synonyms': ['loveseat'], 'def': 'small sofa that seats two people', 'name': 'loveseat'}, {'frequency': 'r', 'id': 671, 'synset': 'machine_gun.n.01', 'synonyms': ['machine_gun'], 'def': 'a rapidly firing automatic gun', 'name': 'machine_gun'}, {'frequency': 'f', 'id': 672, 'synset': 'magazine.n.02', 'synonyms': ['magazine'], 'def': 'a paperback periodic publication', 'name': 'magazine'}, {'frequency': 'f', 'id': 673, 'synset': 'magnet.n.01', 'synonyms': ['magnet'], 'def': 'a device that attracts iron and produces a magnetic field', 'name': 'magnet'}, {'frequency': 'r', 'id': 674, 'synset': 'mail_slot.n.01', 'synonyms': ['mail_slot'], 'def': 'a slot (usually in a door) through which mail can be delivered', 'name': 'mail_slot'}, {'frequency': 'c', 'id': 675, 'synset': 'mailbox.n.01', 'synonyms': ['mailbox_(at_home)', 'letter_box_(at_home)'], 'def': 'a private box for delivery of mail', 'name': 'mailbox_(at_home)'}, {'frequency': 'r', 'id': 676, 'synset': 'mallet.n.01', 'synonyms': ['mallet'], 'def': 'a sports implement with a long handle and a hammer-like head used to hit a ball', 'name': 'mallet'}, {'frequency': 'r', 'id': 677, 'synset': 'mammoth.n.01', 'synonyms': ['mammoth'], 'def': 'any of numerous extinct elephants widely distributed in the Pleistocene', 'name': 'mammoth'}, {'frequency': 'c', 'id': 678, 'synset': 'mandarin.n.05', 'synonyms': ['mandarin_orange'], 'def': 'a somewhat flat reddish-orange loose skinned citrus of China', 'name': 'mandarin_orange'}, {'frequency': 'c', 'id': 679, 'synset': 'manger.n.01', 'synonyms': ['manger', 'trough'], 'def': 'a container (usually in a barn or stable) from which cattle or horses feed', 'name': 'manger'}, {'frequency': 'f', 'id': 680, 'synset': 'manhole.n.01', 'synonyms': ['manhole'], 'def': 'a hole (usually with a flush cover) through which a person can gain access to an underground structure', 'name': 'manhole'}, {'frequency': 'c', 'id': 681, 'synset': 'map.n.01', 'synonyms': ['map'], 'def': "a diagrammatic representation of the earth's surface (or part of it)", 'name': 'map'}, {'frequency': 'c', 'id': 682, 'synset': 'marker.n.03', 'synonyms': ['marker'], 'def': 'a writing implement for making a mark', 'name': 'marker'}, {'frequency': 'r', 'id': 683, 'synset': 'martini.n.01', 'synonyms': ['martini'], 'def': 'a cocktail made of gin (or vodka) with dry vermouth', 'name': 'martini'}, {'frequency': 'r', 'id': 684, 'synset': 'mascot.n.01', 'synonyms': ['mascot'], 'def': 'a person or animal that is adopted by a team or other group as a symbolic figure', 'name': 'mascot'}, {'frequency': 'c', 'id': 685, 'synset': 'mashed_potato.n.01', 'synonyms': ['mashed_potato'], 'def': 'potato that has been peeled and boiled and then mashed', 'name': 'mashed_potato'}, {'frequency': 'r', 'id': 686, 'synset': 'masher.n.02', 'synonyms': ['masher'], 'def': 'a kitchen utensil used for mashing (e.g. potatoes)', 'name': 'masher'}, {'frequency': 'f', 'id': 687, 'synset': 'mask.n.04', 'synonyms': ['mask', 'facemask'], 'def': 'a protective covering worn over the face', 'name': 'mask'}, {'frequency': 'f', 'id': 688, 'synset': 'mast.n.01', 'synonyms': ['mast'], 'def': 'a vertical spar for supporting sails', 'name': 'mast'}, {'frequency': 'c', 'id': 689, 'synset': 'mat.n.03', 'synonyms': ['mat_(gym_equipment)', 'gym_mat'], 'def': 'sports equipment consisting of a piece of thick padding on the floor for gymnastics', 'name': 'mat_(gym_equipment)'}, {'frequency': 'r', 'id': 690, 'synset': 'matchbox.n.01', 'synonyms': ['matchbox'], 'def': 'a box for holding matches', 'name': 'matchbox'}, {'frequency': 'f', 'id': 691, 'synset': 'mattress.n.01', 'synonyms': ['mattress'], 'def': 'a thick pad filled with resilient material used as a bed or part of a bed', 'name': 'mattress'}, {'frequency': 'c', 'id': 692, 'synset': 'measuring_cup.n.01', 'synonyms': ['measuring_cup'], 'def': 'graduated cup used to measure liquid or granular ingredients', 'name': 'measuring_cup'}, {'frequency': 'c', 'id': 693, 'synset': 'measuring_stick.n.01', 'synonyms': ['measuring_stick', 'ruler_(measuring_stick)', 'measuring_rod'], 'def': 'measuring instrument having a sequence of marks at regular intervals', 'name': 'measuring_stick'}, {'frequency': 'c', 'id': 694, 'synset': 'meatball.n.01', 'synonyms': ['meatball'], 'def': 'ground meat formed into a ball and fried or simmered in broth', 'name': 'meatball'}, {'frequency': 'c', 'id': 695, 'synset': 'medicine.n.02', 'synonyms': ['medicine'], 'def': 'something that treats or prevents or alleviates the symptoms of disease', 'name': 'medicine'}, {'frequency': 'r', 'id': 696, 'synset': 'melon.n.01', 'synonyms': ['melon'], 'def': 'fruit of the gourd family having a hard rind and sweet juicy flesh', 'name': 'melon'}, {'frequency': 'f', 'id': 697, 'synset': 'microphone.n.01', 'synonyms': ['microphone'], 'def': 'device for converting sound waves into electrical energy', 'name': 'microphone'}, {'frequency': 'r', 'id': 698, 'synset': 'microscope.n.01', 'synonyms': ['microscope'], 'def': 'magnifier of the image of small objects', 'name': 'microscope'}, {'frequency': 'f', 'id': 699, 'synset': 'microwave.n.02', 'synonyms': ['microwave_oven'], 'def': 'kitchen appliance that cooks food by passing an electromagnetic wave through it', 'name': 'microwave_oven'}, {'frequency': 'r', 'id': 700, 'synset': 'milestone.n.01', 'synonyms': ['milestone', 'milepost'], 'def': 'stone post at side of a road to show distances', 'name': 'milestone'}, {'frequency': 'c', 'id': 701, 'synset': 'milk.n.01', 'synonyms': ['milk'], 'def': 'a white nutritious liquid secreted by mammals and used as food by human beings', 'name': 'milk'}, {'frequency': 'f', 'id': 702, 'synset': 'minivan.n.01', 'synonyms': ['minivan'], 'def': 'a small box-shaped passenger van', 'name': 'minivan'}, {'frequency': 'r', 'id': 703, 'synset': 'mint.n.05', 'synonyms': ['mint_candy'], 'def': 'a candy that is flavored with a mint oil', 'name': 'mint_candy'}, {'frequency': 'f', 'id': 704, 'synset': 'mirror.n.01', 'synonyms': ['mirror'], 'def': 'polished surface that forms images by reflecting light', 'name': 'mirror'}, {'frequency': 'c', 'id': 705, 'synset': 'mitten.n.01', 'synonyms': ['mitten'], 'def': 'glove that encases the thumb separately and the other four fingers together', 'name': 'mitten'}, {'frequency': 'c', 'id': 706, 'synset': 'mixer.n.04', 'synonyms': ['mixer_(kitchen_tool)', 'stand_mixer'], 'def': 'a kitchen utensil that is used for mixing foods', 'name': 'mixer_(kitchen_tool)'}, {'frequency': 'c', 'id': 707, 'synset': 'money.n.03', 'synonyms': ['money'], 'def': 'the official currency issued by a government or national bank', 'name': 'money'}, {'frequency': 'f', 'id': 708, 'synset': 'monitor.n.04', 'synonyms': ['monitor_(computer_equipment) computer_monitor'], 'def': 'a computer monitor', 'name': 'monitor_(computer_equipment) computer_monitor'}, {'frequency': 'c', 'id': 709, 'synset': 'monkey.n.01', 'synonyms': ['monkey'], 'def': 'any of various long-tailed primates', 'name': 'monkey'}, {'frequency': 'f', 'id': 710, 'synset': 'motor.n.01', 'synonyms': ['motor'], 'def': 'machine that converts other forms of energy into mechanical energy and so imparts motion', 'name': 'motor'}, {'frequency': 'f', 'id': 711, 'synset': 'motor_scooter.n.01', 'synonyms': ['motor_scooter', 'scooter'], 'def': 'a wheeled vehicle with small wheels and a low-powered engine', 'name': 'motor_scooter'}, {'frequency': 'r', 'id': 712, 'synset': 'motor_vehicle.n.01', 'synonyms': ['motor_vehicle', 'automotive_vehicle'], 'def': 'a self-propelled wheeled vehicle that does not run on rails', 'name': 'motor_vehicle'}, {'frequency': 'r', 'id': 713, 'synset': 'motorboat.n.01', 'synonyms': ['motorboat', 'powerboat'], 'def': 'a boat propelled by an internal-combustion engine', 'name': 'motorboat'}, {'frequency': 'f', 'id': 714, 'synset': 'motorcycle.n.01', 'synonyms': ['motorcycle'], 'def': 'a motor vehicle with two wheels and a strong frame', 'name': 'motorcycle'}, {'frequency': 'f', 'id': 715, 'synset': 'mound.n.01', 'synonyms': ['mound_(baseball)', "pitcher's_mound"], 'def': '(baseball) the slight elevation on which the pitcher stands', 'name': 'mound_(baseball)'}, {'frequency': 'r', 'id': 716, 'synset': 'mouse.n.01', 'synonyms': ['mouse_(animal_rodent)'], 'def': 'a small rodent with pointed snouts and small ears on elongated bodies with slender usually hairless tails', 'name': 'mouse_(animal_rodent)'}, {'frequency': 'f', 'id': 717, 'synset': 'mouse.n.04', 'synonyms': ['mouse_(computer_equipment)', 'computer_mouse'], 'def': 'a computer input device that controls an on-screen pointer', 'name': 'mouse_(computer_equipment)'}, {'frequency': 'f', 'id': 718, 'synset': 'mousepad.n.01', 'synonyms': ['mousepad'], 'def': 'a small portable pad that provides an operating surface for a computer mouse', 'name': 'mousepad'}, {'frequency': 'c', 'id': 719, 'synset': 'muffin.n.01', 'synonyms': ['muffin'], 'def': 'a sweet quick bread baked in a cup-shaped pan', 'name': 'muffin'}, {'frequency': 'f', 'id': 720, 'synset': 'mug.n.04', 'synonyms': ['mug'], 'def': 'with handle and usually cylindrical', 'name': 'mug'}, {'frequency': 'f', 'id': 721, 'synset': 'mushroom.n.02', 'synonyms': ['mushroom'], 'def': 'a common mushroom', 'name': 'mushroom'}, {'frequency': 'r', 'id': 722, 'synset': 'music_stool.n.01', 'synonyms': ['music_stool', 'piano_stool'], 'def': 'a stool for piano players; usually adjustable in height', 'name': 'music_stool'}, {'frequency': 'r', 'id': 723, 'synset': 'musical_instrument.n.01', 'synonyms': ['musical_instrument', 'instrument_(musical)'], 'def': 'any of various devices or contrivances that can be used to produce musical tones or sounds', 'name': 'musical_instrument'}, {'frequency': 'r', 'id': 724, 'synset': 'nailfile.n.01', 'synonyms': ['nailfile'], 'def': 'a small flat file for shaping the nails', 'name': 'nailfile'}, {'frequency': 'r', 'id': 725, 'synset': 'nameplate.n.01', 'synonyms': ['nameplate'], 'def': 'a plate bearing a name', 'name': 'nameplate'}, {'frequency': 'f', 'id': 726, 'synset': 'napkin.n.01', 'synonyms': ['napkin', 'table_napkin', 'serviette'], 'def': 'a small piece of table linen or paper that is used to wipe the mouth and to cover the lap in order to protect clothing', 'name': 'napkin'}, {'frequency': 'r', 'id': 727, 'synset': 'neckerchief.n.01', 'synonyms': ['neckerchief'], 'def': 'a kerchief worn around the neck', 'name': 'neckerchief'}, {'frequency': 'f', 'id': 728, 'synset': 'necklace.n.01', 'synonyms': ['necklace'], 'def': 'jewelry consisting of a cord or chain (often bearing gems) worn about the neck as an ornament', 'name': 'necklace'}, {'frequency': 'f', 'id': 729, 'synset': 'necktie.n.01', 'synonyms': ['necktie', 'tie_(necktie)'], 'def': 'neckwear consisting of a long narrow piece of material worn under a collar and tied in knot at the front', 'name': 'necktie'}, {'frequency': 'r', 'id': 730, 'synset': 'needle.n.03', 'synonyms': ['needle'], 'def': 'a sharp pointed implement (usually metal)', 'name': 'needle'}, {'frequency': 'c', 'id': 731, 'synset': 'nest.n.01', 'synonyms': ['nest'], 'def': 'a structure in which animals lay eggs or give birth to their young', 'name': 'nest'}, {'frequency': 'r', 'id': 732, 'synset': 'newsstand.n.01', 'synonyms': ['newsstand'], 'def': 'a stall where newspapers and other periodicals are sold', 'name': 'newsstand'}, {'frequency': 'c', 'id': 733, 'synset': 'nightwear.n.01', 'synonyms': ['nightshirt', 'nightwear', 'sleepwear', 'nightclothes'], 'def': 'garments designed to be worn in bed', 'name': 'nightshirt'}, {'frequency': 'r', 'id': 734, 'synset': 'nosebag.n.01', 'synonyms': ['nosebag_(for_animals)', 'feedbag'], 'def': 'a canvas bag that is used to feed an animal (such as a horse); covers the muzzle and fastens at the top of the head', 'name': 'nosebag_(for_animals)'}, {'frequency': 'r', 'id': 735, 'synset': 'noseband.n.01', 'synonyms': ['noseband_(for_animals)', 'nosepiece_(for_animals)'], 'def': "a strap that is the part of a bridle that goes over the animal's nose", 'name': 'noseband_(for_animals)'}, {'frequency': 'f', 'id': 736, 'synset': 'notebook.n.01', 'synonyms': ['notebook'], 'def': 'a book with blank pages for recording notes or memoranda', 'name': 'notebook'}, {'frequency': 'c', 'id': 737, 'synset': 'notepad.n.01', 'synonyms': ['notepad'], 'def': 'a pad of paper for keeping notes', 'name': 'notepad'}, {'frequency': 'c', 'id': 738, 'synset': 'nut.n.03', 'synonyms': ['nut'], 'def': 'a small metal block (usually square or hexagonal) with internal screw thread to be fitted onto a bolt', 'name': 'nut'}, {'frequency': 'r', 'id': 739, 'synset': 'nutcracker.n.01', 'synonyms': ['nutcracker'], 'def': 'a hand tool used to crack nuts open', 'name': 'nutcracker'}, {'frequency': 'c', 'id': 740, 'synset': 'oar.n.01', 'synonyms': ['oar'], 'def': 'an implement used to propel or steer a boat', 'name': 'oar'}, {'frequency': 'r', 'id': 741, 'synset': 'octopus.n.01', 'synonyms': ['octopus_(food)'], 'def': 'tentacles of octopus prepared as food', 'name': 'octopus_(food)'}, {'frequency': 'r', 'id': 742, 'synset': 'octopus.n.02', 'synonyms': ['octopus_(animal)'], 'def': 'bottom-living cephalopod having a soft oval body with eight long tentacles', 'name': 'octopus_(animal)'}, {'frequency': 'c', 'id': 743, 'synset': 'oil_lamp.n.01', 'synonyms': ['oil_lamp', 'kerosene_lamp', 'kerosine_lamp'], 'def': 'a lamp that burns oil (as kerosine) for light', 'name': 'oil_lamp'}, {'frequency': 'c', 'id': 744, 'synset': 'olive_oil.n.01', 'synonyms': ['olive_oil'], 'def': 'oil from olives', 'name': 'olive_oil'}, {'frequency': 'r', 'id': 745, 'synset': 'omelet.n.01', 'synonyms': ['omelet', 'omelette'], 'def': 'beaten eggs cooked until just set; may be folded around e.g. ham or cheese or jelly', 'name': 'omelet'}, {'frequency': 'f', 'id': 746, 'synset': 'onion.n.01', 'synonyms': ['onion'], 'def': 'the bulb of an onion plant', 'name': 'onion'}, {'frequency': 'f', 'id': 747, 'synset': 'orange.n.01', 'synonyms': ['orange_(fruit)'], 'def': 'orange (FRUIT of an orange tree)', 'name': 'orange_(fruit)'}, {'frequency': 'c', 'id': 748, 'synset': 'orange_juice.n.01', 'synonyms': ['orange_juice'], 'def': 'bottled or freshly squeezed juice of oranges', 'name': 'orange_juice'}, {'frequency': 'r', 'id': 749, 'synset': 'oregano.n.01', 'synonyms': ['oregano', 'marjoram'], 'def': 'aromatic Eurasian perennial herb used in cooking and baking', 'name': 'oregano'}, {'frequency': 'c', 'id': 750, 'synset': 'ostrich.n.02', 'synonyms': ['ostrich'], 'def': 'fast-running African flightless bird with two-toed feet; largest living bird', 'name': 'ostrich'}, {'frequency': 'c', 'id': 751, 'synset': 'ottoman.n.03', 'synonyms': ['ottoman', 'pouf', 'pouffe', 'hassock'], 'def': 'thick cushion used as a seat', 'name': 'ottoman'}, {'frequency': 'c', 'id': 752, 'synset': 'overall.n.01', 'synonyms': ['overalls_(clothing)'], 'def': 'work clothing consisting of denim trousers usually with a bib and shoulder straps', 'name': 'overalls_(clothing)'}, {'frequency': 'c', 'id': 753, 'synset': 'owl.n.01', 'synonyms': ['owl'], 'def': 'nocturnal bird of prey with hawk-like beak and claws and large head with front-facing eyes', 'name': 'owl'}, {'frequency': 'c', 'id': 754, 'synset': 'packet.n.03', 'synonyms': ['packet'], 'def': 'a small package or bundle', 'name': 'packet'}, {'frequency': 'r', 'id': 755, 'synset': 'pad.n.03', 'synonyms': ['inkpad', 'inking_pad', 'stamp_pad'], 'def': 'absorbent material saturated with ink used to transfer ink evenly to a rubber stamp', 'name': 'inkpad'}, {'frequency': 'c', 'id': 756, 'synset': 'pad.n.04', 'synonyms': ['pad'], 'def': 'a flat mass of soft material used for protection, stuffing, or comfort', 'name': 'pad'}, {'frequency': 'c', 'id': 757, 'synset': 'paddle.n.04', 'synonyms': ['paddle', 'boat_paddle'], 'def': 'a short light oar used without an oarlock to propel a canoe or small boat', 'name': 'paddle'}, {'frequency': 'c', 'id': 758, 'synset': 'padlock.n.01', 'synonyms': ['padlock'], 'def': 'a detachable, portable lock', 'name': 'padlock'}, {'frequency': 'r', 'id': 759, 'synset': 'paintbox.n.01', 'synonyms': ['paintbox'], 'def': "a box containing a collection of cubes or tubes of artists' paint", 'name': 'paintbox'}, {'frequency': 'c', 'id': 760, 'synset': 'paintbrush.n.01', 'synonyms': ['paintbrush'], 'def': 'a brush used as an applicator to apply paint', 'name': 'paintbrush'}, {'frequency': 'f', 'id': 761, 'synset': 'painting.n.01', 'synonyms': ['painting'], 'def': 'graphic art consisting of an artistic composition made by applying paints to a surface', 'name': 'painting'}, {'frequency': 'c', 'id': 762, 'synset': 'pajama.n.02', 'synonyms': ['pajamas', 'pyjamas'], 'def': 'loose-fitting nightclothes worn for sleeping or lounging', 'name': 'pajamas'}, {'frequency': 'c', 'id': 763, 'synset': 'palette.n.02', 'synonyms': ['palette', 'pallet'], 'def': 'board that provides a flat surface on which artists mix paints and the range of colors used', 'name': 'palette'}, {'frequency': 'f', 'id': 764, 'synset': 'pan.n.01', 'synonyms': ['pan_(for_cooking)', 'cooking_pan'], 'def': 'cooking utensil consisting of a wide metal vessel', 'name': 'pan_(for_cooking)'}, {'frequency': 'r', 'id': 765, 'synset': 'pan.n.03', 'synonyms': ['pan_(metal_container)'], 'def': 'shallow container made of metal', 'name': 'pan_(metal_container)'}, {'frequency': 'c', 'id': 766, 'synset': 'pancake.n.01', 'synonyms': ['pancake'], 'def': 'a flat cake of thin batter fried on both sides on a griddle', 'name': 'pancake'}, {'frequency': 'r', 'id': 767, 'synset': 'pantyhose.n.01', 'synonyms': ['pantyhose'], 'def': "a woman's tights consisting of underpants and stockings", 'name': 'pantyhose'}, {'frequency': 'r', 'id': 768, 'synset': 'papaya.n.02', 'synonyms': ['papaya'], 'def': 'large oval melon-like tropical fruit with yellowish flesh', 'name': 'papaya'}, {'frequency': 'r', 'id': 769, 'synset': 'paper_clip.n.01', 'synonyms': ['paperclip'], 'def': 'a wire or plastic clip for holding sheets of paper together', 'name': 'paperclip'}, {'frequency': 'f', 'id': 770, 'synset': 'paper_plate.n.01', 'synonyms': ['paper_plate'], 'def': 'a disposable plate made of cardboard', 'name': 'paper_plate'}, {'frequency': 'f', 'id': 771, 'synset': 'paper_towel.n.01', 'synonyms': ['paper_towel'], 'def': 'a disposable towel made of absorbent paper', 'name': 'paper_towel'}, {'frequency': 'r', 'id': 772, 'synset': 'paperback_book.n.01', 'synonyms': ['paperback_book', 'paper-back_book', 'softback_book', 'soft-cover_book'], 'def': 'a book with paper covers', 'name': 'paperback_book'}, {'frequency': 'r', 'id': 773, 'synset': 'paperweight.n.01', 'synonyms': ['paperweight'], 'def': 'a weight used to hold down a stack of papers', 'name': 'paperweight'}, {'frequency': 'c', 'id': 774, 'synset': 'parachute.n.01', 'synonyms': ['parachute'], 'def': 'rescue equipment consisting of a device that fills with air and retards your fall', 'name': 'parachute'}, {'frequency': 'r', 'id': 775, 'synset': 'parakeet.n.01', 'synonyms': ['parakeet', 'parrakeet', 'parroket', 'paraquet', 'paroquet', 'parroquet'], 'def': 'any of numerous small slender long-tailed parrots', 'name': 'parakeet'}, {'frequency': 'c', 'id': 776, 'synset': 'parasail.n.01', 'synonyms': ['parasail_(sports)'], 'def': 'parachute that will lift a person up into the air when it is towed by a motorboat or a car', 'name': 'parasail_(sports)'}, {'frequency': 'r', 'id': 777, 'synset': 'parchment.n.01', 'synonyms': ['parchment'], 'def': 'a superior paper resembling sheepskin', 'name': 'parchment'}, {'frequency': 'r', 'id': 778, 'synset': 'parka.n.01', 'synonyms': ['parka', 'anorak'], 'def': "a kind of heavy jacket (`windcheater' is a British term)", 'name': 'parka'}, {'frequency': 'f', 'id': 779, 'synset': 'parking_meter.n.01', 'synonyms': ['parking_meter'], 'def': 'a coin-operated timer located next to a parking space', 'name': 'parking_meter'}, {'frequency': 'c', 'id': 780, 'synset': 'parrot.n.01', 'synonyms': ['parrot'], 'def': 'usually brightly colored tropical birds with short hooked beaks and the ability to mimic sounds', 'name': 'parrot'}, {'frequency': 'c', 'id': 781, 'synset': 'passenger_car.n.01', 'synonyms': ['passenger_car_(part_of_a_train)', 'coach_(part_of_a_train)'], 'def': 'a railcar where passengers ride', 'name': 'passenger_car_(part_of_a_train)'}, {'frequency': 'r', 'id': 782, 'synset': 'passenger_ship.n.01', 'synonyms': ['passenger_ship'], 'def': 'a ship built to carry passengers', 'name': 'passenger_ship'}, {'frequency': 'r', 'id': 783, 'synset': 'passport.n.02', 'synonyms': ['passport'], 'def': 'a document issued by a country to a citizen allowing that person to travel abroad and re-enter the home country', 'name': 'passport'}, {'frequency': 'f', 'id': 784, 'synset': 'pastry.n.02', 'synonyms': ['pastry'], 'def': 'any of various baked foods made of dough or batter', 'name': 'pastry'}, {'frequency': 'r', 'id': 785, 'synset': 'patty.n.01', 'synonyms': ['patty_(food)'], 'def': 'small flat mass of chopped food', 'name': 'patty_(food)'}, {'frequency': 'c', 'id': 786, 'synset': 'pea.n.01', 'synonyms': ['pea_(food)'], 'def': 'seed of a pea plant used for food', 'name': 'pea_(food)'}, {'frequency': 'c', 'id': 787, 'synset': 'peach.n.03', 'synonyms': ['peach'], 'def': 'downy juicy fruit with sweet yellowish or whitish flesh', 'name': 'peach'}, {'frequency': 'c', 'id': 788, 'synset': 'peanut_butter.n.01', 'synonyms': ['peanut_butter'], 'def': 'a spread made from ground peanuts', 'name': 'peanut_butter'}, {'frequency': 'c', 'id': 789, 'synset': 'pear.n.01', 'synonyms': ['pear'], 'def': 'sweet juicy gritty-textured fruit available in many varieties', 'name': 'pear'}, {'frequency': 'r', 'id': 790, 'synset': 'peeler.n.03', 'synonyms': ['peeler_(tool_for_fruit_and_vegetables)'], 'def': 'a device for peeling vegetables or fruits', 'name': 'peeler_(tool_for_fruit_and_vegetables)'}, {'frequency': 'r', 'id': 791, 'synset': 'pegboard.n.01', 'synonyms': ['pegboard'], 'def': 'a board perforated with regularly spaced holes into which pegs can be fitted', 'name': 'pegboard'}, {'frequency': 'c', 'id': 792, 'synset': 'pelican.n.01', 'synonyms': ['pelican'], 'def': 'large long-winged warm-water seabird having a large bill with a distensible pouch for fish', 'name': 'pelican'}, {'frequency': 'f', 'id': 793, 'synset': 'pen.n.01', 'synonyms': ['pen'], 'def': 'a writing implement with a point from which ink flows', 'name': 'pen'}, {'frequency': 'c', 'id': 794, 'synset': 'pencil.n.01', 'synonyms': ['pencil'], 'def': 'a thin cylindrical pointed writing implement made of wood and graphite', 'name': 'pencil'}, {'frequency': 'r', 'id': 795, 'synset': 'pencil_box.n.01', 'synonyms': ['pencil_box', 'pencil_case'], 'def': 'a box for holding pencils', 'name': 'pencil_box'}, {'frequency': 'r', 'id': 796, 'synset': 'pencil_sharpener.n.01', 'synonyms': ['pencil_sharpener'], 'def': 'a rotary implement for sharpening the point on pencils', 'name': 'pencil_sharpener'}, {'frequency': 'r', 'id': 797, 'synset': 'pendulum.n.01', 'synonyms': ['pendulum'], 'def': 'an apparatus consisting of an object mounted so that it swings freely under the influence of gravity', 'name': 'pendulum'}, {'frequency': 'c', 'id': 798, 'synset': 'penguin.n.01', 'synonyms': ['penguin'], 'def': 'short-legged flightless birds of cold southern regions having webbed feet and wings modified as flippers', 'name': 'penguin'}, {'frequency': 'r', 'id': 799, 'synset': 'pennant.n.02', 'synonyms': ['pennant'], 'def': 'a flag longer than it is wide (and often tapering)', 'name': 'pennant'}, {'frequency': 'r', 'id': 800, 'synset': 'penny.n.02', 'synonyms': ['penny_(coin)'], 'def': 'a coin worth one-hundredth of the value of the basic unit', 'name': 'penny_(coin)'}, {'frequency': 'c', 'id': 801, 'synset': 'pepper.n.03', 'synonyms': ['pepper', 'peppercorn'], 'def': 'pungent seasoning from the berry of the common pepper plant; whole or ground', 'name': 'pepper'}, {'frequency': 'c', 'id': 802, 'synset': 'pepper_mill.n.01', 'synonyms': ['pepper_mill', 'pepper_grinder'], 'def': 'a mill for grinding pepper', 'name': 'pepper_mill'}, {'frequency': 'c', 'id': 803, 'synset': 'perfume.n.02', 'synonyms': ['perfume'], 'def': 'a toiletry that emits and diffuses a fragrant odor', 'name': 'perfume'}, {'frequency': 'r', 'id': 804, 'synset': 'persimmon.n.02', 'synonyms': ['persimmon'], 'def': 'orange fruit resembling a plum; edible when fully ripe', 'name': 'persimmon'}, {'frequency': 'f', 'id': 805, 'synset': 'person.n.01', 'synonyms': ['baby', 'child', 'boy', 'girl', 'man', 'woman', 'person', 'human'], 'def': 'a human being', 'name': 'baby'}, {'frequency': 'r', 'id': 806, 'synset': 'pet.n.01', 'synonyms': ['pet'], 'def': 'a domesticated animal kept for companionship or amusement', 'name': 'pet'}, {'frequency': 'r', 'id': 807, 'synset': 'petfood.n.01', 'synonyms': ['petfood', 'pet-food'], 'def': 'food prepared for animal pets', 'name': 'petfood'}, {'frequency': 'r', 'id': 808, 'synset': 'pew.n.01', 'synonyms': ['pew_(church_bench)', 'church_bench'], 'def': 'long bench with backs; used in church by the congregation', 'name': 'pew_(church_bench)'}, {'frequency': 'r', 'id': 809, 'synset': 'phonebook.n.01', 'synonyms': ['phonebook', 'telephone_book', 'telephone_directory'], 'def': 'a directory containing an alphabetical list of telephone subscribers and their telephone numbers', 'name': 'phonebook'}, {'frequency': 'c', 'id': 810, 'synset': 'phonograph_record.n.01', 'synonyms': ['phonograph_record', 'phonograph_recording', 'record_(phonograph_recording)'], 'def': 'sound recording consisting of a typically black disk with a continuous groove', 'name': 'phonograph_record'}, {'frequency': 'c', 'id': 811, 'synset': 'piano.n.01', 'synonyms': ['piano'], 'def': 'a keyboard instrument that is played by depressing keys that cause hammers to strike tuned strings and produce sounds', 'name': 'piano'}, {'frequency': 'f', 'id': 812, 'synset': 'pickle.n.01', 'synonyms': ['pickle'], 'def': 'vegetables (especially cucumbers) preserved in brine or vinegar', 'name': 'pickle'}, {'frequency': 'f', 'id': 813, 'synset': 'pickup.n.01', 'synonyms': ['pickup_truck'], 'def': 'a light truck with an open body and low sides and a tailboard', 'name': 'pickup_truck'}, {'frequency': 'c', 'id': 814, 'synset': 'pie.n.01', 'synonyms': ['pie'], 'def': 'dish baked in pastry-lined pan often with a pastry top', 'name': 'pie'}, {'frequency': 'c', 'id': 815, 'synset': 'pigeon.n.01', 'synonyms': ['pigeon'], 'def': 'wild and domesticated birds having a heavy body and short legs', 'name': 'pigeon'}, {'frequency': 'r', 'id': 816, 'synset': 'piggy_bank.n.01', 'synonyms': ['piggy_bank', 'penny_bank'], 'def': "a child's coin bank (often shaped like a pig)", 'name': 'piggy_bank'}, {'frequency': 'f', 'id': 817, 'synset': 'pillow.n.01', 'synonyms': ['pillow'], 'def': 'a cushion to support the head of a sleeping person', 'name': 'pillow'}, {'frequency': 'r', 'id': 818, 'synset': 'pin.n.09', 'synonyms': ['pin_(non_jewelry)'], 'def': 'a small slender (often pointed) piece of wood or metal used to support or fasten or attach things', 'name': 'pin_(non_jewelry)'}, {'frequency': 'f', 'id': 819, 'synset': 'pineapple.n.02', 'synonyms': ['pineapple'], 'def': 'large sweet fleshy tropical fruit with a tuft of stiff leaves', 'name': 'pineapple'}, {'frequency': 'c', 'id': 820, 'synset': 'pinecone.n.01', 'synonyms': ['pinecone'], 'def': 'the seed-producing cone of a pine tree', 'name': 'pinecone'}, {'frequency': 'r', 'id': 821, 'synset': 'ping-pong_ball.n.01', 'synonyms': ['ping-pong_ball'], 'def': 'light hollow ball used in playing table tennis', 'name': 'ping-pong_ball'}, {'frequency': 'r', 'id': 822, 'synset': 'pinwheel.n.03', 'synonyms': ['pinwheel'], 'def': 'a toy consisting of vanes of colored paper or plastic that is pinned to a stick and spins when it is pointed into the wind', 'name': 'pinwheel'}, {'frequency': 'r', 'id': 823, 'synset': 'pipe.n.01', 'synonyms': ['tobacco_pipe'], 'def': 'a tube with a small bowl at one end; used for smoking tobacco', 'name': 'tobacco_pipe'}, {'frequency': 'f', 'id': 824, 'synset': 'pipe.n.02', 'synonyms': ['pipe', 'piping'], 'def': 'a long tube made of metal or plastic that is used to carry water or oil or gas etc.', 'name': 'pipe'}, {'frequency': 'r', 'id': 825, 'synset': 'pistol.n.01', 'synonyms': ['pistol', 'handgun'], 'def': 'a firearm that is held and fired with one hand', 'name': 'pistol'}, {'frequency': 'r', 'id': 826, 'synset': 'pita.n.01', 'synonyms': ['pita_(bread)', 'pocket_bread'], 'def': 'usually small round bread that can open into a pocket for filling', 'name': 'pita_(bread)'}, {'frequency': 'f', 'id': 827, 'synset': 'pitcher.n.02', 'synonyms': ['pitcher_(vessel_for_liquid)', 'ewer'], 'def': 'an open vessel with a handle and a spout for pouring', 'name': 'pitcher_(vessel_for_liquid)'}, {'frequency': 'r', 'id': 828, 'synset': 'pitchfork.n.01', 'synonyms': ['pitchfork'], 'def': 'a long-handled hand tool with sharp widely spaced prongs for lifting and pitching hay', 'name': 'pitchfork'}, {'frequency': 'f', 'id': 829, 'synset': 'pizza.n.01', 'synonyms': ['pizza'], 'def': 'Italian open pie made of thin bread dough spread with a spiced mixture of e.g. tomato sauce and cheese', 'name': 'pizza'}, {'frequency': 'f', 'id': 830, 'synset': 'place_mat.n.01', 'synonyms': ['place_mat'], 'def': 'a mat placed on a table for an individual place setting', 'name': 'place_mat'}, {'frequency': 'f', 'id': 831, 'synset': 'plate.n.04', 'synonyms': ['plate'], 'def': 'dish on which food is served or from which food is eaten', 'name': 'plate'}, {'frequency': 'c', 'id': 832, 'synset': 'platter.n.01', 'synonyms': ['platter'], 'def': 'a large shallow dish used for serving food', 'name': 'platter'}, {'frequency': 'r', 'id': 833, 'synset': 'playing_card.n.01', 'synonyms': ['playing_card'], 'def': 'one of a pack of cards that are used to play card games', 'name': 'playing_card'}, {'frequency': 'r', 'id': 834, 'synset': 'playpen.n.01', 'synonyms': ['playpen'], 'def': 'a portable enclosure in which babies may be left to play', 'name': 'playpen'}, {'frequency': 'c', 'id': 835, 'synset': 'pliers.n.01', 'synonyms': ['pliers', 'plyers'], 'def': 'a gripping hand tool with two hinged arms and (usually) serrated jaws', 'name': 'pliers'}, {'frequency': 'r', 'id': 836, 'synset': 'plow.n.01', 'synonyms': ['plow_(farm_equipment)', 'plough_(farm_equipment)'], 'def': 'a farm tool having one or more heavy blades to break the soil and cut a furrow prior to sowing', 'name': 'plow_(farm_equipment)'}, {'frequency': 'r', 'id': 837, 'synset': 'pocket_watch.n.01', 'synonyms': ['pocket_watch'], 'def': 'a watch that is carried in a small watch pocket', 'name': 'pocket_watch'}, {'frequency': 'c', 'id': 838, 'synset': 'pocketknife.n.01', 'synonyms': ['pocketknife'], 'def': 'a knife with a blade that folds into the handle; suitable for carrying in the pocket', 'name': 'pocketknife'}, {'frequency': 'c', 'id': 839, 'synset': 'poker.n.01', 'synonyms': ['poker_(fire_stirring_tool)', 'stove_poker', 'fire_hook'], 'def': 'fire iron consisting of a metal rod with a handle; used to stir a fire', 'name': 'poker_(fire_stirring_tool)'}, {'frequency': 'f', 'id': 840, 'synset': 'pole.n.01', 'synonyms': ['pole', 'post'], 'def': 'a long (usually round) rod of wood or metal or plastic', 'name': 'pole'}, {'frequency': 'r', 'id': 841, 'synset': 'police_van.n.01', 'synonyms': ['police_van', 'police_wagon', 'paddy_wagon', 'patrol_wagon'], 'def': 'van used by police to transport prisoners', 'name': 'police_van'}, {'frequency': 'f', 'id': 842, 'synset': 'polo_shirt.n.01', 'synonyms': ['polo_shirt', 'sport_shirt'], 'def': 'a shirt with short sleeves designed for comfort and casual wear', 'name': 'polo_shirt'}, {'frequency': 'r', 'id': 843, 'synset': 'poncho.n.01', 'synonyms': ['poncho'], 'def': 'a blanket-like cloak with a hole in the center for the head', 'name': 'poncho'}, {'frequency': 'c', 'id': 844, 'synset': 'pony.n.05', 'synonyms': ['pony'], 'def': 'any of various breeds of small gentle horses usually less than five feet high at the shoulder', 'name': 'pony'}, {'frequency': 'r', 'id': 845, 'synset': 'pool_table.n.01', 'synonyms': ['pool_table', 'billiard_table', 'snooker_table'], 'def': 'game equipment consisting of a heavy table on which pool is played', 'name': 'pool_table'}, {'frequency': 'f', 'id': 846, 'synset': 'pop.n.02', 'synonyms': ['pop_(soda)', 'soda_(pop)', 'tonic', 'soft_drink'], 'def': 'a sweet drink containing carbonated water and flavoring', 'name': 'pop_(soda)'}, {'frequency': 'r', 'id': 847, 'synset': 'portrait.n.02', 'synonyms': ['portrait', 'portrayal'], 'def': 'any likeness of a person, in any medium', 'name': 'portrait'}, {'frequency': 'c', 'id': 848, 'synset': 'postbox.n.01', 'synonyms': ['postbox_(public)', 'mailbox_(public)'], 'def': 'public box for deposit of mail', 'name': 'postbox_(public)'}, {'frequency': 'c', 'id': 849, 'synset': 'postcard.n.01', 'synonyms': ['postcard', 'postal_card', 'mailing-card'], 'def': 'a card for sending messages by post without an envelope', 'name': 'postcard'}, {'frequency': 'f', 'id': 850, 'synset': 'poster.n.01', 'synonyms': ['poster', 'placard'], 'def': 'a sign posted in a public place as an advertisement', 'name': 'poster'}, {'frequency': 'f', 'id': 851, 'synset': 'pot.n.01', 'synonyms': ['pot'], 'def': 'metal or earthenware cooking vessel that is usually round and deep; often has a handle and lid', 'name': 'pot'}, {'frequency': 'f', 'id': 852, 'synset': 'pot.n.04', 'synonyms': ['flowerpot'], 'def': 'a container in which plants are cultivated', 'name': 'flowerpot'}, {'frequency': 'f', 'id': 853, 'synset': 'potato.n.01', 'synonyms': ['potato'], 'def': 'an edible tuber native to South America', 'name': 'potato'}, {'frequency': 'c', 'id': 854, 'synset': 'potholder.n.01', 'synonyms': ['potholder'], 'def': 'an insulated pad for holding hot pots', 'name': 'potholder'}, {'frequency': 'c', 'id': 855, 'synset': 'pottery.n.01', 'synonyms': ['pottery', 'clayware'], 'def': 'ceramic ware made from clay and baked in a kiln', 'name': 'pottery'}, {'frequency': 'c', 'id': 856, 'synset': 'pouch.n.01', 'synonyms': ['pouch'], 'def': 'a small or medium size container for holding or carrying things', 'name': 'pouch'}, {'frequency': 'r', 'id': 857, 'synset': 'power_shovel.n.01', 'synonyms': ['power_shovel', 'excavator', 'digger'], 'def': 'a machine for excavating', 'name': 'power_shovel'}, {'frequency': 'c', 'id': 858, 'synset': 'prawn.n.01', 'synonyms': ['prawn', 'shrimp'], 'def': 'any of various edible decapod crustaceans', 'name': 'prawn'}, {'frequency': 'f', 'id': 859, 'synset': 'printer.n.03', 'synonyms': ['printer', 'printing_machine'], 'def': 'a machine that prints', 'name': 'printer'}, {'frequency': 'c', 'id': 860, 'synset': 'projectile.n.01', 'synonyms': ['projectile_(weapon)', 'missile'], 'def': 'a weapon that is forcibly thrown or projected at a targets', 'name': 'projectile_(weapon)'}, {'frequency': 'c', 'id': 861, 'synset': 'projector.n.02', 'synonyms': ['projector'], 'def': 'an optical instrument that projects an enlarged image onto a screen', 'name': 'projector'}, {'frequency': 'f', 'id': 862, 'synset': 'propeller.n.01', 'synonyms': ['propeller', 'propellor'], 'def': 'a mechanical device that rotates to push against air or water', 'name': 'propeller'}, {'frequency': 'r', 'id': 863, 'synset': 'prune.n.01', 'synonyms': ['prune'], 'def': 'dried plum', 'name': 'prune'}, {'frequency': 'r', 'id': 864, 'synset': 'pudding.n.01', 'synonyms': ['pudding'], 'def': 'any of various soft thick unsweetened baked dishes', 'name': 'pudding'}, {'frequency': 'r', 'id': 865, 'synset': 'puffer.n.02', 'synonyms': ['puffer_(fish)', 'pufferfish', 'blowfish', 'globefish'], 'def': 'fishes whose elongated spiny body can inflate itself with water or air to form a globe', 'name': 'puffer_(fish)'}, {'frequency': 'r', 'id': 866, 'synset': 'puffin.n.01', 'synonyms': ['puffin'], 'def': 'seabirds having short necks and brightly colored compressed bills', 'name': 'puffin'}, {'frequency': 'r', 'id': 867, 'synset': 'pug.n.01', 'synonyms': ['pug-dog'], 'def': 'small compact smooth-coated breed of Asiatic origin having a tightly curled tail and broad flat wrinkled muzzle', 'name': 'pug-dog'}, {'frequency': 'c', 'id': 868, 'synset': 'pumpkin.n.02', 'synonyms': ['pumpkin'], 'def': 'usually large pulpy deep-yellow round fruit of the squash family maturing in late summer or early autumn', 'name': 'pumpkin'}, {'frequency': 'r', 'id': 869, 'synset': 'punch.n.03', 'synonyms': ['puncher'], 'def': 'a tool for making holes or indentations', 'name': 'puncher'}, {'frequency': 'r', 'id': 870, 'synset': 'puppet.n.01', 'synonyms': ['puppet', 'marionette'], 'def': 'a small figure of a person operated from above with strings by a puppeteer', 'name': 'puppet'}, {'frequency': 'r', 'id': 871, 'synset': 'puppy.n.01', 'synonyms': ['puppy'], 'def': 'a young dog', 'name': 'puppy'}, {'frequency': 'r', 'id': 872, 'synset': 'quesadilla.n.01', 'synonyms': ['quesadilla'], 'def': 'a tortilla that is filled with cheese and heated', 'name': 'quesadilla'}, {'frequency': 'r', 'id': 873, 'synset': 'quiche.n.02', 'synonyms': ['quiche'], 'def': 'a tart filled with rich unsweetened custard; often contains other ingredients (as cheese or ham or seafood or vegetables)', 'name': 'quiche'}, {'frequency': 'f', 'id': 874, 'synset': 'quilt.n.01', 'synonyms': ['quilt', 'comforter'], 'def': 'bedding made of two layers of cloth filled with stuffing and stitched together', 'name': 'quilt'}, {'frequency': 'c', 'id': 875, 'synset': 'rabbit.n.01', 'synonyms': ['rabbit'], 'def': 'any of various burrowing animals of the family Leporidae having long ears and short tails', 'name': 'rabbit'}, {'frequency': 'r', 'id': 876, 'synset': 'racer.n.02', 'synonyms': ['race_car', 'racing_car'], 'def': 'a fast car that competes in races', 'name': 'race_car'}, {'frequency': 'c', 'id': 877, 'synset': 'racket.n.04', 'synonyms': ['racket', 'racquet'], 'def': 'a sports implement used to strike a ball in various games', 'name': 'racket'}, {'frequency': 'r', 'id': 878, 'synset': 'radar.n.01', 'synonyms': ['radar'], 'def': 'measuring instrument in which the echo of a pulse of microwave radiation is used to detect and locate distant objects', 'name': 'radar'}, {'frequency': 'c', 'id': 879, 'synset': 'radiator.n.03', 'synonyms': ['radiator'], 'def': 'a mechanism consisting of a metal honeycomb through which hot fluids circulate', 'name': 'radiator'}, {'frequency': 'c', 'id': 880, 'synset': 'radio_receiver.n.01', 'synonyms': ['radio_receiver', 'radio_set', 'radio', 'tuner_(radio)'], 'def': 'an electronic receiver that detects and demodulates and amplifies transmitted radio signals', 'name': 'radio_receiver'}, {'frequency': 'c', 'id': 881, 'synset': 'radish.n.03', 'synonyms': ['radish', 'daikon'], 'def': 'pungent edible root of any of various cultivated radish plants', 'name': 'radish'}, {'frequency': 'c', 'id': 882, 'synset': 'raft.n.01', 'synonyms': ['raft'], 'def': 'a flat float (usually made of logs or planks) that can be used for transport or as a platform for swimmers', 'name': 'raft'}, {'frequency': 'r', 'id': 883, 'synset': 'rag_doll.n.01', 'synonyms': ['rag_doll'], 'def': 'a cloth doll that is stuffed and (usually) painted', 'name': 'rag_doll'}, {'frequency': 'c', 'id': 884, 'synset': 'raincoat.n.01', 'synonyms': ['raincoat', 'waterproof_jacket'], 'def': 'a water-resistant coat', 'name': 'raincoat'}, {'frequency': 'c', 'id': 885, 'synset': 'ram.n.05', 'synonyms': ['ram_(animal)'], 'def': 'uncastrated adult male sheep', 'name': 'ram_(animal)'}, {'frequency': 'c', 'id': 886, 'synset': 'raspberry.n.02', 'synonyms': ['raspberry'], 'def': 'red or black edible aggregate berries usually smaller than the related blackberries', 'name': 'raspberry'}, {'frequency': 'r', 'id': 887, 'synset': 'rat.n.01', 'synonyms': ['rat'], 'def': 'any of various long-tailed rodents similar to but larger than a mouse', 'name': 'rat'}, {'frequency': 'c', 'id': 888, 'synset': 'razorblade.n.01', 'synonyms': ['razorblade'], 'def': 'a blade that has very sharp edge', 'name': 'razorblade'}, {'frequency': 'c', 'id': 889, 'synset': 'reamer.n.01', 'synonyms': ['reamer_(juicer)', 'juicer', 'juice_reamer'], 'def': 'a squeezer with a conical ridged center that is used for squeezing juice from citrus fruit', 'name': 'reamer_(juicer)'}, {'frequency': 'f', 'id': 890, 'synset': 'rearview_mirror.n.01', 'synonyms': ['rearview_mirror'], 'def': 'car mirror that reflects the view out of the rear window', 'name': 'rearview_mirror'}, {'frequency': 'c', 'id': 891, 'synset': 'receipt.n.02', 'synonyms': ['receipt'], 'def': 'an acknowledgment (usually tangible) that payment has been made', 'name': 'receipt'}, {'frequency': 'c', 'id': 892, 'synset': 'recliner.n.01', 'synonyms': ['recliner', 'reclining_chair', 'lounger_(chair)'], 'def': 'an armchair whose back can be lowered and foot can be raised to allow the sitter to recline in it', 'name': 'recliner'}, {'frequency': 'r', 'id': 893, 'synset': 'record_player.n.01', 'synonyms': ['record_player', 'phonograph_(record_player)', 'turntable'], 'def': 'machine in which rotating records cause a stylus to vibrate and the vibrations are amplified acoustically or electronically', 'name': 'record_player'}, {'frequency': 'r', 'id': 894, 'synset': 'red_cabbage.n.02', 'synonyms': ['red_cabbage'], 'def': 'compact head of purplish-red leaves', 'name': 'red_cabbage'}, {'frequency': 'f', 'id': 895, 'synset': 'reflector.n.01', 'synonyms': ['reflector'], 'def': 'device that reflects light, radiation, etc.', 'name': 'reflector'}, {'frequency': 'f', 'id': 896, 'synset': 'remote_control.n.01', 'synonyms': ['remote_control'], 'def': 'a device that can be used to control a machine or apparatus from a distance', 'name': 'remote_control'}, {'frequency': 'c', 'id': 897, 'synset': 'rhinoceros.n.01', 'synonyms': ['rhinoceros'], 'def': 'massive powerful herbivorous odd-toed ungulate of southeast Asia and Africa having very thick skin and one or two horns on the snout', 'name': 'rhinoceros'}, {'frequency': 'r', 'id': 898, 'synset': 'rib.n.03', 'synonyms': ['rib_(food)'], 'def': 'cut of meat including one or more ribs', 'name': 'rib_(food)'}, {'frequency': 'r', 'id': 899, 'synset': 'rifle.n.01', 'synonyms': ['rifle'], 'def': 'a shoulder firearm with a long barrel', 'name': 'rifle'}, {'frequency': 'f', 'id': 900, 'synset': 'ring.n.08', 'synonyms': ['ring'], 'def': 'jewelry consisting of a circlet of precious metal (often set with jewels) worn on the finger', 'name': 'ring'}, {'frequency': 'r', 'id': 901, 'synset': 'river_boat.n.01', 'synonyms': ['river_boat'], 'def': 'a boat used on rivers or to ply a river', 'name': 'river_boat'}, {'frequency': 'r', 'id': 902, 'synset': 'road_map.n.02', 'synonyms': ['road_map'], 'def': '(NOT A ROAD) a MAP showing roads (for automobile travel)', 'name': 'road_map'}, {'frequency': 'c', 'id': 903, 'synset': 'robe.n.01', 'synonyms': ['robe'], 'def': 'any loose flowing garment', 'name': 'robe'}, {'frequency': 'c', 'id': 904, 'synset': 'rocking_chair.n.01', 'synonyms': ['rocking_chair'], 'def': 'a chair mounted on rockers', 'name': 'rocking_chair'}, {'frequency': 'r', 'id': 905, 'synset': 'roller_skate.n.01', 'synonyms': ['roller_skate'], 'def': 'a shoe with pairs of rollers (small hard wheels) fixed to the sole', 'name': 'roller_skate'}, {'frequency': 'r', 'id': 906, 'synset': 'rollerblade.n.01', 'synonyms': ['Rollerblade'], 'def': 'an in-line variant of a roller skate', 'name': 'Rollerblade'}, {'frequency': 'c', 'id': 907, 'synset': 'rolling_pin.n.01', 'synonyms': ['rolling_pin'], 'def': 'utensil consisting of a cylinder (usually of wood) with a handle at each end; used to roll out dough', 'name': 'rolling_pin'}, {'frequency': 'r', 'id': 908, 'synset': 'root_beer.n.01', 'synonyms': ['root_beer'], 'def': 'carbonated drink containing extracts of roots and herbs', 'name': 'root_beer'}, {'frequency': 'c', 'id': 909, 'synset': 'router.n.02', 'synonyms': ['router_(computer_equipment)'], 'def': 'a device that forwards data packets between computer networks', 'name': 'router_(computer_equipment)'}, {'frequency': 'f', 'id': 910, 'synset': 'rubber_band.n.01', 'synonyms': ['rubber_band', 'elastic_band'], 'def': 'a narrow band of elastic rubber used to hold things (such as papers) together', 'name': 'rubber_band'}, {'frequency': 'c', 'id': 911, 'synset': 'runner.n.08', 'synonyms': ['runner_(carpet)'], 'def': 'a long narrow carpet', 'name': 'runner_(carpet)'}, {'frequency': 'f', 'id': 912, 'synset': 'sack.n.01', 'synonyms': ['plastic_bag', 'paper_bag'], 'def': "a bag made of paper or plastic for holding customer's purchases", 'name': 'plastic_bag'}, {'frequency': 'f', 'id': 913, 'synset': 'saddle.n.01', 'synonyms': ['saddle_(on_an_animal)'], 'def': 'a seat for the rider of a horse or camel', 'name': 'saddle_(on_an_animal)'}, {'frequency': 'f', 'id': 914, 'synset': 'saddle_blanket.n.01', 'synonyms': ['saddle_blanket', 'saddlecloth', 'horse_blanket'], 'def': 'stable gear consisting of a blanket placed under the saddle', 'name': 'saddle_blanket'}, {'frequency': 'c', 'id': 915, 'synset': 'saddlebag.n.01', 'synonyms': ['saddlebag'], 'def': 'a large bag (or pair of bags) hung over a saddle', 'name': 'saddlebag'}, {'frequency': 'r', 'id': 916, 'synset': 'safety_pin.n.01', 'synonyms': ['safety_pin'], 'def': 'a pin in the form of a clasp; has a guard so the point of the pin will not stick the user', 'name': 'safety_pin'}, {'frequency': 'c', 'id': 917, 'synset': 'sail.n.01', 'synonyms': ['sail'], 'def': 'a large piece of fabric by means of which wind is used to propel a sailing vessel', 'name': 'sail'}, {'frequency': 'c', 'id': 918, 'synset': 'salad.n.01', 'synonyms': ['salad'], 'def': 'food mixtures either arranged on a plate or tossed and served with a moist dressing; usually consisting of or including greens', 'name': 'salad'}, {'frequency': 'r', 'id': 919, 'synset': 'salad_plate.n.01', 'synonyms': ['salad_plate', 'salad_bowl'], 'def': 'a plate or bowl for individual servings of salad', 'name': 'salad_plate'}, {'frequency': 'r', 'id': 920, 'synset': 'salami.n.01', 'synonyms': ['salami'], 'def': 'highly seasoned fatty sausage of pork and beef usually dried', 'name': 'salami'}, {'frequency': 'r', 'id': 921, 'synset': 'salmon.n.01', 'synonyms': ['salmon_(fish)'], 'def': 'any of various large food and game fishes of northern waters', 'name': 'salmon_(fish)'}, {'frequency': 'r', 'id': 922, 'synset': 'salmon.n.03', 'synonyms': ['salmon_(food)'], 'def': 'flesh of any of various marine or freshwater fish of the family Salmonidae', 'name': 'salmon_(food)'}, {'frequency': 'r', 'id': 923, 'synset': 'salsa.n.01', 'synonyms': ['salsa'], 'def': 'spicy sauce of tomatoes and onions and chili peppers to accompany Mexican foods', 'name': 'salsa'}, {'frequency': 'f', 'id': 924, 'synset': 'saltshaker.n.01', 'synonyms': ['saltshaker'], 'def': 'a shaker with a perforated top for sprinkling salt', 'name': 'saltshaker'}, {'frequency': 'f', 'id': 925, 'synset': 'sandal.n.01', 'synonyms': ['sandal_(type_of_shoe)'], 'def': 'a shoe consisting of a sole fastened by straps to the foot', 'name': 'sandal_(type_of_shoe)'}, {'frequency': 'f', 'id': 926, 'synset': 'sandwich.n.01', 'synonyms': ['sandwich'], 'def': 'two (or more) slices of bread with a filling between them', 'name': 'sandwich'}, {'frequency': 'r', 'id': 927, 'synset': 'satchel.n.01', 'synonyms': ['satchel'], 'def': 'luggage consisting of a small case with a flat bottom and (usually) a shoulder strap', 'name': 'satchel'}, {'frequency': 'r', 'id': 928, 'synset': 'saucepan.n.01', 'synonyms': ['saucepan'], 'def': 'a deep pan with a handle; used for stewing or boiling', 'name': 'saucepan'}, {'frequency': 'f', 'id': 929, 'synset': 'saucer.n.02', 'synonyms': ['saucer'], 'def': 'a small shallow dish for holding a cup at the table', 'name': 'saucer'}, {'frequency': 'f', 'id': 930, 'synset': 'sausage.n.01', 'synonyms': ['sausage'], 'def': 'highly seasoned minced meat stuffed in casings', 'name': 'sausage'}, {'frequency': 'r', 'id': 931, 'synset': 'sawhorse.n.01', 'synonyms': ['sawhorse', 'sawbuck'], 'def': 'a framework for holding wood that is being sawed', 'name': 'sawhorse'}, {'frequency': 'r', 'id': 932, 'synset': 'sax.n.02', 'synonyms': ['saxophone'], 'def': "a wind instrument with a `J'-shaped form typically made of brass", 'name': 'saxophone'}, {'frequency': 'f', 'id': 933, 'synset': 'scale.n.07', 'synonyms': ['scale_(measuring_instrument)'], 'def': 'a measuring instrument for weighing; shows amount of mass', 'name': 'scale_(measuring_instrument)'}, {'frequency': 'r', 'id': 934, 'synset': 'scarecrow.n.01', 'synonyms': ['scarecrow', 'strawman'], 'def': 'an effigy in the shape of a man to frighten birds away from seeds', 'name': 'scarecrow'}, {'frequency': 'f', 'id': 935, 'synset': 'scarf.n.01', 'synonyms': ['scarf'], 'def': 'a garment worn around the head or neck or shoulders for warmth or decoration', 'name': 'scarf'}, {'frequency': 'c', 'id': 936, 'synset': 'school_bus.n.01', 'synonyms': ['school_bus'], 'def': 'a bus used to transport children to or from school', 'name': 'school_bus'}, {'frequency': 'f', 'id': 937, 'synset': 'scissors.n.01', 'synonyms': ['scissors'], 'def': 'a tool having two crossed pivoting blades with looped handles', 'name': 'scissors'}, {'frequency': 'c', 'id': 938, 'synset': 'scoreboard.n.01', 'synonyms': ['scoreboard'], 'def': 'a large board for displaying the score of a contest (and some other information)', 'name': 'scoreboard'}, {'frequency': 'c', 'id': 939, 'synset': 'scrambled_eggs.n.01', 'synonyms': ['scrambled_eggs'], 'def': 'eggs beaten and cooked to a soft firm consistency while stirring', 'name': 'scrambled_eggs'}, {'frequency': 'r', 'id': 940, 'synset': 'scraper.n.01', 'synonyms': ['scraper'], 'def': 'any of various hand tools for scraping', 'name': 'scraper'}, {'frequency': 'r', 'id': 941, 'synset': 'scratcher.n.03', 'synonyms': ['scratcher'], 'def': 'a device used for scratching', 'name': 'scratcher'}, {'frequency': 'c', 'id': 942, 'synset': 'screwdriver.n.01', 'synonyms': ['screwdriver'], 'def': 'a hand tool for driving screws; has a tip that fits into the head of a screw', 'name': 'screwdriver'}, {'frequency': 'c', 'id': 943, 'synset': 'scrub_brush.n.01', 'synonyms': ['scrubbing_brush'], 'def': 'a brush with short stiff bristles for heavy cleaning', 'name': 'scrubbing_brush'}, {'frequency': 'c', 'id': 944, 'synset': 'sculpture.n.01', 'synonyms': ['sculpture'], 'def': 'a three-dimensional work of art', 'name': 'sculpture'}, {'frequency': 'r', 'id': 945, 'synset': 'seabird.n.01', 'synonyms': ['seabird', 'seafowl'], 'def': 'a bird that frequents coastal waters and the open ocean: gulls; pelicans; gannets; cormorants; albatrosses; petrels; etc.', 'name': 'seabird'}, {'frequency': 'r', 'id': 946, 'synset': 'seahorse.n.02', 'synonyms': ['seahorse'], 'def': 'small fish with horse-like heads bent sharply downward and curled tails', 'name': 'seahorse'}, {'frequency': 'r', 'id': 947, 'synset': 'seaplane.n.01', 'synonyms': ['seaplane', 'hydroplane'], 'def': 'an airplane that can land on or take off from water', 'name': 'seaplane'}, {'frequency': 'c', 'id': 948, 'synset': 'seashell.n.01', 'synonyms': ['seashell'], 'def': 'the shell of a marine organism', 'name': 'seashell'}, {'frequency': 'r', 'id': 949, 'synset': 'seedling.n.01', 'synonyms': ['seedling'], 'def': 'young plant or tree grown from a seed', 'name': 'seedling'}, {'frequency': 'c', 'id': 950, 'synset': 'serving_dish.n.01', 'synonyms': ['serving_dish'], 'def': 'a dish used for serving food', 'name': 'serving_dish'}, {'frequency': 'r', 'id': 951, 'synset': 'sewing_machine.n.01', 'synonyms': ['sewing_machine'], 'def': 'a textile machine used as a home appliance for sewing', 'name': 'sewing_machine'}, {'frequency': 'r', 'id': 952, 'synset': 'shaker.n.03', 'synonyms': ['shaker'], 'def': 'a container in which something can be shaken', 'name': 'shaker'}, {'frequency': 'c', 'id': 953, 'synset': 'shampoo.n.01', 'synonyms': ['shampoo'], 'def': 'cleansing agent consisting of soaps or detergents used for washing the hair', 'name': 'shampoo'}, {'frequency': 'r', 'id': 954, 'synset': 'shark.n.01', 'synonyms': ['shark'], 'def': 'typically large carnivorous fishes with sharpe teeth', 'name': 'shark'}, {'frequency': 'r', 'id': 955, 'synset': 'sharpener.n.01', 'synonyms': ['sharpener'], 'def': 'any implement that is used to make something (an edge or a point) sharper', 'name': 'sharpener'}, {'frequency': 'r', 'id': 956, 'synset': 'sharpie.n.03', 'synonyms': ['Sharpie'], 'def': 'a pen with indelible ink that will write on any surface', 'name': 'Sharpie'}, {'frequency': 'r', 'id': 957, 'synset': 'shaver.n.03', 'synonyms': ['shaver_(electric)', 'electric_shaver', 'electric_razor'], 'def': 'a razor powered by an electric motor', 'name': 'shaver_(electric)'}, {'frequency': 'c', 'id': 958, 'synset': 'shaving_cream.n.01', 'synonyms': ['shaving_cream', 'shaving_soap'], 'def': 'toiletry consisting that forms a rich lather for softening the beard before shaving', 'name': 'shaving_cream'}, {'frequency': 'r', 'id': 959, 'synset': 'shawl.n.01', 'synonyms': ['shawl'], 'def': 'cloak consisting of an oblong piece of cloth used to cover the head and shoulders', 'name': 'shawl'}, {'frequency': 'r', 'id': 960, 'synset': 'shears.n.01', 'synonyms': ['shears'], 'def': 'large scissors with strong blades', 'name': 'shears'}, {'frequency': 'f', 'id': 961, 'synset': 'sheep.n.01', 'synonyms': ['sheep'], 'def': 'woolly usually horned ruminant mammal related to the goat', 'name': 'sheep'}, {'frequency': 'r', 'id': 962, 'synset': 'shepherd_dog.n.01', 'synonyms': ['shepherd_dog', 'sheepdog'], 'def': 'any of various usually long-haired breeds of dog reared to herd and guard sheep', 'name': 'shepherd_dog'}, {'frequency': 'r', 'id': 963, 'synset': 'sherbert.n.01', 'synonyms': ['sherbert', 'sherbet'], 'def': 'a frozen dessert made primarily of fruit juice and sugar', 'name': 'sherbert'}, {'frequency': 'r', 'id': 964, 'synset': 'shield.n.02', 'synonyms': ['shield'], 'def': 'armor carried on the arm to intercept blows', 'name': 'shield'}, {'frequency': 'f', 'id': 965, 'synset': 'shirt.n.01', 'synonyms': ['shirt'], 'def': 'a garment worn on the upper half of the body', 'name': 'shirt'}, {'frequency': 'f', 'id': 966, 'synset': 'shoe.n.01', 'synonyms': ['shoe', 'sneaker_(type_of_shoe)', 'tennis_shoe'], 'def': 'common footwear covering the foot', 'name': 'shoe'}, {'frequency': 'c', 'id': 967, 'synset': 'shopping_bag.n.01', 'synonyms': ['shopping_bag'], 'def': 'a bag made of plastic or strong paper (often with handles); used to transport goods after shopping', 'name': 'shopping_bag'}, {'frequency': 'c', 'id': 968, 'synset': 'shopping_cart.n.01', 'synonyms': ['shopping_cart'], 'def': 'a handcart that holds groceries or other goods while shopping', 'name': 'shopping_cart'}, {'frequency': 'f', 'id': 969, 'synset': 'short_pants.n.01', 'synonyms': ['short_pants', 'shorts_(clothing)', 'trunks_(clothing)'], 'def': 'trousers that end at or above the knee', 'name': 'short_pants'}, {'frequency': 'r', 'id': 970, 'synset': 'shot_glass.n.01', 'synonyms': ['shot_glass'], 'def': 'a small glass adequate to hold a single swallow of whiskey', 'name': 'shot_glass'}, {'frequency': 'c', 'id': 971, 'synset': 'shoulder_bag.n.01', 'synonyms': ['shoulder_bag'], 'def': 'a large handbag that can be carried by a strap looped over the shoulder', 'name': 'shoulder_bag'}, {'frequency': 'c', 'id': 972, 'synset': 'shovel.n.01', 'synonyms': ['shovel'], 'def': 'a hand tool for lifting loose material such as snow, dirt, etc.', 'name': 'shovel'}, {'frequency': 'f', 'id': 973, 'synset': 'shower.n.01', 'synonyms': ['shower_head'], 'def': 'a plumbing fixture that sprays water over you', 'name': 'shower_head'}, {'frequency': 'f', 'id': 974, 'synset': 'shower_curtain.n.01', 'synonyms': ['shower_curtain'], 'def': 'a curtain that keeps water from splashing out of the shower area', 'name': 'shower_curtain'}, {'frequency': 'r', 'id': 975, 'synset': 'shredder.n.01', 'synonyms': ['shredder_(for_paper)'], 'def': 'a device that shreds documents', 'name': 'shredder_(for_paper)'}, {'frequency': 'r', 'id': 976, 'synset': 'sieve.n.01', 'synonyms': ['sieve', 'screen_(sieve)'], 'def': 'a strainer for separating lumps from powdered material or grading particles', 'name': 'sieve'}, {'frequency': 'f', 'id': 977, 'synset': 'signboard.n.01', 'synonyms': ['signboard'], 'def': 'structure displaying a board on which advertisements can be posted', 'name': 'signboard'}, {'frequency': 'c', 'id': 978, 'synset': 'silo.n.01', 'synonyms': ['silo'], 'def': 'a cylindrical tower used for storing goods', 'name': 'silo'}, {'frequency': 'f', 'id': 979, 'synset': 'sink.n.01', 'synonyms': ['sink'], 'def': 'plumbing fixture consisting of a water basin fixed to a wall or floor and having a drainpipe', 'name': 'sink'}, {'frequency': 'f', 'id': 980, 'synset': 'skateboard.n.01', 'synonyms': ['skateboard'], 'def': 'a board with wheels that is ridden in a standing or crouching position and propelled by foot', 'name': 'skateboard'}, {'frequency': 'c', 'id': 981, 'synset': 'skewer.n.01', 'synonyms': ['skewer'], 'def': 'a long pin for holding meat in position while it is being roasted', 'name': 'skewer'}, {'frequency': 'f', 'id': 982, 'synset': 'ski.n.01', 'synonyms': ['ski'], 'def': 'sports equipment for skiing on snow', 'name': 'ski'}, {'frequency': 'f', 'id': 983, 'synset': 'ski_boot.n.01', 'synonyms': ['ski_boot'], 'def': 'a stiff boot that is fastened to a ski with a ski binding', 'name': 'ski_boot'}, {'frequency': 'f', 'id': 984, 'synset': 'ski_parka.n.01', 'synonyms': ['ski_parka', 'ski_jacket'], 'def': 'a parka to be worn while skiing', 'name': 'ski_parka'}, {'frequency': 'f', 'id': 985, 'synset': 'ski_pole.n.01', 'synonyms': ['ski_pole'], 'def': 'a pole with metal points used as an aid in skiing', 'name': 'ski_pole'}, {'frequency': 'f', 'id': 986, 'synset': 'skirt.n.02', 'synonyms': ['skirt'], 'def': 'a garment hanging from the waist; worn mainly by girls and women', 'name': 'skirt'}, {'frequency': 'c', 'id': 987, 'synset': 'sled.n.01', 'synonyms': ['sled', 'sledge', 'sleigh'], 'def': 'a vehicle or flat object for transportation over snow by sliding or pulled by dogs, etc.', 'name': 'sled'}, {'frequency': 'c', 'id': 988, 'synset': 'sleeping_bag.n.01', 'synonyms': ['sleeping_bag'], 'def': 'large padded bag designed to be slept in outdoors', 'name': 'sleeping_bag'}, {'frequency': 'r', 'id': 989, 'synset': 'sling.n.05', 'synonyms': ['sling_(bandage)', 'triangular_bandage'], 'def': 'bandage to support an injured forearm; slung over the shoulder or neck', 'name': 'sling_(bandage)'}, {'frequency': 'c', 'id': 990, 'synset': 'slipper.n.01', 'synonyms': ['slipper_(footwear)', 'carpet_slipper_(footwear)'], 'def': 'low footwear that can be slipped on and off easily; usually worn indoors', 'name': 'slipper_(footwear)'}, {'frequency': 'r', 'id': 991, 'synset': 'smoothie.n.02', 'synonyms': ['smoothie'], 'def': 'a thick smooth drink consisting of fresh fruit pureed with ice cream or yoghurt or milk', 'name': 'smoothie'}, {'frequency': 'r', 'id': 992, 'synset': 'snake.n.01', 'synonyms': ['snake', 'serpent'], 'def': 'limbless scaly elongate reptile; some are venomous', 'name': 'snake'}, {'frequency': 'f', 'id': 993, 'synset': 'snowboard.n.01', 'synonyms': ['snowboard'], 'def': 'a board that resembles a broad ski or a small surfboard; used in a standing position to slide down snow-covered slopes', 'name': 'snowboard'}, {'frequency': 'c', 'id': 994, 'synset': 'snowman.n.01', 'synonyms': ['snowman'], 'def': 'a figure of a person made of packed snow', 'name': 'snowman'}, {'frequency': 'c', 'id': 995, 'synset': 'snowmobile.n.01', 'synonyms': ['snowmobile'], 'def': 'tracked vehicle for travel on snow having skis in front', 'name': 'snowmobile'}, {'frequency': 'f', 'id': 996, 'synset': 'soap.n.01', 'synonyms': ['soap'], 'def': 'a cleansing agent made from the salts of vegetable or animal fats', 'name': 'soap'}, {'frequency': 'f', 'id': 997, 'synset': 'soccer_ball.n.01', 'synonyms': ['soccer_ball'], 'def': "an inflated ball used in playing soccer (called `football' outside of the United States)", 'name': 'soccer_ball'}, {'frequency': 'f', 'id': 998, 'synset': 'sock.n.01', 'synonyms': ['sock'], 'def': 'cloth covering for the foot; worn inside the shoe; reaches to between the ankle and the knee', 'name': 'sock'}, {'frequency': 'r', 'id': 999, 'synset': 'soda_fountain.n.02', 'synonyms': ['soda_fountain'], 'def': 'an apparatus for dispensing soda water', 'name': 'soda_fountain'}, {'frequency': 'r', 'id': 1000, 'synset': 'soda_water.n.01', 'synonyms': ['carbonated_water', 'club_soda', 'seltzer', 'sparkling_water'], 'def': 'effervescent beverage artificially charged with carbon dioxide', 'name': 'carbonated_water'}, {'frequency': 'f', 'id': 1001, 'synset': 'sofa.n.01', 'synonyms': ['sofa', 'couch', 'lounge'], 'def': 'an upholstered seat for more than one person', 'name': 'sofa'}, {'frequency': 'r', 'id': 1002, 'synset': 'softball.n.01', 'synonyms': ['softball'], 'def': 'ball used in playing softball', 'name': 'softball'}, {'frequency': 'c', 'id': 1003, 'synset': 'solar_array.n.01', 'synonyms': ['solar_array', 'solar_battery', 'solar_panel'], 'def': 'electrical device consisting of a large array of connected solar cells', 'name': 'solar_array'}, {'frequency': 'r', 'id': 1004, 'synset': 'sombrero.n.02', 'synonyms': ['sombrero'], 'def': 'a straw hat with a tall crown and broad brim; worn in American southwest and in Mexico', 'name': 'sombrero'}, {'frequency': 'c', 'id': 1005, 'synset': 'soup.n.01', 'synonyms': ['soup'], 'def': 'liquid food especially of meat or fish or vegetable stock often containing pieces of solid food', 'name': 'soup'}, {'frequency': 'r', 'id': 1006, 'synset': 'soup_bowl.n.01', 'synonyms': ['soup_bowl'], 'def': 'a bowl for serving soup', 'name': 'soup_bowl'}, {'frequency': 'c', 'id': 1007, 'synset': 'soupspoon.n.01', 'synonyms': ['soupspoon'], 'def': 'a spoon with a rounded bowl for eating soup', 'name': 'soupspoon'}, {'frequency': 'c', 'id': 1008, 'synset': 'sour_cream.n.01', 'synonyms': ['sour_cream', 'soured_cream'], 'def': 'soured light cream', 'name': 'sour_cream'}, {'frequency': 'r', 'id': 1009, 'synset': 'soya_milk.n.01', 'synonyms': ['soya_milk', 'soybean_milk', 'soymilk'], 'def': 'a milk substitute containing soybean flour and water; used in some infant formulas and in making tofu', 'name': 'soya_milk'}, {'frequency': 'r', 'id': 1010, 'synset': 'space_shuttle.n.01', 'synonyms': ['space_shuttle'], 'def': "a reusable spacecraft with wings for a controlled descent through the Earth's atmosphere", 'name': 'space_shuttle'}, {'frequency': 'r', 'id': 1011, 'synset': 'sparkler.n.02', 'synonyms': ['sparkler_(fireworks)'], 'def': 'a firework that burns slowly and throws out a shower of sparks', 'name': 'sparkler_(fireworks)'}, {'frequency': 'f', 'id': 1012, 'synset': 'spatula.n.02', 'synonyms': ['spatula'], 'def': 'a hand tool with a thin flexible blade used to mix or spread soft substances', 'name': 'spatula'}, {'frequency': 'r', 'id': 1013, 'synset': 'spear.n.01', 'synonyms': ['spear', 'lance'], 'def': 'a long pointed rod used as a tool or weapon', 'name': 'spear'}, {'frequency': 'f', 'id': 1014, 'synset': 'spectacles.n.01', 'synonyms': ['spectacles', 'specs', 'eyeglasses', 'glasses'], 'def': 'optical instrument consisting of a frame that holds a pair of lenses for correcting defective vision', 'name': 'spectacles'}, {'frequency': 'c', 'id': 1015, 'synset': 'spice_rack.n.01', 'synonyms': ['spice_rack'], 'def': 'a rack for displaying containers filled with spices', 'name': 'spice_rack'}, {'frequency': 'r', 'id': 1016, 'synset': 'spider.n.01', 'synonyms': ['spider'], 'def': 'predatory arachnid with eight legs, two poison fangs, two feelers, and usually two silk-spinning organs at the back end of the body', 'name': 'spider'}, {'frequency': 'c', 'id': 1017, 'synset': 'sponge.n.01', 'synonyms': ['sponge'], 'def': 'a porous mass usable to absorb water typically used for cleaning', 'name': 'sponge'}, {'frequency': 'f', 'id': 1018, 'synset': 'spoon.n.01', 'synonyms': ['spoon'], 'def': 'a piece of cutlery with a shallow bowl-shaped container and a handle', 'name': 'spoon'}, {'frequency': 'c', 'id': 1019, 'synset': 'sportswear.n.01', 'synonyms': ['sportswear', 'athletic_wear', 'activewear'], 'def': 'attire worn for sport or for casual wear', 'name': 'sportswear'}, {'frequency': 'c', 'id': 1020, 'synset': 'spotlight.n.02', 'synonyms': ['spotlight'], 'def': 'a lamp that produces a strong beam of light to illuminate a restricted area; used to focus attention of a stage performer', 'name': 'spotlight'}, {'frequency': 'r', 'id': 1021, 'synset': 'squirrel.n.01', 'synonyms': ['squirrel'], 'def': 'a kind of arboreal rodent having a long bushy tail', 'name': 'squirrel'}, {'frequency': 'c', 'id': 1022, 'synset': 'stapler.n.01', 'synonyms': ['stapler_(stapling_machine)'], 'def': 'a machine that inserts staples into sheets of paper in order to fasten them together', 'name': 'stapler_(stapling_machine)'}, {'frequency': 'r', 'id': 1023, 'synset': 'starfish.n.01', 'synonyms': ['starfish', 'sea_star'], 'def': 'echinoderms characterized by five arms extending from a central disk', 'name': 'starfish'}, {'frequency': 'f', 'id': 1024, 'synset': 'statue.n.01', 'synonyms': ['statue_(sculpture)'], 'def': 'a sculpture representing a human or animal', 'name': 'statue_(sculpture)'}, {'frequency': 'c', 'id': 1025, 'synset': 'steak.n.01', 'synonyms': ['steak_(food)'], 'def': 'a slice of meat cut from the fleshy part of an animal or large fish', 'name': 'steak_(food)'}, {'frequency': 'r', 'id': 1026, 'synset': 'steak_knife.n.01', 'synonyms': ['steak_knife'], 'def': 'a sharp table knife used in eating steak', 'name': 'steak_knife'}, {'frequency': 'r', 'id': 1027, 'synset': 'steamer.n.02', 'synonyms': ['steamer_(kitchen_appliance)'], 'def': 'a cooking utensil that can be used to cook food by steaming it', 'name': 'steamer_(kitchen_appliance)'}, {'frequency': 'f', 'id': 1028, 'synset': 'steering_wheel.n.01', 'synonyms': ['steering_wheel'], 'def': 'a handwheel that is used for steering', 'name': 'steering_wheel'}, {'frequency': 'r', 'id': 1029, 'synset': 'stencil.n.01', 'synonyms': ['stencil'], 'def': 'a sheet of material (metal, plastic, etc.) that has been perforated with a pattern; ink or paint can pass through the perforations to create the printed pattern on the surface below', 'name': 'stencil'}, {'frequency': 'r', 'id': 1030, 'synset': 'step_ladder.n.01', 'synonyms': ['stepladder'], 'def': 'a folding portable ladder hinged at the top', 'name': 'stepladder'}, {'frequency': 'c', 'id': 1031, 'synset': 'step_stool.n.01', 'synonyms': ['step_stool'], 'def': 'a stool that has one or two steps that fold under the seat', 'name': 'step_stool'}, {'frequency': 'c', 'id': 1032, 'synset': 'stereo.n.01', 'synonyms': ['stereo_(sound_system)'], 'def': 'electronic device for playing audio', 'name': 'stereo_(sound_system)'}, {'frequency': 'r', 'id': 1033, 'synset': 'stew.n.02', 'synonyms': ['stew'], 'def': 'food prepared by stewing especially meat or fish with vegetables', 'name': 'stew'}, {'frequency': 'r', 'id': 1034, 'synset': 'stirrer.n.02', 'synonyms': ['stirrer'], 'def': 'an implement used for stirring', 'name': 'stirrer'}, {'frequency': 'f', 'id': 1035, 'synset': 'stirrup.n.01', 'synonyms': ['stirrup'], 'def': "support consisting of metal loops into which rider's feet go", 'name': 'stirrup'}, {'frequency': 'c', 'id': 1036, 'synset': 'stocking.n.01', 'synonyms': ['stockings_(leg_wear)'], 'def': 'close-fitting hosiery to cover the foot and leg; come in matched pairs', 'name': 'stockings_(leg_wear)'}, {'frequency': 'f', 'id': 1037, 'synset': 'stool.n.01', 'synonyms': ['stool'], 'def': 'a simple seat without a back or arms', 'name': 'stool'}, {'frequency': 'f', 'id': 1038, 'synset': 'stop_sign.n.01', 'synonyms': ['stop_sign'], 'def': 'a traffic sign to notify drivers that they must come to a complete stop', 'name': 'stop_sign'}, {'frequency': 'f', 'id': 1039, 'synset': 'stoplight.n.01', 'synonyms': ['brake_light'], 'def': 'a red light on the rear of a motor vehicle that signals when the brakes are applied', 'name': 'brake_light'}, {'frequency': 'f', 'id': 1040, 'synset': 'stove.n.01', 'synonyms': ['stove', 'kitchen_stove', 'range_(kitchen_appliance)', 'kitchen_range', 'cooking_stove'], 'def': 'a kitchen appliance used for cooking food', 'name': 'stove'}, {'frequency': 'c', 'id': 1041, 'synset': 'strainer.n.01', 'synonyms': ['strainer'], 'def': 'a filter to retain larger pieces while smaller pieces and liquids pass through', 'name': 'strainer'}, {'frequency': 'f', 'id': 1042, 'synset': 'strap.n.01', 'synonyms': ['strap'], 'def': 'an elongated strip of material for binding things together or holding', 'name': 'strap'}, {'frequency': 'f', 'id': 1043, 'synset': 'straw.n.04', 'synonyms': ['straw_(for_drinking)', 'drinking_straw'], 'def': 'a thin paper or plastic tube used to suck liquids into the mouth', 'name': 'straw_(for_drinking)'}, {'frequency': 'f', 'id': 1044, 'synset': 'strawberry.n.01', 'synonyms': ['strawberry'], 'def': 'sweet fleshy red fruit', 'name': 'strawberry'}, {'frequency': 'f', 'id': 1045, 'synset': 'street_sign.n.01', 'synonyms': ['street_sign'], 'def': 'a sign visible from the street', 'name': 'street_sign'}, {'frequency': 'f', 'id': 1046, 'synset': 'streetlight.n.01', 'synonyms': ['streetlight', 'street_lamp'], 'def': 'a lamp supported on a lamppost; for illuminating a street', 'name': 'streetlight'}, {'frequency': 'r', 'id': 1047, 'synset': 'string_cheese.n.01', 'synonyms': ['string_cheese'], 'def': 'cheese formed in long strings twisted together', 'name': 'string_cheese'}, {'frequency': 'r', 'id': 1048, 'synset': 'stylus.n.02', 'synonyms': ['stylus'], 'def': 'a pointed tool for writing or drawing or engraving', 'name': 'stylus'}, {'frequency': 'r', 'id': 1049, 'synset': 'subwoofer.n.01', 'synonyms': ['subwoofer'], 'def': 'a loudspeaker that is designed to reproduce very low bass frequencies', 'name': 'subwoofer'}, {'frequency': 'r', 'id': 1050, 'synset': 'sugar_bowl.n.01', 'synonyms': ['sugar_bowl'], 'def': 'a dish in which sugar is served', 'name': 'sugar_bowl'}, {'frequency': 'r', 'id': 1051, 'synset': 'sugarcane.n.01', 'synonyms': ['sugarcane_(plant)'], 'def': 'juicy canes whose sap is a source of molasses and commercial sugar; fresh canes are sometimes chewed for the juice', 'name': 'sugarcane_(plant)'}, {'frequency': 'c', 'id': 1052, 'synset': 'suit.n.01', 'synonyms': ['suit_(clothing)'], 'def': 'a set of garments (usually including a jacket and trousers or skirt) for outerwear all of the same fabric and color', 'name': 'suit_(clothing)'}, {'frequency': 'c', 'id': 1053, 'synset': 'sunflower.n.01', 'synonyms': ['sunflower'], 'def': 'any plant of the genus Helianthus having large flower heads with dark disk florets and showy yellow rays', 'name': 'sunflower'}, {'frequency': 'f', 'id': 1054, 'synset': 'sunglasses.n.01', 'synonyms': ['sunglasses'], 'def': 'spectacles that are darkened or polarized to protect the eyes from the glare of the sun', 'name': 'sunglasses'}, {'frequency': 'c', 'id': 1055, 'synset': 'sunhat.n.01', 'synonyms': ['sunhat'], 'def': 'a hat with a broad brim that protects the face from direct exposure to the sun', 'name': 'sunhat'}, {'frequency': 'r', 'id': 1056, 'synset': 'sunscreen.n.01', 'synonyms': ['sunscreen', 'sunblock'], 'def': 'a cream spread on the skin; contains a chemical to filter out ultraviolet light and so protect from sunburn', 'name': 'sunscreen'}, {'frequency': 'f', 'id': 1057, 'synset': 'surfboard.n.01', 'synonyms': ['surfboard'], 'def': 'a narrow buoyant board for riding surf', 'name': 'surfboard'}, {'frequency': 'c', 'id': 1058, 'synset': 'sushi.n.01', 'synonyms': ['sushi'], 'def': 'rice (with raw fish) wrapped in seaweed', 'name': 'sushi'}, {'frequency': 'c', 'id': 1059, 'synset': 'swab.n.02', 'synonyms': ['mop'], 'def': 'cleaning implement consisting of absorbent material fastened to a handle; for cleaning floors', 'name': 'mop'}, {'frequency': 'c', 'id': 1060, 'synset': 'sweat_pants.n.01', 'synonyms': ['sweat_pants'], 'def': 'loose-fitting trousers with elastic cuffs; worn by athletes', 'name': 'sweat_pants'}, {'frequency': 'c', 'id': 1061, 'synset': 'sweatband.n.02', 'synonyms': ['sweatband'], 'def': 'a band of material tied around the forehead or wrist to absorb sweat', 'name': 'sweatband'}, {'frequency': 'f', 'id': 1062, 'synset': 'sweater.n.01', 'synonyms': ['sweater'], 'def': 'a crocheted or knitted garment covering the upper part of the body', 'name': 'sweater'}, {'frequency': 'f', 'id': 1063, 'synset': 'sweatshirt.n.01', 'synonyms': ['sweatshirt'], 'def': 'cotton knit pullover with long sleeves worn during athletic activity', 'name': 'sweatshirt'}, {'frequency': 'c', 'id': 1064, 'synset': 'sweet_potato.n.02', 'synonyms': ['sweet_potato'], 'def': 'the edible tuberous root of the sweet potato vine', 'name': 'sweet_potato'}, {'frequency': 'f', 'id': 1065, 'synset': 'swimsuit.n.01', 'synonyms': ['swimsuit', 'swimwear', 'bathing_suit', 'swimming_costume', 'bathing_costume', 'swimming_trunks', 'bathing_trunks'], 'def': 'garment worn for swimming', 'name': 'swimsuit'}, {'frequency': 'c', 'id': 1066, 'synset': 'sword.n.01', 'synonyms': ['sword'], 'def': 'a cutting or thrusting weapon that has a long metal blade', 'name': 'sword'}, {'frequency': 'r', 'id': 1067, 'synset': 'syringe.n.01', 'synonyms': ['syringe'], 'def': 'a medical instrument used to inject or withdraw fluids', 'name': 'syringe'}, {'frequency': 'r', 'id': 1068, 'synset': 'tabasco.n.02', 'synonyms': ['Tabasco_sauce'], 'def': 'very spicy sauce (trade name Tabasco) made from fully-aged red peppers', 'name': 'Tabasco_sauce'}, {'frequency': 'r', 'id': 1069, 'synset': 'table-tennis_table.n.01', 'synonyms': ['table-tennis_table', 'ping-pong_table'], 'def': 'a table used for playing table tennis', 'name': 'table-tennis_table'}, {'frequency': 'f', 'id': 1070, 'synset': 'table.n.02', 'synonyms': ['table'], 'def': 'a piece of furniture having a smooth flat top that is usually supported by one or more vertical legs', 'name': 'table'}, {'frequency': 'c', 'id': 1071, 'synset': 'table_lamp.n.01', 'synonyms': ['table_lamp'], 'def': 'a lamp that sits on a table', 'name': 'table_lamp'}, {'frequency': 'f', 'id': 1072, 'synset': 'tablecloth.n.01', 'synonyms': ['tablecloth'], 'def': 'a covering spread over a dining table', 'name': 'tablecloth'}, {'frequency': 'r', 'id': 1073, 'synset': 'tachometer.n.01', 'synonyms': ['tachometer'], 'def': 'measuring instrument for indicating speed of rotation', 'name': 'tachometer'}, {'frequency': 'r', 'id': 1074, 'synset': 'taco.n.02', 'synonyms': ['taco'], 'def': 'a small tortilla cupped around a filling', 'name': 'taco'}, {'frequency': 'f', 'id': 1075, 'synset': 'tag.n.02', 'synonyms': ['tag'], 'def': 'a label associated with something for the purpose of identification or information', 'name': 'tag'}, {'frequency': 'f', 'id': 1076, 'synset': 'taillight.n.01', 'synonyms': ['taillight', 'rear_light'], 'def': 'lamp (usually red) mounted at the rear of a motor vehicle', 'name': 'taillight'}, {'frequency': 'r', 'id': 1077, 'synset': 'tambourine.n.01', 'synonyms': ['tambourine'], 'def': 'a shallow drum with a single drumhead and with metallic disks in the sides', 'name': 'tambourine'}, {'frequency': 'r', 'id': 1078, 'synset': 'tank.n.01', 'synonyms': ['army_tank', 'armored_combat_vehicle', 'armoured_combat_vehicle'], 'def': 'an enclosed armored military vehicle; has a cannon and moves on caterpillar treads', 'name': 'army_tank'}, {'frequency': 'c', 'id': 1079, 'synset': 'tank.n.02', 'synonyms': ['tank_(storage_vessel)', 'storage_tank'], 'def': 'a large (usually metallic) vessel for holding gases or liquids', 'name': 'tank_(storage_vessel)'}, {'frequency': 'f', 'id': 1080, 'synset': 'tank_top.n.01', 'synonyms': ['tank_top_(clothing)'], 'def': 'a tight-fitting sleeveless shirt with wide shoulder straps and low neck and no front opening', 'name': 'tank_top_(clothing)'}, {'frequency': 'c', 'id': 1081, 'synset': 'tape.n.01', 'synonyms': ['tape_(sticky_cloth_or_paper)'], 'def': 'a long thin piece of cloth or paper as used for binding or fastening', 'name': 'tape_(sticky_cloth_or_paper)'}, {'frequency': 'c', 'id': 1082, 'synset': 'tape.n.04', 'synonyms': ['tape_measure', 'measuring_tape'], 'def': 'measuring instrument consisting of a narrow strip (cloth or metal) marked in inches or centimeters and used for measuring lengths', 'name': 'tape_measure'}, {'frequency': 'c', 'id': 1083, 'synset': 'tapestry.n.02', 'synonyms': ['tapestry'], 'def': 'a heavy textile with a woven design; used for curtains and upholstery', 'name': 'tapestry'}, {'frequency': 'f', 'id': 1084, 'synset': 'tarpaulin.n.01', 'synonyms': ['tarp'], 'def': 'waterproofed canvas', 'name': 'tarp'}, {'frequency': 'c', 'id': 1085, 'synset': 'tartan.n.01', 'synonyms': ['tartan', 'plaid'], 'def': 'a cloth having a crisscross design', 'name': 'tartan'}, {'frequency': 'c', 'id': 1086, 'synset': 'tassel.n.01', 'synonyms': ['tassel'], 'def': 'adornment consisting of a bunch of cords fastened at one end', 'name': 'tassel'}, {'frequency': 'r', 'id': 1087, 'synset': 'tea_bag.n.01', 'synonyms': ['tea_bag'], 'def': 'a measured amount of tea in a bag for an individual serving of tea', 'name': 'tea_bag'}, {'frequency': 'c', 'id': 1088, 'synset': 'teacup.n.02', 'synonyms': ['teacup'], 'def': 'a cup from which tea is drunk', 'name': 'teacup'}, {'frequency': 'c', 'id': 1089, 'synset': 'teakettle.n.01', 'synonyms': ['teakettle'], 'def': 'kettle for boiling water to make tea', 'name': 'teakettle'}, {'frequency': 'c', 'id': 1090, 'synset': 'teapot.n.01', 'synonyms': ['teapot'], 'def': 'pot for brewing tea; usually has a spout and handle', 'name': 'teapot'}, {'frequency': 'f', 'id': 1091, 'synset': 'teddy.n.01', 'synonyms': ['teddy_bear'], 'def': "plaything consisting of a child's toy bear (usually plush and stuffed with soft materials)", 'name': 'teddy_bear'}, {'frequency': 'f', 'id': 1092, 'synset': 'telephone.n.01', 'synonyms': ['telephone', 'phone', 'telephone_set'], 'def': 'electronic device for communicating by voice over long distances', 'name': 'telephone'}, {'frequency': 'c', 'id': 1093, 'synset': 'telephone_booth.n.01', 'synonyms': ['telephone_booth', 'phone_booth', 'call_box', 'telephone_box', 'telephone_kiosk'], 'def': 'booth for using a telephone', 'name': 'telephone_booth'}, {'frequency': 'f', 'id': 1094, 'synset': 'telephone_pole.n.01', 'synonyms': ['telephone_pole', 'telegraph_pole', 'telegraph_post'], 'def': 'tall pole supporting telephone wires', 'name': 'telephone_pole'}, {'frequency': 'r', 'id': 1095, 'synset': 'telephoto_lens.n.01', 'synonyms': ['telephoto_lens', 'zoom_lens'], 'def': 'a camera lens that magnifies the image', 'name': 'telephoto_lens'}, {'frequency': 'c', 'id': 1096, 'synset': 'television_camera.n.01', 'synonyms': ['television_camera', 'tv_camera'], 'def': 'television equipment for capturing and recording video', 'name': 'television_camera'}, {'frequency': 'f', 'id': 1097, 'synset': 'television_receiver.n.01', 'synonyms': ['television_set', 'tv', 'tv_set'], 'def': 'an electronic device that receives television signals and displays them on a screen', 'name': 'television_set'}, {'frequency': 'f', 'id': 1098, 'synset': 'tennis_ball.n.01', 'synonyms': ['tennis_ball'], 'def': 'ball about the size of a fist used in playing tennis', 'name': 'tennis_ball'}, {'frequency': 'f', 'id': 1099, 'synset': 'tennis_racket.n.01', 'synonyms': ['tennis_racket'], 'def': 'a racket used to play tennis', 'name': 'tennis_racket'}, {'frequency': 'r', 'id': 1100, 'synset': 'tequila.n.01', 'synonyms': ['tequila'], 'def': 'Mexican liquor made from fermented juices of an agave plant', 'name': 'tequila'}, {'frequency': 'c', 'id': 1101, 'synset': 'thermometer.n.01', 'synonyms': ['thermometer'], 'def': 'measuring instrument for measuring temperature', 'name': 'thermometer'}, {'frequency': 'c', 'id': 1102, 'synset': 'thermos.n.01', 'synonyms': ['thermos_bottle'], 'def': 'vacuum flask that preserves temperature of hot or cold drinks', 'name': 'thermos_bottle'}, {'frequency': 'c', 'id': 1103, 'synset': 'thermostat.n.01', 'synonyms': ['thermostat'], 'def': 'a regulator for automatically regulating temperature by starting or stopping the supply of heat', 'name': 'thermostat'}, {'frequency': 'r', 'id': 1104, 'synset': 'thimble.n.02', 'synonyms': ['thimble'], 'def': 'a small metal cap to protect the finger while sewing; can be used as a small container', 'name': 'thimble'}, {'frequency': 'c', 'id': 1105, 'synset': 'thread.n.01', 'synonyms': ['thread', 'yarn'], 'def': 'a fine cord of twisted fibers (of cotton or silk or wool or nylon etc.) used in sewing and weaving', 'name': 'thread'}, {'frequency': 'c', 'id': 1106, 'synset': 'thumbtack.n.01', 'synonyms': ['thumbtack', 'drawing_pin', 'pushpin'], 'def': 'a tack for attaching papers to a bulletin board or drawing board', 'name': 'thumbtack'}, {'frequency': 'c', 'id': 1107, 'synset': 'tiara.n.01', 'synonyms': ['tiara'], 'def': 'a jeweled headdress worn by women on formal occasions', 'name': 'tiara'}, {'frequency': 'c', 'id': 1108, 'synset': 'tiger.n.02', 'synonyms': ['tiger'], 'def': 'large feline of forests in most of Asia having a tawny coat with black stripes', 'name': 'tiger'}, {'frequency': 'c', 'id': 1109, 'synset': 'tights.n.01', 'synonyms': ['tights_(clothing)', 'leotards'], 'def': 'skintight knit hose covering the body from the waist to the feet worn by acrobats and dancers and as stockings by women and girls', 'name': 'tights_(clothing)'}, {'frequency': 'c', 'id': 1110, 'synset': 'timer.n.01', 'synonyms': ['timer', 'stopwatch'], 'def': 'a timepiece that measures a time interval and signals its end', 'name': 'timer'}, {'frequency': 'f', 'id': 1111, 'synset': 'tinfoil.n.01', 'synonyms': ['tinfoil'], 'def': 'foil made of tin or an alloy of tin and lead', 'name': 'tinfoil'}, {'frequency': 'r', 'id': 1112, 'synset': 'tinsel.n.01', 'synonyms': ['tinsel'], 'def': 'a showy decoration that is basically valueless', 'name': 'tinsel'}, {'frequency': 'f', 'id': 1113, 'synset': 'tissue.n.02', 'synonyms': ['tissue_paper'], 'def': 'a soft thin (usually translucent) paper', 'name': 'tissue_paper'}, {'frequency': 'c', 'id': 1114, 'synset': 'toast.n.01', 'synonyms': ['toast_(food)'], 'def': 'slice of bread that has been toasted', 'name': 'toast_(food)'}, {'frequency': 'f', 'id': 1115, 'synset': 'toaster.n.02', 'synonyms': ['toaster'], 'def': 'a kitchen appliance (usually electric) for toasting bread', 'name': 'toaster'}, {'frequency': 'c', 'id': 1116, 'synset': 'toaster_oven.n.01', 'synonyms': ['toaster_oven'], 'def': 'kitchen appliance consisting of a small electric oven for toasting or warming food', 'name': 'toaster_oven'}, {'frequency': 'f', 'id': 1117, 'synset': 'toilet.n.02', 'synonyms': ['toilet'], 'def': 'a plumbing fixture for defecation and urination', 'name': 'toilet'}, {'frequency': 'f', 'id': 1118, 'synset': 'toilet_tissue.n.01', 'synonyms': ['toilet_tissue', 'toilet_paper', 'bathroom_tissue'], 'def': 'a soft thin absorbent paper for use in toilets', 'name': 'toilet_tissue'}, {'frequency': 'f', 'id': 1119, 'synset': 'tomato.n.01', 'synonyms': ['tomato'], 'def': 'mildly acid red or yellow pulpy fruit eaten as a vegetable', 'name': 'tomato'}, {'frequency': 'c', 'id': 1120, 'synset': 'tongs.n.01', 'synonyms': ['tongs'], 'def': 'any of various devices for taking hold of objects; usually have two hinged legs with handles above and pointed hooks below', 'name': 'tongs'}, {'frequency': 'c', 'id': 1121, 'synset': 'toolbox.n.01', 'synonyms': ['toolbox'], 'def': 'a box or chest or cabinet for holding hand tools', 'name': 'toolbox'}, {'frequency': 'f', 'id': 1122, 'synset': 'toothbrush.n.01', 'synonyms': ['toothbrush'], 'def': 'small brush; has long handle; used to clean teeth', 'name': 'toothbrush'}, {'frequency': 'f', 'id': 1123, 'synset': 'toothpaste.n.01', 'synonyms': ['toothpaste'], 'def': 'a dentifrice in the form of a paste', 'name': 'toothpaste'}, {'frequency': 'c', 'id': 1124, 'synset': 'toothpick.n.01', 'synonyms': ['toothpick'], 'def': 'pick consisting of a small strip of wood or plastic; used to pick food from between the teeth', 'name': 'toothpick'}, {'frequency': 'c', 'id': 1125, 'synset': 'top.n.09', 'synonyms': ['cover'], 'def': 'covering for a hole (especially a hole in the top of a container)', 'name': 'cover'}, {'frequency': 'c', 'id': 1126, 'synset': 'tortilla.n.01', 'synonyms': ['tortilla'], 'def': 'thin unleavened pancake made from cornmeal or wheat flour', 'name': 'tortilla'}, {'frequency': 'c', 'id': 1127, 'synset': 'tow_truck.n.01', 'synonyms': ['tow_truck'], 'def': 'a truck equipped to hoist and pull wrecked cars (or to remove cars from no-parking zones)', 'name': 'tow_truck'}, {'frequency': 'f', 'id': 1128, 'synset': 'towel.n.01', 'synonyms': ['towel'], 'def': 'a rectangular piece of absorbent cloth (or paper) for drying or wiping', 'name': 'towel'}, {'frequency': 'f', 'id': 1129, 'synset': 'towel_rack.n.01', 'synonyms': ['towel_rack', 'towel_rail', 'towel_bar'], 'def': 'a rack consisting of one or more bars on which towels can be hung', 'name': 'towel_rack'}, {'frequency': 'f', 'id': 1130, 'synset': 'toy.n.03', 'synonyms': ['toy'], 'def': 'a device regarded as providing amusement', 'name': 'toy'}, {'frequency': 'c', 'id': 1131, 'synset': 'tractor.n.01', 'synonyms': ['tractor_(farm_equipment)'], 'def': 'a wheeled vehicle with large wheels; used in farming and other applications', 'name': 'tractor_(farm_equipment)'}, {'frequency': 'f', 'id': 1132, 'synset': 'traffic_light.n.01', 'synonyms': ['traffic_light'], 'def': 'a device to control vehicle traffic often consisting of three or more lights', 'name': 'traffic_light'}, {'frequency': 'r', 'id': 1133, 'synset': 'trail_bike.n.01', 'synonyms': ['dirt_bike'], 'def': 'a lightweight motorcycle equipped with rugged tires and suspension for off-road use', 'name': 'dirt_bike'}, {'frequency': 'c', 'id': 1134, 'synset': 'trailer_truck.n.01', 'synonyms': ['trailer_truck', 'tractor_trailer', 'trucking_rig', 'articulated_lorry', 'semi_truck'], 'def': 'a truck consisting of a tractor and trailer together', 'name': 'trailer_truck'}, {'frequency': 'f', 'id': 1135, 'synset': 'train.n.01', 'synonyms': ['train_(railroad_vehicle)', 'railroad_train'], 'def': 'public or private transport provided by a line of railway cars coupled together and drawn by a locomotive', 'name': 'train_(railroad_vehicle)'}, {'frequency': 'r', 'id': 1136, 'synset': 'trampoline.n.01', 'synonyms': ['trampoline'], 'def': 'gymnastic apparatus consisting of a strong canvas sheet attached with springs to a metal frame', 'name': 'trampoline'}, {'frequency': 'f', 'id': 1137, 'synset': 'tray.n.01', 'synonyms': ['tray'], 'def': 'an open receptacle for holding or displaying or serving articles or food', 'name': 'tray'}, {'frequency': 'r', 'id': 1138, 'synset': 'tree_house.n.01', 'synonyms': ['tree_house'], 'def': '(NOT A TREE) a PLAYHOUSE built in the branches of a tree', 'name': 'tree_house'}, {'frequency': 'r', 'id': 1139, 'synset': 'trench_coat.n.01', 'synonyms': ['trench_coat'], 'def': 'a military style raincoat; belted with deep pockets', 'name': 'trench_coat'}, {'frequency': 'r', 'id': 1140, 'synset': 'triangle.n.05', 'synonyms': ['triangle_(musical_instrument)'], 'def': 'a percussion instrument consisting of a metal bar bent in the shape of an open triangle', 'name': 'triangle_(musical_instrument)'}, {'frequency': 'r', 'id': 1141, 'synset': 'tricycle.n.01', 'synonyms': ['tricycle'], 'def': 'a vehicle with three wheels that is moved by foot pedals', 'name': 'tricycle'}, {'frequency': 'c', 'id': 1142, 'synset': 'tripod.n.01', 'synonyms': ['tripod'], 'def': 'a three-legged rack used for support', 'name': 'tripod'}, {'frequency': 'f', 'id': 1143, 'synset': 'trouser.n.01', 'synonyms': ['trousers', 'pants_(clothing)'], 'def': 'a garment extending from the waist to the knee or ankle, covering each leg separately', 'name': 'trousers'}, {'frequency': 'f', 'id': 1144, 'synset': 'truck.n.01', 'synonyms': ['truck'], 'def': 'an automotive vehicle suitable for hauling', 'name': 'truck'}, {'frequency': 'r', 'id': 1145, 'synset': 'truffle.n.03', 'synonyms': ['truffle_(chocolate)', 'chocolate_truffle'], 'def': 'creamy chocolate candy', 'name': 'truffle_(chocolate)'}, {'frequency': 'c', 'id': 1146, 'synset': 'trunk.n.02', 'synonyms': ['trunk'], 'def': 'luggage consisting of a large strong case used when traveling or for storage', 'name': 'trunk'}, {'frequency': 'r', 'id': 1147, 'synset': 'tub.n.02', 'synonyms': ['vat'], 'def': 'a large open vessel for holding or storing liquids', 'name': 'vat'}, {'frequency': 'c', 'id': 1148, 'synset': 'turban.n.01', 'synonyms': ['turban'], 'def': 'a traditional headdress consisting of a long scarf wrapped around the head', 'name': 'turban'}, {'frequency': 'r', 'id': 1149, 'synset': 'turkey.n.01', 'synonyms': ['turkey_(bird)'], 'def': 'large gallinaceous bird with fan-shaped tail; widely domesticated for food', 'name': 'turkey_(bird)'}, {'frequency': 'c', 'id': 1150, 'synset': 'turkey.n.04', 'synonyms': ['turkey_(food)'], 'def': 'flesh of large domesticated fowl usually roasted', 'name': 'turkey_(food)'}, {'frequency': 'r', 'id': 1151, 'synset': 'turnip.n.01', 'synonyms': ['turnip'], 'def': 'widely cultivated plant having a large fleshy edible white or yellow root', 'name': 'turnip'}, {'frequency': 'c', 'id': 1152, 'synset': 'turtle.n.02', 'synonyms': ['turtle'], 'def': 'any of various aquatic and land reptiles having a bony shell and flipper-like limbs for swimming', 'name': 'turtle'}, {'frequency': 'r', 'id': 1153, 'synset': 'turtleneck.n.01', 'synonyms': ['turtleneck_(clothing)', 'polo-neck'], 'def': 'a sweater or jersey with a high close-fitting collar', 'name': 'turtleneck_(clothing)'}, {'frequency': 'r', 'id': 1154, 'synset': 'typewriter.n.01', 'synonyms': ['typewriter'], 'def': 'hand-operated character printer for printing written messages one character at a time', 'name': 'typewriter'}, {'frequency': 'f', 'id': 1155, 'synset': 'umbrella.n.01', 'synonyms': ['umbrella'], 'def': 'a lightweight handheld collapsible canopy', 'name': 'umbrella'}, {'frequency': 'c', 'id': 1156, 'synset': 'underwear.n.01', 'synonyms': ['underwear', 'underclothes', 'underclothing', 'underpants'], 'def': 'undergarment worn next to the skin and under the outer garments', 'name': 'underwear'}, {'frequency': 'r', 'id': 1157, 'synset': 'unicycle.n.01', 'synonyms': ['unicycle'], 'def': 'a vehicle with a single wheel that is driven by pedals', 'name': 'unicycle'}, {'frequency': 'c', 'id': 1158, 'synset': 'urinal.n.01', 'synonyms': ['urinal'], 'def': 'a plumbing fixture (usually attached to the wall) used by men to urinate', 'name': 'urinal'}, {'frequency': 'r', 'id': 1159, 'synset': 'urn.n.01', 'synonyms': ['urn'], 'def': 'a large vase that usually has a pedestal or feet', 'name': 'urn'}, {'frequency': 'c', 'id': 1160, 'synset': 'vacuum.n.04', 'synonyms': ['vacuum_cleaner'], 'def': 'an electrical home appliance that cleans by suction', 'name': 'vacuum_cleaner'}, {'frequency': 'c', 'id': 1161, 'synset': 'valve.n.03', 'synonyms': ['valve'], 'def': 'control consisting of a mechanical device for controlling the flow of a fluid', 'name': 'valve'}, {'frequency': 'f', 'id': 1162, 'synset': 'vase.n.01', 'synonyms': ['vase'], 'def': 'an open jar of glass or porcelain used as an ornament or to hold flowers', 'name': 'vase'}, {'frequency': 'c', 'id': 1163, 'synset': 'vending_machine.n.01', 'synonyms': ['vending_machine'], 'def': 'a slot machine for selling goods', 'name': 'vending_machine'}, {'frequency': 'f', 'id': 1164, 'synset': 'vent.n.01', 'synonyms': ['vent', 'blowhole', 'air_vent'], 'def': 'a hole for the escape of gas or air', 'name': 'vent'}, {'frequency': 'c', 'id': 1165, 'synset': 'videotape.n.01', 'synonyms': ['videotape'], 'def': 'a video recording made on magnetic tape', 'name': 'videotape'}, {'frequency': 'r', 'id': 1166, 'synset': 'vinegar.n.01', 'synonyms': ['vinegar'], 'def': 'sour-tasting liquid produced usually by oxidation of the alcohol in wine or cider and used as a condiment or food preservative', 'name': 'vinegar'}, {'frequency': 'r', 'id': 1167, 'synset': 'violin.n.01', 'synonyms': ['violin', 'fiddle'], 'def': 'bowed stringed instrument that is the highest member of the violin family', 'name': 'violin'}, {'frequency': 'r', 'id': 1168, 'synset': 'vodka.n.01', 'synonyms': ['vodka'], 'def': 'unaged colorless liquor originating in Russia', 'name': 'vodka'}, {'frequency': 'r', 'id': 1169, 'synset': 'volleyball.n.02', 'synonyms': ['volleyball'], 'def': 'an inflated ball used in playing volleyball', 'name': 'volleyball'}, {'frequency': 'r', 'id': 1170, 'synset': 'vulture.n.01', 'synonyms': ['vulture'], 'def': 'any of various large birds of prey having naked heads and weak claws and feeding chiefly on carrion', 'name': 'vulture'}, {'frequency': 'c', 'id': 1171, 'synset': 'waffle.n.01', 'synonyms': ['waffle'], 'def': 'pancake batter baked in a waffle iron', 'name': 'waffle'}, {'frequency': 'r', 'id': 1172, 'synset': 'waffle_iron.n.01', 'synonyms': ['waffle_iron'], 'def': 'a kitchen appliance for baking waffles', 'name': 'waffle_iron'}, {'frequency': 'c', 'id': 1173, 'synset': 'wagon.n.01', 'synonyms': ['wagon'], 'def': 'any of various kinds of wheeled vehicles drawn by an animal or a tractor', 'name': 'wagon'}, {'frequency': 'c', 'id': 1174, 'synset': 'wagon_wheel.n.01', 'synonyms': ['wagon_wheel'], 'def': 'a wheel of a wagon', 'name': 'wagon_wheel'}, {'frequency': 'c', 'id': 1175, 'synset': 'walking_stick.n.01', 'synonyms': ['walking_stick'], 'def': 'a stick carried in the hand for support in walking', 'name': 'walking_stick'}, {'frequency': 'c', 'id': 1176, 'synset': 'wall_clock.n.01', 'synonyms': ['wall_clock'], 'def': 'a clock mounted on a wall', 'name': 'wall_clock'}, {'frequency': 'f', 'id': 1177, 'synset': 'wall_socket.n.01', 'synonyms': ['wall_socket', 'wall_plug', 'electric_outlet', 'electrical_outlet', 'outlet', 'electric_receptacle'], 'def': 'receptacle providing a place in a wiring system where current can be taken to run electrical devices', 'name': 'wall_socket'}, {'frequency': 'c', 'id': 1178, 'synset': 'wallet.n.01', 'synonyms': ['wallet', 'billfold'], 'def': 'a pocket-size case for holding papers and paper money', 'name': 'wallet'}, {'frequency': 'r', 'id': 1179, 'synset': 'walrus.n.01', 'synonyms': ['walrus'], 'def': 'either of two large northern marine mammals having ivory tusks and tough hide over thick blubber', 'name': 'walrus'}, {'frequency': 'r', 'id': 1180, 'synset': 'wardrobe.n.01', 'synonyms': ['wardrobe'], 'def': 'a tall piece of furniture that provides storage space for clothes; has a door and rails or hooks for hanging clothes', 'name': 'wardrobe'}, {'frequency': 'r', 'id': 1181, 'synset': 'wasabi.n.02', 'synonyms': ['wasabi'], 'def': 'the thick green root of the wasabi plant that the Japanese use in cooking and that tastes like strong horseradish', 'name': 'wasabi'}, {'frequency': 'c', 'id': 1182, 'synset': 'washer.n.03', 'synonyms': ['automatic_washer', 'washing_machine'], 'def': 'a home appliance for washing clothes and linens automatically', 'name': 'automatic_washer'}, {'frequency': 'f', 'id': 1183, 'synset': 'watch.n.01', 'synonyms': ['watch', 'wristwatch'], 'def': 'a small, portable timepiece', 'name': 'watch'}, {'frequency': 'f', 'id': 1184, 'synset': 'water_bottle.n.01', 'synonyms': ['water_bottle'], 'def': 'a bottle for holding water', 'name': 'water_bottle'}, {'frequency': 'c', 'id': 1185, 'synset': 'water_cooler.n.01', 'synonyms': ['water_cooler'], 'def': 'a device for cooling and dispensing drinking water', 'name': 'water_cooler'}, {'frequency': 'c', 'id': 1186, 'synset': 'water_faucet.n.01', 'synonyms': ['water_faucet', 'water_tap', 'tap_(water_faucet)'], 'def': 'a faucet for drawing water from a pipe or cask', 'name': 'water_faucet'}, {'frequency': 'r', 'id': 1187, 'synset': 'water_filter.n.01', 'synonyms': ['water_filter'], 'def': 'a filter to remove impurities from the water supply', 'name': 'water_filter'}, {'frequency': 'r', 'id': 1188, 'synset': 'water_heater.n.01', 'synonyms': ['water_heater', 'hot-water_heater'], 'def': 'a heater and storage tank to supply heated water', 'name': 'water_heater'}, {'frequency': 'r', 'id': 1189, 'synset': 'water_jug.n.01', 'synonyms': ['water_jug'], 'def': 'a jug that holds water', 'name': 'water_jug'}, {'frequency': 'r', 'id': 1190, 'synset': 'water_pistol.n.01', 'synonyms': ['water_gun', 'squirt_gun'], 'def': 'plaything consisting of a toy pistol that squirts water', 'name': 'water_gun'}, {'frequency': 'c', 'id': 1191, 'synset': 'water_scooter.n.01', 'synonyms': ['water_scooter', 'sea_scooter', 'jet_ski'], 'def': 'a motorboat resembling a motor scooter (NOT A SURFBOARD OR WATER SKI)', 'name': 'water_scooter'}, {'frequency': 'c', 'id': 1192, 'synset': 'water_ski.n.01', 'synonyms': ['water_ski'], 'def': 'broad ski for skimming over water towed by a speedboat (DO NOT MARK WATER)', 'name': 'water_ski'}, {'frequency': 'c', 'id': 1193, 'synset': 'water_tower.n.01', 'synonyms': ['water_tower'], 'def': 'a large reservoir for water', 'name': 'water_tower'}, {'frequency': 'c', 'id': 1194, 'synset': 'watering_can.n.01', 'synonyms': ['watering_can'], 'def': 'a container with a handle and a spout with a perforated nozzle; used to sprinkle water over plants', 'name': 'watering_can'}, {'frequency': 'c', 'id': 1195, 'synset': 'watermelon.n.02', 'synonyms': ['watermelon'], 'def': 'large oblong or roundish melon with a hard green rind and sweet watery red or occasionally yellowish pulp', 'name': 'watermelon'}, {'frequency': 'f', 'id': 1196, 'synset': 'weathervane.n.01', 'synonyms': ['weathervane', 'vane_(weathervane)', 'wind_vane'], 'def': 'mechanical device attached to an elevated structure; rotates freely to show the direction of the wind', 'name': 'weathervane'}, {'frequency': 'c', 'id': 1197, 'synset': 'webcam.n.01', 'synonyms': ['webcam'], 'def': 'a digital camera designed to take digital photographs and transmit them over the internet', 'name': 'webcam'}, {'frequency': 'c', 'id': 1198, 'synset': 'wedding_cake.n.01', 'synonyms': ['wedding_cake', 'bridecake'], 'def': 'a rich cake with two or more tiers and covered with frosting and decorations; served at a wedding reception', 'name': 'wedding_cake'}, {'frequency': 'c', 'id': 1199, 'synset': 'wedding_ring.n.01', 'synonyms': ['wedding_ring', 'wedding_band'], 'def': 'a ring given to the bride and/or groom at the wedding', 'name': 'wedding_ring'}, {'frequency': 'f', 'id': 1200, 'synset': 'wet_suit.n.01', 'synonyms': ['wet_suit'], 'def': 'a close-fitting garment made of a permeable material; worn in cold water to retain body heat', 'name': 'wet_suit'}, {'frequency': 'f', 'id': 1201, 'synset': 'wheel.n.01', 'synonyms': ['wheel'], 'def': 'a circular frame with spokes (or a solid disc) that can rotate on a shaft or axle', 'name': 'wheel'}, {'frequency': 'c', 'id': 1202, 'synset': 'wheelchair.n.01', 'synonyms': ['wheelchair'], 'def': 'a movable chair mounted on large wheels', 'name': 'wheelchair'}, {'frequency': 'c', 'id': 1203, 'synset': 'whipped_cream.n.01', 'synonyms': ['whipped_cream'], 'def': 'cream that has been beaten until light and fluffy', 'name': 'whipped_cream'}, {'frequency': 'r', 'id': 1204, 'synset': 'whiskey.n.01', 'synonyms': ['whiskey'], 'def': 'a liquor made from fermented mash of grain', 'name': 'whiskey'}, {'frequency': 'r', 'id': 1205, 'synset': 'whistle.n.03', 'synonyms': ['whistle'], 'def': 'a small wind instrument that produces a whistling sound by blowing into it', 'name': 'whistle'}, {'frequency': 'r', 'id': 1206, 'synset': 'wick.n.02', 'synonyms': ['wick'], 'def': 'a loosely woven cord in a candle or oil lamp that is lit on fire', 'name': 'wick'}, {'frequency': 'c', 'id': 1207, 'synset': 'wig.n.01', 'synonyms': ['wig'], 'def': 'hairpiece covering the head and made of real or synthetic hair', 'name': 'wig'}, {'frequency': 'c', 'id': 1208, 'synset': 'wind_chime.n.01', 'synonyms': ['wind_chime'], 'def': 'a decorative arrangement of pieces of metal or glass or pottery that hang together loosely so the wind can cause them to tinkle', 'name': 'wind_chime'}, {'frequency': 'c', 'id': 1209, 'synset': 'windmill.n.01', 'synonyms': ['windmill'], 'def': 'a mill that is powered by the wind', 'name': 'windmill'}, {'frequency': 'c', 'id': 1210, 'synset': 'window_box.n.01', 'synonyms': ['window_box_(for_plants)'], 'def': 'a container for growing plants on a windowsill', 'name': 'window_box_(for_plants)'}, {'frequency': 'f', 'id': 1211, 'synset': 'windshield_wiper.n.01', 'synonyms': ['windshield_wiper', 'windscreen_wiper', 'wiper_(for_windshield/screen)'], 'def': 'a mechanical device that cleans the windshield', 'name': 'windshield_wiper'}, {'frequency': 'c', 'id': 1212, 'synset': 'windsock.n.01', 'synonyms': ['windsock', 'air_sock', 'air-sleeve', 'wind_sleeve', 'wind_cone'], 'def': 'a truncated cloth cone mounted on a mast/pole; shows wind direction', 'name': 'windsock'}, {'frequency': 'f', 'id': 1213, 'synset': 'wine_bottle.n.01', 'synonyms': ['wine_bottle'], 'def': 'a bottle for holding wine', 'name': 'wine_bottle'}, {'frequency': 'r', 'id': 1214, 'synset': 'wine_bucket.n.01', 'synonyms': ['wine_bucket', 'wine_cooler'], 'def': 'a bucket of ice used to chill a bottle of wine', 'name': 'wine_bucket'}, {'frequency': 'f', 'id': 1215, 'synset': 'wineglass.n.01', 'synonyms': ['wineglass'], 'def': 'a glass that has a stem and in which wine is served', 'name': 'wineglass'}, {'frequency': 'r', 'id': 1216, 'synset': 'wing_chair.n.01', 'synonyms': ['wing_chair'], 'def': 'easy chair having wings on each side of a high back', 'name': 'wing_chair'}, {'frequency': 'c', 'id': 1217, 'synset': 'winker.n.02', 'synonyms': ['blinder_(for_horses)'], 'def': 'blinds that prevent a horse from seeing something on either side', 'name': 'blinder_(for_horses)'}, {'frequency': 'c', 'id': 1218, 'synset': 'wok.n.01', 'synonyms': ['wok'], 'def': 'pan with a convex bottom; used for frying in Chinese cooking', 'name': 'wok'}, {'frequency': 'r', 'id': 1219, 'synset': 'wolf.n.01', 'synonyms': ['wolf'], 'def': 'a wild carnivorous mammal of the dog family, living and hunting in packs', 'name': 'wolf'}, {'frequency': 'c', 'id': 1220, 'synset': 'wooden_spoon.n.02', 'synonyms': ['wooden_spoon'], 'def': 'a spoon made of wood', 'name': 'wooden_spoon'}, {'frequency': 'c', 'id': 1221, 'synset': 'wreath.n.01', 'synonyms': ['wreath'], 'def': 'an arrangement of flowers, leaves, or stems fastened in a ring', 'name': 'wreath'}, {'frequency': 'c', 'id': 1222, 'synset': 'wrench.n.03', 'synonyms': ['wrench', 'spanner'], 'def': 'a hand tool that is used to hold or twist a nut or bolt', 'name': 'wrench'}, {'frequency': 'c', 'id': 1223, 'synset': 'wristband.n.01', 'synonyms': ['wristband'], 'def': 'band consisting of a part of a sleeve that covers the wrist', 'name': 'wristband'}, {'frequency': 'f', 'id': 1224, 'synset': 'wristlet.n.01', 'synonyms': ['wristlet', 'wrist_band'], 'def': 'a band or bracelet worn around the wrist', 'name': 'wristlet'}, {'frequency': 'r', 'id': 1225, 'synset': 'yacht.n.01', 'synonyms': ['yacht'], 'def': 'an expensive vessel propelled by sail or power and used for cruising or racing', 'name': 'yacht'}, {'frequency': 'r', 'id': 1226, 'synset': 'yak.n.02', 'synonyms': ['yak'], 'def': 'large long-haired wild ox of Tibet often domesticated', 'name': 'yak'}, {'frequency': 'c', 'id': 1227, 'synset': 'yogurt.n.01', 'synonyms': ['yogurt', 'yoghurt', 'yoghourt'], 'def': 'a custard-like food made from curdled milk', 'name': 'yogurt'}, {'frequency': 'r', 'id': 1228, 'synset': 'yoke.n.07', 'synonyms': ['yoke_(animal_equipment)'], 'def': 'gear joining two animals at the neck; NOT egg yolk', 'name': 'yoke_(animal_equipment)'}, {'frequency': 'f', 'id': 1229, 'synset': 'zebra.n.01', 'synonyms': ['zebra'], 'def': 'any of several fleet black-and-white striped African equines', 'name': 'zebra'}, {'frequency': 'c', 'id': 1230, 'synset': 'zucchini.n.02', 'synonyms': ['zucchini', 'courgette'], 'def': 'small cucumber-shaped vegetable marrow; typically dark green', 'name': 'zucchini'}] # noqa # fmt: on ================================================ FILE: detectron2/data/datasets/pascal_voc.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from fvcore.common.file_io import PathManager import os import numpy as np import xml.etree.ElementTree as ET from detectron2.structures import BoxMode from detectron2.data import DatasetCatalog, MetadataCatalog __all__ = ["register_pascal_voc"] # fmt: off CLASS_NAMES = [ "aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", "chair", "cow", "diningtable", "dog", "horse", "motorbike", "person", "pottedplant", "sheep", "sofa", "train", "tvmonitor", ] # fmt: on def load_voc_instances(dirname: str, split: str): """ Load Pascal VOC detection annotations to Detectron2 format. Args: dirname: Contain "Annotations", "ImageSets", "JPEGImages" split (str): one of "train", "test", "val", "trainval" """ with PathManager.open(os.path.join(dirname, "ImageSets", "Main", split + ".txt")) as f: fileids = np.loadtxt(f, dtype=np.str) dicts = [] for fileid in fileids: anno_file = os.path.join(dirname, "Annotations", fileid + ".xml") jpeg_file = os.path.join(dirname, "JPEGImages", fileid + ".jpg") tree = ET.parse(anno_file) r = { "file_name": jpeg_file, "image_id": fileid, "height": int(tree.findall("./size/height")[0].text), "width": int(tree.findall("./size/width")[0].text), } instances = [] for obj in tree.findall("object"): cls = obj.find("name").text # We include "difficult" samples in training. # Based on limited experiments, they don't hurt accuracy. # difficult = int(obj.find("difficult").text) # if difficult == 1: # continue bbox = obj.find("bndbox") bbox = [float(bbox.find(x).text) for x in ["xmin", "ymin", "xmax", "ymax"]] # Original annotations are integers in the range [1, W or H] # Assuming they mean 1-based pixel indices (inclusive), # a box with annotation (xmin=1, xmax=W) covers the whole image. # In coordinate space this is represented by (xmin=0, xmax=W) bbox[0] -= 1.0 bbox[1] -= 1.0 instances.append( {"category_id": CLASS_NAMES.index(cls), "bbox": bbox, "bbox_mode": BoxMode.XYXY_ABS} ) r["annotations"] = instances dicts.append(r) return dicts def register_pascal_voc(name, dirname, split, year): DatasetCatalog.register(name, lambda: load_voc_instances(dirname, split)) MetadataCatalog.get(name).set( thing_classes=CLASS_NAMES, dirname=dirname, year=year, split=split ) ================================================ FILE: detectron2/data/datasets/register_coco.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy from detectron2.data import DatasetCatalog, MetadataCatalog from .coco import load_coco_json, load_sem_seg """ This file contains functions to register a COCO-format dataset to the DatasetCatalog. """ __all__ = ["register_coco_instances", "register_coco_panoptic_separated"] def register_coco_instances(name, metadata, json_file, image_root): """ Register a dataset in COCO's json annotation format for instance detection, instance segmentation and keypoint detection. (i.e., Type 1 and 2 in http://cocodataset.org/#format-data. `instances*.json` and `person_keypoints*.json` in the dataset). This is an example of how to register a new dataset. You can do something similar to this function, to register new datasets. Args: name (str): the name that identifies a dataset, e.g. "coco_2014_train". metadata (dict): extra metadata associated with this dataset. You can leave it as an empty dict. json_file (str): path to the json instance annotation file. image_root (str): directory which contains all the images. """ # 1. register a function which returns dicts DatasetCatalog.register(name, lambda: load_coco_json(json_file, image_root, name)) # 2. Optionally, add metadata about this dataset, # since they might be useful in evaluation, visualization or logging MetadataCatalog.get(name).set( json_file=json_file, image_root=image_root, evaluator_type="coco", **metadata ) def register_coco_panoptic_separated( name, metadata, image_root, panoptic_root, panoptic_json, sem_seg_root, instances_json ): """ Register a COCO panoptic segmentation dataset named `name`. The annotations in this registered dataset will contain both instance annotations and semantic annotations, each with its own contiguous ids. Hence it's called "separated". It follows the setting used by the PanopticFPN paper: 1. The instance annotations directly come from polygons in the COCO instances annotation task, rather than from the masks in the COCO panoptic annotations. The two format have small differences: Polygons in the instance annotations may have overlaps. The mask annotations are produced by labeling the overlapped polygons with depth ordering. 2. The semantic annotations are converted from panoptic annotations, where all "things" are assigned a semantic id of 0. All semantic categories will therefore have ids in contiguous range [1, #stuff_categories]. This function will also register a pure semantic segmentation dataset named ``name + '_stuffonly'``. Args: name (str): the name that identifies a dataset, e.g. "coco_2017_train_panoptic" metadata (str): extra metadata associated with this dataset. image_root (str): directory which contains all the images panoptic_root (str): directory which contains panoptic annotation images panoptic_json (str): path to the json panoptic annotation file sem_seg_root (str): directory which contains all the ground truth segmentation annotations. instances_json (str): path to the json instance annotation file """ panoptic_name = name + "_separated" DatasetCatalog.register( panoptic_name, lambda: merge_to_panoptic( load_coco_json(instances_json, image_root, panoptic_name), load_sem_seg(sem_seg_root, image_root), ), ) MetadataCatalog.get(panoptic_name).set( panoptic_root=panoptic_root, image_root=image_root, panoptic_json=panoptic_json, sem_seg_root=sem_seg_root, json_file=instances_json, # TODO rename evaluator_type="coco_panoptic_seg", **metadata ) semantic_name = name + "_stuffonly" DatasetCatalog.register(semantic_name, lambda: load_sem_seg(sem_seg_root, image_root)) MetadataCatalog.get(semantic_name).set( sem_seg_root=sem_seg_root, image_root=image_root, evaluator_type="sem_seg", **metadata ) def merge_to_panoptic(detection_dicts, sem_seg_dicts): """ Create dataset dicts for panoptic segmentation, by merging two dicts using "file_name" field to match their entries. Args: detection_dicts (list[dict]): lists of dicts for object detection or instance segmentation. sem_seg_dicts (list[dict]): lists of dicts for semantic segmentation. Returns: list[dict] (one per input image): Each dict contains all (key, value) pairs from dicts in both detection_dicts and sem_seg_dicts that correspond to the same image. The function assumes that the same key in different dicts has the same value. """ results = [] sem_seg_file_to_entry = {x["file_name"]: x for x in sem_seg_dicts} assert len(sem_seg_file_to_entry) > 0 for det_dict in detection_dicts: dic = copy.copy(det_dict) dic.update(sem_seg_file_to_entry[dic["file_name"]]) results.append(dic) return results ================================================ FILE: detectron2/data/datasets/register_soba.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy from detectron2.data import DatasetCatalog, MetadataCatalog from .soba import load_soba_json, load_sem_seg """ This file contains functions to register a soba-format dataset to the DatasetCatalog. """ __all__ = ["register_soba_instances", "register_soba_panoptic_separated"] def register_soba_instances(name, metadata, json_file, image_root): """ Register a dataset in soba's json annotation format for instance detection, instance segmentation and keypoint detection. (i.e., Type 1 and 2 in http://sobadataset.org/#format-data. `instances*.json` and `person_keypoints*.json` in the dataset). This is an example of how to register a new dataset. You can do something similar to this function, to register new datasets. Args: name (str): the name that identifies a dataset, e.g. "soba_2014_train". metadata (dict): extra metadata associated with this dataset. You can leave it as an empty dict. json_file (str): path to the json instance annotation file. image_root (str): directory which contains all the images. """ # 1. register a function which returns dicts DatasetCatalog.register(name, lambda: load_soba_json(json_file, image_root, name)) # 2. Optionally, add metadata about this dataset, # since they might be useful in evaluation, visualization or logging MetadataCatalog.get(name).set( json_file=json_file, image_root=image_root, evaluator_type="soba", **metadata ) def register_soba_panoptic_separated( name, metadata, image_root, panoptic_root, panoptic_json, sem_seg_root, instances_json ): """ Register a soba panoptic segmentation dataset named `name`. The annotations in this registered dataset will contain both instance annotations and semantic annotations, each with its own contiguous ids. Hence it's called "separated". It follows the setting used by the PanopticFPN paper: 1. The instance annotations directly come from polygons in the soba instances annotation task, rather than from the masks in the soba panoptic annotations. The two format have small differences: Polygons in the instance annotations may have overlaps. The mask annotations are produced by labeling the overlapped polygons with depth ordering. 2. The semantic annotations are converted from panoptic annotations, where all "things" are assigned a semantic id of 0. All semantic categories will therefore have ids in contiguous range [1, #stuff_categories]. This function will also register a pure semantic segmentation dataset named ``name + '_stuffonly'``. Args: name (str): the name that identifies a dataset, e.g. "soba_2017_train_panoptic" metadata (str): extra metadata associated with this dataset. image_root (str): directory which contains all the images panoptic_root (str): directory which contains panoptic annotation images panoptic_json (str): path to the json panoptic annotation file sem_seg_root (str): directory which contains all the ground truth segmentation annotations. instances_json (str): path to the json instance annotation file """ panoptic_name = name + "_separated" DatasetCatalog.register( panoptic_name, lambda: merge_to_panoptic( load_soba_json(instances_json, image_root, panoptic_name), load_sem_seg(sem_seg_root, image_root), ), ) MetadataCatalog.get(panoptic_name).set( panoptic_root=panoptic_root, image_root=image_root, panoptic_json=panoptic_json, sem_seg_root=sem_seg_root, json_file=instances_json, # TODO rename evaluator_type="soba_panoptic_seg", **metadata ) semantic_name = name + "_stuffonly" DatasetCatalog.register(semantic_name, lambda: load_sem_seg(sem_seg_root, image_root)) MetadataCatalog.get(semantic_name).set( sem_seg_root=sem_seg_root, image_root=image_root, evaluator_type="sem_seg", **metadata ) def merge_to_panoptic(detection_dicts, sem_seg_dicts): """ Create dataset dicts for panoptic segmentation, by merging two dicts using "file_name" field to match their entries. Args: detection_dicts (list[dict]): lists of dicts for object detection or instance segmentation. sem_seg_dicts (list[dict]): lists of dicts for semantic segmentation. Returns: list[dict] (one per input image): Each dict contains all (key, value) pairs from dicts in both detection_dicts and sem_seg_dicts that correspond to the same image. The function assumes that the same key in different dicts has the same value. """ results = [] sem_seg_file_to_entry = {x["file_name"]: x for x in sem_seg_dicts} assert len(sem_seg_file_to_entry) > 0 for det_dict in detection_dicts: dic = copy.copy(det_dict) dic.update(sem_seg_file_to_entry[dic["file_name"]]) results.append(dic) return results ================================================ FILE: detectron2/data/datasets/soba.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import io import logging import contextlib import os from PIL import Image from fvcore.common.timer import Timer from detectron2.structures import BoxMode from fvcore.common.file_io import PathManager from .. import MetadataCatalog, DatasetCatalog """ This file contains functions to parse SOBA-format annotations into dicts in "Detectron2 format". """ logger = logging.getLogger(__name__) __all__ = ["load_soba_json", "load_sem_seg"] def load_soba_json(json_file, image_root, dataset_name=None): """ Load a json file with SOBA's instances annotation format. Currently supports instance detection, instance segmentation, person keypoints and densepose annotations. Args: json_file (str): full path to the json file in SOBA instances annotation format. image_root (str): the directory where the images in this json file exists. dataset_name (str): the name of the dataset (e.g., soba_2017_train). If provided, this function will also put "thing_classes" into the metadata associated with this dataset. Returns: list[dict]: a list of dicts in Detectron2 standard format. (See `Using Custom Datasets `_ ) Notes: 1. This function does not read the image files. The results do not have the "image" field. """ from pysobatools.soba import SOBA timer = Timer() json_file = PathManager.get_local_path(json_file) with contextlib.redirect_stdout(io.StringIO()): soba_api = SOBA(json_file) if timer.seconds() > 1: logger.info("Loading {} takes {:.2f} seconds.".format(json_file, timer.seconds())) id_map = None if dataset_name is not None: meta = MetadataCatalog.get(dataset_name) cat_ids = sorted(soba_api.getCatIds()) association_ids = soba_api.getAssoIds() cats = soba_api.loadCats(cat_ids) # association_cats = soba_api.loadAsso(association_ids) association = soba_api.loadAsso(association_ids) # The categories in a custom json file may not be sorted. thing_classes = [c["name"] for c in sorted(cats, key=lambda x: x["id"])] association_classes = [c["name"] for c in sorted(association, key=lambda x: x["id"])] meta.association_classes = association_classes meta.thing_classes = thing_classes meta.keypoint_names = ['Object','Shadow'] meta.keypoint_flip_map = ({'Object':'Shadow'}) meta.keypoint_connection_rules = [('Object','Shadow',(255,255,255))] # meta # In SOBA, certain category ids are artificially removed, # and by convention they are always ignored. # We deal with SOBA's id issue and translate # the category ids to contiguous ids in [0, 80). # It works by looking at the "categories" field in the json, therefore # if users' own json also have incontiguous ids, we'll # apply this mapping as well but print a warning. if not (min(cat_ids) == 1 and max(cat_ids) == len(cat_ids)): if "soba" not in dataset_name: logger.warning( """ Category ids in annotations are not in [1, #categories]! We'll apply a mapping for you. """ ) id_map = {v: i for i, v in enumerate(cat_ids)} association_id_map = {v:i for i,v in enumerate(association_ids)} meta.association_dataset_id_to_contiguous_id = association_id_map meta.thing_dataset_id_to_contiguous_id = id_map # sort indices for reproducible results img_ids = sorted(list(soba_api.imgs.keys())) # imgs is a list of dicts, each looks something like: # {'license': 4, # 'url': 'http://farm6.staticflickr.com/5454/9413846304_881d5e5c3b_z.jpg', # 'file_name': 'SOBA_val2014_000000001268.jpg', # 'height': 427, # 'width': 640, # 'date_captured': '2013-11-17 05:57:24', # 'id': 1268} imgs = soba_api.loadImgs(img_ids) # anns is a list[list[dict]], where each dict is an annotation # record for an object. The inner list enumerates the objects in an image # and the outer list enumerates over images. Example of anns[0]: # [{'segmentation': [[192.81, # 247.09, # ... # 219.03, # 249.06]], # 'area': 1035.749, # 'iscrowd': 0, # 'image_id': 1268, # 'bbox': [192.81, 224.8, 74.73, 33.43], # 'category_id': 16, # 'id': 42986}, # ...] anns = [soba_api.imgToAnns[img_id] for img_id in img_ids] assoAnns = [soba_api.imgToAssoAnns[img_id] for img_id in img_ids] if "minival" not in json_file: # The popular valminusminival & minival annotations for SOBA2014 contain this bug. # However the ratio of buggy annotations there is tiny and does not affect accuracy. # Therefore we explicitly white-list them. ann_ids = [ann["id"] for anns_per_image in anns for ann in anns_per_image] asso_ann_ids = [assoAnn["id"] for anns_per_image in assoAnns for assoAnn in anns_per_image ] assert len(set(ann_ids)) == len(ann_ids), "Annotation ids in '{}' are not unique!".format( json_file ) imgs_anns = list(zip(imgs, anns)) imgs_asso_anns = list(zip(imgs,assoAnns)) logger.info("Loaded {} images in SOBA format from {}".format(len(imgs_anns), json_file)) dataset_dicts = [] # TODO: refactoring candidate, one should not have to alter DB reader # every time new data type is added DENSEPOSE_KEYS = ["dp_x", "dp_y", "dp_I", "dp_U", "dp_V", "dp_masks"] num_instances_without_valid_segmentation = 0 for (img_dict, anno_dict_list),(_,asso_anno_dict_list) in zip(imgs_anns,imgs_asso_anns): record = {} record["file_name"] = os.path.join(image_root, img_dict["file_name"]) record["height"] = img_dict["height"] record["width"] = img_dict["width"] image_id = record["image_id"] = img_dict["id"] objs = [] for anno in anno_dict_list: # Check that the image_id in this annotation is the same as # the image_id we're looking at. # This fails only when the data parsing logic or the annotation file is buggy. # The original SOBA valminusminival2014 & minival2014 annotation files # actually contains bugs that, together with certain ways of using SOBA API, # can trigger this assertion. assert anno["image_id"] == image_id assert anno.get("ignore", 0) == 0 obj = { field: anno[field] for field in ["iscrowd", "bbox","keypoints", "category_id"] + DENSEPOSE_KEYS if field in anno } segm = anno.get("segmentation", None) if segm: # either list[list[float]] or dict(RLE) if not isinstance(segm, dict): # filter out invalid polygons (< 3 points) segm = [poly for poly in segm if len(poly) % 2 == 0 and len(poly) >= 6] if len(segm) == 0: num_instances_without_valid_segmentation += 1 continue # ignore this instance obj["segmentation"] = segm keypts = anno.get("keypoints", None) if keypts: # list[int] for idx, v in enumerate(keypts): if idx % 3 != 2: # SOBA's segmentation coordinates are floating points in [0, H or W], # but keypoint coordinates are integers in [0, H-1 or W-1] # Therefore we assume the coordinates are "pixel indices" and # add 0.5 to convert to floating point coordinates. keypts[idx] = v + 0.5 obj["keypoints"] = keypts obj["bbox_mode"] = BoxMode.XYWH_ABS if id_map: obj["category_id"] = id_map[obj["category_id"]] objs.append(obj) record["annotations"] = objs objs = [] for anno in asso_anno_dict_list: # Check that the image_id in this annotation is the same as # the image_id we're looking at. # This fails only when the data parsing logic or the annotation file is buggy. # The original SOBA valminusminival2014 & minival2014 annotation files # actually contains bugs that, together with certain ways of using SOBA API, # can trigger this assertion. assert anno["image_id"] == image_id assert anno.get("ignore", 0) == 0 obj = { field: anno[field] for field in ["iscrowd", "bbox",'light', "keypoints", "category_id"] + DENSEPOSE_KEYS if field in anno } segm = anno.get("segmentation", None) if segm: # either list[list[float]] or dict(RLE) if not isinstance(segm, dict): # filter out invalid polygons (< 3 points) segm = [poly for poly in segm if len(poly) % 2 == 0 and len(poly) >= 6] if len(segm) == 0: num_instances_without_valid_segmentation += 1 continue # ignore this instance obj["segmentation"] = segm keypts = anno.get("keypoints", None) if keypts: # list[int] for idx, v in enumerate(keypts): if idx % 3 != 2: # SOBA's segmentation coordinates are floating points in [0, H or W], # but keypoint coordinates are integers in [0, H-1 or W-1] # Therefore we assume the coordinates are "pixel indices" and # add 0.5 to convert to floating point coordinates. keypts[idx] = v + 0.5 obj["keypoints"] = keypts obj["bbox_mode"] = BoxMode.XYWH_ABS if id_map: obj["category_id"] = id_map[obj["category_id"]] objs.append(obj) record["association_anno"] = objs dataset_dicts.append(record) if num_instances_without_valid_segmentation > 0: logger.warn( "Filtered out {} instances without valid segmentation. " "There might be issues in your dataset generation process.".format( num_instances_without_valid_segmentation ) ) return dataset_dicts # TODO this function is not specific to SOBA, except for the "image_id" logic. def load_sem_seg(gt_root, image_root, gt_ext="png", image_ext="jpg"): """ Load semantic segmentation datasets. All files under "gt_root" with "gt_ext" extension are treated as ground truth annotations and all files under "image_root" with "image_ext" extension as input images. Ground truth and input images are matched using file paths relative to "gt_root" and "image_root" respectively without taking into account file extensions. Args: gt_root (str): full path to ground truth semantic segmentation files. Semantic segmentation annotations are stored as images with integer values in pixels that represent corresponding semantic labels. image_root (str): the directory where the input images are. gt_ext (str): file extension for ground truth annotations. image_ext (str): file extension for input images. Returns: list[dict]: a list of dicts in detectron2 standard format without instance-level annotation. Notes: 1. This function does not read the image and ground truth files. The results do not have the "image" and "sem_seg" fields. """ # We match input images with ground truth based on their relative filepaths (without file # extensions) starting from 'image_root' and 'gt_root' respectively. SOBA API works with integer # IDs, hence, we try to convert these paths to int if possible. def file2id(folder_path, file_path): # TODO id is not used. # extract relative path starting from `folder_path` image_id = os.path.normpath(os.path.relpath(file_path, start=folder_path)) # remove file extension image_id = os.path.splitext(image_id)[0] try: image_id = int(image_id) except ValueError: pass return image_id input_files = sorted( (os.path.join(image_root, f) for f in PathManager.ls(image_root) if f.endswith(image_ext)), key=lambda file_path: file2id(image_root, file_path), ) gt_files = sorted( (os.path.join(gt_root, f) for f in PathManager.ls(gt_root) if f.endswith(gt_ext)), key=lambda file_path: file2id(gt_root, file_path), ) assert len(gt_files) > 0, "No annotations found in {}.".format(gt_root) # Use the intersection, so that val2017_100 annotations can run smoothly with val2017 images if len(input_files) != len(gt_files): logger.warn( "Directory {} and {} has {} and {} files, respectively.".format( image_root, gt_root, len(input_files), len(gt_files) ) ) input_basenames = [os.path.basename(f)[: -len(image_ext)] for f in input_files] gt_basenames = [os.path.basename(f)[: -len(gt_ext)] for f in gt_files] intersect = list(set(input_basenames) & set(gt_basenames)) # sort, otherwise each worker may obtain a list[dict] in different order intersect = sorted(intersect) logger.warn("Will use their intersection of {} files.".format(len(intersect))) input_files = [os.path.join(image_root, f + image_ext) for f in intersect] gt_files = [os.path.join(gt_root, f + gt_ext) for f in intersect] logger.info( "Loaded {} images with semantic segmentation from {}".format(len(input_files), image_root) ) dataset_dicts = [] for (img_path, gt_path) in zip(input_files, gt_files): record = {} record["file_name"] = img_path record["sem_seg_file_name"] = gt_path record["image_id"] = file2id(image_root, img_path) assert record["image_id"] == file2id( gt_root, gt_path ), "there is no ground truth for {}".format(img_path) with PathManager.open(gt_path, "rb") as f: img = Image.open(f) w, h = img.size record["height"] = h record["width"] = w dataset_dicts.append(record) return dataset_dicts if __name__ == "__main__": """ Test the SOBA json dataset loader. Usage: python -m detectron2.data.datasets.soba \ path/to/json path/to/image_root dataset_name "dataset_name" can be "soba_2014_minival_100", or other pre-registered ones """ import numpy as np from detectron2.utils.logger import setup_logger from detectron2.utils.visualizer import Visualizer import detectron2.data.datasets # noqa # add pre-defined metadata import sys logger = setup_logger(name=__name__) assert sys.argv[3] in DatasetCatalog.list() meta = MetadataCatalog.get(sys.argv[3]) dicts = load_soba_json(sys.argv[1], sys.argv[2], sys.argv[3]) logger.info("Done loading {} samples.".format(len(dicts))) dirname = "soba-data-vis" os.makedirs(dirname, exist_ok=True) for d in dicts: img = np.array(Image.open(d["file_name"])) visualizer = Visualizer(img, metadata=meta) vis = visualizer.draw_dataset_dict(d) fpath = os.path.join(dirname, os.path.basename(d["file_name"])) vis.save(fpath) ================================================ FILE: detectron2/data/detection_utils.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ Common data processing utilities that are used in a typical object detection data pipeline. """ import logging import numpy as np import torch from fvcore.common.file_io import PathManager from PIL import Image import pysobatools.mask as mask_util from detectron2.structures import ( BitMasks, Boxes, BoxMode, Instances, Keypoints, PolygonMasks, RotatedBoxes, ) from . import transforms as T from .catalog import MetadataCatalog class SizeMismatchError(ValueError): """ When loaded image has difference width/height compared with annotation. """ def read_image(file_name, format=None): """ Read an image into the given format. Args: dataset_dict (dict): Metadata of one image, in Detectron2 Dataset format. format (dict): one of the supported image modes in PIL, or "BGR" Returns: image (np.ndarray): an HWC image """ with PathManager.open(file_name, "rb") as f: image = Image.open(f) if format is not None: # PIL only supports RGB, so convert to RGB and flip channels over below conversion_format = format if format == "BGR": conversion_format = "RGB" image = image.convert(conversion_format) image = np.asarray(image) if format == "BGR": # flip channels if needed image = image[:, :, ::-1] # PIL squeezes out the channel dimension for "L", so make it HWC if format == "L": image = np.expand_dims(image, -1) return image def check_image_size(dataset_dict, image): """ Raise an error if the image does not match the size specified in the dict. """ if "width" in dataset_dict or "height" in dataset_dict: image_wh = (image.shape[1], image.shape[0]) expected_wh = (dataset_dict["width"], dataset_dict["height"]) if not image_wh == expected_wh: raise SizeMismatchError( "mismatch (W,H), got {}, expect {}, name {}".format(image_wh, expected_wh,dataset_dict["file_name"]) ) def transform_proposals(dataset_dict, image_shape, transforms, min_box_side_len, proposal_topk): """ Apply transformations to the proposals in dataset_dict, if any. Args: dataset_dict (dict): a dict read from the dataset, possibly contains fields "proposal_boxes", "proposal_objectness_logits", "proposal_bbox_mode" image_shape (tuple): height, width transforms (TransformList): min_box_side_len (int): keep proposals with at least this size proposal_topk (int): only keep top-K scoring proposals The input dict is modified in-place, with abovementioned keys removed. A new key "proposals" will be added. Its value is an `Instances` object which contains the transformed proposals in its field "proposal_boxes" and "objectness_logits". """ if "proposal_boxes" in dataset_dict: # Transform proposal boxes boxes = transforms.apply_box( BoxMode.convert( dataset_dict.pop("proposal_boxes"), dataset_dict.pop("proposal_bbox_mode"), BoxMode.XYXY_ABS, ) ) boxes = Boxes(boxes) objectness_logits = torch.as_tensor( dataset_dict.pop("proposal_objectness_logits").astype("float32") ) boxes.clip(image_shape) keep = boxes.nonempty(threshold=min_box_side_len) boxes = boxes[keep] objectness_logits = objectness_logits[keep] proposals = Instances(image_shape) proposals.proposal_boxes = boxes[:proposal_topk] proposals.objectness_logits = objectness_logits[:proposal_topk] dataset_dict["proposals"] = proposals def transform_instance_annotations( annotation, transforms, image_size, *, keypoint_hflip_indices=None ): """ Apply transforms to box, segmentation and keypoints of annotations of a single instance. It will use `transforms.apply_box` for the box, and `transforms.apply_coords` for segmentation polygons & keypoints. If you need anything more specially designed for each data structure, you'll need to implement your own version of this function or the transforms. Args: annotation (dict): dict of instance annotations for a single instance. transforms (TransformList): image_size (tuple): the height, width of the transformed image keypoint_hflip_indices (ndarray[int]): see `create_keypoint_hflip_indices`. Returns: dict: the same input dict with fields "bbox", "segmentation", "keypoints" transformed according to `transforms`. The "bbox_mode" field will be set to XYXY_ABS. """ bbox = BoxMode.convert(annotation["bbox"], annotation["bbox_mode"], BoxMode.XYXY_ABS) if 'light' in annotation.keys(): light = BoxMode.convert(annotation['light'], annotation["bbox_mode"],BoxMode.XYXY_ABS) annotation["light"] = transforms.apply_box([light])[0] # Note that bbox is 1d (per-instance bounding box) annotation["bbox"] = transforms.apply_box([bbox])[0] annotation["bbox_mode"] = BoxMode.XYXY_ABS # annotation["light"] = transforms.apply_box([light])[0] if "segmentation" in annotation: # each instance contains 1 or more polygons # print(annotation["segmentation"]) # polygons = [np.asarray(p).reshape(-1, 2) for p in annotation["segmentation"]] # annotation["segmentation"] = [p.reshape(-1) for p in transforms.apply_polygons(polygons)] segm = annotation["segmentation"] if isinstance(segm, list): # polygons polygons = [np.asarray(p).reshape(-1, 2) for p in segm] annotation["segmentation"] = [ p.reshape(-1) for p in transforms.apply_polygons(polygons) ] elif isinstance(segm, dict): # RLE mask = mask_util.decode(segm) mask = transforms.apply_segmentation(mask) assert tuple(mask.shape[:2]) == image_size annotation["segmentation"] = mask else: raise ValueError( "Cannot transform segmentation of type '{}'!" "Supported types are: polygons as list[list[float] or ndarray]," " COCO-style RLE as a dict.".format(type(segm)) ) if "keypoints" in annotation: keypoints = transform_keypoint_annotations( annotation["keypoints"], transforms, image_size, keypoint_hflip_indices ) annotation["keypoints"] = keypoints return annotation def transform_keypoint_annotations(keypoints, transforms, image_size, keypoint_hflip_indices=None): """ Transform keypoint annotations of an image. Args: keypoints (list[float]): Nx3 float in Detectron2 Dataset format. transforms (TransformList): image_size (tuple): the height, width of the transformed image keypoint_hflip_indices (ndarray[int]): see `create_keypoint_hflip_indices`. """ # (N*3,) -> (N, 3) keypoints = np.asarray(keypoints, dtype="float64").reshape(-1, 3) keypoints[:, :2] = transforms.apply_coords(keypoints[:, :2]) # This assumes that HorizFlipTransform is the only one that does flip do_hflip = sum(isinstance(t, T.HFlipTransform) for t in transforms.transforms) % 2 == 1 # Alternative way: check if probe points was horizontally flipped. # probe = np.asarray([[0.0, 0.0], [image_width, 0.0]]) # probe_aug = transforms.apply_coords(probe.copy()) # do_hflip = np.sign(probe[1][0] - probe[0][0]) != np.sign(probe_aug[1][0] - probe_aug[0][0]) # noqa # If flipped, swap each keypoint with its opposite-handed equivalent if do_hflip: assert keypoint_hflip_indices is not None keypoints = keypoints[keypoint_hflip_indices, :] # Maintain COCO convention that if visibility == 0, then x, y = 0 # TODO may need to reset visibility for cropped keypoints, # but it does not matter for our existing algorithms keypoints[keypoints[:, 2] == 0] = 0 return keypoints def annotations_to_instances(annos, image_size, mask_format="polygon"): """ Create an :class:`Instances` object used by the models, from instance annotations in the dataset dict. Args: annos (list[dict]): a list of instance annotations in one image, each element for one instance. image_size (tuple): height, width Returns: Instances: It will contain fields "gt_boxes", "gt_classes", "gt_masks", "gt_keypoints", if they can be obtained from `annos`. This is the format that builtin models expect. """ boxes = [BoxMode.convert(obj["bbox"], obj["bbox_mode"], BoxMode.XYXY_ABS) for obj in annos] target = Instances(image_size) boxes = target.gt_boxes = Boxes(boxes) if 'light' in annos[0].keys(): light = [BoxMode.convert(obj['light'],obj["bbox_mode"], BoxMode.XYXY_ABS) for obj in annos] light = target.gt_light = Boxes(light) light.clip(image_size) boxes.clip(image_size) classes = [obj["category_id"] for obj in annos] classes = torch.tensor(classes, dtype=torch.int64) target.gt_classes = classes if len(annos) and "segmentation" in annos[0]: polygons = [obj["segmentation"] for obj in annos] if mask_format == "polygon": masks = PolygonMasks(polygons) else: assert mask_format == "bitmask", mask_format masks = [] for segm in polygons: if isinstance(segm, list): # polygon masks.append(BitMasks.from_polygon_masks(segm, *image_size)) elif isinstance(segm, dict): # COCO RLE masks.append(mask_util.decode(segm)) elif isinstance(segm, np.ndarray): assert segm.ndim == 2, "Expect segmentation of 2 dimensions, got {}.".format( segm.ndim ) # mask array masks.append(segm) else: raise ValueError( "Cannot convert segmentation of type '{}' to BitMasks!" "Supported types are: polygons as list[list[float] or ndarray]," " COCO-style RLE as a dict, or a binary segmentation mask " " in a 2D numpy array of shape HxW.".format(type(segm)) ) # torch.from_numpy does not support array with negative stride. masks = BitMasks( torch.stack([torch.from_numpy(np.ascontiguousarray(x)) for x in masks]) ) target.gt_masks = masks if len(annos) and "keypoints" in annos[0]: kpts = [obj.get("keypoints", []) for obj in annos] target.gt_keypoints = Keypoints(kpts) return target def annotations_to_instances_rotated(annos, image_size): """ Create an :class:`Instances` object used by the models, from instance annotations in the dataset dict. Compared to `annotations_to_instances`, this function is for rotated boxes only Args: annos (list[dict]): a list of instance annotations in one image, each element for one instance. image_size (tuple): height, width Returns: Instances: Containing fields "gt_boxes", "gt_classes", if they can be obtained from `annos`. This is the format that builtin models expect. """ boxes = [obj["bbox"] for obj in annos] target = Instances(image_size) boxes = target.gt_boxes = RotatedBoxes(boxes) boxes.clip(image_size) classes = [obj["category_id"] for obj in annos] classes = torch.tensor(classes, dtype=torch.int64) target.gt_classes = classes return target def filter_empty_instances(instances, by_box=True, by_mask=True): """ Filter out empty instances in an `Instances` object. Args: instances (Instances): by_box (bool): whether to filter out instances with empty boxes by_mask (bool): whether to filter out instances with empty masks Returns: Instances: the filtered instances. """ assert by_box or by_mask r = [] if by_box: r.append(instances.gt_boxes.nonempty()) if instances.has("gt_masks") and by_mask: r.append(instances.gt_masks.nonempty() & (instances.gt_masks.tensor.sum(1).sum(1) > 20.0)) # TODO: can also filter visible keypoints if not r: return instances m = r[0] for x in r[1:]: m = m & x return instances[m] def create_keypoint_hflip_indices(dataset_names): """ Args: dataset_names (list[str]): list of dataset names Returns: ndarray[int]: a vector of size=#keypoints, storing the horizontally-flipped keypoint indices. """ check_metadata_consistency("keypoint_names", dataset_names) check_metadata_consistency("keypoint_flip_map", dataset_names) meta = MetadataCatalog.get(dataset_names[0]) names = meta.keypoint_names # print(names) # TODO flip -> hflip flip_map = dict(meta.keypoint_flip_map) flip_map.update({v: k for k, v in flip_map.items()}) flipped_names = [i if i not in flip_map else flip_map[i] for i in names] flip_indices = [names.index(i) for i in flipped_names] return np.asarray(flip_indices) def gen_crop_transform_with_instance(crop_size, image_size, instance): """ Generate a CropTransform so that the cropping region contains the center of the given instance. Args: crop_size (tuple): h, w in pixels image_size (tuple): h, w instance (dict): an annotation dict of one instance, in Detectron2's dataset format. """ crop_size = np.asarray(crop_size, dtype=np.int32) bbox = BoxMode.convert(instance["bbox"], instance["bbox_mode"], BoxMode.XYXY_ABS) center_yx = (bbox[1] + bbox[3]) * 0.5, (bbox[0] + bbox[2]) * 0.5 min_yx = np.maximum(np.floor(center_yx).astype(np.int32) - crop_size, 0) max_yx = np.maximum(np.asarray(image_size, dtype=np.int32) - crop_size, 0) max_yx = np.minimum(max_yx, np.ceil(center_yx).astype(np.int32)) y0 = np.random.randint(min_yx[0], max_yx[0] + 1) x0 = np.random.randint(min_yx[1], max_yx[1] + 1) return T.CropTransform(x0, y0, crop_size[1], crop_size[0]) def check_metadata_consistency(key, dataset_names): """ Check that the datasets have consistent metadata. Args: key (str): a metadata key dataset_names (list[str]): a list of dataset names Raises: AttributeError: if the key does not exist in the metadata ValueError: if the given datasets do not have the same metadata values defined by key """ if len(dataset_names) == 0: return logger = logging.getLogger(__name__) entries_per_dataset = [getattr(MetadataCatalog.get(d), key) for d in dataset_names] for idx, entry in enumerate(entries_per_dataset): if entry != entries_per_dataset[0]: logger.error( "Metadata '{}' for dataset '{}' is '{}'".format(key, dataset_names[idx], str(entry)) ) logger.error( "Metadata '{}' for dataset '{}' is '{}'".format( key, dataset_names[0], str(entries_per_dataset[0]) ) ) raise ValueError("Datasets have different metadata '{}'!".format(key)) def build_transform_gen(cfg, is_train): """ Create a list of :class:`TransformGen` from config. Now it includes resizing and flipping. Returns: list[TransformGen] """ if is_train: min_size = cfg.INPUT.MIN_SIZE_TRAIN max_size = cfg.INPUT.MAX_SIZE_TRAIN sample_style = cfg.INPUT.MIN_SIZE_TRAIN_SAMPLING else: min_size = cfg.INPUT.MIN_SIZE_TEST max_size = cfg.INPUT.MAX_SIZE_TEST sample_style = "choice" if sample_style == "range": assert len(min_size) == 2, "more than 2 ({}) min_size(s) are provided for ranges".format( len(min_size) ) logger = logging.getLogger(__name__) tfm_gens = [] if not min_size == 0: # set to zero to disable resize tfm_gens.append(T.ResizeShortestEdge(min_size, max_size, sample_style)) if is_train: tfm_gens.append(T.RandomFlip()) logger.info("TransformGens used in training: " + str(tfm_gens)) return tfm_gens ================================================ FILE: detectron2/data/samplers/__init__.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .distributed_sampler import InferenceSampler, RepeatFactorTrainingSampler, TrainingSampler from .grouped_batch_sampler import GroupedBatchSampler __all__ = [ "GroupedBatchSampler", "TrainingSampler", "InferenceSampler", "RepeatFactorTrainingSampler", ] ================================================ FILE: detectron2/data/samplers/distributed_sampler.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import itertools import math from collections import defaultdict from typing import Optional import torch from torch.utils.data.sampler import Sampler from detectron2.utils import comm class TrainingSampler(Sampler): """ In training, we only care about the "infinite stream" of training data. So this sampler produces an infinite stream of indices and all workers cooperate to correctly shuffle the indices and sample different indices. The samplers in each worker effectively produces `indices[worker_id::num_workers]` where `indices` is an infinite stream of indices consisting of `shuffle(range(size)) + shuffle(range(size)) + ...` (if shuffle is True) or `range(size) + range(size) + ...` (if shuffle is False) """ def __init__(self, size: int, shuffle: bool = True, seed: Optional[int] = None): """ Args: size (int): the total number of data of the underlying dataset to sample from shuffle (bool): whether to shuffle the indices or not seed (int): the initial seed of the shuffle. Must be the same across all workers. If None, will use a random seed shared among workers (require synchronization among all workers). """ self._size = size assert size > 0 self._shuffle = shuffle if seed is None: seed = comm.shared_random_seed() self._seed = int(seed) self._rank = comm.get_rank() self._world_size = comm.get_world_size() def __iter__(self): start = self._rank yield from itertools.islice(self._infinite_indices(), start, None, self._world_size) def _infinite_indices(self): g = torch.Generator() g.manual_seed(self._seed) while True: if self._shuffle: yield from torch.randperm(self._size, generator=g) else: yield from torch.arange(self._size) class RepeatFactorTrainingSampler(Sampler): """ Similar to TrainingSampler, but suitable for training on class imbalanced datasets like LVIS. In each epoch, an image may appear multiple times based on its "repeat factor". The repeat factor for an image is a function of the frequency the rarest category labeled in that image. The "frequency of category c" in [0, 1] is defined as the fraction of images in the training set (without repeats) in which category c appears. See https://arxiv.org/abs/1908.03195 (>= v2) Appendix B.2. """ def __init__(self, dataset_dicts, repeat_thresh, shuffle=True, seed=None): """ Args: dataset_dicts (list[dict]): annotations in Detectron2 dataset format. repeat_thresh (float): frequency threshold below which data is repeated. shuffle (bool): whether to shuffle the indices or not seed (int): the initial seed of the shuffle. Must be the same across all workers. If None, will use a random seed shared among workers (require synchronization among all workers). """ self._shuffle = shuffle if seed is None: seed = comm.shared_random_seed() self._seed = int(seed) self._rank = comm.get_rank() self._world_size = comm.get_world_size() # Get fractional repeat factors and split into whole number (_int_part) # and fractional (_frac_part) parts. rep_factors = self._get_repeat_factors(dataset_dicts, repeat_thresh) self._int_part = torch.trunc(rep_factors) self._frac_part = rep_factors - self._int_part def _get_repeat_factors(self, dataset_dicts, repeat_thresh): """ Compute (fractional) per-image repeat factors. Args: See __init__. Returns: torch.Tensor: the i-th element is the repeat factor for the dataset image at index i. """ # 1. For each category c, compute the fraction of images that contain it: f(c) category_freq = defaultdict(int) for dataset_dict in dataset_dicts: # For each image (without repeats) cat_ids = {ann["category_id"] for ann in dataset_dict["annotations"]} for cat_id in cat_ids: category_freq[cat_id] += 1 num_images = len(dataset_dicts) for k, v in category_freq.items(): category_freq[k] = v / num_images # 2. For each category c, compute the category-level repeat factor: # r(c) = max(1, sqrt(t / f(c))) category_rep = { cat_id: max(1.0, math.sqrt(repeat_thresh / cat_freq)) for cat_id, cat_freq in category_freq.items() } # 3. For each image I, compute the image-level repeat factor: # r(I) = max_{c in I} r(c) rep_factors = [] for dataset_dict in dataset_dicts: cat_ids = {ann["category_id"] for ann in dataset_dict["annotations"]} rep_factor = max({category_rep[cat_id] for cat_id in cat_ids}) rep_factors.append(rep_factor) return torch.tensor(rep_factors, dtype=torch.float32) def _get_epoch_indices(self, generator): """ Create a list of dataset indices (with repeats) to use for one epoch. Args: generator (torch.Generator): pseudo random number generator used for stochastic rounding. Returns: torch.Tensor: list of dataset indices to use in one epoch. Each index is repeated based on its calculated repeat factor. """ # Since repeat factors are fractional, we use stochastic rounding so # that the target repeat factor is achieved in expectation over the # course of training rands = torch.rand(len(self._frac_part), generator=generator) rep_factors = self._int_part + (rands < self._frac_part).float() # Construct a list of indices in which we repeat images as specified indices = [] for dataset_index, rep_factor in enumerate(rep_factors): indices.extend([dataset_index] * int(rep_factor.item())) return torch.tensor(indices, dtype=torch.int64) def __iter__(self): start = self._rank yield from itertools.islice(self._infinite_indices(), start, None, self._world_size) def _infinite_indices(self): g = torch.Generator() g.manual_seed(self._seed) while True: # Sample indices with repeats determined by stochastic rounding; each # "epoch" may have a slightly different size due to the rounding. indices = self._get_epoch_indices(g) if self._shuffle: randperm = torch.randperm(len(indices), generator=g) yield from indices[randperm] else: yield from indices class InferenceSampler(Sampler): """ Produce indices for inference. Inference needs to run on the __exact__ set of samples, therefore when the total number of samples is not divisible by the number of workers, this sampler produces different number of samples on different workers. """ def __init__(self, size: int): """ Args: size (int): the total number of data of the underlying dataset to sample from """ self._size = size assert size > 0 self._rank = comm.get_rank() self._world_size = comm.get_world_size() shard_size = (self._size - 1) // self._world_size + 1 begin = shard_size * self._rank end = min(shard_size * (self._rank + 1), self._size) self._local_indices = range(begin, end) def __iter__(self): yield from self._local_indices def __len__(self): return len(self._local_indices) ================================================ FILE: detectron2/data/samplers/grouped_batch_sampler.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import torch from torch.utils.data.sampler import BatchSampler, Sampler class GroupedBatchSampler(BatchSampler): """ Wraps another sampler to yield a mini-batch of indices. It enforces that the batch only contain elements from the same group. It also tries to provide mini-batches which follows an ordering which is as close as possible to the ordering from the original sampler. Arguments: sampler (Sampler): Base sampler. group_ids (list[int]): If the sampler produces indices in range [0, N), `group_ids` must be a list of `N` ints which contains the group id of each sample. The group ids must be a continuous set of integers starting from 0, i.e. they must be in the range [0, num_groups). batch_size (int): Size of mini-batch. """ def __init__(self, sampler, group_ids, batch_size): if not isinstance(sampler, Sampler): raise ValueError( "sampler should be an instance of " "torch.utils.data.Sampler, but got sampler={}".format(sampler) ) self.sampler = sampler self.group_ids = torch.as_tensor(group_ids) assert self.group_ids.dim() == 1 self.batch_size = batch_size self.groups = torch.unique(self.group_ids).sort(0)[0] # group ids must range in [0, #group) assert self.groups[0].item() == 0 and self.groups[-1].item() == len(self.groups) - 1 # buffer the indices of each group until batch size is reached self.buffer_per_group = [[] for k in self.groups] def __iter__(self): for idx in self.sampler: group_id = self.group_ids[idx] group_buffer = self.buffer_per_group[group_id] group_buffer.append(idx) if len(group_buffer) == self.batch_size: yield group_buffer[:] # yield a copy of the list del group_buffer[:] ================================================ FILE: detectron2/data/transforms/__init__.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .transform import * from fvcore.transforms.transform import * from .transform_gen import * __all__ = [k for k in globals().keys() if not k.startswith("_")] ================================================ FILE: detectron2/data/transforms/transform.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # File: transform.py import numpy as np from fvcore.transforms.transform import HFlipTransform, NoOpTransform, Transform from PIL import Image __all__ = ["ExtentTransform", "ResizeTransform"] class ExtentTransform(Transform): """ Extracts a subregion from the source image and scales it to the output size. The fill color is used to map pixels from the source rect that fall outside the source image. See: https://pillow.readthedocs.io/en/latest/PIL.html#PIL.ImageTransform.ExtentTransform """ def __init__(self, src_rect, output_size, interp=Image.LINEAR, fill=0): """ Args: src_rect (x0, y0, x1, y1): src coordinates output_size (h, w): dst image size interp: PIL interpolation methods fill: Fill color used when src_rect extends outside image """ super().__init__() self._set_attributes(locals()) def apply_image(self, img, interp=None): h, w = self.output_size ret = Image.fromarray(img).transform( size=(w, h), method=Image.EXTENT, data=self.src_rect, resample=interp if interp else self.interp, fill=self.fill, ) return np.asarray(ret) def apply_coords(self, coords): # Transform image center from source coordinates into output coordinates # and then map the new origin to the corner of the output image. h, w = self.output_size x0, y0, x1, y1 = self.src_rect new_coords = coords.astype(np.float32) new_coords[:, 0] -= 0.5 * (x0 + x1) new_coords[:, 1] -= 0.5 * (y0 + y1) new_coords[:, 0] *= w / (x1 - x0) new_coords[:, 1] *= h / (y1 - y0) new_coords[:, 0] += 0.5 * w new_coords[:, 1] += 0.5 * h return new_coords def apply_segmentation(self, segmentation): segmentation = self.apply_image(segmentation, interp=Image.NEAREST) return segmentation class ResizeTransform(Transform): """ Resize the image to a target size. """ def __init__(self, h, w, new_h, new_w, interp): """ Args: h, w (int): original image size new_h, new_w (int): new image size interp: PIL interpolation methods """ # TODO decide on PIL vs opencv super().__init__() self._set_attributes(locals()) def apply_image(self, img, interp=None): assert img.shape[:2] == (self.h, self.w) pil_image = Image.fromarray(img) interp_method = interp if interp is not None else self.interp pil_image = pil_image.resize((self.new_w, self.new_h), interp_method) ret = np.asarray(pil_image) return ret def apply_coords(self, coords): coords[:, 0] = coords[:, 0] * (self.new_w * 1.0 / self.w) coords[:, 1] = coords[:, 1] * (self.new_h * 1.0 / self.h) return coords def apply_segmentation(self, segmentation): segmentation = self.apply_image(segmentation, interp=Image.NEAREST) return segmentation def HFlip_rotated_box(transform, rotated_boxes): """ Apply the horizontal flip transform on an rotated boxes. Args: rotated_boxes (ndarray): Nx5 floating point array of (x_center, y_center, width, height, angle_degrees) format in absolute coordinates. """ # Transform x_center rotated_boxes[:, 0] = transform.width - rotated_boxes[:, 0] # Transform angle rotated_boxes[:, 4] = -rotated_boxes[:, 4] return rotated_boxes def Resize_rotated_box(transform, rotated_boxes): # Note: when scale_factor_x != scale_factor_y, # the rotated box does not preserve the rectangular shape when the angle # is not a multiple of 90 degrees under resize transformation. # Instead, the shape is a parallelogram (that has skew) # Here we make an approximation by fitting a rotated rectangle to the # parallelogram that shares the same midpoints on the left and right edge scale_factor_x = transform.new_w * 1.0 / transform.w scale_factor_y = transform.new_h * 1.0 / transform.h rotated_boxes[:, 0] *= scale_factor_x rotated_boxes[:, 1] *= scale_factor_y theta = rotated_boxes[:, 4] * np.pi / 180.0 c = np.cos(theta) s = np.sin(theta) # In image space, y is top->down and x is left->right # Consider the local coordinate system for the rotated box, # where the box center is located at (0, 0), and the four vertices ABCD are # A(-w / 2, -h / 2), B(w / 2, -h / 2), C(w / 2, h / 2), D(-w / 2, h / 2) # the midpoint of the left edge AD of the rotated box E is: # E = (A+D)/2 = (-w / 2, 0) # the midpoint of the top edge AB of the rotated box F is: # F(0, -h / 2) # To get the old coordinates in the global system, apply the rotation transformation # (Note: the right-handed coordinate system for image space is yOx): # (old_x, old_y) = (s * y + c * x, c * y - s * x) # E(old) = (s * 0 + c * (-w/2), c * 0 - s * (-w/2)) = (-c * w / 2, s * w / 2) # F(old) = (s * (-h / 2) + c * 0, c * (-h / 2) - s * 0) = (-s * h / 2, -c * h / 2) # After applying the scaling factor (sfx, sfy): # E(new) = (-sfx * c * w / 2, sfy * s * w / 2) # F(new) = (-sfx * s * h / 2, -sfy * c * h / 2) # The new width after scaling transformation becomes: # w(new) = |E(new) - O| * 2 # = sqrt[(sfx * c * w / 2)^2 + (sfy * s * w / 2)^2] * 2 # = sqrt[(sfx * c)^2 + (sfy * s)^2] * w # i.e., scale_factor_w = sqrt[(sfx * c)^2 + (sfy * s)^2] # # For example, # when angle = 0 or 180, |c| = 1, s = 0, scale_factor_w == scale_factor_x; # when |angle| = 90, c = 0, |s| = 1, scale_factor_w == scale_factor_y rotated_boxes[:, 2] *= np.sqrt(np.square(scale_factor_x * c) + np.square(scale_factor_y * s)) # h(new) = |F(new) - O| * 2 # = sqrt[(sfx * s * h / 2)^2 + (sfy * c * h / 2)^2] * 2 # = sqrt[(sfx * s)^2 + (sfy * c)^2] * h # i.e., scale_factor_h = sqrt[(sfx * s)^2 + (sfy * c)^2] # # For example, # when angle = 0 or 180, |c| = 1, s = 0, scale_factor_h == scale_factor_y; # when |angle| = 90, c = 0, |s| = 1, scale_factor_h == scale_factor_x rotated_boxes[:, 3] *= np.sqrt(np.square(scale_factor_x * s) + np.square(scale_factor_y * c)) # The angle is the rotation angle from y-axis in image space to the height # vector (top->down in the box's local coordinate system) of the box in CCW. # # angle(new) = angle_yOx(O - F(new)) # = angle_yOx( (sfx * s * h / 2, sfy * c * h / 2) ) # = atan2(sfx * s * h / 2, sfy * c * h / 2) # = atan2(sfx * s, sfy * c) # # For example, # when sfx == sfy, angle(new) == atan2(s, c) == angle(old) rotated_boxes[:, 4] = np.arctan2(scale_factor_x * s, scale_factor_y * c) * 180 / np.pi return rotated_boxes HFlipTransform.register_type("rotated_box", HFlip_rotated_box) NoOpTransform.register_type("rotated_box", lambda t, x: x) ResizeTransform.register_type("rotated_box", Resize_rotated_box) ================================================ FILE: detectron2/data/transforms/transform_gen.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # File: transformer.py import inspect import numpy as np import pprint import sys from abc import ABCMeta, abstractmethod from fvcore.transforms.transform import ( BlendTransform, CropTransform, HFlipTransform, NoOpTransform, Transform, TransformList, ) from PIL import Image from .transform import ExtentTransform, ResizeTransform __all__ = [ "RandomBrightness", "RandomContrast", "RandomCrop", "RandomExtent", "RandomFlip", "RandomSaturation", "RandomLighting", "Resize", "ResizeShortestEdge", "TransformGen", "apply_transform_gens", ] def check_dtype(img): assert isinstance(img, np.ndarray), "[TransformGen] Needs an numpy array, but got a {}!".format( type(img) ) assert not isinstance(img.dtype, np.integer) or ( img.dtype == np.uint8 ), "[TransformGen] Got image of type {}, use uint8 or floating points instead!".format( img.dtype ) assert img.ndim in [2, 3], img.ndim class TransformGen(metaclass=ABCMeta): """ TransformGen takes an image of type uint8 in range [0, 255], or floating point in range [0, 1] or [0, 255] as input. It creates a :class:`Transform` based on the given image, sometimes with randomness. The transform can then be used to transform images or other data (boxes, points, annotations, etc.) associated with it. The assumption made in this class is that the image itself is sufficient to instantiate a transform. When this assumption is not true, you need to create the transforms by your own. A list of `TransformGen` can be applied with :func:`apply_transform_gens`. """ def _init(self, params=None): if params: for k, v in params.items(): if k != "self" and not k.startswith("_"): setattr(self, k, v) @abstractmethod def get_transform(self, img): pass def _rand_range(self, low=1.0, high=None, size=None): """ Uniform float random number between low and high. """ if high is None: low, high = 0, low if size is None: size = [] return np.random.uniform(low, high, size) def __repr__(self): """ Produce something like: "MyTransformGen(field1={self.field1}, field2={self.field2})" """ try: argspec = inspect.getargspec(self.__init__) assert argspec.varargs is None, "The default __repr__ doesn't work for varargs!" assert argspec.keywords is None, "The default __repr__ doesn't work for kwargs!" fields = argspec.args[1:] index_field_has_default = len(fields) - ( 0 if argspec.defaults is None else len(argspec.defaults) ) classname = type(self).__name__ argstr = [] for idx, f in enumerate(fields): assert hasattr(self, f), ( "Attribute {} not found! " "Default __repr__ only works if attributes match the constructor.".format(f) ) attr = getattr(self, f) if idx >= index_field_has_default: if attr is argspec.defaults[idx - index_field_has_default]: continue argstr.append("{}={}".format(f, pprint.pformat(attr))) return "{}({})".format(classname, ", ".join(argstr)) except AssertionError: return super().__repr__() __str__ = __repr__ class RandomFlip(TransformGen): """ Flip the image horizontally with the given probability. TODO Vertical flip to be implemented. """ def __init__(self, prob=0.5): """ Args: prob (float): probability of flip. """ horiz, vert = True, False # TODO implement vertical flip when we need it super().__init__() if horiz and vert: raise ValueError("Cannot do both horiz and vert. Please use two Flip instead.") if not horiz and not vert: raise ValueError("At least one of horiz or vert has to be True!") self._init(locals()) def get_transform(self, img): _, w = img.shape[:2] do = self._rand_range() < self.prob if do: return HFlipTransform(w) else: return NoOpTransform() class Resize(TransformGen): """ Resize image to a target size""" def __init__(self, shape, interp=Image.BILINEAR): """ Args: shape: (h, w) tuple or a int interp: PIL interpolation method """ if isinstance(shape, int): shape = (shape, shape) shape = tuple(shape) self._init(locals()) def get_transform(self, img): return ResizeTransform( img.shape[0], img.shape[1], self.shape[0], self.shape[1], self.interp ) class ResizeShortestEdge(TransformGen): """ Scale the shorter edge to the given size, with a limit of `max_size` on the longer edge. If `max_size` is reached, then downscale so that the longer edge does not exceed max_size. """ def __init__( self, short_edge_length, max_size=sys.maxsize, sample_style="range", interp=Image.BILINEAR ): """ Args: short_edge_length (list[int]): If ``sample_style=="range"``, a [min, max] interval from which to sample the shortest edge length. If ``sample_style=="choice"``, a list of shortest edge lengths to sample from. max_size (int): maximum allowed longest edge length. sample_style (str): either "range" or "choice". """ super().__init__() assert sample_style in ["range", "choice"], sample_style self.is_range = sample_style == "range" if isinstance(short_edge_length, int): short_edge_length = (short_edge_length, short_edge_length) self._init(locals()) def get_transform(self, img): h, w = img.shape[:2] if self.is_range: size = np.random.randint(self.short_edge_length[0], self.short_edge_length[1] + 1) else: size = np.random.choice(self.short_edge_length) scale = size * 1.0 / min(h, w) if h < w: newh, neww = size, scale * w else: newh, neww = scale * h, size if max(newh, neww) > self.max_size: scale = self.max_size * 1.0 / max(newh, neww) newh = newh * scale neww = neww * scale neww = int(neww + 0.5) newh = int(newh + 0.5) return ResizeTransform(h, w, newh, neww, self.interp) class RandomCrop(TransformGen): """ Randomly crop a subimage out of an image. """ def __init__(self, crop_type: str, crop_size): """ Args: crop_type (str): one of "relative_range", "relative", "absolute". See `config/defaults.py` for explanation. crop_size (tuple[float]): the relative ratio or absolute pixels of height and width """ super().__init__() assert crop_type in ["relative_range", "relative", "absolute"] self._init(locals()) def get_transform(self, img): h, w = img.shape[:2] croph, cropw = self.get_crop_size((h, w)) assert h >= croph and w >= cropw, "Shape computation in {} has bugs.".format(self) h0 = np.random.randint(h - croph + 1) w0 = np.random.randint(w - cropw + 1) return CropTransform(w0, h0, cropw, croph) def get_crop_size(self, image_size): """ Args: image_size (tuple): height, width Returns: crop_size (tuple): height, width in absolute pixels """ h, w = image_size if self.crop_type == "relative": ch, cw = self.crop_size return int(h * ch + 0.5), int(w * cw + 0.5) elif self.crop_type == "relative_range": crop_size = np.asarray(self.crop_size, dtype=np.float32) ch, cw = crop_size + np.random.rand(2) * (1 - crop_size) return int(h * ch + 0.5), int(w * cw + 0.5) elif self.crop_type == "absolute": return self.crop_size else: NotImplementedError("Unknown crop type {}".format(self.crop_type)) class RandomExtent(TransformGen): """ Outputs an image by cropping a random "subrect" of the source image. The subrect can be parameterized to include pixels outside the source image, in which case they will be set to zeros (i.e. black). The size of the output image will vary with the size of the random subrect. """ def __init__(self, scale_range, shift_range): """ Args: output_size (h, w): Dimensions of output image scale_range (l, h): Range of input-to-output size scaling factor shift_range (x, y): Range of shifts of the cropped subrect. The rect is shifted by [w / 2 * Uniform(-x, x), h / 2 * Uniform(-y, y)], where (w, h) is the (width, height) of the input image. Set each component to zero to crop at the image's center. """ super().__init__() self._init(locals()) def get_transform(self, img): img_h, img_w = img.shape[:2] # Initialize src_rect to fit the input image. src_rect = np.array([-0.5 * img_w, -0.5 * img_h, 0.5 * img_w, 0.5 * img_h]) # Apply a random scaling to the src_rect. src_rect *= np.random.uniform(self.scale_range[0], self.scale_range[1]) # Apply a random shift to the coordinates origin. src_rect[0::2] += self.shift_range[0] * img_w * (np.random.rand() - 0.5) src_rect[1::2] += self.shift_range[1] * img_h * (np.random.rand() - 0.5) # Map src_rect coordinates into image coordinates (center at corner). src_rect[0::2] += 0.5 * img_w src_rect[1::2] += 0.5 * img_h return ExtentTransform( src_rect=(src_rect[0], src_rect[1], src_rect[2], src_rect[3]), output_size=(int(src_rect[3] - src_rect[1]), int(src_rect[2] - src_rect[0])), ) class RandomContrast(TransformGen): """ Randomly transforms image contrast. Contrast intensity is uniformly sampled in (intensity_min, intensity_max). - intensity < 1 will reduce contrast - intensity = 1 will preserve the input image - intensity > 1 will increase contrast See: https://pillow.readthedocs.io/en/3.0.x/reference/ImageEnhance.html """ def __init__(self, intensity_min, intensity_max): """ Args: intensity_min (float): Minimum augmentation intensity_max (float): Maximum augmentation """ super().__init__() self._init(locals()) def get_transform(self, img): w = np.random.uniform(self.intensity_min, self.intensity_max) return BlendTransform(src_image=img.mean(), src_weight=1 - w, dst_weight=w) class RandomBrightness(TransformGen): """ Randomly transforms image brightness. Brightness intensity is uniformly sampled in (intensity_min, intensity_max). - intensity < 1 will reduce brightness - intensity = 1 will preserve the input image - intensity > 1 will increase brightness See: https://pillow.readthedocs.io/en/3.0.x/reference/ImageEnhance.html """ def __init__(self, intensity_min, intensity_max): """ Args: intensity_min (float): Minimum augmentation intensity_max (float): Maximum augmentation """ super().__init__() self._init(locals()) def get_transform(self, img): w = np.random.uniform(self.intensity_min, self.intensity_max) return BlendTransform(src_image=0, src_weight=1 - w, dst_weight=w) class RandomSaturation(TransformGen): """ Randomly transforms image saturation. Saturation intensity is uniformly sampled in (intensity_min, intensity_max). - intensity < 1 will reduce saturation (make the image more grayscale) - intensity = 1 will preserve the input image - intensity > 1 will increase saturation See: https://pillow.readthedocs.io/en/3.0.x/reference/ImageEnhance.html """ def __init__(self, intensity_min, intensity_max): """ Args: intensity_min (float): Minimum augmentation (1 preserves input). intensity_max (float): Maximum augmentation (1 preserves input). """ super().__init__() self._init(locals()) def get_transform(self, img): assert img.shape[-1] == 3, "Saturation only works on RGB images" w = np.random.uniform(self.intensity_min, self.intensity_max) grayscale = img.dot([0.299, 0.587, 0.114])[:, :, np.newaxis] return BlendTransform(src_image=grayscale, src_weight=1 - w, dst_weight=w) class RandomLighting(TransformGen): """ Randomly transforms image color using fixed PCA over ImageNet. The degree of color jittering is randomly sampled via a normal distribution, with standard deviation given by the scale parameter. """ def __init__(self, scale): """ Args: scale (float): Standard deviation of principal component weighting. """ super().__init__() self._init(locals()) self.eigen_vecs = np.array( [[-0.5675, 0.7192, 0.4009], [-0.5808, -0.0045, -0.8140], [-0.5836, -0.6948, 0.4203]] ) self.eigen_vals = np.array([0.2175, 0.0188, 0.0045]) def get_transform(self, img): assert img.shape[-1] == 3, "Saturation only works on RGB images" weights = np.random.normal(scale=self.scale, size=3) return BlendTransform( src_image=self.eigen_vecs.dot(weights * self.eigen_vals), src_weight=1.0, dst_weight=1.0 ) def apply_transform_gens(transform_gens, img): """ Apply a list of :class:`TransformGen` on the input image, and returns the transformed image and a list of transforms. We cannot simply create and return all transforms without applying it to the image, because a subsequent transform may need the output of the previous one. Args: transform_gens (list): list of :class:`TransformGen` instance to be applied. img (ndarray): uint8 or floating point images with 1 or 3 channels. Returns: ndarray: the transformed image TransformList: contain the transforms that's used. """ for g in transform_gens: assert isinstance(g, TransformGen), g check_dtype(img) tfms = [] for g in transform_gens: tfm = g.get_transform(img) assert isinstance( tfm, Transform ), "TransformGen {} must return an instance of Transform! Got {} instead".format(g, tfm) img = tfm.apply_image(img) tfms.append(tfm) return img, TransformList(tfms) ================================================ FILE: detectron2/engine/__init__.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. from .launch import * from .train_loop import * __all__ = [k for k in globals().keys() if not k.startswith("_")] # prefer to let hooks and defaults live in separate namespaces (therefore not in __all__) # but still make them available here from .hooks import * from .defaults import * ================================================ FILE: detectron2/engine/defaults.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ This file contains components with some default boilerplate logic user may need in training / testing. They will not work for everyone, but many users may find them useful. The behavior of functions/classes in this file is subject to change, since they are meant to represent the "common default behavior" people need in their projects. """ import argparse import logging import os from collections import OrderedDict import torch from fvcore.common.file_io import PathManager from fvcore.nn.precise_bn import get_bn_modules from torch.nn.parallel import DistributedDataParallel import detectron2.data.transforms as T from detectron2.checkpoint import DetectionCheckpointer from detectron2.data import ( MetadataCatalog, build_detection_test_loader, build_detection_train_loader, ) from detectron2.evaluation import ( DatasetEvaluator, inference_on_dataset, print_csv_format, verify_results, ) from detectron2.modeling import build_model from detectron2.solver import build_lr_scheduler, build_optimizer from detectron2.utils import comm from detectron2.utils.collect_env import collect_env_info from detectron2.utils.env import seed_all_rng from detectron2.utils.events import CommonMetricPrinter, JSONWriter, TensorboardXWriter from detectron2.utils.logger import setup_logger from . import hooks from .train_loop import SimpleTrainer __all__ = ["default_argument_parser", "default_setup", "DefaultPredictor", "DefaultTrainer"] def default_argument_parser(): """ Create a parser with some common arguments used by detectron2 users. Returns: argparse.ArgumentParser: """ parser = argparse.ArgumentParser(description="Detectron2 Training") parser.add_argument("--config-file", default="", metavar="FILE", help="path to config file") parser.add_argument( "--resume", action="store_true", help="whether to attempt to resume from the checkpoint directory", ) parser.add_argument("--eval-only", action="store_true", help="perform evaluation only") parser.add_argument("--num-gpus", type=int, default=1, help="number of gpus *per machine*") parser.add_argument("--num-machines", type=int, default=1) parser.add_argument( "--machine-rank", type=int, default=0, help="the rank of this machine (unique per machine)" ) # PyTorch still may leave orphan processes in multi-gpu training. # Therefore we use a deterministic way to obtain port, # so that users are aware of orphan processes by seeing the port occupied. port = 2 ** 15 + 2 ** 14 + hash(os.getuid()) % 2 ** 14 parser.add_argument("--dist-url", default="tcp://127.0.0.1:{}".format(port)) parser.add_argument( "opts", help="Modify config options using the command-line", default=None, nargs=argparse.REMAINDER, ) return parser def default_setup(cfg, args): """ Perform some basic common setups at the beginning of a job, including: 1. Set up the detectron2 logger 2. Log basic information about environment, cmdline arguments, and config 3. Backup the config to the output directory Args: cfg (CfgNode): the full config to be used args (argparse.NameSpace): the command line arguments to be logged """ output_dir = cfg.OUTPUT_DIR if comm.is_main_process() and output_dir: PathManager.mkdirs(output_dir) rank = comm.get_rank() setup_logger(output_dir, distributed_rank=rank, name="fvcore") logger = setup_logger(output_dir, distributed_rank=rank) logger.info("Rank of current process: {}. World size: {}".format(rank, comm.get_world_size())) logger.info("Environment info:\n" + collect_env_info()) logger.info("Command line arguments: " + str(args)) if hasattr(args, "config_file"): logger.info( "Contents of args.config_file={}:\n{}".format( args.config_file, PathManager.open(args.config_file, "r").read() ) ) logger.info("Running with full config:\n{}".format(cfg)) if comm.is_main_process() and output_dir: # Note: some of our scripts may expect the existence of # config.yaml in output directory path = os.path.join(output_dir, "config.yaml") with PathManager.open(path, "w") as f: f.write(cfg.dump()) logger.info("Full config saved to {}".format(os.path.abspath(path))) # make sure each worker has a different, yet deterministic seed if specified seed_all_rng(None if cfg.SEED < 0 else cfg.SEED + rank) # cudnn benchmark has large overhead. It shouldn't be used considering the small size of # typical validation set. if not (hasattr(args, "eval_only") and args.eval_only): torch.backends.cudnn.benchmark = cfg.CUDNN_BENCHMARK class DefaultPredictor: """ Create a simple end-to-end predictor with the given config. The predictor takes an BGR image and produce a dict of predictions. Attributes: metadata (Metadata): the metadata of the underlying dataset, obtained from cfg.DATASETS.TEST. """ def __init__(self, cfg): self.cfg = cfg.clone() # cfg can be modified by model self.model = build_model(self.cfg) self.model.eval() self.metadata = MetadataCatalog.get(cfg.DATASETS.TEST[0]) checkpointer = DetectionCheckpointer(self.model) checkpointer.load(cfg.MODEL.WEIGHTS) self.transform_gen = T.ResizeShortestEdge( [cfg.INPUT.MIN_SIZE_TEST, cfg.INPUT.MIN_SIZE_TEST], cfg.INPUT.MAX_SIZE_TEST ) self.input_format = cfg.INPUT.FORMAT assert self.input_format in ["RGB", "BGR"], self.input_format @torch.no_grad() def __call__(self, original_image): """ Args: original_image (np.ndarray): an image of shape (H, W, C) (in BGR order). Returns: predictions (dict): the output of the model """ # Apply pre-processing to image. if self.input_format == "RGB": # whether the model expects BGR inputs or RGB original_image = original_image[:, :, ::-1] height, width = original_image.shape[:2] image = self.transform_gen.get_transform(original_image).apply_image(original_image) image = torch.as_tensor(image.astype("float32").transpose(2, 0, 1)) inputs = {"image": image, "height": height, "width": width} predictions = self.model([inputs]) return predictions class DefaultTrainer(SimpleTrainer): """ A trainer with default training logic. Compared to `SimpleTrainer`, it contains the following logic in addition: 1. Create model, optimizer, scheduler, dataloader from the given config. 2. Load a checkpoint or `cfg.MODEL.WEIGHTS`, if exists. 3. Register a few common hooks. It is created to simplify the **standard model training workflow** and reduce code boilerplate for users who only need the standard training workflow, with standard features. It means this class makes *many assumptions* about your training logic that may easily become invalid in a new research. In fact, any assumptions beyond those made in the :class:`SimpleTrainer` are too much for research. The code of this class has been annotated about restrictive assumptions it mades. When they do not work for you, you're encouraged to write your own training logic. Also note that the behavior of this class, like other functions/classes in this file, is not stable, since it is meant to represent the "common default behavior". It is only guaranteed to work well with the standard models and training workflow in detectron2. To obtain more stable behavior, write your own training logic with other public APIs. Attributes: scheduler: checkpointer (DetectionCheckpointer): cfg (CfgNode): """ def __init__(self, cfg): """ Args: cfg (CfgNode): """ # Assume these objects must be constructed in this order. model = self.build_model(cfg) optimizer = self.build_optimizer(cfg, model) data_loader = self.build_train_loader(cfg) # For training, wrap with DDP. But don't need this for inference. if comm.get_world_size() > 1: model = DistributedDataParallel( model, device_ids=[comm.get_local_rank()], broadcast_buffers=False ) super().__init__(model, data_loader, optimizer) self.scheduler = self.build_lr_scheduler(cfg, optimizer) # Assume no other objects need to be checkpointed. # We can later make it checkpoint the stateful hooks self.checkpointer = DetectionCheckpointer( # Assume you want to save checkpoints together with logs/statistics model, cfg.OUTPUT_DIR, optimizer=optimizer, scheduler=self.scheduler, ) self.start_iter = 0 self.max_iter = cfg.SOLVER.MAX_ITER self.cfg = cfg self.register_hooks(self.build_hooks()) def resume_or_load(self, resume=True): """ If `resume==True`, and last checkpoint exists, resume from it. Otherwise, load a model specified by the config. Args: resume (bool): whether to do resume or not """ # The checkpoint stores the training iteration that just finished, thus we start # at the next iteration (or iter zero if there's no checkpoint). self.start_iter = ( self.checkpointer.resume_or_load(self.cfg.MODEL.WEIGHTS, resume=resume).get( "iteration", -1 ) + 1 ) def build_hooks(self): """ Build a list of default hooks. Returns: list[HookBase]: """ cfg = self.cfg.clone() cfg.defrost() cfg.DATALOADER.NUM_WORKERS = 0 # save some memory and time for PreciseBN ret = [ hooks.IterationTimer(), hooks.LRScheduler(self.optimizer, self.scheduler), hooks.PreciseBN( # Run at the same freq as (but before) evaluation. cfg.TEST.EVAL_PERIOD, self.model, # Build a new data loader to not affect training self.build_train_loader(cfg), cfg.TEST.PRECISE_BN.NUM_ITER, ) if cfg.TEST.PRECISE_BN.ENABLED and get_bn_modules(self.model) else None, ] # Do PreciseBN before checkpointer, because it updates the model and need to # be saved by checkpointer. # This is not always the best: if checkpointing has a different frequency, # some checkpoints may have more precise statistics than others. if comm.is_main_process(): ret.append(hooks.PeriodicCheckpointer(self.checkpointer, cfg.SOLVER.CHECKPOINT_PERIOD)) def test_and_save_results(): self._last_eval_results = self.test(self.cfg, self.model) return self._last_eval_results # Do evaluation after checkpointer, because then if it fails, # we can use the saved checkpoint to debug. ret.append(hooks.EvalHook(cfg.TEST.EVAL_PERIOD, test_and_save_results)) if comm.is_main_process(): # run writers in the end, so that evaluation metrics are written ret.append(hooks.PeriodicWriter(self.build_writers())) return ret def build_writers(self): """ Build a list of default writers, that write metrics to the screen, a json file, and a tensorboard event file respectively. Returns: list[Writer]: a list of objects that have a ``.write`` method. """ # Assume the default print/log frequency. return [ # It may not always print what you want to see, since it prints "common" metrics only. CommonMetricPrinter(self.max_iter), JSONWriter(os.path.join(self.cfg.OUTPUT_DIR, "metrics.json")), TensorboardXWriter(self.cfg.OUTPUT_DIR), ] def train(self): """ Run training. Returns: OrderedDict of results, if evaluation is enabled. Otherwise None. """ super().train(self.start_iter, self.max_iter) if hasattr(self, "_last_eval_results") and comm.is_main_process(): verify_results(self.cfg, self._last_eval_results) return self._last_eval_results @classmethod def build_model(cls, cfg): """ Returns: torch.nn.Module: """ model = build_model(cfg) logger = logging.getLogger(__name__) logger.info("Model:\n{}".format(model)) return model @classmethod def build_optimizer(cls, cfg, model): """ Returns: torch.optim.Optimizer: """ return build_optimizer(cfg, model) @classmethod def build_lr_scheduler(cls, cfg, optimizer): return build_lr_scheduler(cfg, optimizer) @classmethod def build_train_loader(cls, cfg): """ Returns: iterable """ return build_detection_train_loader(cfg) @classmethod def build_test_loader(cls, cfg, dataset_name): """ Returns: iterable """ return build_detection_test_loader(cfg, dataset_name) @classmethod def build_evaluator(cls, cfg, dataset_name): """ Returns: DatasetEvaluator """ raise NotImplementedError @classmethod def test(cls, cfg, model, evaluators=None): """ Args: cfg (CfgNode): model (nn.Module): evaluators (list[DatasetEvaluator] or None): if None, will call :meth:`build_evaluator`. Otherwise, must have the same length as `cfg.DATASETS.TEST`. Returns: dict: a dict of result metrics """ logger = logging.getLogger(__name__) if isinstance(evaluators, DatasetEvaluator): evaluators = [evaluators] if evaluators is not None: assert len(cfg.DATASETS.TEST) == len(evaluators), "{} != {}".format( len(cfg.DATASETS.TEST), len(evaluators) ) # print(evaluators) results = OrderedDict() relations =OrderedDict() for idx, dataset_name in enumerate(cfg.DATASETS.TEST): data_loader = cls.build_test_loader(cfg, dataset_name) # When evaluators are passed in as arguments, # implicitly assume that evaluators can be created before data_loader. evaluator = ( evaluators[idx] if evaluators is not None else cls.build_evaluator(cfg, dataset_name) ) results_i,relations_i = inference_on_dataset(model, data_loader, evaluator) results[dataset_name] = results_i relations[dataset_name] = relations_i if comm.is_main_process(): assert isinstance( results_i, dict ), "Evaluator must return a dict on the main process. Got {} instead.".format( results_i ) logger.info("Evaluation results for {} in csv format:".format(dataset_name)) print_csv_format(results_i) # print_csv_format(relations_i) if len(results) == 1 and len(relations): results = list(results.values())[0] relations = list(relations.values())[0] return results,relations ================================================ FILE: detectron2/engine/hooks.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import datetime import logging import os import tempfile import time from collections import Counter import torch from fvcore.common.checkpoint import PeriodicCheckpointer as _PeriodicCheckpointer from fvcore.common.file_io import PathManager from fvcore.common.timer import Timer from fvcore.nn.precise_bn import get_bn_modules, update_bn_stats import detectron2.utils.comm as comm from detectron2.evaluation.testing import flatten_results_dict from detectron2.utils.events import EventStorage from .train_loop import HookBase __all__ = [ "CallbackHook", "IterationTimer", "PeriodicWriter", "PeriodicCheckpointer", "LRScheduler", "AutogradProfiler", "EvalHook", "PreciseBN", ] """ Implement some common hooks. """ class CallbackHook(HookBase): """ Create a hook using callback functions provided by the user. """ def __init__(self, *, before_train=None, after_train=None, before_step=None, after_step=None): """ Each argument is a function that takes one argument: the trainer. """ self._before_train = before_train self._before_step = before_step self._after_step = after_step self._after_train = after_train def before_train(self): if self._before_train: self._before_train(self.trainer) def after_train(self): if self._after_train: self._after_train(self.trainer) # The functions may be closures that hold reference to the trainer # Therefore, delete them to avoid circular reference. del self._before_train, self._after_train del self._before_step, self._after_step def before_step(self): if self._before_step: self._before_step(self.trainer) def after_step(self): if self._after_step: self._after_step(self.trainer) class IterationTimer(HookBase): """ Track the time spent for each iteration (each run_step call in the trainer). Print a summary in the end of training. This hook uses the time between the call to its :meth:`before_step` and :meth:`after_step` methods. Under the convention that :meth:`before_step` of all hooks should only take negligible amount of time, the :class:`IterationTimer` hook should be placed at the beginning of the list of hooks to obtain accurate timing. """ def __init__(self, warmup_iter=3): """ Args: warmup_iter (int): the number of iterations at the beginning to exclude from timing. """ self._warmup_iter = warmup_iter self._step_timer = Timer() def before_train(self): self._start_time = time.perf_counter() self._total_timer = Timer() self._total_timer.pause() def after_train(self): logger = logging.getLogger(__name__) total_time = time.perf_counter() - self._start_time total_time_minus_hooks = self._total_timer.seconds() hook_time = total_time - total_time_minus_hooks num_iter = self.trainer.iter + 1 - self.trainer.start_iter - self._warmup_iter if num_iter > 0 and total_time_minus_hooks > 0: # Speed is meaningful only after warmup # NOTE this format is parsed by grep in some scripts logger.info( "Overall training speed: {} iterations in {} ({:.4f} s / it)".format( num_iter, str(datetime.timedelta(seconds=int(total_time_minus_hooks))), total_time_minus_hooks / num_iter, ) ) logger.info( "Total training time: {} ({} on hooks)".format( str(datetime.timedelta(seconds=int(total_time))), str(datetime.timedelta(seconds=int(hook_time))), ) ) def before_step(self): self._step_timer.reset() self._total_timer.resume() def after_step(self): # +1 because we're in after_step iter_done = self.trainer.iter - self.trainer.start_iter + 1 if iter_done >= self._warmup_iter: sec = self._step_timer.seconds() self.trainer.storage.put_scalars(time=sec) else: self._start_time = time.perf_counter() self._total_timer.reset() self._total_timer.pause() class PeriodicWriter(HookBase): """ Write events to EventStorage periodically. It is executed every ``period`` iterations and after the last iteration. """ def __init__(self, writers, period=20): """ Args: writers (list): a list of objects with a "write" method. period (int): """ self._writers = writers self._period = period def after_step(self): if (self.trainer.iter + 1) % self._period == 0 or ( self.trainer.iter == self.trainer.max_iter - 1 ): for writer in self._writers: writer.write() class PeriodicCheckpointer(_PeriodicCheckpointer, HookBase): """ Same as :class:`detectron2.checkpoint.PeriodicCheckpointer`, but as a hook. Note that when used as a hook, it is unable to save additional data other than what's defined by the given `checkpointer`. It is executed every ``period`` iterations and after the last iteration. """ def before_train(self): self.max_iter = self.trainer.max_iter def after_step(self): # No way to use **kwargs self.step(self.trainer.iter) class LRScheduler(HookBase): """ A hook which executes a torch builtin LR scheduler and summarizes the LR. It is executed after every iteration. """ def __init__(self, optimizer, scheduler): """ Args: optimizer (torch.optim.Optimizer): scheduler (torch.optim._LRScheduler) """ self._optimizer = optimizer self._scheduler = scheduler # NOTE: some heuristics on what LR to summarize # summarize the param group with most parameters largest_group = max(len(g["params"]) for g in optimizer.param_groups) if largest_group == 1: # If all groups have one parameter, # then find the most common initial LR, and use it for summary lr_count = Counter([g["lr"] for g in optimizer.param_groups]) lr = lr_count.most_common()[0][0] for i, g in enumerate(optimizer.param_groups): if g["lr"] == lr: self._best_param_group_id = i break else: for i, g in enumerate(optimizer.param_groups): if len(g["params"]) == largest_group: self._best_param_group_id = i break def after_step(self): lr = self._optimizer.param_groups[self._best_param_group_id]["lr"] self.trainer.storage.put_scalar("lr", lr, smoothing_hint=False) self._scheduler.step() class AutogradProfiler(HookBase): """ A hook which runs `torch.autograd.profiler.profile`. Note: When used together with NCCL on older version of GPUs, autograd profiler may cause deadlock because it unnecessarily allocates memory on every device it sees. The memory management calls, if interleaved with NCCL calls, lead to deadlock on GPUs that do not support `cudaLaunchCooperativeKernelMultiDevice`. """ def __init__(self, enable_predicate, output_dir, *, use_cuda=True): """ Args: enable_predicate (callable[trainer -> bool]): a function which takes a trainer, and returns whether to enable the profiler. It will be called once every step, and can be used to select which steps to profile. output_dir (str): the output directory to dump tracing files. use_cuda (bool): same as in `torch.autograd.profiler.profile`. """ self._enable_predicate = enable_predicate self._use_cuda = use_cuda self._output_dir = output_dir def before_step(self): if self._enable_predicate(self.trainer): self._profiler = torch.autograd.profiler.profile(use_cuda=self._use_cuda) self._profiler.__enter__() else: self._profiler = None def after_step(self): if self._profiler is None: return self._profiler.__exit__(None, None, None) out_file = os.path.join( self._output_dir, "profiler-trace-iter{}.json".format(self.trainer.iter) ) if "://" not in out_file: self._profiler.export_chrome_trace(out_file) else: # Support non-posix filesystems with tempfile.TemporaryDirectory(prefix="detectron2_profiler") as d: tmp_file = os.path.join(d, "tmp.json") self._profiler.export_chrome_trace(tmp_file) with open(tmp_file) as f: content = f.read() with PathManager.open(out_file, "w") as f: f.write(content) class EvalHook(HookBase): """ Run an evaluation function periodically, and at the end of training. It is executed every ``eval_period`` iterations and after the last iteration. """ def __init__(self, eval_period, eval_function): """ Args: eval_period (int): the period to run `eval_function`. eval_function (callable): a function which takes no arguments, and returns a nested dict of evaluation metrics. Note: This hook must be enabled in all or none workers. If you would like only certain workers to perform evaluation, give other workers a no-op function (`eval_function=lambda: None`). """ self._period = eval_period self._func = eval_function def after_step(self): next_iter = self.trainer.iter + 1 is_final = next_iter == self.trainer.max_iter if is_final or (self._period > 0 and next_iter % self._period == 0): results = self._func() if results: assert isinstance( results, dict ), "Eval function must return a dict. Got {} instead.".format(results) flattened_results = flatten_results_dict(results) for k, v in flattened_results.items(): try: v = float(v) except Exception: raise ValueError( "[EvalHook] eval_function should return a nested dict of float. " "Got '{}: {}' instead.".format(k, v) ) self.trainer.storage.put_scalars(**flattened_results, smoothing_hint=False) # Evaluation may take different time among workers. # A barrier make them start the next iteration together. comm.synchronize() def after_train(self): # func is likely a closure that holds reference to the trainer # therefore we clean it to avoid circular reference in the end del self._func class PreciseBN(HookBase): """ The standard implementation of BatchNorm uses EMA in inference, which is sometimes suboptimal. This class computes the true average of statistics rather than the moving average, and put true averages to every BN layer in the given model. It is executed every ``period`` iterations and after the last iteration. """ def __init__(self, period, model, data_loader, num_iter): """ Args: period (int): the period this hook is run, or 0 to not run during training. The hook will always run in the end of training. model (nn.Module): a module whose all BN layers in training mode will be updated by precise BN. Note that user is responsible for ensuring the BN layers to be updated are in training mode when this hook is triggered. data_loader (iterable): it will produce data to be run by `model(data)`. num_iter (int): number of iterations used to compute the precise statistics. """ self._logger = logging.getLogger(__name__) if len(get_bn_modules(model)) == 0: self._logger.info( "PreciseBN is disabled because model does not contain BN layers in training mode." ) self._disabled = True return self._model = model self._data_loader = data_loader self._num_iter = num_iter self._period = period self._disabled = False self._data_iter = None def after_step(self): next_iter = self.trainer.iter + 1 is_final = next_iter == self.trainer.max_iter if is_final or (self._period > 0 and next_iter % self._period == 0): self.update_stats() def update_stats(self): """ Update the model with precise statistics. Users can manually call this method. """ if self._disabled: return if self._data_iter is None: self._data_iter = iter(self._data_loader) num_iter = 0 def data_loader(): nonlocal num_iter num_iter += 1 if num_iter % 100 == 0: self._logger.info( "Running precise-BN ... {}/{} iterations.".format(num_iter, self._num_iter) ) # This way we can reuse the same iterator yield next(self._data_iter) with EventStorage(): # capture events in a new storage to discard them self._logger.info( "Running precise-BN for {} iterations... ".format(self._num_iter) + "Note that this could produce different statistics every time." ) update_bn_stats(self._model, data_loader(), self._num_iter) ================================================ FILE: detectron2/engine/launch.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import torch import torch.distributed as dist import torch.multiprocessing as mp from detectron2.utils import comm __all__ = ["launch"] def _find_free_port(): import socket sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Binding to port 0 will cause the OS to find an available port for us sock.bind(("", 0)) port = sock.getsockname()[1] sock.close() # NOTE: there is still a chance the port could be taken by other processes. return port def launch(main_func, num_gpus_per_machine, num_machines=1, machine_rank=0, dist_url=None, args=()): """ Args: main_func: a function that will be called by `main_func(*args)` num_machines (int): the total number of machines machine_rank (int): the rank of this machine (one per machine) dist_url (str): url to connect to for distributed training, including protocol e.g. "tcp://127.0.0.1:8686". Can be set to auto to automatically select a free port on localhost args (tuple): arguments passed to main_func """ world_size = num_machines * num_gpus_per_machine if world_size > 1: # https://github.com/pytorch/pytorch/pull/14391 # TODO prctl in spawned processes if dist_url == "auto": assert num_machines == 1, "dist_url=auto cannot work with distributed training." port = _find_free_port() dist_url = f"tcp://127.0.0.1:{port}" mp.spawn( _distributed_worker, nprocs=num_gpus_per_machine, args=(main_func, world_size, num_gpus_per_machine, machine_rank, dist_url, args), daemon=False, ) else: main_func(*args) def _distributed_worker( local_rank, main_func, world_size, num_gpus_per_machine, machine_rank, dist_url, args ): assert torch.cuda.is_available(), "cuda is not available. Please check your installation." global_rank = machine_rank * num_gpus_per_machine + local_rank try: dist.init_process_group( backend="NCCL", init_method=dist_url, world_size=world_size, rank=global_rank ) except Exception as e: logger = logging.getLogger(__name__) logger.error("Process group URL: {}".format(dist_url)) raise e # synchronize is needed here to prevent a possible timeout after calling init_process_group # See: https://github.com/facebookresearch/maskrcnn-benchmark/issues/172 comm.synchronize() assert num_gpus_per_machine <= torch.cuda.device_count() torch.cuda.set_device(local_rank) # Setup the local process group (which contains ranks within the same machine) assert comm._LOCAL_PROCESS_GROUP is None num_machines = world_size // num_gpus_per_machine for i in range(num_machines): ranks_on_i = list(range(i * num_gpus_per_machine, (i + 1) * num_gpus_per_machine)) pg = dist.new_group(ranks_on_i) if i == machine_rank: comm._LOCAL_PROCESS_GROUP = pg main_func(*args) ================================================ FILE: detectron2/engine/train_loop.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import numpy as np import time import weakref import torch import detectron2.utils.comm as comm from detectron2.utils.events import EventStorage __all__ = ["HookBase", "TrainerBase", "SimpleTrainer"] class HookBase: """ Base class for hooks that can be registered with :class:`TrainerBase`. Each hook can implement 4 methods. The way they are called is demonstrated in the following snippet: .. code-block:: python hook.before_train() for iter in range(start_iter, max_iter): hook.before_step() trainer.run_step() hook.after_step() hook.after_train() Notes: 1. In the hook method, users can access `self.trainer` to access more properties about the context (e.g., current iteration). 2. A hook that does something in :meth:`before_step` can often be implemented equivalently in :meth:`after_step`. If the hook takes non-trivial time, it is strongly recommended to implement the hook in :meth:`after_step` instead of :meth:`before_step`. The convention is that :meth:`before_step` should only take negligible time. Following this convention will allow hooks that do care about the difference between :meth:`before_step` and :meth:`after_step` (e.g., timer) to function properly. Attributes: trainer: A weak reference to the trainer object. Set by the trainer when the hook is registered. """ def before_train(self): """ Called before the first iteration. """ pass def after_train(self): """ Called after the last iteration. """ pass def before_step(self): """ Called before each iteration. """ pass def after_step(self): """ Called after each iteration. """ pass class TrainerBase: """ Base class for iterative trainer with hooks. The only assumption we made here is: the training runs in a loop. A subclass can implement what the loop is. We made no assumptions about the existence of dataloader, optimizer, model, etc. Attributes: iter(int): the current iteration. start_iter(int): The iteration to start with. By convention the minimum possible value is 0. max_iter(int): The iteration to end training. storage(EventStorage): An EventStorage that's opened during the course of training. """ def __init__(self): self._hooks = [] def register_hooks(self, hooks): """ Register hooks to the trainer. The hooks are executed in the order they are registered. Args: hooks (list[Optional[HookBase]]): list of hooks """ hooks = [h for h in hooks if h is not None] for h in hooks: assert isinstance(h, HookBase) # To avoid circular reference, hooks and trainer cannot own each other. # This normally does not matter, but will cause memory leak if the # involved objects contain __del__: # See http://engineering.hearsaysocial.com/2013/06/16/circular-references-in-python/ h.trainer = weakref.proxy(self) self._hooks.extend(hooks) def train(self, start_iter: int, max_iter: int): """ Args: start_iter, max_iter (int): See docs above """ logger = logging.getLogger(__name__) logger.info("Starting training from iteration {}".format(start_iter)) self.iter = self.start_iter = start_iter self.max_iter = max_iter with EventStorage(start_iter) as self.storage: try: self.before_train() for self.iter in range(start_iter, max_iter): self.before_step() self.run_step() self.after_step() finally: self.after_train() def before_train(self): for h in self._hooks: h.before_train() def after_train(self): for h in self._hooks: h.after_train() def before_step(self): for h in self._hooks: h.before_step() def after_step(self): for h in self._hooks: h.after_step() # this guarantees, that in each hook's after_step, storage.iter == trainer.iter self.storage.step() def run_step(self): raise NotImplementedError class SimpleTrainer(TrainerBase): """ A simple trainer for the most common type of task: single-cost single-optimizer single-data-source iterative optimization. It assumes that every step, you: 1. Compute the loss with a data from the data_loader. 2. Compute the gradients with the above loss. 3. Update the model with the optimizer. If you want to do anything fancier than this, either subclass TrainerBase and implement your own `run_step`, or write your own training loop. """ def __init__(self, model, data_loader, optimizer): """ Args: model: a torch Module. Takes a data from data_loader and returns a dict of losses. data_loader: an iterable. Contains data to be used to call model. optimizer: a torch optimizer. """ super().__init__() """ We set the model to training mode in the trainer. However it's valid to train a model that's in eval mode. If you want your model (or a submodule of it) to behave like evaluation during training, you can overwrite its train() method. """ model.train() self.model = model self.data_loader = data_loader self._data_loader_iter = iter(data_loader) self.optimizer = optimizer def run_step(self): """ Implement the standard training logic described above. """ assert self.model.training, "[SimpleTrainer] model was changed to eval mode!" start = time.perf_counter() """ If your want to do something with the data, you can wrap the dataloader. """ data = next(self._data_loader_iter) data_time = time.perf_counter() - start """ If your want to do something with the losses, you can wrap the model. """ loss_dict = self.model(data) losses = sum(loss for loss in loss_dict.values()) self._detect_anomaly(losses, loss_dict) metrics_dict = loss_dict metrics_dict["data_time"] = data_time self._write_metrics(metrics_dict) """ If you need accumulate gradients or something similar, you can wrap the optimizer with your custom `zero_grad()` method. """ self.optimizer.zero_grad() losses.backward() """ If you need gradient clipping/scaling or other processing, you can wrap the optimizer with your custom `step()` method. """ self.optimizer.step() def _detect_anomaly(self, losses, loss_dict): if not torch.isfinite(losses).all(): raise FloatingPointError( "Loss became infinite or NaN at iteration={}!\nloss_dict = {}".format( self.iter, loss_dict ) ) def _write_metrics(self, metrics_dict: dict): """ Args: metrics_dict (dict): dict of scalar metrics """ metrics_dict = { k: v.detach().cpu().item() if isinstance(v, torch.Tensor) else float(v) for k, v in metrics_dict.items() } # gather metrics among all workers for logging # This assumes we do DDP-style training, which is currently the only # supported method in detectron2. all_metrics_dict = comm.gather(metrics_dict) if comm.is_main_process(): if "data_time" in all_metrics_dict[0]: # data_time among workers can have high variance. The actual latency # caused by data_time is the maximum among workers. data_time = np.max([x.pop("data_time") for x in all_metrics_dict]) self.storage.put_scalar("data_time", data_time) # average the rest metrics metrics_dict = { k: np.mean([x[k] for x in all_metrics_dict]) for k in all_metrics_dict[0].keys() } total_losses_reduced = sum(loss for loss in metrics_dict.values()) self.storage.put_scalar("total_loss", total_losses_reduced) if len(metrics_dict) > 1: self.storage.put_scalars(**metrics_dict) ================================================ FILE: detectron2/evaluation/__init__.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .cityscapes_evaluation import CityscapesEvaluator from .soba_evaluation import SOBAEvaluator from .evaluator import DatasetEvaluator, DatasetEvaluators, inference_context, inference_on_dataset from .lvis_evaluation import LVISEvaluator from .panoptic_evaluation import COCOPanopticEvaluator from .pascal_voc_evaluation import PascalVOCDetectionEvaluator from .sem_seg_evaluation import SemSegEvaluator from .testing import print_csv_format, verify_results __all__ = [k for k in globals().keys() if not k.startswith("_")] ================================================ FILE: detectron2/evaluation/cityscapes_evaluation.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import glob import logging import os import tempfile from collections import OrderedDict import torch from PIL import Image from detectron2.data import MetadataCatalog from detectron2.utils import comm from .evaluator import DatasetEvaluator class CityscapesEvaluator(DatasetEvaluator): """ Evaluate instance segmentation results using cityscapes API. Note: * It does not work in multi-machine distributed training. * It contains a synchronization, therefore has to be used on all ranks. """ def __init__(self, dataset_name): """ Args: dataset_name (str): the name of the dataset. It must have the following metadata associated with it: "thing_classes", "gt_dir". """ self._metadata = MetadataCatalog.get(dataset_name) self._cpu_device = torch.device("cpu") self._logger = logging.getLogger(__name__) def reset(self): self._working_dir = tempfile.TemporaryDirectory(prefix="cityscapes_eval_") self._temp_dir = self._working_dir.name # All workers will write to the same results directory # TODO this does not work in distributed training self._temp_dir = comm.all_gather(self._temp_dir)[0] if self._temp_dir != self._working_dir.name: self._working_dir.cleanup() self._logger.info( "Writing cityscapes results to temporary directory {} ...".format(self._temp_dir) ) def process(self, inputs, outputs): from cityscapesscripts.helpers.labels import name2label for input, output in zip(inputs, outputs): file_name = input["file_name"] basename = os.path.splitext(os.path.basename(file_name))[0] pred_txt = os.path.join(self._temp_dir, basename + "_pred.txt") output = output["instances"].to(self._cpu_device) num_instances = len(output) with open(pred_txt, "w") as fout: for i in range(num_instances): pred_class = output.pred_classes[i] classes = self._metadata.thing_classes[pred_class] class_id = name2label[classes].id score = output.scores[i] mask = output.pred_masks[i].numpy().astype("uint8") png_filename = os.path.join( self._temp_dir, basename + "_{}_{}.png".format(i, classes) ) Image.fromarray(mask * 255).save(png_filename) fout.write("{} {} {}\n".format(os.path.basename(png_filename), class_id, score)) def evaluate(self): """ Returns: dict: has a key "segm", whose value is a dict of "AP" and "AP50". """ comm.synchronize() if comm.get_rank() > 0: return os.environ["CITYSCAPES_DATASET"] = os.path.abspath( os.path.join(self._metadata.gt_dir, "..", "..") ) # Load the Cityscapes eval script *after* setting the required env var, # since the script reads CITYSCAPES_DATASET into global variables at load time. import cityscapesscripts.evaluation.evalInstanceLevelSemanticLabeling as cityscapes_eval self._logger.info("Evaluating results under {} ...".format(self._temp_dir)) # set some global states in cityscapes evaluation API, before evaluating cityscapes_eval.args.predictionPath = os.path.abspath(self._temp_dir) cityscapes_eval.args.predictionWalk = None cityscapes_eval.args.JSONOutput = False cityscapes_eval.args.colorized = False cityscapes_eval.args.gtInstancesFile = os.path.join(self._temp_dir, "gtInstances.json") # These lines are adopted from # https://github.com/mcordts/cityscapesScripts/blob/master/cityscapesscripts/evaluation/evalInstanceLevelSemanticLabeling.py # noqa groundTruthImgList = glob.glob(cityscapes_eval.args.groundTruthSearch) assert len( groundTruthImgList ), "Cannot find any ground truth images to use for evaluation. Searched for: {}".format( cityscapes_eval.args.groundTruthSearch ) predictionImgList = [] for gt in groundTruthImgList: predictionImgList.append(cityscapes_eval.getPrediction(gt, cityscapes_eval.args)) results = cityscapes_eval.evaluateImgLists( predictionImgList, groundTruthImgList, cityscapes_eval.args )["averages"] ret = OrderedDict() ret["segm"] = {"AP": results["allAp"] * 100, "AP50": results["allAp50%"] * 100} self._working_dir.cleanup() return ret ================================================ FILE: detectron2/evaluation/coco_evaluation.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import contextlib import copy import io import itertools import json import logging import numpy as np import os import pickle from collections import OrderedDict import pycocotools.mask as mask_util import torch from fvcore.common.file_io import PathManager from pycocotools.coco import COCO from pycocotools.cocoeval import COCOeval from tabulate import tabulate import detectron2.utils.comm as comm from detectron2.data import MetadataCatalog from detectron2.structures import Boxes, BoxMode, pairwise_iou from detectron2.utils.logger import create_small_table from .evaluator import DatasetEvaluator class COCOEvaluator(DatasetEvaluator): """ Evaluate object proposal, instance detection/segmentation, keypoint detection outputs using COCO's metrics and APIs. """ def __init__(self, dataset_name, cfg, distributed, output_dir=None): """ Args: dataset_name (str): name of the dataset to be evaluated. It must have the following corresponding metadata: "json_file": the path to the COCO format annotation cfg (CfgNode): config instance distributed (True): if True, will collect results from all ranks for evaluation. Otherwise, will evaluate the results in the current process. output_dir (str): optional, an output directory to dump results. """ self._tasks = self._tasks_from_config(cfg) self._distributed = distributed self._output_dir = output_dir self._cpu_device = torch.device("cpu") self._logger = logging.getLogger(__name__) self._metadata = MetadataCatalog.get(dataset_name) json_file = PathManager.get_local_path(self._metadata.json_file) with contextlib.redirect_stdout(io.StringIO()): self._coco_api = COCO(json_file) self._kpt_oks_sigmas = cfg.TEST.KEYPOINT_OKS_SIGMAS # Test set json files do not contain annotations (evaluation must be # performed using the COCO evaluation server). self._do_evaluation = len(self._coco_api.getAnnIds()) > 0 def reset(self): self._predictions = [] self._coco_results = [] def _tasks_from_config(self, cfg): """ Returns: tuple[str]: tasks that can be evaluated under the given configuration. """ tasks = ("bbox",) if cfg.MODEL.MASK_ON: tasks = tasks + ("segm",) if cfg.MODEL.KEYPOINT_ON: tasks = tasks + ("keypoints",) return tasks def process(self, inputs, outputs): """ Args: inputs: the inputs to a COCO model (e.g., GeneralizedRCNN). It is a list of dict. Each dict corresponds to an image and contains keys like "height", "width", "file_name", "image_id". outputs: the outputs of a COCO model. It is a list of dicts with key "instances" that contains :class:`Instances`. """ results,associations = outputs for input, result, association in zip(inputs, results, associations): prediction = {"image_id": input["image_id"]} # TODO this is ugly if "instances" in result: instances = result["instances"].to(self._cpu_device) if instances.has("pred_masks"): # use RLE to encode the masks, because they are too large and takes memory # since this evaluator stores results of the entire dataset # Our model may predict bool array, but cocoapi expects uint8 rles = [ mask_util.encode(np.array(mask[:, :, None], order="F", dtype="uint8"))[0] for mask in instances.pred_masks ] for rle in rles: # "counts" is an array encoded by mask_util as a byte-stream. Python3's # json writer which always produces strings cannot serialize a bytestream # unless you decode it. Thankfully, utf-8 works out (which is also what # the pycocotools/_mask.pyx does). rle["counts"] = rle["counts"].decode("utf-8") instances.pred_masks_rle = rles instances.remove("pred_masks") prediction["instances"] = instances_to_json(instances, input["image_id"]) if "instances" in association: instances = association["instances"].to(self._cpu_device) if instances.has("pred_masks"): rles = [ mask_util.encode(np.array(mask[:,:],order='F',dtype='uint8'))[0] for mask in instances.pred_masks ] for rle in rles: rle["counts"] = rle["counts"].decode("utf-8") instances.pred_masks_rle = rles instances.remove("pred_masks") prediction["associations"] = instances_to_json(instances, input["image_id"]) if "proposals" in result: prediction["proposals"] = result["proposals"].to(self._cpu_device) if "rela_proposals" in association: prediction["rela_proposals"] = association["proposals"].to(self._cpu_device) self._predictions.append(prediction) def evaluate(self): if self._distributed: comm.synchronize() self._predictions = comm.gather(self._predictions, dst=0) self._predictions = list(itertools.chain(*self._predictions)) if not comm.is_main_process(): return {},{} if len(self._predictions) == 0: self._logger.warning("[COCOEvaluator] Did not receive valid predictions.") return {} if self._output_dir: PathManager.mkdirs(self._output_dir) file_path = os.path.join(self._output_dir, "instances_predictions.pth") with PathManager.open(file_path, "wb") as f: torch.save(self._predictions, f) self._results = OrderedDict() self._association_results = OrderedDict() if "proposals" in self._predictions[0]: #and "rela_proposals" in self._predictions[0]: self._eval_box_proposals() if "instances" in self._predictions[0]: #and "associations" in self._predictions[0]: self._eval_predictions(set(self._tasks)) # Copy so the caller can do whatever with results return copy.deepcopy(self._results),copy.deepcopy(self._association_results) def _eval_predictions(self, tasks): """ Evaluate self._predictions on the given tasks. Fill self._results with the metrics of the tasks. """ self._logger.info("Preparing results for COCO format ...") self._coco_results = list(itertools.chain(*[x["instances"] for x in self._predictions])) self._rela_results = list(itertools.chain(*[x["associations"] for x in self._predictions])) # unmap the category ids for COCO if hasattr(self._metadata, "thing_dataset_id_to_contiguous_id"): reverse_id_mapping = { v: k for k, v in self._metadata.thing_dataset_id_to_contiguous_id.items() } for result in self._coco_results: result["category_id"] = reverse_id_mapping[result["category_id"]] if hasattr(self._metadata, "association_dataset_id_to_contiguous_id"): reverse_rela_if_mapping = { v: k for k,v in self._metadata.association_dataset_id_to_contiguous_id.items() } for result in self._rela_results: result["category_id"] = reverse_rela_if_mapping[result["category_id"]] if self._output_dir: file_path = os.path.join(self._output_dir, "coco_instances_results.json") self._logger.info("Saving results to {}".format(file_path)) with PathManager.open(file_path, "w") as f: f.write(json.dumps(self._coco_results)) f.flush() file_path = os.path.join(self._output_dir, "coco_association_results.json") self._logger.info("Saving association results to {}".format(file_path)) with PathManager.open(file_path, "w") as f: f.write(json.dumps(self._rela_results)) f.flush() if not self._do_evaluation: self._logger.info("Annotations are not available for evaluation.") return self._logger.info("Evaluating predictions ...") tasks = ('bbox','segm') for task in sorted(tasks): coco_eval = ( _evaluate_predictions_on_coco( self._coco_api, self._coco_results, task, kpt_oks_sigmas=self._kpt_oks_sigmas ) if len(self._coco_results) > 0 else None # cocoapi does not handle empty results very well ) res = self._derive_coco_results( coco_eval, task, class_names=self._metadata.get("thing_classes") ) self._results[task] = res self._logger.info("Evaluating association predictions ...") tasks = ('bbox','segm') for task in sorted(tasks): coco_eval =( _evaluate_predictions_on_coco( self._coco_api, self._rela_results, task, kpt_oks_sigmas=self._kpt_oks_sigmas,is_rela=True ) if len(self._rela_results)>0 else None ) res = self._derive_coco_results( coco_eval, task, class_names=self._metadata.get("association_classes") ) self._association_results[task] = res def _eval_box_proposals(self): """ Evaluate the box proposals in self._predictions. Fill self._results with the metrics for "box_proposals" task. """ if self._output_dir: # Saving generated box proposals to file. # Predicted box_proposals are in XYXY_ABS mode. bbox_mode = BoxMode.XYXY_ABS.value ids, boxes, objectness_logits = [], [], [] rela_boxes, rela_objectness_logits = [], [] for prediction in self._predictions: ids.append(prediction["image_id"]) boxes.append(prediction["proposals"].proposal_boxes.tensor.numpy()) objectness_logits.append(prediction["proposals"].objectness_logits.numpy()) rela_boxes.append(prediction["rela_proposals"].proposal_boxes.tensor.numpy()) rela_objectness_logits.append(prediction["rela_proposals"].objectness_logits.numpy()) proposal_data = { "boxes": boxes, "objectness_logits": objectness_logits, "ids": ids, "bbox_mode": bbox_mode, } rela_proposal_data = { "boxes" : boxes, "objectness_logits": objectness_logits, "ids": ids, "bbox_mode": bbox_mode, } with PathManager.open(os.path.join(self._output_dir, "box_proposals.pkl"), "wb") as f: pickle.dump(proposal_data, f) with PathManager.open(os.path.join(self._output_dir, "rela_box_proposals.pkl"), "wb") as f: pickle.dump(rela_proposal_data, f) if not self._do_evaluation: self._logger.info("Annotations are not available for evaluation.") return self._logger.info("Evaluating bbox proposals ...") res = {} rela_res = {} areas = {"all": "", "small": "s", "medium": "m", "large": "l"} for limit in [100, 1000]: for area, suffix in areas.items(): stats = _evaluate_box_proposals( self._predictions, self._coco_api, area=area, limit=limit ) key = "AR{}@{:d}".format(suffix, limit) res[key] = float(stats["ar"].item() * 100) stats = _evaluate_box_proposals( self._predictions, self._coco_api, area = area, limit =limit ) key = "AR{}@{:d}".format(suffix, limit) rela_res[key] = float(stats["ar"].item() * 100) self._logger.info("Proposal metrics: \n" + create_small_table(res)) self._results["box_proposals"] = res self._association_results["box_proposals"] = rela_res def _derive_coco_results(self, coco_eval, iou_type, class_names=None): """ Derive the desired score numbers from summarized COCOeval. Args: coco_eval (None or COCOEval): None represents no predictions from model. iou_type (str): class_names (None or list[str]): if provided, will use it to predict per-category AP. Returns: a dict of {metric name: score} """ metrics = { "bbox": ["AP", "AP50", "AP75", "APs", "APm", "APl"], "segm": ["AP", "AP50", "AP75", "APs", "APm", "APl"], "keypoints": ["AP", "AP50", "AP75", "APm", "APl"], }[iou_type] if coco_eval is None: self._logger.warn("No predictions from the model! Set scores to -1") return {metric: -1 for metric in metrics} # the standard metrics results = {metric: float(coco_eval.stats[idx] * 100) for idx, metric in enumerate(metrics)} self._logger.info( "Evaluation results for {}: \n".format(iou_type) + create_small_table(results) ) if class_names is None or len(class_names) <= 1: return results # Compute per-category AP # from https://github.com/facebookresearch/Detectron/blob/a6a835f5b8208c45d0dce217ce9bbda915f44df7/detectron/datasets/json_dataset_evaluator.py#L222-L252 # noqa precisions = coco_eval.eval["precision"] # precision has dims (iou, recall, cls, area range, max dets) assert len(class_names) == precisions.shape[2] results_per_category = [] for idx, name in enumerate(class_names): # area range index 0: all area ranges # max dets index -1: typically 100 per image precision = precisions[:, :, idx, 0, -1] precision = precision[precision > -1] ap = np.mean(precision) if precision.size else float("nan") results_per_category.append(("{}".format(name), float(ap * 100))) # tabulate it N_COLS = min(6, len(results_per_category) * 2) results_flatten = list(itertools.chain(*results_per_category)) results_2d = itertools.zip_longest(*[results_flatten[i::N_COLS] for i in range(N_COLS)]) table = tabulate( results_2d, tablefmt="pipe", floatfmt=".3f", headers=["category", "AP"] * (N_COLS // 2), numalign="left", ) self._logger.info("Per-category {} AP: \n".format(iou_type) + table) results.update({"AP-" + name: ap for name, ap in results_per_category}) return results def instances_to_json(instances, img_id): num_instance = len(instances) has_light = instances.has("pred_light") if num_instance == 0: return [] try: boxes = instances.pred_boxes.tensor.numpy() boxes = BoxMode.convert(boxes, BoxMode.XYXY_ABS, BoxMode.XYWH_ABS) boxes = boxes.tolist() scores = instances.scores.tolist() classes = instances.pred_classes.tolist() association = instances.pred_associations if has_light: light = instances.pred_light except: boxes = instances.pred_boxes boxes =BoxMode.convert(np.array(boxes,dtype='float'),BoxMode.XYXY_ABS,BoxMode.XYWH_ABS) boxes = boxes.tolist() scores = instances.scores association = instances.pred_associations classes = instances.pred_classes if has_light: light = instances.pred_light has_mask = instances.has("pred_masks_rle") if has_mask: rles = instances.pred_masks_rle has_keypoints = instances.has("pred_keypoints") if has_keypoints: keypoints = instances.pred_keypoints results = [] for k in range(num_instance): result = { "image_id": img_id, "category_id": classes[k], "bbox": boxes[k], "score": scores[k], 'association_id':association[k] } if has_light: result["light"] = light[k] if has_mask: result["segmentation"] = rles[k] if has_keypoints: # In COCO annotations, # keypoints coordinates are pixel indices. # However our predictions are floating point coordinates. # Therefore we subtract 0.5 to be consistent with the annotation format. # This is the inverse of data loading logic in `datasets/coco.py`. keypoints[k][:,:2] -= 0.5 result["keypoints"] = keypoints[k].flatten().tolist() results.append(result) return results # inspired from Detectron: # https://github.com/facebookresearch/Detectron/blob/a6a835f5b8208c45d0dce217ce9bbda915f44df7/detectron/datasets/json_dataset_evaluator.py#L255 # noqa def _evaluate_box_proposals(dataset_predictions, coco_api, thresholds=None, area="all", limit=None): """ Evaluate detection proposal recall metrics. This function is a much faster alternative to the official COCO API recall evaluation code. However, it produces slightly different results. """ # Record max overlap value for each gt box # Return vector of overlap values areas = { "all": 0, "small": 1, "medium": 2, "large": 3, "96-128": 4, "128-256": 5, "256-512": 6, "512-inf": 7, } area_ranges = [ [0 ** 2, 1e5 ** 2], # all [0 ** 2, 32 ** 2], # small [32 ** 2, 96 ** 2], # medium [96 ** 2, 1e5 ** 2], # large [96 ** 2, 128 ** 2], # 96-128 [128 ** 2, 256 ** 2], # 128-256 [256 ** 2, 512 ** 2], # 256-512 [512 ** 2, 1e5 ** 2], ] # 512-inf assert area in areas, "Unknown area range: {}".format(area) area_range = area_ranges[areas[area]] gt_overlaps = [] num_pos = 0 for prediction_dict in dataset_predictions: predictions = prediction_dict["proposals"] # sort predictions in descending order # TODO maybe remove this and make it explicit in the documentation inds = predictions.objectness_logits.sort(descending=True)[1] predictions = predictions[inds] ann_ids = coco_api.getAnnIds(imgIds=prediction_dict["image_id"]) anno = coco_api.loadAnns(ann_ids) gt_boxes = [ BoxMode.convert(obj["bbox"], BoxMode.XYWH_ABS, BoxMode.XYXY_ABS) for obj in anno if obj["iscrowd"] == 0 ] gt_boxes = torch.as_tensor(gt_boxes).reshape(-1, 4) # guard against no boxes gt_boxes = Boxes(gt_boxes) gt_areas = torch.as_tensor([obj["area"] for obj in anno if obj["iscrowd"] == 0]) if len(gt_boxes) == 0 or len(predictions) == 0: continue valid_gt_inds = (gt_areas >= area_range[0]) & (gt_areas <= area_range[1]) gt_boxes = gt_boxes[valid_gt_inds] num_pos += len(gt_boxes) if len(gt_boxes) == 0: continue if limit is not None and len(predictions) > limit: predictions = predictions[:limit] overlaps = pairwise_iou(predictions.proposal_boxes, gt_boxes) _gt_overlaps = torch.zeros(len(gt_boxes)) for j in range(min(len(predictions), len(gt_boxes))): # find which proposal box maximally covers each gt box # and get the iou amount of coverage for each gt box max_overlaps, argmax_overlaps = overlaps.max(dim=0) # find which gt box is 'best' covered (i.e. 'best' = most iou) gt_ovr, gt_ind = max_overlaps.max(dim=0) assert gt_ovr >= 0 # find the proposal box that covers the best covered gt box box_ind = argmax_overlaps[gt_ind] # record the iou coverage of this gt box _gt_overlaps[j] = overlaps[box_ind, gt_ind] assert _gt_overlaps[j] == gt_ovr # mark the proposal box and the gt box as used overlaps[box_ind, :] = -1 overlaps[:, gt_ind] = -1 # append recorded iou coverage level gt_overlaps.append(_gt_overlaps) gt_overlaps = torch.cat(gt_overlaps, dim=0) gt_overlaps, _ = torch.sort(gt_overlaps) if thresholds is None: step = 0.05 thresholds = torch.arange(0.5, 0.95 + 1e-5, step, dtype=torch.float32) recalls = torch.zeros_like(thresholds) # compute recall for each iou threshold for i, t in enumerate(thresholds): recalls[i] = (gt_overlaps >= t).float().sum() / float(num_pos) # ar = 2 * np.trapz(recalls, thresholds) ar = recalls.mean() return { "ar": ar, "recalls": recalls, "thresholds": thresholds, "gt_overlaps": gt_overlaps, "num_pos": num_pos, } def _evaluate_predictions_on_coco(coco_gt, coco_results, iou_type, kpt_oks_sigmas=None,is_rela= False): """ Evaluate the coco results using COCOEval API. """ assert len(coco_results) > 0 if iou_type == "segm": coco_results = copy.deepcopy(coco_results) # When evaluating mask AP, if the results contain bbox, cocoapi will # use the box area as the area of the instance, instead of the mask area. # This leads to a different definition of small/medium/large. # We remove the bbox field to let mask AP use mask area. for c in coco_results: c.pop("bbox", None) if is_rela: coco_dt = coco_gt.loadRes_rela(coco_results) else: coco_dt = coco_gt.loadRes(coco_results) coco_eval = COCOeval(coco_gt, coco_dt, iou_type) # Use the COCO default keypoint OKS sigmas unless overrides are specified if kpt_oks_sigmas: coco_eval.params.kpt_oks_sigmas = np.array(kpt_oks_sigmas) if is_rela: coco_eval.evaluate_rela() else: coco_eval.evaluate() coco_eval.accumulate() coco_eval.summarize() return coco_eval ================================================ FILE: detectron2/evaluation/evaluation/__init__.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .cityscapes_evaluation import CityscapesEvaluator from .coco_evaluation import COCOEvaluator from .evaluator import DatasetEvaluator, DatasetEvaluators, inference_context, inference_on_dataset from .lvis_evaluation import LVISEvaluator from .panoptic_evaluation import COCOPanopticEvaluator from .pascal_voc_evaluation import PascalVOCDetectionEvaluator from .sem_seg_evaluation import SemSegEvaluator from .testing import print_csv_format, verify_results __all__ = [k for k in globals().keys() if not k.startswith("_")] ================================================ FILE: detectron2/evaluation/evaluation/cityscapes_evaluation.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import glob import logging import os import tempfile from collections import OrderedDict import torch from PIL import Image from detectron2.data import MetadataCatalog from detectron2.utils import comm from .evaluator import DatasetEvaluator class CityscapesEvaluator(DatasetEvaluator): """ Evaluate instance segmentation results using cityscapes API. Note: * It does not work in multi-machine distributed training. * It contains a synchronization, therefore has to be used on all ranks. """ def __init__(self, dataset_name): """ Args: dataset_name (str): the name of the dataset. It must have the following metadata associated with it: "thing_classes", "gt_dir". """ self._metadata = MetadataCatalog.get(dataset_name) self._cpu_device = torch.device("cpu") self._logger = logging.getLogger(__name__) def reset(self): self._working_dir = tempfile.TemporaryDirectory(prefix="cityscapes_eval_") self._temp_dir = self._working_dir.name # All workers will write to the same results directory # TODO this does not work in distributed training self._temp_dir = comm.all_gather(self._temp_dir)[0] if self._temp_dir != self._working_dir.name: self._working_dir.cleanup() self._logger.info( "Writing cityscapes results to temporary directory {} ...".format(self._temp_dir) ) def process(self, inputs, outputs): from cityscapesscripts.helpers.labels import name2label for input, output in zip(inputs, outputs): file_name = input["file_name"] basename = os.path.splitext(os.path.basename(file_name))[0] pred_txt = os.path.join(self._temp_dir, basename + "_pred.txt") output = output["instances"].to(self._cpu_device) num_instances = len(output) with open(pred_txt, "w") as fout: for i in range(num_instances): pred_class = output.pred_classes[i] classes = self._metadata.thing_classes[pred_class] class_id = name2label[classes].id score = output.scores[i] mask = output.pred_masks[i].numpy().astype("uint8") png_filename = os.path.join( self._temp_dir, basename + "_{}_{}.png".format(i, classes) ) Image.fromarray(mask * 255).save(png_filename) fout.write("{} {} {}\n".format(os.path.basename(png_filename), class_id, score)) def evaluate(self): """ Returns: dict: has a key "segm", whose value is a dict of "AP" and "AP50". """ comm.synchronize() if comm.get_rank() > 0: return os.environ["CITYSCAPES_DATASET"] = os.path.abspath( os.path.join(self._metadata.gt_dir, "..", "..") ) # Load the Cityscapes eval script *after* setting the required env var, # since the script reads CITYSCAPES_DATASET into global variables at load time. import cityscapesscripts.evaluation.evalInstanceLevelSemanticLabeling as cityscapes_eval self._logger.info("Evaluating results under {} ...".format(self._temp_dir)) # set some global states in cityscapes evaluation API, before evaluating cityscapes_eval.args.predictionPath = os.path.abspath(self._temp_dir) cityscapes_eval.args.predictionWalk = None cityscapes_eval.args.JSONOutput = False cityscapes_eval.args.colorized = False cityscapes_eval.args.gtInstancesFile = os.path.join(self._temp_dir, "gtInstances.json") # These lines are adopted from # https://github.com/mcordts/cityscapesScripts/blob/master/cityscapesscripts/evaluation/evalInstanceLevelSemanticLabeling.py # noqa groundTruthImgList = glob.glob(cityscapes_eval.args.groundTruthSearch) assert len( groundTruthImgList ), "Cannot find any ground truth images to use for evaluation. Searched for: {}".format( cityscapes_eval.args.groundTruthSearch ) predictionImgList = [] for gt in groundTruthImgList: predictionImgList.append(cityscapes_eval.getPrediction(gt, cityscapes_eval.args)) results = cityscapes_eval.evaluateImgLists( predictionImgList, groundTruthImgList, cityscapes_eval.args )["averages"] ret = OrderedDict() ret["segm"] = {"AP": results["allAp"] * 100, "AP50": results["allAp50%"] * 100} self._working_dir.cleanup() return ret ================================================ FILE: detectron2/evaluation/evaluation/coco_evaluation.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import contextlib import copy import io import itertools import json import logging import numpy as np import os import pickle from collections import OrderedDict import pycocotools.mask as mask_util import torch from fvcore.common.file_io import PathManager from pycocotools.coco import COCO from pycocotools.cocoeval import COCOeval from tabulate import tabulate import detectron2.utils.comm as comm from detectron2.data import MetadataCatalog from detectron2.structures import Boxes, BoxMode, pairwise_iou from detectron2.utils.logger import create_small_table from .evaluator import DatasetEvaluator class COCOEvaluator(DatasetEvaluator): """ Evaluate object proposal, instance detection/segmentation, keypoint detection outputs using COCO's metrics and APIs. """ def __init__(self, dataset_name, cfg, distributed, output_dir=None): """ Args: dataset_name (str): name of the dataset to be evaluated. It must have the following corresponding metadata: "json_file": the path to the COCO format annotation cfg (CfgNode): config instance distributed (True): if True, will collect results from all ranks for evaluation. Otherwise, will evaluate the results in the current process. output_dir (str): optional, an output directory to dump results. """ self._tasks = self._tasks_from_config(cfg) self._distributed = distributed self._output_dir = output_dir self._cpu_device = torch.device("cpu") self._logger = logging.getLogger(__name__) self._metadata = MetadataCatalog.get(dataset_name) json_file = PathManager.get_local_path(self._metadata.json_file) with contextlib.redirect_stdout(io.StringIO()): self._coco_api = COCO(json_file) self._kpt_oks_sigmas = cfg.TEST.KEYPOINT_OKS_SIGMAS # Test set json files do not contain annotations (evaluation must be # performed using the COCO evaluation server). self._do_evaluation = len(self._coco_api.getAnnIds()) > 0 def reset(self): self._predictions = [] self._coco_results = [] def _tasks_from_config(self, cfg): """ Returns: tuple[str]: tasks that can be evaluated under the given configuration. """ tasks = ("bbox",) if cfg.MODEL.MASK_ON: tasks = tasks + ("segm",) if cfg.MODEL.KEYPOINT_ON: tasks = tasks + ("keypoints",) return tasks def process(self, inputs, outputs): """ Args: inputs: the inputs to a COCO model (e.g., GeneralizedRCNN). It is a list of dict. Each dict corresponds to an image and contains keys like "height", "width", "file_name", "image_id". outputs: the outputs of a COCO model. It is a list of dicts with key "instances" that contains :class:`Instances`. """ results,associations = outputs for input, result, association in zip(inputs, results, associations): prediction = {"image_id": input["image_id"]} # TODO this is ugly if "instances" in result: instances = result["instances"].to(self._cpu_device) if instances.has("pred_masks"): # use RLE to encode the masks, because they are too large and takes memory # since this evaluator stores results of the entire dataset # Our model may predict bool array, but cocoapi expects uint8 rles = [ mask_util.encode(np.array(mask[:, :, None], order="F", dtype="uint8"))[0] for mask in instances.pred_masks ] for rle in rles: # "counts" is an array encoded by mask_util as a byte-stream. Python3's # json writer which always produces strings cannot serialize a bytestream # unless you decode it. Thankfully, utf-8 works out (which is also what # the pycocotools/_mask.pyx does). rle["counts"] = rle["counts"].decode("utf-8") instances.pred_masks_rle = rles instances.remove("pred_masks") prediction["instances"] = instances_to_json(instances, input["image_id"]) if "instances" in association: instances = association["instances"].to(self._cpu_device) if instances.has("pred_masks"): rles = [ mask_util.encode(np.array(mask[:,:],order='F',dtype='uint8'))[0] for mask in instances.pred_masks ] for rle in rles: rle["counts"] = rle["counts"].decode("utf-8") instances.pred_masks_rle = rles instances.remove("pred_masks") prediction["associations"] = instances_to_json(instances, input["image_id"]) if "proposals" in result: prediction["proposals"] = result["proposals"].to(self._cpu_device) if "rela_proposals" in association: prediction["rela_proposals"] = association["proposals"].to(self._cpu_device) self._predictions.append(prediction) def evaluate(self): if self._distributed: comm.synchronize() self._predictions = comm.gather(self._predictions, dst=0) self._predictions = list(itertools.chain(*self._predictions)) if not comm.is_main_process(): return {},{} if len(self._predictions) == 0: self._logger.warning("[COCOEvaluator] Did not receive valid predictions.") return {} if self._output_dir: PathManager.mkdirs(self._output_dir) file_path = os.path.join(self._output_dir, "instances_predictions.pth") with PathManager.open(file_path, "wb") as f: torch.save(self._predictions, f) self._results = OrderedDict() self._association_results = OrderedDict() if "proposals" in self._predictions[0]: #and "rela_proposals" in self._predictions[0]: self._eval_box_proposals() if "instances" in self._predictions[0]: #and "associations" in self._predictions[0]: self._eval_predictions(set(self._tasks)) # Copy so the caller can do whatever with results return copy.deepcopy(self._results),copy.deepcopy(self._association_results) def _eval_predictions(self, tasks): """ Evaluate self._predictions on the given tasks. Fill self._results with the metrics of the tasks. """ self._logger.info("Preparing results for COCO format ...") self._coco_results = list(itertools.chain(*[x["instances"] for x in self._predictions])) self._rela_results = list(itertools.chain(*[x["associations"] for x in self._predictions])) # unmap the category ids for COCO if hasattr(self._metadata, "thing_dataset_id_to_contiguous_id"): reverse_id_mapping = { v: k for k, v in self._metadata.thing_dataset_id_to_contiguous_id.items() } for result in self._coco_results: result["category_id"] = reverse_id_mapping[result["category_id"]] if hasattr(self._metadata, "association_dataset_id_to_contiguous_id"): reverse_rela_if_mapping = { v: k for k,v in self._metadata.association_dataset_id_to_contiguous_id.items() } for result in self._rela_results: result["category_id"] = reverse_rela_if_mapping[result["category_id"]] if self._output_dir: file_path = os.path.join(self._output_dir, "coco_instances_results.json") self._logger.info("Saving results to {}".format(file_path)) with PathManager.open(file_path, "w") as f: f.write(json.dumps(self._coco_results)) f.flush() file_path = os.path.join(self._output_dir, "coco_association_results.json") self._logger.info("Saving association results to {}".format(file_path)) with PathManager.open(file_path, "w") as f: f.write(json.dumps(self._rela_results)) f.flush() if not self._do_evaluation: self._logger.info("Annotations are not available for evaluation.") return self._logger.info("Evaluating predictions ...") tasks = ('bbox','segm') for task in sorted(tasks): coco_eval = ( _evaluate_predictions_on_coco( self._coco_api, self._coco_results, task, kpt_oks_sigmas=self._kpt_oks_sigmas ) if len(self._coco_results) > 0 else None # cocoapi does not handle empty results very well ) res = self._derive_coco_results( coco_eval, task, class_names=self._metadata.get("thing_classes") ) self._results[task] = res self._logger.info("Evaluating association predictions ...") tasks = ('bbox','segm') for task in sorted(tasks): coco_eval =( _evaluate_predictions_on_coco( self._coco_api, self._rela_results, task, kpt_oks_sigmas=self._kpt_oks_sigmas,is_rela=True ) if len(self._rela_results)>0 else None ) res = self._derive_coco_results( coco_eval, task, class_names=self._metadata.get("association_classes") ) self._association_results[task] = res def _eval_box_proposals(self): """ Evaluate the box proposals in self._predictions. Fill self._results with the metrics for "box_proposals" task. """ if self._output_dir: # Saving generated box proposals to file. # Predicted box_proposals are in XYXY_ABS mode. bbox_mode = BoxMode.XYXY_ABS.value ids, boxes, objectness_logits = [], [], [] rela_boxes, rela_objectness_logits = [], [] for prediction in self._predictions: ids.append(prediction["image_id"]) boxes.append(prediction["proposals"].proposal_boxes.tensor.numpy()) objectness_logits.append(prediction["proposals"].objectness_logits.numpy()) rela_boxes.append(prediction["rela_proposals"].proposal_boxes.tensor.numpy()) rela_objectness_logits.append(prediction["rela_proposals"].objectness_logits.numpy()) proposal_data = { "boxes": boxes, "objectness_logits": objectness_logits, "ids": ids, "bbox_mode": bbox_mode, } rela_proposal_data = { "boxes" : boxes, "objectness_logits": objectness_logits, "ids": ids, "bbox_mode": bbox_mode, } with PathManager.open(os.path.join(self._output_dir, "box_proposals.pkl"), "wb") as f: pickle.dump(proposal_data, f) with PathManager.open(os.path.join(self._output_dir, "rela_box_proposals.pkl"), "wb") as f: pickle.dump(rela_proposal_data, f) if not self._do_evaluation: self._logger.info("Annotations are not available for evaluation.") return self._logger.info("Evaluating bbox proposals ...") res = {} rela_res = {} areas = {"all": "", "small": "s", "medium": "m", "large": "l"} for limit in [100, 1000]: for area, suffix in areas.items(): stats = _evaluate_box_proposals( self._predictions, self._coco_api, area=area, limit=limit ) key = "AR{}@{:d}".format(suffix, limit) res[key] = float(stats["ar"].item() * 100) stats = _evaluate_box_proposals( self._predictions, self._coco_api, area = area, limit =limit ) key = "AR{}@{:d}".format(suffix, limit) rela_res[key] = float(stats["ar"].item() * 100) self._logger.info("Proposal metrics: \n" + create_small_table(res)) self._results["box_proposals"] = res self._association_results["box_proposals"] = rela_res def _derive_coco_results(self, coco_eval, iou_type, class_names=None): """ Derive the desired score numbers from summarized COCOeval. Args: coco_eval (None or COCOEval): None represents no predictions from model. iou_type (str): class_names (None or list[str]): if provided, will use it to predict per-category AP. Returns: a dict of {metric name: score} """ metrics = { "bbox": ["AP", "AP50", "AP75", "APs", "APm", "APl"], "segm": ["AP", "AP50", "AP75", "APs", "APm", "APl"], "keypoints": ["AP", "AP50", "AP75", "APm", "APl"], }[iou_type] if coco_eval is None: self._logger.warn("No predictions from the model! Set scores to -1") return {metric: -1 for metric in metrics} # the standard metrics results = {metric: float(coco_eval.stats[idx] * 100) for idx, metric in enumerate(metrics)} self._logger.info( "Evaluation results for {}: \n".format(iou_type) + create_small_table(results) ) if class_names is None or len(class_names) <= 1: return results # Compute per-category AP # from https://github.com/facebookresearch/Detectron/blob/a6a835f5b8208c45d0dce217ce9bbda915f44df7/detectron/datasets/json_dataset_evaluator.py#L222-L252 # noqa precisions = coco_eval.eval["precision"] # precision has dims (iou, recall, cls, area range, max dets) assert len(class_names) == precisions.shape[2] results_per_category = [] for idx, name in enumerate(class_names): # area range index 0: all area ranges # max dets index -1: typically 100 per image precision = precisions[:, :, idx, 0, -1] precision = precision[precision > -1] ap = np.mean(precision) if precision.size else float("nan") results_per_category.append(("{}".format(name), float(ap * 100))) # tabulate it N_COLS = min(6, len(results_per_category) * 2) results_flatten = list(itertools.chain(*results_per_category)) results_2d = itertools.zip_longest(*[results_flatten[i::N_COLS] for i in range(N_COLS)]) table = tabulate( results_2d, tablefmt="pipe", floatfmt=".3f", headers=["category", "AP"] * (N_COLS // 2), numalign="left", ) self._logger.info("Per-category {} AP: \n".format(iou_type) + table) results.update({"AP-" + name: ap for name, ap in results_per_category}) return results def instances_to_json(instances, img_id): num_instance = len(instances) has_light = instances.has("pred_light") if num_instance == 0: return [] try: boxes = instances.pred_boxes.tensor.numpy() boxes = BoxMode.convert(boxes, BoxMode.XYXY_ABS, BoxMode.XYWH_ABS) boxes = boxes.tolist() scores = instances.scores.tolist() classes = instances.pred_classes.tolist() association = instances.pred_associations if has_light: light = instances.pred_light except: boxes = instances.pred_boxes boxes =BoxMode.convert(np.array(boxes,dtype='float'),BoxMode.XYXY_ABS,BoxMode.XYWH_ABS) boxes = boxes.tolist() scores = instances.scores association = instances.pred_associations classes = instances.pred_classes if has_light: light = instances.pred_light has_mask = instances.has("pred_masks_rle") if has_mask: rles = instances.pred_masks_rle has_keypoints = instances.has("pred_keypoints") if has_keypoints: keypoints = instances.pred_keypoints results = [] for k in range(num_instance): result = { "image_id": img_id, "category_id": classes[k], "bbox": boxes[k], "score": scores[k], 'association_id':association[k] } if has_light: result["light"] = light[k] if has_mask: result["segmentation"] = rles[k] if has_keypoints: # In COCO annotations, # keypoints coordinates are pixel indices. # However our predictions are floating point coordinates. # Therefore we subtract 0.5 to be consistent with the annotation format. # This is the inverse of data loading logic in `datasets/coco.py`. keypoints[k][:,:2] -= 0.5 result["keypoints"] = keypoints[k].flatten().tolist() results.append(result) return results # inspired from Detectron: # https://github.com/facebookresearch/Detectron/blob/a6a835f5b8208c45d0dce217ce9bbda915f44df7/detectron/datasets/json_dataset_evaluator.py#L255 # noqa def _evaluate_box_proposals(dataset_predictions, coco_api, thresholds=None, area="all", limit=None): """ Evaluate detection proposal recall metrics. This function is a much faster alternative to the official COCO API recall evaluation code. However, it produces slightly different results. """ # Record max overlap value for each gt box # Return vector of overlap values areas = { "all": 0, "small": 1, "medium": 2, "large": 3, "96-128": 4, "128-256": 5, "256-512": 6, "512-inf": 7, } area_ranges = [ [0 ** 2, 1e5 ** 2], # all [0 ** 2, 32 ** 2], # small [32 ** 2, 96 ** 2], # medium [96 ** 2, 1e5 ** 2], # large [96 ** 2, 128 ** 2], # 96-128 [128 ** 2, 256 ** 2], # 128-256 [256 ** 2, 512 ** 2], # 256-512 [512 ** 2, 1e5 ** 2], ] # 512-inf assert area in areas, "Unknown area range: {}".format(area) area_range = area_ranges[areas[area]] gt_overlaps = [] num_pos = 0 for prediction_dict in dataset_predictions: predictions = prediction_dict["proposals"] # sort predictions in descending order # TODO maybe remove this and make it explicit in the documentation inds = predictions.objectness_logits.sort(descending=True)[1] predictions = predictions[inds] ann_ids = coco_api.getAnnIds(imgIds=prediction_dict["image_id"]) anno = coco_api.loadAnns(ann_ids) gt_boxes = [ BoxMode.convert(obj["bbox"], BoxMode.XYWH_ABS, BoxMode.XYXY_ABS) for obj in anno if obj["iscrowd"] == 0 ] gt_boxes = torch.as_tensor(gt_boxes).reshape(-1, 4) # guard against no boxes gt_boxes = Boxes(gt_boxes) gt_areas = torch.as_tensor([obj["area"] for obj in anno if obj["iscrowd"] == 0]) if len(gt_boxes) == 0 or len(predictions) == 0: continue valid_gt_inds = (gt_areas >= area_range[0]) & (gt_areas <= area_range[1]) gt_boxes = gt_boxes[valid_gt_inds] num_pos += len(gt_boxes) if len(gt_boxes) == 0: continue if limit is not None and len(predictions) > limit: predictions = predictions[:limit] overlaps = pairwise_iou(predictions.proposal_boxes, gt_boxes) _gt_overlaps = torch.zeros(len(gt_boxes)) for j in range(min(len(predictions), len(gt_boxes))): # find which proposal box maximally covers each gt box # and get the iou amount of coverage for each gt box max_overlaps, argmax_overlaps = overlaps.max(dim=0) # find which gt box is 'best' covered (i.e. 'best' = most iou) gt_ovr, gt_ind = max_overlaps.max(dim=0) assert gt_ovr >= 0 # find the proposal box that covers the best covered gt box box_ind = argmax_overlaps[gt_ind] # record the iou coverage of this gt box _gt_overlaps[j] = overlaps[box_ind, gt_ind] assert _gt_overlaps[j] == gt_ovr # mark the proposal box and the gt box as used overlaps[box_ind, :] = -1 overlaps[:, gt_ind] = -1 # append recorded iou coverage level gt_overlaps.append(_gt_overlaps) gt_overlaps = torch.cat(gt_overlaps, dim=0) gt_overlaps, _ = torch.sort(gt_overlaps) if thresholds is None: step = 0.05 thresholds = torch.arange(0.5, 0.95 + 1e-5, step, dtype=torch.float32) recalls = torch.zeros_like(thresholds) # compute recall for each iou threshold for i, t in enumerate(thresholds): recalls[i] = (gt_overlaps >= t).float().sum() / float(num_pos) # ar = 2 * np.trapz(recalls, thresholds) ar = recalls.mean() return { "ar": ar, "recalls": recalls, "thresholds": thresholds, "gt_overlaps": gt_overlaps, "num_pos": num_pos, } def _evaluate_predictions_on_coco(coco_gt, coco_results, iou_type, kpt_oks_sigmas=None,is_rela= False): """ Evaluate the coco results using COCOEval API. """ assert len(coco_results) > 0 if iou_type == "segm": coco_results = copy.deepcopy(coco_results) # When evaluating mask AP, if the results contain bbox, cocoapi will # use the box area as the area of the instance, instead of the mask area. # This leads to a different definition of small/medium/large. # We remove the bbox field to let mask AP use mask area. for c in coco_results: c.pop("bbox", None) if is_rela: coco_dt = coco_gt.loadRes_rela(coco_results) else: coco_dt = coco_gt.loadRes(coco_results) coco_eval = COCOeval(coco_gt, coco_dt, iou_type) # Use the COCO default keypoint OKS sigmas unless overrides are specified if kpt_oks_sigmas: coco_eval.params.kpt_oks_sigmas = np.array(kpt_oks_sigmas) if is_rela: coco_eval.evaluate_rela() else: coco_eval.evaluate() coco_eval.accumulate() coco_eval.summarize() return coco_eval ================================================ FILE: detectron2/evaluation/evaluation/evaluator.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import datetime import logging import time from collections import OrderedDict from contextlib import contextmanager import torch from detectron2.utils.comm import is_main_process class DatasetEvaluator: """ Base class for a dataset evaluator. The function :func:`inference_on_dataset` runs the model over all samples in the dataset, and have a DatasetEvaluator to process the inputs/outputs. This class will accumulate information of the inputs/outputs (by :meth:`process`), and produce evaluation results in the end (by :meth:`evaluate`). """ def reset(self): """ Preparation for a new round of evaluation. Should be called before starting a round of evaluation. """ pass def process(self, input, output): """ Process an input/output pair. Args: input: the input that's used to call the model. output: the return value of `model(output)` """ pass def evaluate(self): """ Evaluate/summarize the performance, after processing all input/output pairs. Returns: dict: A new evaluator class can return a dict of arbitrary format as long as the user can process the results. In our train_net.py, we expect the following format: * key: the name of the task (e.g., bbox) * value: a dict of {metric name: score}, e.g.: {"AP50": 80} """ pass class DatasetEvaluators(DatasetEvaluator): def __init__(self, evaluators): assert len(evaluators) super().__init__() self._evaluators = evaluators def reset(self): for evaluator in self._evaluators: evaluator.reset() def process(self, input, output): for evaluator in self._evaluators: evaluator.process(input, output) def evaluate(self): results = OrderedDict() for evaluator in self._evaluators: result = evaluator.evaluate() if is_main_process(): for k, v in result.items(): assert ( k not in results ), "Different evaluators produce results with the same key {}".format(k) results[k] = v return results def inference_on_dataset(model, data_loader, evaluator): """ Run model (in eval mode) on the data_loader and evaluate the metrics with evaluator. Args: model (nn.Module): a module which accepts an object from `data_loader` and returns some outputs. It will be temporarily set to `eval` mode. If you wish to evaluate a model in `training` mode instead, you can wrap the given model and override its behavior of `.eval()` and `.train()`. data_loader: an iterable object with a length. The elements it generates will be the inputs to the model. evaluator (DatasetEvaluator): the evaluator to run Returns: The return value of `evaluator.evaluate()` """ num_devices = torch.distributed.get_world_size() if torch.distributed.is_initialized() else 1 logger = logging.getLogger(__name__) logger.info("Start inference on {} images".format(len(data_loader))) total = len(data_loader) # inference data loader must have a fixed length evaluator.reset() logging_interval = 50 num_warmup = min(5, logging_interval - 1, total - 1) start_time = time.time() with inference_context(model), torch.no_grad(): for idx, inputs in enumerate(data_loader): if idx == num_warmup: start_time = time.time() results,relations = model(inputs) outputs = (results,relations) evaluator.process(inputs, outputs) if (idx + 1) % logging_interval == 0: duration = time.time() - start_time seconds_per_img = duration / (idx + 1 - num_warmup) eta = datetime.timedelta( seconds=int(seconds_per_img * (total - num_warmup) - duration) ) logger.info( "Inference done {}/{}. {:.4f} s / img. ETA={}".format( idx + 1, total, seconds_per_img, str(eta) ) ) # Measure the time only for this worker (before the synchronization barrier) total_time = int(time.time() - start_time) total_time_str = str(datetime.timedelta(seconds=total_time)) # NOTE this format is parsed by grep logger.info( "Total inference time: {} ({:.6f} s / img per device, on {} devices)".format( total_time_str, total_time / (total - num_warmup), num_devices ) ) results,relations = evaluator.evaluate() # An evaluator may return None when not in main process. # Replace it by an empty dict instead to make it easier for downstream code to handle if results is None: results = {} return results,relations @contextmanager def inference_context(model): """ A context where the model is temporarily changed to eval mode, and restored to previous mode afterwards. Args: model: a torch Module """ training_mode = model.training model.eval() yield model.train(training_mode) ================================================ FILE: detectron2/evaluation/evaluation/lvis_evaluation.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy import itertools import json import logging import numpy as np import os import pickle from collections import OrderedDict import pycocotools.mask as mask_util import torch from fvcore.common.file_io import PathManager import detectron2.utils.comm as comm from detectron2.data import MetadataCatalog from detectron2.structures import Boxes, BoxMode, pairwise_iou from detectron2.utils.logger import create_small_table from .coco_evaluation import instances_to_json from .evaluator import DatasetEvaluator class LVISEvaluator(DatasetEvaluator): """ Evaluate object proposal and instance detection/segmentation outputs using LVIS's metrics and evaluation API. """ def __init__(self, dataset_name, cfg, distributed, output_dir=None): """ Args: dataset_name (str): name of the dataset to be evaluated. It must have the following corresponding metadata: "json_file": the path to the LVIS format annotation cfg (CfgNode): config instance distributed (True): if True, will collect results from all ranks for evaluation. Otherwise, will evaluate the results in the current process. output_dir (str): optional, an output directory to dump results. """ from lvis import LVIS self._tasks = self._tasks_from_config(cfg) self._distributed = distributed self._output_dir = output_dir self._cpu_device = torch.device("cpu") self._logger = logging.getLogger(__name__) self._metadata = MetadataCatalog.get(dataset_name) json_file = PathManager.get_local_path(self._metadata.json_file) self._lvis_api = LVIS(json_file) # Test set json files do not contain annotations (evaluation must be # performed using the LVIS evaluation server). self._do_evaluation = len(self._lvis_api.get_ann_ids()) > 0 def reset(self): self._predictions = [] self._lvis_results = [] def _tasks_from_config(self, cfg): """ Returns: tuple[str]: tasks that can be evaluated under the given configuration. """ tasks = ("bbox",) if cfg.MODEL.MASK_ON: tasks = tasks + ("segm",) return tasks def process(self, inputs, outputs): """ Args: inputs: the inputs to a LVIS model (e.g., GeneralizedRCNN). It is a list of dict. Each dict corresponds to an image and contains keys like "height", "width", "file_name", "image_id". outputs: the outputs of a LVIS model. It is a list of dicts with key "instances" that contains :class:`Instances`. """ for input, output in zip(inputs, outputs): prediction = {"image_id": input["image_id"]} # TODO this is ugly if "instances" in output: instances = output["instances"].to(self._cpu_device) if instances.has("pred_masks"): # use RLE to encode the masks, because they are too large and takes memory # since this evaluator stores outputs of the entire dataset rles = [ mask_util.encode(np.array(mask[:, :, None], order="F", dtype="uint8"))[0] for mask in instances.pred_masks ] for rle in rles: # "counts" is an array encoded by mask_util as a byte-stream. Python3's # json writer which always produces strings cannot serialize a bytestream # unless you decode it. Thankfully, utf-8 works out (which is also what # the pycocotools/_mask.pyx does). rle["counts"] = rle["counts"].decode("utf-8") instances.pred_masks_rle = rles instances.remove("pred_masks") prediction["instances"] = instances_to_json(instances, input["image_id"]) if "proposals" in output: prediction["proposals"] = output["proposals"].to(self._cpu_device) self._predictions.append(prediction) def evaluate(self): if self._distributed: comm.synchronize() self._predictions = comm.gather(self._predictions, dst=0) self._predictions = list(itertools.chain(*self._predictions)) if not comm.is_main_process(): return if len(self._predictions) == 0: self._logger.warning("[LVISEvaluator] Did not receive valid predictions.") return {} if self._output_dir: PathManager.mkdirs(self._output_dir) file_path = os.path.join(self._output_dir, "instances_predictions.pth") with PathManager.open(file_path, "wb") as f: torch.save(self._predictions, f) self._results = OrderedDict() if "proposals" in self._predictions[0]: self._eval_box_proposals() if "instances" in self._predictions[0]: self._eval_predictions(set(self._tasks)) # Copy so the caller can do whatever with results return copy.deepcopy(self._results) def _eval_predictions(self, tasks): """ Evaluate self._predictions on the given tasks. Fill self._results with the metrics of the tasks. """ self._logger.info("Preparing results in the LVIS format ...") self._lvis_results = list(itertools.chain(*[x["instances"] for x in self._predictions])) # unmap the category ids for LVIS (from 0-indexed to 1-indexed) for result in self._lvis_results: result["category_id"] += 1 if self._output_dir: file_path = os.path.join(self._output_dir, "lvis_instances_results.json") self._logger.info("Saving results to {}".format(file_path)) with PathManager.open(file_path, "w") as f: f.write(json.dumps(self._lvis_results)) f.flush() if not self._do_evaluation: self._logger.info("Annotations are not available for evaluation.") return self._logger.info("Evaluating predictions ...") for task in sorted(tasks): res = _evaluate_predictions_on_lvis( self._lvis_api, self._lvis_results, task, class_names=self._metadata.get("thing_classes"), ) self._results[task] = res def _eval_box_proposals(self): """ Evaluate the box proposals in self._predictions. Fill self._results with the metrics for "box_proposals" task. """ if self._output_dir: # Saving generated box proposals to file. # Predicted box_proposals are in XYXY_ABS mode. bbox_mode = BoxMode.XYXY_ABS.value ids, boxes, objectness_logits = [], [], [] for prediction in self._predictions: ids.append(prediction["image_id"]) boxes.append(prediction["proposals"].proposal_boxes.tensor.numpy()) objectness_logits.append(prediction["proposals"].objectness_logits.numpy()) proposal_data = { "boxes": boxes, "objectness_logits": objectness_logits, "ids": ids, "bbox_mode": bbox_mode, } with PathManager.open(os.path.join(self._output_dir, "box_proposals.pkl"), "wb") as f: pickle.dump(proposal_data, f) if not self._do_evaluation: self._logger.info("Annotations are not available for evaluation.") return self._logger.info("Evaluating bbox proposals ...") res = {} areas = {"all": "", "small": "s", "medium": "m", "large": "l"} for limit in [100, 1000]: for area, suffix in areas.items(): stats = _evaluate_box_proposals( self._predictions, self._lvis_api, area=area, limit=limit ) key = "AR{}@{:d}".format(suffix, limit) res[key] = float(stats["ar"].item() * 100) self._logger.info("Proposal metrics: \n" + create_small_table(res)) self._results["box_proposals"] = res # inspired from Detectron: # https://github.com/facebookresearch/Detectron/blob/a6a835f5b8208c45d0dce217ce9bbda915f44df7/detectron/datasets/json_dataset_evaluator.py#L255 # noqa def _evaluate_box_proposals(dataset_predictions, lvis_api, thresholds=None, area="all", limit=None): """ Evaluate detection proposal recall metrics. This function is a much faster alternative to the official LVIS API recall evaluation code. However, it produces slightly different results. """ # Record max overlap value for each gt box # Return vector of overlap values areas = { "all": 0, "small": 1, "medium": 2, "large": 3, "96-128": 4, "128-256": 5, "256-512": 6, "512-inf": 7, } area_ranges = [ [0 ** 2, 1e5 ** 2], # all [0 ** 2, 32 ** 2], # small [32 ** 2, 96 ** 2], # medium [96 ** 2, 1e5 ** 2], # large [96 ** 2, 128 ** 2], # 96-128 [128 ** 2, 256 ** 2], # 128-256 [256 ** 2, 512 ** 2], # 256-512 [512 ** 2, 1e5 ** 2], ] # 512-inf assert area in areas, "Unknown area range: {}".format(area) area_range = area_ranges[areas[area]] gt_overlaps = [] num_pos = 0 for prediction_dict in dataset_predictions: predictions = prediction_dict["proposals"] # sort predictions in descending order # TODO maybe remove this and make it explicit in the documentation inds = predictions.objectness_logits.sort(descending=True)[1] predictions = predictions[inds] ann_ids = lvis_api.get_ann_ids(img_ids=[prediction_dict["image_id"]]) anno = lvis_api.load_anns(ann_ids) gt_boxes = [ BoxMode.convert(obj["bbox"], BoxMode.XYWH_ABS, BoxMode.XYXY_ABS) for obj in anno ] gt_boxes = torch.as_tensor(gt_boxes).reshape(-1, 4) # guard against no boxes gt_boxes = Boxes(gt_boxes) gt_areas = torch.as_tensor([obj["area"] for obj in anno]) if len(gt_boxes) == 0 or len(predictions) == 0: continue valid_gt_inds = (gt_areas >= area_range[0]) & (gt_areas <= area_range[1]) gt_boxes = gt_boxes[valid_gt_inds] num_pos += len(gt_boxes) if len(gt_boxes) == 0: continue if limit is not None and len(predictions) > limit: predictions = predictions[:limit] overlaps = pairwise_iou(predictions.proposal_boxes, gt_boxes) _gt_overlaps = torch.zeros(len(gt_boxes)) for j in range(min(len(predictions), len(gt_boxes))): # find which proposal box maximally covers each gt box # and get the iou amount of coverage for each gt box max_overlaps, argmax_overlaps = overlaps.max(dim=0) # find which gt box is 'best' covered (i.e. 'best' = most iou) gt_ovr, gt_ind = max_overlaps.max(dim=0) assert gt_ovr >= 0 # find the proposal box that covers the best covered gt box box_ind = argmax_overlaps[gt_ind] # record the iou coverage of this gt box _gt_overlaps[j] = overlaps[box_ind, gt_ind] assert _gt_overlaps[j] == gt_ovr # mark the proposal box and the gt box as used overlaps[box_ind, :] = -1 overlaps[:, gt_ind] = -1 # append recorded iou coverage level gt_overlaps.append(_gt_overlaps) gt_overlaps = torch.cat(gt_overlaps, dim=0) gt_overlaps, _ = torch.sort(gt_overlaps) if thresholds is None: step = 0.05 thresholds = torch.arange(0.5, 0.95 + 1e-5, step, dtype=torch.float32) recalls = torch.zeros_like(thresholds) # compute recall for each iou threshold for i, t in enumerate(thresholds): recalls[i] = (gt_overlaps >= t).float().sum() / float(num_pos) # ar = 2 * np.trapz(recalls, thresholds) ar = recalls.mean() return { "ar": ar, "recalls": recalls, "thresholds": thresholds, "gt_overlaps": gt_overlaps, "num_pos": num_pos, } def _evaluate_predictions_on_lvis(lvis_gt, lvis_results, iou_type, class_names=None): """ Args: iou_type (str): kpt_oks_sigmas (list[float]): class_names (None or list[str]): if provided, will use it to predict per-category AP. Returns: a dict of {metric name: score} """ metrics = { "bbox": ["AP", "AP50", "AP75", "APs", "APm", "APl", "APr", "APc", "APf"], "segm": ["AP", "AP50", "AP75", "APs", "APm", "APl", "APr", "APc", "APf"], }[iou_type] logger = logging.getLogger(__name__) if len(lvis_results) == 0: # TODO: check if needed logger.warn("No predictions from the model! Set scores to -1") return {metric: -1 for metric in metrics} if iou_type == "segm": lvis_results = copy.deepcopy(lvis_results) # When evaluating mask AP, if the results contain bbox, LVIS API will # use the box area as the area of the instance, instead of the mask area. # This leads to a different definition of small/medium/large. # We remove the bbox field to let mask AP use mask area. for c in lvis_results: c.pop("bbox", None) from lvis import LVISEval, LVISResults lvis_results = LVISResults(lvis_gt, lvis_results) lvis_eval = LVISEval(lvis_gt, lvis_results, iou_type) lvis_eval.run() lvis_eval.print_results() # Pull the standard metrics from the LVIS results results = lvis_eval.get_results() results = {metric: float(results[metric] * 100) for metric in metrics} logger.info("Evaluation results for {}: \n".format(iou_type) + create_small_table(results)) return results ================================================ FILE: detectron2/evaluation/evaluation/panoptic_evaluation.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import contextlib import io import itertools import json import logging import os import tempfile from collections import OrderedDict from fvcore.common.file_io import PathManager from PIL import Image from tabulate import tabulate from detectron2.data import MetadataCatalog from detectron2.utils import comm from .evaluator import DatasetEvaluator logger = logging.getLogger(__name__) class COCOPanopticEvaluator(DatasetEvaluator): """ Evaluate Panoptic Quality metrics on COCO using PanopticAPI. It saves panoptic segmentation prediction in `output_dir` It contains a synchronize call and has to be called from all workers. """ def __init__(self, dataset_name, output_dir): """ Args: dataset_name (str): name of the dataset output_dir (str): output directory to save results for evaluation """ self._metadata = MetadataCatalog.get(dataset_name) self._thing_contiguous_id_to_dataset_id = { v: k for k, v in self._metadata.thing_dataset_id_to_contiguous_id.items() } self._stuff_contiguous_id_to_dataset_id = { v: k for k, v in self._metadata.stuff_dataset_id_to_contiguous_id.items() } self._predictions_json = os.path.join(output_dir, "predictions.json") self._predictions_dir = os.path.join(output_dir, "predictions") def reset(self): self._predictions = [] def _convert_category_id(self, segment_info): isthing = segment_info.pop("isthing", None) if isthing is None: # the model produces panoptic category id directly. No more conversion needed return segment_info if isthing is True: segment_info["category_id"] = self._thing_contiguous_id_to_dataset_id[ segment_info["category_id"] ] else: segment_info["category_id"] = self._stuff_contiguous_id_to_dataset_id[ segment_info["category_id"] ] return segment_info def process(self, inputs, outputs): from panopticapi.utils import id2rgb for input, output in zip(inputs, outputs): panoptic_img, segments_info = output["panoptic_seg"] panoptic_img = panoptic_img.cpu().numpy() file_name = os.path.basename(input["file_name"]) file_name_png = os.path.splitext(file_name)[0] + ".png" with io.BytesIO() as out: Image.fromarray(id2rgb(panoptic_img)).save(out, format="PNG") segments_info = [self._convert_category_id(x) for x in segments_info] self._predictions.append( { "image_id": input["image_id"], "file_name": file_name_png, "png_string": out.getvalue(), "segments_info": segments_info, } ) def evaluate(self): comm.synchronize() self._predictions = comm.gather(self._predictions) self._predictions = list(itertools.chain(*self._predictions)) if not comm.is_main_process(): return gt_json = PathManager.get_local_path(self._metadata.panoptic_json) gt_folder = self._metadata.panoptic_root with tempfile.TemporaryDirectory(prefix="panoptic_eval") as pred_dir: if "://" not in self._predictions_dir: pred_dir = self._predictions_dir os.makedirs(pred_dir, exist_ok=True) logger.info("Writing all panoptic predictions to {} ...".format(pred_dir)) for p in self._predictions: with open(os.path.join(pred_dir, p["file_name"]), "wb") as f: f.write(p.pop("png_string")) with open(gt_json, "r") as f: json_data = json.load(f) json_data["annotations"] = self._predictions with PathManager.open(self._predictions_json, "w") as f: f.write(json.dumps(json_data)) from panopticapi.evaluation import pq_compute with contextlib.redirect_stdout(io.StringIO()): pq_res = pq_compute( gt_json, PathManager.get_local_path(self._predictions_json), gt_folder=gt_folder, pred_folder=pred_dir, ) res = {} res["PQ"] = 100 * pq_res["All"]["pq"] res["SQ"] = 100 * pq_res["All"]["sq"] res["RQ"] = 100 * pq_res["All"]["rq"] res["PQ_th"] = 100 * pq_res["Things"]["pq"] res["SQ_th"] = 100 * pq_res["Things"]["sq"] res["RQ_th"] = 100 * pq_res["Things"]["rq"] res["PQ_st"] = 100 * pq_res["Stuff"]["pq"] res["SQ_st"] = 100 * pq_res["Stuff"]["sq"] res["RQ_st"] = 100 * pq_res["Stuff"]["rq"] results = OrderedDict({"panoptic_seg": res}) _print_panoptic_results(pq_res) return results def _print_panoptic_results(pq_res): headers = ["", "PQ", "SQ", "RQ", "#categories"] data = [] for name in ["All", "Things", "Stuff"]: row = [name] + [pq_res[name][k] * 100 for k in ["pq", "sq", "rq"]] + [pq_res[name]["n"]] data.append(row) table = tabulate( data, headers=headers, tablefmt="pipe", floatfmt=".3f", stralign="center", numalign="center" ) logger.info("Panoptic Evaluation Results:\n" + table) if __name__ == "__main__": from detectron2.utils.logger import setup_logger logger = setup_logger() import argparse parser = argparse.ArgumentParser() parser.add_argument("--gt-json") parser.add_argument("--gt-dir") parser.add_argument("--pred-json") parser.add_argument("--pred-dir") args = parser.parse_args() from panopticapi.evaluation import pq_compute with contextlib.redirect_stdout(io.StringIO()): pq_res = pq_compute( args.gt_json, args.pred_json, gt_folder=args.gt_dir, pred_folder=args.pred_dir ) _print_panoptic_results(pq_res) ================================================ FILE: detectron2/evaluation/evaluation/pascal_voc_evaluation.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import numpy as np import os import tempfile import xml.etree.ElementTree as ET from collections import OrderedDict, defaultdict from functools import lru_cache import torch from detectron2.data import MetadataCatalog from detectron2.utils import comm from .evaluator import DatasetEvaluator class PascalVOCDetectionEvaluator(DatasetEvaluator): """ Evaluate Pascal VOC AP. It contains a synchronization, therefore has to be called from all ranks. Note that this is a rewrite of the official Matlab API. The results should be similar, but not identical to the one produced by the official API. """ def __init__(self, dataset_name): """ Args: dataset_name (str): name of the dataset, e.g., "voc_2007_test" """ self._dataset_name = dataset_name meta = MetadataCatalog.get(dataset_name) self._anno_file_template = os.path.join(meta.dirname, "Annotations", "{}.xml") self._image_set_path = os.path.join(meta.dirname, "ImageSets", "Main", meta.split + ".txt") self._class_names = meta.thing_classes assert meta.year in [2007, 2012], meta.year self._is_2007 = meta.year == 2007 self._cpu_device = torch.device("cpu") self._logger = logging.getLogger(__name__) def reset(self): self._predictions = defaultdict(list) # class name -> list of prediction strings def process(self, inputs, outputs): for input, output in zip(inputs, outputs): image_id = input["image_id"] instances = output["instances"].to(self._cpu_device) boxes = instances.pred_boxes.tensor.numpy() scores = instances.scores.tolist() classes = instances.pred_classes.tolist() for box, score, cls in zip(boxes, scores, classes): xmin, ymin, xmax, ymax = box # The inverse of data loading logic in `datasets/pascal_voc.py` xmin += 1 ymin += 1 self._predictions[cls].append( f"{image_id} {score:.3f} {xmin:.1f} {ymin:.1f} {xmax:.1f} {ymax:.1f}" ) def evaluate(self): """ Returns: dict: has a key "segm", whose value is a dict of "AP", "AP50", and "AP75". """ all_predictions = comm.gather(self._predictions, dst=0) if not comm.is_main_process(): return predictions = defaultdict(list) for predictions_per_rank in all_predictions: for clsid, lines in predictions_per_rank.items(): predictions[clsid].extend(lines) del all_predictions self._logger.info( "Evaluating {} using {} metric. " "Note that results do not use the official Matlab API.".format( self._dataset_name, 2007 if self._is_2007 else 2012 ) ) with tempfile.TemporaryDirectory(prefix="pascal_voc_eval_") as dirname: res_file_template = os.path.join(dirname, "{}.txt") aps = defaultdict(list) # iou -> ap per class for cls_id, cls_name in enumerate(self._class_names): lines = predictions.get(cls_id, [""]) with open(res_file_template.format(cls_name), "w") as f: f.write("\n".join(lines)) for thresh in range(50, 100, 5): rec, prec, ap = voc_eval( res_file_template, self._anno_file_template, self._image_set_path, cls_name, ovthresh=thresh / 100.0, use_07_metric=self._is_2007, ) aps[thresh].append(ap * 100) ret = OrderedDict() mAP = {iou: np.mean(x) for iou, x in aps.items()} ret["bbox"] = {"AP": np.mean(list(mAP.values())), "AP50": mAP[50], "AP75": mAP[75]} return ret ############################################################################## # # Below code is modified from # https://github.com/rbgirshick/py-faster-rcnn/blob/master/lib/datasets/voc_eval.py # -------------------------------------------------------- # Fast/er R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by Bharath Hariharan # -------------------------------------------------------- """Python implementation of the PASCAL VOC devkit's AP evaluation code.""" @lru_cache(maxsize=None) def parse_rec(filename): """Parse a PASCAL VOC xml file.""" tree = ET.parse(filename) objects = [] for obj in tree.findall("object"): obj_struct = {} obj_struct["name"] = obj.find("name").text obj_struct["pose"] = obj.find("pose").text obj_struct["truncated"] = int(obj.find("truncated").text) obj_struct["difficult"] = int(obj.find("difficult").text) bbox = obj.find("bndbox") obj_struct["bbox"] = [ int(bbox.find("xmin").text), int(bbox.find("ymin").text), int(bbox.find("xmax").text), int(bbox.find("ymax").text), ] objects.append(obj_struct) return objects def voc_ap(rec, prec, use_07_metric=False): """Compute VOC AP given precision and recall. If use_07_metric is true, uses the VOC 07 11-point method (default:False). """ if use_07_metric: # 11 point metric ap = 0.0 for t in np.arange(0.0, 1.1, 0.1): if np.sum(rec >= t) == 0: p = 0 else: p = np.max(prec[rec >= t]) ap = ap + p / 11.0 else: # correct AP calculation # first append sentinel values at the end mrec = np.concatenate(([0.0], rec, [1.0])) mpre = np.concatenate(([0.0], prec, [0.0])) # compute the precision envelope for i in range(mpre.size - 1, 0, -1): mpre[i - 1] = np.maximum(mpre[i - 1], mpre[i]) # to calculate area under PR curve, look for points # where X axis (recall) changes value i = np.where(mrec[1:] != mrec[:-1])[0] # and sum (\Delta recall) * prec ap = np.sum((mrec[i + 1] - mrec[i]) * mpre[i + 1]) return ap def voc_eval(detpath, annopath, imagesetfile, classname, ovthresh=0.5, use_07_metric=False): """rec, prec, ap = voc_eval(detpath, annopath, imagesetfile, classname, [ovthresh], [use_07_metric]) Top level function that does the PASCAL VOC evaluation. detpath: Path to detections detpath.format(classname) should produce the detection results file. annopath: Path to annotations annopath.format(imagename) should be the xml annotations file. imagesetfile: Text file containing the list of images, one image per line. classname: Category name (duh) [ovthresh]: Overlap threshold (default = 0.5) [use_07_metric]: Whether to use VOC07's 11 point AP computation (default False) """ # assumes detections are in detpath.format(classname) # assumes annotations are in annopath.format(imagename) # assumes imagesetfile is a text file with each line an image name # first load gt # read list of images with open(imagesetfile, "r") as f: lines = f.readlines() imagenames = [x.strip() for x in lines] # load annots recs = {} for imagename in imagenames: recs[imagename] = parse_rec(annopath.format(imagename)) # extract gt objects for this class class_recs = {} npos = 0 for imagename in imagenames: R = [obj for obj in recs[imagename] if obj["name"] == classname] bbox = np.array([x["bbox"] for x in R]) difficult = np.array([x["difficult"] for x in R]).astype(np.bool) # difficult = np.array([False for x in R]).astype(np.bool) # treat all "difficult" as GT det = [False] * len(R) npos = npos + sum(~difficult) class_recs[imagename] = {"bbox": bbox, "difficult": difficult, "det": det} # read dets detfile = detpath.format(classname) with open(detfile, "r") as f: lines = f.readlines() splitlines = [x.strip().split(" ") for x in lines] image_ids = [x[0] for x in splitlines] confidence = np.array([float(x[1]) for x in splitlines]) BB = np.array([[float(z) for z in x[2:]] for x in splitlines]).reshape(-1, 4) # sort by confidence sorted_ind = np.argsort(-confidence) BB = BB[sorted_ind, :] image_ids = [image_ids[x] for x in sorted_ind] # go down dets and mark TPs and FPs nd = len(image_ids) tp = np.zeros(nd) fp = np.zeros(nd) for d in range(nd): R = class_recs[image_ids[d]] bb = BB[d, :].astype(float) ovmax = -np.inf BBGT = R["bbox"].astype(float) if BBGT.size > 0: # compute overlaps # intersection ixmin = np.maximum(BBGT[:, 0], bb[0]) iymin = np.maximum(BBGT[:, 1], bb[1]) ixmax = np.minimum(BBGT[:, 2], bb[2]) iymax = np.minimum(BBGT[:, 3], bb[3]) iw = np.maximum(ixmax - ixmin + 1.0, 0.0) ih = np.maximum(iymax - iymin + 1.0, 0.0) inters = iw * ih # union uni = ( (bb[2] - bb[0] + 1.0) * (bb[3] - bb[1] + 1.0) + (BBGT[:, 2] - BBGT[:, 0] + 1.0) * (BBGT[:, 3] - BBGT[:, 1] + 1.0) - inters ) overlaps = inters / uni ovmax = np.max(overlaps) jmax = np.argmax(overlaps) if ovmax > ovthresh: if not R["difficult"][jmax]: if not R["det"][jmax]: tp[d] = 1.0 R["det"][jmax] = 1 else: fp[d] = 1.0 else: fp[d] = 1.0 # compute precision recall fp = np.cumsum(fp) tp = np.cumsum(tp) rec = tp / float(npos) # avoid divide by zero in case the first detection matches a difficult # ground truth prec = tp / np.maximum(tp + fp, np.finfo(np.float64).eps) ap = voc_ap(rec, prec, use_07_metric) return rec, prec, ap ================================================ FILE: detectron2/evaluation/evaluation/sem_seg_evaluation.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import itertools import json import logging import numpy as np import os from collections import OrderedDict import PIL.Image as Image import pycocotools.mask as mask_util import torch from fvcore.common.file_io import PathManager from detectron2.data import DatasetCatalog, MetadataCatalog from detectron2.utils.comm import all_gather, is_main_process, synchronize from .evaluator import DatasetEvaluator class SemSegEvaluator(DatasetEvaluator): """ Evaluate semantic segmentation """ def __init__(self, dataset_name, distributed, num_classes, ignore_label=255, output_dir=None): """ Args: dataset_name (str): name of the dataset to be evaluated. distributed (True): if True, will collect results from all ranks for evaluation. Otherwise, will evaluate the results in the current process. num_classes (int): number of classes ignore_label (int): value in semantic segmentation ground truth. Predictions for the corresponding pixels should be ignored. output_dir (str): an output directory to dump results. """ self._dataset_name = dataset_name self._distributed = distributed self._output_dir = output_dir self._num_classes = num_classes self._ignore_label = ignore_label self._N = num_classes + 1 self._cpu_device = torch.device("cpu") self._logger = logging.getLogger(__name__) self.image_id_to_gt_file = { dataset_record["image_id"]: dataset_record["sem_seg_file_name"] for dataset_record in DatasetCatalog.get(dataset_name) } meta = MetadataCatalog.get(dataset_name) # Dict that maps contiguous training ids to COCO category ids try: c2d = meta.stuff_dataset_id_to_contiguous_id self._contiguous_id_to_dataset_id = {v: k for k, v in c2d.items()} except AttributeError: self._contiguous_id_to_dataset_id = None def reset(self): self._conf_matrix = np.zeros((self._N, self._N), dtype=np.int64) self._predictions = [] def process(self, inputs, outputs): """ Args: inputs: the inputs to a model. It is a list of dicts. Each dict corresponds to an image and contains keys like "height", "width", "file_name", "image_id". outputs: the outputs of a model. It is either list of semantic segmentation predictions (Tensor [H, W]) or list of dicts with key "sem_seg" that contains semantic segmentation prediction in the same format. """ for input, output in zip(inputs, outputs): output = output["sem_seg"].argmax(dim=0).to(self._cpu_device) pred = np.array(output, dtype=np.int) with PathManager.open(self.image_id_to_gt_file[input["image_id"]], "rb") as f: gt = np.array(Image.open(f), dtype=np.int) gt[gt == self._ignore_label] = self._num_classes self._conf_matrix += np.bincount( self._N * pred.reshape(-1) + gt.reshape(-1), minlength=self._N ** 2 ).reshape(self._N, self._N) self._predictions.extend(self.encode_json_sem_seg(pred, input["image_id"])) def evaluate(self): """ Evaluates standard semantic segmentation metrics (http://cocodataset.org/#stuff-eval): * Mean intersection-over-union averaged across classes (mIoU) * Frequency Weighted IoU (fwIoU) * Mean pixel accuracy averaged across classes (mACC) * Pixel Accuracy (pACC) """ if self._distributed: synchronize() conf_matrix_list = all_gather(self._conf_matrix) self._predictions = all_gather(self._predictions) self._predictions = list(itertools.chain(*self._predictions)) if not is_main_process(): return self._conf_matrix = np.zeros_like(self._conf_matrix) for conf_matrix in conf_matrix_list: self._conf_matrix += conf_matrix if self._output_dir: PathManager.mkdirs(self._output_dir) file_path = os.path.join(self._output_dir, "sem_seg_predictions.json") with PathManager.open(file_path, "w") as f: f.write(json.dumps(self._predictions)) acc = np.zeros(self._num_classes, dtype=np.float) iou = np.zeros(self._num_classes, dtype=np.float) tp = self._conf_matrix.diagonal()[:-1].astype(np.float) pos_gt = np.sum(self._conf_matrix[:-1, :-1], axis=0).astype(np.float) class_weights = pos_gt / np.sum(pos_gt) pos_pred = np.sum(self._conf_matrix[:-1, :-1], axis=1).astype(np.float) acc_valid = pos_gt > 0 acc[acc_valid] = tp[acc_valid] / pos_gt[acc_valid] iou_valid = (pos_gt + pos_pred) > 0 union = pos_gt + pos_pred - tp iou[acc_valid] = tp[acc_valid] / union[acc_valid] macc = np.sum(acc) / np.sum(acc_valid) miou = np.sum(iou) / np.sum(iou_valid) fiou = np.sum(iou * class_weights) pacc = np.sum(tp) / np.sum(pos_gt) res = {} res["mIoU"] = 100 * miou res["fwIoU"] = 100 * fiou res["mACC"] = 100 * macc res["pACC"] = 100 * pacc if self._output_dir: file_path = os.path.join(self._output_dir, "sem_seg_evaluation.pth") with PathManager.open(file_path, "wb") as f: torch.save(res, f) results = OrderedDict({"sem_seg": res}) self._logger.info(results) return results def encode_json_sem_seg(self, sem_seg, image_id): """ Convert semantic segmentation to COCO stuff format with segments encoded as RLEs. See http://cocodataset.org/#format-results """ json_list = [] for label in np.unique(sem_seg): if self._contiguous_id_to_dataset_id is not None: assert ( label in self._contiguous_id_to_dataset_id ), "Label {} is not in the metadata info for {}".format(label, self._dataset_name) dataset_id = self._contiguous_id_to_dataset_id[label] else: dataset_id = int(label) mask = (sem_seg == label).astype(np.uint8) mask_rle = mask_util.encode(np.array(mask[:, :, None], order="F"))[0] mask_rle["counts"] = mask_rle["counts"].decode("utf-8") json_list.append( {"image_id": image_id, "category_id": dataset_id, "segmentation": mask_rle} ) return json_list ================================================ FILE: detectron2/evaluation/evaluation/testing.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import numpy as np import pprint import sys from collections import Mapping, OrderedDict def print_csv_format(results): """ Print main metrics in a format similar to Detectron, so that they are easy to copypaste into a spreadsheet. Args: results (OrderedDict[dict]): task_name -> {metric -> score} """ assert isinstance(results, OrderedDict), results # unordered results cannot be properly printed logger = logging.getLogger(__name__) for task, res in results.items(): # Don't print "AP-category" metrics since they are usually not tracked. important_res = [(k, v) for k, v in res.items() if "-" not in k] logger.info("copypaste: Task: {}".format(task)) logger.info("copypaste: " + ",".join([k[0] for k in important_res])) logger.info("copypaste: " + ",".join(["{0:.4f}".format(k[1]) for k in important_res])) def verify_results(cfg, results): """ Args: results (OrderedDict[dict]): task_name -> {metric -> score} Returns: bool: whether the verification succeeds or not """ expected_results = cfg.TEST.EXPECTED_RESULTS if not len(expected_results): return True ok = True for task, metric, expected, tolerance in expected_results: actual = results[task][metric] if not np.isfinite(actual): ok = False diff = abs(actual - expected) if diff > tolerance: ok = False logger = logging.getLogger(__name__) if not ok: logger.error("Result verification failed!") logger.error("Expected Results: " + str(expected_results)) logger.error("Actual Results: " + pprint.pformat(results)) sys.exit(1) else: logger.info("Results verification passed.") return ok def flatten_results_dict(results): """ Expand a hierarchical dict of scalars into a flat dict of scalars. If results[k1][k2][k3] = v, the returned dict will have the entry {"k1/k2/k3": v}. Args: results (dict): """ r = {} for k, v in results.items(): if isinstance(v, Mapping): v = flatten_results_dict(v) for kk, vv in v.items(): r[k + "/" + kk] = vv else: r[k] = v return r ================================================ FILE: detectron2/evaluation/evaluator.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import datetime import logging import time from collections import OrderedDict from contextlib import contextmanager import torch from detectron2.utils.comm import is_main_process class DatasetEvaluator: """ Base class for a dataset evaluator. The function :func:`inference_on_dataset` runs the model over all samples in the dataset, and have a DatasetEvaluator to process the inputs/outputs. This class will accumulate information of the inputs/outputs (by :meth:`process`), and produce evaluation results in the end (by :meth:`evaluate`). """ def reset(self): """ Preparation for a new round of evaluation. Should be called before starting a round of evaluation. """ pass def process(self, input, output): """ Process an input/output pair. Args: input: the input that's used to call the model. output: the return value of `model(output)` """ pass def evaluate(self): """ Evaluate/summarize the performance, after processing all input/output pairs. Returns: dict: A new evaluator class can return a dict of arbitrary format as long as the user can process the results. In our train_net.py, we expect the following format: * key: the name of the task (e.g., bbox) * value: a dict of {metric name: score}, e.g.: {"AP50": 80} """ pass class DatasetEvaluators(DatasetEvaluator): def __init__(self, evaluators): assert len(evaluators) super().__init__() self._evaluators = evaluators def reset(self): for evaluator in self._evaluators: evaluator.reset() def process(self, input, output): for evaluator in self._evaluators: evaluator.process(input, output) def evaluate(self): results = OrderedDict() for evaluator in self._evaluators: result = evaluator.evaluate() if is_main_process(): for k, v in result.items(): assert ( k not in results ), "Different evaluators produce results with the same key {}".format(k) results[k] = v return results def inference_on_dataset(model, data_loader, evaluator): """ Run model (in eval mode) on the data_loader and evaluate the metrics with evaluator. Args: model (nn.Module): a module which accepts an object from `data_loader` and returns some outputs. It will be temporarily set to `eval` mode. If you wish to evaluate a model in `training` mode instead, you can wrap the given model and override its behavior of `.eval()` and `.train()`. data_loader: an iterable object with a length. The elements it generates will be the inputs to the model. evaluator (DatasetEvaluator): the evaluator to run Returns: The return value of `evaluator.evaluate()` """ num_devices = torch.distributed.get_world_size() if torch.distributed.is_initialized() else 1 logger = logging.getLogger(__name__) logger.info("Start inference on {} images".format(len(data_loader))) total = len(data_loader) # inference data loader must have a fixed length evaluator.reset() logging_interval = 50 num_warmup = min(5, logging_interval - 1, total - 1) start_time = time.time() with inference_context(model), torch.no_grad(): for idx, inputs in enumerate(data_loader): if idx == num_warmup: start_time = time.time() results,associations = model(inputs) outputs = (results,associations) evaluator.process(inputs, outputs) if (idx + 1) % logging_interval == 0: duration = time.time() - start_time seconds_per_img = duration / (idx + 1 - num_warmup) eta = datetime.timedelta( seconds=int(seconds_per_img * (total - num_warmup) - duration) ) logger.info( "Inference done {}/{}. {:.4f} s / img. ETA={}".format( idx + 1, total, seconds_per_img, str(eta) ) ) # Measure the time only for this worker (before the synchronization barrier) total_time = int(time.time() - start_time) total_time_str = str(datetime.timedelta(seconds=total_time)) # NOTE this format is parsed by grep logger.info( "Total inference time: {} ({:.6f} s / img per device, on {} devices)".format( total_time_str, total_time / (total - num_warmup), num_devices ) ) results,associations = evaluator.evaluate() # An evaluator may return None when not in main process. # Replace it by an empty dict instead to make it easier for downstream code to handle if results is None: results = {} return results,associations @contextmanager def inference_context(model): """ A context where the model is temporarily changed to eval mode, and restored to previous mode afterwards. Args: model: a torch Module """ training_mode = model.training model.eval() yield model.train(training_mode) ================================================ FILE: detectron2/evaluation/lvis_evaluation.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy import itertools import json import logging import numpy as np import os import pickle from collections import OrderedDict import pycocotools.mask as mask_util import torch from fvcore.common.file_io import PathManager import detectron2.utils.comm as comm from detectron2.data import MetadataCatalog from detectron2.structures import Boxes, BoxMode, pairwise_iou from detectron2.utils.logger import create_small_table from .coco_evaluation import instances_to_json from .evaluator import DatasetEvaluator class LVISEvaluator(DatasetEvaluator): """ Evaluate object proposal and instance detection/segmentation outputs using LVIS's metrics and evaluation API. """ def __init__(self, dataset_name, cfg, distributed, output_dir=None): """ Args: dataset_name (str): name of the dataset to be evaluated. It must have the following corresponding metadata: "json_file": the path to the LVIS format annotation cfg (CfgNode): config instance distributed (True): if True, will collect results from all ranks for evaluation. Otherwise, will evaluate the results in the current process. output_dir (str): optional, an output directory to dump results. """ from lvis import LVIS self._tasks = self._tasks_from_config(cfg) self._distributed = distributed self._output_dir = output_dir self._cpu_device = torch.device("cpu") self._logger = logging.getLogger(__name__) self._metadata = MetadataCatalog.get(dataset_name) json_file = PathManager.get_local_path(self._metadata.json_file) self._lvis_api = LVIS(json_file) # Test set json files do not contain annotations (evaluation must be # performed using the LVIS evaluation server). self._do_evaluation = len(self._lvis_api.get_ann_ids()) > 0 def reset(self): self._predictions = [] self._lvis_results = [] def _tasks_from_config(self, cfg): """ Returns: tuple[str]: tasks that can be evaluated under the given configuration. """ tasks = ("bbox",) if cfg.MODEL.MASK_ON: tasks = tasks + ("segm",) return tasks def process(self, inputs, outputs): """ Args: inputs: the inputs to a LVIS model (e.g., GeneralizedRCNN). It is a list of dict. Each dict corresponds to an image and contains keys like "height", "width", "file_name", "image_id". outputs: the outputs of a LVIS model. It is a list of dicts with key "instances" that contains :class:`Instances`. """ for input, output in zip(inputs, outputs): prediction = {"image_id": input["image_id"]} # TODO this is ugly if "instances" in output: instances = output["instances"].to(self._cpu_device) if instances.has("pred_masks"): # use RLE to encode the masks, because they are too large and takes memory # since this evaluator stores outputs of the entire dataset rles = [ mask_util.encode(np.array(mask[:, :, None], order="F", dtype="uint8"))[0] for mask in instances.pred_masks ] for rle in rles: # "counts" is an array encoded by mask_util as a byte-stream. Python3's # json writer which always produces strings cannot serialize a bytestream # unless you decode it. Thankfully, utf-8 works out (which is also what # the pycocotools/_mask.pyx does). rle["counts"] = rle["counts"].decode("utf-8") instances.pred_masks_rle = rles instances.remove("pred_masks") prediction["instances"] = instances_to_json(instances, input["image_id"]) if "proposals" in output: prediction["proposals"] = output["proposals"].to(self._cpu_device) self._predictions.append(prediction) def evaluate(self): if self._distributed: comm.synchronize() self._predictions = comm.gather(self._predictions, dst=0) self._predictions = list(itertools.chain(*self._predictions)) if not comm.is_main_process(): return if len(self._predictions) == 0: self._logger.warning("[LVISEvaluator] Did not receive valid predictions.") return {} if self._output_dir: PathManager.mkdirs(self._output_dir) file_path = os.path.join(self._output_dir, "instances_predictions.pth") with PathManager.open(file_path, "wb") as f: torch.save(self._predictions, f) self._results = OrderedDict() if "proposals" in self._predictions[0]: self._eval_box_proposals() if "instances" in self._predictions[0]: self._eval_predictions(set(self._tasks)) # Copy so the caller can do whatever with results return copy.deepcopy(self._results) def _eval_predictions(self, tasks): """ Evaluate self._predictions on the given tasks. Fill self._results with the metrics of the tasks. """ self._logger.info("Preparing results in the LVIS format ...") self._lvis_results = list(itertools.chain(*[x["instances"] for x in self._predictions])) # unmap the category ids for LVIS (from 0-indexed to 1-indexed) for result in self._lvis_results: result["category_id"] += 1 if self._output_dir: file_path = os.path.join(self._output_dir, "lvis_instances_results.json") self._logger.info("Saving results to {}".format(file_path)) with PathManager.open(file_path, "w") as f: f.write(json.dumps(self._lvis_results)) f.flush() if not self._do_evaluation: self._logger.info("Annotations are not available for evaluation.") return self._logger.info("Evaluating predictions ...") for task in sorted(tasks): res = _evaluate_predictions_on_lvis( self._lvis_api, self._lvis_results, task, class_names=self._metadata.get("thing_classes"), ) self._results[task] = res def _eval_box_proposals(self): """ Evaluate the box proposals in self._predictions. Fill self._results with the metrics for "box_proposals" task. """ if self._output_dir: # Saving generated box proposals to file. # Predicted box_proposals are in XYXY_ABS mode. bbox_mode = BoxMode.XYXY_ABS.value ids, boxes, objectness_logits = [], [], [] for prediction in self._predictions: ids.append(prediction["image_id"]) boxes.append(prediction["proposals"].proposal_boxes.tensor.numpy()) objectness_logits.append(prediction["proposals"].objectness_logits.numpy()) proposal_data = { "boxes": boxes, "objectness_logits": objectness_logits, "ids": ids, "bbox_mode": bbox_mode, } with PathManager.open(os.path.join(self._output_dir, "box_proposals.pkl"), "wb") as f: pickle.dump(proposal_data, f) if not self._do_evaluation: self._logger.info("Annotations are not available for evaluation.") return self._logger.info("Evaluating bbox proposals ...") res = {} areas = {"all": "", "small": "s", "medium": "m", "large": "l"} for limit in [100, 1000]: for area, suffix in areas.items(): stats = _evaluate_box_proposals( self._predictions, self._lvis_api, area=area, limit=limit ) key = "AR{}@{:d}".format(suffix, limit) res[key] = float(stats["ar"].item() * 100) self._logger.info("Proposal metrics: \n" + create_small_table(res)) self._results["box_proposals"] = res # inspired from Detectron: # https://github.com/facebookresearch/Detectron/blob/a6a835f5b8208c45d0dce217ce9bbda915f44df7/detectron/datasets/json_dataset_evaluator.py#L255 # noqa def _evaluate_box_proposals(dataset_predictions, lvis_api, thresholds=None, area="all", limit=None): """ Evaluate detection proposal recall metrics. This function is a much faster alternative to the official LVIS API recall evaluation code. However, it produces slightly different results. """ # Record max overlap value for each gt box # Return vector of overlap values areas = { "all": 0, "small": 1, "medium": 2, "large": 3, "96-128": 4, "128-256": 5, "256-512": 6, "512-inf": 7, } area_ranges = [ [0 ** 2, 1e5 ** 2], # all [0 ** 2, 32 ** 2], # small [32 ** 2, 96 ** 2], # medium [96 ** 2, 1e5 ** 2], # large [96 ** 2, 128 ** 2], # 96-128 [128 ** 2, 256 ** 2], # 128-256 [256 ** 2, 512 ** 2], # 256-512 [512 ** 2, 1e5 ** 2], ] # 512-inf assert area in areas, "Unknown area range: {}".format(area) area_range = area_ranges[areas[area]] gt_overlaps = [] num_pos = 0 for prediction_dict in dataset_predictions: predictions = prediction_dict["proposals"] # sort predictions in descending order # TODO maybe remove this and make it explicit in the documentation inds = predictions.objectness_logits.sort(descending=True)[1] predictions = predictions[inds] ann_ids = lvis_api.get_ann_ids(img_ids=[prediction_dict["image_id"]]) anno = lvis_api.load_anns(ann_ids) gt_boxes = [ BoxMode.convert(obj["bbox"], BoxMode.XYWH_ABS, BoxMode.XYXY_ABS) for obj in anno ] gt_boxes = torch.as_tensor(gt_boxes).reshape(-1, 4) # guard against no boxes gt_boxes = Boxes(gt_boxes) gt_areas = torch.as_tensor([obj["area"] for obj in anno]) if len(gt_boxes) == 0 or len(predictions) == 0: continue valid_gt_inds = (gt_areas >= area_range[0]) & (gt_areas <= area_range[1]) gt_boxes = gt_boxes[valid_gt_inds] num_pos += len(gt_boxes) if len(gt_boxes) == 0: continue if limit is not None and len(predictions) > limit: predictions = predictions[:limit] overlaps = pairwise_iou(predictions.proposal_boxes, gt_boxes) _gt_overlaps = torch.zeros(len(gt_boxes)) for j in range(min(len(predictions), len(gt_boxes))): # find which proposal box maximally covers each gt box # and get the iou amount of coverage for each gt box max_overlaps, argmax_overlaps = overlaps.max(dim=0) # find which gt box is 'best' covered (i.e. 'best' = most iou) gt_ovr, gt_ind = max_overlaps.max(dim=0) assert gt_ovr >= 0 # find the proposal box that covers the best covered gt box box_ind = argmax_overlaps[gt_ind] # record the iou coverage of this gt box _gt_overlaps[j] = overlaps[box_ind, gt_ind] assert _gt_overlaps[j] == gt_ovr # mark the proposal box and the gt box as used overlaps[box_ind, :] = -1 overlaps[:, gt_ind] = -1 # append recorded iou coverage level gt_overlaps.append(_gt_overlaps) gt_overlaps = torch.cat(gt_overlaps, dim=0) gt_overlaps, _ = torch.sort(gt_overlaps) if thresholds is None: step = 0.05 thresholds = torch.arange(0.5, 0.95 + 1e-5, step, dtype=torch.float32) recalls = torch.zeros_like(thresholds) # compute recall for each iou threshold for i, t in enumerate(thresholds): recalls[i] = (gt_overlaps >= t).float().sum() / float(num_pos) # ar = 2 * np.trapz(recalls, thresholds) ar = recalls.mean() return { "ar": ar, "recalls": recalls, "thresholds": thresholds, "gt_overlaps": gt_overlaps, "num_pos": num_pos, } def _evaluate_predictions_on_lvis(lvis_gt, lvis_results, iou_type, class_names=None): """ Args: iou_type (str): kpt_oks_sigmas (list[float]): class_names (None or list[str]): if provided, will use it to predict per-category AP. Returns: a dict of {metric name: score} """ metrics = { "bbox": ["AP", "AP50", "AP75", "APs", "APm", "APl", "APr", "APc", "APf"], "segm": ["AP", "AP50", "AP75", "APs", "APm", "APl", "APr", "APc", "APf"], }[iou_type] logger = logging.getLogger(__name__) if len(lvis_results) == 0: # TODO: check if needed logger.warn("No predictions from the model! Set scores to -1") return {metric: -1 for metric in metrics} if iou_type == "segm": lvis_results = copy.deepcopy(lvis_results) # When evaluating mask AP, if the results contain bbox, LVIS API will # use the box area as the area of the instance, instead of the mask area. # This leads to a different definition of small/medium/large. # We remove the bbox field to let mask AP use mask area. for c in lvis_results: c.pop("bbox", None) from lvis import LVISEval, LVISResults lvis_results = LVISResults(lvis_gt, lvis_results) lvis_eval = LVISEval(lvis_gt, lvis_results, iou_type) lvis_eval.run() lvis_eval.print_results() # Pull the standard metrics from the LVIS results results = lvis_eval.get_results() results = {metric: float(results[metric] * 100) for metric in metrics} logger.info("Evaluation results for {}: \n".format(iou_type) + create_small_table(results)) return results ================================================ FILE: detectron2/evaluation/panoptic_evaluation.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import contextlib import io import itertools import json import logging import os import tempfile from collections import OrderedDict from fvcore.common.file_io import PathManager from PIL import Image from tabulate import tabulate from detectron2.data import MetadataCatalog from detectron2.utils import comm from .evaluator import DatasetEvaluator logger = logging.getLogger(__name__) class COCOPanopticEvaluator(DatasetEvaluator): """ Evaluate Panoptic Quality metrics on COCO using PanopticAPI. It saves panoptic segmentation prediction in `output_dir` It contains a synchronize call and has to be called from all workers. """ def __init__(self, dataset_name, output_dir): """ Args: dataset_name (str): name of the dataset output_dir (str): output directory to save results for evaluation """ self._metadata = MetadataCatalog.get(dataset_name) self._thing_contiguous_id_to_dataset_id = { v: k for k, v in self._metadata.thing_dataset_id_to_contiguous_id.items() } self._stuff_contiguous_id_to_dataset_id = { v: k for k, v in self._metadata.stuff_dataset_id_to_contiguous_id.items() } self._predictions_json = os.path.join(output_dir, "predictions.json") self._predictions_dir = os.path.join(output_dir, "predictions") def reset(self): self._predictions = [] def _convert_category_id(self, segment_info): isthing = segment_info.pop("isthing", None) if isthing is None: # the model produces panoptic category id directly. No more conversion needed return segment_info if isthing is True: segment_info["category_id"] = self._thing_contiguous_id_to_dataset_id[ segment_info["category_id"] ] else: segment_info["category_id"] = self._stuff_contiguous_id_to_dataset_id[ segment_info["category_id"] ] return segment_info def process(self, inputs, outputs): from panopticapi.utils import id2rgb for input, output in zip(inputs, outputs): panoptic_img, segments_info = output["panoptic_seg"] panoptic_img = panoptic_img.cpu().numpy() file_name = os.path.basename(input["file_name"]) file_name_png = os.path.splitext(file_name)[0] + ".png" with io.BytesIO() as out: Image.fromarray(id2rgb(panoptic_img)).save(out, format="PNG") segments_info = [self._convert_category_id(x) for x in segments_info] self._predictions.append( { "image_id": input["image_id"], "file_name": file_name_png, "png_string": out.getvalue(), "segments_info": segments_info, } ) def evaluate(self): comm.synchronize() self._predictions = comm.gather(self._predictions) self._predictions = list(itertools.chain(*self._predictions)) if not comm.is_main_process(): return gt_json = PathManager.get_local_path(self._metadata.panoptic_json) gt_folder = self._metadata.panoptic_root with tempfile.TemporaryDirectory(prefix="panoptic_eval") as pred_dir: if "://" not in self._predictions_dir: pred_dir = self._predictions_dir os.makedirs(pred_dir, exist_ok=True) logger.info("Writing all panoptic predictions to {} ...".format(pred_dir)) for p in self._predictions: with open(os.path.join(pred_dir, p["file_name"]), "wb") as f: f.write(p.pop("png_string")) with open(gt_json, "r") as f: json_data = json.load(f) json_data["annotations"] = self._predictions with PathManager.open(self._predictions_json, "w") as f: f.write(json.dumps(json_data)) from panopticapi.evaluation import pq_compute with contextlib.redirect_stdout(io.StringIO()): pq_res = pq_compute( gt_json, PathManager.get_local_path(self._predictions_json), gt_folder=gt_folder, pred_folder=pred_dir, ) res = {} res["PQ"] = 100 * pq_res["All"]["pq"] res["SQ"] = 100 * pq_res["All"]["sq"] res["RQ"] = 100 * pq_res["All"]["rq"] res["PQ_th"] = 100 * pq_res["Things"]["pq"] res["SQ_th"] = 100 * pq_res["Things"]["sq"] res["RQ_th"] = 100 * pq_res["Things"]["rq"] res["PQ_st"] = 100 * pq_res["Stuff"]["pq"] res["SQ_st"] = 100 * pq_res["Stuff"]["sq"] res["RQ_st"] = 100 * pq_res["Stuff"]["rq"] results = OrderedDict({"panoptic_seg": res}) _print_panoptic_results(pq_res) return results def _print_panoptic_results(pq_res): headers = ["", "PQ", "SQ", "RQ", "#categories"] data = [] for name in ["All", "Things", "Stuff"]: row = [name] + [pq_res[name][k] * 100 for k in ["pq", "sq", "rq"]] + [pq_res[name]["n"]] data.append(row) table = tabulate( data, headers=headers, tablefmt="pipe", floatfmt=".3f", stralign="center", numalign="center" ) logger.info("Panoptic Evaluation Results:\n" + table) if __name__ == "__main__": from detectron2.utils.logger import setup_logger logger = setup_logger() import argparse parser = argparse.ArgumentParser() parser.add_argument("--gt-json") parser.add_argument("--gt-dir") parser.add_argument("--pred-json") parser.add_argument("--pred-dir") args = parser.parse_args() from panopticapi.evaluation import pq_compute with contextlib.redirect_stdout(io.StringIO()): pq_res = pq_compute( args.gt_json, args.pred_json, gt_folder=args.gt_dir, pred_folder=args.pred_dir ) _print_panoptic_results(pq_res) ================================================ FILE: detectron2/evaluation/pascal_voc_evaluation.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import numpy as np import os import tempfile import xml.etree.ElementTree as ET from collections import OrderedDict, defaultdict from functools import lru_cache import torch from detectron2.data import MetadataCatalog from detectron2.utils import comm from .evaluator import DatasetEvaluator class PascalVOCDetectionEvaluator(DatasetEvaluator): """ Evaluate Pascal VOC AP. It contains a synchronization, therefore has to be called from all ranks. Note that this is a rewrite of the official Matlab API. The results should be similar, but not identical to the one produced by the official API. """ def __init__(self, dataset_name): """ Args: dataset_name (str): name of the dataset, e.g., "voc_2007_test" """ self._dataset_name = dataset_name meta = MetadataCatalog.get(dataset_name) self._anno_file_template = os.path.join(meta.dirname, "Annotations", "{}.xml") self._image_set_path = os.path.join(meta.dirname, "ImageSets", "Main", meta.split + ".txt") self._class_names = meta.thing_classes assert meta.year in [2007, 2012], meta.year self._is_2007 = meta.year == 2007 self._cpu_device = torch.device("cpu") self._logger = logging.getLogger(__name__) def reset(self): self._predictions = defaultdict(list) # class name -> list of prediction strings def process(self, inputs, outputs): for input, output in zip(inputs, outputs): image_id = input["image_id"] instances = output["instances"].to(self._cpu_device) boxes = instances.pred_boxes.tensor.numpy() scores = instances.scores.tolist() classes = instances.pred_classes.tolist() for box, score, cls in zip(boxes, scores, classes): xmin, ymin, xmax, ymax = box # The inverse of data loading logic in `datasets/pascal_voc.py` xmin += 1 ymin += 1 self._predictions[cls].append( f"{image_id} {score:.3f} {xmin:.1f} {ymin:.1f} {xmax:.1f} {ymax:.1f}" ) def evaluate(self): """ Returns: dict: has a key "segm", whose value is a dict of "AP", "AP50", and "AP75". """ all_predictions = comm.gather(self._predictions, dst=0) if not comm.is_main_process(): return predictions = defaultdict(list) for predictions_per_rank in all_predictions: for clsid, lines in predictions_per_rank.items(): predictions[clsid].extend(lines) del all_predictions self._logger.info( "Evaluating {} using {} metric. " "Note that results do not use the official Matlab API.".format( self._dataset_name, 2007 if self._is_2007 else 2012 ) ) with tempfile.TemporaryDirectory(prefix="pascal_voc_eval_") as dirname: res_file_template = os.path.join(dirname, "{}.txt") aps = defaultdict(list) # iou -> ap per class for cls_id, cls_name in enumerate(self._class_names): lines = predictions.get(cls_id, [""]) with open(res_file_template.format(cls_name), "w") as f: f.write("\n".join(lines)) for thresh in range(50, 100, 5): rec, prec, ap = voc_eval( res_file_template, self._anno_file_template, self._image_set_path, cls_name, ovthresh=thresh / 100.0, use_07_metric=self._is_2007, ) aps[thresh].append(ap * 100) ret = OrderedDict() mAP = {iou: np.mean(x) for iou, x in aps.items()} ret["bbox"] = {"AP": np.mean(list(mAP.values())), "AP50": mAP[50], "AP75": mAP[75]} return ret ############################################################################## # # Below code is modified from # https://github.com/rbgirshick/py-faster-rcnn/blob/master/lib/datasets/voc_eval.py # -------------------------------------------------------- # Fast/er R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by Bharath Hariharan # -------------------------------------------------------- """Python implementation of the PASCAL VOC devkit's AP evaluation code.""" @lru_cache(maxsize=None) def parse_rec(filename): """Parse a PASCAL VOC xml file.""" tree = ET.parse(filename) objects = [] for obj in tree.findall("object"): obj_struct = {} obj_struct["name"] = obj.find("name").text obj_struct["pose"] = obj.find("pose").text obj_struct["truncated"] = int(obj.find("truncated").text) obj_struct["difficult"] = int(obj.find("difficult").text) bbox = obj.find("bndbox") obj_struct["bbox"] = [ int(bbox.find("xmin").text), int(bbox.find("ymin").text), int(bbox.find("xmax").text), int(bbox.find("ymax").text), ] objects.append(obj_struct) return objects def voc_ap(rec, prec, use_07_metric=False): """Compute VOC AP given precision and recall. If use_07_metric is true, uses the VOC 07 11-point method (default:False). """ if use_07_metric: # 11 point metric ap = 0.0 for t in np.arange(0.0, 1.1, 0.1): if np.sum(rec >= t) == 0: p = 0 else: p = np.max(prec[rec >= t]) ap = ap + p / 11.0 else: # correct AP calculation # first append sentinel values at the end mrec = np.concatenate(([0.0], rec, [1.0])) mpre = np.concatenate(([0.0], prec, [0.0])) # compute the precision envelope for i in range(mpre.size - 1, 0, -1): mpre[i - 1] = np.maximum(mpre[i - 1], mpre[i]) # to calculate area under PR curve, look for points # where X axis (recall) changes value i = np.where(mrec[1:] != mrec[:-1])[0] # and sum (\Delta recall) * prec ap = np.sum((mrec[i + 1] - mrec[i]) * mpre[i + 1]) return ap def voc_eval(detpath, annopath, imagesetfile, classname, ovthresh=0.5, use_07_metric=False): """rec, prec, ap = voc_eval(detpath, annopath, imagesetfile, classname, [ovthresh], [use_07_metric]) Top level function that does the PASCAL VOC evaluation. detpath: Path to detections detpath.format(classname) should produce the detection results file. annopath: Path to annotations annopath.format(imagename) should be the xml annotations file. imagesetfile: Text file containing the list of images, one image per line. classname: Category name (duh) [ovthresh]: Overlap threshold (default = 0.5) [use_07_metric]: Whether to use VOC07's 11 point AP computation (default False) """ # assumes detections are in detpath.format(classname) # assumes annotations are in annopath.format(imagename) # assumes imagesetfile is a text file with each line an image name # first load gt # read list of images with open(imagesetfile, "r") as f: lines = f.readlines() imagenames = [x.strip() for x in lines] # load annots recs = {} for imagename in imagenames: recs[imagename] = parse_rec(annopath.format(imagename)) # extract gt objects for this class class_recs = {} npos = 0 for imagename in imagenames: R = [obj for obj in recs[imagename] if obj["name"] == classname] bbox = np.array([x["bbox"] for x in R]) difficult = np.array([x["difficult"] for x in R]).astype(np.bool) # difficult = np.array([False for x in R]).astype(np.bool) # treat all "difficult" as GT det = [False] * len(R) npos = npos + sum(~difficult) class_recs[imagename] = {"bbox": bbox, "difficult": difficult, "det": det} # read dets detfile = detpath.format(classname) with open(detfile, "r") as f: lines = f.readlines() splitlines = [x.strip().split(" ") for x in lines] image_ids = [x[0] for x in splitlines] confidence = np.array([float(x[1]) for x in splitlines]) BB = np.array([[float(z) for z in x[2:]] for x in splitlines]).reshape(-1, 4) # sort by confidence sorted_ind = np.argsort(-confidence) BB = BB[sorted_ind, :] image_ids = [image_ids[x] for x in sorted_ind] # go down dets and mark TPs and FPs nd = len(image_ids) tp = np.zeros(nd) fp = np.zeros(nd) for d in range(nd): R = class_recs[image_ids[d]] bb = BB[d, :].astype(float) ovmax = -np.inf BBGT = R["bbox"].astype(float) if BBGT.size > 0: # compute overlaps # intersection ixmin = np.maximum(BBGT[:, 0], bb[0]) iymin = np.maximum(BBGT[:, 1], bb[1]) ixmax = np.minimum(BBGT[:, 2], bb[2]) iymax = np.minimum(BBGT[:, 3], bb[3]) iw = np.maximum(ixmax - ixmin + 1.0, 0.0) ih = np.maximum(iymax - iymin + 1.0, 0.0) inters = iw * ih # union uni = ( (bb[2] - bb[0] + 1.0) * (bb[3] - bb[1] + 1.0) + (BBGT[:, 2] - BBGT[:, 0] + 1.0) * (BBGT[:, 3] - BBGT[:, 1] + 1.0) - inters ) overlaps = inters / uni ovmax = np.max(overlaps) jmax = np.argmax(overlaps) if ovmax > ovthresh: if not R["difficult"][jmax]: if not R["det"][jmax]: tp[d] = 1.0 R["det"][jmax] = 1 else: fp[d] = 1.0 else: fp[d] = 1.0 # compute precision recall fp = np.cumsum(fp) tp = np.cumsum(tp) rec = tp / float(npos) # avoid divide by zero in case the first detection matches a difficult # ground truth prec = tp / np.maximum(tp + fp, np.finfo(np.float64).eps) ap = voc_ap(rec, prec, use_07_metric) return rec, prec, ap ================================================ FILE: detectron2/evaluation/rotated_coco_evaluation.py ================================================ import itertools import json import numpy as np import os import torch from fvcore.common.file_io import PathManager from pycocotools.cocoeval import COCOeval, maskUtils from detectron2.structures import BoxMode, RotatedBoxes, pairwise_iou_rotated from .coco_evaluation import COCOEvaluator class RotatedCOCOeval(COCOeval): @staticmethod def is_rotated(box_list): if type(box_list) == np.ndarray: return box_list.shape[1] == 5 elif type(box_list) == list: if box_list == []: # cannot decide the box_dim return False return np.all( np.array( [ (len(obj) == 5) and ((type(obj) == list) or (type(obj) == np.ndarray)) for obj in box_list ] ) ) return False @staticmethod def boxlist_to_tensor(boxlist, output_box_dim): if type(boxlist) == np.ndarray: box_tensor = torch.from_numpy(boxlist) elif type(boxlist) == list: if boxlist == []: return torch.zeros((0, output_box_dim), dtype=torch.float32) else: box_tensor = torch.FloatTensor(boxlist) else: raise Exception("Unrecognized boxlist type") input_box_dim = box_tensor.shape[1] if input_box_dim != output_box_dim: if input_box_dim == 4 and output_box_dim == 5: box_tensor = BoxMode.convert(box_tensor, BoxMode.XYWH_ABS, BoxMode.XYWHA_ABS) else: raise Exception( "Unable to convert from {}-dim box to {}-dim box".format( input_box_dim, output_box_dim ) ) return box_tensor def compute_iou_dt_gt(self, dt, gt, is_crowd): if self.is_rotated(dt) or self.is_rotated(gt): # TODO: take is_crowd into consideration assert all(c == 0 for c in is_crowd) dt = RotatedBoxes(self.boxlist_to_tensor(dt, output_box_dim=5)) gt = RotatedBoxes(self.boxlist_to_tensor(gt, output_box_dim=5)) return pairwise_iou_rotated(dt, gt) else: # This is the same as the classical COCO evaluation return maskUtils.iou(dt, gt, is_crowd) def computeIoU(self, imgId, catId): p = self.params if p.useCats: gt = self._gts[imgId, catId] dt = self._dts[imgId, catId] else: gt = [_ for cId in p.catIds for _ in self._gts[imgId, cId]] dt = [_ for cId in p.catIds for _ in self._dts[imgId, cId]] if len(gt) == 0 and len(dt) == 0: return [] inds = np.argsort([-d["score"] for d in dt], kind="mergesort") dt = [dt[i] for i in inds] if len(dt) > p.maxDets[-1]: dt = dt[0 : p.maxDets[-1]] assert p.iouType == "bbox", "unsupported iouType for iou computation" g = [g["bbox"] for g in gt] d = [d["bbox"] for d in dt] # compute iou between each dt and gt region iscrowd = [int(o["iscrowd"]) for o in gt] # Note: this function is copied from cocoeval.py in cocoapi # and the major difference is here. ious = self.compute_iou_dt_gt(d, g, iscrowd) return ious class RotatedCOCOEvaluator(COCOEvaluator): """ Evaluate object proposal/instance detection outputs using COCO-like metrics and APIs, with rotated boxes support. Note: this uses IOU only and does not consider angle differences. """ def process(self, inputs, outputs): """ Args: inputs: the inputs to a COCO model (e.g., GeneralizedRCNN). It is a list of dict. Each dict corresponds to an image and contains keys like "height", "width", "file_name", "image_id". outputs: the outputs of a COCO model. It is a list of dicts with key "instances" that contains :class:`Instances`. """ for input, output in zip(inputs, outputs): prediction = {"image_id": input["image_id"]} if "instances" in output: instances = output["instances"].to(self._cpu_device) prediction["instances"] = self.instances_to_json(instances, input["image_id"]) if "proposals" in output: prediction["proposals"] = output["proposals"].to(self._cpu_device) self._predictions.append(prediction) def instances_to_json(self, instances, img_id): num_instance = len(instances) if num_instance == 0: return [] boxes = instances.pred_boxes.tensor.numpy() if boxes.shape[1] == 4: boxes = BoxMode.convert(boxes, BoxMode.XYXY_ABS, BoxMode.XYWH_ABS) boxes = boxes.tolist() scores = instances.scores.tolist() classes = instances.pred_classes.tolist() results = [] for k in range(num_instance): result = { "image_id": img_id, "category_id": classes[k], "bbox": boxes[k], "score": scores[k], } results.append(result) return results def _eval_predictions(self, tasks): """ Evaluate self._predictions on the given tasks. Fill self._results with the metrics of the tasks. """ self._logger.info("Preparing results for COCO format ...") self._coco_results = list(itertools.chain(*[x["instances"] for x in self._predictions])) # unmap the category ids for COCO if hasattr(self._metadata, "thing_dataset_id_to_contiguous_id"): reverse_id_mapping = { v: k for k, v in self._metadata.thing_dataset_id_to_contiguous_id.items() } for result in self._coco_results: result["category_id"] = reverse_id_mapping[result["category_id"]] if self._output_dir: file_path = os.path.join(self._output_dir, "coco_instances_results.json") self._logger.info("Saving results to {}".format(file_path)) with PathManager.open(file_path, "w") as f: f.write(json.dumps(self._coco_results)) f.flush() if not self._do_evaluation: self._logger.info("Annotations are not available for evaluation.") return self._logger.info("Evaluating predictions ...") for task in sorted(tasks): assert task == "bbox", "Task {} is not supported".format(task) coco_eval = ( self._evaluate_predictions_on_coco(self._coco_api, self._coco_results) if len(self._coco_results) > 0 else None # cocoapi does not handle empty results very well ) res = self._derive_coco_results( coco_eval, task, class_names=self._metadata.get("thing_classes") ) self._results[task] = res def _evaluate_predictions_on_coco(self, coco_gt, coco_results): """ Evaluate the coco results using COCOEval API. """ assert len(coco_results) > 0 coco_dt = coco_gt.loadRes(coco_results) # Only bbox is supported for now coco_eval = RotatedCOCOeval(coco_gt, coco_dt, iouType="bbox") coco_eval.evaluate() coco_eval.accumulate() coco_eval.summarize() return coco_eval ================================================ FILE: detectron2/evaluation/sem_seg_evaluation.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import itertools import json import logging import numpy as np import os from collections import OrderedDict import PIL.Image as Image import pycocotools.mask as mask_util import torch from fvcore.common.file_io import PathManager from detectron2.data import DatasetCatalog, MetadataCatalog from detectron2.utils.comm import all_gather, is_main_process, synchronize from .evaluator import DatasetEvaluator class SemSegEvaluator(DatasetEvaluator): """ Evaluate semantic segmentation """ def __init__(self, dataset_name, distributed, num_classes, ignore_label=255, output_dir=None): """ Args: dataset_name (str): name of the dataset to be evaluated. distributed (True): if True, will collect results from all ranks for evaluation. Otherwise, will evaluate the results in the current process. num_classes (int): number of classes ignore_label (int): value in semantic segmentation ground truth. Predictions for the corresponding pixels should be ignored. output_dir (str): an output directory to dump results. """ self._dataset_name = dataset_name self._distributed = distributed self._output_dir = output_dir self._num_classes = num_classes self._ignore_label = ignore_label self._N = num_classes + 1 self._cpu_device = torch.device("cpu") self._logger = logging.getLogger(__name__) self.image_id_to_gt_file = { dataset_record["image_id"]: dataset_record["sem_seg_file_name"] for dataset_record in DatasetCatalog.get(dataset_name) } meta = MetadataCatalog.get(dataset_name) # Dict that maps contiguous training ids to COCO category ids try: c2d = meta.stuff_dataset_id_to_contiguous_id self._contiguous_id_to_dataset_id = {v: k for k, v in c2d.items()} except AttributeError: self._contiguous_id_to_dataset_id = None def reset(self): self._conf_matrix = np.zeros((self._N, self._N), dtype=np.int64) self._predictions = [] def process(self, inputs, outputs): """ Args: inputs: the inputs to a model. It is a list of dicts. Each dict corresponds to an image and contains keys like "height", "width", "file_name", "image_id". outputs: the outputs of a model. It is either list of semantic segmentation predictions (Tensor [H, W]) or list of dicts with key "sem_seg" that contains semantic segmentation prediction in the same format. """ for input, output in zip(inputs, outputs): output = output["sem_seg"].argmax(dim=0).to(self._cpu_device) pred = np.array(output, dtype=np.int) with PathManager.open(self.image_id_to_gt_file[input["image_id"]], "rb") as f: gt = np.array(Image.open(f), dtype=np.int) gt[gt == self._ignore_label] = self._num_classes self._conf_matrix += np.bincount( self._N * pred.reshape(-1) + gt.reshape(-1), minlength=self._N ** 2 ).reshape(self._N, self._N) self._predictions.extend(self.encode_json_sem_seg(pred, input["image_id"])) def evaluate(self): """ Evaluates standard semantic segmentation metrics (http://cocodataset.org/#stuff-eval): * Mean intersection-over-union averaged across classes (mIoU) * Frequency Weighted IoU (fwIoU) * Mean pixel accuracy averaged across classes (mACC) * Pixel Accuracy (pACC) """ if self._distributed: synchronize() conf_matrix_list = all_gather(self._conf_matrix) self._predictions = all_gather(self._predictions) self._predictions = list(itertools.chain(*self._predictions)) if not is_main_process(): return self._conf_matrix = np.zeros_like(self._conf_matrix) for conf_matrix in conf_matrix_list: self._conf_matrix += conf_matrix if self._output_dir: PathManager.mkdirs(self._output_dir) file_path = os.path.join(self._output_dir, "sem_seg_predictions.json") with PathManager.open(file_path, "w") as f: f.write(json.dumps(self._predictions)) acc = np.zeros(self._num_classes, dtype=np.float) iou = np.zeros(self._num_classes, dtype=np.float) tp = self._conf_matrix.diagonal()[:-1].astype(np.float) pos_gt = np.sum(self._conf_matrix[:-1, :-1], axis=0).astype(np.float) class_weights = pos_gt / np.sum(pos_gt) pos_pred = np.sum(self._conf_matrix[:-1, :-1], axis=1).astype(np.float) acc_valid = pos_gt > 0 acc[acc_valid] = tp[acc_valid] / pos_gt[acc_valid] iou_valid = (pos_gt + pos_pred) > 0 union = pos_gt + pos_pred - tp iou[acc_valid] = tp[acc_valid] / union[acc_valid] macc = np.sum(acc) / np.sum(acc_valid) miou = np.sum(iou) / np.sum(iou_valid) fiou = np.sum(iou * class_weights) pacc = np.sum(tp) / np.sum(pos_gt) res = {} res["mIoU"] = 100 * miou res["fwIoU"] = 100 * fiou res["mACC"] = 100 * macc res["pACC"] = 100 * pacc if self._output_dir: file_path = os.path.join(self._output_dir, "sem_seg_evaluation.pth") with PathManager.open(file_path, "wb") as f: torch.save(res, f) results = OrderedDict({"sem_seg": res}) self._logger.info(results) return results def encode_json_sem_seg(self, sem_seg, image_id): """ Convert semantic segmentation to COCO stuff format with segments encoded as RLEs. See http://cocodataset.org/#format-results """ json_list = [] for label in np.unique(sem_seg): if self._contiguous_id_to_dataset_id is not None: assert ( label in self._contiguous_id_to_dataset_id ), "Label {} is not in the metadata info for {}".format(label, self._dataset_name) dataset_id = self._contiguous_id_to_dataset_id[label] else: dataset_id = int(label) mask = (sem_seg == label).astype(np.uint8) mask_rle = mask_util.encode(np.array(mask[:, :, None], order="F"))[0] mask_rle["counts"] = mask_rle["counts"].decode("utf-8") json_list.append( {"image_id": image_id, "category_id": dataset_id, "segmentation": mask_rle} ) return json_list ================================================ FILE: detectron2/evaluation/soba_evaluation.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import contextlib import copy import io import itertools import json import logging import numpy as np import os import pickle from collections import OrderedDict import pysobatools.mask as mask_util import torch from fvcore.common.file_io import PathManager from pysobatools.soba import SOBA from pysobatools.cocoeval import COCOeval from tabulate import tabulate import detectron2.utils.comm as comm from detectron2.data import MetadataCatalog from detectron2.structures import Boxes, BoxMode, pairwise_iou from detectron2.utils.logger import create_small_table from .evaluator import DatasetEvaluator class SOBAEvaluator(DatasetEvaluator): """ Evaluate object proposal, instance detection/segmentation, keypoint detection outputs using SOBA's metrics and APIs. """ def __init__(self, dataset_name, cfg, distributed, output_dir=None): """ Args: dataset_name (str): name of the dataset to be evaluated. It must have the following corresponding metadata: "json_file": the path to the SOBA format annotation cfg (CfgNode): config instance distributed (True): if True, will collect results from all ranks for evaluation. Otherwise, will evaluate the results in the current process. output_dir (str): optional, an output directory to dump results. """ self._tasks = self._tasks_from_config(cfg) self._distributed = distributed self._output_dir = output_dir self._cpu_device = torch.device("cpu") self._logger = logging.getLogger(__name__) self._metadata = MetadataCatalog.get(dataset_name) json_file = PathManager.get_local_path(self._metadata.json_file) with contextlib.redirect_stdout(io.StringIO()): self._soba_api = SOBA(json_file) self._kpt_oks_sigmas = cfg.TEST.KEYPOINT_OKS_SIGMAS # Test set json files do not contain annotations (evaluation must be # performed using the SOBA evaluation server). self._do_evaluation = len(self._soba_api.getAnnIds()) > 0 def reset(self): self._predictions = [] self._soba_results = [] def _tasks_from_config(self, cfg): """ Returns: tuple[str]: tasks that can be evaluated under the given configuration. """ tasks = ("bbox",) if cfg.MODEL.MASK_ON: tasks = tasks + ("segm",) if cfg.MODEL.KEYPOINT_ON: tasks = tasks + ("keypoints",) return tasks def process(self, inputs, outputs): """ Args: inputs: the inputs to a SOBA model (e.g., GeneralizedRCNN). It is a list of dict. Each dict corresponds to an image and contains keys like "height", "width", "file_name", "image_id". outputs: the outputs of a SOBA model. It is a list of dicts with key "instances" that contains :class:`Instances`. """ results,associations = outputs for input, result, association in zip(inputs, results, associations): prediction = {"image_id": input["image_id"]} # TODO this is ugly if "instances" in result: instances = result["instances"].to(self._cpu_device) if instances.has("pred_masks"): # use RLE to encode the masks, because they are too large and takes memory # since this evaluator stores results of the entire dataset # Our model may predict bool array, but sobaapi expects uint8 rles = [ mask_util.encode(np.array(mask[:, :, None], order="F", dtype="uint8"))[0] for mask in instances.pred_masks ] for rle in rles: # "counts" is an array encoded by mask_util as a byte-stream. Python3's # json writer which always produces strings cannot serialize a bytestream # unless you decode it. Thankfully, utf-8 works out (which is also what # the pysobatools/_mask.pyx does). rle["counts"] = rle["counts"].decode("utf-8") instances.pred_masks_rle = rles instances.remove("pred_masks") prediction["instances"] = instances_to_json(instances, input["image_id"]) if "instances" in association: instances = association["instances"].to(self._cpu_device) if instances.has("pred_masks"): rles = [ mask_util.encode(np.array(mask[:,:],order='F',dtype='uint8'))[0] for mask in instances.pred_masks ] for rle in rles: rle["counts"] = rle["counts"].decode("utf-8") instances.pred_masks_rle = rles instances.remove("pred_masks") prediction["associations"] = instances_to_json(instances, input["image_id"]) if "proposals" in result: prediction["proposals"] = result["proposals"].to(self._cpu_device) if "asso_proposals" in association: prediction["asso_proposals"] = association["proposals"].to(self._cpu_device) self._predictions.append(prediction) def evaluate(self): if self._distributed: comm.synchronize() self._predictions = comm.gather(self._predictions, dst=0) self._predictions = list(itertools.chain(*self._predictions)) if not comm.is_main_process(): return {},{} if len(self._predictions) == 0: self._logger.warning("[SOBAEvaluator] Did not receive valid predictions.") return {} if self._output_dir: PathManager.mkdirs(self._output_dir) file_path = os.path.join(self._output_dir, "instances_predictions.pth") with PathManager.open(file_path, "wb") as f: torch.save(self._predictions, f) self._results = OrderedDict() self._association_results = OrderedDict() if "proposals" in self._predictions[0]: #and "asso_proposals" in self._predictions[0]: self._eval_box_proposals() if "instances" in self._predictions[0]: #and "associations" in self._predictions[0]: self._eval_predictions(set(self._tasks)) # Copy so the caller can do whatever with results return copy.deepcopy(self._results),copy.deepcopy(self._association_results) def _eval_predictions(self, tasks): """ Evaluate self._predictions on the given tasks. Fill self._results with the metrics of the tasks. """ self._logger.info("Preparing results for SOBA format ...") self._soba_results = list(itertools.chain(*[x["instances"] for x in self._predictions])) self._asso_results = list(itertools.chain(*[x["associations"] for x in self._predictions])) # unmap the category ids for SOBA if hasattr(self._metadata, "thing_dataset_id_to_contiguous_id"): reverse_id_mapping = { v: k for k, v in self._metadata.thing_dataset_id_to_contiguous_id.items() } for result in self._soba_results: result["category_id"] = reverse_id_mapping[result["category_id"]] if hasattr(self._metadata, "association_dataset_id_to_contiguous_id"): reverse_asso_if_mapping = { v: k for k,v in self._metadata.association_dataset_id_to_contiguous_id.items() } for result in self._asso_results: result["category_id"] = reverse_asso_if_mapping[result["category_id"]] if self._output_dir: file_path = os.path.join(self._output_dir, "soba_instances_results.json") self._logger.info("Saving results to {}".format(file_path)) with PathManager.open(file_path, "w") as f: f.write(json.dumps(self._soba_results)) f.flush() file_path = os.path.join(self._output_dir, "soba_association_results.json") self._logger.info("Saving association results to {}".format(file_path)) with PathManager.open(file_path, "w") as f: f.write(json.dumps(self._asso_results)) f.flush() if not self._do_evaluation: self._logger.info("Annotations are not available for evaluation.") return self._logger.info("Evaluating predictions ...") tasks = ('bbox','segm') for task in sorted(tasks): soba_eval = ( _evaluate_predictions_on_soba( self._soba_api, self._soba_results, task, kpt_oks_sigmas=self._kpt_oks_sigmas ) if len(self._soba_results) > 0 else None # sobaapi does not handle empty results very well ) res = self._derive_soba_results( soba_eval, task, class_names=self._metadata.get("thing_classes") ) self._results[task] = res self._logger.info("Evaluating association predictions ...") tasks = ('bbox','segm') for task in sorted(tasks): soba_eval =( _evaluate_predictions_on_soba( self._soba_api, self._asso_results, task, kpt_oks_sigmas=self._kpt_oks_sigmas,is_asso=True ) if len(self._asso_results)>0 else None ) res = self._derive_soba_results( soba_eval, task, class_names=self._metadata.get("association_classes") ) self._association_results[task] = res def _eval_box_proposals(self): """ Evaluate the box proposals in self._predictions. Fill self._results with the metrics for "box_proposals" task. """ if self._output_dir: # Saving generated box proposals to file. # Predicted box_proposals are in XYXY_ABS mode. bbox_mode = BoxMode.XYXY_ABS.value ids, boxes, objectness_logits = [], [], [] asso_boxes, asso_objectness_logits = [], [] for prediction in self._predictions: ids.append(prediction["image_id"]) boxes.append(prediction["proposals"].proposal_boxes.tensor.numpy()) objectness_logits.append(prediction["proposals"].objectness_logits.numpy()) asso_boxes.append(prediction["asso_proposals"].proposal_boxes.tensor.numpy()) asso_objectness_logits.append(prediction["asso_proposals"].objectness_logits.numpy()) proposal_data = { "boxes": boxes, "objectness_logits": objectness_logits, "ids": ids, "bbox_mode": bbox_mode, } asso_proposal_data = { "boxes" : boxes, "objectness_logits": objectness_logits, "ids": ids, "bbox_mode": bbox_mode, } with PathManager.open(os.path.join(self._output_dir, "box_proposals.pkl"), "wb") as f: pickle.dump(proposal_data, f) with PathManager.open(os.path.join(self._output_dir, "asso_box_proposals.pkl"), "wb") as f: pickle.dump(asso_proposal_data, f) if not self._do_evaluation: self._logger.info("Annotations are not available for evaluation.") return self._logger.info("Evaluating bbox proposals ...") res = {} asso_res = {} areas = {"all": "", "small": "s", "medium": "m", "large": "l"} for limit in [100, 1000]: for area, suffix in areas.items(): stats = _evaluate_box_proposals( self._predictions, self._soba_api, area=area, limit=limit ) key = "AR{}@{:d}".format(suffix, limit) res[key] = float(stats["ar"].item() * 100) stats = _evaluate_box_proposals( self._predictions, self._soba_api, area = area, limit =limit ) key = "AR{}@{:d}".format(suffix, limit) asso_res[key] = float(stats["ar"].item() * 100) self._logger.info("Proposal metrics: \n" + create_small_table(res)) self._results["box_proposals"] = res self._association_results["box_proposals"] = asso_res def _derive_soba_results(self, soba_eval, iou_type, class_names=None): """ Derive the desired score numbers from summarized SOBAeval. Args: soba_eval (None or SOBAEval): None represents no predictions from model. iou_type (str): class_names (None or list[str]): if provided, will use it to predict per-category AP. Returns: a dict of {metric name: score} """ metrics = { "bbox": ["AP", "AP50", "AP75", "APs", "APm", "APl"], "segm": ["AP", "AP50", "AP75", "APs", "APm", "APl"], "keypoints": ["AP", "AP50", "AP75", "APm", "APl"], }[iou_type] if soba_eval is None: self._logger.warn("No predictions from the model! Set scores to -1") return {metric: -1 for metric in metrics} # the standard metrics results = {metric: float(soba_eval.stats[idx] * 100) for idx, metric in enumerate(metrics)} self._logger.info( "Evaluation results for {}: \n".format(iou_type) + create_small_table(results) ) if class_names is None or len(class_names) <= 1: return results # Compute per-category AP # from https://github.com/facebookresearch/Detectron/blob/a6a835f5b8208c45d0dce217ce9bbda915f44df7/detectron/datasets/json_dataset_evaluator.py#L222-L252 # noqa precisions = soba_eval.eval["precision"] # precision has dims (iou, recall, cls, area range, max dets) assert len(class_names) == precisions.shape[2] results_per_category = [] for idx, name in enumerate(class_names): # area range index 0: all area ranges # max dets index -1: typically 100 per image precision = precisions[:, :, idx, 0, -1] precision = precision[precision > -1] ap = np.mean(precision) if precision.size else float("nan") results_per_category.append(("{}".format(name), float(ap * 100))) # tabulate it N_COLS = min(6, len(results_per_category) * 2) results_flatten = list(itertools.chain(*results_per_category)) results_2d = itertools.zip_longest(*[results_flatten[i::N_COLS] for i in range(N_COLS)]) table = tabulate( results_2d, tablefmt="pipe", floatfmt=".3f", headers=["category", "AP"] * (N_COLS // 2), numalign="left", ) self._logger.info("Per-category {} AP: \n".format(iou_type) + table) results.update({"AP-" + name: ap for name, ap in results_per_category}) return results def instances_to_json(instances, img_id): num_instance = len(instances) has_light = instances.has("pred_light") if num_instance == 0: return [] try: boxes = instances.pred_boxes.tensor.numpy() boxes = BoxMode.convert(boxes, BoxMode.XYXY_ABS, BoxMode.XYWH_ABS) boxes = boxes.tolist() scores = instances.scores.tolist() classes = instances.pred_classes.tolist() association = instances.pred_associations if has_light: light = instances.pred_light except: boxes = instances.pred_boxes boxes =BoxMode.convert(np.array(boxes,dtype='float'),BoxMode.XYXY_ABS,BoxMode.XYWH_ABS) boxes = boxes.tolist() scores = instances.scores association = instances.pred_associations classes = instances.pred_classes if has_light: light = instances.pred_light has_mask = instances.has("pred_masks_rle") if has_mask: rles = instances.pred_masks_rle has_keypoints = instances.has("pred_keypoints") if has_keypoints: keypoints = instances.pred_keypoints results = [] for k in range(num_instance): result = { "image_id": img_id, "category_id": classes[k], "bbox": boxes[k], "score": scores[k], 'association_id':association[k] } if has_light: result["light"] = light[k] if has_mask: result["segmentation"] = rles[k] if has_keypoints: # In SOBA annotations, # keypoints coordinates are pixel indices. # However our predictions are floating point coordinates. # Therefore we subtract 0.5 to be consistent with the annotation format. # This is the inverse of data loading logic in `datasets/soba.py`. keypoints[k][:,:2] -= 0.5 result["keypoints"] = keypoints[k].flatten().tolist() results.append(result) return results # inspired from Detectron: # https://github.com/facebookresearch/Detectron/blob/a6a835f5b8208c45d0dce217ce9bbda915f44df7/detectron/datasets/json_dataset_evaluator.py#L255 # noqa def _evaluate_box_proposals(dataset_predictions, soba_api, thresholds=None, area="all", limit=None): """ Evaluate detection proposal recall metrics. This function is a much faster alternative to the official SOBA API recall evaluation code. However, it produces slightly different results. """ # Record max overlap value for each gt box # Return vector of overlap values areas = { "all": 0, "small": 1, "medium": 2, "large": 3, "96-128": 4, "128-256": 5, "256-512": 6, "512-inf": 7, } area_ranges = [ [0 ** 2, 1e5 ** 2], # all [0 ** 2, 32 ** 2], # small [32 ** 2, 96 ** 2], # medium [96 ** 2, 1e5 ** 2], # large [96 ** 2, 128 ** 2], # 96-128 [128 ** 2, 256 ** 2], # 128-256 [256 ** 2, 512 ** 2], # 256-512 [512 ** 2, 1e5 ** 2], ] # 512-inf assert area in areas, "Unknown area range: {}".format(area) area_range = area_ranges[areas[area]] gt_overlaps = [] num_pos = 0 for prediction_dict in dataset_predictions: predictions = prediction_dict["proposals"] # sort predictions in descending order # TODO maybe remove this and make it explicit in the documentation inds = predictions.objectness_logits.sort(descending=True)[1] predictions = predictions[inds] ann_ids = soba_api.getAnnIds(imgIds=prediction_dict["image_id"]) anno = soba_api.loadAnns(ann_ids) gt_boxes = [ BoxMode.convert(obj["bbox"], BoxMode.XYWH_ABS, BoxMode.XYXY_ABS) for obj in anno if obj["iscrowd"] == 0 ] gt_boxes = torch.as_tensor(gt_boxes).reshape(-1, 4) # guard against no boxes gt_boxes = Boxes(gt_boxes) gt_areas = torch.as_tensor([obj["area"] for obj in anno if obj["iscrowd"] == 0]) if len(gt_boxes) == 0 or len(predictions) == 0: continue valid_gt_inds = (gt_areas >= area_range[0]) & (gt_areas <= area_range[1]) gt_boxes = gt_boxes[valid_gt_inds] num_pos += len(gt_boxes) if len(gt_boxes) == 0: continue if limit is not None and len(predictions) > limit: predictions = predictions[:limit] overlaps = pairwise_iou(predictions.proposal_boxes, gt_boxes) _gt_overlaps = torch.zeros(len(gt_boxes)) for j in range(min(len(predictions), len(gt_boxes))): # find which proposal box maximally covers each gt box # and get the iou amount of coverage for each gt box max_overlaps, argmax_overlaps = overlaps.max(dim=0) # find which gt box is 'best' covered (i.e. 'best' = most iou) gt_ovr, gt_ind = max_overlaps.max(dim=0) assert gt_ovr >= 0 # find the proposal box that covers the best covered gt box box_ind = argmax_overlaps[gt_ind] # record the iou coverage of this gt box _gt_overlaps[j] = overlaps[box_ind, gt_ind] assert _gt_overlaps[j] == gt_ovr # mark the proposal box and the gt box as used overlaps[box_ind, :] = -1 overlaps[:, gt_ind] = -1 # append recorded iou coverage level gt_overlaps.append(_gt_overlaps) gt_overlaps = torch.cat(gt_overlaps, dim=0) gt_overlaps, _ = torch.sort(gt_overlaps) if thresholds is None: step = 0.05 thresholds = torch.arange(0.5, 0.95 + 1e-5, step, dtype=torch.float32) recalls = torch.zeros_like(thresholds) # compute recall for each iou threshold for i, t in enumerate(thresholds): recalls[i] = (gt_overlaps >= t).float().sum() / float(num_pos) # ar = 2 * np.trapz(recalls, thresholds) ar = recalls.mean() return { "ar": ar, "recalls": recalls, "thresholds": thresholds, "gt_overlaps": gt_overlaps, "num_pos": num_pos, } def _evaluate_predictions_on_soba(soba_gt, soba_results, iou_type, kpt_oks_sigmas=None,is_asso= False): """ Evaluate the soba results using SOBAEval API. """ assert len(soba_results) > 0 if iou_type == "segm": soba_results = copy.deepcopy(soba_results) # When evaluating mask AP, if the results contain bbox, sobaapi will # use the box area as the area of the instance, instead of the mask area. # This leads to a different definition of small/medium/large. # We remove the bbox field to let mask AP use mask area. for c in soba_results: c.pop("bbox", None) if is_asso: soba_dt = soba_gt.loadRes_asso(soba_results) else: soba_dt = soba_gt.loadRes(soba_results) soba_eval = COCOeval(soba_gt, soba_dt, iou_type) # Use the SOBA default keypoint OKS sigmas unless overrides are specified if kpt_oks_sigmas: soba_eval.params.kpt_oks_sigmas = np.array(kpt_oks_sigmas) if is_asso: soba_eval.evaluate_asso() else: soba_eval.evaluate() soba_eval.accumulate() soba_eval.summarize() return soba_eval ================================================ FILE: detectron2/evaluation/testing.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import numpy as np import pprint import sys from collections import Mapping, OrderedDict def print_csv_format(results): """ Print main metrics in a format similar to Detectron, so that they are easy to copypaste into a spreadsheet. Args: results (OrderedDict[dict]): task_name -> {metric -> score} """ assert isinstance(results, OrderedDict), results # unordered results cannot be properly printed logger = logging.getLogger(__name__) for task, res in results.items(): # Don't print "AP-category" metrics since they are usually not tracked. important_res = [(k, v) for k, v in res.items() if "-" not in k] logger.info("copypaste: Task: {}".format(task)) logger.info("copypaste: " + ",".join([k[0] for k in important_res])) logger.info("copypaste: " + ",".join(["{0:.4f}".format(k[1]) for k in important_res])) def verify_results(cfg, results): """ Args: results (OrderedDict[dict]): task_name -> {metric -> score} Returns: bool: whether the verification succeeds or not """ expected_results = cfg.TEST.EXPECTED_RESULTS if not len(expected_results): return True ok = True for task, metric, expected, tolerance in expected_results: actual = results[task][metric] if not np.isfinite(actual): ok = False diff = abs(actual - expected) if diff > tolerance: ok = False logger = logging.getLogger(__name__) if not ok: logger.error("Result verification failed!") logger.error("Expected Results: " + str(expected_results)) logger.error("Actual Results: " + pprint.pformat(results)) sys.exit(1) else: logger.info("Results verification passed.") return ok def flatten_results_dict(results): """ Expand a hierarchical dict of scalars into a flat dict of scalars. If results[k1][k2][k3] = v, the returned dict will have the entry {"k1/k2/k3": v}. Args: results (dict): """ r = {} for k, v in results.items(): if isinstance(v, Mapping): v = flatten_results_dict(v) for kk, vv in v.items(): r[k + "/" + kk] = vv else: r[k] = v return r ================================================ FILE: detectron2/export/README.md ================================================ This directory contains code to prepare a detectron2 model for deployment. Currently it supports exporting a detectron2 model to Caffe2 format through ONNX. Please see [documentation](https://detectron2.readthedocs.io/tutorials/deployment.html) for its usage. ### Acknowledgements Thanks to Mobile Vision team at Facebook for developing the conversion tools. ================================================ FILE: detectron2/export/__init__.py ================================================ # -*- coding: utf-8 -*- from .api import * __all__ = [k for k in globals().keys() if not k.startswith("_")] ================================================ FILE: detectron2/export/api.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import logging import os from caffe2.proto import caffe2_pb2 from torch import nn from detectron2.config import CfgNode as CN from .caffe2_export import export_caffe2_detection_model, run_and_save_graph from .caffe2_inference import ProtobufDetectionModel from .caffe2_modeling import META_ARCH_CAFFE2_EXPORT_TYPE_MAP, convert_batched_inputs_to_c2_format from .shared import get_pb_arg_vali, get_pb_arg_vals, save_graph __all__ = ["add_export_config", "export_caffe2_model", "Caffe2Model"] def add_export_config(cfg): """ Args: cfg (CfgNode): a detectron2 config Returns: CfgNode: an updated config with new options that :func:`export_caffe2_model` will need. """ is_frozen = cfg.is_frozen() cfg.defrost() cfg.EXPORT_CAFFE2 = CN() cfg.EXPORT_CAFFE2.USE_HEATMAP_MAX_KEYPOINT = False if is_frozen: cfg.freeze() return cfg def export_caffe2_model(cfg, model, inputs): """ Export a detectron2 model to caffe2 format. Args: cfg (CfgNode): a detectron2 config, with extra export-related options added by :func:`add_export_config`. model (nn.Module): a model built by :func:`detectron2.modeling.build_model`. It will be modified by this function. inputs: sample inputs that the given model takes for inference. Will be used to trace the model. Returns: Caffe2Model """ assert isinstance(cfg, CN), cfg C2MetaArch = META_ARCH_CAFFE2_EXPORT_TYPE_MAP[cfg.MODEL.META_ARCHITECTURE] c2_compatible_model = C2MetaArch(cfg, model) c2_format_input = c2_compatible_model.get_caffe2_inputs(inputs) predict_net, init_net = export_caffe2_detection_model(c2_compatible_model, c2_format_input) return Caffe2Model(predict_net, init_net) class Caffe2Model(nn.Module): def __init__(self, predict_net, init_net): super().__init__() self.eval() # always in eval mode self._predict_net = predict_net self._init_net = init_net self._predictor = None @property def predict_net(self): """ Returns: core.Net: the underlying caffe2 predict net """ return self._predict_net @property def init_net(self): """ Returns: core.Net: the underlying caffe2 init net """ return self._init_net __init__.__HIDE_SPHINX_DOC__ = True def save_protobuf(self, output_dir): """ Save the model as caffe2's protobuf format. Args: output_dir (str): the output directory to save protobuf files. """ logger = logging.getLogger(__name__) logger.info("Saving model to {} ...".format(output_dir)) os.makedirs(output_dir, exist_ok=True) with open(os.path.join(output_dir, "model.pb"), "wb") as f: f.write(self._predict_net.SerializeToString()) with open(os.path.join(output_dir, "model.pbtxt"), "w") as f: f.write(str(self._predict_net)) with open(os.path.join(output_dir, "model_init.pb"), "wb") as f: f.write(self._init_net.SerializeToString()) def save_graph(self, output_file, inputs=None): """ Save the graph as SVG format. Args: output_file (str): a SVG file inputs: optional inputs given to the model. If given, the inputs will be used to run the graph to record shape of every tensor. The shape information will be saved together with the graph. """ if inputs is None: save_graph(self._predict_net, output_file, op_only=False) else: size_divisibility = get_pb_arg_vali(self._predict_net, "size_divisibility", 0) device = get_pb_arg_vals(self._predict_net, "device", b"cpu").decode("ascii") inputs = convert_batched_inputs_to_c2_format(inputs, size_divisibility, device) inputs = [x.numpy() for x in inputs] run_and_save_graph(self._predict_net, self._init_net, inputs, output_file) @staticmethod def load_protobuf(dir): """ Args: dir (str): a directory used to save Caffe2Model with :meth:`save_protobuf`. The files "model.pb" and "model_init.pb" are needed. Returns: Caffe2Model: the caffe2 model loaded from this directory. """ predict_net = caffe2_pb2.NetDef() with open(os.path.join(dir, "model.pb"), "rb") as f: predict_net.ParseFromString(f.read()) init_net = caffe2_pb2.NetDef() with open(os.path.join(dir, "model_init.pb"), "rb") as f: init_net.ParseFromString(f.read()) return Caffe2Model(predict_net, init_net) def __call__(self, inputs): """ An interface that wraps around a caffe2 model and mimics detectron2's models' input & output format. This is used to compare the caffe2 model with its original torch model. """ if self._predictor is None: self._predictor = ProtobufDetectionModel(self._predict_net, self._init_net) return self._predictor(inputs) ================================================ FILE: detectron2/export/c10.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import math import torch import torch.nn.functional as F from detectron2.layers import cat from detectron2.modeling import poolers from detectron2.modeling.proposal_generator import rpn from detectron2.modeling.roi_heads.mask_head import mask_rcnn_inference from detectron2.structures import Boxes, ImageList, Instances, Keypoints from .shared import alias, to_device """ This file contains caffe2-compatible implementation of several detectrno2 components. """ class Boxes4or5(Boxes): """ Representing a list of detectron2.structures.Boxes from minibatch, each box is represented by a 5d vector (batch index + 4 coordinates). """ def __init__(self, tensor): assert isinstance(tensor, torch.Tensor) assert tensor.dim() == 2 and tensor.size(-1) in [4, 5], tensor.size() # TODO: make tensor immutable when dim is Nx5? self.tensor = tensor # TODO clean up this class, maybe just extend Instances class InstancesList(object): """ Tensor representation of a list of Instances object for a batch of images. When dealing with a batch of images with Caffe2 ops, a list of bboxes (instances) are usually represented by single Tensor with size (sigma(Ni), 5) or (sigma(Ni), 4) plus a batch split Tensor. This class is for providing common functions to convert between these two representations. """ def __init__(self, im_info, indices, extra_fields=None): # [N, 3] -> (H, W, Scale) self.im_info = im_info # [N,] -> indice of batch to which the instance belongs self.indices = indices # [N, ...] self.batch_extra_fields = extra_fields or {} self.image_size = self.im_info def get_fields(self): """ like `get_fields` in the Instances object, but return each field in tensor representations """ ret = {} for k, v in self.batch_extra_fields.items(): # if isinstance(v, torch.Tensor): # tensor_rep = v # elif isinstance(v, (Boxes, Keypoints)): # tensor_rep = v.tensor # else: # raise ValueError("Can't find tensor representation for: {}".format()) ret[k] = v return ret def has(self, name): return name in self.batch_extra_fields def set(self, name, value): data_len = len(value) if len(self.batch_extra_fields): assert ( len(self) == data_len ), "Adding a field of length {} to a Instances of length {}".format(data_len, len(self)) self.batch_extra_fields[name] = value def __setattr__(self, name, val): if name in ["im_info", "indices", "batch_extra_fields", "image_size"]: super().__setattr__(name, val) else: self.set(name, val) def __getattr__(self, name): if name not in self.batch_extra_fields: raise AttributeError("Cannot find field '{}' in the given Instances!".format(name)) return self.batch_extra_fields[name] def __len__(self): return len(self.indices) def flatten(self): ret = [] for _, v in self.batch_extra_fields.items(): if isinstance(v, (Boxes, Keypoints)): ret.append(v.tensor) else: ret.append(v) return ret @staticmethod def to_d2_instances_list(instances_list): """ Convert InstancesList to List[Instances]. The input `instances_list` can also be a List[Instances], in this case this method is a non-op. """ if not isinstance(instances_list, InstancesList): assert all(isinstance(x, Instances) for x in instances_list) return instances_list ret = [] for i, info in enumerate(instances_list.im_info): instances = Instances(torch.Size([int(info[0].item()), int(info[1].item())])) ids = instances_list.indices == i for k, v in instances_list.batch_extra_fields.items(): if isinstance(v, torch.Tensor): instances.set(k, v[ids]) continue elif isinstance(v, Boxes): instances.set(k, v[ids, -4:]) continue target_type, tensor_source = v assert isinstance(tensor_source, torch.Tensor) assert tensor_source.shape[0] == instances_list.indices.shape[0] tensor_source = tensor_source[ids] if issubclass(target_type, Boxes): instances.set(k, Boxes(tensor_source[:, -4:])) elif issubclass(target_type, Keypoints): instances.set(k, Keypoints(tensor_source)) elif issubclass(target_type, torch.Tensor): instances.set(k, tensor_source) else: raise ValueError("Can't handle targe type: {}".format(target_type)) ret.append(instances) return ret class Caffe2Compatible(object): def _get_tensor_mode(self): return self._tensor_mode def _set_tensor_mode(self, v): self._tensor_mode = v tensor_mode = property(_get_tensor_mode, _set_tensor_mode) """ If true, the model expects C2-style tensor only inputs/outputs format. """ class Caffe2RPN(Caffe2Compatible, rpn.RPN): def forward(self, images, features, gt_instances=None): assert not self.training features = [features[f] for f in self.in_features] objectness_logits_pred, anchor_deltas_pred = self.rpn_head(features) # TODO is the needed? # objectness_logits_pred = [t.sigmoid() for t in objectness_logits_pred] assert isinstance(images, ImageList) if self.tensor_mode: im_info = images.image_sizes else: im_info = torch.Tensor( [[im_sz[0], im_sz[1], torch.Tensor([1.0])] for im_sz in images.image_sizes] ).to(images.tensor.device) assert isinstance(im_info, torch.Tensor) rpn_rois_list = [] rpn_roi_probs_list = [] for scores, bbox_deltas, cell_anchors_tensor, feat_stride in zip( objectness_logits_pred, anchor_deltas_pred, iter(self.anchor_generator.cell_anchors), self.anchor_generator.strides, ): scores = scores.detach() bbox_deltas = bbox_deltas.detach() rpn_rois, rpn_roi_probs = torch.ops._caffe2.GenerateProposals( scores, bbox_deltas, im_info, cell_anchors_tensor, spatial_scale=1.0 / feat_stride, pre_nms_topN=self.pre_nms_topk[self.training], post_nms_topN=self.post_nms_topk[self.training], nms_thresh=self.nms_thresh, min_size=self.min_box_side_len, # correct_transform_coords=True, # deprecated argument angle_bound_on=True, # Default angle_bound_lo=-90, # Default angle_bound_hi=90, # Default clip_angle_thresh=1.0, # Default legacy_plus_one=False, ) rpn_rois_list.append(rpn_rois) rpn_roi_probs_list.append(rpn_roi_probs) # For FPN in D2, in RPN all proposals from different levels are concated # together, ranked and picked by top post_nms_topk. Then in ROIPooler # it calculates level_assignments and calls the RoIAlign from # the corresponding level. if len(objectness_logits_pred) == 1: rpn_rois = rpn_rois_list[0] rpn_roi_probs = rpn_roi_probs_list[0] else: assert len(rpn_rois_list) == len(rpn_roi_probs_list) rpn_post_nms_topN = self.post_nms_topk[self.training] device = rpn_rois_list[0].device input_list = [to_device(x, "cpu") for x in (rpn_rois_list + rpn_roi_probs_list)] # TODO remove this after confirming rpn_max_level/rpn_min_level # is not needed in CollectRpnProposals. feature_strides = list(self.anchor_generator.strides) rpn_min_level = int(math.log2(feature_strides[0])) rpn_max_level = int(math.log2(feature_strides[-1])) assert (rpn_max_level - rpn_min_level + 1) == len( rpn_rois_list ), "CollectRpnProposals requires continuous levels" rpn_rois = torch.ops._caffe2.CollectRpnProposals( input_list, # NOTE: in current implementation, rpn_max_level and rpn_min_level # are not needed, only the subtraction of two matters and it # can be infer from the number of inputs. Keep them now for # consistency. rpn_max_level=2 + len(rpn_rois_list) - 1, rpn_min_level=2, rpn_post_nms_topN=rpn_post_nms_topN, ) rpn_rois = to_device(rpn_rois, device) rpn_roi_probs = [] proposals = self.c2_postprocess(im_info, rpn_rois, rpn_roi_probs, self.tensor_mode) return proposals, {} @staticmethod def c2_postprocess(im_info, rpn_rois, rpn_roi_probs, tensor_mode): proposals = InstancesList( im_info=im_info, indices=rpn_rois[:, 0], extra_fields={ "proposal_boxes": Boxes4or5(rpn_rois), "objectness_logits": (torch.Tensor, rpn_roi_probs), }, ) if not tensor_mode: proposals = InstancesList.to_d2_instances_list(proposals) else: proposals = [proposals] return proposals class Caffe2ROIPooler(Caffe2Compatible, poolers.ROIPooler): @staticmethod def c2_preprocess(box_lists): assert all(isinstance(x, Boxes) for x in box_lists) if all(isinstance(x, Boxes4or5) for x in box_lists): # input is pure-tensor based assert len(box_lists) == 1 pooler_fmt_boxes = box_lists[0].tensor else: pooler_fmt_boxes = poolers.convert_boxes_to_pooler_format(box_lists) return pooler_fmt_boxes def forward(self, x, box_lists): assert not self.training pooler_fmt_boxes = self.c2_preprocess(box_lists) num_level_assignments = len(self.level_poolers) if num_level_assignments == 1: out = torch.ops._caffe2.RoIAlign( x[0], pooler_fmt_boxes, order="NCHW", spatial_scale=float(self.level_poolers[0].spatial_scale), pooled_h=int(self.output_size[0]), pooled_w=int(self.output_size[1]), sampling_ratio=int(self.level_poolers[0].sampling_ratio), aligned=bool(self.level_poolers[0].aligned), ) return out device = pooler_fmt_boxes.device assert ( self.max_level - self.min_level + 1 == 4 ), "Currently DistributeFpnProposals only support 4 levels" fpn_outputs = torch.ops._caffe2.DistributeFpnProposals( to_device(pooler_fmt_boxes, "cpu"), roi_canonical_scale=self.canonical_box_size, roi_canonical_level=self.canonical_level, roi_max_level=self.max_level, roi_min_level=self.min_level, legacy_plus_one=False, ) fpn_outputs = [to_device(x, device) for x in fpn_outputs] rois_fpn_list = fpn_outputs[:-1] rois_idx_restore_int32 = fpn_outputs[-1] roi_feat_fpn_list = [] for roi_fpn, x_level, pooler in zip(rois_fpn_list, x, self.level_poolers): roi_feat_fpn = torch.ops._caffe2.RoIAlign( x_level, roi_fpn, order="NCHW", spatial_scale=float(pooler.spatial_scale), pooled_h=int(self.output_size[0]), pooled_w=int(self.output_size[1]), sampling_ratio=int(pooler.sampling_ratio), aligned=bool(pooler.aligned), ) roi_feat_fpn_list.append(roi_feat_fpn) roi_feat_shuffled = cat(roi_feat_fpn_list, dim=0) roi_feat = torch.ops._caffe2.BatchPermutation(roi_feat_shuffled, rois_idx_restore_int32) return roi_feat class Caffe2FastRCNNOutputsInference: def __init__(self, tensor_mode): self.tensor_mode = tensor_mode def __call__(self, fastrcnn_outputs, score_thresh, nms_thresh, topk_per_image): """ equivalent to FastRCNNOutputs.inference """ assert isinstance(fastrcnn_outputs.proposals, Boxes) input_tensor_mode = fastrcnn_outputs.proposals.tensor.shape[1] == 5 class_logits = fastrcnn_outputs.pred_class_logits box_regression = fastrcnn_outputs.pred_proposal_deltas class_prob = F.softmax(class_logits, -1) assert box_regression.shape[1] % 4 == 0 cls_agnostic_bbox_reg = box_regression.shape[1] // 4 == 1 device = class_logits.device im_info = ( torch.Tensor( [[sz[0], sz[1], torch.Tensor([1.0])] for sz in fastrcnn_outputs.image_shapes] ).to(device) if not input_tensor_mode else fastrcnn_outputs.image_shapes[0] ) rois_n4 = fastrcnn_outputs.proposals.tensor device, dtype = rois_n4.device, rois_n4.dtype if not input_tensor_mode: batch_ids = cat( [ torch.full((b, 1), i, dtype=dtype, device=device) for i, b in enumerate(fastrcnn_outputs.num_preds_per_image) ], dim=0, ) rois = torch.cat([batch_ids, rois_n4], dim=1) else: rois = fastrcnn_outputs.proposals.tensor roi_pred_bbox, roi_batch_splits = torch.ops._caffe2.BBoxTransform( to_device(rois, "cpu"), to_device(box_regression, "cpu"), to_device(im_info, "cpu"), weights=fastrcnn_outputs.box2box_transform.weights, apply_scale=True, rotated=False, angle_bound_on=True, angle_bound_lo=-90, angle_bound_hi=90, clip_angle_thresh=1.0, legacy_plus_one=False, ) roi_pred_bbox = to_device(roi_pred_bbox, device) roi_batch_splits = to_device(roi_batch_splits, device) nms_outputs = torch.ops._caffe2.BoxWithNMSLimit( to_device(class_prob, "cpu"), to_device(roi_pred_bbox, "cpu"), to_device(roi_batch_splits, "cpu"), score_thresh=float(score_thresh), nms=float(nms_thresh), detections_per_im=int(topk_per_image), soft_nms_enabled=False, soft_nms_method="linear", soft_nms_sigma=0.5, soft_nms_min_score_thres=0.001, rotated=False, cls_agnostic_bbox_reg=cls_agnostic_bbox_reg, input_boxes_include_bg_cls=False, output_classes_include_bg_cls=False, legacy_plus_one=False, ) roi_score_nms = to_device(nms_outputs[0], device) roi_bbox_nms = to_device(nms_outputs[1], device) roi_class_nms = to_device(nms_outputs[2], device) roi_batch_splits_nms = to_device(nms_outputs[3], device) roi_keeps_nms = to_device(nms_outputs[4], device) roi_keeps_size_nms = to_device(nms_outputs[5], device) if not self.tensor_mode: roi_class_nms = roi_class_nms.to(torch.int64) roi_batch_ids = cat( [ torch.full((b, 1), i, dtype=dtype, device=device) for i, b in enumerate(int(x.item()) for x in roi_batch_splits_nms) ], dim=0, ) roi_class_nms = alias(roi_class_nms, "class_nms") roi_score_nms = alias(roi_score_nms, "score_nms") roi_bbox_nms = alias(roi_bbox_nms, "bbox_nms") roi_batch_splits_nms = alias(roi_batch_splits_nms, "batch_splits_nms") roi_keeps_nms = alias(roi_keeps_nms, "keeps_nms") roi_keeps_size_nms = alias(roi_keeps_size_nms, "keeps_size_nms") results = InstancesList( im_info=im_info, indices=roi_batch_ids[:, 0], extra_fields={ "pred_boxes": Boxes4or5(roi_bbox_nms), "scores": roi_score_nms, "pred_classes": roi_class_nms, }, ) if not self.tensor_mode: results = InstancesList.to_d2_instances_list(results) batch_splits = roi_batch_splits_nms.int().tolist() kept_indices = list(roi_keeps_nms.to(torch.int64).split(batch_splits)) else: results = [results] kept_indices = [roi_keeps_nms] return results, kept_indices class Caffe2MaskRCNNInference: def __call__(self, pred_mask_logits, pred_instances): """ equivalent to mask_head.mask_rcnn_inference """ if all(isinstance(x, InstancesList) for x in pred_instances): assert len(pred_instances) == 1 mask_probs_pred = pred_mask_logits.sigmoid() mask_probs_pred = alias(mask_probs_pred, "mask_fcn_probs") pred_instances[0].pred_masks = mask_probs_pred else: mask_rcnn_inference(pred_mask_logits, pred_instances) class Caffe2KeypointRCNNInference: def __init__(self, use_heatmap_max_keypoint): self.use_heatmap_max_keypoint = use_heatmap_max_keypoint def __call__(self, pred_keypoint_logits, pred_instances): # just return the keypoint heatmap for now, # there will be option to call HeatmapMaxKeypointOp output = alias(pred_keypoint_logits, "kps_score") if all(isinstance(x, InstancesList) for x in pred_instances): assert len(pred_instances) == 1 if self.use_heatmap_max_keypoint: device = output.device output = torch.ops._caffe2.HeatmapMaxKeypoint( to_device(output, "cpu"), pred_instances[0].pred_boxes.tensor, should_output_softmax=True, # worth make it configerable? ) output = to_device(output, device) output = alias(output, "keypoints_out") pred_instances[0].pred_keypoints = output return pred_keypoint_logits ================================================ FILE: detectron2/export/caffe2_export.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy import io import logging import numpy as np from typing import List import onnx import torch from caffe2.proto import caffe2_pb2 from caffe2.python import core from caffe2.python.onnx.backend import Caffe2Backend from tabulate import tabulate from termcolor import colored from torch.onnx import OperatorExportTypes from .shared import ( ScopedWS, construct_init_net_from_params, fuse_alias_placeholder, fuse_copy_between_cpu_and_gpu, get_params_from_init_net, group_norm_replace_aten_with_caffe2, infer_device_type, remove_dead_end_ops, remove_reshape_for_fc, save_graph, ) logger = logging.getLogger(__name__) def _export_via_onnx(model, inputs): # make sure all modules are in eval mode, onnx may change the training state # of the moodule if the states are not consistent def _check_eval(module): assert not module.training model.apply(_check_eval) # Export the model to ONNX with torch.no_grad(): with io.BytesIO() as f: torch.onnx.export( model, inputs, f, operator_export_type=OperatorExportTypes.ONNX_ATEN_FALLBACK, # verbose=True, # NOTE: uncomment this for debugging # export_params=True, ) onnx_model = onnx.load_from_string(f.getvalue()) # Apply ONNX's Optimization all_passes = onnx.optimizer.get_available_passes() passes = ["fuse_bn_into_conv"] assert all(p in all_passes for p in passes) onnx_model = onnx.optimizer.optimize(onnx_model, passes) # Convert ONNX model to Caffe2 protobuf init_net, predict_net = Caffe2Backend.onnx_graph_to_caffe2_net(onnx_model) return predict_net, init_net def _op_stats(net_def): type_count = {} for t in [op.type for op in net_def.op]: type_count[t] = type_count.get(t, 0) + 1 type_count_list = sorted(type_count.items(), key=lambda kv: kv[0]) # alphabet type_count_list = sorted(type_count_list, key=lambda kv: -kv[1]) # count return "\n".join("{:>4}x {}".format(count, name) for name, count in type_count_list) def _assign_device_option( predict_net: caffe2_pb2.NetDef, init_net: caffe2_pb2.NetDef, tensor_inputs: List[torch.Tensor] ): """ ONNX exported network doesn't have concept of device, assign necessary device option for each op in order to make it runable on GPU runtime. """ def _get_device_type(torch_tensor): assert torch_tensor.device.type in ["cpu", "cuda"] assert torch_tensor.device.index == 0 return torch_tensor.device.type def _assign_op_device_option(net_proto, net_ssa, blob_device_types): for op, ssa_i in zip(net_proto.op, net_ssa): if op.type in ["CopyCPUToGPU", "CopyGPUToCPU"]: op.device_option.CopyFrom(core.DeviceOption(caffe2_pb2.CUDA, 0)) else: devices = [blob_device_types[b] for b in ssa_i[0] + ssa_i[1]] assert all(d == devices[0] for d in devices) if devices[0] == "cuda": op.device_option.CopyFrom(core.DeviceOption(caffe2_pb2.CUDA, 0)) # update ops in predict_net predict_net_input_device_types = { (name, 0): _get_device_type(tensor) for name, tensor in zip(predict_net.external_input, tensor_inputs) } predict_net_device_types = infer_device_type( predict_net, known_status=predict_net_input_device_types, device_name_style="pytorch" ) predict_net_ssa, _ = core.get_ssa(predict_net) _assign_op_device_option(predict_net, predict_net_ssa, predict_net_device_types) # update ops in init_net init_net_ssa, versions = core.get_ssa(init_net) init_net_output_device_types = { (name, versions[name]): predict_net_device_types[(name, 0)] for name in init_net.external_output } init_net_device_types = infer_device_type( init_net, known_status=init_net_output_device_types, device_name_style="pytorch" ) _assign_op_device_option(init_net, init_net_ssa, init_net_device_types) def export_caffe2_detection_model(model: torch.nn.Module, tensor_inputs: List[torch.Tensor]): """ Export a Detectron2 model via ONNX. Arg: model: a caffe2-compatible version of detectron2 model, defined in caffe2_modeling.py tensor_inputs: a list of tensors that caffe2 model takes as input. """ model = copy.deepcopy(model) assert isinstance(model, torch.nn.Module) assert hasattr(model, "encode_additional_info") # Export via ONNX logger.info("Exporting a {} model via ONNX ...".format(type(model).__name__)) predict_net, init_net = _export_via_onnx(model, (tensor_inputs,)) ops_table = [[op.type, op.input, op.output] for op in predict_net.op] table = tabulate(ops_table, headers=["type", "input", "output"], tablefmt="pipe") logger.info( "ONNX export Done. Exported predict_net (before optimizations):\n" + colored(table, "cyan") ) # Apply protobuf optimization fuse_alias_placeholder(predict_net, init_net) if any(t.device.type != "cpu" for t in tensor_inputs): fuse_copy_between_cpu_and_gpu(predict_net) remove_dead_end_ops(init_net) _assign_device_option(predict_net, init_net, tensor_inputs) params, device_options = get_params_from_init_net(init_net) predict_net, params = remove_reshape_for_fc(predict_net, params) init_net = construct_init_net_from_params(params, device_options) group_norm_replace_aten_with_caffe2(predict_net) # Record necessary information for running the pb model in Detectron2 system. model.encode_additional_info(predict_net, init_net) logger.info("Operators used in predict_net: \n{}".format(_op_stats(predict_net))) logger.info("Operators used in init_net: \n{}".format(_op_stats(init_net))) return predict_net, init_net def run_and_save_graph(predict_net, init_net, tensor_inputs, graph_save_path): """ Run the caffe2 model on given inputs, recording the shape and draw the graph. predict_net/init_net: caffe2 model. tensor_inputs: a list of tensors that caffe2 model takes as input. graph_save_path: path for saving graph of exported model. """ logger.info("Saving graph of ONNX exported model to {} ...".format(graph_save_path)) save_graph(predict_net, graph_save_path, op_only=False) # Run the exported Caffe2 net logger.info("Running ONNX exported model ...") with ScopedWS("__ws_tmp__", True) as ws: ws.RunNetOnce(init_net) initialized_blobs = set(ws.Blobs()) uninitialized = [inp for inp in predict_net.external_input if inp not in initialized_blobs] for name, blob in zip(uninitialized, tensor_inputs): ws.FeedBlob(name, blob) try: ws.RunNetOnce(predict_net) except RuntimeError as e: logger.warning("Encountered RuntimeError: \n{}".format(str(e))) ws_blobs = {b: ws.FetchBlob(b) for b in ws.Blobs()} blob_sizes = {b: ws_blobs[b].shape for b in ws_blobs if isinstance(ws_blobs[b], np.ndarray)} logger.info("Saving graph with blob shapes to {} ...".format(graph_save_path)) save_graph(predict_net, graph_save_path, op_only=False, blob_sizes=blob_sizes) return ws_blobs ================================================ FILE: detectron2/export/caffe2_inference.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import collections import logging import numpy as np import torch from caffe2.proto import caffe2_pb2 from caffe2.python import core from .caffe2_modeling import META_ARCH_CAFFE2_EXPORT_TYPE_MAP, convert_batched_inputs_to_c2_format from .shared import ScopedWS, get_pb_arg_vali, get_pb_arg_vals, infer_device_type logger = logging.getLogger(__name__) class ProtobufModel(torch.nn.Module): """ A class works just like nn.Module in terms of inference, but running caffe2 model under the hood. Input/Output are Dict[str, tensor] whose keys are in external_input/output. """ def __init__(self, predict_net, init_net): logger.info("Initializing ProtobufModel ...") super().__init__() assert isinstance(predict_net, caffe2_pb2.NetDef) assert isinstance(init_net, caffe2_pb2.NetDef) self.ws_name = "__ws_tmp__" self.net = core.Net(predict_net) with ScopedWS(self.ws_name, is_reset=True, is_cleanup=False) as ws: ws.RunNetOnce(init_net) for blob in self.net.Proto().external_input: if blob not in ws.Blobs(): ws.CreateBlob(blob) ws.CreateNet(self.net) self._error_msgs = set() def forward(self, inputs_dict): assert all(inp in self.net.Proto().external_input for inp in inputs_dict) with ScopedWS(self.ws_name, is_reset=False, is_cleanup=False) as ws: for b, tensor in inputs_dict.items(): ws.FeedBlob(b, tensor) try: ws.RunNet(self.net.Proto().name) except RuntimeError as e: if not str(e) in self._error_msgs: self._error_msgs.add(str(e)) logger.warning("Encountered new RuntimeError: \n{}".format(str(e))) logger.warning("Catch the error and use partial results.") outputs_dict = collections.OrderedDict( [(b, ws.FetchBlob(b)) for b in self.net.Proto().external_output] ) # Remove outputs of current run, this is necessary in order to # prevent fetching the result from previous run if the model fails # in the middle. for b in self.net.Proto().external_output: # Needs to create uninitialized blob to make the net runable. # This is "equivalent" to: ws.RemoveBlob(b) then ws.CreateBlob(b), # but there'no such API. ws.FeedBlob(b, "{}, a C++ native class of type nullptr (uninitialized).".format(b)) return outputs_dict class ProtobufDetectionModel(torch.nn.Module): """ A class works just like a pytorch meta arch in terms of inference, but running caffe2 model under the hood. """ def __init__(self, predict_net, init_net, *, convert_outputs=None): """ Args: predict_net, init_net (core.Net): caffe2 nets convert_outptus (callable): a function that converts caffe2 outputs to the same format of the original pytorch model. By default, use the one defined in the caffe2 meta_arch. """ super().__init__() self.protobuf_model = ProtobufModel(predict_net, init_net) self.size_divisibility = get_pb_arg_vali(predict_net, "size_divisibility", 0) self.device = get_pb_arg_vals(predict_net, "device", b"cpu").decode("ascii") if convert_outputs is None: meta_arch = get_pb_arg_vals(predict_net, "meta_architecture", b"GeneralizedRCNN") meta_arch = META_ARCH_CAFFE2_EXPORT_TYPE_MAP[meta_arch.decode("ascii")] self._convert_outputs = meta_arch.get_outputs_converter(predict_net, init_net) else: self._convert_outputs = convert_outputs def _infer_output_devices(self, inputs_dict): def _get_device_type(torch_tensor): assert torch_tensor.device.type in ["cpu", "cuda"] assert torch_tensor.device.index == 0 return torch_tensor.device.type predict_net = self.protobuf_model.net.Proto() input_device_types = { (name, 0): _get_device_type(tensor) for name, tensor in inputs_dict.items() } device_type_map = infer_device_type( predict_net, known_status=input_device_types, device_name_style="pytorch" ) ssa, versions = core.get_ssa(predict_net) versioned_outputs = [(name, versions[name]) for name in predict_net.external_output] output_devices = [device_type_map[outp] for outp in versioned_outputs] return output_devices def _convert_inputs(self, batched_inputs): # currently all models convert inputs in the same way data, im_info = convert_batched_inputs_to_c2_format( batched_inputs, self.size_divisibility, self.device ) return {"data": data, "im_info": im_info} def forward(self, batched_inputs): c2_inputs = self._convert_inputs(batched_inputs) c2_results = self.protobuf_model(c2_inputs) if any(t.device.type != "cpu" for _, t in c2_inputs.items()): output_devices = self._infer_output_devices(c2_inputs) else: output_devices = ["cpu" for _ in self.protobuf_model.net.Proto().external_output] def _cast_caffe2_blob_to_torch_tensor(blob, device): return torch.Tensor(blob).to(device) if isinstance(blob, np.ndarray) else None c2_results = { name: _cast_caffe2_blob_to_torch_tensor(c2_results[name], device) for name, device in zip(self.protobuf_model.net.Proto().external_output, output_devices) } return self._convert_outputs(batched_inputs, c2_inputs, c2_results) ================================================ FILE: detectron2/export/caffe2_modeling.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import functools import io import struct import types import torch from detectron2.modeling import meta_arch from detectron2.modeling.box_regression import Box2BoxTransform from detectron2.modeling.meta_arch.panoptic_fpn import combine_semantic_and_instance_outputs from detectron2.modeling.postprocessing import detector_postprocess, sem_seg_postprocess from detectron2.modeling.roi_heads import keypoint_head from detectron2.structures import Boxes, ImageList, Instances from .c10 import Caffe2Compatible from .patcher import ROIHeadsPatcher, patch_generalized_rcnn from .shared import ( alias, check_set_pb_arg, get_pb_arg_floats, get_pb_arg_valf, get_pb_arg_vali, get_pb_arg_vals, mock_torch_nn_functional_interpolate, ) def assemble_rcnn_outputs_by_name(image_sizes, tensor_outputs, force_mask_on=False): """ A function to assemble caffe2 model's outputs (i.e. Dict[str, Tensor]) to detectron2's format (i.e. list of Instances instance). This only works when the model follows the Caffe2 detectron's naming convention. Args: image_sizes (List[List[int, int]]): [H, W] of every image. tensor_outputs (Dict[str, Tensor]): external_output to its tensor. force_mask_on (Bool): if true, the it make sure there'll be pred_masks even if the mask is not found from tensor_outputs (usually due to model crash) """ results = [Instances(image_size) for image_size in image_sizes] batch_splits = tensor_outputs.get("batch_splits", None) if batch_splits: raise NotImplementedError() assert len(image_sizes) == 1 result = results[0] bbox_nms = tensor_outputs["bbox_nms"] score_nms = tensor_outputs["score_nms"] class_nms = tensor_outputs["class_nms"] # Detection will always success because Conv support 0-batch assert bbox_nms is not None assert score_nms is not None assert class_nms is not None result.pred_boxes = Boxes(bbox_nms) result.scores = score_nms result.pred_classes = class_nms.to(torch.int64) mask_fcn_probs = tensor_outputs.get("mask_fcn_probs", None) if mask_fcn_probs is not None: # finish the mask pred mask_probs_pred = mask_fcn_probs num_masks = mask_probs_pred.shape[0] class_pred = result.pred_classes indices = torch.arange(num_masks, device=class_pred.device) mask_probs_pred = mask_probs_pred[indices, class_pred][:, None] result.pred_masks = mask_probs_pred elif force_mask_on: # NOTE: there's no way to know the height/width of mask here, it won't be # used anyway when batch size is 0, so just set them to 0. result.pred_masks = torch.zeros([0, 1, 0, 0], dtype=torch.uint8) keypoints_out = tensor_outputs.get("keypoints_out", None) kps_score = tensor_outputs.get("kps_score", None) if keypoints_out is not None: # keypoints_out: [N, 4, #kypoints], where 4 is in order of (x, y, score, prob) keypoints_tensor = keypoints_out # NOTE: it's possible that prob is not calculated if "should_output_softmax" # is set to False in HeatmapMaxKeypoint, so just using raw score, seems # it doesn't affect mAP. TODO: check more carefully. keypoint_xyp = keypoints_tensor.transpose(1, 2)[:, :, [0, 1, 2]] result.pred_keypoints = keypoint_xyp elif kps_score is not None: # keypoint heatmap to sparse data structure pred_keypoint_logits = kps_score keypoint_head.keypoint_rcnn_inference(pred_keypoint_logits, [result]) return results def _cast_to_f32(f64): return struct.unpack("f", struct.pack("f", f64))[0] def set_caffe2_compatible_tensor_mode(model, enable=True): def _fn(m): if isinstance(m, Caffe2Compatible): m.tensor_mode = enable model.apply(_fn) def convert_batched_inputs_to_c2_format(batched_inputs, size_divisibility, device): """ See get_caffe2_inputs() below. """ assert all(isinstance(x, dict) for x in batched_inputs) assert all(x["image"].dim() == 3 for x in batched_inputs) images = [x["image"] for x in batched_inputs] images = ImageList.from_tensors(images, size_divisibility) im_info = [] for input_per_image, image_size in zip(batched_inputs, images.image_sizes): target_height = input_per_image.get("height", image_size[0]) target_width = input_per_image.get("width", image_size[1]) # noqa # NOTE: The scale inside im_info is kept as convention and for providing # post-processing information if further processing is needed. For # current Caffe2 model definitions that don't include post-processing inside # the model, this number is not used. # NOTE: There can be a slight difference between width and height # scales, using a single number can results in numerical difference # compared with D2's post-processing. scale = target_height / image_size[0] im_info.append([image_size[0], image_size[1], scale]) im_info = torch.Tensor(im_info) return images.tensor.to(device), im_info.to(device) class Caffe2MetaArch(Caffe2Compatible, torch.nn.Module): """ Base class for caffe2-compatible implementation of a meta architecture. The forward is traceable and its traced graph can be converted to caffe2 graph through ONNX. """ def __init__(self, cfg, torch_model): """ Args: cfg (CfgNode): torch_model (nn.Module): the detectron2 model (meta_arch) to be converted. """ super().__init__() self._wrapped_model = torch_model self.eval() set_caffe2_compatible_tensor_mode(self, True) def get_caffe2_inputs(self, batched_inputs): """ Convert pytorch-style structured inputs to caffe2-style inputs that are tuples of tensors. Args: batched_inputs (list[dict]): inputs to a detectron2 model in its standard format. Each dict has "image" (CHW tensor), and optionally "height" and "width". Returns: tuple[Tensor]: tuple of tensors that will be the inputs to the :meth:`forward` method. For existing models, the first is an NCHW tensor (padded and batched); the second is a im_info Nx3 tensor, where the rows are (height, width, unused legacy parameter) """ return convert_batched_inputs_to_c2_format( batched_inputs, self._wrapped_model.backbone.size_divisibility, self._wrapped_model.device, ) def encode_additional_info(self, predict_net, init_net): """ Save extra metadata that will be used by inference in the output protobuf. """ pass def forward(self, inputs): """ Run the forward in caffe2-style. It has to use caffe2-compatible ops and the method will be used for tracing. Args: inputs (tuple[Tensor]): inputs defined by :meth:`get_caffe2_input`. They will be the inputs of the converted caffe2 graph. Returns: tuple[Tensor]: output tensors. They will be the outputs of the converted caffe2 graph. """ raise NotImplementedError def _caffe2_preprocess_image(self, inputs): """ Caffe2 implementation of preprocess_image, which is called inside each MetaArch's forward. It normalizes the input images, and the final caffe2 graph assumes the inputs have been batched already. """ data, im_info = inputs data = alias(data, "data") im_info = alias(im_info, "im_info") normalized_data = self._wrapped_model.normalizer(data) normalized_data = alias(normalized_data, "normalized_data") # Pack (data, im_info) into ImageList which is recognized by self.inference. images = ImageList(tensor=normalized_data, image_sizes=im_info) return images @staticmethod def get_outputs_converter(predict_net, init_net): """ Creates a function that converts outputs of the caffe2 model to detectron2's standard format. The function uses information in `predict_net` and `init_net` that are available at inferene time. Therefore the function logic can be used in inference. The returned function has the following signature: def convert(batched_inputs, c2_inputs, c2_results) -> detectron2_outputs Where * batched_inputs (list[dict]): the original input format of the meta arch * c2_inputs (dict[str, Tensor]): the caffe2 inputs. * c2_results (dict[str, Tensor]): the caffe2 output format, corresponding to the outputs of the :meth:`forward` function. * detectron2_outputs: the original output format of the meta arch. This function can be used to compare the outputs of the original meta arch and the converted caffe2 graph. Returns: callable: a callable of the above signature. """ raise NotImplementedError class Caffe2GeneralizedRCNN(Caffe2MetaArch): def __init__(self, cfg, torch_model): assert isinstance(torch_model, meta_arch.GeneralizedRCNN) torch_model = patch_generalized_rcnn(torch_model) super().__init__(cfg, torch_model) self.roi_heads_patcher = ROIHeadsPatcher(cfg, self._wrapped_model.roi_heads) def encode_additional_info(self, predict_net, init_net): size_divisibility = self._wrapped_model.backbone.size_divisibility check_set_pb_arg(predict_net, "size_divisibility", "i", size_divisibility) check_set_pb_arg( predict_net, "device", "s", str.encode(str(self._wrapped_model.device), "ascii") ) check_set_pb_arg(predict_net, "meta_architecture", "s", b"GeneralizedRCNN") @mock_torch_nn_functional_interpolate() def forward(self, inputs): if not self.tensor_mode: return self._wrapped_model.inference(inputs) images = self._caffe2_preprocess_image(inputs) features = self._wrapped_model.backbone(images.tensor) proposals, _ = self._wrapped_model.proposal_generator(images, features) with self.roi_heads_patcher.mock_roi_heads(): detector_results, _ = self._wrapped_model.roi_heads(images, features, proposals) return tuple(detector_results[0].flatten()) @staticmethod def get_outputs_converter(predict_net, init_net): def f(batched_inputs, c2_inputs, c2_results): image_sizes = [[int(im[0]), int(im[1])] for im in c2_inputs["im_info"]] results = assemble_rcnn_outputs_by_name(image_sizes, c2_results) return meta_arch.GeneralizedRCNN._postprocess(results, batched_inputs, image_sizes) return f class Caffe2PanopticFPN(Caffe2MetaArch): def __init__(self, cfg, torch_model): assert isinstance(torch_model, meta_arch.PanopticFPN) torch_model = patch_generalized_rcnn(torch_model) super().__init__(cfg, torch_model) self.roi_heads_patcher = ROIHeadsPatcher(cfg, self._wrapped_model.roi_heads) @mock_torch_nn_functional_interpolate() def forward(self, inputs): assert self.tensor_mode images = self._caffe2_preprocess_image(inputs) features = self._wrapped_model.backbone(images.tensor) sem_seg_results, _ = self._wrapped_model.sem_seg_head(features) sem_seg_results = alias(sem_seg_results, "sem_seg") proposals, _ = self._wrapped_model.proposal_generator(images, features) with self.roi_heads_patcher.mock_roi_heads(self.tensor_mode): detector_results, _ = self._wrapped_model.roi_heads(images, features, proposals) return tuple(detector_results[0].flatten()) + (sem_seg_results,) def encode_additional_info(self, predict_net, init_net): size_divisibility = self._wrapped_model.backbone.size_divisibility check_set_pb_arg(predict_net, "size_divisibility", "i", size_divisibility) check_set_pb_arg( predict_net, "device", "s", str.encode(str(self._wrapped_model.device), "ascii") ) check_set_pb_arg(predict_net, "meta_architecture", "s", b"PanopticFPN") # Inference parameters: check_set_pb_arg(predict_net, "combine_on", "i", self._wrapped_model.combine_on) check_set_pb_arg( predict_net, "combine_overlap_threshold", "f", _cast_to_f32(self._wrapped_model.combine_overlap_threshold), ) check_set_pb_arg( predict_net, "combine_stuff_area_limit", "i", self._wrapped_model.combine_stuff_area_limit, ) check_set_pb_arg( predict_net, "combine_instances_confidence_threshold", "f", _cast_to_f32(self._wrapped_model.combine_instances_confidence_threshold), ) @staticmethod def get_outputs_converter(predict_net, init_net): combine_on = get_pb_arg_vali(predict_net, "combine_on", None) combine_overlap_threshold = get_pb_arg_valf(predict_net, "combine_overlap_threshold", None) combine_stuff_area_limit = get_pb_arg_vali(predict_net, "combine_stuff_area_limit", None) combine_instances_confidence_threshold = get_pb_arg_valf( predict_net, "combine_instances_confidence_threshold", None ) def f(batched_inputs, c2_inputs, c2_results): image_sizes = [[int(im[0]), int(im[1])] for im in c2_inputs["im_info"]] detector_results = assemble_rcnn_outputs_by_name( image_sizes, c2_results, force_mask_on=True ) sem_seg_results = c2_results["sem_seg"] # copied from meta_arch/panoptic_fpn.py ... processed_results = [] for sem_seg_result, detector_result, input_per_image, image_size in zip( sem_seg_results, detector_results, batched_inputs, image_sizes ): height = input_per_image.get("height", image_size[0]) width = input_per_image.get("width", image_size[1]) sem_seg_r = sem_seg_postprocess(sem_seg_result, image_size, height, width) detector_r = detector_postprocess(detector_result, height, width) processed_results.append({"sem_seg": sem_seg_r, "instances": detector_r}) if combine_on: panoptic_r = combine_semantic_and_instance_outputs( detector_r, sem_seg_r.argmax(dim=0), combine_overlap_threshold, combine_stuff_area_limit, combine_instances_confidence_threshold, ) processed_results[-1]["panoptic_seg"] = panoptic_r return processed_results return f class Caffe2RetinaNet(Caffe2MetaArch): def __init__(self, cfg, torch_model): assert isinstance(torch_model, meta_arch.RetinaNet) super().__init__(cfg, torch_model) @mock_torch_nn_functional_interpolate() def forward(self, inputs): assert self.tensor_mode images = self._caffe2_preprocess_image(inputs) # explicitly return the images sizes to avoid removing "im_info" by ONNX # since it's not used in the forward path return_tensors = [images.image_sizes] features = self._wrapped_model.backbone(images.tensor) features = [features[f] for f in self._wrapped_model.in_features] for i, feature_i in enumerate(features): features[i] = alias(feature_i, "feature_{}".format(i), is_backward=True) return_tensors.append(features[i]) box_cls, box_delta = self._wrapped_model.head(features) for i, (box_cls_i, box_delta_i) in enumerate(zip(box_cls, box_delta)): return_tensors.append(alias(box_cls_i, "box_cls_{}".format(i))) return_tensors.append(alias(box_delta_i, "box_delta_{}".format(i))) return tuple(return_tensors) def encode_additional_info(self, predict_net, init_net): size_divisibility = self._wrapped_model.backbone.size_divisibility check_set_pb_arg(predict_net, "size_divisibility", "i", size_divisibility) check_set_pb_arg( predict_net, "device", "s", str.encode(str(self._wrapped_model.device), "ascii") ) check_set_pb_arg(predict_net, "meta_architecture", "s", b"RetinaNet") # Inference parameters: check_set_pb_arg( predict_net, "score_threshold", "f", _cast_to_f32(self._wrapped_model.score_threshold) ) check_set_pb_arg(predict_net, "topk_candidates", "i", self._wrapped_model.topk_candidates) check_set_pb_arg( predict_net, "nms_threshold", "f", _cast_to_f32(self._wrapped_model.nms_threshold) ) check_set_pb_arg( predict_net, "max_detections_per_image", "i", self._wrapped_model.max_detections_per_image, ) check_set_pb_arg( predict_net, "bbox_reg_weights", "floats", [_cast_to_f32(w) for w in self._wrapped_model.box2box_transform.weights], ) self._encode_anchor_generator_cfg(predict_net) def _encode_anchor_generator_cfg(self, predict_net): # serialize anchor_generator for future use serialized_anchor_generator = io.BytesIO() torch.save(self._wrapped_model.anchor_generator, serialized_anchor_generator) # Ideally we can put anchor generating inside the model, then we don't # need to store this information. bytes = serialized_anchor_generator.getvalue() check_set_pb_arg(predict_net, "serialized_anchor_generator", "s", bytes) @staticmethod def get_outputs_converter(predict_net, init_net): self = types.SimpleNamespace() serialized_anchor_generator = io.BytesIO( get_pb_arg_vals(predict_net, "serialized_anchor_generator", None) ) self.anchor_generator = torch.load(serialized_anchor_generator) bbox_reg_weights = get_pb_arg_floats(predict_net, "bbox_reg_weights", None) self.box2box_transform = Box2BoxTransform(weights=tuple(bbox_reg_weights)) self.score_threshold = get_pb_arg_valf(predict_net, "score_threshold", None) self.topk_candidates = get_pb_arg_vali(predict_net, "topk_candidates", None) self.nms_threshold = get_pb_arg_valf(predict_net, "nms_threshold", None) self.max_detections_per_image = get_pb_arg_vali( predict_net, "max_detections_per_image", None ) # hack to reuse inference code from RetinaNet self.inference = functools.partial(meta_arch.RetinaNet.inference, self) self.inference_single_image = functools.partial( meta_arch.RetinaNet.inference_single_image, self ) def f(batched_inputs, c2_inputs, c2_results): image_sizes = [[int(im[0]), int(im[1])] for im in c2_inputs["im_info"]] num_features = len([x for x in c2_results.keys() if x.startswith("box_cls_")]) box_cls = [c2_results["box_cls_{}".format(i)] for i in range(num_features)] box_delta = [c2_results["box_delta_{}".format(i)] for i in range(num_features)] # For each feature level, feature should have the same batch size and # spatial dimension as the box_cls and box_delta. dummy_features = [box_delta[i].clone()[:, 0:0, :, :] for i in range(num_features)] anchors = self.anchor_generator(dummy_features) # self.num_classess can be inferred self.num_classes = box_cls[0].shape[1] // (box_delta[0].shape[1] // 4) results = self.inference(box_cls, box_delta, anchors, image_sizes) return meta_arch.GeneralizedRCNN._postprocess(results, batched_inputs, image_sizes) return f META_ARCH_CAFFE2_EXPORT_TYPE_MAP = { "GeneralizedRCNN": Caffe2GeneralizedRCNN, "PanopticFPN": Caffe2PanopticFPN, "RetinaNet": Caffe2RetinaNet, } ================================================ FILE: detectron2/export/patcher.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import contextlib import mock import torch from detectron2.modeling import poolers from detectron2.modeling.proposal_generator import rpn from detectron2.modeling.roi_heads import roi_heads from detectron2.modeling.roi_heads.fast_rcnn import FastRCNNOutputs from .c10 import ( Caffe2Compatible, Caffe2FastRCNNOutputsInference, Caffe2KeypointRCNNInference, Caffe2MaskRCNNInference, Caffe2ROIPooler, Caffe2RPN, ) class GenericMixin(object): pass class Caffe2CompatibleConverter(object): """ A GenericUpdater which implements the `create_from` interface, by modifying module object and assign it with another class replaceCls. """ def __init__(self, replaceCls): self.replaceCls = replaceCls def create_from(self, module): # update module's class to the new class assert isinstance(module, torch.nn.Module) if issubclass(self.replaceCls, GenericMixin): # replaceCls should act as mixin, create a new class on-the-fly new_class = type( "{}MixedWith{}".format(self.replaceCls.__name__, module.__class__.__name__), (self.replaceCls, module.__class__), {}, # {"new_method": lambda self: ...}, ) module.__class__ = new_class else: # replaceCls is complete class, this allow arbitrary class swap module.__class__ = self.replaceCls # initialize Caffe2Compatible if isinstance(module, Caffe2Compatible): module.tensor_mode = False return module def patch(model, target, updater, *args, **kwargs): """ recursively (post-order) update all modules with the target type and its subclasses, make a initialization/composition/inheritance/... via the updater.create_from. """ for name, module in model.named_children(): model._modules[name] = patch(module, target, updater, *args, **kwargs) if isinstance(model, target): return updater.create_from(model, *args, **kwargs) return model def patch_generalized_rcnn(model): ccc = Caffe2CompatibleConverter model = patch(model, rpn.RPN, ccc(Caffe2RPN)) model = patch(model, poolers.ROIPooler, ccc(Caffe2ROIPooler)) return model @contextlib.contextmanager def mock_fastrcnn_outputs_inference(tensor_mode, check=True): with mock.patch.object( FastRCNNOutputs, "inference", autospec=True, side_effect=Caffe2FastRCNNOutputsInference(tensor_mode), ) as mocked_func: yield if check: assert mocked_func.call_count > 0 @contextlib.contextmanager def mock_mask_rcnn_inference(tensor_mode, patched_module, check=True): with mock.patch( "{}.mask_rcnn_inference".format(patched_module), side_effect=Caffe2MaskRCNNInference() ) as mocked_func: yield if check: assert mocked_func.call_count > 0 @contextlib.contextmanager def mock_keypoint_rcnn_inference(tensor_mode, patched_module, use_heatmap_max_keypoint, check=True): with mock.patch( "{}.keypoint_rcnn_inference".format(patched_module), side_effect=Caffe2KeypointRCNNInference(use_heatmap_max_keypoint), ) as mocked_func: yield if check: assert mocked_func.call_count > 0 class ROIHeadsPatcher: def __init__(self, cfg, heads): self.heads = heads self.use_heatmap_max_keypoint = cfg.EXPORT_CAFFE2.USE_HEATMAP_MAX_KEYPOINT @contextlib.contextmanager def mock_roi_heads(self, tensor_mode=True): """ Patching several inference functions inside ROIHeads and its subclasses Args: tensor_mode (bool): whether the inputs/outputs are caffe2's tensor format or not. Default to True. """ # NOTE: this requries the `keypoint_rcnn_inference` and `mask_rcnn_inference` # are called inside the same file as ROIHeads due to using mock.patch. module = roi_heads.ROIHeads.__module__ mock_ctx_managers = [mock_fastrcnn_outputs_inference(tensor_mode)] if getattr(self.heads, "keypoint_on", False): mock_ctx_managers += [ mock_keypoint_rcnn_inference(tensor_mode, module, self.use_heatmap_max_keypoint) ] if getattr(self.heads, "mask_on", False): mock_ctx_managers += [mock_mask_rcnn_inference(tensor_mode, module)] with contextlib.ExitStack() as stack: # python 3.3+ for mgr in mock_ctx_managers: stack.enter_context(mgr) yield ================================================ FILE: detectron2/export/shared.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import collections import contextlib import copy import functools import logging import mock import numpy as np import os from typing import Any, Callable, Dict, List, Optional, Tuple, Union import caffe2.python.utils as putils import torch import torch.nn.functional as F from caffe2.proto import caffe2_pb2 from caffe2.python import core, net_drawer, workspace from torch.nn.functional import interpolate as interp logger = logging.getLogger(__name__) # ==== torch/utils_toffee/cast.py ======================================= def to_device(t, device_str): """ This function is a replacement of .to(another_device) such that it allows the casting to be traced properly by explicitly calling the underlying copy ops. It also avoids introducing unncessary op when casting to the same device. """ src = t.device dst = torch.device(device_str) if src == dst: return t elif src.type == "cuda" and dst.type == "cpu": return torch.ops._caffe2.CopyGPUToCPU(t) elif src.type == "cpu" and dst.type == "cuda": return torch.ops._caffe2.CopyCPUToGPU(t) else: raise RuntimeError("Can't cast tensor from device {} to device {}".format(src, dst)) # ==== torch/utils_toffee/interpolate.py ======================================= # Note: borrowed from vision/detection/fair/detectron/detectron/modeling/detector.py def BilinearInterpolation(tensor_in, up_scale): assert up_scale % 2 == 0, "Scale should be even" def upsample_filt(size): factor = (size + 1) // 2 if size % 2 == 1: center = factor - 1 else: center = factor - 0.5 og = np.ogrid[:size, :size] return (1 - abs(og[0] - center) / factor) * (1 - abs(og[1] - center) / factor) kernel_size = int(up_scale) * 2 bil_filt = upsample_filt(kernel_size) dim = int(tensor_in.shape[1]) kernel = np.zeros((dim, dim, kernel_size, kernel_size), dtype=np.float32) kernel[range(dim), range(dim), :, :] = bil_filt tensor_out = F.conv_transpose2d( tensor_in, weight=to_device(torch.Tensor(kernel), tensor_in.device), bias=None, stride=int(up_scale), padding=int(up_scale / 2), ) return tensor_out # NOTE: ONNX is incompatible with traced torch.nn.functional.interpolate if # using dynamic `scale_factor` rather than static `size`. (T43166860) # NOTE: Caffe2 Int8 conversion might not be able to quantize `size` properly. def onnx_compatibale_interpolate( input, size=None, scale_factor=None, mode="nearest", align_corners=None ): # NOTE: The input dimensions are interpreted in the form: # `mini-batch x channels x [optional depth] x [optional height] x width`. if size is None and scale_factor is not None: if input.dim() == 4: if isinstance(scale_factor, (int, float)): height_scale, width_scale = (scale_factor, scale_factor) else: assert isinstance(scale_factor, (tuple, list)) assert len(scale_factor) == 2 height_scale, width_scale = scale_factor assert not align_corners, "No matching C2 op for align_corners == True" if mode == "nearest": return torch.ops._caffe2.ResizeNearest( input, order="NCHW", width_scale=width_scale, height_scale=height_scale ) elif mode == "bilinear": logger.warning( "Use F.conv_transpose2d for bilinear interpolate" " because there's no such C2 op, this may cause significant" " slowdown and the boundary pixels won't be as same as" " using F.interpolate due to padding." ) assert height_scale == width_scale return BilinearInterpolation(input, up_scale=height_scale) logger.warning("Output size is not static, it might cause ONNX conversion issue") return interp(input, size, scale_factor, mode, align_corners) @contextlib.contextmanager def mock_torch_nn_functional_interpolate(): if torch.onnx.is_in_onnx_export(): with mock.patch( "torch.nn.functional.interpolate", side_effect=onnx_compatibale_interpolate ): yield else: yield # ==== torch/utils_caffe2/ws_utils.py ========================================== class ScopedWS(object): def __init__(self, ws_name, is_reset, is_cleanup=False): self.ws_name = ws_name self.is_reset = is_reset self.is_cleanup = is_cleanup self.org_ws = "" def __enter__(self): self.org_ws = workspace.CurrentWorkspace() if self.ws_name is not None: workspace.SwitchWorkspace(self.ws_name, True) if self.is_reset: workspace.ResetWorkspace() return workspace def __exit__(self, *args): if self.is_cleanup: workspace.ResetWorkspace() if self.ws_name is not None: workspace.SwitchWorkspace(self.org_ws) def fetch_any_blob(name): bb = None try: bb = workspace.FetchBlob(name) except TypeError: bb = workspace.FetchInt8Blob(name) except Exception as e: logger.error("Get blob {} error: {}".format(name, e)) return bb # ==== torch/utils_caffe2/protobuf.py ========================================== def get_pb_arg(pb, arg_name): for x in pb.arg: if x.name == arg_name: return x return None def get_pb_arg_valf(pb, arg_name, default_val): arg = get_pb_arg(pb, arg_name) return arg.f if arg is not None else default_val def get_pb_arg_floats(pb, arg_name, default_val): arg = get_pb_arg(pb, arg_name) return list(map(float, arg.floats)) if arg is not None else default_val def get_pb_arg_ints(pb, arg_name, default_val): arg = get_pb_arg(pb, arg_name) return list(map(int, arg.ints)) if arg is not None else default_val def get_pb_arg_vali(pb, arg_name, default_val): arg = get_pb_arg(pb, arg_name) return arg.i if arg is not None else default_val def get_pb_arg_vals(pb, arg_name, default_val): arg = get_pb_arg(pb, arg_name) return arg.s if arg is not None else default_val def get_pb_arg_valstrings(pb, arg_name, default_val): arg = get_pb_arg(pb, arg_name) return list(arg.strings) if arg is not None else default_val def check_set_pb_arg(pb, arg_name, arg_attr, arg_value, allow_override=False): arg = get_pb_arg(pb, arg_name) if arg is None: arg = putils.MakeArgument(arg_name, arg_value) assert hasattr(arg, arg_attr) pb.arg.extend([arg]) if allow_override and getattr(arg, arg_attr) != arg_value: logger.warning( "Override argument {}: {} -> {}".format(arg_name, getattr(arg, arg_attr), arg_value) ) setattr(arg, arg_attr, arg_value) else: assert arg is not None assert getattr(arg, arg_attr) == arg_value, "Existing value {}, new value {}".format( getattr(arg, arg_attr), arg_value ) def _create_const_fill_op_from_numpy(name, tensor, device_option=None): assert type(tensor) == np.ndarray kTypeNameMapper = { np.dtype("float32"): "GivenTensorFill", np.dtype("int32"): "GivenTensorIntFill", np.dtype("int64"): "GivenTensorInt64Fill", np.dtype("uint8"): "GivenTensorStringFill", } args_dict = {} if tensor.dtype == np.dtype("uint8"): args_dict.update({"values": [str(tensor.data)], "shape": [1]}) else: args_dict.update({"values": tensor, "shape": tensor.shape}) if device_option is not None: args_dict["device_option"] = device_option return core.CreateOperator(kTypeNameMapper[tensor.dtype], [], [name], **args_dict) def _create_const_fill_op_from_c2_int8_tensor(name, int8_tensor): assert type(int8_tensor) == workspace.Int8Tensor kTypeNameMapper = { np.dtype("int32"): "Int8GivenIntTensorFill", np.dtype("uint8"): "Int8GivenTensorFill", } tensor = int8_tensor.data assert tensor.dtype in [np.dtype("uint8"), np.dtype("int32")] values = tensor.tobytes() if tensor.dtype == np.dtype("uint8") else tensor return core.CreateOperator( kTypeNameMapper[tensor.dtype], [], [name], values=values, shape=tensor.shape, Y_scale=int8_tensor.scale, Y_zero_point=int8_tensor.zero_point, ) def create_const_fill_op( name: str, blob: Union[np.ndarray, workspace.Int8Tensor], device_option: Optional[caffe2_pb2.DeviceOption] = None, ) -> caffe2_pb2.OperatorDef: """ Given a blob object, return the Caffe2 operator that creates this blob as constant. Currently support NumPy tensor and Caffe2 Int8Tensor. """ tensor_type = type(blob) assert tensor_type in [np.ndarray, workspace.Int8Tensor], ( 'Error when creating const fill op for "{}", unsupported blob type: {}' ).format(name, type(blob)) if tensor_type == np.ndarray: return _create_const_fill_op_from_numpy(name, blob, device_option) elif tensor_type == workspace.Int8Tensor: assert device_option is None return _create_const_fill_op_from_c2_int8_tensor(name, blob) def construct_init_net_from_params( params: Dict[str, Any], device_options: Optional[Dict[str, caffe2_pb2.DeviceOption]] = None ) -> caffe2_pb2.NetDef: """ Construct the init_net from params dictionary """ init_net = caffe2_pb2.NetDef() device_options = device_options or {} for name, blob in params.items(): if isinstance(blob, str): logger.warning( ( "Blob {} with type {} is not supported in generating init net," " skipped.".format(name, type(blob)) ) ) continue init_net.op.extend( [create_const_fill_op(name, blob, device_option=device_options.get(name, None))] ) init_net.external_output.append(name) return init_net def get_producer_map(ssa): """ Return dict from versioned blob to (i, j), where i is index of producer op, j is the index of output of that op. """ producer_map = {} for i in range(len(ssa)): outputs = ssa[i][1] for j, outp in enumerate(outputs): producer_map[outp] = (i, j) return producer_map def get_consumer_map(ssa): """ Return dict from versioned blob to list of (i, j), where i is index of consumer op, j is the index of input of that op. """ consumer_map = collections.defaultdict(list) for i in range(len(ssa)): inputs = ssa[i][0] for j, inp in enumerate(inputs): consumer_map[inp].append((i, j)) return consumer_map def get_params_from_init_net( init_net: caffe2_pb2.NetDef ) -> [Dict[str, Any], Dict[str, caffe2_pb2.DeviceOption]]: """ Take the output blobs from init_net by running it. Outputs: params: dict from blob name to numpy array device_options: dict from blob name to the device option of its creating op """ # NOTE: this assumes that the params is determined by producer op with the # only exception be CopyGPUToCPU which is CUDA op but returns CPU tensor. def _get_device_option(producer_op): if producer_op.type == "CopyGPUToCPU": return caffe2_pb2.DeviceOption() else: return producer_op.device_option with ScopedWS("__get_params_from_init_net__", is_reset=True, is_cleanup=True) as ws: ws.RunNetOnce(init_net) params = {b: fetch_any_blob(b) for b in init_net.external_output} ssa, versions = core.get_ssa(init_net) producer_map = get_producer_map(ssa) device_options = { b: _get_device_option(init_net.op[producer_map[(b, versions[b])][0]]) for b in init_net.external_output } return params, device_options def _updater_raise(op, input_types, output_types): raise RuntimeError( "Failed to apply updater for op {} given input_types {} and" " output_types {}".format(op, input_types, output_types) ) def _generic_status_identifier( predict_net: caffe2_pb2.NetDef, status_updater: Callable, known_status: Dict[Tuple[str, int], Any], ) -> Dict[Tuple[str, int], Any]: """ Statically infer the status of each blob, the status can be such as device type (CPU/GPU), layout (NCHW/NHWC), data type (float32/int8), etc. "Blob" here is versioned blob (Tuple[str, int]) in the format compatible with ssa. Inputs: predict_net: the caffe2 network status_updater: a callable, given an op and the status of its input/output, it returns the updated status of input/output. `None` is used for representing unknown status. known_status: a dict containing known status, used as initialization. Outputs: A dict mapping from versioned blob to its status """ ssa, versions = core.get_ssa(predict_net) versioned_ext_input = [(b, 0) for b in predict_net.external_input] versioned_ext_output = [(b, versions[b]) for b in predict_net.external_output] all_versioned_blobs = set().union(*[set(x[0] + x[1]) for x in ssa]) allowed_vbs = all_versioned_blobs.union(versioned_ext_input).union(versioned_ext_output) assert all(k in allowed_vbs for k in known_status) assert all(v is not None for v in known_status.values()) _known_status = copy.deepcopy(known_status) def _check_and_update(key, value): assert value is not None if key in _known_status: if not _known_status[key] == value: raise RuntimeError( "Confilict status for {}, existing status {}, new status {}".format( key, _known_status[key], value ) ) _known_status[key] = value def _update_i(op, ssa_i): versioned_inputs = ssa_i[0] versioned_outputs = ssa_i[1] inputs_status = [_known_status.get(b, None) for b in versioned_inputs] outputs_status = [_known_status.get(b, None) for b in versioned_outputs] new_inputs_status, new_outputs_status = status_updater(op, inputs_status, outputs_status) for versioned_blob, status in zip( versioned_inputs + versioned_outputs, new_inputs_status + new_outputs_status ): if status is not None: _check_and_update(versioned_blob, status) for op, ssa_i in zip(predict_net.op, ssa): _update_i(op, ssa_i) for op, ssa_i in zip(reversed(predict_net.op), reversed(ssa)): _update_i(op, ssa_i) # NOTE: This strictly checks all the blob from predict_net must be assgined # a known status. However sometimes it's impossible (eg. having deadend op), # we may relax this constraint if for k in all_versioned_blobs: if k not in _known_status: raise NotImplementedError( "Can not infer the status for {}. Currently only support the case where" " a single forward and backward pass can identify status for all blobs.".format(k) ) return _known_status def infer_device_type( predict_net: caffe2_pb2.NetDef, known_status: Dict[Tuple[str, int], Any], device_name_style: str = "caffe2", ) -> Dict[Tuple[str, int], str]: """ Return the device type ("cpu" or "gpu"/"cuda") of each (versioned) blob """ assert device_name_style in ["caffe2", "pytorch"] _CPU_STR = "cpu" _GPU_STR = "gpu" if device_name_style == "caffe2" else "cuda" def _copy_cpu_to_gpu_updater(op, input_types, output_types): if input_types[0] == _GPU_STR or output_types[0] == _CPU_STR: _updater_raise(op, input_types, output_types) return ([_CPU_STR], [_GPU_STR]) def _copy_gpu_to_cpu_updater(op, input_types, output_types): if input_types[0] == _CPU_STR or output_types[0] == _GPU_STR: _updater_raise(op, input_types, output_types) return ([_GPU_STR], [_CPU_STR]) def _other_ops_updater(op, input_types, output_types): non_none_types = [x for x in input_types + output_types if x is not None] if len(non_none_types) > 0: the_type = non_none_types[0] if not all(x == the_type for x in non_none_types): _updater_raise(op, input_types, output_types) else: the_type = None return ([the_type for _ in op.input], [the_type for _ in op.output]) def _device_updater(op, *args, **kwargs): return { "CopyCPUToGPU": _copy_cpu_to_gpu_updater, "CopyGPUToCPU": _copy_gpu_to_cpu_updater, }.get(op.type, _other_ops_updater)(op, *args, **kwargs) return _generic_status_identifier(predict_net, _device_updater, known_status) # ==== torch/utils_caffe2/vis.py =============================================== def _modify_blob_names(ops, blob_rename_f): ret = [] def _replace_list(blob_list, replaced_list): del blob_list[:] blob_list.extend(replaced_list) for x in ops: cur = copy.deepcopy(x) _replace_list(cur.input, list(map(blob_rename_f, cur.input))) _replace_list(cur.output, list(map(blob_rename_f, cur.output))) ret.append(cur) return ret def _rename_blob(name, blob_sizes, blob_ranges): def _list_to_str(bsize): ret = ", ".join([str(x) for x in bsize]) ret = "[" + ret + "]" return ret ret = name if blob_sizes is not None and name in blob_sizes: ret += "\n" + _list_to_str(blob_sizes[name]) if blob_ranges is not None and name in blob_ranges: ret += "\n" + _list_to_str(blob_ranges[name]) return ret # graph_name could not contain word 'graph' def save_graph(net, file_name, graph_name="net", op_only=True, blob_sizes=None, blob_ranges=None): blob_rename_f = functools.partial(_rename_blob, blob_sizes=blob_sizes, blob_ranges=blob_ranges) return save_graph_base(net, file_name, graph_name, op_only, blob_rename_f) def save_graph_base(net, file_name, graph_name="net", op_only=True, blob_rename_func=None): graph = None ops = net.op if blob_rename_func is not None: ops = _modify_blob_names(ops, blob_rename_func) if not op_only: graph = net_drawer.GetPydotGraph(ops, graph_name, rankdir="TB") else: graph = net_drawer.GetPydotGraphMinimal( ops, graph_name, rankdir="TB", minimal_dependency=True ) try: par_dir = os.path.dirname(file_name) if not os.path.exists(par_dir): os.makedirs(par_dir) format = os.path.splitext(os.path.basename(file_name))[-1] if format == ".png": graph.write_png(file_name) elif format == ".pdf": graph.write_pdf(file_name) elif format == ".svg": graph.write_svg(file_name) else: print("Incorrect format {}".format(format)) except Exception as e: print("Error when writing graph to image {}".format(e)) return graph # ==== torch/utils_toffee/aten_to_caffe2.py ==================================== def group_norm_replace_aten_with_caffe2(predict_net: caffe2_pb2.NetDef): """ For ONNX exported model, GroupNorm will be represented as ATen op, this can be a drop in replacement from ATen to GroupNorm """ count = 0 for op in predict_net.op: if op.type == "ATen": op_name = get_pb_arg_vals(op, "operator", None) # return byte in py3 if op_name and op_name.decode() == "group_norm": op.arg.remove(get_pb_arg(op, "operator")) if get_pb_arg_vali(op, "cudnn_enabled", None): op.arg.remove(get_pb_arg(op, "cudnn_enabled")) num_groups = get_pb_arg_vali(op, "num_groups", None) if num_groups is not None: op.arg.remove(get_pb_arg(op, "num_groups")) check_set_pb_arg(op, "group", "i", num_groups) op.type = "GroupNorm" count += 1 if count > 1: logger.info("Replaced {} ATen operator to GroupNormOp".format(count)) # ==== torch/utils_toffee/alias.py ============================================= def alias(x, name, is_backward=False): if not torch.onnx.is_in_onnx_export(): return x assert isinstance(x, torch.Tensor) return torch.ops._caffe2.AliasWithName(x, name, is_backward=is_backward) def fuse_alias_placeholder(predict_net, init_net): """ Remove AliasWithName placeholder and rename the input/output of it """ # First we finish all the re-naming for i, op in enumerate(predict_net.op): if op.type == "AliasWithName": assert len(op.input) == 1 assert len(op.output) == 1 name = get_pb_arg_vals(op, "name", None).decode() is_backward = bool(get_pb_arg_vali(op, "is_backward", 0)) rename_op_input(predict_net, init_net, i, 0, name, from_producer=is_backward) rename_op_output(predict_net, i, 0, name) # Remove AliasWithName, should be very safe since it's a non-op new_ops = [] for op in predict_net.op: if op.type != "AliasWithName": new_ops.append(op) else: # safety check assert op.input == op.output assert op.input[0] == op.arg[0].s.decode() del predict_net.op[:] predict_net.op.extend(new_ops) # ==== torch/utils_caffe2/graph_transform.py =================================== class IllegalGraphTransformError(ValueError): """ When a graph transform function call can't be executed. """ def _rename_versioned_blob_in_proto( proto: caffe2_pb2.NetDef, old_name: str, new_name: str, version: int, ssa: List[Tuple[List[Tuple[str, int]], List[Tuple[str, int]]]], start_versions: Dict[str, int], end_versions: Dict[str, int], ): """ In given proto, rename all blobs with matched version """ # Operater list for op, i_th_ssa in zip(proto.op, ssa): versioned_inputs, versioned_outputs = i_th_ssa for i in range(len(op.input)): if versioned_inputs[i] == (old_name, version): op.input[i] = new_name for i in range(len(op.output)): if versioned_outputs[i] == (old_name, version): op.output[i] = new_name # external_input if start_versions.get(old_name, 0) == version: for i in range(len(proto.external_input)): if proto.external_input[i] == old_name: proto.external_input[i] = new_name # external_output if end_versions.get(old_name, 0) == version: for i in range(len(proto.external_output)): if proto.external_output[i] == old_name: proto.external_output[i] = new_name def rename_op_input( predict_net: caffe2_pb2.NetDef, init_net: caffe2_pb2.NetDef, op_id: int, input_id: int, new_name: str, from_producer: bool = False, ): """ Rename the op_id-th operator in predict_net, change it's input_id-th input's name to the new_name. It also does automatic re-route and change external_input and init_net if necessary. - It requires the input is only consumed by this op. - This function modifies predict_net and init_net in-place. - When from_producer is enable, this also updates other operators that consumes the same input. Be cautious because may trigger unintended behaviour. """ assert isinstance(predict_net, caffe2_pb2.NetDef) assert isinstance(init_net, caffe2_pb2.NetDef) init_net_ssa, init_net_versions = core.get_ssa(init_net) predict_net_ssa, predict_net_versions = core.get_ssa( predict_net, copy.deepcopy(init_net_versions) ) versioned_inputs, versioned_outputs = predict_net_ssa[op_id] old_name, version = versioned_inputs[input_id] if from_producer: producer_map = get_producer_map(predict_net_ssa) if not (old_name, version) in producer_map: raise NotImplementedError( "Can't find producer, the input {} is probably from" " init_net, this is not supported yet.".format(old_name) ) producer = producer_map[(old_name, version)] rename_op_output(predict_net, producer[0], producer[1], new_name) return def contain_targets(op_ssa): return (old_name, version) in op_ssa[0] is_consumer = [contain_targets(op_ssa) for op_ssa in predict_net_ssa] if sum(is_consumer) > 1: raise IllegalGraphTransformError( ( "Input '{}' of operator(#{}) are consumed by other ops, please use" + " rename_op_output on the producer instead. Offending op: \n{}" ).format(old_name, op_id, predict_net.op[op_id]) ) # update init_net _rename_versioned_blob_in_proto( init_net, old_name, new_name, version, init_net_ssa, {}, init_net_versions ) # update predict_net _rename_versioned_blob_in_proto( predict_net, old_name, new_name, version, predict_net_ssa, init_net_versions, predict_net_versions, ) def rename_op_output(predict_net: caffe2_pb2.NetDef, op_id: int, output_id: int, new_name: str): """ Rename the op_id-th operator in predict_net, change it's output_id-th input's name to the new_name. It also does automatic re-route and change external_output and if necessary. - It allows multiple consumers of its output. - This function modifies predict_net in-place, doesn't need init_net. """ assert isinstance(predict_net, caffe2_pb2.NetDef) ssa, blob_versions = core.get_ssa(predict_net) versioned_inputs, versioned_outputs = ssa[op_id] old_name, version = versioned_outputs[output_id] # update predict_net _rename_versioned_blob_in_proto( predict_net, old_name, new_name, version, ssa, {}, blob_versions ) def get_sub_graph_external_input_output( predict_net: caffe2_pb2.NetDef, sub_graph_op_indices: List[int] ) -> Tuple[List[Tuple[str, int]], List[Tuple[str, int]]]: """ Return the list of external input/output of sub-graph, each element is tuple of the name and corresponding version in predict_net. external input/output is defined the same way as caffe2 NetDef. """ ssa, versions = core.get_ssa(predict_net) all_inputs = [] all_outputs = [] for op_id in sub_graph_op_indices: all_inputs += [inp for inp in ssa[op_id][0] if inp not in all_inputs] all_outputs += list(ssa[op_id][1]) # ssa output won't repeat # for versioned blobs, external inputs are just those blob in all_inputs # but not in all_outputs ext_inputs = [inp for inp in all_inputs if inp not in all_outputs] # external outputs are essentially outputs of this subgraph that are used # outside of this sub-graph (including predict_net.external_output) all_other_inputs = sum( (ssa[i][0] for i in range(len(ssa)) if i not in sub_graph_op_indices), [(outp, versions[outp]) for outp in predict_net.external_output], ) ext_outputs = [outp for outp in all_outputs if outp in set(all_other_inputs)] return ext_inputs, ext_outputs class DiGraph: """ A DAG representation of caffe2 graph, each vertice is a versioned blob. """ def __init__(self): self.vertices = set() self.graph = collections.defaultdict(list) def add_edge(self, u, v): self.graph[u].append(v) self.vertices.add(u) self.vertices.add(v) # grab from https://www.geeksforgeeks.org/find-paths-given-source-destination/ def get_all_paths(self, s, d): visited = {k: False for k in self.vertices} path = [] all_paths = [] def _get_all_paths_util(graph, u, d, visited, path): visited[u] = True path.append(u) if u == d: all_paths.append(copy.deepcopy(path)) else: for i in graph[u]: if not visited[i]: _get_all_paths_util(graph, i, d, visited, path) path.pop() visited[u] = False _get_all_paths_util(self.graph, s, d, visited, path) return all_paths @staticmethod def from_ssa(ssa): graph = DiGraph() for op_id in range(len(ssa)): for inp in ssa[op_id][0]: for outp in ssa[op_id][1]: graph.add_edge(inp, outp) return graph def _get_dependency_chain(ssa, versioned_target, versioned_source): """ Return the index list of relevant operator to produce target blob from source blob, if there's no dependency, return empty list. """ # finding all paths between nodes can be O(N!), thus we can only search # in the subgraph using the op starting from the first consumer of source blob # to the producer of the target blob. consumer_map = get_consumer_map(ssa) producer_map = get_producer_map(ssa) start_op = min(x[0] for x in consumer_map[versioned_source]) - 15 end_op = ( producer_map[versioned_target][0] + 15 if versioned_target in producer_map else start_op ) sub_graph_ssa = ssa[start_op : end_op + 1] if len(sub_graph_ssa) > 30: logger.warning( "Subgraph bebetween {} and {} is large (from op#{} to op#{}), it" " might take non-trival time to find all paths between them.".format( versioned_source, versioned_target, start_op, end_op ) ) dag = DiGraph.from_ssa(sub_graph_ssa) paths = dag.get_all_paths(versioned_source, versioned_target) # include two ends ops_in_paths = [[producer_map[blob][0] for blob in path[1:]] for path in paths] return sorted(set().union(*[set(ops) for ops in ops_in_paths])) def identify_reshape_sub_graph(predict_net: caffe2_pb2.NetDef,) -> List[List[int]]: """ Idenfity the reshape sub-graph in a protobuf. The reshape sub-graph is defined as matching the following pattern: (input_blob) -> Op_1 -> ... -> Op_N -> (new_shape) -─┐ └-------------------------------------------> Reshape -> (output_blob) Return: List of sub-graphs, each sub-graph is represented as a list of indices of the relavent ops, [Op_1, Op_2, ..., Op_N, Reshape] """ ssa, _ = core.get_ssa(predict_net) ret = [] for i, op in enumerate(predict_net.op): if op.type == "Reshape": assert len(op.input) == 2 input_ssa = ssa[i][0] data_source = input_ssa[0] shape_source = input_ssa[1] op_indices = _get_dependency_chain(ssa, shape_source, data_source) ret.append(op_indices + [i]) return ret def remove_reshape_for_fc(predict_net, params): """ In PyTorch nn.Linear has to take 2D tensor, this often leads to reshape a 4D tensor to 2D by calling .view(). However this (dynamic) reshaping doesn't work well with ONNX and Int8 tools, and cause using extra ops (eg. ExpandDims) that might not be available on mobile. Luckily Caffe2 supports 4D tensor for FC, so we can remove those reshape after exporting ONNX model. """ from caffe2.python import core # find all reshape sub-graph that can be removed, which is now all Reshape # sub-graph whose output is only consumed by FC. # TODO: to make it safer, we may need the actually value to better determine # if a Reshape before FC is removable. reshape_sub_graphs = identify_reshape_sub_graph(predict_net) sub_graphs_to_remove = [] for reshape_sub_graph in reshape_sub_graphs: reshape_op_id = reshape_sub_graph[-1] assert predict_net.op[reshape_op_id].type == "Reshape" ssa, _ = core.get_ssa(predict_net) reshape_output = ssa[reshape_op_id][1][0] consumers = [i for i in range(len(ssa)) if reshape_output in ssa[i][0]] if all(predict_net.op[consumer].type == "FC" for consumer in consumers): # safety check if the sub-graph is isolated, for this reshape sub-graph, # it means it has one non-param external input and one external output. ext_inputs, ext_outputs = get_sub_graph_external_input_output( predict_net, reshape_sub_graph ) non_params_ext_inputs = [inp for inp in ext_inputs if inp[1] != 0] if len(non_params_ext_inputs) == 1 and len(ext_outputs) == 1: sub_graphs_to_remove.append(reshape_sub_graph) # perform removing subgraph by: # 1: rename the Reshape's output to its input, then the graph can be # seen as in-place itentify, meaning whose external input/output are the same. # 2: simply remove those ops. remove_op_ids = [] params_to_remove = [] for sub_graph in sub_graphs_to_remove: logger.info( "Remove Reshape sub-graph:\n{}".format( "".join(["(#{:>4})\n{}".format(i, predict_net.op[i]) for i in sub_graph]) ) ) reshape_op_id = sub_graph[-1] new_reshap_output = predict_net.op[reshape_op_id].input[0] rename_op_output(predict_net, reshape_op_id, 0, new_reshap_output) ext_inputs, ext_outputs = get_sub_graph_external_input_output(predict_net, sub_graph) non_params_ext_inputs = [inp for inp in ext_inputs if inp[1] != 0] params_ext_inputs = [inp for inp in ext_inputs if inp[1] == 0] assert len(non_params_ext_inputs) == 1 and len(ext_outputs) == 1 assert ext_outputs[0][0] == non_params_ext_inputs[0][0] assert ext_outputs[0][1] == non_params_ext_inputs[0][1] + 1 remove_op_ids.extend(sub_graph) params_to_remove.extend(params_ext_inputs) predict_net = copy.deepcopy(predict_net) new_ops = [op for i, op in enumerate(predict_net.op) if i not in remove_op_ids] del predict_net.op[:] predict_net.op.extend(new_ops) for versioned_params in params_to_remove: name = versioned_params[0] logger.info("Remove params: {} from init_net and predict_net.external_input".format(name)) del params[name] predict_net.external_input.remove(name) return predict_net, params def fuse_copy_between_cpu_and_gpu(predict_net: caffe2_pb2.NetDef): """ In-place fuse extra copy ops between cpu/gpu for the following case: a -CopyAToB-> b -CopyBToA> c1 -NextOp1-> d1 -CopyBToA> c2 -NextOp2-> d2 The fused network will look like: a -NextOp1-> d1 -NextOp2-> d2 """ _COPY_OPS = ["CopyCPUToGPU", "CopyGPUToCPU"] def _fuse_once(predict_net): ssa, blob_versions = core.get_ssa(predict_net) consumer_map = get_consumer_map(ssa) versioned_external_output = [ (name, blob_versions[name]) for name in predict_net.external_output ] for op_id, op in enumerate(predict_net.op): if op.type in _COPY_OPS: fw_copy_versioned_output = ssa[op_id][1][0] consumer_ids = [x[0] for x in consumer_map[fw_copy_versioned_output]] reverse_op_type = _COPY_OPS[1 - _COPY_OPS.index(op.type)] is_fusable = ( len(consumer_ids) > 0 and fw_copy_versioned_output not in versioned_external_output and all( predict_net.op[_op_id].type == reverse_op_type and ssa[_op_id][1][0] not in versioned_external_output for _op_id in consumer_ids ) ) if is_fusable: for rv_copy_op_id in consumer_ids: # making each NextOp uses "a" directly and removing Copy ops rs_copy_versioned_output = ssa[rv_copy_op_id][1][0] next_op_id, inp_id = consumer_map[rs_copy_versioned_output][0] predict_net.op[next_op_id].input[inp_id] = op.input[0] # remove CopyOps new_ops = [ op for i, op in enumerate(predict_net.op) if i != op_id and i not in consumer_ids ] del predict_net.op[:] predict_net.op.extend(new_ops) return True return False # _fuse_once returns False is nothing can be fused while _fuse_once(predict_net): pass def remove_dead_end_ops(net_def: caffe2_pb2.NetDef): """ remove ops if its output is not used or not in external_output """ ssa, versions = core.get_ssa(net_def) versioned_external_output = [(name, versions[name]) for name in net_def.external_output] consumer_map = get_consumer_map(ssa) removed_op_ids = set() def _is_dead_end(versioned_blob): return not ( versioned_blob in versioned_external_output or ( len(consumer_map[versioned_blob]) > 0 and all(x[0] not in removed_op_ids for x in consumer_map[versioned_blob]) ) ) for i, ssa_i in reversed(list(enumerate(ssa))): versioned_outputs = ssa_i[1] if all(_is_dead_end(outp) for outp in versioned_outputs): removed_op_ids.add(i) # simply removing those deadend ops should have no effect to external_output new_ops = [op for i, op in enumerate(net_def.op) if i not in removed_op_ids] del net_def.op[:] net_def.op.extend(new_ops) ================================================ FILE: detectron2/layers/__init__.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. from .batch_norm import FrozenBatchNorm2d, get_norm, NaiveSyncBatchNorm, CycleBatchNormList from .deform_conv import DeformConv, ModulatedDeformConv from .mask_ops import paste_masks_in_image from .nms import batched_nms, batched_nms_rotated, nms, nms_rotated from .roi_align import ROIAlign, roi_align from .roi_align_rotated import ROIAlignRotated, roi_align_rotated from .shape_spec import ShapeSpec from .wrappers import ( BatchNorm2d, Conv2d, ConvTranspose2d, cat, interpolate, Linear, nonzero_tuple, cross_entropy, empty_input_loss_func_wrapper, shapes_to_tensor, move_device_like, ) from .blocks import CNNBlockBase, DepthwiseSeparableConv2d from .aspp import ASPP from .losses import ciou_loss, diou_loss __all__ = [k for k in globals().keys() if not k.startswith("_")] ================================================ FILE: detectron2/layers/aspp.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. from copy import deepcopy import fvcore.nn.weight_init as weight_init import torch from torch import nn from torch.nn import functional as F from .batch_norm import get_norm from .blocks import DepthwiseSeparableConv2d from .wrappers import Conv2d class ASPP(nn.Module): """ Atrous Spatial Pyramid Pooling (ASPP). """ def __init__( self, in_channels, out_channels, dilations, *, norm, activation, pool_kernel_size=None, dropout: float = 0.0, use_depthwise_separable_conv=False, ): """ Args: in_channels (int): number of input channels for ASPP. out_channels (int): number of output channels. dilations (list): a list of 3 dilations in ASPP. norm (str or callable): normalization for all conv layers. See :func:`layers.get_norm` for supported format. norm is applied to all conv layers except the conv following global average pooling. activation (callable): activation function. pool_kernel_size (tuple, list): the average pooling size (kh, kw) for image pooling layer in ASPP. If set to None, it always performs global average pooling. If not None, it must be divisible by the shape of inputs in forward(). It is recommended to use a fixed input feature size in training, and set this option to match this size, so that it performs global average pooling in training, and the size of the pooling window stays consistent in inference. dropout (float): apply dropout on the output of ASPP. It is used in the official DeepLab implementation with a rate of 0.1: https://github.com/tensorflow/models/blob/21b73d22f3ed05b650e85ac50849408dd36de32e/research/deeplab/model.py#L532 # noqa use_depthwise_separable_conv (bool): use DepthwiseSeparableConv2d for 3x3 convs in ASPP, proposed in :paper:`DeepLabV3+`. """ super(ASPP, self).__init__() assert len(dilations) == 3, "ASPP expects 3 dilations, got {}".format(len(dilations)) self.pool_kernel_size = pool_kernel_size self.dropout = dropout use_bias = norm == "" self.convs = nn.ModuleList() # conv 1x1 self.convs.append( Conv2d( in_channels, out_channels, kernel_size=1, bias=use_bias, norm=get_norm(norm, out_channels), activation=deepcopy(activation), ) ) weight_init.c2_xavier_fill(self.convs[-1]) # atrous convs for dilation in dilations: if use_depthwise_separable_conv: self.convs.append( DepthwiseSeparableConv2d( in_channels, out_channels, kernel_size=3, padding=dilation, dilation=dilation, norm1=norm, activation1=deepcopy(activation), norm2=norm, activation2=deepcopy(activation), ) ) else: self.convs.append( Conv2d( in_channels, out_channels, kernel_size=3, padding=dilation, dilation=dilation, bias=use_bias, norm=get_norm(norm, out_channels), activation=deepcopy(activation), ) ) weight_init.c2_xavier_fill(self.convs[-1]) # image pooling # We do not add BatchNorm because the spatial resolution is 1x1, # the original TF implementation has BatchNorm. if pool_kernel_size is None: image_pooling = nn.Sequential( nn.AdaptiveAvgPool2d(1), Conv2d(in_channels, out_channels, 1, bias=True, activation=deepcopy(activation)), ) else: image_pooling = nn.Sequential( nn.AvgPool2d(kernel_size=pool_kernel_size, stride=1), Conv2d(in_channels, out_channels, 1, bias=True, activation=deepcopy(activation)), ) weight_init.c2_xavier_fill(image_pooling[1]) self.convs.append(image_pooling) self.project = Conv2d( 5 * out_channels, out_channels, kernel_size=1, bias=use_bias, norm=get_norm(norm, out_channels), activation=deepcopy(activation), ) weight_init.c2_xavier_fill(self.project) def forward(self, x): size = x.shape[-2:] if self.pool_kernel_size is not None: if size[0] % self.pool_kernel_size[0] or size[1] % self.pool_kernel_size[1]: raise ValueError( "`pool_kernel_size` must be divisible by the shape of inputs. " "Input size: {} `pool_kernel_size`: {}".format(size, self.pool_kernel_size) ) res = [] for conv in self.convs: res.append(conv(x)) res[-1] = F.interpolate(res[-1], size=size, mode="bilinear", align_corners=False) res = torch.cat(res, dim=1) res = self.project(res) res = F.dropout(res, self.dropout, training=self.training) if self.dropout > 0 else res return res ================================================ FILE: detectron2/layers/batch_norm.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. import torch import torch.distributed as dist from fvcore.nn.distributed import differentiable_all_reduce from torch import nn from torch.nn import functional as F from detectron2.utils import comm, env from .wrappers import BatchNorm2d class FrozenBatchNorm2d(nn.Module): """ BatchNorm2d where the batch statistics and the affine parameters are fixed. It contains non-trainable buffers called "weight" and "bias", "running_mean", "running_var", initialized to perform identity transformation. The pre-trained backbone models from Caffe2 only contain "weight" and "bias", which are computed from the original four parameters of BN. The affine transform `x * weight + bias` will perform the equivalent computation of `(x - running_mean) / sqrt(running_var) * weight + bias`. When loading a backbone model from Caffe2, "running_mean" and "running_var" will be left unchanged as identity transformation. Other pre-trained backbone models may contain all 4 parameters. The forward is implemented by `F.batch_norm(..., training=False)`. """ _version = 3 def __init__(self, num_features, eps=1e-5): super().__init__() self.num_features = num_features self.eps = eps self.register_buffer("weight", torch.ones(num_features)) self.register_buffer("bias", torch.zeros(num_features)) self.register_buffer("running_mean", torch.zeros(num_features)) self.register_buffer("running_var", torch.ones(num_features) - eps) def forward(self, x): if x.requires_grad: # When gradients are needed, F.batch_norm will use extra memory # because its backward op computes gradients for weight/bias as well. scale = self.weight * (self.running_var + self.eps).rsqrt() bias = self.bias - self.running_mean * scale scale = scale.reshape(1, -1, 1, 1) bias = bias.reshape(1, -1, 1, 1) out_dtype = x.dtype # may be half return x * scale.to(out_dtype) + bias.to(out_dtype) else: # When gradients are not needed, F.batch_norm is a single fused op # and provide more optimization opportunities. return F.batch_norm( x, self.running_mean, self.running_var, self.weight, self.bias, training=False, eps=self.eps, ) def _load_from_state_dict( self, state_dict, prefix, local_metadata, strict, missing_keys, unexpected_keys, error_msgs ): version = local_metadata.get("version", None) if version is None or version < 2: # No running_mean/var in early versions # This will silent the warnings if prefix + "running_mean" not in state_dict: state_dict[prefix + "running_mean"] = torch.zeros_like(self.running_mean) if prefix + "running_var" not in state_dict: state_dict[prefix + "running_var"] = torch.ones_like(self.running_var) super()._load_from_state_dict( state_dict, prefix, local_metadata, strict, missing_keys, unexpected_keys, error_msgs ) def __repr__(self): return "FrozenBatchNorm2d(num_features={}, eps={})".format(self.num_features, self.eps) @classmethod def convert_frozen_batchnorm(cls, module): """ Convert all BatchNorm/SyncBatchNorm in module into FrozenBatchNorm. Args: module (torch.nn.Module): Returns: If module is BatchNorm/SyncBatchNorm, returns a new module. Otherwise, in-place convert module and return it. Similar to convert_sync_batchnorm in https://github.com/pytorch/pytorch/blob/master/torch/nn/modules/batchnorm.py """ bn_module = nn.modules.batchnorm bn_module = (bn_module.BatchNorm2d, bn_module.SyncBatchNorm) res = module if isinstance(module, bn_module): res = cls(module.num_features) if module.affine: res.weight.data = module.weight.data.clone().detach() res.bias.data = module.bias.data.clone().detach() res.running_mean.data = module.running_mean.data res.running_var.data = module.running_var.data res.eps = module.eps else: for name, child in module.named_children(): new_child = cls.convert_frozen_batchnorm(child) if new_child is not child: res.add_module(name, new_child) return res def get_norm(norm, out_channels): """ Args: norm (str or callable): either one of BN, SyncBN, FrozenBN, GN; or a callable that takes a channel number and returns the normalization layer as a nn.Module. Returns: nn.Module or None: the normalization layer """ if norm is None: return None if isinstance(norm, str): if len(norm) == 0: return None norm = { "BN": BatchNorm2d, # Fixed in https://github.com/pytorch/pytorch/pull/36382 "SyncBN": NaiveSyncBatchNorm if env.TORCH_VERSION <= (1, 5) else nn.SyncBatchNorm, "FrozenBN": FrozenBatchNorm2d, "GN": lambda channels: nn.GroupNorm(32, channels), # for debugging: "nnSyncBN": nn.SyncBatchNorm, "naiveSyncBN": NaiveSyncBatchNorm, # expose stats_mode N as an option to caller, required for zero-len inputs "naiveSyncBN_N": lambda channels: NaiveSyncBatchNorm(channels, stats_mode="N"), "LN": lambda channels: LayerNorm(channels), }[norm] return norm(out_channels) class NaiveSyncBatchNorm(BatchNorm2d): """ In PyTorch<=1.5, ``nn.SyncBatchNorm`` has incorrect gradient when the batch size on each worker is different. (e.g., when scale augmentation is used, or when it is applied to mask head). This is a slower but correct alternative to `nn.SyncBatchNorm`. Note: There isn't a single definition of Sync BatchNorm. When ``stats_mode==""``, this module computes overall statistics by using statistics of each worker with equal weight. The result is true statistics of all samples (as if they are all on one worker) only when all workers have the same (N, H, W). This mode does not support inputs with zero batch size. When ``stats_mode=="N"``, this module computes overall statistics by weighting the statistics of each worker by their ``N``. The result is true statistics of all samples (as if they are all on one worker) only when all workers have the same (H, W). It is slower than ``stats_mode==""``. Even though the result of this module may not be the true statistics of all samples, it may still be reasonable because it might be preferrable to assign equal weights to all workers, regardless of their (H, W) dimension, instead of putting larger weight on larger images. From preliminary experiments, little difference is found between such a simplified implementation and an accurate computation of overall mean & variance. """ def __init__(self, *args, stats_mode="", **kwargs): super().__init__(*args, **kwargs) assert stats_mode in ["", "N"] self._stats_mode = stats_mode def forward(self, input): if comm.get_world_size() == 1 or not self.training: return super().forward(input) B, C = input.shape[0], input.shape[1] half_input = input.dtype == torch.float16 if half_input: # fp16 does not have good enough numerics for the reduction here input = input.float() mean = torch.mean(input, dim=[0, 2, 3]) meansqr = torch.mean(input * input, dim=[0, 2, 3]) if self._stats_mode == "": assert B > 0, 'SyncBatchNorm(stats_mode="") does not support zero batch size.' vec = torch.cat([mean, meansqr], dim=0) vec = differentiable_all_reduce(vec) * (1.0 / dist.get_world_size()) mean, meansqr = torch.split(vec, C) momentum = self.momentum else: if B == 0: vec = torch.zeros([2 * C + 1], device=mean.device, dtype=mean.dtype) vec = vec + input.sum() # make sure there is gradient w.r.t input else: vec = torch.cat( [mean, meansqr, torch.ones([1], device=mean.device, dtype=mean.dtype)], dim=0 ) vec = differentiable_all_reduce(vec * B) total_batch = vec[-1].detach() momentum = total_batch.clamp(max=1) * self.momentum # no update if total_batch is 0 mean, meansqr, _ = torch.split(vec / total_batch.clamp(min=1), C) # avoid div-by-zero var = meansqr - mean * mean invstd = torch.rsqrt(var + self.eps) scale = self.weight * invstd bias = self.bias - mean * scale scale = scale.reshape(1, -1, 1, 1) bias = bias.reshape(1, -1, 1, 1) self.running_mean += momentum * (mean.detach() - self.running_mean) self.running_var += momentum * (var.detach() - self.running_var) ret = input * scale + bias if half_input: ret = ret.half() return ret class CycleBatchNormList(nn.ModuleList): """ Implement domain-specific BatchNorm by cycling. When a BatchNorm layer is used for multiple input domains or input features, it might need to maintain a separate test-time statistics for each domain. See Sec 5.2 in :paper:`rethinking-batchnorm`. This module implements it by using N separate BN layers and it cycles through them every time a forward() is called. NOTE: The caller of this module MUST guarantee to always call this module by multiple of N times. Otherwise its test-time statistics will be incorrect. """ def __init__(self, length: int, bn_class=nn.BatchNorm2d, **kwargs): """ Args: length: number of BatchNorm layers to cycle. bn_class: the BatchNorm class to use kwargs: arguments of the BatchNorm class, such as num_features. """ self._affine = kwargs.pop("affine", True) super().__init__([bn_class(**kwargs, affine=False) for k in range(length)]) if self._affine: # shared affine, domain-specific BN channels = self[0].num_features self.weight = nn.Parameter(torch.ones(channels)) self.bias = nn.Parameter(torch.zeros(channels)) self._pos = 0 def forward(self, x): ret = self[self._pos](x) self._pos = (self._pos + 1) % len(self) if self._affine: w = self.weight.reshape(1, -1, 1, 1) b = self.bias.reshape(1, -1, 1, 1) return ret * w + b else: return ret def extra_repr(self): return f"affine={self._affine}" class LayerNorm(nn.Module): """ A LayerNorm variant, popularized by Transformers, that performs point-wise mean and variance normalization over the channel dimension for inputs that have shape (batch_size, channels, height, width). https://github.com/facebookresearch/ConvNeXt/blob/d1fa8f6fef0a165b27399986cc2bdacc92777e40/models/convnext.py#L119 # noqa B950 """ def __init__(self, normalized_shape, eps=1e-6): super().__init__() self.weight = nn.Parameter(torch.ones(normalized_shape)) self.bias = nn.Parameter(torch.zeros(normalized_shape)) self.eps = eps self.normalized_shape = (normalized_shape,) def forward(self, x): u = x.mean(1, keepdim=True) s = (x - u).pow(2).mean(1, keepdim=True) x = (x - u) / torch.sqrt(s + self.eps) x = self.weight[:, None, None] * x + self.bias[:, None, None] return x ================================================ FILE: detectron2/layers/blocks.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. import fvcore.nn.weight_init as weight_init from torch import nn from .batch_norm import FrozenBatchNorm2d, get_norm from .wrappers import Conv2d """ CNN building blocks. """ class CNNBlockBase(nn.Module): """ A CNN block is assumed to have input channels, output channels and a stride. The input and output of `forward()` method must be NCHW tensors. The method can perform arbitrary computation but must match the given channels and stride specification. Attribute: in_channels (int): out_channels (int): stride (int): """ def __init__(self, in_channels, out_channels, stride): """ The `__init__` method of any subclass should also contain these arguments. Args: in_channels (int): out_channels (int): stride (int): """ super().__init__() self.in_channels = in_channels self.out_channels = out_channels self.stride = stride def freeze(self): """ Make this block not trainable. This method sets all parameters to `requires_grad=False`, and convert all BatchNorm layers to FrozenBatchNorm Returns: the block itself """ for p in self.parameters(): p.requires_grad = False FrozenBatchNorm2d.convert_frozen_batchnorm(self) return self class DepthwiseSeparableConv2d(nn.Module): """ A kxk depthwise convolution + a 1x1 convolution. In :paper:`xception`, norm & activation are applied on the second conv. :paper:`mobilenet` uses norm & activation on both convs. """ def __init__( self, in_channels, out_channels, kernel_size=3, padding=1, dilation=1, *, norm1=None, activation1=None, norm2=None, activation2=None, ): """ Args: norm1, norm2 (str or callable): normalization for the two conv layers. activation1, activation2 (callable(Tensor) -> Tensor): activation function for the two conv layers. """ super().__init__() self.depthwise = Conv2d( in_channels, in_channels, kernel_size=kernel_size, padding=padding, dilation=dilation, groups=in_channels, bias=not norm1, norm=get_norm(norm1, in_channels), activation=activation1, ) self.pointwise = Conv2d( in_channels, out_channels, kernel_size=1, bias=not norm2, norm=get_norm(norm2, out_channels), activation=activation2, ) # default initialization weight_init.c2_msra_fill(self.depthwise) weight_init.c2_msra_fill(self.pointwise) def forward(self, x): return self.pointwise(self.depthwise(x)) ================================================ FILE: detectron2/layers/csrc/README.md ================================================ To add a new Op: 1. Create a new directory 2. Implement new ops there 3. Delcare its Python interface in `vision.cpp`. ================================================ FILE: detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated.h ================================================ // Copyright (c) Facebook, Inc. and its affiliates. #pragma once #include namespace detectron2 { at::Tensor ROIAlignRotated_forward_cpu( const at::Tensor& input, const at::Tensor& rois, const float spatial_scale, const int pooled_height, const int pooled_width, const int sampling_ratio); at::Tensor ROIAlignRotated_backward_cpu( const at::Tensor& grad, const at::Tensor& rois, const float spatial_scale, const int pooled_height, const int pooled_width, const int batch_size, const int channels, const int height, const int width, const int sampling_ratio); #if defined(WITH_CUDA) || defined(WITH_HIP) at::Tensor ROIAlignRotated_forward_cuda( const at::Tensor& input, const at::Tensor& rois, const float spatial_scale, const int pooled_height, const int pooled_width, const int sampling_ratio); at::Tensor ROIAlignRotated_backward_cuda( const at::Tensor& grad, const at::Tensor& rois, const float spatial_scale, const int pooled_height, const int pooled_width, const int batch_size, const int channels, const int height, const int width, const int sampling_ratio); #endif // Interface for Python inline at::Tensor ROIAlignRotated_forward( const at::Tensor& input, const at::Tensor& rois, const double spatial_scale, const int64_t pooled_height, const int64_t pooled_width, const int64_t sampling_ratio) { if (input.is_cuda()) { #if defined(WITH_CUDA) || defined(WITH_HIP) return ROIAlignRotated_forward_cuda( input, rois, spatial_scale, pooled_height, pooled_width, sampling_ratio); #else AT_ERROR("Detectron2 is not compiled with GPU support!"); #endif } return ROIAlignRotated_forward_cpu( input, rois, spatial_scale, pooled_height, pooled_width, sampling_ratio); } inline at::Tensor ROIAlignRotated_backward( const at::Tensor& grad, const at::Tensor& rois, const double spatial_scale, const int64_t pooled_height, const int64_t pooled_width, const int64_t batch_size, const int64_t channels, const int64_t height, const int64_t width, const int64_t sampling_ratio) { if (grad.is_cuda()) { #if defined(WITH_CUDA) || defined(WITH_HIP) return ROIAlignRotated_backward_cuda( grad, rois, spatial_scale, pooled_height, pooled_width, batch_size, channels, height, width, sampling_ratio); #else AT_ERROR("Detectron2 is not compiled with GPU support!"); #endif } return ROIAlignRotated_backward_cpu( grad, rois, spatial_scale, pooled_height, pooled_width, batch_size, channels, height, width, sampling_ratio); } } // namespace detectron2 ================================================ FILE: detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cpu.cpp ================================================ // Copyright (c) Facebook, Inc. and its affiliates. #include #include "ROIAlignRotated.h" // Note: this implementation originates from the Caffe2 ROIAlignRotated Op // and PyTorch ROIAlign (non-rotated) Op implementations. // The key difference between this implementation and those ones is // we don't do "legacy offset" in this version, as there aren't many previous // works, if any, using the "legacy" ROIAlignRotated Op. // This would make the interface a bit cleaner. namespace detectron2 { namespace { template struct PreCalc { int pos1; int pos2; int pos3; int pos4; T w1; T w2; T w3; T w4; }; template void pre_calc_for_bilinear_interpolate( const int height, const int width, const int pooled_height, const int pooled_width, const int iy_upper, const int ix_upper, T roi_start_h, T roi_start_w, T bin_size_h, T bin_size_w, int roi_bin_grid_h, int roi_bin_grid_w, T roi_center_h, T roi_center_w, T cos_theta, T sin_theta, std::vector>& pre_calc) { int pre_calc_index = 0; for (int ph = 0; ph < pooled_height; ph++) { for (int pw = 0; pw < pooled_width; pw++) { for (int iy = 0; iy < iy_upper; iy++) { const T yy = roi_start_h + ph * bin_size_h + static_cast(iy + .5f) * bin_size_h / static_cast(roi_bin_grid_h); // e.g., 0.5, 1.5 for (int ix = 0; ix < ix_upper; ix++) { const T xx = roi_start_w + pw * bin_size_w + static_cast(ix + .5f) * bin_size_w / static_cast(roi_bin_grid_w); // Rotate by theta around the center and translate // In image space, (y, x) is the order for Right Handed System, // and this is essentially multiplying the point by a rotation matrix // to rotate it counterclockwise through angle theta. T y = yy * cos_theta - xx * sin_theta + roi_center_h; T x = yy * sin_theta + xx * cos_theta + roi_center_w; // deal with: inverse elements are out of feature map boundary if (y < -1.0 || y > height || x < -1.0 || x > width) { // empty PreCalc pc; pc.pos1 = 0; pc.pos2 = 0; pc.pos3 = 0; pc.pos4 = 0; pc.w1 = 0; pc.w2 = 0; pc.w3 = 0; pc.w4 = 0; pre_calc[pre_calc_index] = pc; pre_calc_index += 1; continue; } if (y < 0) { y = 0; } if (x < 0) { x = 0; } int y_low = (int)y; int x_low = (int)x; int y_high; int x_high; if (y_low >= height - 1) { y_high = y_low = height - 1; y = (T)y_low; } else { y_high = y_low + 1; } if (x_low >= width - 1) { x_high = x_low = width - 1; x = (T)x_low; } else { x_high = x_low + 1; } T ly = y - y_low; T lx = x - x_low; T hy = 1. - ly, hx = 1. - lx; T w1 = hy * hx, w2 = hy * lx, w3 = ly * hx, w4 = ly * lx; // save weights and indices PreCalc pc; pc.pos1 = y_low * width + x_low; pc.pos2 = y_low * width + x_high; pc.pos3 = y_high * width + x_low; pc.pos4 = y_high * width + x_high; pc.w1 = w1; pc.w2 = w2; pc.w3 = w3; pc.w4 = w4; pre_calc[pre_calc_index] = pc; pre_calc_index += 1; } } } } } template void bilinear_interpolate_gradient( const int height, const int width, T y, T x, T& w1, T& w2, T& w3, T& w4, int& x_low, int& x_high, int& y_low, int& y_high) { // deal with cases that inverse elements are out of feature map boundary if (y < -1.0 || y > height || x < -1.0 || x > width) { // empty w1 = w2 = w3 = w4 = 0.; x_low = x_high = y_low = y_high = -1; return; } if (y < 0) { y = 0; } if (x < 0) { x = 0; } y_low = (int)y; x_low = (int)x; if (y_low >= height - 1) { y_high = y_low = height - 1; y = (T)y_low; } else { y_high = y_low + 1; } if (x_low >= width - 1) { x_high = x_low = width - 1; x = (T)x_low; } else { x_high = x_low + 1; } T ly = y - y_low; T lx = x - x_low; T hy = 1. - ly, hx = 1. - lx; // reference in forward // T v1 = input[y_low * width + x_low]; // T v2 = input[y_low * width + x_high]; // T v3 = input[y_high * width + x_low]; // T v4 = input[y_high * width + x_high]; // T val = (w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4); w1 = hy * hx, w2 = hy * lx, w3 = ly * hx, w4 = ly * lx; return; } template inline void add(T* address, const T& val) { *address += val; } } // namespace template void ROIAlignRotatedForward( const int nthreads, const T* input, const T& spatial_scale, const int channels, const int height, const int width, const int pooled_height, const int pooled_width, const int sampling_ratio, const T* rois, T* output) { int n_rois = nthreads / channels / pooled_width / pooled_height; // (n, c, ph, pw) is an element in the pooled output // can be parallelized using omp // #pragma omp parallel for num_threads(32) for (int n = 0; n < n_rois; n++) { int index_n = n * channels * pooled_width * pooled_height; const T* current_roi = rois + n * 6; int roi_batch_ind = current_roi[0]; // Do not use rounding; this implementation detail is critical // ROIAlignRotated supports align == true, i.e., continuous coordinate // by default, thus the 0.5 offset T offset = (T)0.5; T roi_center_w = current_roi[1] * spatial_scale - offset; T roi_center_h = current_roi[2] * spatial_scale - offset; T roi_width = current_roi[3] * spatial_scale; T roi_height = current_roi[4] * spatial_scale; T theta = current_roi[5] * M_PI / 180.0; T cos_theta = cos(theta); T sin_theta = sin(theta); AT_ASSERTM( roi_width >= 0 && roi_height >= 0, "ROIs in ROIAlignRotated do not have non-negative size!"); T bin_size_h = static_cast(roi_height) / static_cast(pooled_height); T bin_size_w = static_cast(roi_width) / static_cast(pooled_width); // We use roi_bin_grid to sample the grid and mimic integral int roi_bin_grid_h = (sampling_ratio > 0) ? sampling_ratio : ceil(roi_height / pooled_height); // e.g., = 2 int roi_bin_grid_w = (sampling_ratio > 0) ? sampling_ratio : ceil(roi_width / pooled_width); // We do average (integral) pooling inside a bin const T count = std::max(roi_bin_grid_h * roi_bin_grid_w, 1); // e.g. = 4 // we want to precalculate indices and weights shared by all channels, // this is the key point of optimization std::vector> pre_calc( roi_bin_grid_h * roi_bin_grid_w * pooled_width * pooled_height); // roi_start_h and roi_start_w are computed wrt the center of RoI (x, y). // Appropriate translation needs to be applied after. T roi_start_h = -roi_height / 2.0; T roi_start_w = -roi_width / 2.0; pre_calc_for_bilinear_interpolate( height, width, pooled_height, pooled_width, roi_bin_grid_h, roi_bin_grid_w, roi_start_h, roi_start_w, bin_size_h, bin_size_w, roi_bin_grid_h, roi_bin_grid_w, roi_center_h, roi_center_w, cos_theta, sin_theta, pre_calc); for (int c = 0; c < channels; c++) { int index_n_c = index_n + c * pooled_width * pooled_height; const T* offset_input = input + (roi_batch_ind * channels + c) * height * width; int pre_calc_index = 0; for (int ph = 0; ph < pooled_height; ph++) { for (int pw = 0; pw < pooled_width; pw++) { int index = index_n_c + ph * pooled_width + pw; T output_val = 0.; for (int iy = 0; iy < roi_bin_grid_h; iy++) { for (int ix = 0; ix < roi_bin_grid_w; ix++) { PreCalc pc = pre_calc[pre_calc_index]; output_val += pc.w1 * offset_input[pc.pos1] + pc.w2 * offset_input[pc.pos2] + pc.w3 * offset_input[pc.pos3] + pc.w4 * offset_input[pc.pos4]; pre_calc_index += 1; } } output_val /= count; output[index] = output_val; } // for pw } // for ph } // for c } // for n } template void ROIAlignRotatedBackward( const int nthreads, // may not be contiguous. should index using n_stride, etc const T* grad_output, const T& spatial_scale, const int channels, const int height, const int width, const int pooled_height, const int pooled_width, const int sampling_ratio, T* grad_input, const T* rois, const int n_stride, const int c_stride, const int h_stride, const int w_stride) { for (int index = 0; index < nthreads; index++) { // (n, c, ph, pw) is an element in the pooled output int pw = index % pooled_width; int ph = (index / pooled_width) % pooled_height; int c = (index / pooled_width / pooled_height) % channels; int n = index / pooled_width / pooled_height / channels; const T* current_roi = rois + n * 6; int roi_batch_ind = current_roi[0]; // Do not use rounding; this implementation detail is critical // ROIAlignRotated supports align == true, i.e., continuous coordinate // by default, thus the 0.5 offset T offset = (T)0.5; T roi_center_w = current_roi[1] * spatial_scale - offset; T roi_center_h = current_roi[2] * spatial_scale - offset; T roi_width = current_roi[3] * spatial_scale; T roi_height = current_roi[4] * spatial_scale; T theta = current_roi[5] * M_PI / 180.0; T cos_theta = cos(theta); T sin_theta = sin(theta); AT_ASSERTM( roi_width >= 0 && roi_height >= 0, "ROIs in ROIAlignRotated do not have non-negative size!"); T bin_size_h = static_cast(roi_height) / static_cast(pooled_height); T bin_size_w = static_cast(roi_width) / static_cast(pooled_width); T* offset_grad_input = grad_input + ((roi_batch_ind * channels + c) * height * width); int output_offset = n * n_stride + c * c_stride; const T* offset_grad_output = grad_output + output_offset; const T grad_output_this_bin = offset_grad_output[ph * h_stride + pw * w_stride]; // We use roi_bin_grid to sample the grid and mimic integral int roi_bin_grid_h = (sampling_ratio > 0) ? sampling_ratio : ceil(roi_height / pooled_height); // e.g., = 2 int roi_bin_grid_w = (sampling_ratio > 0) ? sampling_ratio : ceil(roi_width / pooled_width); // roi_start_h and roi_start_w are computed wrt the center of RoI (x, y). // Appropriate translation needs to be applied after. T roi_start_h = -roi_height / 2.0; T roi_start_w = -roi_width / 2.0; // We do average (integral) pooling inside a bin const T count = roi_bin_grid_h * roi_bin_grid_w; // e.g. = 4 for (int iy = 0; iy < roi_bin_grid_h; iy++) { const T yy = roi_start_h + ph * bin_size_h + static_cast(iy + .5f) * bin_size_h / static_cast(roi_bin_grid_h); // e.g., 0.5, 1.5 for (int ix = 0; ix < roi_bin_grid_w; ix++) { const T xx = roi_start_w + pw * bin_size_w + static_cast(ix + .5f) * bin_size_w / static_cast(roi_bin_grid_w); // Rotate by theta around the center and translate T y = yy * cos_theta - xx * sin_theta + roi_center_h; T x = yy * sin_theta + xx * cos_theta + roi_center_w; T w1, w2, w3, w4; int x_low, x_high, y_low, y_high; bilinear_interpolate_gradient( height, width, y, x, w1, w2, w3, w4, x_low, x_high, y_low, y_high); T g1 = grad_output_this_bin * w1 / count; T g2 = grad_output_this_bin * w2 / count; T g3 = grad_output_this_bin * w3 / count; T g4 = grad_output_this_bin * w4 / count; if (x_low >= 0 && x_high >= 0 && y_low >= 0 && y_high >= 0) { // atomic add is not needed for now since it is single threaded add(offset_grad_input + y_low * width + x_low, static_cast(g1)); add(offset_grad_input + y_low * width + x_high, static_cast(g2)); add(offset_grad_input + y_high * width + x_low, static_cast(g3)); add(offset_grad_input + y_high * width + x_high, static_cast(g4)); } // if } // ix } // iy } // for } // ROIAlignRotatedBackward at::Tensor ROIAlignRotated_forward_cpu( const at::Tensor& input, const at::Tensor& rois, const float spatial_scale, const int pooled_height, const int pooled_width, const int sampling_ratio) { AT_ASSERTM(input.device().is_cpu(), "input must be a CPU tensor"); AT_ASSERTM(rois.device().is_cpu(), "rois must be a CPU tensor"); at::TensorArg input_t{input, "input", 1}, rois_t{rois, "rois", 2}; at::CheckedFrom c = "ROIAlign_forward_cpu"; at::checkAllSameType(c, {input_t, rois_t}); auto num_rois = rois.size(0); auto channels = input.size(1); auto height = input.size(2); auto width = input.size(3); at::Tensor output = at::zeros( {num_rois, channels, pooled_height, pooled_width}, input.options()); auto output_size = num_rois * pooled_height * pooled_width * channels; if (output.numel() == 0) { return output; } auto input_ = input.contiguous(), rois_ = rois.contiguous(); AT_DISPATCH_FLOATING_TYPES_AND_HALF( input.scalar_type(), "ROIAlignRotated_forward", [&] { ROIAlignRotatedForward( output_size, input_.data_ptr(), spatial_scale, channels, height, width, pooled_height, pooled_width, sampling_ratio, rois_.data_ptr(), output.data_ptr()); }); return output; } at::Tensor ROIAlignRotated_backward_cpu( const at::Tensor& grad, const at::Tensor& rois, const float spatial_scale, const int pooled_height, const int pooled_width, const int batch_size, const int channels, const int height, const int width, const int sampling_ratio) { AT_ASSERTM(grad.device().is_cpu(), "grad must be a CPU tensor"); AT_ASSERTM(rois.device().is_cpu(), "rois must be a CPU tensor"); at::TensorArg grad_t{grad, "grad", 1}, rois_t{rois, "rois", 2}; at::CheckedFrom c = "ROIAlignRotated_backward_cpu"; at::checkAllSameType(c, {grad_t, rois_t}); at::Tensor grad_input = at::zeros({batch_size, channels, height, width}, grad.options()); // handle possibly empty gradients if (grad.numel() == 0) { return grad_input; } // get stride values to ensure indexing into gradients is correct. int n_stride = grad.stride(0); int c_stride = grad.stride(1); int h_stride = grad.stride(2); int w_stride = grad.stride(3); auto rois_ = rois.contiguous(); AT_DISPATCH_FLOATING_TYPES_AND_HALF( grad.scalar_type(), "ROIAlignRotated_forward", [&] { ROIAlignRotatedBackward( grad.numel(), grad.data_ptr(), spatial_scale, channels, height, width, pooled_height, pooled_width, sampling_ratio, grad_input.data_ptr(), rois_.data_ptr(), n_stride, c_stride, h_stride, w_stride); }); return grad_input; } } // namespace detectron2 ================================================ FILE: detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.cu ================================================ // Copyright (c) Facebook, Inc. and its affiliates. #include #include #include #include // TODO make it in a common file #define CUDA_1D_KERNEL_LOOP(i, n) \ for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < n; \ i += blockDim.x * gridDim.x) // Note: this implementation originates from the Caffe2 ROIAlignRotated Op // and PyTorch ROIAlign (non-rotated) Op implementations. // The key difference between this implementation and those ones is // we don't do "legacy offset" in this version, as there aren't many previous // works, if any, using the "legacy" ROIAlignRotated Op. // This would make the interface a bit cleaner. namespace detectron2 { namespace { template __device__ T bilinear_interpolate( const T* input, const int height, const int width, T y, T x) { // deal with cases that inverse elements are out of feature map boundary if (y < -1.0 || y > height || x < -1.0 || x > width) { // empty return 0; } if (y < 0) { y = 0; } if (x < 0) { x = 0; } int y_low = (int)y; int x_low = (int)x; int y_high; int x_high; if (y_low >= height - 1) { y_high = y_low = height - 1; y = (T)y_low; } else { y_high = y_low + 1; } if (x_low >= width - 1) { x_high = x_low = width - 1; x = (T)x_low; } else { x_high = x_low + 1; } T ly = y - y_low; T lx = x - x_low; T hy = 1. - ly, hx = 1. - lx; // do bilinear interpolation T v1 = input[y_low * width + x_low]; T v2 = input[y_low * width + x_high]; T v3 = input[y_high * width + x_low]; T v4 = input[y_high * width + x_high]; T w1 = hy * hx, w2 = hy * lx, w3 = ly * hx, w4 = ly * lx; T val = (w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4); return val; } template __device__ void bilinear_interpolate_gradient( const int height, const int width, T y, T x, T& w1, T& w2, T& w3, T& w4, int& x_low, int& x_high, int& y_low, int& y_high) { // deal with cases that inverse elements are out of feature map boundary if (y < -1.0 || y > height || x < -1.0 || x > width) { // empty w1 = w2 = w3 = w4 = 0.; x_low = x_high = y_low = y_high = -1; return; } if (y < 0) { y = 0; } if (x < 0) { x = 0; } y_low = (int)y; x_low = (int)x; if (y_low >= height - 1) { y_high = y_low = height - 1; y = (T)y_low; } else { y_high = y_low + 1; } if (x_low >= width - 1) { x_high = x_low = width - 1; x = (T)x_low; } else { x_high = x_low + 1; } T ly = y - y_low; T lx = x - x_low; T hy = 1. - ly, hx = 1. - lx; // reference in forward // T v1 = input[y_low * width + x_low]; // T v2 = input[y_low * width + x_high]; // T v3 = input[y_high * width + x_low]; // T v4 = input[y_high * width + x_high]; // T val = (w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4); w1 = hy * hx, w2 = hy * lx, w3 = ly * hx, w4 = ly * lx; return; } } // namespace template __global__ void RoIAlignRotatedForward( const int nthreads, const T* input, const T spatial_scale, const int channels, const int height, const int width, const int pooled_height, const int pooled_width, const int sampling_ratio, const T* rois, T* top_data) { CUDA_1D_KERNEL_LOOP(index, nthreads) { // (n, c, ph, pw) is an element in the pooled output int pw = index % pooled_width; int ph = (index / pooled_width) % pooled_height; int c = (index / pooled_width / pooled_height) % channels; int n = index / pooled_width / pooled_height / channels; const T* current_roi = rois + n * 6; int roi_batch_ind = current_roi[0]; // Do not use rounding; this implementation detail is critical // ROIAlignRotated supports align == true, i.e., continuous coordinate // by default, thus the 0.5 offset T offset = (T)0.5; T roi_center_w = current_roi[1] * spatial_scale - offset; T roi_center_h = current_roi[2] * spatial_scale - offset; T roi_width = current_roi[3] * spatial_scale; T roi_height = current_roi[4] * spatial_scale; T theta = current_roi[5] * M_PI / 180.0; T cos_theta = cos(theta); T sin_theta = sin(theta); T bin_size_h = static_cast(roi_height) / static_cast(pooled_height); T bin_size_w = static_cast(roi_width) / static_cast(pooled_width); const T* offset_input = input + (roi_batch_ind * channels + c) * height * width; // We use roi_bin_grid to sample the grid and mimic integral int roi_bin_grid_h = (sampling_ratio > 0) ? sampling_ratio : ceil(roi_height / pooled_height); // e.g., = 2 int roi_bin_grid_w = (sampling_ratio > 0) ? sampling_ratio : ceil(roi_width / pooled_width); // roi_start_h and roi_start_w are computed wrt the center of RoI (x, y). // Appropriate translation needs to be applied after. T roi_start_h = -roi_height / 2.0; T roi_start_w = -roi_width / 2.0; // We do average (inte gral) pooling inside a bin const T count = max(roi_bin_grid_h * roi_bin_grid_w, 1); // e.g. = 4 T output_val = 0.; for (int iy = 0; iy < roi_bin_grid_h; iy++) // e.g., iy = 0, 1 { const T yy = roi_start_h + ph * bin_size_h + static_cast(iy + .5f) * bin_size_h / static_cast(roi_bin_grid_h); // e.g., 0.5, 1.5 for (int ix = 0; ix < roi_bin_grid_w; ix++) { const T xx = roi_start_w + pw * bin_size_w + static_cast(ix + .5f) * bin_size_w / static_cast(roi_bin_grid_w); // Rotate by theta around the center and translate T y = yy * cos_theta - xx * sin_theta + roi_center_h; T x = yy * sin_theta + xx * cos_theta + roi_center_w; T val = bilinear_interpolate(offset_input, height, width, y, x); output_val += val; } } output_val /= count; top_data[index] = output_val; } } template __global__ void RoIAlignRotatedBackwardFeature( const int nthreads, const T* top_diff, const int num_rois, const T spatial_scale, const int channels, const int height, const int width, const int pooled_height, const int pooled_width, const int sampling_ratio, T* bottom_diff, const T* rois) { CUDA_1D_KERNEL_LOOP(index, nthreads) { // (n, c, ph, pw) is an element in the pooled output int pw = index % pooled_width; int ph = (index / pooled_width) % pooled_height; int c = (index / pooled_width / pooled_height) % channels; int n = index / pooled_width / pooled_height / channels; const T* current_roi = rois + n * 6; int roi_batch_ind = current_roi[0]; // Do not use rounding; this implementation detail is critical // ROIAlignRotated supports align == true, i.e., continuous coordinate // by default, thus the 0.5 offset T offset = (T)0.5; T roi_center_w = current_roi[1] * spatial_scale - offset; T roi_center_h = current_roi[2] * spatial_scale - offset; T roi_width = current_roi[3] * spatial_scale; T roi_height = current_roi[4] * spatial_scale; T theta = current_roi[5] * M_PI / 180.0; T cos_theta = cos(theta); T sin_theta = sin(theta); T bin_size_h = static_cast(roi_height) / static_cast(pooled_height); T bin_size_w = static_cast(roi_width) / static_cast(pooled_width); T* offset_bottom_diff = bottom_diff + (roi_batch_ind * channels + c) * height * width; int top_offset = (n * channels + c) * pooled_height * pooled_width; const T* offset_top_diff = top_diff + top_offset; const T top_diff_this_bin = offset_top_diff[ph * pooled_width + pw]; // We use roi_bin_grid to sample the grid and mimic integral int roi_bin_grid_h = (sampling_ratio > 0) ? sampling_ratio : ceil(roi_height / pooled_height); // e.g., = 2 int roi_bin_grid_w = (sampling_ratio > 0) ? sampling_ratio : ceil(roi_width / pooled_width); // roi_start_h and roi_start_w are computed wrt the center of RoI (x, y). // Appropriate translation needs to be applied after. T roi_start_h = -roi_height / 2.0; T roi_start_w = -roi_width / 2.0; // We do average (integral) pooling inside a bin const T count = roi_bin_grid_h * roi_bin_grid_w; // e.g. = 4 for (int iy = 0; iy < roi_bin_grid_h; iy++) // e.g., iy = 0, 1 { const T yy = roi_start_h + ph * bin_size_h + static_cast(iy + .5f) * bin_size_h / static_cast(roi_bin_grid_h); // e.g., 0.5, 1.5 for (int ix = 0; ix < roi_bin_grid_w; ix++) { const T xx = roi_start_w + pw * bin_size_w + static_cast(ix + .5f) * bin_size_w / static_cast(roi_bin_grid_w); // Rotate by theta around the center and translate T y = yy * cos_theta - xx * sin_theta + roi_center_h; T x = yy * sin_theta + xx * cos_theta + roi_center_w; T w1, w2, w3, w4; int x_low, x_high, y_low, y_high; bilinear_interpolate_gradient( height, width, y, x, w1, w2, w3, w4, x_low, x_high, y_low, y_high); T g1 = top_diff_this_bin * w1 / count; T g2 = top_diff_this_bin * w2 / count; T g3 = top_diff_this_bin * w3 / count; T g4 = top_diff_this_bin * w4 / count; if (x_low >= 0 && x_high >= 0 && y_low >= 0 && y_high >= 0) { atomicAdd( offset_bottom_diff + y_low * width + x_low, static_cast(g1)); atomicAdd( offset_bottom_diff + y_low * width + x_high, static_cast(g2)); atomicAdd( offset_bottom_diff + y_high * width + x_low, static_cast(g3)); atomicAdd( offset_bottom_diff + y_high * width + x_high, static_cast(g4)); } // if } // ix } // iy } // CUDA_1D_KERNEL_LOOP } // RoIAlignRotatedBackward at::Tensor ROIAlignRotated_forward_cuda( const at::Tensor& input, const at::Tensor& rois, const float spatial_scale, const int pooled_height, const int pooled_width, const int sampling_ratio) { AT_ASSERTM(input.device().is_cuda(), "input must be a CUDA tensor"); AT_ASSERTM(rois.device().is_cuda(), "rois must be a CUDA tensor"); at::TensorArg input_t{input, "input", 1}, rois_t{rois, "rois", 2}; at::CheckedFrom c = "ROIAlignRotated_forward_cuda"; at::checkAllSameGPU(c, {input_t, rois_t}); at::checkAllSameType(c, {input_t, rois_t}); at::cuda::CUDAGuard device_guard(input.device()); auto num_rois = rois.size(0); auto channels = input.size(1); auto height = input.size(2); auto width = input.size(3); auto output = at::empty( {num_rois, channels, pooled_height, pooled_width}, input.options()); auto output_size = num_rois * pooled_height * pooled_width * channels; cudaStream_t stream = at::cuda::getCurrentCUDAStream(); dim3 grid(std::min( at::cuda::ATenCeilDiv( static_cast(output_size), static_cast(512)), static_cast(4096))); dim3 block(512); if (output.numel() == 0) { AT_CUDA_CHECK(cudaGetLastError()); return output; } auto input_ = input.contiguous(), rois_ = rois.contiguous(); AT_DISPATCH_FLOATING_TYPES( input.scalar_type(), "ROIAlignRotated_forward", [&] { RoIAlignRotatedForward<<>>( output_size, input_.data_ptr(), spatial_scale, channels, height, width, pooled_height, pooled_width, sampling_ratio, rois_.data_ptr(), output.data_ptr()); }); cudaDeviceSynchronize(); AT_CUDA_CHECK(cudaGetLastError()); return output; } // TODO remove the dependency on input and use instead its sizes -> save memory at::Tensor ROIAlignRotated_backward_cuda( const at::Tensor& grad, const at::Tensor& rois, const float spatial_scale, const int pooled_height, const int pooled_width, const int batch_size, const int channels, const int height, const int width, const int sampling_ratio) { AT_ASSERTM(grad.device().is_cuda(), "grad must be a CUDA tensor"); AT_ASSERTM(rois.device().is_cuda(), "rois must be a CUDA tensor"); at::TensorArg grad_t{grad, "grad", 1}, rois_t{rois, "rois", 2}; at::CheckedFrom c = "ROIAlign_backward_cuda"; at::checkAllSameGPU(c, {grad_t, rois_t}); at::checkAllSameType(c, {grad_t, rois_t}); at::cuda::CUDAGuard device_guard(grad.device()); auto num_rois = rois.size(0); auto grad_input = at::zeros({batch_size, channels, height, width}, grad.options()); cudaStream_t stream = at::cuda::getCurrentCUDAStream(); dim3 grid(std::min( at::cuda::ATenCeilDiv( static_cast(grad.numel()), static_cast(512)), static_cast(4096))); dim3 block(512); // handle possibly empty gradients if (grad.numel() == 0) { AT_CUDA_CHECK(cudaGetLastError()); return grad_input; } auto grad_ = grad.contiguous(), rois_ = rois.contiguous(); AT_DISPATCH_FLOATING_TYPES( grad.scalar_type(), "ROIAlignRotated_backward", [&] { RoIAlignRotatedBackwardFeature<<>>( grad.numel(), grad_.data_ptr(), num_rois, spatial_scale, channels, height, width, pooled_height, pooled_width, sampling_ratio, grad_input.data_ptr(), rois_.data_ptr()); }); AT_CUDA_CHECK(cudaGetLastError()); return grad_input; } } // namespace detectron2 ================================================ FILE: detectron2/layers/csrc/box_iou_rotated/box_iou_rotated.h ================================================ // Copyright (c) Facebook, Inc. and its affiliates. #pragma once #include namespace detectron2 { at::Tensor box_iou_rotated_cpu( const at::Tensor& boxes1, const at::Tensor& boxes2); #if defined(WITH_CUDA) || defined(WITH_HIP) at::Tensor box_iou_rotated_cuda( const at::Tensor& boxes1, const at::Tensor& boxes2); #endif // Interface for Python // inline is needed to prevent multiple function definitions when this header is // included by different cpps inline at::Tensor box_iou_rotated( const at::Tensor& boxes1, const at::Tensor& boxes2) { assert(boxes1.device().is_cuda() == boxes2.device().is_cuda()); if (boxes1.device().is_cuda()) { #if defined(WITH_CUDA) || defined(WITH_HIP) return box_iou_rotated_cuda(boxes1.contiguous(), boxes2.contiguous()); #else AT_ERROR("Detectron2 is not compiled with GPU support!"); #endif } return box_iou_rotated_cpu(boxes1.contiguous(), boxes2.contiguous()); } } // namespace detectron2 ================================================ FILE: detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cpu.cpp ================================================ // Copyright (c) Facebook, Inc. and its affiliates. #include "box_iou_rotated.h" #include "box_iou_rotated_utils.h" namespace detectron2 { template void box_iou_rotated_cpu_kernel( const at::Tensor& boxes1, const at::Tensor& boxes2, at::Tensor& ious) { auto num_boxes1 = boxes1.size(0); auto num_boxes2 = boxes2.size(0); for (int i = 0; i < num_boxes1; i++) { for (int j = 0; j < num_boxes2; j++) { ious[i * num_boxes2 + j] = single_box_iou_rotated( boxes1[i].data_ptr(), boxes2[j].data_ptr()); } } } at::Tensor box_iou_rotated_cpu( // input must be contiguous: const at::Tensor& boxes1, const at::Tensor& boxes2) { auto num_boxes1 = boxes1.size(0); auto num_boxes2 = boxes2.size(0); at::Tensor ious = at::empty({num_boxes1 * num_boxes2}, boxes1.options().dtype(at::kFloat)); box_iou_rotated_cpu_kernel(boxes1, boxes2, ious); // reshape from 1d array to 2d array auto shape = std::vector{num_boxes1, num_boxes2}; return ious.reshape(shape); } } // namespace detectron2 ================================================ FILE: detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.cu ================================================ // Copyright (c) Facebook, Inc. and its affiliates. #include #include #include #include #include "box_iou_rotated_utils.h" namespace detectron2 { // 2D block with 32 * 16 = 512 threads per block const int BLOCK_DIM_X = 32; const int BLOCK_DIM_Y = 16; template __global__ void box_iou_rotated_cuda_kernel( const int n_boxes1, const int n_boxes2, const T* dev_boxes1, const T* dev_boxes2, T* dev_ious) { const int row_start = blockIdx.x * blockDim.x; const int col_start = blockIdx.y * blockDim.y; const int row_size = min(n_boxes1 - row_start, blockDim.x); const int col_size = min(n_boxes2 - col_start, blockDim.y); __shared__ float block_boxes1[BLOCK_DIM_X * 5]; __shared__ float block_boxes2[BLOCK_DIM_Y * 5]; // It's safe to copy using threadIdx.x since BLOCK_DIM_X >= BLOCK_DIM_Y if (threadIdx.x < row_size && threadIdx.y == 0) { block_boxes1[threadIdx.x * 5 + 0] = dev_boxes1[(row_start + threadIdx.x) * 5 + 0]; block_boxes1[threadIdx.x * 5 + 1] = dev_boxes1[(row_start + threadIdx.x) * 5 + 1]; block_boxes1[threadIdx.x * 5 + 2] = dev_boxes1[(row_start + threadIdx.x) * 5 + 2]; block_boxes1[threadIdx.x * 5 + 3] = dev_boxes1[(row_start + threadIdx.x) * 5 + 3]; block_boxes1[threadIdx.x * 5 + 4] = dev_boxes1[(row_start + threadIdx.x) * 5 + 4]; } if (threadIdx.x < col_size && threadIdx.y == 0) { block_boxes2[threadIdx.x * 5 + 0] = dev_boxes2[(col_start + threadIdx.x) * 5 + 0]; block_boxes2[threadIdx.x * 5 + 1] = dev_boxes2[(col_start + threadIdx.x) * 5 + 1]; block_boxes2[threadIdx.x * 5 + 2] = dev_boxes2[(col_start + threadIdx.x) * 5 + 2]; block_boxes2[threadIdx.x * 5 + 3] = dev_boxes2[(col_start + threadIdx.x) * 5 + 3]; block_boxes2[threadIdx.x * 5 + 4] = dev_boxes2[(col_start + threadIdx.x) * 5 + 4]; } __syncthreads(); if (threadIdx.x < row_size && threadIdx.y < col_size) { int offset = (row_start + threadIdx.x) * n_boxes2 + col_start + threadIdx.y; dev_ious[offset] = single_box_iou_rotated( block_boxes1 + threadIdx.x * 5, block_boxes2 + threadIdx.y * 5); } } at::Tensor box_iou_rotated_cuda( // input must be contiguous const at::Tensor& boxes1, const at::Tensor& boxes2) { using scalar_t = float; AT_ASSERTM( boxes1.scalar_type() == at::kFloat, "boxes1 must be a float tensor"); AT_ASSERTM( boxes2.scalar_type() == at::kFloat, "boxes2 must be a float tensor"); AT_ASSERTM(boxes1.is_cuda(), "boxes1 must be a CUDA tensor"); AT_ASSERTM(boxes2.is_cuda(), "boxes2 must be a CUDA tensor"); at::cuda::CUDAGuard device_guard(boxes1.device()); auto num_boxes1 = boxes1.size(0); auto num_boxes2 = boxes2.size(0); at::Tensor ious = at::empty({num_boxes1 * num_boxes2}, boxes1.options().dtype(at::kFloat)); bool transpose = false; if (num_boxes1 > 0 && num_boxes2 > 0) { scalar_t *data1 = boxes1.data_ptr(), *data2 = boxes2.data_ptr(); if (num_boxes2 > 65535 * BLOCK_DIM_Y) { AT_ASSERTM( num_boxes1 <= 65535 * BLOCK_DIM_Y, "Too many boxes for box_iou_rotated_cuda!"); // x dim is allowed to be large, but y dim cannot, // so we transpose the two to avoid "invalid configuration argument" // error. We assume one of them is small. Otherwise the result is hard to // fit in memory anyway. std::swap(num_boxes1, num_boxes2); std::swap(data1, data2); transpose = true; } const int blocks_x = at::cuda::ATenCeilDiv(static_cast(num_boxes1), BLOCK_DIM_X); const int blocks_y = at::cuda::ATenCeilDiv(static_cast(num_boxes2), BLOCK_DIM_Y); dim3 blocks(blocks_x, blocks_y); dim3 threads(BLOCK_DIM_X, BLOCK_DIM_Y); cudaStream_t stream = at::cuda::getCurrentCUDAStream(); box_iou_rotated_cuda_kernel<<>>( num_boxes1, num_boxes2, data1, data2, (scalar_t*)ious.data_ptr()); AT_CUDA_CHECK(cudaGetLastError()); } // reshape from 1d array to 2d array auto shape = std::vector{num_boxes1, num_boxes2}; if (transpose) { return ious.view(shape).t(); } else { return ious.view(shape); } } } // namespace detectron2 ================================================ FILE: detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_utils.h ================================================ // Copyright (c) Facebook, Inc. and its affiliates. #pragma once #include #include #if defined(__CUDACC__) || __HCC__ == 1 || __HIP__ == 1 // Designates functions callable from the host (CPU) and the device (GPU) #define HOST_DEVICE __host__ __device__ #define HOST_DEVICE_INLINE HOST_DEVICE __forceinline__ #else #include #define HOST_DEVICE #define HOST_DEVICE_INLINE HOST_DEVICE inline #endif namespace detectron2 { namespace { template struct RotatedBox { T x_ctr, y_ctr, w, h, a; }; template struct Point { T x, y; HOST_DEVICE_INLINE Point(const T& px = 0, const T& py = 0) : x(px), y(py) {} HOST_DEVICE_INLINE Point operator+(const Point& p) const { return Point(x + p.x, y + p.y); } HOST_DEVICE_INLINE Point& operator+=(const Point& p) { x += p.x; y += p.y; return *this; } HOST_DEVICE_INLINE Point operator-(const Point& p) const { return Point(x - p.x, y - p.y); } HOST_DEVICE_INLINE Point operator*(const T coeff) const { return Point(x * coeff, y * coeff); } }; template HOST_DEVICE_INLINE T dot_2d(const Point& A, const Point& B) { return A.x * B.x + A.y * B.y; } // R: result type. can be different from input type template HOST_DEVICE_INLINE R cross_2d(const Point& A, const Point& B) { return static_cast(A.x) * static_cast(B.y) - static_cast(B.x) * static_cast(A.y); } template HOST_DEVICE_INLINE void get_rotated_vertices( const RotatedBox& box, Point (&pts)[4]) { // M_PI / 180. == 0.01745329251 double theta = box.a * 0.01745329251; T cosTheta2 = (T)cos(theta) * 0.5f; T sinTheta2 = (T)sin(theta) * 0.5f; // y: top --> down; x: left --> right pts[0].x = box.x_ctr + sinTheta2 * box.h + cosTheta2 * box.w; pts[0].y = box.y_ctr + cosTheta2 * box.h - sinTheta2 * box.w; pts[1].x = box.x_ctr - sinTheta2 * box.h + cosTheta2 * box.w; pts[1].y = box.y_ctr - cosTheta2 * box.h - sinTheta2 * box.w; pts[2].x = 2 * box.x_ctr - pts[0].x; pts[2].y = 2 * box.y_ctr - pts[0].y; pts[3].x = 2 * box.x_ctr - pts[1].x; pts[3].y = 2 * box.y_ctr - pts[1].y; } template HOST_DEVICE_INLINE int get_intersection_points( const Point (&pts1)[4], const Point (&pts2)[4], Point (&intersections)[24]) { // Line vector // A line from p1 to p2 is: p1 + (p2-p1)*t, t=[0,1] Point vec1[4], vec2[4]; for (int i = 0; i < 4; i++) { vec1[i] = pts1[(i + 1) % 4] - pts1[i]; vec2[i] = pts2[(i + 1) % 4] - pts2[i]; } // When computing the intersection area, it doesn't hurt if we have // more (duplicated/approximate) intersections/vertices than needed, // while it can cause drastic difference if we miss an intersection/vertex. // Therefore, we add an epsilon to relax the comparisons between // the float point numbers that decide the intersection points. double EPS = 1e-5; // Line test - test all line combos for intersection int num = 0; // number of intersections for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { // Solve for 2x2 Ax=b T det = cross_2d(vec2[j], vec1[i]); // This takes care of parallel lines if (fabs(det) <= 1e-14) { continue; } auto vec12 = pts2[j] - pts1[i]; T t1 = cross_2d(vec2[j], vec12) / det; T t2 = cross_2d(vec1[i], vec12) / det; if (t1 > -EPS && t1 < 1.0f + EPS && t2 > -EPS && t2 < 1.0f + EPS) { intersections[num++] = pts1[i] + vec1[i] * t1; } } } // Check for vertices of rect1 inside rect2 { const auto& AB = vec2[0]; const auto& DA = vec2[3]; auto ABdotAB = dot_2d(AB, AB); auto ADdotAD = dot_2d(DA, DA); for (int i = 0; i < 4; i++) { // assume ABCD is the rectangle, and P is the point to be judged // P is inside ABCD iff. P's projection on AB lies within AB // and P's projection on AD lies within AD auto AP = pts1[i] - pts2[0]; auto APdotAB = dot_2d(AP, AB); auto APdotAD = -dot_2d(AP, DA); if ((APdotAB > -EPS) && (APdotAD > -EPS) && (APdotAB < ABdotAB + EPS) && (APdotAD < ADdotAD + EPS)) { intersections[num++] = pts1[i]; } } } // Reverse the check - check for vertices of rect2 inside rect1 { const auto& AB = vec1[0]; const auto& DA = vec1[3]; auto ABdotAB = dot_2d(AB, AB); auto ADdotAD = dot_2d(DA, DA); for (int i = 0; i < 4; i++) { auto AP = pts2[i] - pts1[0]; auto APdotAB = dot_2d(AP, AB); auto APdotAD = -dot_2d(AP, DA); if ((APdotAB > -EPS) && (APdotAD > -EPS) && (APdotAB < ABdotAB + EPS) && (APdotAD < ADdotAD + EPS)) { intersections[num++] = pts2[i]; } } } return num; } template HOST_DEVICE_INLINE int convex_hull_graham( const Point (&p)[24], const int& num_in, Point (&q)[24], bool shift_to_zero = false) { assert(num_in >= 2); // Step 1: // Find point with minimum y // if more than 1 points have the same minimum y, // pick the one with the minimum x. int t = 0; for (int i = 1; i < num_in; i++) { if (p[i].y < p[t].y || (p[i].y == p[t].y && p[i].x < p[t].x)) { t = i; } } auto& start = p[t]; // starting point // Step 2: // Subtract starting point from every points (for sorting in the next step) for (int i = 0; i < num_in; i++) { q[i] = p[i] - start; } // Swap the starting point to position 0 auto tmp = q[0]; q[0] = q[t]; q[t] = tmp; // Step 3: // Sort point 1 ~ num_in according to their relative cross-product values // (essentially sorting according to angles) // If the angles are the same, sort according to their distance to origin T dist[24]; #if defined(__CUDACC__) || __HCC__ == 1 || __HIP__ == 1 // compute distance to origin before sort, and sort them together with the // points for (int i = 0; i < num_in; i++) { dist[i] = dot_2d(q[i], q[i]); } // CUDA version // In the future, we can potentially use thrust // for sorting here to improve speed (though not guaranteed) for (int i = 1; i < num_in - 1; i++) { for (int j = i + 1; j < num_in; j++) { T crossProduct = cross_2d(q[i], q[j]); if ((crossProduct < -1e-6) || (fabs(crossProduct) < 1e-6 && dist[i] > dist[j])) { auto q_tmp = q[i]; q[i] = q[j]; q[j] = q_tmp; auto dist_tmp = dist[i]; dist[i] = dist[j]; dist[j] = dist_tmp; } } } #else // CPU version std::sort( q + 1, q + num_in, [](const Point& A, const Point& B) -> bool { T temp = cross_2d(A, B); if (fabs(temp) < 1e-6) { return dot_2d(A, A) < dot_2d(B, B); } else { return temp > 0; } }); // compute distance to origin after sort, since the points are now different. for (int i = 0; i < num_in; i++) { dist[i] = dot_2d(q[i], q[i]); } #endif // Step 4: // Make sure there are at least 2 points (that don't overlap with each other) // in the stack int k; // index of the non-overlapped second point for (k = 1; k < num_in; k++) { if (dist[k] > 1e-8) { break; } } if (k == num_in) { // We reach the end, which means the convex hull is just one point q[0] = p[t]; return 1; } q[1] = q[k]; int m = 2; // 2 points in the stack // Step 5: // Finally we can start the scanning process. // When a non-convex relationship between the 3 points is found // (either concave shape or duplicated points), // we pop the previous point from the stack // until the 3-point relationship is convex again, or // until the stack only contains two points for (int i = k + 1; i < num_in; i++) { while (m > 1) { auto q1 = q[i] - q[m - 2], q2 = q[m - 1] - q[m - 2]; // cross_2d() uses FMA and therefore computes round(round(q1.x*q2.y) - // q2.x*q1.y) So it may not return 0 even when q1==q2. Therefore we // compare round(q1.x*q2.y) and round(q2.x*q1.y) directly. (round means // round to nearest floating point). if (q1.x * q2.y >= q2.x * q1.y) m--; else break; } // Using double also helps, but float can solve the issue for now. // while (m > 1 && cross_2d(q[i] - q[m - 2], q[m - 1] - q[m - 2]) // >= 0) { // m--; // } q[m++] = q[i]; } // Step 6 (Optional): // In general sense we need the original coordinates, so we // need to shift the points back (reverting Step 2) // But if we're only interested in getting the area/perimeter of the shape // We can simply return. if (!shift_to_zero) { for (int i = 0; i < m; i++) { q[i] += start; } } return m; } template HOST_DEVICE_INLINE T polygon_area(const Point (&q)[24], const int& m) { if (m <= 2) { return 0; } T area = 0; for (int i = 1; i < m - 1; i++) { area += fabs(cross_2d(q[i] - q[0], q[i + 1] - q[0])); } return area / 2.0; } template HOST_DEVICE_INLINE T rotated_boxes_intersection( const RotatedBox& box1, const RotatedBox& box2) { // There are up to 4 x 4 + 4 + 4 = 24 intersections (including dups) returned // from rotated_rect_intersection_pts Point intersectPts[24], orderedPts[24]; Point pts1[4]; Point pts2[4]; get_rotated_vertices(box1, pts1); get_rotated_vertices(box2, pts2); int num = get_intersection_points(pts1, pts2, intersectPts); if (num <= 2) { return 0.0; } // Convex Hull to order the intersection points in clockwise order and find // the contour area. int num_convex = convex_hull_graham(intersectPts, num, orderedPts, true); return polygon_area(orderedPts, num_convex); } } // namespace template HOST_DEVICE_INLINE T single_box_iou_rotated(T const* const box1_raw, T const* const box2_raw) { // shift center to the middle point to achieve higher precision in result RotatedBox box1, box2; auto center_shift_x = (box1_raw[0] + box2_raw[0]) / 2.0; auto center_shift_y = (box1_raw[1] + box2_raw[1]) / 2.0; box1.x_ctr = box1_raw[0] - center_shift_x; box1.y_ctr = box1_raw[1] - center_shift_y; box1.w = box1_raw[2]; box1.h = box1_raw[3]; box1.a = box1_raw[4]; box2.x_ctr = box2_raw[0] - center_shift_x; box2.y_ctr = box2_raw[1] - center_shift_y; box2.w = box2_raw[2]; box2.h = box2_raw[3]; box2.a = box2_raw[4]; T area1 = box1.w * box1.h; T area2 = box2.w * box2.h; if (area1 < 1e-14 || area2 < 1e-14) { return 0.f; } T intersection = rotated_boxes_intersection(box1, box2); T iou = intersection / (area1 + area2 - intersection); return iou; } } // namespace detectron2 ================================================ FILE: detectron2/layers/csrc/cocoeval/cocoeval.cpp ================================================ // Copyright (c) Facebook, Inc. and its affiliates. #include "cocoeval.h" #include #include #include #include using namespace pybind11::literals; namespace detectron2 { namespace COCOeval { // Sort detections from highest score to lowest, such that // detection_instances[detection_sorted_indices[t]] >= // detection_instances[detection_sorted_indices[t+1]]. Use stable_sort to match // original COCO API void SortInstancesByDetectionScore( const std::vector& detection_instances, std::vector* detection_sorted_indices) { detection_sorted_indices->resize(detection_instances.size()); std::iota( detection_sorted_indices->begin(), detection_sorted_indices->end(), 0); std::stable_sort( detection_sorted_indices->begin(), detection_sorted_indices->end(), [&detection_instances](size_t j1, size_t j2) { return detection_instances[j1].score > detection_instances[j2].score; }); } // Partition the ground truth objects based on whether or not to ignore them // based on area void SortInstancesByIgnore( const std::array& area_range, const std::vector& ground_truth_instances, std::vector* ground_truth_sorted_indices, std::vector* ignores) { ignores->clear(); ignores->reserve(ground_truth_instances.size()); for (auto o : ground_truth_instances) { ignores->push_back( o.ignore || o.area < area_range[0] || o.area > area_range[1]); } ground_truth_sorted_indices->resize(ground_truth_instances.size()); std::iota( ground_truth_sorted_indices->begin(), ground_truth_sorted_indices->end(), 0); std::stable_sort( ground_truth_sorted_indices->begin(), ground_truth_sorted_indices->end(), [&ignores](size_t j1, size_t j2) { return (int)(*ignores)[j1] < (int)(*ignores)[j2]; }); } // For each IOU threshold, greedily match each detected instance to a ground // truth instance (if possible) and store the results void MatchDetectionsToGroundTruth( const std::vector& detection_instances, const std::vector& detection_sorted_indices, const std::vector& ground_truth_instances, const std::vector& ground_truth_sorted_indices, const std::vector& ignores, const std::vector>& ious, const std::vector& iou_thresholds, const std::array& area_range, ImageEvaluation* results) { // Initialize memory to store return data matches and ignore const int num_iou_thresholds = iou_thresholds.size(); const int num_ground_truth = ground_truth_sorted_indices.size(); const int num_detections = detection_sorted_indices.size(); std::vector ground_truth_matches( num_iou_thresholds * num_ground_truth, 0); std::vector& detection_matches = results->detection_matches; std::vector& detection_ignores = results->detection_ignores; std::vector& ground_truth_ignores = results->ground_truth_ignores; detection_matches.resize(num_iou_thresholds * num_detections, 0); detection_ignores.resize(num_iou_thresholds * num_detections, false); ground_truth_ignores.resize(num_ground_truth); for (auto g = 0; g < num_ground_truth; ++g) { ground_truth_ignores[g] = ignores[ground_truth_sorted_indices[g]]; } for (auto t = 0; t < num_iou_thresholds; ++t) { for (auto d = 0; d < num_detections; ++d) { // information about best match so far (match=-1 -> unmatched) double best_iou = std::min(iou_thresholds[t], 1 - 1e-10); int match = -1; for (auto g = 0; g < num_ground_truth; ++g) { // if this ground truth instance is already matched and not a // crowd, it cannot be matched to another detection if (ground_truth_matches[t * num_ground_truth + g] > 0 && !ground_truth_instances[ground_truth_sorted_indices[g]].is_crowd) { continue; } // if detected instance matched to a regular ground truth // instance, we can break on the first ground truth instance // tagged as ignore (because they are sorted by the ignore tag) if (match >= 0 && !ground_truth_ignores[match] && ground_truth_ignores[g]) { break; } // if IOU overlap is the best so far, store the match appropriately if (ious[d][ground_truth_sorted_indices[g]] >= best_iou) { best_iou = ious[d][ground_truth_sorted_indices[g]]; match = g; } } // if match was made, store id of match for both detection and // ground truth if (match >= 0) { detection_ignores[t * num_detections + d] = ground_truth_ignores[match]; detection_matches[t * num_detections + d] = ground_truth_instances[ground_truth_sorted_indices[match]].id; ground_truth_matches[t * num_ground_truth + match] = detection_instances[detection_sorted_indices[d]].id; } // set unmatched detections outside of area range to ignore const InstanceAnnotation& detection = detection_instances[detection_sorted_indices[d]]; detection_ignores[t * num_detections + d] = detection_ignores[t * num_detections + d] || (detection_matches[t * num_detections + d] == 0 && (detection.area < area_range[0] || detection.area > area_range[1])); } } // store detection score results results->detection_scores.resize(detection_sorted_indices.size()); for (size_t d = 0; d < detection_sorted_indices.size(); ++d) { results->detection_scores[d] = detection_instances[detection_sorted_indices[d]].score; } } std::vector EvaluateImages( const std::vector>& area_ranges, int max_detections, const std::vector& iou_thresholds, const ImageCategoryInstances>& image_category_ious, const ImageCategoryInstances& image_category_ground_truth_instances, const ImageCategoryInstances& image_category_detection_instances) { const int num_area_ranges = area_ranges.size(); const int num_images = image_category_ground_truth_instances.size(); const int num_categories = image_category_ious.size() > 0 ? image_category_ious[0].size() : 0; std::vector detection_sorted_indices; std::vector ground_truth_sorted_indices; std::vector ignores; std::vector results_all( num_images * num_area_ranges * num_categories); // Store results for each image, category, and area range combination. Results // for each IOU threshold are packed into the same ImageEvaluation object for (auto i = 0; i < num_images; ++i) { for (auto c = 0; c < num_categories; ++c) { const std::vector& ground_truth_instances = image_category_ground_truth_instances[i][c]; const std::vector& detection_instances = image_category_detection_instances[i][c]; SortInstancesByDetectionScore( detection_instances, &detection_sorted_indices); if ((int)detection_sorted_indices.size() > max_detections) { detection_sorted_indices.resize(max_detections); } for (size_t a = 0; a < area_ranges.size(); ++a) { SortInstancesByIgnore( area_ranges[a], ground_truth_instances, &ground_truth_sorted_indices, &ignores); MatchDetectionsToGroundTruth( detection_instances, detection_sorted_indices, ground_truth_instances, ground_truth_sorted_indices, ignores, image_category_ious[i][c], iou_thresholds, area_ranges[a], &results_all [c * num_area_ranges * num_images + a * num_images + i]); } } } return results_all; } // Convert a python list to a vector template std::vector list_to_vec(const py::list& l) { std::vector v(py::len(l)); for (int i = 0; i < (int)py::len(l); ++i) { v[i] = l[i].cast(); } return v; } // Helper function to Accumulate() // Considers the evaluation results applicable to a particular category, area // range, and max_detections parameter setting, which begin at // evaluations[evaluation_index]. Extracts a sorted list of length n of all // applicable detection instances concatenated across all images in the dataset, // which are represented by the outputs evaluation_indices, detection_scores, // image_detection_indices, and detection_sorted_indices--all of which are // length n. evaluation_indices[i] stores the applicable index into // evaluations[] for instance i, which has detection score detection_score[i], // and is the image_detection_indices[i]'th of the list of detections // for the image containing i. detection_sorted_indices[] defines a sorted // permutation of the 3 other outputs int BuildSortedDetectionList( const std::vector& evaluations, const int64_t evaluation_index, const int64_t num_images, const int max_detections, std::vector* evaluation_indices, std::vector* detection_scores, std::vector* detection_sorted_indices, std::vector* image_detection_indices) { assert(evaluations.size() >= evaluation_index + num_images); // Extract a list of object instances of the applicable category, area // range, and max detections requirements such that they can be sorted image_detection_indices->clear(); evaluation_indices->clear(); detection_scores->clear(); image_detection_indices->reserve(num_images * max_detections); evaluation_indices->reserve(num_images * max_detections); detection_scores->reserve(num_images * max_detections); int num_valid_ground_truth = 0; for (auto i = 0; i < num_images; ++i) { const ImageEvaluation& evaluation = evaluations[evaluation_index + i]; for (int d = 0; d < (int)evaluation.detection_scores.size() && d < max_detections; ++d) { // detected instances evaluation_indices->push_back(evaluation_index + i); image_detection_indices->push_back(d); detection_scores->push_back(evaluation.detection_scores[d]); } for (auto ground_truth_ignore : evaluation.ground_truth_ignores) { if (!ground_truth_ignore) { ++num_valid_ground_truth; } } } // Sort detections by decreasing score, using stable sort to match // python implementation detection_sorted_indices->resize(detection_scores->size()); std::iota( detection_sorted_indices->begin(), detection_sorted_indices->end(), 0); std::stable_sort( detection_sorted_indices->begin(), detection_sorted_indices->end(), [&detection_scores](size_t j1, size_t j2) { return (*detection_scores)[j1] > (*detection_scores)[j2]; }); return num_valid_ground_truth; } // Helper function to Accumulate() // Compute a precision recall curve given a sorted list of detected instances // encoded in evaluations, evaluation_indices, detection_scores, // detection_sorted_indices, image_detection_indices (see // BuildSortedDetectionList()). Using vectors precisions and recalls // and temporary storage, output the results into precisions_out, recalls_out, // and scores_out, which are large buffers containing many precion/recall curves // for all possible parameter settings, with precisions_out_index and // recalls_out_index defining the applicable indices to store results. void ComputePrecisionRecallCurve( const int64_t precisions_out_index, const int64_t precisions_out_stride, const int64_t recalls_out_index, const std::vector& recall_thresholds, const int iou_threshold_index, const int num_iou_thresholds, const int num_valid_ground_truth, const std::vector& evaluations, const std::vector& evaluation_indices, const std::vector& detection_scores, const std::vector& detection_sorted_indices, const std::vector& image_detection_indices, std::vector* precisions, std::vector* recalls, std::vector* precisions_out, std::vector* scores_out, std::vector* recalls_out) { assert(recalls_out->size() > recalls_out_index); // Compute precision/recall for each instance in the sorted list of detections int64_t true_positives_sum = 0, false_positives_sum = 0; precisions->clear(); recalls->clear(); precisions->reserve(detection_sorted_indices.size()); recalls->reserve(detection_sorted_indices.size()); assert(!evaluations.empty() || detection_sorted_indices.empty()); for (auto detection_sorted_index : detection_sorted_indices) { const ImageEvaluation& evaluation = evaluations[evaluation_indices[detection_sorted_index]]; const auto num_detections = evaluation.detection_matches.size() / num_iou_thresholds; const auto detection_index = iou_threshold_index * num_detections + image_detection_indices[detection_sorted_index]; assert(evaluation.detection_matches.size() > detection_index); assert(evaluation.detection_ignores.size() > detection_index); const int64_t detection_match = evaluation.detection_matches[detection_index]; const bool detection_ignores = evaluation.detection_ignores[detection_index]; const auto true_positive = detection_match > 0 && !detection_ignores; const auto false_positive = detection_match == 0 && !detection_ignores; if (true_positive) { ++true_positives_sum; } if (false_positive) { ++false_positives_sum; } const double recall = static_cast(true_positives_sum) / num_valid_ground_truth; recalls->push_back(recall); const int64_t num_valid_detections = true_positives_sum + false_positives_sum; const double precision = num_valid_detections > 0 ? static_cast(true_positives_sum) / num_valid_detections : 0.0; precisions->push_back(precision); } (*recalls_out)[recalls_out_index] = !recalls->empty() ? recalls->back() : 0; for (int64_t i = static_cast(precisions->size()) - 1; i > 0; --i) { if ((*precisions)[i] > (*precisions)[i - 1]) { (*precisions)[i - 1] = (*precisions)[i]; } } // Sample the per instance precision/recall list at each recall threshold for (size_t r = 0; r < recall_thresholds.size(); ++r) { // first index in recalls >= recall_thresholds[r] std::vector::iterator low = std::lower_bound( recalls->begin(), recalls->end(), recall_thresholds[r]); size_t precisions_index = low - recalls->begin(); const auto results_ind = precisions_out_index + r * precisions_out_stride; assert(results_ind < precisions_out->size()); assert(results_ind < scores_out->size()); if (precisions_index < precisions->size()) { (*precisions_out)[results_ind] = (*precisions)[precisions_index]; (*scores_out)[results_ind] = detection_scores[detection_sorted_indices[precisions_index]]; } else { (*precisions_out)[results_ind] = 0; (*scores_out)[results_ind] = 0; } } } py::dict Accumulate( const py::object& params, const std::vector& evaluations) { const std::vector recall_thresholds = list_to_vec(params.attr("recThrs")); const std::vector max_detections = list_to_vec(params.attr("maxDets")); const int num_iou_thresholds = py::len(params.attr("iouThrs")); const int num_recall_thresholds = py::len(params.attr("recThrs")); const int num_categories = params.attr("useCats").cast() == 1 ? py::len(params.attr("catIds")) : 1; const int num_area_ranges = py::len(params.attr("areaRng")); const int num_max_detections = py::len(params.attr("maxDets")); const int num_images = py::len(params.attr("imgIds")); std::vector precisions_out( num_iou_thresholds * num_recall_thresholds * num_categories * num_area_ranges * num_max_detections, -1); std::vector recalls_out( num_iou_thresholds * num_categories * num_area_ranges * num_max_detections, -1); std::vector scores_out( num_iou_thresholds * num_recall_thresholds * num_categories * num_area_ranges * num_max_detections, -1); // Consider the list of all detected instances in the entire dataset in one // large list. evaluation_indices, detection_scores, // image_detection_indices, and detection_sorted_indices all have the same // length as this list, such that each entry corresponds to one detected // instance std::vector evaluation_indices; // indices into evaluations[] std::vector detection_scores; // detection scores of each instance std::vector detection_sorted_indices; // sorted indices of all // instances in the dataset std::vector image_detection_indices; // indices into the list of detected instances in // the same image as each instance std::vector precisions, recalls; for (auto c = 0; c < num_categories; ++c) { for (auto a = 0; a < num_area_ranges; ++a) { for (auto m = 0; m < num_max_detections; ++m) { // The COCO PythonAPI assumes evaluations[] (the return value of // COCOeval::EvaluateImages() is one long list storing results for each // combination of category, area range, and image id, with categories in // the outermost loop and images in the innermost loop. const int64_t evaluations_index = c * num_area_ranges * num_images + a * num_images; int num_valid_ground_truth = BuildSortedDetectionList( evaluations, evaluations_index, num_images, max_detections[m], &evaluation_indices, &detection_scores, &detection_sorted_indices, &image_detection_indices); if (num_valid_ground_truth == 0) { continue; } for (auto t = 0; t < num_iou_thresholds; ++t) { // recalls_out is a flattened vectors representing a // num_iou_thresholds X num_categories X num_area_ranges X // num_max_detections matrix const int64_t recalls_out_index = t * num_categories * num_area_ranges * num_max_detections + c * num_area_ranges * num_max_detections + a * num_max_detections + m; // precisions_out and scores_out are flattened vectors // representing a num_iou_thresholds X num_recall_thresholds X // num_categories X num_area_ranges X num_max_detections matrix const int64_t precisions_out_stride = num_categories * num_area_ranges * num_max_detections; const int64_t precisions_out_index = t * num_recall_thresholds * num_categories * num_area_ranges * num_max_detections + c * num_area_ranges * num_max_detections + a * num_max_detections + m; ComputePrecisionRecallCurve( precisions_out_index, precisions_out_stride, recalls_out_index, recall_thresholds, t, num_iou_thresholds, num_valid_ground_truth, evaluations, evaluation_indices, detection_scores, detection_sorted_indices, image_detection_indices, &precisions, &recalls, &precisions_out, &scores_out, &recalls_out); } } } } time_t rawtime; struct tm local_time; std::array buffer; time(&rawtime); #ifdef _WIN32 localtime_s(&local_time, &rawtime); #else localtime_r(&rawtime, &local_time); #endif strftime( buffer.data(), 200, "%Y-%m-%d %H:%num_max_detections:%S", &local_time); return py::dict( "params"_a = params, "counts"_a = std::vector( {num_iou_thresholds, num_recall_thresholds, num_categories, num_area_ranges, num_max_detections}), "date"_a = buffer, "precision"_a = precisions_out, "recall"_a = recalls_out, "scores"_a = scores_out); } } // namespace COCOeval } // namespace detectron2 ================================================ FILE: detectron2/layers/csrc/cocoeval/cocoeval.h ================================================ // Copyright (c) Facebook, Inc. and its affiliates. #pragma once #include #include #include #include #include namespace py = pybind11; namespace detectron2 { namespace COCOeval { // Annotation data for a single object instance in an image struct InstanceAnnotation { InstanceAnnotation( uint64_t id, double score, double area, bool is_crowd, bool ignore) : id{id}, score{score}, area{area}, is_crowd{is_crowd}, ignore{ignore} {} uint64_t id; double score = 0.; double area = 0.; bool is_crowd = false; bool ignore = false; }; // Stores intermediate results for evaluating detection results for a single // image that has D detected instances and G ground truth instances. This stores // matches between detected and ground truth instances struct ImageEvaluation { // For each of the D detected instances, the id of the matched ground truth // instance, or 0 if unmatched std::vector detection_matches; // The detection score of each of the D detected instances std::vector detection_scores; // Marks whether or not each of G instances was ignored from evaluation (e.g., // because it's outside area_range) std::vector ground_truth_ignores; // Marks whether or not each of D instances was ignored from evaluation (e.g., // because it's outside aRng) std::vector detection_ignores; }; template using ImageCategoryInstances = std::vector>>; // C++ implementation of COCO API cocoeval.py::COCOeval.evaluateImg(). For each // combination of image, category, area range settings, and IOU thresholds to // evaluate, it matches detected instances to ground truth instances and stores // the results into a vector of ImageEvaluation results, which will be // interpreted by the COCOeval::Accumulate() function to produce precion-recall // curves. The parameters of nested vectors have the following semantics: // image_category_ious[i][c][d][g] is the intersection over union of the d'th // detected instance and g'th ground truth instance of // category category_ids[c] in image image_ids[i] // image_category_ground_truth_instances[i][c] is a vector of ground truth // instances in image image_ids[i] of category category_ids[c] // image_category_detection_instances[i][c] is a vector of detected // instances in image image_ids[i] of category category_ids[c] std::vector EvaluateImages( const std::vector>& area_ranges, // vector of 2-tuples int max_detections, const std::vector& iou_thresholds, const ImageCategoryInstances>& image_category_ious, const ImageCategoryInstances& image_category_ground_truth_instances, const ImageCategoryInstances& image_category_detection_instances); // C++ implementation of COCOeval.accumulate(), which generates precision // recall curves for each set of category, IOU threshold, detection area range, // and max number of detections parameters. It is assumed that the parameter // evaluations is the return value of the functon COCOeval::EvaluateImages(), // which was called with the same parameter settings params py::dict Accumulate( const py::object& params, const std::vector& evalutations); } // namespace COCOeval } // namespace detectron2 ================================================ FILE: detectron2/layers/csrc/cuda_version.cu ================================================ // Copyright (c) Facebook, Inc. and its affiliates. #include namespace detectron2 { int get_cudart_version() { // Not a ROCM platform: Either HIP is not used, or // it is used, but platform is not ROCM (i.e. it is CUDA) #if !defined(__HIP_PLATFORM_HCC__) return CUDART_VERSION; #else int version = 0; #if HIP_VERSION_MAJOR != 0 // Create a convention similar to that of CUDA, as assumed by other // parts of the code. version = HIP_VERSION_MINOR; version += (HIP_VERSION_MAJOR * 100); #else hipRuntimeGetVersion(&version); #endif return version; #endif } } // namespace detectron2 ================================================ FILE: detectron2/layers/csrc/deformable/deform_conv.h ================================================ // Copyright (c) Facebook, Inc. and its affiliates. #pragma once #include namespace detectron2 { #if defined(WITH_CUDA) || defined(WITH_HIP) int deform_conv_forward_cuda( at::Tensor input, at::Tensor weight, at::Tensor offset, at::Tensor output, at::Tensor columns, at::Tensor ones, int kW, int kH, int dW, int dH, int padW, int padH, int dilationW, int dilationH, int group, int deformable_group, int im2col_step); int deform_conv_backward_input_cuda( at::Tensor input, at::Tensor offset, at::Tensor gradOutput, at::Tensor gradInput, at::Tensor gradOffset, at::Tensor weight, at::Tensor columns, int kW, int kH, int dW, int dH, int padW, int padH, int dilationW, int dilationH, int group, int deformable_group, int im2col_step); int deform_conv_backward_parameters_cuda( at::Tensor input, at::Tensor offset, at::Tensor gradOutput, at::Tensor gradWeight, // at::Tensor gradBias, at::Tensor columns, at::Tensor ones, int kW, int kH, int dW, int dH, int padW, int padH, int dilationW, int dilationH, int group, int deformable_group, float scale, int im2col_step); void modulated_deform_conv_cuda_forward( at::Tensor input, at::Tensor weight, at::Tensor bias, at::Tensor ones, at::Tensor offset, at::Tensor mask, at::Tensor output, at::Tensor columns, int kernel_h, int kernel_w, const int stride_h, const int stride_w, const int pad_h, const int pad_w, const int dilation_h, const int dilation_w, const int group, const int deformable_group, const bool with_bias); void modulated_deform_conv_cuda_backward( at::Tensor input, at::Tensor weight, at::Tensor bias, at::Tensor ones, at::Tensor offset, at::Tensor mask, at::Tensor columns, at::Tensor grad_input, at::Tensor grad_weight, at::Tensor grad_bias, at::Tensor grad_offset, at::Tensor grad_mask, at::Tensor grad_output, int kernel_h, int kernel_w, int stride_h, int stride_w, int pad_h, int pad_w, int dilation_h, int dilation_w, int group, int deformable_group, const bool with_bias); #endif inline int deform_conv_forward( at::Tensor input, at::Tensor weight, at::Tensor offset, at::Tensor output, at::Tensor columns, at::Tensor ones, int kW, int kH, int dW, int dH, int padW, int padH, int dilationW, int dilationH, int group, int deformable_group, int im2col_step) { if (input.is_cuda()) { #if defined(WITH_CUDA) || defined(WITH_HIP) TORCH_CHECK(weight.is_cuda(), "weight tensor is not on GPU!"); TORCH_CHECK(offset.is_cuda(), "offset tensor is not on GPU!"); return deform_conv_forward_cuda( input, weight, offset, output, columns, ones, kW, kH, dW, dH, padW, padH, dilationW, dilationH, group, deformable_group, im2col_step); #else AT_ERROR("Detectron2 is not compiled with GPU support!"); #endif } AT_ERROR("This operator is not implemented on CPU"); } inline int deform_conv_backward_input( at::Tensor input, at::Tensor offset, at::Tensor gradOutput, at::Tensor gradInput, at::Tensor gradOffset, at::Tensor weight, at::Tensor columns, int kW, int kH, int dW, int dH, int padW, int padH, int dilationW, int dilationH, int group, int deformable_group, int im2col_step) { if (gradOutput.is_cuda()) { #if defined(WITH_CUDA) || defined(WITH_HIP) TORCH_CHECK(input.is_cuda(), "input tensor is not on GPU!"); TORCH_CHECK(weight.is_cuda(), "weight tensor is not on GPU!"); TORCH_CHECK(offset.is_cuda(), "offset tensor is not on GPU!"); return deform_conv_backward_input_cuda( input, offset, gradOutput, gradInput, gradOffset, weight, columns, kW, kH, dW, dH, padW, padH, dilationW, dilationH, group, deformable_group, im2col_step); #else AT_ERROR("Detectron2 is not compiled with GPU support!"); #endif } AT_ERROR("This operator is not implemented on CPU"); } inline int deform_conv_backward_filter( at::Tensor input, at::Tensor offset, at::Tensor gradOutput, at::Tensor gradWeight, // at::Tensor gradBias, at::Tensor columns, at::Tensor ones, int kW, int kH, int dW, int dH, int padW, int padH, int dilationW, int dilationH, int group, int deformable_group, float scale, int im2col_step) { if (gradOutput.is_cuda()) { #if defined(WITH_CUDA) || defined(WITH_HIP) TORCH_CHECK(input.is_cuda(), "input tensor is not on GPU!"); TORCH_CHECK(offset.is_cuda(), "offset tensor is not on GPU!"); return deform_conv_backward_parameters_cuda( input, offset, gradOutput, gradWeight, columns, ones, kW, kH, dW, dH, padW, padH, dilationW, dilationH, group, deformable_group, scale, im2col_step); #else AT_ERROR("Detectron2 is not compiled with GPU support!"); #endif } AT_ERROR("This operator is not implemented on CPU"); } inline void modulated_deform_conv_forward( at::Tensor input, at::Tensor weight, at::Tensor bias, at::Tensor ones, at::Tensor offset, at::Tensor mask, at::Tensor output, at::Tensor columns, int kernel_h, int kernel_w, const int stride_h, const int stride_w, const int pad_h, const int pad_w, const int dilation_h, const int dilation_w, const int group, const int deformable_group, const bool with_bias) { if (input.is_cuda()) { #if defined(WITH_CUDA) || defined(WITH_HIP) TORCH_CHECK(weight.is_cuda(), "weight tensor is not on GPU!"); TORCH_CHECK(bias.is_cuda(), "bias tensor is not on GPU!"); TORCH_CHECK(offset.is_cuda(), "offset tensor is not on GPU!"); return modulated_deform_conv_cuda_forward( input, weight, bias, ones, offset, mask, output, columns, kernel_h, kernel_w, stride_h, stride_w, pad_h, pad_w, dilation_h, dilation_w, group, deformable_group, with_bias); #else AT_ERROR("Detectron2 is not compiled with GPU support!"); #endif } AT_ERROR("This operator is not implemented on CPU"); } inline void modulated_deform_conv_backward( at::Tensor input, at::Tensor weight, at::Tensor bias, at::Tensor ones, at::Tensor offset, at::Tensor mask, at::Tensor columns, at::Tensor grad_input, at::Tensor grad_weight, at::Tensor grad_bias, at::Tensor grad_offset, at::Tensor grad_mask, at::Tensor grad_output, int kernel_h, int kernel_w, int stride_h, int stride_w, int pad_h, int pad_w, int dilation_h, int dilation_w, int group, int deformable_group, const bool with_bias) { if (grad_output.is_cuda()) { #if defined(WITH_CUDA) || defined(WITH_HIP) TORCH_CHECK(input.is_cuda(), "input tensor is not on GPU!"); TORCH_CHECK(weight.is_cuda(), "weight tensor is not on GPU!"); TORCH_CHECK(bias.is_cuda(), "bias tensor is not on GPU!"); TORCH_CHECK(offset.is_cuda(), "offset tensor is not on GPU!"); return modulated_deform_conv_cuda_backward( input, weight, bias, ones, offset, mask, columns, grad_input, grad_weight, grad_bias, grad_offset, grad_mask, grad_output, kernel_h, kernel_w, stride_h, stride_w, pad_h, pad_w, dilation_h, dilation_w, group, deformable_group, with_bias); #else AT_ERROR("Detectron2 is not compiled with GPU support!"); #endif } AT_ERROR("This operator is not implemented on CPU"); } } // namespace detectron2 ================================================ FILE: detectron2/layers/csrc/deformable/deform_conv_cuda.cu ================================================ // Copyright (c) Facebook, Inc. and its affiliates. // modified from // https://github.com/open-mmlab/mmdetection/blob/master/mmdet/ops/dcn/src/deform_conv_cuda.cpp // Original license: Apache 2.0 // modify from // https://github.com/chengdazhi/Deformable-Convolution-V2-PyTorch/blob/mmdetection/mmdet/ops/dcn/src/deform_conv_cuda.c // Original license: Apache 2.0 #include #include "deform_conv.h" #include #include namespace detectron2 { void deformable_im2col( const at::Tensor data_im, const at::Tensor data_offset, const int channels, const int height, const int width, const int ksize_h, const int ksize_w, const int pad_h, const int pad_w, const int stride_h, const int stride_w, const int dilation_h, const int dilation_w, const int parallel_imgs, const int deformable_group, at::Tensor data_col); void deformable_col2im( const at::Tensor data_col, const at::Tensor data_offset, const int channels, const int height, const int width, const int ksize_h, const int ksize_w, const int pad_h, const int pad_w, const int stride_h, const int stride_w, const int dilation_h, const int dilation_w, const int parallel_imgs, const int deformable_group, at::Tensor grad_im); void deformable_col2im_coord( const at::Tensor data_col, const at::Tensor data_im, const at::Tensor data_offset, const int channels, const int height, const int width, const int ksize_h, const int ksize_w, const int pad_h, const int pad_w, const int stride_h, const int stride_w, const int dilation_h, const int dilation_w, const int parallel_imgs, const int deformable_group, at::Tensor grad_offset); void modulated_deformable_im2col_cuda( const at::Tensor data_im, const at::Tensor data_offset, const at::Tensor data_mask, const int batch_size, const int channels, const int height_im, const int width_im, const int height_col, const int width_col, const int kernel_h, const int kenerl_w, const int pad_h, const int pad_w, const int stride_h, const int stride_w, const int dilation_h, const int dilation_w, const int deformable_group, at::Tensor data_col); void modulated_deformable_col2im_cuda( const at::Tensor data_col, const at::Tensor data_offset, const at::Tensor data_mask, const int batch_size, const int channels, const int height_im, const int width_im, const int height_col, const int width_col, const int kernel_h, const int kenerl_w, const int pad_h, const int pad_w, const int stride_h, const int stride_w, const int dilation_h, const int dilation_w, const int deformable_group, at::Tensor grad_im); void modulated_deformable_col2im_coord_cuda( const at::Tensor data_col, const at::Tensor data_im, const at::Tensor data_offset, const at::Tensor data_mask, const int batch_size, const int channels, const int height_im, const int width_im, const int height_col, const int width_col, const int kernel_h, const int kenerl_w, const int pad_h, const int pad_w, const int stride_h, const int stride_w, const int dilation_h, const int dilation_w, const int deformable_group, at::Tensor grad_offset, at::Tensor grad_mask); void shape_check( at::Tensor input, at::Tensor offset, at::Tensor* gradOutput, at::Tensor weight, int kH, int kW, int dH, int dW, int padH, int padW, int dilationH, int dilationW, int group, int deformable_group) { TORCH_CHECK( weight.ndimension() == 4, "4D weight tensor (nOutputPlane,nInputPlane,kH,kW) expected, " "but got: %s", weight.ndimension()); TORCH_CHECK(weight.is_contiguous(), "weight tensor has to be contiguous"); TORCH_CHECK( kW > 0 && kH > 0, "kernel size should be greater than zero, but got kH: %d kW: %d", kH, kW); TORCH_CHECK( (weight.size(2) == kH && weight.size(3) == kW), "kernel size should be consistent with weight, ", "but got kH: %d kW: %d weight.size(2): %d, weight.size(3): %d", kH, kW, weight.size(2), weight.size(3)); TORCH_CHECK( dW > 0 && dH > 0, "stride should be greater than zero, but got dH: %d dW: %d", dH, dW); TORCH_CHECK( dilationW > 0 && dilationH > 0, "dilation should be greater than 0, but got dilationH: %d dilationW: %d", dilationH, dilationW); int ndim = input.ndimension(); int dimf = 0; int dimh = 1; int dimw = 2; if (ndim == 4) { dimf++; dimh++; dimw++; } TORCH_CHECK( ndim == 3 || ndim == 4, "3D or 4D input tensor expected but got: %s", ndim); long nInputPlane = weight.size(1) * group; long inputHeight = input.size(dimh); long inputWidth = input.size(dimw); long nOutputPlane = weight.size(0); long outputHeight = (inputHeight + 2 * padH - (dilationH * (kH - 1) + 1)) / dH + 1; long outputWidth = (inputWidth + 2 * padW - (dilationW * (kW - 1) + 1)) / dW + 1; TORCH_CHECK( nInputPlane % deformable_group == 0, "input channels must divide deformable group size"); if (outputWidth < 1 || outputHeight < 1) AT_ERROR( "Given input size: (%ld x %ld x %ld). " "Calculated output size: (%ld x %ld x %ld). Output size is too small", nInputPlane, inputHeight, inputWidth, nOutputPlane, outputHeight, outputWidth); TORCH_CHECK( input.size(1) == nInputPlane, "invalid number of input planes, expected: %d, but got: %d", nInputPlane, input.size(1)); TORCH_CHECK( (inputHeight + 2 * padH >= kH && inputWidth + 2 * padW >= kW), "input image is smaller than kernel"); TORCH_CHECK( (offset.size(2) == outputHeight && offset.size(3) == outputWidth), "invalid spatial size of offset, expected height: %d width: %d, but " "got height: %d width: %d", outputHeight, outputWidth, offset.size(2), offset.size(3)); TORCH_CHECK( (offset.size(1) == deformable_group * 2 * kH * kW), "invalid number of channels of offset"); if (gradOutput != NULL) { TORCH_CHECK( gradOutput->size(dimf) == nOutputPlane, "invalid number of gradOutput planes, expected: %d, but got: %d", nOutputPlane, gradOutput->size(dimf)); TORCH_CHECK( (gradOutput->size(dimh) == outputHeight && gradOutput->size(dimw) == outputWidth), "invalid size of gradOutput, expected height: %d width: %d , but " "got height: %d width: %d", outputHeight, outputWidth, gradOutput->size(dimh), gradOutput->size(dimw)); } } int deform_conv_forward_cuda( at::Tensor input, at::Tensor weight, at::Tensor offset, at::Tensor output, at::Tensor columns, at::Tensor ones, int kW, int kH, int dW, int dH, int padW, int padH, int dilationW, int dilationH, int group, int deformable_group, int im2col_step) { // todo: resize columns to include im2col: done // todo: add im2col_step as input // todo: add new output buffer and transpose it to output (or directly // transpose output) todo: possibly change data indexing because of // parallel_imgs shape_check( input, offset, NULL, weight, kH, kW, dH, dW, padH, padW, dilationH, dilationW, group, deformable_group); input = input.contiguous(); offset = offset.contiguous(); weight = weight.contiguous(); int batch = 1; if (input.ndimension() == 3) { // Force batch batch = 0; input.unsqueeze_(0); offset.unsqueeze_(0); } // todo: assert batchsize dividable by im2col_step long batchSize = input.size(0); long nInputPlane = input.size(1); long inputHeight = input.size(2); long inputWidth = input.size(3); long nOutputPlane = weight.size(0); long outputWidth = (inputWidth + 2 * padW - (dilationW * (kW - 1) + 1)) / dW + 1; long outputHeight = (inputHeight + 2 * padH - (dilationH * (kH - 1) + 1)) / dH + 1; TORCH_CHECK((offset.size(0) == batchSize), "invalid batch size of offset"); output = output.view( {batchSize / im2col_step, im2col_step, nOutputPlane, outputHeight, outputWidth}); columns = at::zeros( {nInputPlane * kW * kH, im2col_step * outputHeight * outputWidth}, input.options()); if (ones.ndimension() != 2 || ones.size(0) * ones.size(1) < outputHeight * outputWidth) { ones = at::ones({outputHeight, outputWidth}, input.options()); } input = input.view( {batchSize / im2col_step, im2col_step, nInputPlane, inputHeight, inputWidth}); offset = offset.view( {batchSize / im2col_step, im2col_step, deformable_group * 2 * kH * kW, outputHeight, outputWidth}); at::Tensor output_buffer = at::zeros( {batchSize / im2col_step, nOutputPlane, im2col_step * outputHeight, outputWidth}, output.options()); output_buffer = output_buffer.view( {output_buffer.size(0), group, output_buffer.size(1) / group, output_buffer.size(2), output_buffer.size(3)}); for (int elt = 0; elt < batchSize / im2col_step; elt++) { deformable_im2col( input[elt], offset[elt], nInputPlane, inputHeight, inputWidth, kH, kW, padH, padW, dH, dW, dilationH, dilationW, im2col_step, deformable_group, columns); columns = columns.view({group, columns.size(0) / group, columns.size(1)}); weight = weight.view( {group, weight.size(0) / group, weight.size(1), weight.size(2), weight.size(3)}); for (int g = 0; g < group; g++) { output_buffer[elt][g] = output_buffer[elt][g] .flatten(1) .addmm_(weight[g].flatten(1), columns[g]) .view_as(output_buffer[elt][g]); } } output_buffer = output_buffer.view( {output_buffer.size(0), output_buffer.size(1) * output_buffer.size(2), output_buffer.size(3), output_buffer.size(4)}); output_buffer = output_buffer.view( {batchSize / im2col_step, nOutputPlane, im2col_step, outputHeight, outputWidth}); output_buffer.transpose_(1, 2); output.copy_(output_buffer); output = output.view({batchSize, nOutputPlane, outputHeight, outputWidth}); input = input.view({batchSize, nInputPlane, inputHeight, inputWidth}); offset = offset.view( {batchSize, deformable_group * 2 * kH * kW, outputHeight, outputWidth}); if (batch == 0) { output = output.view({nOutputPlane, outputHeight, outputWidth}); input = input.view({nInputPlane, inputHeight, inputWidth}); offset = offset.view({offset.size(1), offset.size(2), offset.size(3)}); } return 1; } int deform_conv_backward_input_cuda( at::Tensor input, at::Tensor offset, at::Tensor gradOutput, at::Tensor gradInput, at::Tensor gradOffset, at::Tensor weight, at::Tensor columns, int kW, int kH, int dW, int dH, int padW, int padH, int dilationW, int dilationH, int group, int deformable_group, int im2col_step) { shape_check( input, offset, &gradOutput, weight, kH, kW, dH, dW, padH, padW, dilationH, dilationW, group, deformable_group); input = input.contiguous(); offset = offset.contiguous(); gradOutput = gradOutput.contiguous(); weight = weight.contiguous(); int batch = 1; if (input.ndimension() == 3) { // Force batch batch = 0; input = input.view({1, input.size(0), input.size(1), input.size(2)}); offset = offset.view({1, offset.size(0), offset.size(1), offset.size(2)}); gradOutput = gradOutput.view( {1, gradOutput.size(0), gradOutput.size(1), gradOutput.size(2)}); } long batchSize = input.size(0); long nInputPlane = input.size(1); long inputHeight = input.size(2); long inputWidth = input.size(3); long nOutputPlane = weight.size(0); long outputWidth = (inputWidth + 2 * padW - (dilationW * (kW - 1) + 1)) / dW + 1; long outputHeight = (inputHeight + 2 * padH - (dilationH * (kH - 1) + 1)) / dH + 1; TORCH_CHECK((offset.size(0) == batchSize), 3, "invalid batch size of offset"); gradInput = gradInput.view({batchSize, nInputPlane, inputHeight, inputWidth}); columns = at::zeros( {nInputPlane * kW * kH, im2col_step * outputHeight * outputWidth}, input.options()); // change order of grad output gradOutput = gradOutput.view( {batchSize / im2col_step, im2col_step, nOutputPlane, outputHeight, outputWidth}); gradOutput.transpose_(1, 2); gradInput = gradInput.view( {batchSize / im2col_step, im2col_step, nInputPlane, inputHeight, inputWidth}); input = input.view( {batchSize / im2col_step, im2col_step, nInputPlane, inputHeight, inputWidth}); gradOffset = gradOffset.view( {batchSize / im2col_step, im2col_step, deformable_group * 2 * kH * kW, outputHeight, outputWidth}); offset = offset.view( {batchSize / im2col_step, im2col_step, deformable_group * 2 * kH * kW, outputHeight, outputWidth}); for (int elt = 0; elt < batchSize / im2col_step; elt++) { // divide into groups columns = columns.view({group, columns.size(0) / group, columns.size(1)}); weight = weight.view( {group, weight.size(0) / group, weight.size(1), weight.size(2), weight.size(3)}); gradOutput = gradOutput.view( {gradOutput.size(0), group, gradOutput.size(1) / group, gradOutput.size(2), gradOutput.size(3), gradOutput.size(4)}); for (int g = 0; g < group; g++) { columns[g] = columns[g].addmm_( weight[g].flatten(1).transpose(0, 1), gradOutput[elt][g].flatten(1), 0.0f, 1.0f); } columns = columns.view({columns.size(0) * columns.size(1), columns.size(2)}); gradOutput = gradOutput.view( {gradOutput.size(0), gradOutput.size(1) * gradOutput.size(2), gradOutput.size(3), gradOutput.size(4), gradOutput.size(5)}); deformable_col2im_coord( columns, input[elt], offset[elt], nInputPlane, inputHeight, inputWidth, kH, kW, padH, padW, dH, dW, dilationH, dilationW, im2col_step, deformable_group, gradOffset[elt]); deformable_col2im( columns, offset[elt], nInputPlane, inputHeight, inputWidth, kH, kW, padH, padW, dH, dW, dilationH, dilationW, im2col_step, deformable_group, gradInput[elt]); } gradOutput.transpose_(1, 2); gradOutput = gradOutput.view({batchSize, nOutputPlane, outputHeight, outputWidth}); gradInput = gradInput.view({batchSize, nInputPlane, inputHeight, inputWidth}); input = input.view({batchSize, nInputPlane, inputHeight, inputWidth}); gradOffset = gradOffset.view( {batchSize, deformable_group * 2 * kH * kW, outputHeight, outputWidth}); offset = offset.view( {batchSize, deformable_group * 2 * kH * kW, outputHeight, outputWidth}); if (batch == 0) { gradOutput = gradOutput.view({nOutputPlane, outputHeight, outputWidth}); input = input.view({nInputPlane, inputHeight, inputWidth}); gradInput = gradInput.view({nInputPlane, inputHeight, inputWidth}); offset = offset.view({offset.size(1), offset.size(2), offset.size(3)}); gradOffset = gradOffset.view({offset.size(1), offset.size(2), offset.size(3)}); } return 1; } int deform_conv_backward_parameters_cuda( at::Tensor input, at::Tensor offset, at::Tensor gradOutput, at::Tensor gradWeight, // at::Tensor gradBias, at::Tensor columns, at::Tensor ones, int kW, int kH, int dW, int dH, int padW, int padH, int dilationW, int dilationH, int group, int deformable_group, float scale, int im2col_step) { // todo: transpose and reshape outGrad // todo: reshape columns // todo: add im2col_step as input shape_check( input, offset, &gradOutput, gradWeight, kH, kW, dH, dW, padH, padW, dilationH, dilationW, group, deformable_group); input = input.contiguous(); offset = offset.contiguous(); gradOutput = gradOutput.contiguous(); int batch = 1; if (input.ndimension() == 3) { // Force batch batch = 0; input = input.view( at::IntList({1, input.size(0), input.size(1), input.size(2)})); gradOutput = gradOutput.view( {1, gradOutput.size(0), gradOutput.size(1), gradOutput.size(2)}); } long batchSize = input.size(0); long nInputPlane = input.size(1); long inputHeight = input.size(2); long inputWidth = input.size(3); long nOutputPlane = gradWeight.size(0); long outputWidth = (inputWidth + 2 * padW - (dilationW * (kW - 1) + 1)) / dW + 1; long outputHeight = (inputHeight + 2 * padH - (dilationH * (kH - 1) + 1)) / dH + 1; TORCH_CHECK((offset.size(0) == batchSize), "invalid batch size of offset"); columns = at::zeros( {nInputPlane * kW * kH, im2col_step * outputHeight * outputWidth}, input.options()); gradOutput = gradOutput.view( {batchSize / im2col_step, im2col_step, nOutputPlane, outputHeight, outputWidth}); gradOutput.transpose_(1, 2); at::Tensor gradOutputBuffer = at::zeros_like(gradOutput); gradOutputBuffer = gradOutputBuffer.view( {batchSize / im2col_step, nOutputPlane, im2col_step, outputHeight, outputWidth}); gradOutputBuffer.copy_(gradOutput); // gradOutput is not contiguous, so we do reshape (instead of view) next gradOutputBuffer = gradOutputBuffer.reshape( {batchSize / im2col_step, nOutputPlane, im2col_step * outputHeight, outputWidth}); gradOutput.transpose_(1, 2); gradOutput = gradOutput.view({batchSize, nOutputPlane, outputHeight, outputWidth}); input = input.view( {batchSize / im2col_step, im2col_step, nInputPlane, inputHeight, inputWidth}); offset = offset.view( {batchSize / im2col_step, im2col_step, deformable_group * 2 * kH * kW, outputHeight, outputWidth}); for (int elt = 0; elt < batchSize / im2col_step; elt++) { deformable_im2col( input[elt], offset[elt], nInputPlane, inputHeight, inputWidth, kH, kW, padH, padW, dH, dW, dilationH, dilationW, im2col_step, deformable_group, columns); // divide into group gradOutputBuffer = gradOutputBuffer.view( {gradOutputBuffer.size(0), group, gradOutputBuffer.size(1) / group, gradOutputBuffer.size(2), gradOutputBuffer.size(3)}); columns = columns.view({group, columns.size(0) / group, columns.size(1)}); gradWeight = gradWeight.view( {group, gradWeight.size(0) / group, gradWeight.size(1), gradWeight.size(2), gradWeight.size(3)}); for (int g = 0; g < group; g++) { gradWeight[g] = gradWeight[g] .flatten(1) .addmm_( gradOutputBuffer[elt][g].flatten(1), columns[g].transpose(1, 0), 1.0, scale) .view_as(gradWeight[g]); } gradOutputBuffer = gradOutputBuffer.view( {gradOutputBuffer.size(0), gradOutputBuffer.size(1) * gradOutputBuffer.size(2), gradOutputBuffer.size(3), gradOutputBuffer.size(4)}); columns = columns.view({columns.size(0) * columns.size(1), columns.size(2)}); gradWeight = gradWeight.view( {gradWeight.size(0) * gradWeight.size(1), gradWeight.size(2), gradWeight.size(3), gradWeight.size(4)}); } input = input.view({batchSize, nInputPlane, inputHeight, inputWidth}); offset = offset.view( {batchSize, deformable_group * 2 * kH * kW, outputHeight, outputWidth}); if (batch == 0) { gradOutput = gradOutput.view({nOutputPlane, outputHeight, outputWidth}); input = input.view({nInputPlane, inputHeight, inputWidth}); } return 1; } void modulated_deform_conv_cuda_forward( at::Tensor input, at::Tensor weight, at::Tensor bias, at::Tensor ones, at::Tensor offset, at::Tensor mask, at::Tensor output, at::Tensor columns, int kernel_h, int kernel_w, const int stride_h, const int stride_w, const int pad_h, const int pad_w, const int dilation_h, const int dilation_w, const int group, const int deformable_group, const bool with_bias) { shape_check( input, offset, NULL, weight, kernel_h, kernel_w, stride_h, stride_w, pad_h, pad_w, dilation_h, dilation_w, group, deformable_group); TORCH_CHECK(input.is_contiguous(), "input tensor has to be contiguous"); TORCH_CHECK(weight.is_contiguous(), "weight tensor has to be contiguous"); const int batch = input.size(0); const int channels = input.size(1); const int height = input.size(2); const int width = input.size(3); const int channels_out = weight.size(0); const int channels_kernel = weight.size(1); const int kernel_h_ = weight.size(2); const int kernel_w_ = weight.size(3); if (kernel_h_ != kernel_h || kernel_w_ != kernel_w) AT_ERROR( "Input shape and kernel shape wont match: (%d x %d vs %d x %d).", kernel_h_, kernel_w, kernel_h_, kernel_w_); if (channels != channels_kernel * group) AT_ERROR( "Input shape and kernel channels wont match: (%d vs %d).", channels, channels_kernel * group); const int height_out = (height + 2 * pad_h - (dilation_h * (kernel_h - 1) + 1)) / stride_h + 1; const int width_out = (width + 2 * pad_w - (dilation_w * (kernel_w - 1) + 1)) / stride_w + 1; // mask shape check TORCH_CHECK( (mask.size(2) == height_out && mask.size(3) == width_out), "invalid spatial size of mask, expected height: %d width: %d, but " "got height: %d width: %d", height_out, width_out, mask.size(2), mask.size(3)); TORCH_CHECK( (mask.size(1) == deformable_group * kernel_h * kernel_w), "invalid number of channels of mask"); if (ones.ndimension() != 2 || ones.size(0) * ones.size(1) < height_out * width_out) { // Resize plane and fill with ones... ones = at::ones({height_out, width_out}, input.options()); } // resize output output = output.view({batch, channels_out, height_out, width_out}).zero_(); // resize temporary columns columns = at::zeros( {channels * kernel_h * kernel_w, 1 * height_out * width_out}, input.options()); output = output.view( {output.size(0), group, output.size(1) / group, output.size(2), output.size(3)}); for (int b = 0; b < batch; b++) { modulated_deformable_im2col_cuda( input[b], offset[b], mask[b], 1, channels, height, width, height_out, width_out, kernel_h, kernel_w, pad_h, pad_w, stride_h, stride_w, dilation_h, dilation_w, deformable_group, columns); // divide into group weight = weight.view( {group, weight.size(0) / group, weight.size(1), weight.size(2), weight.size(3)}); columns = columns.view({group, columns.size(0) / group, columns.size(1)}); for (int g = 0; g < group; g++) { output[b][g] = output[b][g] .flatten(1) .addmm_(weight[g].flatten(1), columns[g]) .view_as(output[b][g]); } weight = weight.view( {weight.size(0) * weight.size(1), weight.size(2), weight.size(3), weight.size(4)}); columns = columns.view({columns.size(0) * columns.size(1), columns.size(2)}); } output = output.view( {output.size(0), output.size(1) * output.size(2), output.size(3), output.size(4)}); if (with_bias) { output += bias.view({1, bias.size(0), 1, 1}); } } void modulated_deform_conv_cuda_backward( at::Tensor input, at::Tensor weight, at::Tensor bias, at::Tensor ones, at::Tensor offset, at::Tensor mask, at::Tensor columns, at::Tensor grad_input, at::Tensor grad_weight, at::Tensor grad_bias, at::Tensor grad_offset, at::Tensor grad_mask, at::Tensor grad_output, int kernel_h, int kernel_w, int stride_h, int stride_w, int pad_h, int pad_w, int dilation_h, int dilation_w, int group, int deformable_group, const bool with_bias) { shape_check( input, offset, &grad_output, weight, kernel_h, kernel_w, stride_h, stride_w, pad_h, pad_w, dilation_h, dilation_w, group, deformable_group); TORCH_CHECK(input.is_contiguous(), "input tensor has to be contiguous"); TORCH_CHECK(weight.is_contiguous(), "weight tensor has to be contiguous"); const int batch = input.size(0); const int channels = input.size(1); const int height = input.size(2); const int width = input.size(3); const int channels_kernel = weight.size(1); const int kernel_h_ = weight.size(2); const int kernel_w_ = weight.size(3); if (kernel_h_ != kernel_h || kernel_w_ != kernel_w) AT_ERROR( "Input shape and kernel shape wont match: (%d x %d vs %d x %d).", kernel_h_, kernel_w, kernel_h_, kernel_w_); if (channels != channels_kernel * group) AT_ERROR( "Input shape and kernel channels wont match: (%d vs %d).", channels, channels_kernel * group); const int height_out = (height + 2 * pad_h - (dilation_h * (kernel_h - 1) + 1)) / stride_h + 1; const int width_out = (width + 2 * pad_w - (dilation_w * (kernel_w - 1) + 1)) / stride_w + 1; // mask shape check TORCH_CHECK( (mask.size(2) == height_out && mask.size(3) == width_out), "invalid spatial size of mask, expected height: %d width: %d, but " "got height: %d width: %d", height_out, width_out, mask.size(2), mask.size(3)); TORCH_CHECK( (mask.size(1) == deformable_group * kernel_h * kernel_w), "invalid number of channels of mask"); if (ones.ndimension() != 2 || ones.size(0) * ones.size(1) < height_out * width_out) { // Resize plane and fill with ones... ones = at::ones({height_out, width_out}, input.options()); } grad_input = grad_input.view({batch, channels, height, width}); columns = at::zeros( {channels * kernel_h * kernel_w, height_out * width_out}, input.options()); grad_output = grad_output.view( {grad_output.size(0), group, grad_output.size(1) / group, grad_output.size(2), grad_output.size(3)}); for (int b = 0; b < batch; b++) { // divide int group columns = columns.view({group, columns.size(0) / group, columns.size(1)}); weight = weight.view( {group, weight.size(0) / group, weight.size(1), weight.size(2), weight.size(3)}); for (int g = 0; g < group; g++) { columns[g].addmm_( weight[g].flatten(1).transpose(0, 1), grad_output[b][g].flatten(1), 0.0f, 1.0f); } columns = columns.view({columns.size(0) * columns.size(1), columns.size(2)}); weight = weight.view( {weight.size(0) * weight.size(1), weight.size(2), weight.size(3), weight.size(4)}); // gradient w.r.t. input coordinate data modulated_deformable_col2im_coord_cuda( columns, input[b], offset[b], mask[b], 1, channels, height, width, height_out, width_out, kernel_h, kernel_w, pad_h, pad_w, stride_h, stride_w, dilation_h, dilation_w, deformable_group, grad_offset[b], grad_mask[b]); // gradient w.r.t. input data modulated_deformable_col2im_cuda( columns, offset[b], mask[b], 1, channels, height, width, height_out, width_out, kernel_h, kernel_w, pad_h, pad_w, stride_h, stride_w, dilation_h, dilation_w, deformable_group, grad_input[b]); // gradient w.r.t. weight, dWeight should accumulate across the batch and // group modulated_deformable_im2col_cuda( input[b], offset[b], mask[b], 1, channels, height, width, height_out, width_out, kernel_h, kernel_w, pad_h, pad_w, stride_h, stride_w, dilation_h, dilation_w, deformable_group, columns); columns = columns.view({group, columns.size(0) / group, columns.size(1)}); grad_weight = grad_weight.view( {group, grad_weight.size(0) / group, grad_weight.size(1), grad_weight.size(2), grad_weight.size(3)}); if (with_bias) grad_bias = grad_bias.view({group, grad_bias.size(0) / group}); for (int g = 0; g < group; g++) { grad_weight[g] = grad_weight[g] .flatten(1) .addmm_(grad_output[b][g].flatten(1), columns[g].transpose(0, 1)) .view_as(grad_weight[g]); if (with_bias) { grad_bias[g] = grad_bias[g] .view({-1, 1}) .addmm_(grad_output[b][g].flatten(1), ones.view({-1, 1})) .view(-1); } } columns = columns.view({columns.size(0) * columns.size(1), columns.size(2)}); grad_weight = grad_weight.view( {grad_weight.size(0) * grad_weight.size(1), grad_weight.size(2), grad_weight.size(3), grad_weight.size(4)}); if (with_bias) grad_bias = grad_bias.view({grad_bias.size(0) * grad_bias.size(1)}); } grad_output = grad_output.view( {grad_output.size(0) * grad_output.size(1), grad_output.size(2), grad_output.size(3), grad_output.size(4)}); } } // namespace detectron2 ================================================ FILE: detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.cu ================================================ // Copyright (c) Facebook, Inc. and its affiliates. // modified from // https://github.com/open-mmlab/mmdetection/blob/master/mmdet/ops/dcn/src/deform_conv_cuda_kernel.cu // Original license: Apache 2.0 // clang-format off // modify from // https://github.com/chengdazhi/Deformable-Convolution-V2-PyTorch/blob/mmdetection/mmdet/ops/dcn/src/deform_conv_cuda_kernel.cu /*! ******************* BEGIN Caffe Copyright Notice and Disclaimer ***************** * * COPYRIGHT * * All contributions by the University of California: * Copyright (c) 2014-2017 The Regents of the University of California (Regents) * All rights reserved. * * All other contributions: * Copyright (c) 2014-2017, the respective contributors * All rights reserved. * * Caffe uses a shared copyright model: each contributor holds copyright over * their contributions to Caffe. The project versioning records all such * contribution and copyright details. If a contributor wants to further mark * their specific copyright on a particular contribution, they should indicate * their copyright solely in the commit message of the change when it is * committed. * * LICENSE * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" *AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE *IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE *FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL *DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR *SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER *CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, *OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE *OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * CONTRIBUTION AGREEMENT * * By contributing to the BVLC/caffe repository through pull-request, comment, * or otherwise, the contributor releases their content to the * license and copyright terms herein. * ***************** END Caffe Copyright Notice and Disclaimer ********************* * * Copyright (c) 2018 Microsoft * Licensed under The MIT License [see LICENSE for details] * \file modulated_deformable_im2col.cuh * \brief Function definitions of converting an image to * column matrix based on kernel, padding, dilation, and offset. * These functions are mainly used in deformable convolution operators. * \ref: https://arxiv.org/abs/1703.06211 * \author Yuwen Xiong, Haozhi Qi, Jifeng Dai, Xizhou Zhu, Han Hu, Dazhi Cheng */ #include #include #include #include #include #include using namespace at; #define CUDA_KERNEL_LOOP(i, n) \ for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < (n); \ i += blockDim.x * gridDim.x) namespace { const int CUDA_NUM_THREADS = 1024; const int kMaxGridNum = 65535; inline int GET_BLOCKS(const int N) { return std::min(kMaxGridNum, (N + CUDA_NUM_THREADS - 1) / CUDA_NUM_THREADS); } } template __device__ scalar_t deformable_im2col_bilinear( const scalar_t* bottom_data, const int data_width, const int height, const int width, scalar_t h, scalar_t w) { int h_low = floor(h); int w_low = floor(w); int h_high = h_low + 1; int w_high = w_low + 1; scalar_t lh = h - h_low; scalar_t lw = w - w_low; scalar_t hh = 1 - lh, hw = 1 - lw; scalar_t v1 = 0; if (h_low >= 0 && w_low >= 0) v1 = bottom_data[h_low * data_width + w_low]; scalar_t v2 = 0; if (h_low >= 0 && w_high <= width - 1) v2 = bottom_data[h_low * data_width + w_high]; scalar_t v3 = 0; if (h_high <= height - 1 && w_low >= 0) v3 = bottom_data[h_high * data_width + w_low]; scalar_t v4 = 0; if (h_high <= height - 1 && w_high <= width - 1) v4 = bottom_data[h_high * data_width + w_high]; scalar_t w1 = hh * hw, w2 = hh * lw, w3 = lh * hw, w4 = lh * lw; scalar_t val = (w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4); return val; } template __device__ scalar_t get_gradient_weight( scalar_t argmax_h, scalar_t argmax_w, const int h, const int w, const int height, const int width) { if (argmax_h <= -1 || argmax_h >= height || argmax_w <= -1 || argmax_w >= width) { // empty return 0; } int argmax_h_low = floor(argmax_h); int argmax_w_low = floor(argmax_w); int argmax_h_high = argmax_h_low + 1; int argmax_w_high = argmax_w_low + 1; scalar_t weight = 0; if (h == argmax_h_low && w == argmax_w_low) weight = (h + 1 - argmax_h) * (w + 1 - argmax_w); if (h == argmax_h_low && w == argmax_w_high) weight = (h + 1 - argmax_h) * (argmax_w + 1 - w); if (h == argmax_h_high && w == argmax_w_low) weight = (argmax_h + 1 - h) * (w + 1 - argmax_w); if (h == argmax_h_high && w == argmax_w_high) weight = (argmax_h + 1 - h) * (argmax_w + 1 - w); return weight; } template __device__ scalar_t get_coordinate_weight( scalar_t argmax_h, scalar_t argmax_w, const int height, const int width, const scalar_t* im_data, const int data_width, const int bp_dir) { if (argmax_h <= -1 || argmax_h >= height || argmax_w <= -1 || argmax_w >= width) { // empty return 0; } int argmax_h_low = floor(argmax_h); int argmax_w_low = floor(argmax_w); int argmax_h_high = argmax_h_low + 1; int argmax_w_high = argmax_w_low + 1; scalar_t weight = 0; if (bp_dir == 0) { if (argmax_h_low >= 0 && argmax_w_low >= 0) weight += -1 * (argmax_w_low + 1 - argmax_w) * im_data[argmax_h_low * data_width + argmax_w_low]; if (argmax_h_low >= 0 && argmax_w_high <= width - 1) weight += -1 * (argmax_w - argmax_w_low) * im_data[argmax_h_low * data_width + argmax_w_high]; if (argmax_h_high <= height - 1 && argmax_w_low >= 0) weight += (argmax_w_low + 1 - argmax_w) * im_data[argmax_h_high * data_width + argmax_w_low]; if (argmax_h_high <= height - 1 && argmax_w_high <= width - 1) weight += (argmax_w - argmax_w_low) * im_data[argmax_h_high * data_width + argmax_w_high]; } else if (bp_dir == 1) { if (argmax_h_low >= 0 && argmax_w_low >= 0) weight += -1 * (argmax_h_low + 1 - argmax_h) * im_data[argmax_h_low * data_width + argmax_w_low]; if (argmax_h_low >= 0 && argmax_w_high <= width - 1) weight += (argmax_h_low + 1 - argmax_h) * im_data[argmax_h_low * data_width + argmax_w_high]; if (argmax_h_high <= height - 1 && argmax_w_low >= 0) weight += -1 * (argmax_h - argmax_h_low) * im_data[argmax_h_high * data_width + argmax_w_low]; if (argmax_h_high <= height - 1 && argmax_w_high <= width - 1) weight += (argmax_h - argmax_h_low) * im_data[argmax_h_high * data_width + argmax_w_high]; } return weight; } template __global__ void deformable_im2col_gpu_kernel( const int n, const scalar_t* data_im, const scalar_t* data_offset, const int height, const int width, const int kernel_h, const int kernel_w, const int pad_h, const int pad_w, const int stride_h, const int stride_w, const int dilation_h, const int dilation_w, const int channel_per_deformable_group, const int batch_size, const int num_channels, const int deformable_group, const int height_col, const int width_col, scalar_t* data_col) { CUDA_KERNEL_LOOP(index, n) { // index index of output matrix const int w_col = index % width_col; const int h_col = (index / width_col) % height_col; const int b_col = (index / width_col / height_col) % batch_size; const int c_im = (index / width_col / height_col) / batch_size; const int c_col = c_im * kernel_h * kernel_w; // compute deformable group index const int deformable_group_index = c_im / channel_per_deformable_group; const int h_in = h_col * stride_h - pad_h; const int w_in = w_col * stride_w - pad_w; scalar_t* data_col_ptr = data_col + ((c_col * batch_size + b_col) * height_col + h_col) * width_col + w_col; // const scalar_t* data_im_ptr = data_im + ((b_col * num_channels + c_im) * // height + h_in) * width + w_in; const scalar_t* data_im_ptr = data_im + (b_col * num_channels + c_im) * height * width; const scalar_t* data_offset_ptr = data_offset + (b_col * deformable_group + deformable_group_index) * 2 * kernel_h * kernel_w * height_col * width_col; for (int i = 0; i < kernel_h; ++i) { for (int j = 0; j < kernel_w; ++j) { const int data_offset_h_ptr = ((2 * (i * kernel_w + j)) * height_col + h_col) * width_col + w_col; const int data_offset_w_ptr = ((2 * (i * kernel_w + j) + 1) * height_col + h_col) * width_col + w_col; const scalar_t offset_h = data_offset_ptr[data_offset_h_ptr]; const scalar_t offset_w = data_offset_ptr[data_offset_w_ptr]; scalar_t val = static_cast(0); const scalar_t h_im = h_in + i * dilation_h + offset_h; const scalar_t w_im = w_in + j * dilation_w + offset_w; if (h_im > -1 && w_im > -1 && h_im < height && w_im < width) { // const scalar_t map_h = i * dilation_h + offset_h; // const scalar_t map_w = j * dilation_w + offset_w; // const int cur_height = height - h_in; // const int cur_width = width - w_in; // val = deformable_im2col_bilinear(data_im_ptr, width, cur_height, // cur_width, map_h, map_w); val = deformable_im2col_bilinear( data_im_ptr, width, height, width, h_im, w_im); } *data_col_ptr = val; data_col_ptr += batch_size * height_col * width_col; } } } } template __global__ void deformable_col2im_gpu_kernel( const int n, const scalar_t* data_col, const scalar_t* data_offset, const int channels, const int height, const int width, const int kernel_h, const int kernel_w, const int pad_h, const int pad_w, const int stride_h, const int stride_w, const int dilation_h, const int dilation_w, const int channel_per_deformable_group, const int batch_size, const int deformable_group, const int height_col, const int width_col, scalar_t* grad_im) { CUDA_KERNEL_LOOP(index, n) { const int j = (index / width_col / height_col / batch_size) % kernel_w; const int i = (index / width_col / height_col / batch_size / kernel_w) % kernel_h; const int c = index / width_col / height_col / batch_size / kernel_w / kernel_h; // compute the start and end of the output const int deformable_group_index = c / channel_per_deformable_group; int w_out = index % width_col; int h_out = (index / width_col) % height_col; int b = (index / width_col / height_col) % batch_size; int w_in = w_out * stride_w - pad_w; int h_in = h_out * stride_h - pad_h; const scalar_t* data_offset_ptr = data_offset + (b * deformable_group + deformable_group_index) * 2 * kernel_h * kernel_w * height_col * width_col; const int data_offset_h_ptr = ((2 * (i * kernel_w + j)) * height_col + h_out) * width_col + w_out; const int data_offset_w_ptr = ((2 * (i * kernel_w + j) + 1) * height_col + h_out) * width_col + w_out; const scalar_t offset_h = data_offset_ptr[data_offset_h_ptr]; const scalar_t offset_w = data_offset_ptr[data_offset_w_ptr]; const scalar_t cur_inv_h_data = h_in + i * dilation_h + offset_h; const scalar_t cur_inv_w_data = w_in + j * dilation_w + offset_w; const scalar_t cur_top_grad = data_col[index]; const int cur_h = (int)cur_inv_h_data; const int cur_w = (int)cur_inv_w_data; for (int dy = -2; dy <= 2; dy++) { for (int dx = -2; dx <= 2; dx++) { if (cur_h + dy >= 0 && cur_h + dy < height && cur_w + dx >= 0 && cur_w + dx < width && abs(cur_inv_h_data - (cur_h + dy)) < 1 && abs(cur_inv_w_data - (cur_w + dx)) < 1) { int cur_bottom_grad_pos = ((b * channels + c) * height + cur_h + dy) * width + cur_w + dx; scalar_t weight = get_gradient_weight( cur_inv_h_data, cur_inv_w_data, cur_h + dy, cur_w + dx, height, width); atomicAdd(grad_im + cur_bottom_grad_pos, weight * cur_top_grad); } } } } } template __global__ void deformable_col2im_coord_gpu_kernel( const int n, const scalar_t* data_col, const scalar_t* data_im, const scalar_t* data_offset, const int channels, const int height, const int width, const int kernel_h, const int kernel_w, const int pad_h, const int pad_w, const int stride_h, const int stride_w, const int dilation_h, const int dilation_w, const int channel_per_deformable_group, const int batch_size, const int offset_channels, const int deformable_group, const int height_col, const int width_col, scalar_t* grad_offset) { CUDA_KERNEL_LOOP(index, n) { scalar_t val = 0; int w = index % width_col; int h = (index / width_col) % height_col; int c = (index / width_col / height_col) % offset_channels; int b = (index / width_col / height_col) / offset_channels; // compute the start and end of the output const int deformable_group_index = c / (2 * kernel_h * kernel_w); const int col_step = kernel_h * kernel_w; int cnt = 0; const scalar_t* data_col_ptr = data_col + deformable_group_index * channel_per_deformable_group * batch_size * width_col * height_col; const scalar_t* data_im_ptr = data_im + (b * deformable_group + deformable_group_index) * channel_per_deformable_group / kernel_h / kernel_w * height * width; const scalar_t* data_offset_ptr = data_offset + (b * deformable_group + deformable_group_index) * 2 * kernel_h * kernel_w * height_col * width_col; const int offset_c = c - deformable_group_index * 2 * kernel_h * kernel_w; for (int col_c = (offset_c / 2); col_c < channel_per_deformable_group; col_c += col_step) { const int col_pos = (((col_c * batch_size + b) * height_col) + h) * width_col + w; const int bp_dir = offset_c % 2; int j = (col_pos / width_col / height_col / batch_size) % kernel_w; int i = (col_pos / width_col / height_col / batch_size / kernel_w) % kernel_h; int w_out = col_pos % width_col; int h_out = (col_pos / width_col) % height_col; int w_in = w_out * stride_w - pad_w; int h_in = h_out * stride_h - pad_h; const int data_offset_h_ptr = (((2 * (i * kernel_w + j)) * height_col + h_out) * width_col + w_out); const int data_offset_w_ptr = (((2 * (i * kernel_w + j) + 1) * height_col + h_out) * width_col + w_out); const scalar_t offset_h = data_offset_ptr[data_offset_h_ptr]; const scalar_t offset_w = data_offset_ptr[data_offset_w_ptr]; scalar_t inv_h = h_in + i * dilation_h + offset_h; scalar_t inv_w = w_in + j * dilation_w + offset_w; if (inv_h <= -1 || inv_w <= -1 || inv_h >= height || inv_w >= width) { inv_h = inv_w = -2; } const scalar_t weight = get_coordinate_weight( inv_h, inv_w, height, width, data_im_ptr + cnt * height * width, width, bp_dir); val += weight * data_col_ptr[col_pos]; cnt += 1; } grad_offset[index] = val; } } namespace detectron2 { void deformable_im2col( const at::Tensor data_im, const at::Tensor data_offset, const int channels, const int height, const int width, const int ksize_h, const int ksize_w, const int pad_h, const int pad_w, const int stride_h, const int stride_w, const int dilation_h, const int dilation_w, const int parallel_imgs, const int deformable_group, at::Tensor data_col) { // num_axes should be smaller than block size // todo: check parallel_imgs is correctly passed in int height_col = (height + 2 * pad_h - (dilation_h * (ksize_h - 1) + 1)) / stride_h + 1; int width_col = (width + 2 * pad_w - (dilation_w * (ksize_w - 1) + 1)) / stride_w + 1; int num_kernels = channels * height_col * width_col * parallel_imgs; int channel_per_deformable_group = channels / deformable_group; at::cuda::CUDAGuard device_guard(data_im.device()); cudaStream_t stream = at::cuda::getCurrentCUDAStream(); AT_DISPATCH_FLOATING_TYPES_AND_HALF( data_im.scalar_type(), "deformable_im2col_gpu", ([&] { const scalar_t* data_im_ = data_im.data_ptr(); const scalar_t* data_offset_ = data_offset.data_ptr(); scalar_t* data_col_ = data_col.data_ptr(); deformable_im2col_gpu_kernel<<< GET_BLOCKS(num_kernels), CUDA_NUM_THREADS, 0, stream>>>( num_kernels, data_im_, data_offset_, height, width, ksize_h, ksize_w, pad_h, pad_w, stride_h, stride_w, dilation_h, dilation_w, channel_per_deformable_group, parallel_imgs, channels, deformable_group, height_col, width_col, data_col_); })); cudaError_t err = cudaGetLastError(); if (err != cudaSuccess) { printf("error in deformable_im2col: %s\n", cudaGetErrorString(err)); } } void deformable_col2im( const at::Tensor data_col, const at::Tensor data_offset, const int channels, const int height, const int width, const int ksize_h, const int ksize_w, const int pad_h, const int pad_w, const int stride_h, const int stride_w, const int dilation_h, const int dilation_w, const int parallel_imgs, const int deformable_group, at::Tensor grad_im) { // todo: make sure parallel_imgs is passed in correctly int height_col = (height + 2 * pad_h - (dilation_h * (ksize_h - 1) + 1)) / stride_h + 1; int width_col = (width + 2 * pad_w - (dilation_w * (ksize_w - 1) + 1)) / stride_w + 1; int num_kernels = channels * ksize_h * ksize_w * height_col * width_col * parallel_imgs; int channel_per_deformable_group = channels / deformable_group; at::cuda::CUDAGuard device_guard(data_col.device()); cudaStream_t stream = at::cuda::getCurrentCUDAStream(); AT_DISPATCH_FLOATING_TYPES_AND_HALF( data_col.scalar_type(), "deformable_col2im_gpu", ([&] { const scalar_t* data_col_ = data_col.data_ptr(); const scalar_t* data_offset_ = data_offset.data_ptr(); scalar_t* grad_im_ = grad_im.data_ptr(); deformable_col2im_gpu_kernel<<< GET_BLOCKS(num_kernels), CUDA_NUM_THREADS, 0, stream>>>( num_kernels, data_col_, data_offset_, channels, height, width, ksize_h, ksize_w, pad_h, pad_w, stride_h, stride_w, dilation_h, dilation_w, channel_per_deformable_group, parallel_imgs, deformable_group, height_col, width_col, grad_im_); })); cudaError_t err = cudaGetLastError(); if (err != cudaSuccess) { printf("error in deformable_col2im: %s\n", cudaGetErrorString(err)); } } void deformable_col2im_coord( const at::Tensor data_col, const at::Tensor data_im, const at::Tensor data_offset, const int channels, const int height, const int width, const int ksize_h, const int ksize_w, const int pad_h, const int pad_w, const int stride_h, const int stride_w, const int dilation_h, const int dilation_w, const int parallel_imgs, const int deformable_group, at::Tensor grad_offset) { int height_col = (height + 2 * pad_h - (dilation_h * (ksize_h - 1) + 1)) / stride_h + 1; int width_col = (width + 2 * pad_w - (dilation_w * (ksize_w - 1) + 1)) / stride_w + 1; int num_kernels = height_col * width_col * 2 * ksize_h * ksize_w * deformable_group * parallel_imgs; int channel_per_deformable_group = channels * ksize_h * ksize_w / deformable_group; at::cuda::CUDAGuard device_guard(data_col.device()); cudaStream_t stream = at::cuda::getCurrentCUDAStream(); AT_DISPATCH_FLOATING_TYPES_AND_HALF( data_col.scalar_type(), "deformable_col2im_coord_gpu", ([&] { const scalar_t* data_col_ = data_col.data_ptr(); const scalar_t* data_im_ = data_im.data_ptr(); const scalar_t* data_offset_ = data_offset.data_ptr(); scalar_t* grad_offset_ = grad_offset.data_ptr(); deformable_col2im_coord_gpu_kernel<<< GET_BLOCKS(num_kernels), CUDA_NUM_THREADS, 0, stream>>>( num_kernels, data_col_, data_im_, data_offset_, channels, height, width, ksize_h, ksize_w, pad_h, pad_w, stride_h, stride_w, dilation_h, dilation_w, channel_per_deformable_group, parallel_imgs, 2 * ksize_h * ksize_w * deformable_group, deformable_group, height_col, width_col, grad_offset_); })); } } // namespace detectron2 template __device__ scalar_t dmcn_im2col_bilinear( const scalar_t* bottom_data, const int data_width, const int height, const int width, scalar_t h, scalar_t w) { int h_low = floor(h); int w_low = floor(w); int h_high = h_low + 1; int w_high = w_low + 1; scalar_t lh = h - h_low; scalar_t lw = w - w_low; scalar_t hh = 1 - lh, hw = 1 - lw; scalar_t v1 = 0; if (h_low >= 0 && w_low >= 0) v1 = bottom_data[h_low * data_width + w_low]; scalar_t v2 = 0; if (h_low >= 0 && w_high <= width - 1) v2 = bottom_data[h_low * data_width + w_high]; scalar_t v3 = 0; if (h_high <= height - 1 && w_low >= 0) v3 = bottom_data[h_high * data_width + w_low]; scalar_t v4 = 0; if (h_high <= height - 1 && w_high <= width - 1) v4 = bottom_data[h_high * data_width + w_high]; scalar_t w1 = hh * hw, w2 = hh * lw, w3 = lh * hw, w4 = lh * lw; scalar_t val = (w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4); return val; } template __device__ scalar_t dmcn_get_gradient_weight( scalar_t argmax_h, scalar_t argmax_w, const int h, const int w, const int height, const int width) { if (argmax_h <= -1 || argmax_h >= height || argmax_w <= -1 || argmax_w >= width) { // empty return 0; } int argmax_h_low = floor(argmax_h); int argmax_w_low = floor(argmax_w); int argmax_h_high = argmax_h_low + 1; int argmax_w_high = argmax_w_low + 1; scalar_t weight = 0; if (h == argmax_h_low && w == argmax_w_low) weight = (h + 1 - argmax_h) * (w + 1 - argmax_w); if (h == argmax_h_low && w == argmax_w_high) weight = (h + 1 - argmax_h) * (argmax_w + 1 - w); if (h == argmax_h_high && w == argmax_w_low) weight = (argmax_h + 1 - h) * (w + 1 - argmax_w); if (h == argmax_h_high && w == argmax_w_high) weight = (argmax_h + 1 - h) * (argmax_w + 1 - w); return weight; } template __device__ scalar_t dmcn_get_coordinate_weight( scalar_t argmax_h, scalar_t argmax_w, const int height, const int width, const scalar_t* im_data, const int data_width, const int bp_dir) { if (argmax_h <= -1 || argmax_h >= height || argmax_w <= -1 || argmax_w >= width) { // empty return 0; } int argmax_h_low = floor(argmax_h); int argmax_w_low = floor(argmax_w); int argmax_h_high = argmax_h_low + 1; int argmax_w_high = argmax_w_low + 1; scalar_t weight = 0; if (bp_dir == 0) { if (argmax_h_low >= 0 && argmax_w_low >= 0) weight += -1 * (argmax_w_low + 1 - argmax_w) * im_data[argmax_h_low * data_width + argmax_w_low]; if (argmax_h_low >= 0 && argmax_w_high <= width - 1) weight += -1 * (argmax_w - argmax_w_low) * im_data[argmax_h_low * data_width + argmax_w_high]; if (argmax_h_high <= height - 1 && argmax_w_low >= 0) weight += (argmax_w_low + 1 - argmax_w) * im_data[argmax_h_high * data_width + argmax_w_low]; if (argmax_h_high <= height - 1 && argmax_w_high <= width - 1) weight += (argmax_w - argmax_w_low) * im_data[argmax_h_high * data_width + argmax_w_high]; } else if (bp_dir == 1) { if (argmax_h_low >= 0 && argmax_w_low >= 0) weight += -1 * (argmax_h_low + 1 - argmax_h) * im_data[argmax_h_low * data_width + argmax_w_low]; if (argmax_h_low >= 0 && argmax_w_high <= width - 1) weight += (argmax_h_low + 1 - argmax_h) * im_data[argmax_h_low * data_width + argmax_w_high]; if (argmax_h_high <= height - 1 && argmax_w_low >= 0) weight += -1 * (argmax_h - argmax_h_low) * im_data[argmax_h_high * data_width + argmax_w_low]; if (argmax_h_high <= height - 1 && argmax_w_high <= width - 1) weight += (argmax_h - argmax_h_low) * im_data[argmax_h_high * data_width + argmax_w_high]; } return weight; } template __global__ void modulated_deformable_im2col_gpu_kernel( const int n, const scalar_t* data_im, const scalar_t* data_offset, const scalar_t* data_mask, const int height, const int width, const int kernel_h, const int kernel_w, const int pad_h, const int pad_w, const int stride_h, const int stride_w, const int dilation_h, const int dilation_w, const int channel_per_deformable_group, const int batch_size, const int num_channels, const int deformable_group, const int height_col, const int width_col, scalar_t* data_col) { CUDA_KERNEL_LOOP(index, n) { // index index of output matrix const int w_col = index % width_col; const int h_col = (index / width_col) % height_col; const int b_col = (index / width_col / height_col) % batch_size; const int c_im = (index / width_col / height_col) / batch_size; const int c_col = c_im * kernel_h * kernel_w; // compute deformable group index const int deformable_group_index = c_im / channel_per_deformable_group; const int h_in = h_col * stride_h - pad_h; const int w_in = w_col * stride_w - pad_w; scalar_t* data_col_ptr = data_col + ((c_col * batch_size + b_col) * height_col + h_col) * width_col + w_col; // const float* data_im_ptr = data_im + ((b_col * num_channels + c_im) * // height + h_in) * width + w_in; const scalar_t* data_im_ptr = data_im + (b_col * num_channels + c_im) * height * width; const scalar_t* data_offset_ptr = data_offset + (b_col * deformable_group + deformable_group_index) * 2 * kernel_h * kernel_w * height_col * width_col; const scalar_t* data_mask_ptr = data_mask + (b_col * deformable_group + deformable_group_index) * kernel_h * kernel_w * height_col * width_col; for (int i = 0; i < kernel_h; ++i) { for (int j = 0; j < kernel_w; ++j) { const int data_offset_h_ptr = ((2 * (i * kernel_w + j)) * height_col + h_col) * width_col + w_col; const int data_offset_w_ptr = ((2 * (i * kernel_w + j) + 1) * height_col + h_col) * width_col + w_col; const int data_mask_hw_ptr = ((i * kernel_w + j) * height_col + h_col) * width_col + w_col; const scalar_t offset_h = data_offset_ptr[data_offset_h_ptr]; const scalar_t offset_w = data_offset_ptr[data_offset_w_ptr]; const scalar_t mask = data_mask_ptr[data_mask_hw_ptr]; scalar_t val = static_cast(0); const scalar_t h_im = h_in + i * dilation_h + offset_h; const scalar_t w_im = w_in + j * dilation_w + offset_w; // if (h_im >= 0 && w_im >= 0 && h_im < height && w_im < width) { if (h_im > -1 && w_im > -1 && h_im < height && w_im < width) { // const float map_h = i * dilation_h + offset_h; // const float map_w = j * dilation_w + offset_w; // const int cur_height = height - h_in; // const int cur_width = width - w_in; // val = dmcn_im2col_bilinear(data_im_ptr, width, cur_height, // cur_width, map_h, map_w); val = dmcn_im2col_bilinear( data_im_ptr, width, height, width, h_im, w_im); } *data_col_ptr = val * mask; data_col_ptr += batch_size * height_col * width_col; // data_col_ptr += height_col * width_col; } } } } template __global__ void modulated_deformable_col2im_gpu_kernel( const int n, const scalar_t* data_col, const scalar_t* data_offset, const scalar_t* data_mask, const int channels, const int height, const int width, const int kernel_h, const int kernel_w, const int pad_h, const int pad_w, const int stride_h, const int stride_w, const int dilation_h, const int dilation_w, const int channel_per_deformable_group, const int batch_size, const int deformable_group, const int height_col, const int width_col, scalar_t* grad_im) { CUDA_KERNEL_LOOP(index, n) { const int j = (index / width_col / height_col / batch_size) % kernel_w; const int i = (index / width_col / height_col / batch_size / kernel_w) % kernel_h; const int c = index / width_col / height_col / batch_size / kernel_w / kernel_h; // compute the start and end of the output const int deformable_group_index = c / channel_per_deformable_group; int w_out = index % width_col; int h_out = (index / width_col) % height_col; int b = (index / width_col / height_col) % batch_size; int w_in = w_out * stride_w - pad_w; int h_in = h_out * stride_h - pad_h; const scalar_t* data_offset_ptr = data_offset + (b * deformable_group + deformable_group_index) * 2 * kernel_h * kernel_w * height_col * width_col; const scalar_t* data_mask_ptr = data_mask + (b * deformable_group + deformable_group_index) * kernel_h * kernel_w * height_col * width_col; const int data_offset_h_ptr = ((2 * (i * kernel_w + j)) * height_col + h_out) * width_col + w_out; const int data_offset_w_ptr = ((2 * (i * kernel_w + j) + 1) * height_col + h_out) * width_col + w_out; const int data_mask_hw_ptr = ((i * kernel_w + j) * height_col + h_out) * width_col + w_out; const scalar_t offset_h = data_offset_ptr[data_offset_h_ptr]; const scalar_t offset_w = data_offset_ptr[data_offset_w_ptr]; const scalar_t mask = data_mask_ptr[data_mask_hw_ptr]; const scalar_t cur_inv_h_data = h_in + i * dilation_h + offset_h; const scalar_t cur_inv_w_data = w_in + j * dilation_w + offset_w; const scalar_t cur_top_grad = data_col[index] * mask; const int cur_h = (int)cur_inv_h_data; const int cur_w = (int)cur_inv_w_data; for (int dy = -2; dy <= 2; dy++) { for (int dx = -2; dx <= 2; dx++) { if (cur_h + dy >= 0 && cur_h + dy < height && cur_w + dx >= 0 && cur_w + dx < width && abs(cur_inv_h_data - (cur_h + dy)) < 1 && abs(cur_inv_w_data - (cur_w + dx)) < 1) { int cur_bottom_grad_pos = ((b * channels + c) * height + cur_h + dy) * width + cur_w + dx; scalar_t weight = dmcn_get_gradient_weight( cur_inv_h_data, cur_inv_w_data, cur_h + dy, cur_w + dx, height, width); atomicAdd(grad_im + cur_bottom_grad_pos, weight * cur_top_grad); } } } } } template __global__ void modulated_deformable_col2im_coord_gpu_kernel( const int n, const scalar_t* data_col, const scalar_t* data_im, const scalar_t* data_offset, const scalar_t* data_mask, const int channels, const int height, const int width, const int kernel_h, const int kernel_w, const int pad_h, const int pad_w, const int stride_h, const int stride_w, const int dilation_h, const int dilation_w, const int channel_per_deformable_group, const int batch_size, const int offset_channels, const int deformable_group, const int height_col, const int width_col, scalar_t* grad_offset, scalar_t* grad_mask) { CUDA_KERNEL_LOOP(index, n) { scalar_t val = 0, mval = 0; int w = index % width_col; int h = (index / width_col) % height_col; int c = (index / width_col / height_col) % offset_channels; int b = (index / width_col / height_col) / offset_channels; // compute the start and end of the output const int deformable_group_index = c / (2 * kernel_h * kernel_w); const int col_step = kernel_h * kernel_w; int cnt = 0; const scalar_t* data_col_ptr = data_col + deformable_group_index * channel_per_deformable_group * batch_size * width_col * height_col; const scalar_t* data_im_ptr = data_im + (b * deformable_group + deformable_group_index) * channel_per_deformable_group / kernel_h / kernel_w * height * width; const scalar_t* data_offset_ptr = data_offset + (b * deformable_group + deformable_group_index) * 2 * kernel_h * kernel_w * height_col * width_col; const scalar_t* data_mask_ptr = data_mask + (b * deformable_group + deformable_group_index) * kernel_h * kernel_w * height_col * width_col; const int offset_c = c - deformable_group_index * 2 * kernel_h * kernel_w; for (int col_c = (offset_c / 2); col_c < channel_per_deformable_group; col_c += col_step) { const int col_pos = (((col_c * batch_size + b) * height_col) + h) * width_col + w; const int bp_dir = offset_c % 2; int j = (col_pos / width_col / height_col / batch_size) % kernel_w; int i = (col_pos / width_col / height_col / batch_size / kernel_w) % kernel_h; int w_out = col_pos % width_col; int h_out = (col_pos / width_col) % height_col; int w_in = w_out * stride_w - pad_w; int h_in = h_out * stride_h - pad_h; const int data_offset_h_ptr = (((2 * (i * kernel_w + j)) * height_col + h_out) * width_col + w_out); const int data_offset_w_ptr = (((2 * (i * kernel_w + j) + 1) * height_col + h_out) * width_col + w_out); const int data_mask_hw_ptr = (((i * kernel_w + j) * height_col + h_out) * width_col + w_out); const scalar_t offset_h = data_offset_ptr[data_offset_h_ptr]; const scalar_t offset_w = data_offset_ptr[data_offset_w_ptr]; const scalar_t mask = data_mask_ptr[data_mask_hw_ptr]; scalar_t inv_h = h_in + i * dilation_h + offset_h; scalar_t inv_w = w_in + j * dilation_w + offset_w; if (inv_h <= -1 || inv_w <= -1 || inv_h >= height || inv_w >= width) { inv_h = inv_w = -2; } else { mval += data_col_ptr[col_pos] * dmcn_im2col_bilinear( data_im_ptr + cnt * height * width, width, height, width, inv_h, inv_w); } const scalar_t weight = dmcn_get_coordinate_weight( inv_h, inv_w, height, width, data_im_ptr + cnt * height * width, width, bp_dir); val += weight * data_col_ptr[col_pos] * mask; cnt += 1; } // KERNEL_ASSIGN(grad_offset[index], offset_req, val); grad_offset[index] = val; if (offset_c % 2 == 0) // KERNEL_ASSIGN(grad_mask[(((b * deformable_group + // deformable_group_index) * kernel_h * kernel_w + offset_c / 2) * // height_col + h) * width_col + w], mask_req, mval); grad_mask [(((b * deformable_group + deformable_group_index) * kernel_h * kernel_w + offset_c / 2) * height_col + h) * width_col + w] = mval; } } namespace detectron2 { void modulated_deformable_im2col_cuda( const at::Tensor data_im, const at::Tensor data_offset, const at::Tensor data_mask, const int batch_size, const int channels, const int height_im, const int width_im, const int height_col, const int width_col, const int kernel_h, const int kenerl_w, const int pad_h, const int pad_w, const int stride_h, const int stride_w, const int dilation_h, const int dilation_w, const int deformable_group, at::Tensor data_col) { // num_axes should be smaller than block size const int channel_per_deformable_group = channels / deformable_group; const int num_kernels = channels * batch_size * height_col * width_col; at::cuda::CUDAGuard device_guard(data_im.device()); cudaStream_t stream = at::cuda::getCurrentCUDAStream(); AT_DISPATCH_FLOATING_TYPES_AND_HALF( data_im.scalar_type(), "modulated_deformable_im2col_gpu", ([&] { const scalar_t* data_im_ = data_im.data_ptr(); const scalar_t* data_offset_ = data_offset.data_ptr(); const scalar_t* data_mask_ = data_mask.data_ptr(); scalar_t* data_col_ = data_col.data_ptr(); modulated_deformable_im2col_gpu_kernel<<< GET_BLOCKS(num_kernels), CUDA_NUM_THREADS, 0, stream>>>( num_kernels, data_im_, data_offset_, data_mask_, height_im, width_im, kernel_h, kenerl_w, pad_h, pad_w, stride_h, stride_w, dilation_h, dilation_w, channel_per_deformable_group, batch_size, channels, deformable_group, height_col, width_col, data_col_); })); cudaError_t err = cudaGetLastError(); if (err != cudaSuccess) { printf( "error in modulated_deformable_im2col_cuda: %s\n", cudaGetErrorString(err)); } } void modulated_deformable_col2im_cuda( const at::Tensor data_col, const at::Tensor data_offset, const at::Tensor data_mask, const int batch_size, const int channels, const int height_im, const int width_im, const int height_col, const int width_col, const int kernel_h, const int kernel_w, const int pad_h, const int pad_w, const int stride_h, const int stride_w, const int dilation_h, const int dilation_w, const int deformable_group, at::Tensor grad_im) { const int channel_per_deformable_group = channels / deformable_group; const int num_kernels = channels * kernel_h * kernel_w * batch_size * height_col * width_col; at::cuda::CUDAGuard device_guard(data_col.device()); cudaStream_t stream = at::cuda::getCurrentCUDAStream(); AT_DISPATCH_FLOATING_TYPES_AND_HALF( data_col.scalar_type(), "modulated_deformable_col2im_gpu", ([&] { const scalar_t* data_col_ = data_col.data_ptr(); const scalar_t* data_offset_ = data_offset.data_ptr(); const scalar_t* data_mask_ = data_mask.data_ptr(); scalar_t* grad_im_ = grad_im.data_ptr(); modulated_deformable_col2im_gpu_kernel<<< GET_BLOCKS(num_kernels), CUDA_NUM_THREADS, 0, stream>>>( num_kernels, data_col_, data_offset_, data_mask_, channels, height_im, width_im, kernel_h, kernel_w, pad_h, pad_w, stride_h, stride_w, dilation_h, dilation_w, channel_per_deformable_group, batch_size, deformable_group, height_col, width_col, grad_im_); })); cudaError_t err = cudaGetLastError(); if (err != cudaSuccess) { printf( "error in modulated_deformable_col2im_cuda: %s\n", cudaGetErrorString(err)); } } void modulated_deformable_col2im_coord_cuda( const at::Tensor data_col, const at::Tensor data_im, const at::Tensor data_offset, const at::Tensor data_mask, const int batch_size, const int channels, const int height_im, const int width_im, const int height_col, const int width_col, const int kernel_h, const int kernel_w, const int pad_h, const int pad_w, const int stride_h, const int stride_w, const int dilation_h, const int dilation_w, const int deformable_group, at::Tensor grad_offset, at::Tensor grad_mask) { const int num_kernels = batch_size * height_col * width_col * 2 * kernel_h * kernel_w * deformable_group; const int channel_per_deformable_group = channels * kernel_h * kernel_w / deformable_group; at::cuda::CUDAGuard device_guard(data_col.device()); cudaStream_t stream = at::cuda::getCurrentCUDAStream(); AT_DISPATCH_FLOATING_TYPES_AND_HALF( data_col.scalar_type(), "modulated_deformable_col2im_coord_gpu", ([&] { const scalar_t* data_col_ = data_col.data_ptr(); const scalar_t* data_im_ = data_im.data_ptr(); const scalar_t* data_offset_ = data_offset.data_ptr(); const scalar_t* data_mask_ = data_mask.data_ptr(); scalar_t* grad_offset_ = grad_offset.data_ptr(); scalar_t* grad_mask_ = grad_mask.data_ptr(); modulated_deformable_col2im_coord_gpu_kernel<<< GET_BLOCKS(num_kernels), CUDA_NUM_THREADS, 0, stream>>>( num_kernels, data_col_, data_im_, data_offset_, data_mask_, channels, height_im, width_im, kernel_h, kernel_w, pad_h, pad_w, stride_h, stride_w, dilation_h, dilation_w, channel_per_deformable_group, batch_size, 2 * kernel_h * kernel_w * deformable_group, deformable_group, height_col, width_col, grad_offset_, grad_mask_); })); cudaError_t err = cudaGetLastError(); if (err != cudaSuccess) { printf( "error in modulated_deformable_col2im_coord_cuda: %s\n", cudaGetErrorString(err)); } } } // namespace detectron2 ================================================ FILE: detectron2/layers/csrc/nms_rotated/nms_rotated.h ================================================ // Copyright (c) Facebook, Inc. and its affiliates. #pragma once #include namespace detectron2 { at::Tensor nms_rotated_cpu( const at::Tensor& dets, const at::Tensor& scores, const double iou_threshold); #if defined(WITH_CUDA) || defined(WITH_HIP) at::Tensor nms_rotated_cuda( const at::Tensor& dets, const at::Tensor& scores, const double iou_threshold); #endif // Interface for Python // inline is needed to prevent multiple function definitions when this header is // included by different cpps inline at::Tensor nms_rotated( const at::Tensor& dets, const at::Tensor& scores, const double iou_threshold) { assert(dets.device().is_cuda() == scores.device().is_cuda()); if (dets.device().is_cuda()) { #if defined(WITH_CUDA) || defined(WITH_HIP) return nms_rotated_cuda( dets.contiguous(), scores.contiguous(), iou_threshold); #else AT_ERROR("Detectron2 is not compiled with GPU support!"); #endif } return nms_rotated_cpu(dets.contiguous(), scores.contiguous(), iou_threshold); } } // namespace detectron2 ================================================ FILE: detectron2/layers/csrc/nms_rotated/nms_rotated_cpu.cpp ================================================ // Copyright (c) Facebook, Inc. and its affiliates. #include "../box_iou_rotated/box_iou_rotated_utils.h" #include "nms_rotated.h" namespace detectron2 { template at::Tensor nms_rotated_cpu_kernel( const at::Tensor& dets, const at::Tensor& scores, const double iou_threshold) { // nms_rotated_cpu_kernel is modified from torchvision's nms_cpu_kernel, // however, the code in this function is much shorter because // we delegate the IoU computation for rotated boxes to // the single_box_iou_rotated function in box_iou_rotated_utils.h AT_ASSERTM(dets.device().is_cpu(), "dets must be a CPU tensor"); AT_ASSERTM(scores.device().is_cpu(), "scores must be a CPU tensor"); AT_ASSERTM( dets.scalar_type() == scores.scalar_type(), "dets should have the same type as scores"); if (dets.numel() == 0) { return at::empty({0}, dets.options().dtype(at::kLong)); } auto order_t = std::get<1>(scores.sort(0, /* descending=*/true)); auto ndets = dets.size(0); at::Tensor suppressed_t = at::zeros({ndets}, dets.options().dtype(at::kByte)); at::Tensor keep_t = at::zeros({ndets}, dets.options().dtype(at::kLong)); auto suppressed = suppressed_t.data_ptr(); auto keep = keep_t.data_ptr(); auto order = order_t.data_ptr(); int64_t num_to_keep = 0; for (int64_t _i = 0; _i < ndets; _i++) { auto i = order[_i]; if (suppressed[i] == 1) { continue; } keep[num_to_keep++] = i; for (int64_t _j = _i + 1; _j < ndets; _j++) { auto j = order[_j]; if (suppressed[j] == 1) { continue; } auto ovr = single_box_iou_rotated( dets[i].data_ptr(), dets[j].data_ptr()); if (ovr >= iou_threshold) { suppressed[j] = 1; } } } return keep_t.narrow(/*dim=*/0, /*start=*/0, /*length=*/num_to_keep); } at::Tensor nms_rotated_cpu( // input must be contiguous const at::Tensor& dets, const at::Tensor& scores, const double iou_threshold) { auto result = at::empty({0}, dets.options()); AT_DISPATCH_FLOATING_TYPES(dets.scalar_type(), "nms_rotated", [&] { result = nms_rotated_cpu_kernel(dets, scores, iou_threshold); }); return result; } } // namespace detectron2 ================================================ FILE: detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu ================================================ // Copyright (c) Facebook, Inc. and its affiliates. #include #include #include #include #ifdef WITH_CUDA #include "../box_iou_rotated/box_iou_rotated_utils.h" #endif // TODO avoid this when pytorch supports "same directory" hipification #ifdef WITH_HIP #include "box_iou_rotated/box_iou_rotated_utils.h" #endif using namespace detectron2; namespace { int const threadsPerBlock = sizeof(unsigned long long) * 8; } template __global__ void nms_rotated_cuda_kernel( const int n_boxes, const double iou_threshold, const T* dev_boxes, unsigned long long* dev_mask) { // nms_rotated_cuda_kernel is modified from torchvision's nms_cuda_kernel const int row_start = blockIdx.y; const int col_start = blockIdx.x; // if (row_start > col_start) return; const int row_size = min(n_boxes - row_start * threadsPerBlock, threadsPerBlock); const int col_size = min(n_boxes - col_start * threadsPerBlock, threadsPerBlock); // Compared to nms_cuda_kernel, where each box is represented with 4 values // (x1, y1, x2, y2), each rotated box is represented with 5 values // (x_center, y_center, width, height, angle_degrees) here. __shared__ T block_boxes[threadsPerBlock * 5]; if (threadIdx.x < col_size) { block_boxes[threadIdx.x * 5 + 0] = dev_boxes[(threadsPerBlock * col_start + threadIdx.x) * 5 + 0]; block_boxes[threadIdx.x * 5 + 1] = dev_boxes[(threadsPerBlock * col_start + threadIdx.x) * 5 + 1]; block_boxes[threadIdx.x * 5 + 2] = dev_boxes[(threadsPerBlock * col_start + threadIdx.x) * 5 + 2]; block_boxes[threadIdx.x * 5 + 3] = dev_boxes[(threadsPerBlock * col_start + threadIdx.x) * 5 + 3]; block_boxes[threadIdx.x * 5 + 4] = dev_boxes[(threadsPerBlock * col_start + threadIdx.x) * 5 + 4]; } __syncthreads(); if (threadIdx.x < row_size) { const int cur_box_idx = threadsPerBlock * row_start + threadIdx.x; const T* cur_box = dev_boxes + cur_box_idx * 5; int i = 0; unsigned long long t = 0; int start = 0; if (row_start == col_start) { start = threadIdx.x + 1; } for (i = start; i < col_size; i++) { // Instead of devIoU used by original horizontal nms, here // we use the single_box_iou_rotated function from box_iou_rotated_utils.h if (single_box_iou_rotated(cur_box, block_boxes + i * 5) > iou_threshold) { t |= 1ULL << i; } } const int col_blocks = at::cuda::ATenCeilDiv(n_boxes, threadsPerBlock); dev_mask[cur_box_idx * col_blocks + col_start] = t; } } namespace detectron2 { at::Tensor nms_rotated_cuda( // input must be contiguous const at::Tensor& dets, const at::Tensor& scores, double iou_threshold) { // using scalar_t = float; AT_ASSERTM(dets.is_cuda(), "dets must be a CUDA tensor"); AT_ASSERTM(scores.is_cuda(), "scores must be a CUDA tensor"); at::cuda::CUDAGuard device_guard(dets.device()); auto order_t = std::get<1>(scores.sort(0, /* descending=*/true)); auto dets_sorted = dets.index_select(0, order_t); auto dets_num = dets.size(0); const int col_blocks = at::cuda::ATenCeilDiv(static_cast(dets_num), threadsPerBlock); at::Tensor mask = at::empty({dets_num * col_blocks}, dets.options().dtype(at::kLong)); dim3 blocks(col_blocks, col_blocks); dim3 threads(threadsPerBlock); cudaStream_t stream = at::cuda::getCurrentCUDAStream(); AT_DISPATCH_FLOATING_TYPES( dets_sorted.scalar_type(), "nms_rotated_kernel_cuda", [&] { nms_rotated_cuda_kernel<<>>( dets_num, iou_threshold, dets_sorted.data_ptr(), (unsigned long long*)mask.data_ptr()); }); at::Tensor mask_cpu = mask.to(at::kCPU); unsigned long long* mask_host = (unsigned long long*)mask_cpu.data_ptr(); std::vector remv(col_blocks); memset(&remv[0], 0, sizeof(unsigned long long) * col_blocks); at::Tensor keep = at::empty({dets_num}, dets.options().dtype(at::kLong).device(at::kCPU)); int64_t* keep_out = keep.data_ptr(); int num_to_keep = 0; for (int i = 0; i < dets_num; i++) { int nblock = i / threadsPerBlock; int inblock = i % threadsPerBlock; if (!(remv[nblock] & (1ULL << inblock))) { keep_out[num_to_keep++] = i; unsigned long long* p = mask_host + i * col_blocks; for (int j = nblock; j < col_blocks; j++) { remv[j] |= p[j]; } } } AT_CUDA_CHECK(cudaGetLastError()); return order_t.index( {keep.narrow(/*dim=*/0, /*start=*/0, /*length=*/num_to_keep) .to(order_t.device(), keep.scalar_type())}); } } // namespace detectron2 ================================================ FILE: detectron2/layers/csrc/vision.cpp ================================================ // Copyright (c) Facebook, Inc. and its affiliates. #include #include "ROIAlignRotated/ROIAlignRotated.h" #include "box_iou_rotated/box_iou_rotated.h" #include "cocoeval/cocoeval.h" #include "deformable/deform_conv.h" #include "nms_rotated/nms_rotated.h" namespace detectron2 { #if defined(WITH_CUDA) || defined(WITH_HIP) extern int get_cudart_version(); #endif std::string get_cuda_version() { #if defined(WITH_CUDA) || defined(WITH_HIP) std::ostringstream oss; #if defined(WITH_CUDA) oss << "CUDA "; #else oss << "HIP "; #endif // copied from // https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/cuda/detail/CUDAHooks.cpp#L231 auto printCudaStyleVersion = [&](int v) { oss << (v / 1000) << "." << (v / 10 % 100); if (v % 10 != 0) { oss << "." << (v % 10); } }; printCudaStyleVersion(get_cudart_version()); return oss.str(); #else // neither CUDA nor HIP return std::string("not available"); #endif } bool has_cuda() { #if defined(WITH_CUDA) return true; #else return false; #endif } // similar to // https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/Version.cpp std::string get_compiler_version() { std::ostringstream ss; #if defined(__GNUC__) #ifndef __clang__ #if ((__GNUC__ <= 4) && (__GNUC_MINOR__ <= 8)) #error "GCC >= 4.9 is required!" #endif { ss << "GCC " << __GNUC__ << "." << __GNUC_MINOR__; } #endif #endif #if defined(__clang_major__) { ss << "clang " << __clang_major__ << "." << __clang_minor__ << "." << __clang_patchlevel__; } #endif #if defined(_MSC_VER) { ss << "MSVC " << _MSC_FULL_VER; } #endif return ss.str(); } PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { m.def("get_compiler_version", &get_compiler_version, "get_compiler_version"); m.def("get_cuda_version", &get_cuda_version, "get_cuda_version"); m.def("has_cuda", &has_cuda, "has_cuda"); m.def("deform_conv_forward", &deform_conv_forward, "deform_conv_forward"); m.def( "deform_conv_backward_input", &deform_conv_backward_input, "deform_conv_backward_input"); m.def( "deform_conv_backward_filter", &deform_conv_backward_filter, "deform_conv_backward_filter"); m.def( "modulated_deform_conv_forward", &modulated_deform_conv_forward, "modulated_deform_conv_forward"); m.def( "modulated_deform_conv_backward", &modulated_deform_conv_backward, "modulated_deform_conv_backward"); m.def("COCOevalAccumulate", &COCOeval::Accumulate, "COCOeval::Accumulate"); m.def( "COCOevalEvaluateImages", &COCOeval::EvaluateImages, "COCOeval::EvaluateImages"); pybind11::class_(m, "InstanceAnnotation") .def(pybind11::init()); pybind11::class_(m, "ImageEvaluation") .def(pybind11::init<>()); } TORCH_LIBRARY(detectron2, m) { m.def("nms_rotated", &nms_rotated); m.def("box_iou_rotated", &box_iou_rotated); m.def("roi_align_rotated_forward", &ROIAlignRotated_forward); m.def("roi_align_rotated_backward", &ROIAlignRotated_backward); } } // namespace detectron2 ================================================ FILE: detectron2/layers/deform_conv.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. import math from functools import lru_cache import torch from torch import nn from torch.autograd import Function from torch.autograd.function import once_differentiable from torch.nn.modules.utils import _pair from torchvision.ops import deform_conv2d from detectron2.utils.develop import create_dummy_class, create_dummy_func from .wrappers import _NewEmptyTensorOp class _DeformConv(Function): @staticmethod def forward( ctx, input, offset, weight, stride=1, padding=0, dilation=1, groups=1, deformable_groups=1, im2col_step=64, ): if input is not None and input.dim() != 4: raise ValueError( "Expected 4D tensor as input, got {}D tensor instead.".format(input.dim()) ) ctx.stride = _pair(stride) ctx.padding = _pair(padding) ctx.dilation = _pair(dilation) ctx.groups = groups ctx.deformable_groups = deformable_groups ctx.im2col_step = im2col_step ctx.save_for_backward(input, offset, weight) output = input.new_empty( _DeformConv._output_size(input, weight, ctx.padding, ctx.dilation, ctx.stride) ) ctx.bufs_ = [input.new_empty(0), input.new_empty(0)] # columns, ones if not input.is_cuda: # TODO: let torchvision support full features of our deformconv. if deformable_groups != 1: raise NotImplementedError( "Deformable Conv with deformable_groups != 1 is not supported on CPUs!" ) return deform_conv2d( input, offset, weight, stride=stride, padding=padding, dilation=dilation ) else: cur_im2col_step = _DeformConv._cal_im2col_step(input.shape[0], ctx.im2col_step) assert (input.shape[0] % cur_im2col_step) == 0, "im2col step must divide batchsize" _C.deform_conv_forward( input, weight, offset, output, ctx.bufs_[0], ctx.bufs_[1], weight.size(3), weight.size(2), ctx.stride[1], ctx.stride[0], ctx.padding[1], ctx.padding[0], ctx.dilation[1], ctx.dilation[0], ctx.groups, ctx.deformable_groups, cur_im2col_step, ) return output @staticmethod @once_differentiable def backward(ctx, grad_output): input, offset, weight = ctx.saved_tensors grad_input = grad_offset = grad_weight = None if not grad_output.is_cuda: raise NotImplementedError("Deformable Conv is not supported on CPUs!") else: cur_im2col_step = _DeformConv._cal_im2col_step(input.shape[0], ctx.im2col_step) assert (input.shape[0] % cur_im2col_step) == 0, "im2col step must divide batchsize" if ctx.needs_input_grad[0] or ctx.needs_input_grad[1]: grad_input = torch.zeros_like(input) grad_offset = torch.zeros_like(offset) _C.deform_conv_backward_input( input, offset, grad_output, grad_input, grad_offset, weight, ctx.bufs_[0], weight.size(3), weight.size(2), ctx.stride[1], ctx.stride[0], ctx.padding[1], ctx.padding[0], ctx.dilation[1], ctx.dilation[0], ctx.groups, ctx.deformable_groups, cur_im2col_step, ) if ctx.needs_input_grad[2]: grad_weight = torch.zeros_like(weight) _C.deform_conv_backward_filter( input, offset, grad_output, grad_weight, ctx.bufs_[0], ctx.bufs_[1], weight.size(3), weight.size(2), ctx.stride[1], ctx.stride[0], ctx.padding[1], ctx.padding[0], ctx.dilation[1], ctx.dilation[0], ctx.groups, ctx.deformable_groups, 1, cur_im2col_step, ) return grad_input, grad_offset, grad_weight, None, None, None, None, None, None @staticmethod def _output_size(input, weight, padding, dilation, stride): channels = weight.size(0) output_size = (input.size(0), channels) for d in range(input.dim() - 2): in_size = input.size(d + 2) pad = padding[d] kernel = dilation[d] * (weight.size(d + 2) - 1) + 1 stride_ = stride[d] output_size += ((in_size + (2 * pad) - kernel) // stride_ + 1,) if not all(map(lambda s: s > 0, output_size)): raise ValueError( "convolution input is too small (output would be {})".format( "x".join(map(str, output_size)) ) ) return output_size @staticmethod @lru_cache(maxsize=128) def _cal_im2col_step(input_size, default_size): """ Calculate proper im2col step size, which should be divisible by input_size and not larger than prefer_size. Meanwhile the step size should be as large as possible to be more efficient. So we choose the largest one among all divisors of input_size which are smaller than prefer_size. :param input_size: input batch size . :param default_size: default preferred im2col step size. :return: the largest proper step size. """ if input_size <= default_size: return input_size best_step = 1 for step in range(2, min(int(math.sqrt(input_size)) + 1, default_size)): if input_size % step == 0: if input_size // step <= default_size: return input_size // step best_step = step return best_step class _ModulatedDeformConv(Function): @staticmethod def forward( ctx, input, offset, mask, weight, bias=None, stride=1, padding=0, dilation=1, groups=1, deformable_groups=1, ): ctx.stride = stride ctx.padding = padding ctx.dilation = dilation ctx.groups = groups ctx.deformable_groups = deformable_groups ctx.with_bias = bias is not None if not ctx.with_bias: bias = input.new_empty(1) # fake tensor if not input.is_cuda: raise NotImplementedError("Deformable Conv is not supported on CPUs!") if ( weight.requires_grad or mask.requires_grad or offset.requires_grad or input.requires_grad ): ctx.save_for_backward(input, offset, mask, weight, bias) output = input.new_empty(_ModulatedDeformConv._infer_shape(ctx, input, weight)) ctx._bufs = [input.new_empty(0), input.new_empty(0)] _C.modulated_deform_conv_forward( input, weight, bias, ctx._bufs[0], offset, mask, output, ctx._bufs[1], weight.shape[2], weight.shape[3], ctx.stride, ctx.stride, ctx.padding, ctx.padding, ctx.dilation, ctx.dilation, ctx.groups, ctx.deformable_groups, ctx.with_bias, ) return output @staticmethod @once_differentiable def backward(ctx, grad_output): if not grad_output.is_cuda: raise NotImplementedError("Deformable Conv is not supported on CPUs!") input, offset, mask, weight, bias = ctx.saved_tensors grad_input = torch.zeros_like(input) grad_offset = torch.zeros_like(offset) grad_mask = torch.zeros_like(mask) grad_weight = torch.zeros_like(weight) grad_bias = torch.zeros_like(bias) _C.modulated_deform_conv_backward( input, weight, bias, ctx._bufs[0], offset, mask, ctx._bufs[1], grad_input, grad_weight, grad_bias, grad_offset, grad_mask, grad_output, weight.shape[2], weight.shape[3], ctx.stride, ctx.stride, ctx.padding, ctx.padding, ctx.dilation, ctx.dilation, ctx.groups, ctx.deformable_groups, ctx.with_bias, ) if not ctx.with_bias: grad_bias = None return ( grad_input, grad_offset, grad_mask, grad_weight, grad_bias, None, None, None, None, None, ) @staticmethod def _infer_shape(ctx, input, weight): n = input.size(0) channels_out = weight.size(0) height, width = input.shape[2:4] kernel_h, kernel_w = weight.shape[2:4] height_out = ( height + 2 * ctx.padding - (ctx.dilation * (kernel_h - 1) + 1) ) // ctx.stride + 1 width_out = ( width + 2 * ctx.padding - (ctx.dilation * (kernel_w - 1) + 1) ) // ctx.stride + 1 return n, channels_out, height_out, width_out deform_conv = _DeformConv.apply modulated_deform_conv = _ModulatedDeformConv.apply class DeformConv(nn.Module): def __init__( self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, deformable_groups=1, bias=False, norm=None, activation=None, ): """ Deformable convolution from :paper:`deformconv`. Arguments are similar to :class:`Conv2D`. Extra arguments: Args: deformable_groups (int): number of groups used in deformable convolution. norm (nn.Module, optional): a normalization layer activation (callable(Tensor) -> Tensor): a callable activation function """ super(DeformConv, self).__init__() assert not bias assert in_channels % groups == 0, "in_channels {} cannot be divisible by groups {}".format( in_channels, groups ) assert ( out_channels % groups == 0 ), "out_channels {} cannot be divisible by groups {}".format(out_channels, groups) self.in_channels = in_channels self.out_channels = out_channels self.kernel_size = _pair(kernel_size) self.stride = _pair(stride) self.padding = _pair(padding) self.dilation = _pair(dilation) self.groups = groups self.deformable_groups = deformable_groups self.norm = norm self.activation = activation self.weight = nn.Parameter( torch.Tensor(out_channels, in_channels // self.groups, *self.kernel_size) ) self.bias = None nn.init.kaiming_uniform_(self.weight, nonlinearity="relu") def forward(self, x, offset): if x.numel() == 0: # When input is empty, we want to return a empty tensor with "correct" shape, # So that the following operations will not panic # if they check for the shape of the tensor. # This computes the height and width of the output tensor output_shape = [ (i + 2 * p - (di * (k - 1) + 1)) // s + 1 for i, p, di, k, s in zip( x.shape[-2:], self.padding, self.dilation, self.kernel_size, self.stride ) ] output_shape = [x.shape[0], self.weight.shape[0]] + output_shape return _NewEmptyTensorOp.apply(x, output_shape) x = deform_conv( x, offset, self.weight, self.stride, self.padding, self.dilation, self.groups, self.deformable_groups, ) if self.norm is not None: x = self.norm(x) if self.activation is not None: x = self.activation(x) return x def extra_repr(self): tmpstr = "in_channels=" + str(self.in_channels) tmpstr += ", out_channels=" + str(self.out_channels) tmpstr += ", kernel_size=" + str(self.kernel_size) tmpstr += ", stride=" + str(self.stride) tmpstr += ", padding=" + str(self.padding) tmpstr += ", dilation=" + str(self.dilation) tmpstr += ", groups=" + str(self.groups) tmpstr += ", deformable_groups=" + str(self.deformable_groups) tmpstr += ", bias=False" return tmpstr class ModulatedDeformConv(nn.Module): def __init__( self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, deformable_groups=1, bias=True, norm=None, activation=None, ): """ Modulated deformable convolution from :paper:`deformconv2`. Arguments are similar to :class:`Conv2D`. Extra arguments: Args: deformable_groups (int): number of groups used in deformable convolution. norm (nn.Module, optional): a normalization layer activation (callable(Tensor) -> Tensor): a callable activation function """ super(ModulatedDeformConv, self).__init__() self.in_channels = in_channels self.out_channels = out_channels self.kernel_size = _pair(kernel_size) self.stride = stride self.padding = padding self.dilation = dilation self.groups = groups self.deformable_groups = deformable_groups self.with_bias = bias self.norm = norm self.activation = activation self.weight = nn.Parameter( torch.Tensor(out_channels, in_channels // groups, *self.kernel_size) ) if bias: self.bias = nn.Parameter(torch.Tensor(out_channels)) else: self.bias = None nn.init.kaiming_uniform_(self.weight, nonlinearity="relu") if self.bias is not None: nn.init.constant_(self.bias, 0) def forward(self, x, offset, mask): if x.numel() == 0: output_shape = [ (i + 2 * p - (di * (k - 1) + 1)) // s + 1 for i, p, di, k, s in zip( x.shape[-2:], self.padding, self.dilation, self.kernel_size, self.stride ) ] output_shape = [x.shape[0], self.weight.shape[0]] + output_shape return _NewEmptyTensorOp.apply(x, output_shape) x = modulated_deform_conv( x, offset, mask, self.weight, self.bias, self.stride, self.padding, self.dilation, self.groups, self.deformable_groups, ) if self.norm is not None: x = self.norm(x) if self.activation is not None: x = self.activation(x) return x def extra_repr(self): tmpstr = "in_channels=" + str(self.in_channels) tmpstr += ", out_channels=" + str(self.out_channels) tmpstr += ", kernel_size=" + str(self.kernel_size) tmpstr += ", stride=" + str(self.stride) tmpstr += ", padding=" + str(self.padding) tmpstr += ", dilation=" + str(self.dilation) tmpstr += ", groups=" + str(self.groups) tmpstr += ", deformable_groups=" + str(self.deformable_groups) tmpstr += ", bias=" + str(self.with_bias) return tmpstr try: from detectron2 import _C except ImportError: # TODO: register ops natively so there is no need to import _C. _msg = "detectron2 is not compiled successfully, please build following the instructions!" _args = ("detectron2._C", _msg) DeformConv = create_dummy_class("DeformConv", *_args) ModulatedDeformConv = create_dummy_class("ModulatedDeformConv", *_args) deform_conv = create_dummy_func("deform_conv", *_args) modulated_deform_conv = create_dummy_func("modulated_deform_conv", *_args) ================================================ FILE: detectron2/layers/losses.py ================================================ import math import torch def diou_loss( boxes1: torch.Tensor, boxes2: torch.Tensor, reduction: str = "none", eps: float = 1e-7, ) -> torch.Tensor: """ Distance Intersection over Union Loss (Zhaohui Zheng et. al) https://arxiv.org/abs/1911.08287 Args: boxes1, boxes2 (Tensor): box locations in XYXY format, shape (N, 4) or (4,). reduction: 'none' | 'mean' | 'sum' 'none': No reduction will be applied to the output. 'mean': The output will be averaged. 'sum': The output will be summed. eps (float): small number to prevent division by zero """ x1, y1, x2, y2 = boxes1.unbind(dim=-1) x1g, y1g, x2g, y2g = boxes2.unbind(dim=-1) # TODO: use torch._assert_async() when pytorch 1.8 support is dropped assert (x2 >= x1).all(), "bad box: x1 larger than x2" assert (y2 >= y1).all(), "bad box: y1 larger than y2" # Intersection keypoints xkis1 = torch.max(x1, x1g) ykis1 = torch.max(y1, y1g) xkis2 = torch.min(x2, x2g) ykis2 = torch.min(y2, y2g) intsct = torch.zeros_like(x1) mask = (ykis2 > ykis1) & (xkis2 > xkis1) intsct[mask] = (xkis2[mask] - xkis1[mask]) * (ykis2[mask] - ykis1[mask]) union = (x2 - x1) * (y2 - y1) + (x2g - x1g) * (y2g - y1g) - intsct + eps iou = intsct / union # smallest enclosing box xc1 = torch.min(x1, x1g) yc1 = torch.min(y1, y1g) xc2 = torch.max(x2, x2g) yc2 = torch.max(y2, y2g) diag_len = ((xc2 - xc1) ** 2) + ((yc2 - yc1) ** 2) + eps # centers of boxes x_p = (x2 + x1) / 2 y_p = (y2 + y1) / 2 x_g = (x1g + x2g) / 2 y_g = (y1g + y2g) / 2 distance = ((x_p - x_g) ** 2) + ((y_p - y_g) ** 2) # Eqn. (7) loss = 1 - iou + (distance / diag_len) if reduction == "mean": loss = loss.mean() if loss.numel() > 0 else 0.0 * loss.sum() elif reduction == "sum": loss = loss.sum() return loss def ciou_loss( boxes1: torch.Tensor, boxes2: torch.Tensor, reduction: str = "none", eps: float = 1e-7, ) -> torch.Tensor: """ Complete Intersection over Union Loss (Zhaohui Zheng et. al) https://arxiv.org/abs/1911.08287 Args: boxes1, boxes2 (Tensor): box locations in XYXY format, shape (N, 4) or (4,). reduction: 'none' | 'mean' | 'sum' 'none': No reduction will be applied to the output. 'mean': The output will be averaged. 'sum': The output will be summed. eps (float): small number to prevent division by zero """ x1, y1, x2, y2 = boxes1.unbind(dim=-1) x1g, y1g, x2g, y2g = boxes2.unbind(dim=-1) # TODO: use torch._assert_async() when pytorch 1.8 support is dropped assert (x2 >= x1).all(), "bad box: x1 larger than x2" assert (y2 >= y1).all(), "bad box: y1 larger than y2" # Intersection keypoints xkis1 = torch.max(x1, x1g) ykis1 = torch.max(y1, y1g) xkis2 = torch.min(x2, x2g) ykis2 = torch.min(y2, y2g) intsct = torch.zeros_like(x1) mask = (ykis2 > ykis1) & (xkis2 > xkis1) intsct[mask] = (xkis2[mask] - xkis1[mask]) * (ykis2[mask] - ykis1[mask]) union = (x2 - x1) * (y2 - y1) + (x2g - x1g) * (y2g - y1g) - intsct + eps iou = intsct / union # smallest enclosing box xc1 = torch.min(x1, x1g) yc1 = torch.min(y1, y1g) xc2 = torch.max(x2, x2g) yc2 = torch.max(y2, y2g) diag_len = ((xc2 - xc1) ** 2) + ((yc2 - yc1) ** 2) + eps # centers of boxes x_p = (x2 + x1) / 2 y_p = (y2 + y1) / 2 x_g = (x1g + x2g) / 2 y_g = (y1g + y2g) / 2 distance = ((x_p - x_g) ** 2) + ((y_p - y_g) ** 2) # width and height of boxes w_pred = x2 - x1 h_pred = y2 - y1 w_gt = x2g - x1g h_gt = y2g - y1g v = (4 / (math.pi**2)) * torch.pow((torch.atan(w_gt / h_gt) - torch.atan(w_pred / h_pred)), 2) with torch.no_grad(): alpha = v / (1 - iou + v + eps) # Eqn. (10) loss = 1 - iou + (distance / diag_len) + alpha * v if reduction == "mean": loss = loss.mean() if loss.numel() > 0 else 0.0 * loss.sum() elif reduction == "sum": loss = loss.sum() return loss ================================================ FILE: detectron2/layers/mask_ops.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. import numpy as np from typing import Tuple import torch from PIL import Image from torch.nn import functional as F __all__ = ["paste_masks_in_image"] BYTES_PER_FLOAT = 4 # TODO: This memory limit may be too much or too little. It would be better to # determine it based on available resources. GPU_MEM_LIMIT = 1024**3 # 1 GB memory limit def _do_paste_mask(masks, boxes, img_h: int, img_w: int, skip_empty: bool = True): """ Args: masks: N, 1, H, W boxes: N, 4 img_h, img_w (int): skip_empty (bool): only paste masks within the region that tightly bound all boxes, and returns the results this region only. An important optimization for CPU. Returns: if skip_empty == False, a mask of shape (N, img_h, img_w) if skip_empty == True, a mask of shape (N, h', w'), and the slice object for the corresponding region. """ # On GPU, paste all masks together (up to chunk size) # by using the entire image to sample the masks # Compared to pasting them one by one, # this has more operations but is faster on COCO-scale dataset. device = masks.device if skip_empty and not torch.jit.is_scripting(): x0_int, y0_int = torch.clamp(boxes.min(dim=0).values.floor()[:2] - 1, min=0).to( dtype=torch.int32 ) x1_int = torch.clamp(boxes[:, 2].max().ceil() + 1, max=img_w).to(dtype=torch.int32) y1_int = torch.clamp(boxes[:, 3].max().ceil() + 1, max=img_h).to(dtype=torch.int32) else: x0_int, y0_int = 0, 0 x1_int, y1_int = img_w, img_h x0, y0, x1, y1 = torch.split(boxes, 1, dim=1) # each is Nx1 N = masks.shape[0] img_y = torch.arange(y0_int, y1_int, device=device, dtype=torch.float32) + 0.5 img_x = torch.arange(x0_int, x1_int, device=device, dtype=torch.float32) + 0.5 img_y = (img_y - y0) / (y1 - y0) * 2 - 1 img_x = (img_x - x0) / (x1 - x0) * 2 - 1 # img_x, img_y have shapes (N, w), (N, h) gx = img_x[:, None, :].expand(N, img_y.size(1), img_x.size(1)) gy = img_y[:, :, None].expand(N, img_y.size(1), img_x.size(1)) grid = torch.stack([gx, gy], dim=3) if not torch.jit.is_scripting(): if not masks.dtype.is_floating_point: masks = masks.float() img_masks = F.grid_sample(masks, grid.to(masks.dtype), align_corners=False) if skip_empty and not torch.jit.is_scripting(): return img_masks[:, 0], (slice(y0_int, y1_int), slice(x0_int, x1_int)) else: return img_masks[:, 0], () # Annotate boxes as Tensor (but not Boxes) in order to use scripting @torch.jit.script_if_tracing def paste_masks_in_image( masks: torch.Tensor, boxes: torch.Tensor, image_shape: Tuple[int, int], threshold: float = 0.5 ): """ Paste a set of masks that are of a fixed resolution (e.g., 28 x 28) into an image. The location, height, and width for pasting each mask is determined by their corresponding bounding boxes in boxes. Note: This is a complicated but more accurate implementation. In actual deployment, it is often enough to use a faster but less accurate implementation. See :func:`paste_mask_in_image_old` in this file for an alternative implementation. Args: masks (tensor): Tensor of shape (Bimg, Hmask, Wmask), where Bimg is the number of detected object instances in the image and Hmask, Wmask are the mask width and mask height of the predicted mask (e.g., Hmask = Wmask = 28). Values are in [0, 1]. boxes (Boxes or Tensor): A Boxes of length Bimg or Tensor of shape (Bimg, 4). boxes[i] and masks[i] correspond to the same object instance. image_shape (tuple): height, width threshold (float): A threshold in [0, 1] for converting the (soft) masks to binary masks. Returns: img_masks (Tensor): A tensor of shape (Bimg, Himage, Wimage), where Bimg is the number of detected object instances and Himage, Wimage are the image width and height. img_masks[i] is a binary mask for object instance i. """ assert masks.shape[-1] == masks.shape[-2], "Only square mask predictions are supported" N = len(masks) if N == 0: return masks.new_empty((0,) + image_shape, dtype=torch.uint8) if not isinstance(boxes, torch.Tensor): boxes = boxes.tensor device = boxes.device assert len(boxes) == N, boxes.shape img_h, img_w = image_shape # The actual implementation split the input into chunks, # and paste them chunk by chunk. if device.type == "cpu" or torch.jit.is_scripting(): # CPU is most efficient when they are pasted one by one with skip_empty=True # so that it performs minimal number of operations. num_chunks = N else: # GPU benefits from parallelism for larger chunks, but may have memory issue # int(img_h) because shape may be tensors in tracing num_chunks = int(np.ceil(N * int(img_h) * int(img_w) * BYTES_PER_FLOAT / GPU_MEM_LIMIT)) assert ( num_chunks <= N ), "Default GPU_MEM_LIMIT in mask_ops.py is too small; try increasing it" chunks = torch.chunk(torch.arange(N, device=device), num_chunks) img_masks = torch.zeros( N, img_h, img_w, device=device, dtype=torch.bool if threshold >= 0 else torch.uint8 ) for inds in chunks: masks_chunk, spatial_inds = _do_paste_mask( masks[inds, None, :, :], boxes[inds], img_h, img_w, skip_empty=device.type == "cpu" ) if threshold >= 0: masks_chunk = (masks_chunk >= threshold).to(dtype=torch.bool) else: # for visualization and debugging masks_chunk = (masks_chunk * 255).to(dtype=torch.uint8) if torch.jit.is_scripting(): # Scripting does not use the optimized codepath img_masks[inds] = masks_chunk else: img_masks[(inds,) + spatial_inds] = masks_chunk return img_masks # The below are the original paste function (from Detectron1) which has # larger quantization error. # It is faster on CPU, while the aligned one is faster on GPU thanks to grid_sample. def paste_mask_in_image_old(mask, box, img_h, img_w, threshold): """ Paste a single mask in an image. This is a per-box implementation of :func:`paste_masks_in_image`. This function has larger quantization error due to incorrect pixel modeling and is not used any more. Args: mask (Tensor): A tensor of shape (Hmask, Wmask) storing the mask of a single object instance. Values are in [0, 1]. box (Tensor): A tensor of shape (4, ) storing the x0, y0, x1, y1 box corners of the object instance. img_h, img_w (int): Image height and width. threshold (float): Mask binarization threshold in [0, 1]. Returns: im_mask (Tensor): The resized and binarized object mask pasted into the original image plane (a tensor of shape (img_h, img_w)). """ # Conversion from continuous box coordinates to discrete pixel coordinates # via truncation (cast to int32). This determines which pixels to paste the # mask onto. box = box.to(dtype=torch.int32) # Continuous to discrete coordinate conversion # An example (1D) box with continuous coordinates (x0=0.7, x1=4.3) will map to # a discrete coordinates (x0=0, x1=4). Note that box is mapped to 5 = x1 - x0 + 1 # pixels (not x1 - x0 pixels). samples_w = box[2] - box[0] + 1 # Number of pixel samples, *not* geometric width samples_h = box[3] - box[1] + 1 # Number of pixel samples, *not* geometric height # Resample the mask from it's original grid to the new samples_w x samples_h grid mask = Image.fromarray(mask.cpu().numpy()) mask = mask.resize((samples_w, samples_h), resample=Image.BILINEAR) mask = np.array(mask, copy=False) if threshold >= 0: mask = np.array(mask > threshold, dtype=np.uint8) mask = torch.from_numpy(mask) else: # for visualization and debugging, we also # allow it to return an unmodified mask mask = torch.from_numpy(mask * 255).to(torch.uint8) im_mask = torch.zeros((img_h, img_w), dtype=torch.uint8) x_0 = max(box[0], 0) x_1 = min(box[2] + 1, img_w) y_0 = max(box[1], 0) y_1 = min(box[3] + 1, img_h) im_mask[y_0:y_1, x_0:x_1] = mask[ (y_0 - box[1]) : (y_1 - box[1]), (x_0 - box[0]) : (x_1 - box[0]) ] return im_mask # Our pixel modeling requires extrapolation for any continuous # coordinate < 0.5 or > length - 0.5. When sampling pixels on the masks, # we would like this extrapolation to be an interpolation between boundary values and zero, # instead of using absolute zero or boundary values. # Therefore `paste_mask_in_image_old` is often used with zero padding around the masks like this: # masks, scale = pad_masks(masks[:, 0, :, :], 1) # boxes = scale_boxes(boxes.tensor, scale) def pad_masks(masks, padding): """ Args: masks (tensor): A tensor of shape (B, M, M) representing B masks. padding (int): Number of cells to pad on all sides. Returns: The padded masks and the scale factor of the padding size / original size. """ B = masks.shape[0] M = masks.shape[-1] pad2 = 2 * padding scale = float(M + pad2) / M padded_masks = masks.new_zeros((B, M + pad2, M + pad2)) padded_masks[:, padding:-padding, padding:-padding] = masks return padded_masks, scale def scale_boxes(boxes, scale): """ Args: boxes (tensor): A tensor of shape (B, 4) representing B boxes with 4 coords representing the corners x0, y0, x1, y1, scale (float): The box scaling factor. Returns: Scaled boxes. """ w_half = (boxes[:, 2] - boxes[:, 0]) * 0.5 h_half = (boxes[:, 3] - boxes[:, 1]) * 0.5 x_c = (boxes[:, 2] + boxes[:, 0]) * 0.5 y_c = (boxes[:, 3] + boxes[:, 1]) * 0.5 w_half *= scale h_half *= scale scaled_boxes = torch.zeros_like(boxes) scaled_boxes[:, 0] = x_c - w_half scaled_boxes[:, 2] = x_c + w_half scaled_boxes[:, 1] = y_c - h_half scaled_boxes[:, 3] = y_c + h_half return scaled_boxes @torch.jit.script_if_tracing def _paste_masks_tensor_shape( masks: torch.Tensor, boxes: torch.Tensor, image_shape: Tuple[torch.Tensor, torch.Tensor], threshold: float = 0.5, ): """ A wrapper of paste_masks_in_image where image_shape is Tensor. During tracing, shapes might be tensors instead of ints. The Tensor->int conversion should be scripted rather than traced. """ return paste_masks_in_image(masks, boxes, (int(image_shape[0]), int(image_shape[1])), threshold) ================================================ FILE: detectron2/layers/nms.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. import torch from torchvision.ops import boxes as box_ops from torchvision.ops import nms # noqa . for compatibility def batched_nms( boxes: torch.Tensor, scores: torch.Tensor, idxs: torch.Tensor, iou_threshold: float ): """ Same as torchvision.ops.boxes.batched_nms, but with float(). """ assert boxes.shape[-1] == 4 # Note: Torchvision already has a strategy (https://github.com/pytorch/vision/issues/1311) # to decide whether to use coordinate trick or for loop to implement batched_nms. So we # just call it directly. # Fp16 does not have enough range for batched NMS, so adding float(). return box_ops.batched_nms(boxes.float(), scores, idxs, iou_threshold) # Note: this function (nms_rotated) might be moved into # torchvision/ops/boxes.py in the future def nms_rotated(boxes, scores, iou_threshold): """ Performs non-maximum suppression (NMS) on the rotated boxes according to their intersection-over-union (IoU). Rotated NMS iteratively removes lower scoring rotated boxes which have an IoU greater than iou_threshold with another (higher scoring) rotated box. Note that RotatedBox (5, 3, 4, 2, -90) covers exactly the same region as RotatedBox (5, 3, 4, 2, 90) does, and their IoU will be 1. However, they can be representing completely different objects in certain tasks, e.g., OCR. As for the question of whether rotated-NMS should treat them as faraway boxes even though their IOU is 1, it depends on the application and/or ground truth annotation. As an extreme example, consider a single character v and the square box around it. If the angle is 0 degree, the object (text) would be read as 'v'; If the angle is 90 degrees, the object (text) would become '>'; If the angle is 180 degrees, the object (text) would become '^'; If the angle is 270/-90 degrees, the object (text) would become '<' All of these cases have IoU of 1 to each other, and rotated NMS that only uses IoU as criterion would only keep one of them with the highest score - which, practically, still makes sense in most cases because typically only one of theses orientations is the correct one. Also, it does not matter as much if the box is only used to classify the object (instead of transcribing them with a sequential OCR recognition model) later. On the other hand, when we use IoU to filter proposals that are close to the ground truth during training, we should definitely take the angle into account if we know the ground truth is labeled with the strictly correct orientation (as in, upside-down words are annotated with -180 degrees even though they can be covered with a 0/90/-90 degree box, etc.) The way the original dataset is annotated also matters. For example, if the dataset is a 4-point polygon dataset that does not enforce ordering of vertices/orientation, we can estimate a minimum rotated bounding box to this polygon, but there's no way we can tell the correct angle with 100% confidence (as shown above, there could be 4 different rotated boxes, with angles differed by 90 degrees to each other, covering the exactly same region). In that case we have to just use IoU to determine the box proximity (as many detection benchmarks (even for text) do) unless there're other assumptions we can make (like width is always larger than height, or the object is not rotated by more than 90 degrees CCW/CW, etc.) In summary, not considering angles in rotated NMS seems to be a good option for now, but we should be aware of its implications. Args: boxes (Tensor[N, 5]): Rotated boxes to perform NMS on. They are expected to be in (x_center, y_center, width, height, angle_degrees) format. scores (Tensor[N]): Scores for each one of the rotated boxes iou_threshold (float): Discards all overlapping rotated boxes with IoU < iou_threshold Returns: keep (Tensor): int64 tensor with the indices of the elements that have been kept by Rotated NMS, sorted in decreasing order of scores """ return torch.ops.detectron2.nms_rotated(boxes, scores, iou_threshold) # Note: this function (batched_nms_rotated) might be moved into # torchvision/ops/boxes.py in the future def batched_nms_rotated(boxes, scores, idxs, iou_threshold): """ Performs non-maximum suppression in a batched fashion. Each index value correspond to a category, and NMS will not be applied between elements of different categories. Args: boxes (Tensor[N, 5]): boxes where NMS will be performed. They are expected to be in (x_ctr, y_ctr, width, height, angle_degrees) format scores (Tensor[N]): scores for each one of the boxes idxs (Tensor[N]): indices of the categories for each one of the boxes. iou_threshold (float): discards all overlapping boxes with IoU < iou_threshold Returns: Tensor: int64 tensor with the indices of the elements that have been kept by NMS, sorted in decreasing order of scores """ assert boxes.shape[-1] == 5 if boxes.numel() == 0: return torch.empty((0,), dtype=torch.int64, device=boxes.device) boxes = boxes.float() # fp16 does not have enough range for batched NMS # Strategy: in order to perform NMS independently per class, # we add an offset to all the boxes. The offset is dependent # only on the class idx, and is large enough so that boxes # from different classes do not overlap # Note that batched_nms in torchvision/ops/boxes.py only uses max_coordinate, # which won't handle negative coordinates correctly. # Here by using min_coordinate we can make sure the negative coordinates are # correctly handled. max_coordinate = ( torch.max(boxes[:, 0], boxes[:, 1]) + torch.max(boxes[:, 2], boxes[:, 3]) / 2 ).max() min_coordinate = ( torch.min(boxes[:, 0], boxes[:, 1]) - torch.max(boxes[:, 2], boxes[:, 3]) / 2 ).min() offsets = idxs.to(boxes) * (max_coordinate - min_coordinate + 1) boxes_for_nms = boxes.clone() # avoid modifying the original values in boxes boxes_for_nms[:, :2] += offsets[:, None] keep = nms_rotated(boxes_for_nms, scores, iou_threshold) return keep ================================================ FILE: detectron2/layers/roi_align.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. from torch import nn from torchvision.ops import roi_align # NOTE: torchvision's RoIAlign has a different default aligned=False class ROIAlign(nn.Module): def __init__(self, output_size, spatial_scale, sampling_ratio, aligned=True): """ Args: output_size (tuple): h, w spatial_scale (float): scale the input boxes by this number sampling_ratio (int): number of inputs samples to take for each output sample. 0 to take samples densely. aligned (bool): if False, use the legacy implementation in Detectron. If True, align the results more perfectly. Note: The meaning of aligned=True: Given a continuous coordinate c, its two neighboring pixel indices (in our pixel model) are computed by floor(c - 0.5) and ceil(c - 0.5). For example, c=1.3 has pixel neighbors with discrete indices [0] and [1] (which are sampled from the underlying signal at continuous coordinates 0.5 and 1.5). But the original roi_align (aligned=False) does not subtract the 0.5 when computing neighboring pixel indices and therefore it uses pixels with a slightly incorrect alignment (relative to our pixel model) when performing bilinear interpolation. With `aligned=True`, we first appropriately scale the ROI and then shift it by -0.5 prior to calling roi_align. This produces the correct neighbors; see detectron2/tests/test_roi_align.py for verification. The difference does not make a difference to the model's performance if ROIAlign is used together with conv layers. """ super().__init__() self.output_size = output_size self.spatial_scale = spatial_scale self.sampling_ratio = sampling_ratio self.aligned = aligned from torchvision import __version__ version = tuple(int(x) for x in __version__.split(".")[:2]) # https://github.com/pytorch/vision/pull/2438 assert version >= (0, 7), "Require torchvision >= 0.7" def forward(self, input, rois): """ Args: input: NCHW images rois: Bx5 boxes. First column is the index into N. The other 4 columns are xyxy. """ assert rois.dim() == 2 and rois.size(1) == 5 if input.is_quantized: input = input.dequantize() return roi_align( input, rois.to(dtype=input.dtype), self.output_size, self.spatial_scale, self.sampling_ratio, self.aligned, ) def __repr__(self): tmpstr = self.__class__.__name__ + "(" tmpstr += "output_size=" + str(self.output_size) tmpstr += ", spatial_scale=" + str(self.spatial_scale) tmpstr += ", sampling_ratio=" + str(self.sampling_ratio) tmpstr += ", aligned=" + str(self.aligned) tmpstr += ")" return tmpstr ================================================ FILE: detectron2/layers/roi_align_rotated.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. import torch from torch import nn from torch.autograd import Function from torch.autograd.function import once_differentiable from torch.nn.modules.utils import _pair class _ROIAlignRotated(Function): @staticmethod def forward(ctx, input, roi, output_size, spatial_scale, sampling_ratio): ctx.save_for_backward(roi) ctx.output_size = _pair(output_size) ctx.spatial_scale = spatial_scale ctx.sampling_ratio = sampling_ratio ctx.input_shape = input.size() output = torch.ops.detectron2.roi_align_rotated_forward( input, roi, spatial_scale, output_size[0], output_size[1], sampling_ratio ) return output @staticmethod @once_differentiable def backward(ctx, grad_output): (rois,) = ctx.saved_tensors output_size = ctx.output_size spatial_scale = ctx.spatial_scale sampling_ratio = ctx.sampling_ratio bs, ch, h, w = ctx.input_shape grad_input = torch.ops.detectron2.roi_align_rotated_backward( grad_output, rois, spatial_scale, output_size[0], output_size[1], bs, ch, h, w, sampling_ratio, ) return grad_input, None, None, None, None, None roi_align_rotated = _ROIAlignRotated.apply class ROIAlignRotated(nn.Module): def __init__(self, output_size, spatial_scale, sampling_ratio): """ Args: output_size (tuple): h, w spatial_scale (float): scale the input boxes by this number sampling_ratio (int): number of inputs samples to take for each output sample. 0 to take samples densely. Note: ROIAlignRotated supports continuous coordinate by default: Given a continuous coordinate c, its two neighboring pixel indices (in our pixel model) are computed by floor(c - 0.5) and ceil(c - 0.5). For example, c=1.3 has pixel neighbors with discrete indices [0] and [1] (which are sampled from the underlying signal at continuous coordinates 0.5 and 1.5). """ super(ROIAlignRotated, self).__init__() self.output_size = output_size self.spatial_scale = spatial_scale self.sampling_ratio = sampling_ratio def forward(self, input, rois): """ Args: input: NCHW images rois: Bx6 boxes. First column is the index into N. The other 5 columns are (x_ctr, y_ctr, width, height, angle_degrees). """ assert rois.dim() == 2 and rois.size(1) == 6 orig_dtype = input.dtype if orig_dtype == torch.float16: input = input.float() rois = rois.float() return roi_align_rotated( input, rois, self.output_size, self.spatial_scale, self.sampling_ratio ).to(dtype=orig_dtype) def __repr__(self): tmpstr = self.__class__.__name__ + "(" tmpstr += "output_size=" + str(self.output_size) tmpstr += ", spatial_scale=" + str(self.spatial_scale) tmpstr += ", sampling_ratio=" + str(self.sampling_ratio) tmpstr += ")" return tmpstr ================================================ FILE: detectron2/layers/rotated_boxes.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. from __future__ import absolute_import, division, print_function, unicode_literals import torch def pairwise_iou_rotated(boxes1, boxes2): """ Return intersection-over-union (Jaccard index) of boxes. Both sets of boxes are expected to be in (x_center, y_center, width, height, angle) format. Arguments: boxes1 (Tensor[N, 5]) boxes2 (Tensor[M, 5]) Returns: iou (Tensor[N, M]): the NxM matrix containing the pairwise IoU values for every element in boxes1 and boxes2 """ return torch.ops.detectron2.box_iou_rotated(boxes1, boxes2) ================================================ FILE: detectron2/layers/shape_spec.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. from dataclasses import dataclass from typing import Optional @dataclass class ShapeSpec: """ A simple structure that contains basic shape specification about a tensor. It is often used as the auxiliary inputs/outputs of models, to complement the lack of shape inference ability among pytorch modules. """ channels: Optional[int] = None height: Optional[int] = None width: Optional[int] = None stride: Optional[int] = None ================================================ FILE: detectron2/layers/wrappers.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. """ Wrappers around on some nn functions, mainly to support empty tensors. Ideally, add support directly in PyTorch to empty tensors in those functions. These can be removed once https://github.com/pytorch/pytorch/issues/12013 is implemented """ import warnings from typing import List, Optional import torch from torch.nn import functional as F def shapes_to_tensor(x: List[int], device: Optional[torch.device] = None) -> torch.Tensor: """ Turn a list of integer scalars or integer Tensor scalars into a vector, in a way that's both traceable and scriptable. In tracing, `x` should be a list of scalar Tensor, so the output can trace to the inputs. In scripting or eager, `x` should be a list of int. """ if torch.jit.is_scripting(): return torch.as_tensor(x, device=device) if torch.jit.is_tracing(): assert all( [isinstance(t, torch.Tensor) for t in x] ), "Shape should be tensor during tracing!" # as_tensor should not be used in tracing because it records a constant ret = torch.stack(x) if ret.device != device: # avoid recording a hard-coded device if not necessary ret = ret.to(device=device) return ret return torch.as_tensor(x, device=device) def cat(tensors: List[torch.Tensor], dim: int = 0): """ Efficient version of torch.cat that avoids a copy if there is only a single element in a list """ assert isinstance(tensors, (list, tuple)) if len(tensors) == 1: return tensors[0] return torch.cat(tensors, dim) def empty_input_loss_func_wrapper(loss_func): def wrapped_loss_func(input, target, *, reduction="mean", **kwargs): """ Same as `loss_func`, but returns 0 (instead of nan) for empty inputs. """ if target.numel() == 0 and reduction == "mean": return input.sum() * 0.0 # connect the gradient return loss_func(input, target, reduction=reduction, **kwargs) return wrapped_loss_func cross_entropy = empty_input_loss_func_wrapper(F.cross_entropy) class _NewEmptyTensorOp(torch.autograd.Function): @staticmethod def forward(ctx, x, new_shape): ctx.shape = x.shape return x.new_empty(new_shape) @staticmethod def backward(ctx, grad): shape = ctx.shape return _NewEmptyTensorOp.apply(grad, shape), None class Conv2d(torch.nn.Conv2d): """ A wrapper around :class:`torch.nn.Conv2d` to support empty inputs and more features. """ def __init__(self, *args, **kwargs): """ Extra keyword arguments supported in addition to those in `torch.nn.Conv2d`: Args: norm (nn.Module, optional): a normalization layer activation (callable(Tensor) -> Tensor): a callable activation function It assumes that norm layer is used before activation. """ norm = kwargs.pop("norm", None) activation = kwargs.pop("activation", None) super().__init__(*args, **kwargs) self.norm = norm self.activation = activation def forward(self, x): # torchscript does not support SyncBatchNorm yet # https://github.com/pytorch/pytorch/issues/40507 # and we skip these codes in torchscript since: # 1. currently we only support torchscript in evaluation mode # 2. features needed by exporting module to torchscript are added in PyTorch 1.6 or # later version, `Conv2d` in these PyTorch versions has already supported empty inputs. if not torch.jit.is_scripting(): with warnings.catch_warnings(record=True): if x.numel() == 0 and self.training: # https://github.com/pytorch/pytorch/issues/12013 assert not isinstance( self.norm, torch.nn.SyncBatchNorm ), "SyncBatchNorm does not support empty inputs!" x = F.conv2d( x, self.weight, self.bias, self.stride, self.padding, self.dilation, self.groups ) if self.norm is not None: x = self.norm(x) if self.activation is not None: x = self.activation(x) return x ConvTranspose2d = torch.nn.ConvTranspose2d BatchNorm2d = torch.nn.BatchNorm2d interpolate = F.interpolate Linear = torch.nn.Linear def nonzero_tuple(x): """ A 'as_tuple=True' version of torch.nonzero to support torchscript. because of https://github.com/pytorch/pytorch/issues/38718 """ if torch.jit.is_scripting(): if x.dim() == 0: return x.unsqueeze(0).nonzero().unbind(1) return x.nonzero().unbind(1) else: return x.nonzero(as_tuple=True) @torch.jit.script_if_tracing def move_device_like(src: torch.Tensor, dst: torch.Tensor) -> torch.Tensor: """ Tracing friendly way to cast tensor to another tensor's device. Device will be treated as constant during tracing, scripting the casting process as whole can workaround this issue. """ return src.to(dst.device) ================================================ FILE: detectron2/modeling/__init__.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import torch from detectron2.layers import ShapeSpec from .anchor_generator import build_anchor_generator, ANCHOR_GENERATOR_REGISTRY from .backbone import ( BACKBONE_REGISTRY, FPN, Backbone, ResNet, ResNetBlockBase, build_backbone, build_resnet_backbone, make_stage, ) from .meta_arch import ( META_ARCH_REGISTRY, SEM_SEG_HEADS_REGISTRY, GeneralizedRCNN, PanopticFPN, ProposalNetwork, RetinaNet, SemanticSegmentor, build_model, build_sem_seg_head, ) from .postprocessing import detector_postprocess from .proposal_generator import ( PROPOSAL_GENERATOR_REGISTRY, build_proposal_generator, RPN_HEAD_REGISTRY, build_rpn_head, ) from .roi_heads import ( ROI_BOX_HEAD_REGISTRY, ROI_HEADS_REGISTRY, ROI_KEYPOINT_HEAD_REGISTRY, ROI_MASK_HEAD_REGISTRY, ROIHeads, StandardROIHeads, build_box_head, build_keypoint_head, build_mask_head, build_roi_heads, ) from .test_time_augmentation import DatasetMapperTTA, GeneralizedRCNNWithTTA _EXCLUDE = {"torch", "ShapeSpec"} __all__ = [k for k in globals().keys() if k not in _EXCLUDE and not k.startswith("_")] assert ( torch.Tensor([1]) == torch.Tensor([2]) ).dtype == torch.bool, "Your Pytorch is too old. Please update to contain https://github.com/pytorch/pytorch/pull/21113" ================================================ FILE: detectron2/modeling/anchor_generator.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy import math from typing import List import torch from torch import nn from detectron2.layers import ShapeSpec from detectron2.structures import Boxes, RotatedBoxes from detectron2.utils.registry import Registry ANCHOR_GENERATOR_REGISTRY = Registry("ANCHOR_GENERATOR") """ Registry for modules that creates object detection anchors for feature maps. """ class BufferList(nn.Module): """ Similar to nn.ParameterList, but for buffers """ def __init__(self, buffers=None): super(BufferList, self).__init__() if buffers is not None: self.extend(buffers) def extend(self, buffers): offset = len(self) for i, buffer in enumerate(buffers): self.register_buffer(str(offset + i), buffer) return self def __len__(self): return len(self._buffers) def __iter__(self): return iter(self._buffers.values()) def _create_grid_offsets(size, stride, device): grid_height, grid_width = size shifts_x = torch.arange(0, grid_width * stride, step=stride, dtype=torch.float32, device=device) shifts_y = torch.arange( 0, grid_height * stride, step=stride, dtype=torch.float32, device=device ) shift_y, shift_x = torch.meshgrid(shifts_y, shifts_x) shift_x = shift_x.reshape(-1) shift_y = shift_y.reshape(-1) return shift_x, shift_y @ANCHOR_GENERATOR_REGISTRY.register() class DefaultAnchorGenerator(nn.Module): """ For a set of image sizes and feature maps, computes a set of anchors. """ def __init__(self, cfg, input_shape: List[ShapeSpec]): super().__init__() # fmt: off sizes = cfg.MODEL.ANCHOR_GENERATOR.SIZES aspect_ratios = cfg.MODEL.ANCHOR_GENERATOR.ASPECT_RATIOS self.strides = [x.stride for x in input_shape] # fmt: on """ sizes (list[list[int]]): sizes[i] is the list of anchor sizes to use for the i-th feature map. If len(sizes) == 1, then the same list of anchor sizes, given by sizes[0], is used for all feature maps. Anchor sizes are given in absolute lengths in units of the input image; they do not dynamically scale if the input image size changes. aspect_ratios (list[list[float]]): aspect_ratios[i] is the list of anchor aspect ratios to use for the i-th feature map. If len(aspect_ratios) == 1, then the same list of anchor aspect ratios, given by aspect_ratios[0], is used for all feature maps. strides (list[int]): stride of each input feature. """ self.num_features = len(self.strides) self.cell_anchors = self._calculate_anchors(sizes, aspect_ratios) def _calculate_anchors(self, sizes, aspect_ratios): # If one size (or aspect ratio) is specified and there are multiple feature # maps, then we "broadcast" anchors of that single size (or aspect ratio) # over all feature maps. if len(sizes) == 1: sizes *= self.num_features if len(aspect_ratios) == 1: aspect_ratios *= self.num_features assert self.num_features == len(sizes) assert self.num_features == len(aspect_ratios) cell_anchors = [ self.generate_cell_anchors(s, a).float() for s, a in zip(sizes, aspect_ratios) ] return BufferList(cell_anchors) @property def box_dim(self): """ Returns: int: the dimension of each anchor box. """ return 4 @property def num_cell_anchors(self): """ Returns: list[int]: Each int is the number of anchors at every pixel location, on that feature map. For example, if at every pixel we use anchors of 3 aspect ratios and 5 sizes, the number of anchors is 15. (See also ANCHOR_GENERATOR.SIZES and ANCHOR_GENERATOR.ASPECT_RATIOS in config) In standard RPN models, `num_cell_anchors` on every feature map is the same. """ return [len(cell_anchors) for cell_anchors in self.cell_anchors] def grid_anchors(self, grid_sizes): anchors = [] for size, stride, base_anchors in zip(grid_sizes, self.strides, self.cell_anchors): shift_x, shift_y = _create_grid_offsets(size, stride, base_anchors.device) shifts = torch.stack((shift_x, shift_y, shift_x, shift_y), dim=1) anchors.append((shifts.view(-1, 1, 4) + base_anchors.view(1, -1, 4)).reshape(-1, 4)) return anchors def generate_cell_anchors(self, sizes=(32, 64, 128, 256, 512), aspect_ratios=(0.5, 1, 2)): """ Generate a tensor storing anchor boxes, which are continuous geometric rectangles centered on one feature map point sample. We can later build the set of anchors for the entire feature map by tiling these tensors; see `meth:grid_anchors`. Args: sizes (tuple[float]): Absolute size of the anchors in the units of the input image (the input received by the network, after undergoing necessary scaling). The absolute size is given as the side length of a box. aspect_ratios (tuple[float]]): Aspect ratios of the boxes computed as box height / width. Returns: Tensor of shape (len(sizes) * len(aspect_ratios), 4) storing anchor boxes in XYXY format. """ # This is different from the anchor generator defined in the original Faster R-CNN # code or Detectron. They yield the same AP, however the old version defines cell # anchors in a less natural way with a shift relative to the feature grid and # quantization that results in slightly different sizes for different aspect ratios. # See also https://github.com/facebookresearch/Detectron/issues/227 anchors = [] for size in sizes: area = size ** 2.0 for aspect_ratio in aspect_ratios: # ... some algebra ... # w = sqrt(s * s / a) # h = a * w w = math.sqrt(area / aspect_ratio) h = aspect_ratio * w x0, y0, x1, y1 = -w / 2.0, -h / 2.0, w / 2.0, h / 2.0 anchors.append([x0, y0, x1, y1]) return torch.tensor(anchors) def forward(self, features): """ Args: features (list[Tensor]): list of backbone feature maps on which to generate anchors. Returns: list[list[Boxes]]: a list of #image elements. Each is a list of #feature level Boxes. The Boxes contains anchors of this image on the specific feature level. """ num_images = len(features[0]) grid_sizes = [feature_map.shape[-2:] for feature_map in features] anchors_over_all_feature_maps = self.grid_anchors(grid_sizes) anchors_in_image = [] for anchors_per_feature_map in anchors_over_all_feature_maps: boxes = Boxes(anchors_per_feature_map) anchors_in_image.append(boxes) anchors = [copy.deepcopy(anchors_in_image) for _ in range(num_images)] return anchors @ANCHOR_GENERATOR_REGISTRY.register() class RotatedAnchorGenerator(nn.Module): """ The anchor generator used by Rotated RPN (RRPN). """ def __init__(self, cfg, input_shape: List[ShapeSpec]): super().__init__() # fmt: off sizes = cfg.MODEL.ANCHOR_GENERATOR.SIZES aspect_ratios = cfg.MODEL.ANCHOR_GENERATOR.ASPECT_RATIOS angles = cfg.MODEL.ANCHOR_GENERATOR.ANGLES self.strides = [x.stride for x in input_shape] # fmt: on self.num_features = len(self.strides) self.cell_anchors = self._calculate_anchors(sizes, aspect_ratios, angles, self.strides) def _calculate_anchors(self, sizes, aspect_ratios, angles, feature_strides): """ Args: sizes (list[list[int]]): sizes[i] is the list of anchor sizes to use for the i-th feature map. If len(sizes) == 1, then the same list of anchor sizes, given by sizes[0], is used for all feature maps. Anchor sizes are given in absolute lengths in units of the input image; they do not dynamically scale if the input image size changes. aspect_ratios (list[list[float]]): aspect_ratios[i] is the list of anchor aspect ratios to use for the i-th feature map. If len(aspect_ratios) == 1, then the same list of anchor aspect ratios, given by aspect_ratios[0], is used for all feature maps. angles (list[list[float]]): angles[i] is the list of anchor angles to use for the i-th feature map. If len(angles) == 1, then the same list of anchor angles, given by angles[0], is used for all feature maps. feature_strides (list[number]): list of feature map strides (with respect to the input image) for each input feature map. """ # If one size (or aspect ratio) is specified and there are multiple feature # maps, then we "broadcast" anchors of that single size # (or aspect ratio/angle) over all feature maps. if len(sizes) == 1: sizes *= self.num_features if len(aspect_ratios) == 1: aspect_ratios *= self.num_features if len(angles) == 1: angles *= self.num_features assert self.num_features == len(sizes) assert self.num_features == len(aspect_ratios) assert self.num_features == len(angles) cell_anchors = [ self.generate_cell_anchors(size, aspect_ratio, angle).float() for size, aspect_ratio, angle in zip(sizes, aspect_ratios, angles) ] return BufferList(cell_anchors) @property def box_dim(self): """ Returns: int: the dimension of each anchor box. """ return 5 @property def num_cell_anchors(self): """ Returns: list[int]: Each int is the number of anchors at every pixel location, on that feature map. For example, if at every pixel we use anchors of 3 aspect ratios, 2 sizes and 5 angles, the number of anchors is 30. (See also ANCHOR_GENERATOR.SIZES, ANCHOR_GENERATOR.ASPECT_RATIOS and ANCHOR_GENERATOR.ANGLES in config) In standard RRPN models, `num_cell_anchors` on every feature map is the same. """ return [len(cell_anchors) for cell_anchors in self.cell_anchors] def grid_anchors(self, grid_sizes): anchors = [] for size, stride, base_anchors in zip(grid_sizes, self.strides, self.cell_anchors): shift_x, shift_y = _create_grid_offsets(size, stride, base_anchors.device) zeros = torch.zeros_like(shift_x) shifts = torch.stack((shift_x, shift_y, zeros, zeros, zeros), dim=1) anchors.append((shifts.view(-1, 1, 5) + base_anchors.view(1, -1, 5)).reshape(-1, 5)) return anchors def generate_cell_anchors( self, sizes=(32, 64, 128, 256, 512), aspect_ratios=(0.5, 1, 2), angles=(-90, -60, -30, 0, 30, 60, 90), ): """ Generate a tensor storing anchor boxes, which are continuous geometric rectangles centered on one feature map point sample. We can later build the set of anchors for the entire feature map by tiling these tensors; see `meth:grid_anchors`. Args: sizes (tuple[float]): Absolute size of the anchors in the units of the input image (the input received by the network, after undergoing necessary scaling). The absolute size is given as the side length of a box. aspect_ratios (tuple[float]]): Aspect ratios of the boxes computed as box height / width. angles (tuple[float]]): Angles of boxes indicating how many degrees the boxes are rotated counter-clockwise. Returns: Tensor of shape (len(sizes) * len(aspect_ratios) * len(angles), 5) storing anchor boxes in (x_ctr, y_ctr, w, h, angle) format. """ anchors = [] for size in sizes: area = size ** 2.0 for aspect_ratio in aspect_ratios: # s * s = w * h # a = h / w # ... some algebra ... # w = sqrt(s * s / a) # h = a * w w = math.sqrt(area / aspect_ratio) h = aspect_ratio * w anchors.extend([0, 0, w, h, a] for a in angles) return torch.tensor(anchors) def forward(self, features): """ Args: features (list[Tensor]): list of backbone feature maps on which to generate anchors. Returns: list[list[RotatedBoxes]]: a list of #image elements. Each is a list of #feature level RotatedBoxes. The RotatedBoxes contains anchors of this image on the specific feature level. """ num_images = len(features[0]) grid_sizes = [feature_map.shape[-2:] for feature_map in features] anchors_over_all_feature_maps = self.grid_anchors(grid_sizes) anchors_in_image = [] for anchors_per_feature_map in anchors_over_all_feature_maps: boxes = RotatedBoxes(anchors_per_feature_map) anchors_in_image.append(boxes) anchors = [copy.deepcopy(anchors_in_image) for _ in range(num_images)] return anchors def build_anchor_generator(cfg, input_shape): """ Built an anchor generator from `cfg.MODEL.ANCHOR_GENERATOR.NAME`. """ anchor_generator = cfg.MODEL.ANCHOR_GENERATOR.NAME return ANCHOR_GENERATOR_REGISTRY.get(anchor_generator)(cfg, input_shape) ================================================ FILE: detectron2/modeling/backbone/__init__.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .build import build_backbone, BACKBONE_REGISTRY # noqa F401 isort:skip from .backbone import Backbone from .fpn import FPN from .resnet import ResNet, ResNetBlockBase, build_resnet_backbone, make_stage # TODO can expose more resnet blocks after careful consideration ================================================ FILE: detectron2/modeling/backbone/backbone.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from abc import ABCMeta, abstractmethod import torch.nn as nn from detectron2.layers import ShapeSpec __all__ = ["Backbone"] class Backbone(nn.Module, metaclass=ABCMeta): """ Abstract base class for network backbones. """ def __init__(self): """ The `__init__` method of any subclass can specify its own set of arguments. """ super().__init__() @abstractmethod def forward(self): """ Subclasses must override this method, but adhere to the same return type. Returns: dict[str: Tensor]: mapping from feature name (e.g., "res2") to tensor """ pass @property def size_divisibility(self): """ Some backbones require the input height and width to be divisible by a specific integer. This is typically true for encoder / decoder type networks with lateral connection (e.g., FPN) for which feature maps need to match dimension in the "bottom up" and "top down" paths. Set to 0 if no specific input size divisibility is required. """ return 0 def output_shape(self): """ Returns: dict[str->ShapeSpec] """ # this is a backward-compatible default return { name: ShapeSpec( channels=self._out_feature_channels[name], stride=self._out_feature_strides[name] ) for name in self._out_features } # the properties below are not used any more @property def out_features(self): """deprecated""" return self._out_features @property def out_feature_strides(self): """deprecated""" return {f: self._out_feature_strides[f] for f in self._out_features} @property def out_feature_channels(self): """deprecated""" return {f: self._out_feature_channels[f] for f in self._out_features} ================================================ FILE: detectron2/modeling/backbone/build.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from detectron2.layers import ShapeSpec from detectron2.utils.registry import Registry from .backbone import Backbone BACKBONE_REGISTRY = Registry("BACKBONE") BACKBONE_REGISTRY.__doc__ = """ Registry for backbones, which extract feature maps from images The registered object must be a callable that accepts two arguments: 1. A :class:`detectron2.config.CfgNode` 2. A :class:`detectron2.layers.ShapeSpec`, which contains the input shape specification. It must returns an instance of :class:`Backbone`. """ def build_backbone(cfg, input_shape=None): """ Build a backbone from `cfg.MODEL.BACKBONE.NAME`. Returns: an instance of :class:`Backbone` """ if input_shape is None: input_shape = ShapeSpec(channels=len(cfg.MODEL.PIXEL_MEAN)) backbone_name = cfg.MODEL.BACKBONE.NAME backbone = BACKBONE_REGISTRY.get(backbone_name)(cfg, input_shape) assert isinstance(backbone, Backbone) return backbone ================================================ FILE: detectron2/modeling/backbone/fpn.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import math import fvcore.nn.weight_init as weight_init import torch.nn.functional as F from torch import nn from detectron2.layers import Conv2d, ShapeSpec, get_norm from .backbone import Backbone from .build import BACKBONE_REGISTRY from .resnet import build_resnet_backbone __all__ = ["build_resnet_fpn_backbone", "build_retinanet_resnet_fpn_backbone", "FPN"] class FPN(Backbone): """ This module implements Feature Pyramid Network. It creates pyramid features built on top of some input feature maps. """ def __init__( self, bottom_up, in_features, out_channels, norm="", top_block=None, fuse_type="sum" ): """ Args: bottom_up (Backbone): module representing the bottom up subnetwork. Must be a subclass of :class:`Backbone`. The multi-scale feature maps generated by the bottom up network, and listed in `in_features`, are used to generate FPN levels. in_features (list[str]): names of the input feature maps coming from the backbone to which FPN is attached. For example, if the backbone produces ["res2", "res3", "res4"], any *contiguous* sublist of these may be used; order must be from high to low resolution. out_channels (int): number of channels in the output feature maps. norm (str): the normalization to use. top_block (nn.Module or None): if provided, an extra operation will be performed on the output of the last (smallest resolution) FPN output, and the result will extend the result list. The top_block further downsamples the feature map. It must have an attribute "num_levels", meaning the number of extra FPN levels added by this block, and "in_feature", which is a string representing its input feature (e.g., p5). fuse_type (str): types for fusing the top down features and the lateral ones. It can be "sum" (default), which sums up element-wise; or "avg", which takes the element-wise mean of the two. """ super(FPN, self).__init__() assert isinstance(bottom_up, Backbone) # Feature map strides and channels from the bottom up network (e.g. ResNet) in_strides = [bottom_up.out_feature_strides[f] for f in in_features] in_channels = [bottom_up.out_feature_channels[f] for f in in_features] _assert_strides_are_log2_contiguous(in_strides) lateral_convs = [] output_convs = [] use_bias = norm == "" for idx, in_channels in enumerate(in_channels): lateral_norm = get_norm(norm, out_channels) output_norm = get_norm(norm, out_channels) lateral_conv = Conv2d( in_channels, out_channels, kernel_size=1, bias=use_bias, norm=lateral_norm ) output_conv = Conv2d( out_channels, out_channels, kernel_size=3, stride=1, padding=1, bias=use_bias, norm=output_norm, ) weight_init.c2_xavier_fill(lateral_conv) weight_init.c2_xavier_fill(output_conv) stage = int(math.log2(in_strides[idx])) self.add_module("fpn_lateral{}".format(stage), lateral_conv) self.add_module("fpn_output{}".format(stage), output_conv) lateral_convs.append(lateral_conv) output_convs.append(output_conv) # Place convs into top-down order (from low to high resolution) # to make the top-down computation in forward clearer. self.lateral_convs = lateral_convs[::-1] self.output_convs = output_convs[::-1] self.top_block = top_block self.in_features = in_features self.bottom_up = bottom_up # Return feature names are "p", like ["p2", "p3", ..., "p6"] self._out_feature_strides = {"p{}".format(int(math.log2(s))): s for s in in_strides} # top block output feature maps. if self.top_block is not None: for s in range(stage, stage + self.top_block.num_levels): self._out_feature_strides["p{}".format(s + 1)] = 2 ** (s + 1) self._out_features = list(self._out_feature_strides.keys()) self._out_feature_channels = {k: out_channels for k in self._out_features} self._size_divisibility = in_strides[-1] assert fuse_type in {"avg", "sum"} self._fuse_type = fuse_type @property def size_divisibility(self): return self._size_divisibility def forward(self, x): """ Args: input (dict[str: Tensor]): mapping feature map name (e.g., "res5") to feature map tensor for each feature level in high to low resolution order. Returns: dict[str: Tensor]: mapping from feature map name to FPN feature map tensor in high to low resolution order. Returned feature names follow the FPN paper convention: "p", where stage has stride = 2 ** stage e.g., ["p2", "p3", ..., "p6"]. """ # Reverse feature maps into top-down order (from low to high resolution) bottom_up_features = self.bottom_up(x) x = [bottom_up_features[f] for f in self.in_features[::-1]] results = [] prev_features = self.lateral_convs[0](x[0]) results.append(self.output_convs[0](prev_features)) for features, lateral_conv, output_conv in zip( x[1:], self.lateral_convs[1:], self.output_convs[1:] ): top_down_features = F.interpolate(prev_features, scale_factor=2, mode="nearest") lateral_features = lateral_conv(features) prev_features = lateral_features + top_down_features if self._fuse_type == "avg": prev_features /= 2 results.insert(0, output_conv(prev_features)) if self.top_block is not None: top_block_in_feature = bottom_up_features.get(self.top_block.in_feature, None) if top_block_in_feature is None: top_block_in_feature = results[self._out_features.index(self.top_block.in_feature)] results.extend(self.top_block(top_block_in_feature)) assert len(self._out_features) == len(results) return dict(zip(self._out_features, results)) def output_shape(self): return { name: ShapeSpec( channels=self._out_feature_channels[name], stride=self._out_feature_strides[name] ) for name in self._out_features } def _assert_strides_are_log2_contiguous(strides): """ Assert that each stride is 2x times its preceding stride, i.e. "contiguous in log2". """ for i, stride in enumerate(strides[1:], 1): assert stride == 2 * strides[i - 1], "Strides {} {} are not log2 contiguous".format( stride, strides[i - 1] ) class LastLevelMaxPool(nn.Module): """ This module is used in the original FPN to generate a downsampled P6 feature from P5. """ def __init__(self): super().__init__() self.num_levels = 1 self.in_feature = "p5" def forward(self, x): return [F.max_pool2d(x, kernel_size=1, stride=2, padding=0)] class LastLevelP6P7(nn.Module): """ This module is used in RetinaNet to generate extra layers, P6 and P7 from C5 feature. """ def __init__(self, in_channels, out_channels): super().__init__() self.num_levels = 2 self.in_feature = "res5" self.p6 = nn.Conv2d(in_channels, out_channels, 3, 2, 1) self.p7 = nn.Conv2d(out_channels, out_channels, 3, 2, 1) for module in [self.p6, self.p7]: weight_init.c2_xavier_fill(module) def forward(self, c5): p6 = self.p6(c5) p7 = self.p7(F.relu(p6)) return [p6, p7] @BACKBONE_REGISTRY.register() def build_resnet_fpn_backbone(cfg, input_shape: ShapeSpec): """ Args: cfg: a detectron2 CfgNode Returns: backbone (Backbone): backbone module, must be a subclass of :class:`Backbone`. """ bottom_up = build_resnet_backbone(cfg, input_shape) in_features = cfg.MODEL.FPN.IN_FEATURES out_channels = cfg.MODEL.FPN.OUT_CHANNELS backbone = FPN( bottom_up=bottom_up, in_features=in_features, out_channels=out_channels, norm=cfg.MODEL.FPN.NORM, top_block=LastLevelMaxPool(), fuse_type=cfg.MODEL.FPN.FUSE_TYPE, ) return backbone @BACKBONE_REGISTRY.register() def build_retinanet_resnet_fpn_backbone(cfg, input_shape: ShapeSpec): """ Args: cfg: a detectron2 CfgNode Returns: backbone (Backbone): backbone module, must be a subclass of :class:`Backbone`. """ bottom_up = build_resnet_backbone(cfg, input_shape) in_features = cfg.MODEL.FPN.IN_FEATURES out_channels = cfg.MODEL.FPN.OUT_CHANNELS in_channels_p6p7 = bottom_up.out_feature_channels["res5"] backbone = FPN( bottom_up=bottom_up, in_features=in_features, out_channels=out_channels, norm=cfg.MODEL.FPN.NORM, top_block=LastLevelP6P7(in_channels_p6p7, out_channels), fuse_type=cfg.MODEL.FPN.FUSE_TYPE, ) return backbone ================================================ FILE: detectron2/modeling/backbone/resnet.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import numpy as np import fvcore.nn.weight_init as weight_init import torch import torch.nn.functional as F from torch import nn from detectron2.layers import ( Conv2d, DeformConv, FrozenBatchNorm2d, ModulatedDeformConv, ShapeSpec, get_norm, ) from .backbone import Backbone from .build import BACKBONE_REGISTRY __all__ = [ "ResNetBlockBase", "BottleneckBlock", "DeformBottleneckBlock", "BasicStem", "ResNet", "make_stage", "build_resnet_backbone", ] class ResNetBlockBase(nn.Module): def __init__(self, in_channels, out_channels, stride): """ The `__init__` method of any subclass should also contain these arguments. Args: in_channels (int): out_channels (int): stride (int): """ super().__init__() self.in_channels = in_channels self.out_channels = out_channels self.stride = stride def freeze(self): for p in self.parameters(): p.requires_grad = False FrozenBatchNorm2d.convert_frozen_batchnorm(self) return self class BottleneckBlock(ResNetBlockBase): def __init__( self, in_channels, out_channels, *, bottleneck_channels, stride=1, num_groups=1, norm="BN", stride_in_1x1=False, dilation=1, ): """ Args: norm (str or callable): a callable that takes the number of channels and return a `nn.Module`, or a pre-defined string (one of {"FrozenBN", "BN", "GN"}). stride_in_1x1 (bool): when stride==2, whether to put stride in the first 1x1 convolution or the bottleneck 3x3 convolution. """ super().__init__(in_channels, out_channels, stride) if in_channels != out_channels: self.shortcut = Conv2d( in_channels, out_channels, kernel_size=1, stride=stride, bias=False, norm=get_norm(norm, out_channels), ) else: self.shortcut = None # The original MSRA ResNet models have stride in the first 1x1 conv # The subsequent fb.torch.resnet and Caffe2 ResNe[X]t implementations have # stride in the 3x3 conv stride_1x1, stride_3x3 = (stride, 1) if stride_in_1x1 else (1, stride) self.conv1 = Conv2d( in_channels, bottleneck_channels, kernel_size=1, stride=stride_1x1, bias=False, norm=get_norm(norm, bottleneck_channels), ) self.conv2 = Conv2d( bottleneck_channels, bottleneck_channels, kernel_size=3, stride=stride_3x3, padding=1 * dilation, bias=False, groups=num_groups, dilation=dilation, norm=get_norm(norm, bottleneck_channels), ) self.conv3 = Conv2d( bottleneck_channels, out_channels, kernel_size=1, bias=False, norm=get_norm(norm, out_channels), ) for layer in [self.conv1, self.conv2, self.conv3, self.shortcut]: if layer is not None: # shortcut can be None weight_init.c2_msra_fill(layer) # Zero-initialize the last normalization in each residual branch, # so that at the beginning, the residual branch starts with zeros, # and each residual block behaves like an identity. # See Sec 5.1 in "Accurate, Large Minibatch SGD: Training ImageNet in 1 Hour": # "For BN layers, the learnable scaling coefficient γ is initialized # to be 1, except for each residual block's last BN # where γ is initialized to be 0." # nn.init.constant_(self.conv3.norm.weight, 0) # TODO this somehow hurts performance when training GN models from scratch. # Add it as an option when we need to use this code to train a backbone. def forward(self, x): out = self.conv1(x) out = F.relu_(out) out = self.conv2(out) out = F.relu_(out) out = self.conv3(out) if self.shortcut is not None: shortcut = self.shortcut(x) else: shortcut = x out += shortcut out = F.relu_(out) return out class DeformBottleneckBlock(ResNetBlockBase): def __init__( self, in_channels, out_channels, *, bottleneck_channels, stride=1, num_groups=1, norm="BN", stride_in_1x1=False, dilation=1, deform_modulated=False, deform_num_groups=1, ): """ Similar to :class:`BottleneckBlock`, but with deformable conv in the 3x3 convolution. """ super().__init__(in_channels, out_channels, stride) self.deform_modulated = deform_modulated if in_channels != out_channels: self.shortcut = Conv2d( in_channels, out_channels, kernel_size=1, stride=stride, bias=False, norm=get_norm(norm, out_channels), ) else: self.shortcut = None stride_1x1, stride_3x3 = (stride, 1) if stride_in_1x1 else (1, stride) self.conv1 = Conv2d( in_channels, bottleneck_channels, kernel_size=1, stride=stride_1x1, bias=False, norm=get_norm(norm, bottleneck_channels), ) if deform_modulated: deform_conv_op = ModulatedDeformConv # offset channels are 2 or 3 (if with modulated) * kernel_size * kernel_size offset_channels = 27 else: deform_conv_op = DeformConv offset_channels = 18 self.conv2_offset = Conv2d( bottleneck_channels, offset_channels * deform_num_groups, kernel_size=3, stride=stride_3x3, padding=1 * dilation, dilation=dilation, ) self.conv2 = deform_conv_op( bottleneck_channels, bottleneck_channels, kernel_size=3, stride=stride_3x3, padding=1 * dilation, bias=False, groups=num_groups, dilation=dilation, deformable_groups=deform_num_groups, norm=get_norm(norm, bottleneck_channels), ) self.conv3 = Conv2d( bottleneck_channels, out_channels, kernel_size=1, bias=False, norm=get_norm(norm, out_channels), ) for layer in [self.conv1, self.conv2, self.conv3, self.shortcut]: if layer is not None: # shortcut can be None weight_init.c2_msra_fill(layer) nn.init.constant_(self.conv2_offset.weight, 0) nn.init.constant_(self.conv2_offset.bias, 0) def forward(self, x): out = self.conv1(x) out = F.relu_(out) if self.deform_modulated: offset_mask = self.conv2_offset(out) offset_x, offset_y, mask = torch.chunk(offset_mask, 3, dim=1) offset = torch.cat((offset_x, offset_y), dim=1) mask = mask.sigmoid() out = self.conv2(out, offset, mask) else: offset = self.conv2_offset(out) out = self.conv2(out, offset) out = F.relu_(out) out = self.conv3(out) if self.shortcut is not None: shortcut = self.shortcut(x) else: shortcut = x out += shortcut out = F.relu_(out) return out def make_stage(block_class, num_blocks, first_stride, **kwargs): """ Create a resnet stage by creating many blocks. Args: block_class (class): a subclass of ResNetBlockBase num_blocks (int): first_stride (int): the stride of the first block. The other blocks will have stride=1. A `stride` argument will be passed to the block constructor. kwargs: other arguments passed to the block constructor. Returns: list[nn.Module]: a list of block module. """ blocks = [] for i in range(num_blocks): blocks.append(block_class(stride=first_stride if i == 0 else 1, **kwargs)) kwargs["in_channels"] = kwargs["out_channels"] return blocks class BasicStem(nn.Module): def __init__(self, in_channels=3, out_channels=64, norm="BN"): """ Args: norm (str or callable): a callable that takes the number of channels and return a `nn.Module`, or a pre-defined string (one of {"FrozenBN", "BN", "GN"}). """ super().__init__() self.conv1 = Conv2d( in_channels, out_channels, kernel_size=7, stride=2, padding=3, bias=False, norm=get_norm(norm, out_channels), ) weight_init.c2_msra_fill(self.conv1) def forward(self, x): x = self.conv1(x) x = F.relu_(x) x = F.max_pool2d(x, kernel_size=3, stride=2, padding=1) return x @property def out_channels(self): return self.conv1.out_channels @property def stride(self): return 4 # = stride 2 conv -> stride 2 max pool class ResNet(Backbone): def __init__(self, stem, stages, num_classes=None, out_features=None): """ Args: stem (nn.Module): a stem module stages (list[list[ResNetBlock]]): several (typically 4) stages, each contains multiple :class:`ResNetBlockBase`. num_classes (None or int): if None, will not perform classification. out_features (list[str]): name of the layers whose outputs should be returned in forward. Can be anything in "stem", "linear", or "res2" ... If None, will return the output of the last layer. """ super(ResNet, self).__init__() self.stem = stem self.num_classes = num_classes current_stride = self.stem.stride self._out_feature_strides = {"stem": current_stride} self._out_feature_channels = {"stem": self.stem.out_channels} self.stages_and_names = [] for i, blocks in enumerate(stages): for block in blocks: assert isinstance(block, ResNetBlockBase), block curr_channels = block.out_channels stage = nn.Sequential(*blocks) name = "res" + str(i + 2) self.add_module(name, stage) self.stages_and_names.append((stage, name)) self._out_feature_strides[name] = current_stride = int( current_stride * np.prod([k.stride for k in blocks]) ) self._out_feature_channels[name] = blocks[-1].out_channels if num_classes is not None: self.avgpool = nn.AdaptiveAvgPool2d((1, 1)) self.linear = nn.Linear(curr_channels, num_classes) # Sec 5.1 in "Accurate, Large Minibatch SGD: Training ImageNet in 1 Hour": # "The 1000-way fully-connected layer is initialized by # drawing weights from a zero-mean Gaussian with standard deviation of 0.01." nn.init.normal_(self.linear.weight, stddev=0.01) name = "linear" if out_features is None: out_features = [name] self._out_features = out_features assert len(self._out_features) children = [x[0] for x in self.named_children()] for out_feature in self._out_features: assert out_feature in children, "Available children: {}".format(", ".join(children)) def forward(self, x): outputs = {} x = self.stem(x) if "stem" in self._out_features: outputs["stem"] = x for stage, name in self.stages_and_names: x = stage(x) if name in self._out_features: outputs[name] = x if self.num_classes is not None: x = self.avgpool(x) x = self.linear(x) if "linear" in self._out_features: outputs["linear"] = x return outputs def output_shape(self): return { name: ShapeSpec( channels=self._out_feature_channels[name], stride=self._out_feature_strides[name] ) for name in self._out_features } @BACKBONE_REGISTRY.register() def build_resnet_backbone(cfg, input_shape): """ Create a ResNet instance from config. Returns: ResNet: a :class:`ResNet` instance. """ # need registration of new blocks/stems? norm = cfg.MODEL.RESNETS.NORM stem = BasicStem( in_channels=input_shape.channels, out_channels=cfg.MODEL.RESNETS.STEM_OUT_CHANNELS, norm=norm, ) freeze_at = cfg.MODEL.BACKBONE.FREEZE_AT if freeze_at >= 1: for p in stem.parameters(): p.requires_grad = False stem = FrozenBatchNorm2d.convert_frozen_batchnorm(stem) # fmt: off out_features = cfg.MODEL.RESNETS.OUT_FEATURES depth = cfg.MODEL.RESNETS.DEPTH num_groups = cfg.MODEL.RESNETS.NUM_GROUPS width_per_group = cfg.MODEL.RESNETS.WIDTH_PER_GROUP bottleneck_channels = num_groups * width_per_group in_channels = cfg.MODEL.RESNETS.STEM_OUT_CHANNELS out_channels = cfg.MODEL.RESNETS.RES2_OUT_CHANNELS stride_in_1x1 = cfg.MODEL.RESNETS.STRIDE_IN_1X1 res5_dilation = cfg.MODEL.RESNETS.RES5_DILATION deform_on_per_stage = cfg.MODEL.RESNETS.DEFORM_ON_PER_STAGE deform_modulated = cfg.MODEL.RESNETS.DEFORM_MODULATED deform_num_groups = cfg.MODEL.RESNETS.DEFORM_NUM_GROUPS # fmt: on assert res5_dilation in {1, 2}, "res5_dilation cannot be {}.".format(res5_dilation) num_blocks_per_stage = {50: [3, 4, 6, 3], 101: [3, 4, 23, 3], 152: [3, 8, 36, 3]}[depth] stages = [] # Avoid creating variables without gradients # It consumes extra memory and may cause allreduce to fail out_stage_idx = [{"res2": 2, "res3": 3, "res4": 4, "res5": 5}[f] for f in out_features] max_stage_idx = max(out_stage_idx) for idx, stage_idx in enumerate(range(2, max_stage_idx + 1)): dilation = res5_dilation if stage_idx == 5 else 1 first_stride = 1 if idx == 0 or (stage_idx == 5 and dilation == 2) else 2 stage_kargs = { "num_blocks": num_blocks_per_stage[idx], "first_stride": first_stride, "in_channels": in_channels, "bottleneck_channels": bottleneck_channels, "out_channels": out_channels, "num_groups": num_groups, "norm": norm, "stride_in_1x1": stride_in_1x1, "dilation": dilation, } if deform_on_per_stage[idx]: stage_kargs["block_class"] = DeformBottleneckBlock stage_kargs["deform_modulated"] = deform_modulated stage_kargs["deform_num_groups"] = deform_num_groups else: stage_kargs["block_class"] = BottleneckBlock blocks = make_stage(**stage_kargs) in_channels = out_channels out_channels *= 2 bottleneck_channels *= 2 if freeze_at >= stage_idx: for block in blocks: block.freeze() stages.append(blocks) return ResNet(stem, stages, out_features=out_features) ================================================ FILE: detectron2/modeling/box_regression.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import math import torch # Value for clamping large dw and dh predictions. The heuristic is that we clamp # such that dw and dh are no larger than what would transform a 16px box into a # 1000px box (based on a small anchor, 16px, and a typical image size, 1000px). _DEFAULT_SCALE_CLAMP = math.log(1000.0 / 16) __all__ = ["Box2BoxTransform", "Box2BoxTransformRotated"] class Box2BoxTransform(object): """ The box-to-box transform defined in R-CNN. The transformation is parameterized by 4 deltas: (dx, dy, dw, dh). The transformation scales the box's width and height by exp(dw), exp(dh) and shifts a box's center by the offset (dx * width, dy * height). """ def __init__(self, weights, scale_clamp=_DEFAULT_SCALE_CLAMP): """ Args: weights (4-element tuple): Scaling factors that are applied to the (dx, dy, dw, dh) deltas. In Fast R-CNN, these were originally set such that the deltas have unit variance; now they are treated as hyperparameters of the system. scale_clamp (float): When predicting deltas, the predicted box scaling factors (dw and dh) are clamped such that they are <= scale_clamp. """ self.weights = weights self.scale_clamp = scale_clamp def get_deltas(self, src_boxes, target_boxes): """ Get box regression transformation deltas (dx, dy, dw, dh) that can be used to transform the `src_boxes` into the `target_boxes`. That is, the relation ``target_boxes == self.apply_deltas(deltas, src_boxes)`` is true (unless any delta is too large and is clamped). Args: src_boxes (Tensor): source boxes, e.g., object proposals target_boxes (Tensor): target of the transformation, e.g., ground-truth boxes. """ assert isinstance(src_boxes, torch.Tensor), type(src_boxes) assert isinstance(target_boxes, torch.Tensor), type(target_boxes) src_widths = src_boxes[:, 2] - src_boxes[:, 0] src_heights = src_boxes[:, 3] - src_boxes[:, 1] src_ctr_x = src_boxes[:, 0] + 0.5 * src_widths src_ctr_y = src_boxes[:, 1] + 0.5 * src_heights target_widths = target_boxes[:, 2] - target_boxes[:, 0] target_heights = target_boxes[:, 3] - target_boxes[:, 1] target_ctr_x = target_boxes[:, 0] + 0.5 * target_widths target_ctr_y = target_boxes[:, 1] + 0.5 * target_heights wx, wy, ww, wh = self.weights dx = wx * (target_ctr_x - src_ctr_x) / src_widths dy = wy * (target_ctr_y - src_ctr_y) / src_heights dw = ww * torch.log(target_widths / src_widths) dh = wh * torch.log(target_heights / src_heights) deltas = torch.stack((dx, dy, dw, dh), dim=1) assert (src_widths > 0).all().item(), "Input boxes to Box2BoxTransform are not valid!" return deltas def trans_light(self, src_boxes): x1 = src_boxes[:, 0] y1 = src_boxes[:, 1] x2 = src_boxes[:, 2] y2 = src_boxes[:, 3] return torch.stack((x1,y1,x2,y2),dim=1) def apply_deltas(self, deltas, boxes): """ Apply transformation `deltas` (dx, dy, dw, dh) to `boxes`. Args: deltas (Tensor): transformation deltas of shape (N, k*4), where k >= 1. deltas[i] represents k potentially different class-specific box transformations for the single box boxes[i]. boxes (Tensor): boxes to transform, of shape (N, 4) """ assert torch.isfinite(deltas).all().item() boxes = boxes.to(deltas.dtype) widths = boxes[:, 2] - boxes[:, 0] heights = boxes[:, 3] - boxes[:, 1] ctr_x = boxes[:, 0] + 0.5 * widths ctr_y = boxes[:, 1] + 0.5 * heights wx, wy, ww, wh = self.weights dx = deltas[:, 0::4] / wx dy = deltas[:, 1::4] / wy dw = deltas[:, 2::4] / ww dh = deltas[:, 3::4] / wh # Prevent sending too large values into torch.exp() dw = torch.clamp(dw, max=self.scale_clamp) dh = torch.clamp(dh, max=self.scale_clamp) pred_ctr_x = dx * widths[:, None] + ctr_x[:, None] pred_ctr_y = dy * heights[:, None] + ctr_y[:, None] pred_w = torch.exp(dw) * widths[:, None] pred_h = torch.exp(dh) * heights[:, None] pred_boxes = torch.zeros_like(deltas) pred_boxes[:, 0::4] = pred_ctr_x - 0.5 * pred_w # x1 pred_boxes[:, 1::4] = pred_ctr_y - 0.5 * pred_h # y1 pred_boxes[:, 2::4] = pred_ctr_x + 0.5 * pred_w # x2 pred_boxes[:, 3::4] = pred_ctr_y + 0.5 * pred_h # y2 return pred_boxes class Box2BoxTransformRotated(object): """ The box-to-box transform defined in Rotated R-CNN. The transformation is parameterized by 5 deltas: (dx, dy, dw, dh, da). The transformation scales the box's width and height by exp(dw), exp(dh), shifts a box's center by the offset (dx * width, dy * height), and rotate a box's angle by da (radians). Note: angles of deltas are in radians while angles of boxes are in degrees. """ def __init__(self, weights, scale_clamp=_DEFAULT_SCALE_CLAMP): """ Args: weights (5-element tuple): Scaling factors that are applied to the (dx, dy, dw, dh, da) deltas. These are treated as hyperparameters of the system. scale_clamp (float): When predicting deltas, the predicted box scaling factors (dw and dh) are clamped such that they are <= scale_clamp. """ self.weights = weights self.scale_clamp = scale_clamp def get_deltas(self, src_boxes, target_boxes): """ Get box regression transformation deltas (dx, dy, dw, dh, da) that can be used to transform the `src_boxes` into the `target_boxes`. That is, the relation ``target_boxes == self.apply_deltas(deltas, src_boxes)`` is true (unless any delta is too large and is clamped). Args: src_boxes (Tensor): Nx5 source boxes, e.g., object proposals target_boxes (Tensor): Nx5 target of the transformation, e.g., ground-truth boxes. """ assert isinstance(src_boxes, torch.Tensor), type(src_boxes) assert isinstance(target_boxes, torch.Tensor), type(target_boxes) src_ctr_x, src_ctr_y, src_widths, src_heights, src_angles = torch.unbind(src_boxes, dim=1) target_ctr_x, target_ctr_y, target_widths, target_heights, target_angles = torch.unbind( target_boxes, dim=1 ) wx, wy, ww, wh, wa = self.weights dx = wx * (target_ctr_x - src_ctr_x) / src_widths dy = wy * (target_ctr_y - src_ctr_y) / src_heights dw = ww * torch.log(target_widths / src_widths) dh = wh * torch.log(target_heights / src_heights) # Angles of deltas are in radians while angles of boxes are in degrees. # the conversion to radians serve as a way to normalize the values da = target_angles - src_angles while len(torch.where(da < -180.0)[0]) > 0: da[torch.where(da < -180.0)] += 360.0 while len(torch.where(da > 180.0)[0]) > 0: da[torch.where(da > 180.0)] -= 360.0 da *= wa * math.pi / 180.0 deltas = torch.stack((dx, dy, dw, dh, da), dim=1) assert ( (src_widths > 0).all().item() ), "Input boxes to Box2BoxTransformRotated are not valid!" return deltas def apply_deltas(self, deltas, boxes): """ Apply transformation `deltas` (dx, dy, dw, dh, da) to `boxes`. Args: deltas (Tensor): transformation deltas of shape (N, 5). deltas[i] represents box transformation for the single box boxes[i]. boxes (Tensor): boxes to transform, of shape (N, 5) """ assert deltas.shape[1] == 5 and boxes.shape[1] == 5 assert torch.isfinite(deltas).all().item() boxes = boxes.to(deltas.dtype) ctr_x, ctr_y, widths, heights, angles = torch.unbind(boxes, dim=1) wx, wy, ww, wh, wa = self.weights dx, dy, dw, dh, da = torch.unbind(deltas, dim=1) dx.div_(wx) dy.div_(wy) dw.div_(ww) dh.div_(wh) da.div_(wa) # Prevent sending too large values into torch.exp() dw = torch.clamp(dw, max=self.scale_clamp) dh = torch.clamp(dh, max=self.scale_clamp) pred_boxes = torch.zeros_like(deltas) pred_boxes[:, 0] = dx * widths + ctr_x # x_ctr pred_boxes[:, 1] = dy * heights + ctr_y # y_ctr pred_boxes[:, 2] = torch.exp(dw) * widths # width pred_boxes[:, 3] = torch.exp(dh) * heights # height # Following original RRPN implementation, # angles of deltas are in radians while angles of boxes are in degrees. pred_angle = da * 180.0 / math.pi + angles while len(torch.where(pred_angle < -180.0)[0]) > 0: pred_angle[torch.where(pred_angle < -180.0)] += 360.0 while len(torch.where(pred_angle > 180.0)[0]) > 0: pred_angle[torch.where(pred_angle > 180.0)] -= 360.0 pred_boxes[:, 4] = pred_angle return pred_boxes ================================================ FILE: detectron2/modeling/matcher.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import torch class Matcher(object): """ This class assigns to each predicted "element" (e.g., a box) a ground-truth element. Each predicted element will have exactly zero or one matches; each ground-truth element may be matched to zero or more predicted elements. The matching is determined by the MxN match_quality_matrix, that characterizes how well each (ground-truth, prediction)-pair match each other. For example, if the elements are boxes, this matrix may contain box intersection-over-union overlap values. The matcher returns (a) a vector of length N containing the index of the ground-truth element m in [0, M) that matches to prediction n in [0, N). (b) a vector of length N containing the labels for each prediction. """ def __init__(self, thresholds, labels, allow_low_quality_matches=False): """ Args: thresholds (list): a list of thresholds used to stratify predictions into levels. labels (list): a list of values to label predictions belonging at each level. A label can be one of {-1, 0, 1} signifying {ignore, negative class, positive class}, respectively. allow_low_quality_matches (bool): if True, produce additional matches for predictions with maximum match quality lower than high_threshold. See set_low_quality_matches_ for more details. For example, thresholds = [0.3, 0.5] labels = [0, -1, 1] All predictions with iou < 0.3 will be marked with 0 and thus will be considered as false positives while training. All predictions with 0.3 <= iou < 0.5 will be marked with -1 and thus will be ignored. All predictions with 0.5 <= iou will be marked with 1 and thus will be considered as true positives. """ # Add -inf and +inf to first and last position in thresholds thresholds = thresholds[:] thresholds.insert(0, -float("inf")) thresholds.append(float("inf")) assert all(low <= high for (low, high) in zip(thresholds[:-1], thresholds[1:])) assert all(l in [-1, 0, 1] for l in labels) assert len(labels) == len(thresholds) - 1 self.thresholds = thresholds self.labels = labels self.allow_low_quality_matches = allow_low_quality_matches def __call__(self, match_quality_matrix): """ Args: match_quality_matrix (Tensor[float]): an MxN tensor, containing the pairwise quality between M ground-truth elements and N predicted elements. All elements must be >= 0 (due to the us of `torch.nonzero` for selecting indices in :meth:`set_low_quality_matches_`). Returns: matches (Tensor[int64]): a vector of length N, where matches[i] is a matched ground-truth index in [0, M) match_labels (Tensor[int8]): a vector of length N, where pred_labels[i] indicates whether a prediction is a true or false positive or ignored """ assert match_quality_matrix.dim() == 2 if match_quality_matrix.numel() == 0: return ( match_quality_matrix.new_full( (match_quality_matrix.size(1),), 0, dtype=torch.int64 ), match_quality_matrix.new_full( (match_quality_matrix.size(1),), -1, dtype=torch.int8 ), ) assert torch.all(match_quality_matrix >= 0) # match_quality_matrix is M (gt) x N (predicted) # Max over gt elements (dim 0) to find best gt candidate for each prediction matched_vals, matches = match_quality_matrix.max(dim=0) match_labels = matches.new_full(matches.size(), 1, dtype=torch.int8) for (l, low, high) in zip(self.labels, self.thresholds[:-1], self.thresholds[1:]): low_high = (matched_vals >= low) & (matched_vals < high) match_labels[low_high] = l if self.allow_low_quality_matches: self.set_low_quality_matches_(match_labels, match_quality_matrix) return matches, match_labels def set_low_quality_matches_(self, match_labels, match_quality_matrix): """ Produce additional matches for predictions that have only low-quality matches. Specifically, for each ground-truth G find the set of predictions that have maximum overlap with it (including ties); for each prediction in that set, if it is unmatched, then match it to the ground-truth G. This function implements the RPN assignment case (i) in Sec. 3.1.2 of the Faster R-CNN paper: https://arxiv.org/pdf/1506.01497v3.pdf. """ # For each gt, find the prediction with which it has highest quality highest_quality_foreach_gt, _ = match_quality_matrix.max(dim=1) # Find the highest quality match available, even if it is low, including ties. # Note that the matches qualities must be positive due to the use of # `torch.nonzero`. gt_pred_pairs_of_highest_quality = torch.nonzero( match_quality_matrix == highest_quality_foreach_gt[:, None] ) # Example gt_pred_pairs_of_highest_quality: # tensor([[ 0, 39796], # [ 1, 32055], # [ 1, 32070], # [ 2, 39190], # [ 2, 40255], # [ 3, 40390], # [ 3, 41455], # [ 4, 45470], # [ 5, 45325], # [ 5, 46390]]) # Each row is a (gt index, prediction index) # Note how gt items 1, 2, 3, and 5 each have two ties pred_inds_to_update = gt_pred_pairs_of_highest_quality[:, 1] match_labels[pred_inds_to_update] = 1 ================================================ FILE: detectron2/modeling/meta_arch/LISA_meta_arch.py ================================================ # Copyright (c) Tianyu Wang. All Rights Reserved. import logging import torch from torch import nn from detectron2.structures import ImageList from detectron2.utils.logger import log_first_n from detectron2.modeling.backbone import build_backbone from detectron2.modeling.postprocessing import detector_postprocess, matchor, combine_association from .LISA_rpn import build_proposal_generator from detectron2.modeling.roi_heads import build_roi_heads from detectron2.modeling.meta_arch.build import META_ARCH_REGISTRY from detectron2.modeling.meta_arch.rcnn import __all__, GeneralizedRCNN from detectron2.utils.registry import Registry __all__.append("LISARCNN") @META_ARCH_REGISTRY.register() class LISARCNN(GeneralizedRCNN): def __init__(self,cfg): super(LISARCNN, self).__init__(cfg) self.association_proposal_generator = build_proposal_generator(cfg, self.backbone.output_shape(), shadow_object_part= False) self.proposal_generator = build_proposal_generator(cfg, self.backbone.output_shape(), shadow_object_part= True) self.to(self.device) def forward(self, batched_inputs): if not self.training: return self.inference(batched_inputs) images = self.preprocess_image(batched_inputs) # print(batched_inputs[1]) if "instances" in batched_inputs[0]: gt_instances = [x["instances"].to(self.device) for x in batched_inputs] if "associations" in batched_inputs[0]: gt_associations = [x["associations"].to(self.device) for x in batched_inputs] elif "targets" in batched_inputs[0]: log_first_n( logging.WARN, "'targets' in the model inputs is now renamed to 'instances'!", n=10 ) gt_instances = [x["targets"].to(self.device) for x in batched_inputs] else: gt_instances = None features = self.backbone(images.tensor) if self.association_proposal_generator: association_proposals, association_losses, pre_features, pre_proposals = self.association_proposal_generator(images, features, gt_associations) if self.proposal_generator: # concat_features = {} # for pre_feature, (k,v) in zip(pre_features,features.items()): # concat_features[k] = torch.cat([v,pre_feature],1) proposals, proposal_losses = self.proposal_generator(images,features,gt_instances,pre_proposals) _, detector_losses = self.roi_heads(images, features, association_proposals, proposals, gt_associations, gt_instances) losses = {} losses.update(detector_losses) losses.update(proposal_losses) losses.update(association_losses) return losses def inference(self, batched_inputs, detected_instances=None, do_postprocess=True): assert not self.training images = self.preprocess_image(batched_inputs) features = self.backbone(images.tensor) if detected_instances is None: if self.association_proposal_generator: association_proposals, _, pre_features, pre_proposals = self.association_proposal_generator(images, features) else: assert "associations" in batched_inputs[0] proposals = [x["associations"].to(self.device) for x in batched_inputs] if self.proposal_generator: # concat_features = {} # for pre_features,(k,v) in zip(pre_features,features.items()): # concat_features[k] = torch.cat([v,pre_features],1) proposals, _ = self.proposal_generator(images,features,pre_proposals = pre_proposals) else: assert "proposals" in batched_inputs[0] proposals = [x["proposals"].to(self.device) for x in batched_inputs] results,associations, _ = self.roi_heads(images, features, association_proposals, proposals, None, None) if do_postprocess: processed_results = [] for results_per_image, input_per_image, image_size in zip( results, batched_inputs, images.image_sizes ): height = input_per_image.get("height", image_size[0]) width = input_per_image.get("width", image_size[1]) # print(results_per_image) r = detector_postprocess(results_per_image, height, width) processed_results.append({"instances": r.to(torch.device('cpu'))}) processed_associations = [] for results_per_image, input_per_image, image_size in zip( associations, batched_inputs, images.image_sizes ): height = input_per_image.get("height", image_size[0]) width = input_per_image.get("width", image_size[1]) r = detector_postprocess(results_per_image, height, width) processed_associations.append({"instances": r.to(torch.device('cpu'))}) for instances, associations in zip(processed_results, processed_associations): _instances, _associations = matchor(instances["instances"],associations["instances"]) _associations,_instances = combine_association(_instances,_associations) associations["instances"] = _associations instances["instances"] = _instances return processed_results,processed_associations else: return results,associations ================================================ FILE: detectron2/modeling/meta_arch/__init__.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .build import META_ARCH_REGISTRY, build_model # isort:skip from .panoptic_fpn import PanopticFPN # import all the meta_arch, so they will be registered from .rcnn import GeneralizedRCNN, ProposalNetwork from .retinanet import RetinaNet from .semantic_seg import SEM_SEG_HEADS_REGISTRY, SemanticSegmentor, build_sem_seg_head ================================================ FILE: detectron2/modeling/meta_arch/build.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from detectron2.utils.registry import Registry META_ARCH_REGISTRY = Registry("META_ARCH") # noqa F401 isort:skip META_ARCH_REGISTRY.__doc__ = """ Registry for meta-architectures, i.e. the whole model. The registered object will be called with `obj(cfg)` and expected to return a `nn.Module` object. """ def build_model(cfg): """ Built the whole model, defined by `cfg.MODEL.META_ARCHITECTURE`. """ meta_arch = cfg.MODEL.META_ARCHITECTURE return META_ARCH_REGISTRY.get(meta_arch)(cfg) ================================================ FILE: detectron2/modeling/meta_arch/panoptic_fpn.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import torch from torch import nn from detectron2.structures import ImageList from ..backbone import build_backbone from ..postprocessing import detector_postprocess, sem_seg_postprocess from ..proposal_generator import build_proposal_generator from ..roi_heads import build_roi_heads from .build import META_ARCH_REGISTRY from .semantic_seg import build_sem_seg_head __all__ = ["PanopticFPN"] @META_ARCH_REGISTRY.register() class PanopticFPN(nn.Module): """ Main class for Panoptic FPN architectures (see https://arxiv.org/abd/1901.02446). """ def __init__(self, cfg): super().__init__() self.device = torch.device(cfg.MODEL.DEVICE) self.instance_loss_weight = cfg.MODEL.PANOPTIC_FPN.INSTANCE_LOSS_WEIGHT # options when combining instance & semantic outputs self.combine_on = cfg.MODEL.PANOPTIC_FPN.COMBINE.ENABLED self.combine_overlap_threshold = cfg.MODEL.PANOPTIC_FPN.COMBINE.OVERLAP_THRESH self.combine_stuff_area_limit = cfg.MODEL.PANOPTIC_FPN.COMBINE.STUFF_AREA_LIMIT self.combine_instances_confidence_threshold = ( cfg.MODEL.PANOPTIC_FPN.COMBINE.INSTANCES_CONFIDENCE_THRESH ) self.backbone = build_backbone(cfg) self.proposal_generator = build_proposal_generator(cfg, self.backbone.output_shape()) self.roi_heads = build_roi_heads(cfg, self.backbone.output_shape()) self.sem_seg_head = build_sem_seg_head(cfg, self.backbone.output_shape()) pixel_mean = torch.Tensor(cfg.MODEL.PIXEL_MEAN).to(self.device).view(3, 1, 1) pixel_std = torch.Tensor(cfg.MODEL.PIXEL_STD).to(self.device).view(3, 1, 1) self.normalizer = lambda x: (x - pixel_mean) / pixel_std self.to(self.device) def forward(self, batched_inputs): """ Args: batched_inputs: a list, batched outputs of :class:`DatasetMapper`. Each item in the list contains the inputs for one image. For now, each item in the list is a dict that contains: image: Tensor, image in (C, H, W) format. instances: Instances sem_seg: semantic segmentation ground truth. Other information that's included in the original dicts, such as: "height", "width" (int): the output resolution of the model, used in inference. See :meth:`postprocess` for details. Returns: list[dict]: each dict is the results for one image. The dict contains the following keys: "instances": see :meth:`GeneralizedRCNN.forward` for its format. "sem_seg": see :meth:`SemanticSegmentor.forward` for its format. "panoptic_seg": available when `PANOPTIC_FPN.COMBINE.ENABLED`. See the return value of :func:`combine_semantic_and_instance_outputs` for its format. """ images = [x["image"].to(self.device) for x in batched_inputs] images = [self.normalizer(x) for x in images] images = ImageList.from_tensors(images, self.backbone.size_divisibility) features = self.backbone(images.tensor) if "proposals" in batched_inputs[0]: proposals = [x["proposals"].to(self.device) for x in batched_inputs] proposal_losses = {} if "sem_seg" in batched_inputs[0]: gt_sem_seg = [x["sem_seg"].to(self.device) for x in batched_inputs] gt_sem_seg = ImageList.from_tensors( gt_sem_seg, self.backbone.size_divisibility, self.sem_seg_head.ignore_value ).tensor else: gt_sem_seg = None sem_seg_results, sem_seg_losses = self.sem_seg_head(features, gt_sem_seg) if "instances" in batched_inputs[0]: gt_instances = [x["instances"].to(self.device) for x in batched_inputs] else: gt_instances = None if self.proposal_generator: proposals, proposal_losses = self.proposal_generator(images, features, gt_instances) detector_results, detector_losses = self.roi_heads( images, features, proposals, gt_instances ) if self.training: losses = {} losses.update(sem_seg_losses) losses.update({k: v * self.instance_loss_weight for k, v in detector_losses.items()}) losses.update(proposal_losses) return losses processed_results = [] for sem_seg_result, detector_result, input_per_image, image_size in zip( sem_seg_results, detector_results, batched_inputs, images.image_sizes ): height = input_per_image.get("height") width = input_per_image.get("width") sem_seg_r = sem_seg_postprocess(sem_seg_result, image_size, height, width) detector_r = detector_postprocess(detector_result, height, width) processed_results.append({"sem_seg": sem_seg_r, "instances": detector_r}) if self.combine_on: panoptic_r = combine_semantic_and_instance_outputs( detector_r, sem_seg_r.argmax(dim=0), self.combine_overlap_threshold, self.combine_stuff_area_limit, self.combine_instances_confidence_threshold, ) processed_results[-1]["panoptic_seg"] = panoptic_r return processed_results def combine_semantic_and_instance_outputs( instance_results, semantic_results, overlap_threshold, stuff_area_limit, instances_confidence_threshold, ): """ Implement a simple combining logic following "combine_semantic_and_instance_predictions.py" in panopticapi to produce panoptic segmentation outputs. Args: instance_results: output of :func:`detector_postprocess`. semantic_results: an (H, W) tensor, each is the contiguous semantic category id Returns: panoptic_seg (Tensor): of shape (height, width) where the values are ids for each segment. segments_info (list[dict]): Describe each segment in `panoptic_seg`. Each dict contains keys "id", "category_id", "isthing". """ panoptic_seg = torch.zeros_like(semantic_results, dtype=torch.int32) # sort instance outputs by scores sorted_inds = torch.argsort(-instance_results.scores) current_segment_id = 0 segments_info = [] instance_masks = instance_results.pred_masks.to(dtype=torch.bool, device=panoptic_seg.device) # Add instances one-by-one, check for overlaps with existing ones for inst_id in sorted_inds: score = instance_results.scores[inst_id].item() if score < instances_confidence_threshold: break mask = instance_masks[inst_id] # H,W mask_area = mask.sum().item() if mask_area == 0: continue intersect = (mask > 0) & (panoptic_seg > 0) intersect_area = intersect.sum().item() if intersect_area * 1.0 / mask_area > overlap_threshold: continue if intersect_area > 0: mask = mask & (panoptic_seg == 0) current_segment_id += 1 panoptic_seg[mask] = current_segment_id segments_info.append( { "id": current_segment_id, "isthing": True, "score": score, "category_id": instance_results.pred_classes[inst_id].item(), "instance_id": inst_id.item(), } ) # Add semantic results to remaining empty areas semantic_labels = torch.unique(semantic_results).cpu().tolist() for semantic_label in semantic_labels: if semantic_label == 0: # 0 is a special "thing" class continue mask = (semantic_results == semantic_label) & (panoptic_seg == 0) mask_area = mask.sum().item() if mask_area < stuff_area_limit: continue current_segment_id += 1 panoptic_seg[mask] = current_segment_id segments_info.append( { "id": current_segment_id, "isthing": False, "category_id": semantic_label, "area": mask_area, } ) return panoptic_seg, segments_info ================================================ FILE: detectron2/modeling/meta_arch/rcnn.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import torch from torch import nn from detectron2.structures import ImageList from detectron2.utils.logger import log_first_n from ..backbone import build_backbone from ..postprocessing import detector_postprocess from ..proposal_generator import build_proposal_generator from ..roi_heads import build_roi_heads from .build import META_ARCH_REGISTRY __all__ = ["GeneralizedRCNN", "ProposalNetwork"] @META_ARCH_REGISTRY.register() class GeneralizedRCNN(nn.Module): """ Generalized R-CNN. Any models that contains the following three components: 1. Per-image feature extraction (aka backbone) 2. Region proposal generation 3. Per-region feature extraction and prediction """ def __init__(self, cfg): super().__init__() self.device = torch.device(cfg.MODEL.DEVICE) self.backbone = build_backbone(cfg) self.proposal_generator = build_proposal_generator(cfg, self.backbone.output_shape()) self.roi_heads = build_roi_heads(cfg, self.backbone.output_shape()) assert len(cfg.MODEL.PIXEL_MEAN) == len(cfg.MODEL.PIXEL_STD) num_channels = len(cfg.MODEL.PIXEL_MEAN) pixel_mean = torch.Tensor(cfg.MODEL.PIXEL_MEAN).to(self.device).view(num_channels, 1, 1) pixel_std = torch.Tensor(cfg.MODEL.PIXEL_STD).to(self.device).view(num_channels, 1, 1) self.normalizer = lambda x: (x - pixel_mean) / pixel_std self.to(self.device) def forward(self, batched_inputs): """ Args: batched_inputs: a list, batched outputs of :class:`DatasetMapper` . Each item in the list contains the inputs for one image. For now, each item in the list is a dict that contains: * image: Tensor, image in (C, H, W) format. * instances (optional): groundtruth :class:`Instances` * proposals (optional): :class:`Instances`, precomputed proposals. Other information that's included in the original dicts, such as: * "height", "width" (int): the output resolution of the model, used in inference. See :meth:`postprocess` for details. Returns: list[dict]: Each dict is the output for one input image. The dict contains one key "instances" whose value is a :class:`Instances`. The :class:`Instances` object has the following keys: "pred_boxes", "pred_classes", "scores", "pred_masks", "pred_keypoints" """ if not self.training: return self.inference(batched_inputs) images = self.preprocess_image(batched_inputs) if "instances" in batched_inputs[0]: gt_instances = [x["instances"].to(self.device) for x in batched_inputs] elif "targets" in batched_inputs[0]: log_first_n( logging.WARN, "'targets' in the model inputs is now renamed to 'instances'!", n=10 ) gt_instances = [x["targets"].to(self.device) for x in batched_inputs] else: gt_instances = None features = self.backbone(images.tensor) if self.proposal_generator: proposals, proposal_losses = self.proposal_generator(images, features, gt_instances) else: assert "proposals" in batched_inputs[0] proposals = [x["proposals"].to(self.device) for x in batched_inputs] proposal_losses = {} _, detector_losses = self.roi_heads(images, features, proposals, gt_instances) losses = {} losses.update(detector_losses) losses.update(proposal_losses) return losses def inference(self, batched_inputs, detected_instances=None, do_postprocess=True): """ Run inference on the given inputs. Args: batched_inputs (list[dict]): same as in :meth:`forward` detected_instances (None or list[Instances]): if not None, it contains an `Instances` object per image. The `Instances` object contains "pred_boxes" and "pred_classes" which are known boxes in the image. The inference will then skip the detection of bounding boxes, and only predict other per-ROI outputs. do_postprocess (bool): whether to apply post-processing on the outputs. Returns: same as in :meth:`forward`. """ assert not self.training images = self.preprocess_image(batched_inputs) features = self.backbone(images.tensor) if detected_instances is None: if self.proposal_generator: proposals, _ = self.proposal_generator(images, features, None) else: assert "proposals" in batched_inputs[0] proposals = [x["proposals"].to(self.device) for x in batched_inputs] results, _ = self.roi_heads(images, features, proposals, None) else: detected_instances = [x.to(self.device) for x in detected_instances] results = self.roi_heads.forward_with_given_boxes(features, detected_instances) if do_postprocess: processed_results = [] for results_per_image, input_per_image, image_size in zip( results, batched_inputs, images.image_sizes ): height = input_per_image.get("height", image_size[0]) width = input_per_image.get("width", image_size[1]) r = detector_postprocess(results_per_image, height, width) processed_results.append({"instances": r}) return processed_results else: return results def preprocess_image(self, batched_inputs): """ Normalize, pad and batch the input images. """ images = [x["image"].to(self.device) for x in batched_inputs] images = [self.normalizer(x) for x in images] images = ImageList.from_tensors(images, self.backbone.size_divisibility) return images @META_ARCH_REGISTRY.register() class ProposalNetwork(nn.Module): def __init__(self, cfg): super().__init__() self.device = torch.device(cfg.MODEL.DEVICE) self.backbone = build_backbone(cfg) self.proposal_generator = build_proposal_generator(cfg, self.backbone.output_shape()) pixel_mean = torch.Tensor(cfg.MODEL.PIXEL_MEAN).to(self.device).view(-1, 1, 1) pixel_std = torch.Tensor(cfg.MODEL.PIXEL_STD).to(self.device).view(-1, 1, 1) self.normalizer = lambda x: (x - pixel_mean) / pixel_std self.to(self.device) def forward(self, batched_inputs): """ Args: Same as in :class:`GeneralizedRCNN.forward` Returns: list[dict]: Each dict is the output for one input image. The dict contains one key "proposals" whose value is a :class:`Instances` with keys "proposal_boxes" and "objectness_logits". """ images = [x["image"].to(self.device) for x in batched_inputs] images = [self.normalizer(x) for x in images] images = ImageList.from_tensors(images, self.backbone.size_divisibility) features = self.backbone(images.tensor) if "instances" in batched_inputs[0]: gt_instances = [x["instances"].to(self.device) for x in batched_inputs] elif "targets" in batched_inputs[0]: log_first_n( logging.WARN, "'targets' in the model inputs is now renamed to 'instances'!", n=10 ) gt_instances = [x["targets"].to(self.device) for x in batched_inputs] else: gt_instances = None proposals, proposal_losses = self.proposal_generator(images, features, gt_instances) # In training, the proposals are not useful at all but we generate them anyway. # This makes RPN-only models about 5% slower. if self.training: return proposal_losses processed_results = [] for results_per_image, input_per_image, image_size in zip( proposals, batched_inputs, images.image_sizes ): height = input_per_image.get("height", image_size[0]) width = input_per_image.get("width", image_size[1]) r = detector_postprocess(results_per_image, height, width) processed_results.append({"proposals": r}) return processed_results ================================================ FILE: detectron2/modeling/meta_arch/retinanet.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import math from typing import List import torch from fvcore.nn import sigmoid_focal_loss_jit, smooth_l1_loss from torch import nn from detectron2.layers import ShapeSpec, batched_nms, cat from detectron2.structures import Boxes, ImageList, Instances, pairwise_iou from detectron2.utils.logger import log_first_n from ..anchor_generator import build_anchor_generator from ..backbone import build_backbone from ..box_regression import Box2BoxTransform from ..matcher import Matcher from ..postprocessing import detector_postprocess from .build import META_ARCH_REGISTRY __all__ = ["RetinaNet"] def permute_to_N_HWA_K(tensor, K): """ Transpose/reshape a tensor from (N, (A x K), H, W) to (N, (HxWxA), K) """ assert tensor.dim() == 4, tensor.shape N, _, H, W = tensor.shape tensor = tensor.view(N, -1, K, H, W) tensor = tensor.permute(0, 3, 4, 1, 2) tensor = tensor.reshape(N, -1, K) # Size=(N,HWA,K) return tensor def permute_all_cls_and_box_to_N_HWA_K_and_concat(box_cls, box_delta, num_classes=80): """ Rearrange the tensor layout from the network output, i.e.: list[Tensor]: #lvl tensors of shape (N, A x K, Hi, Wi) to per-image predictions, i.e.: Tensor: of shape (N x sum(Hi x Wi x A), K) """ # for each feature level, permute the outputs to make them be in the # same format as the labels. Note that the labels are computed for # all feature levels concatenated, so we keep the same representation # for the objectness and the box_delta box_cls_flattened = [permute_to_N_HWA_K(x, num_classes) for x in box_cls] box_delta_flattened = [permute_to_N_HWA_K(x, 4) for x in box_delta] # concatenate on the first dimension (representing the feature levels), to # take into account the way the labels were generated (with all feature maps # being concatenated as well) box_cls = cat(box_cls_flattened, dim=1).view(-1, num_classes) box_delta = cat(box_delta_flattened, dim=1).view(-1, 4) return box_cls, box_delta @META_ARCH_REGISTRY.register() class RetinaNet(nn.Module): """ Implement RetinaNet (https://arxiv.org/abs/1708.02002). """ def __init__(self, cfg): super().__init__() self.device = torch.device(cfg.MODEL.DEVICE) # fmt: off self.num_classes = cfg.MODEL.RETINANET.NUM_CLASSES self.in_features = cfg.MODEL.RETINANET.IN_FEATURES # Loss parameters: self.focal_loss_alpha = cfg.MODEL.RETINANET.FOCAL_LOSS_ALPHA self.focal_loss_gamma = cfg.MODEL.RETINANET.FOCAL_LOSS_GAMMA self.smooth_l1_loss_beta = cfg.MODEL.RETINANET.SMOOTH_L1_LOSS_BETA # Inference parameters: self.score_threshold = cfg.MODEL.RETINANET.SCORE_THRESH_TEST self.topk_candidates = cfg.MODEL.RETINANET.TOPK_CANDIDATES_TEST self.nms_threshold = cfg.MODEL.RETINANET.NMS_THRESH_TEST self.max_detections_per_image = cfg.TEST.DETECTIONS_PER_IMAGE # fmt: on self.backbone = build_backbone(cfg) backbone_shape = self.backbone.output_shape() feature_shapes = [backbone_shape[f] for f in self.in_features] self.head = RetinaNetHead(cfg, feature_shapes) self.anchor_generator = build_anchor_generator(cfg, feature_shapes) # Matching and loss self.box2box_transform = Box2BoxTransform(weights=cfg.MODEL.RPN.BBOX_REG_WEIGHTS) self.matcher = Matcher( cfg.MODEL.RETINANET.IOU_THRESHOLDS, cfg.MODEL.RETINANET.IOU_LABELS, allow_low_quality_matches=True, ) pixel_mean = torch.Tensor(cfg.MODEL.PIXEL_MEAN).to(self.device).view(3, 1, 1) pixel_std = torch.Tensor(cfg.MODEL.PIXEL_STD).to(self.device).view(3, 1, 1) self.normalizer = lambda x: (x - pixel_mean) / pixel_std self.to(self.device) def forward(self, batched_inputs): """ Args: batched_inputs: a list, batched outputs of :class:`DatasetMapper` . Each item in the list contains the inputs for one image. For now, each item in the list is a dict that contains: * image: Tensor, image in (C, H, W) format. * instances: Instances Other information that's included in the original dicts, such as: * "height", "width" (int): the output resolution of the model, used in inference. See :meth:`postprocess` for details. Returns: dict[str: Tensor]: mapping from a named loss to a tensor storing the loss. Used during training only. """ images = self.preprocess_image(batched_inputs) if "instances" in batched_inputs[0]: gt_instances = [x["instances"].to(self.device) for x in batched_inputs] elif "targets" in batched_inputs[0]: log_first_n( logging.WARN, "'targets' in the model inputs is now renamed to 'instances'!", n=10 ) gt_instances = [x["targets"].to(self.device) for x in batched_inputs] else: gt_instances = None features = self.backbone(images.tensor) features = [features[f] for f in self.in_features] box_cls, box_delta = self.head(features) anchors = self.anchor_generator(features) if self.training: gt_classes, gt_anchors_reg_deltas = self.get_ground_truth(anchors, gt_instances) return self.losses(gt_classes, gt_anchors_reg_deltas, box_cls, box_delta) else: results = self.inference(box_cls, box_delta, anchors, images) processed_results = [] for results_per_image, input_per_image, image_size in zip( results, batched_inputs, images.image_sizes ): height = input_per_image.get("height", image_size[0]) width = input_per_image.get("width", image_size[1]) r = detector_postprocess(results_per_image, height, width) processed_results.append({"instances": r}) return processed_results def losses(self, gt_classes, gt_anchors_deltas, pred_class_logits, pred_anchor_deltas): """ Args: For `gt_classes` and `gt_anchors_deltas` parameters, see :meth:`RetinaNet.get_ground_truth`. Their shapes are (N, R) and (N, R, 4), respectively, where R is the total number of anchors across levels, i.e. sum(Hi x Wi x A) For `pred_class_logits` and `pred_anchor_deltas`, see :meth:`RetinaNetHead.forward`. Returns: dict[str: Tensor]: mapping from a named loss to a scalar tensor storing the loss. Used during training only. The dict keys are: "loss_cls" and "loss_box_reg" """ pred_class_logits, pred_anchor_deltas = permute_all_cls_and_box_to_N_HWA_K_and_concat( pred_class_logits, pred_anchor_deltas, self.num_classes ) # Shapes: (N x R, K) and (N x R, 4), respectively. gt_classes = gt_classes.flatten() gt_anchors_deltas = gt_anchors_deltas.view(-1, 4) valid_idxs = gt_classes >= 0 foreground_idxs = (gt_classes >= 0) & (gt_classes != self.num_classes) num_foreground = foreground_idxs.sum() gt_classes_target = torch.zeros_like(pred_class_logits) gt_classes_target[foreground_idxs, gt_classes[foreground_idxs]] = 1 # logits loss loss_cls = sigmoid_focal_loss_jit( pred_class_logits[valid_idxs], gt_classes_target[valid_idxs], alpha=self.focal_loss_alpha, gamma=self.focal_loss_gamma, reduction="sum", ) / max(1, num_foreground) # regression loss loss_box_reg = smooth_l1_loss( pred_anchor_deltas[foreground_idxs], gt_anchors_deltas[foreground_idxs], beta=self.smooth_l1_loss_beta, reduction="sum", ) / max(1, num_foreground) return {"loss_cls": loss_cls, "loss_box_reg": loss_box_reg} @torch.no_grad() def get_ground_truth(self, anchors, targets): """ Args: anchors (list[list[Boxes]]): a list of N=#image elements. Each is a list of #feature level Boxes. The Boxes contains anchors of this image on the specific feature level. targets (list[Instances]): a list of N `Instances`s. The i-th `Instances` contains the ground-truth per-instance annotations for the i-th input image. Specify `targets` during training only. Returns: gt_classes (Tensor): An integer tensor of shape (N, R) storing ground-truth labels for each anchor. R is the total number of anchors, i.e. the sum of Hi x Wi x A for all levels. Anchors with an IoU with some target higher than the foreground threshold are assigned their corresponding label in the [0, K-1] range. Anchors whose IoU are below the background threshold are assigned the label "K". Anchors whose IoU are between the foreground and background thresholds are assigned a label "-1", i.e. ignore. gt_anchors_deltas (Tensor): Shape (N, R, 4). The last dimension represents ground-truth box2box transform targets (dx, dy, dw, dh) that map each anchor to its matched ground-truth box. The values in the tensor are meaningful only when the corresponding anchor is labeled as foreground. """ gt_classes = [] gt_anchors_deltas = [] anchors = [Boxes.cat(anchors_i) for anchors_i in anchors] # list[Tensor(R, 4)], one for each image for anchors_per_image, targets_per_image in zip(anchors, targets): match_quality_matrix = pairwise_iou(targets_per_image.gt_boxes, anchors_per_image) gt_matched_idxs, anchor_labels = self.matcher(match_quality_matrix) # ground truth box regression matched_gt_boxes = targets_per_image[gt_matched_idxs].gt_boxes gt_anchors_reg_deltas_i = self.box2box_transform.get_deltas( anchors_per_image.tensor, matched_gt_boxes.tensor ) # ground truth classes has_gt = len(targets_per_image) > 0 if has_gt: gt_classes_i = targets_per_image.gt_classes[gt_matched_idxs] # Anchors with label 0 are treated as background. gt_classes_i[anchor_labels == 0] = self.num_classes # Anchors with label -1 are ignored. gt_classes_i[anchor_labels == -1] = -1 else: gt_classes_i = torch.zeros_like(gt_matched_idxs) + self.num_classes gt_classes.append(gt_classes_i) gt_anchors_deltas.append(gt_anchors_reg_deltas_i) return torch.stack(gt_classes), torch.stack(gt_anchors_deltas) def inference(self, box_cls, box_delta, anchors, images): """ Arguments: box_cls, box_delta: Same as the output of :meth:`RetinaNetHead.forward` anchors (list[list[Boxes]]): a list of #images elements. Each is a list of #feature level Boxes. The Boxes contain anchors of this image on the specific feature level. images (ImageList): the input images Returns: results (List[Instances]): a list of #images elements. """ assert len(anchors) == len(images) results = [] box_cls = [permute_to_N_HWA_K(x, self.num_classes) for x in box_cls] box_delta = [permute_to_N_HWA_K(x, 4) for x in box_delta] # list[Tensor], one per level, each has shape (N, Hi x Wi x A, K or 4) for img_idx, anchors_per_image in enumerate(anchors): image_size = images.image_sizes[img_idx] box_cls_per_image = [box_cls_per_level[img_idx] for box_cls_per_level in box_cls] box_reg_per_image = [box_reg_per_level[img_idx] for box_reg_per_level in box_delta] results_per_image = self.inference_single_image( box_cls_per_image, box_reg_per_image, anchors_per_image, tuple(image_size) ) results.append(results_per_image) return results def inference_single_image(self, box_cls, box_delta, anchors, image_size): """ Single-image inference. Return bounding-box detection results by thresholding on scores and applying non-maximum suppression (NMS). Arguments: box_cls (list[Tensor]): list of #feature levels. Each entry contains tensor of size (H x W x A, K) box_delta (list[Tensor]): Same shape as 'box_cls' except that K becomes 4. anchors (list[Boxes]): list of #feature levels. Each entry contains a Boxes object, which contains all the anchors for that image in that feature level. image_size (tuple(H, W)): a tuple of the image height and width. Returns: Same as `inference`, but for only one image. """ boxes_all = [] scores_all = [] class_idxs_all = [] # Iterate over every feature level for box_cls_i, box_reg_i, anchors_i in zip(box_cls, box_delta, anchors): # (HxWxAxK,) box_cls_i = box_cls_i.flatten().sigmoid_() # Keep top k top scoring indices only. num_topk = min(self.topk_candidates, box_reg_i.size(0)) # torch.sort is actually faster than .topk (at least on GPUs) predicted_prob, topk_idxs = box_cls_i.sort(descending=True) predicted_prob = predicted_prob[:num_topk] topk_idxs = topk_idxs[:num_topk] # filter out the proposals with low confidence score keep_idxs = predicted_prob > self.score_threshold predicted_prob = predicted_prob[keep_idxs] topk_idxs = topk_idxs[keep_idxs] anchor_idxs = topk_idxs // self.num_classes classes_idxs = topk_idxs % self.num_classes box_reg_i = box_reg_i[anchor_idxs] anchors_i = anchors_i[anchor_idxs] # predict boxes predicted_boxes = self.box2box_transform.apply_deltas(box_reg_i, anchors_i.tensor) boxes_all.append(predicted_boxes) scores_all.append(predicted_prob) class_idxs_all.append(classes_idxs) boxes_all, scores_all, class_idxs_all = [ cat(x) for x in [boxes_all, scores_all, class_idxs_all] ] keep = batched_nms(boxes_all, scores_all, class_idxs_all, self.nms_threshold) keep = keep[: self.max_detections_per_image] result = Instances(image_size) result.pred_boxes = Boxes(boxes_all[keep]) result.scores = scores_all[keep] result.pred_classes = class_idxs_all[keep] return result def preprocess_image(self, batched_inputs): """ Normalize, pad and batch the input images. """ images = [x["image"].to(self.device) for x in batched_inputs] images = [self.normalizer(x) for x in images] images = ImageList.from_tensors(images, self.backbone.size_divisibility) return images class RetinaNetHead(nn.Module): """ The head used in RetinaNet for object classification and box regression. It has two subnets for the two tasks, with a common structure but separate parameters. """ def __init__(self, cfg, input_shape: List[ShapeSpec]): super().__init__() # fmt: off in_channels = input_shape[0].channels num_classes = cfg.MODEL.RETINANET.NUM_CLASSES num_convs = cfg.MODEL.RETINANET.NUM_CONVS prior_prob = cfg.MODEL.RETINANET.PRIOR_PROB num_anchors = build_anchor_generator(cfg, input_shape).num_cell_anchors # fmt: on assert ( len(set(num_anchors)) == 1 ), "Using different number of anchors between levels is not currently supported!" num_anchors = num_anchors[0] cls_subnet = [] bbox_subnet = [] for _ in range(num_convs): cls_subnet.append( nn.Conv2d(in_channels, in_channels, kernel_size=3, stride=1, padding=1) ) cls_subnet.append(nn.ReLU()) bbox_subnet.append( nn.Conv2d(in_channels, in_channels, kernel_size=3, stride=1, padding=1) ) bbox_subnet.append(nn.ReLU()) self.cls_subnet = nn.Sequential(*cls_subnet) self.bbox_subnet = nn.Sequential(*bbox_subnet) self.cls_score = nn.Conv2d( in_channels, num_anchors * num_classes, kernel_size=3, stride=1, padding=1 ) self.bbox_pred = nn.Conv2d(in_channels, num_anchors * 4, kernel_size=3, stride=1, padding=1) # Initialization for modules in [self.cls_subnet, self.bbox_subnet, self.cls_score, self.bbox_pred]: for layer in modules.modules(): if isinstance(layer, nn.Conv2d): torch.nn.init.normal_(layer.weight, mean=0, std=0.01) torch.nn.init.constant_(layer.bias, 0) # Use prior in model initialization to improve stability bias_value = -math.log((1 - prior_prob) / prior_prob) torch.nn.init.constant_(self.cls_score.bias, bias_value) def forward(self, features): """ Arguments: features (list[Tensor]): FPN feature map tensors in high to low resolution. Each tensor in the list correspond to different feature levels. Returns: logits (list[Tensor]): #lvl tensors, each has shape (N, AxK, Hi, Wi). The tensor predicts the classification probability at each spatial position for each of the A anchors and K object classes. bbox_reg (list[Tensor]): #lvl tensors, each has shape (N, Ax4, Hi, Wi). The tensor predicts 4-vector (dx,dy,dw,dh) box regression values for every anchor. These values are the relative offset between the anchor and the ground truth box. """ logits = [] bbox_reg = [] for feature in features: logits.append(self.cls_score(self.cls_subnet(feature))) bbox_reg.append(self.bbox_pred(self.bbox_subnet(feature))) return logits, bbox_reg ================================================ FILE: detectron2/modeling/meta_arch/semantic_seg.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import numpy as np from typing import Dict import fvcore.nn.weight_init as weight_init import torch from torch import nn from torch.nn import functional as F from detectron2.layers import Conv2d, ShapeSpec from detectron2.structures import ImageList from detectron2.utils.registry import Registry from ..backbone import build_backbone from ..postprocessing import sem_seg_postprocess from .build import META_ARCH_REGISTRY __all__ = ["SemanticSegmentor", "SEM_SEG_HEADS_REGISTRY", "SemSegFPNHead", "build_sem_seg_head"] SEM_SEG_HEADS_REGISTRY = Registry("SEM_SEG_HEADS") """ Registry for semantic segmentation heads, which make semantic segmentation predictions from feature maps. """ @META_ARCH_REGISTRY.register() class SemanticSegmentor(nn.Module): """ Main class for semantic segmentation architectures. """ def __init__(self, cfg): super().__init__() self.device = torch.device(cfg.MODEL.DEVICE) self.backbone = build_backbone(cfg) self.sem_seg_head = build_sem_seg_head(cfg, self.backbone.output_shape()) pixel_mean = torch.Tensor(cfg.MODEL.PIXEL_MEAN).to(self.device).view(-1, 1, 1) pixel_std = torch.Tensor(cfg.MODEL.PIXEL_STD).to(self.device).view(-1, 1, 1) self.normalizer = lambda x: (x - pixel_mean) / pixel_std self.to(self.device) def forward(self, batched_inputs): """ Args: batched_inputs: a list, batched outputs of :class:`DatasetMapper` . Each item in the list contains the inputs for one image. For now, each item in the list is a dict that contains: image: Tensor, image in (C, H, W) format. sem_seg: semantic segmentation ground truth Other information that's included in the original dicts, such as: "height", "width" (int): the output resolution of the model, used in inference. See :meth:`postprocess` for details. Returns: list[dict]: Each dict is the output for one input image. The dict contains one key "sem_seg" whose value is a Tensor of the output resolution that represents the per-pixel segmentation prediction. """ images = [x["image"].to(self.device) for x in batched_inputs] images = [self.normalizer(x) for x in images] images = ImageList.from_tensors(images, self.backbone.size_divisibility) features = self.backbone(images.tensor) if "sem_seg" in batched_inputs[0]: targets = [x["sem_seg"].to(self.device) for x in batched_inputs] targets = ImageList.from_tensors( targets, self.backbone.size_divisibility, self.sem_seg_head.ignore_value ).tensor else: targets = None results, losses = self.sem_seg_head(features, targets) if self.training: return losses processed_results = [] for result, input_per_image, image_size in zip(results, batched_inputs, images.image_sizes): height = input_per_image.get("height") width = input_per_image.get("width") r = sem_seg_postprocess(result, image_size, height, width) processed_results.append({"sem_seg": r}) return processed_results def build_sem_seg_head(cfg, input_shape): """ Build a semantic segmentation head from `cfg.MODEL.SEM_SEG_HEAD.NAME`. """ name = cfg.MODEL.SEM_SEG_HEAD.NAME return SEM_SEG_HEADS_REGISTRY.get(name)(cfg, input_shape) @SEM_SEG_HEADS_REGISTRY.register() class SemSegFPNHead(nn.Module): """ A semantic segmentation head described in detail in the Panoptic Feature Pyramid Networks paper (https://arxiv.org/abs/1901.02446). It takes FPN features as input and merges information from all levels of the FPN into single output. """ def __init__(self, cfg, input_shape: Dict[str, ShapeSpec]): super().__init__() # fmt: off self.in_features = cfg.MODEL.SEM_SEG_HEAD.IN_FEATURES feature_strides = {k: v.stride for k, v in input_shape.items()} feature_channels = {k: v.channels for k, v in input_shape.items()} self.ignore_value = cfg.MODEL.SEM_SEG_HEAD.IGNORE_VALUE num_classes = cfg.MODEL.SEM_SEG_HEAD.NUM_CLASSES conv_dims = cfg.MODEL.SEM_SEG_HEAD.CONVS_DIM self.common_stride = cfg.MODEL.SEM_SEG_HEAD.COMMON_STRIDE norm = cfg.MODEL.SEM_SEG_HEAD.NORM self.loss_weight = cfg.MODEL.SEM_SEG_HEAD.LOSS_WEIGHT # fmt: on self.scale_heads = [] for in_feature in self.in_features: head_ops = [] head_length = max( 1, int(np.log2(feature_strides[in_feature]) - np.log2(self.common_stride)) ) for k in range(head_length): norm_module = nn.GroupNorm(32, conv_dims) if norm == "GN" else None conv = Conv2d( feature_channels[in_feature] if k == 0 else conv_dims, conv_dims, kernel_size=3, stride=1, padding=1, bias=not norm, norm=norm_module, activation=F.relu, ) weight_init.c2_msra_fill(conv) head_ops.append(conv) if feature_strides[in_feature] != self.common_stride: head_ops.append( nn.Upsample(scale_factor=2, mode="bilinear", align_corners=False) ) self.scale_heads.append(nn.Sequential(*head_ops)) self.add_module(in_feature, self.scale_heads[-1]) self.predictor = Conv2d(conv_dims, num_classes, kernel_size=1, stride=1, padding=0) weight_init.c2_msra_fill(self.predictor) def forward(self, features, targets=None): for i, f in enumerate(self.in_features): if i == 0: x = self.scale_heads[i](features[f]) else: x = x + self.scale_heads[i](features[f]) x = self.predictor(x) x = F.interpolate(x, scale_factor=self.common_stride, mode="bilinear", align_corners=False) if self.training: losses = {} losses["loss_sem_seg"] = ( F.cross_entropy(x, targets, reduction="mean", ignore_index=self.ignore_value) * self.loss_weight ) return [], losses else: return x, {} ================================================ FILE: detectron2/modeling/poolers.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import math import sys import torch from torch import nn from torchvision.ops import RoIPool from detectron2.layers import ROIAlign, ROIAlignRotated, cat __all__ = ["ROIPooler"] def assign_boxes_to_levels(box_lists, min_level, max_level, canonical_box_size, canonical_level): """ Map each box in `box_lists` to a feature map level index and return the assignment vector. Args: box_lists (list[Boxes] | list[RotatedBoxes]): A list of N Boxes or N RotatedBoxes, where N is the number of images in the batch. min_level (int): Smallest feature map level index. The input is considered index 0, the output of stage 1 is index 1, and so. max_level (int): Largest feature map level index. canonical_box_size (int): A canonical box size in pixels (sqrt(box area)). canonical_level (int): The feature map level index on which a canonically-sized box should be placed. Returns: A tensor of length M, where M is the total number of boxes aggregated over all N batch images. The memory layout corresponds to the concatenation of boxes from all images. Each element is the feature map index, as an offset from `self.min_level`, for the corresponding box (so value i means the box is at `self.min_level + i`). """ eps = sys.float_info.epsilon box_sizes = torch.sqrt(cat([boxes.area() for boxes in box_lists])) # Eqn.(1) in FPN paper level_assignments = torch.floor( canonical_level + torch.log2(box_sizes / canonical_box_size + eps) ) level_assignments = torch.clamp(level_assignments, min=min_level, max=max_level) return level_assignments.to(torch.int64) - min_level def convert_boxes_to_pooler_format(box_lists): """ Convert all boxes in `box_lists` to the low-level format used by ROI pooling ops (see description under Returns). Args: box_lists (list[Boxes] | list[RotatedBoxes]): A list of N Boxes or N RotatedBoxes, where N is the number of images in the batch. Returns: When input is list[Boxes]: A tensor of shape (M, 5), where M is the total number of boxes aggregated over all N batch images. The 5 columns are (batch index, x0, y0, x1, y1), where batch index is the index in [0, N) identifying which batch image the box with corners at (x0, y0, x1, y1) comes from. When input is list[RotatedBoxes]: A tensor of shape (M, 6), where M is the total number of boxes aggregated over all N batch images. The 6 columns are (batch index, x_ctr, y_ctr, width, height, angle_degrees), where batch index is the index in [0, N) identifying which batch image the rotated box (x_ctr, y_ctr, width, height, angle_degrees) comes from. """ def fmt_box_list(box_tensor, batch_index): repeated_index = torch.full( (len(box_tensor), 1), batch_index, dtype=box_tensor.dtype, device=box_tensor.device ) return cat((repeated_index, box_tensor), dim=1) pooler_fmt_boxes = cat( [fmt_box_list(box_list.tensor, i) for i, box_list in enumerate(box_lists)], dim=0 ) return pooler_fmt_boxes class ROIPooler(nn.Module): """ Region of interest feature map pooler that supports pooling from one or more feature maps. """ def __init__( self, output_size, scales, sampling_ratio, pooler_type, canonical_box_size=224, canonical_level=4, ): """ Args: output_size (int, tuple[int] or list[int]): output size of the pooled region, e.g., 14 x 14. If tuple or list is given, the length must be 2. scales (list[float]): The scale for each low-level pooling op relative to the input image. For a feature map with stride s relative to the input image, scale is defined as a 1 / s. sampling_ratio (int): The `sampling_ratio` parameter for the ROIAlign op. pooler_type (string): Name of the type of pooling operation that should be applied. For instance, "ROIPool" or "ROIAlignV2". canonical_box_size (int): A canonical box size in pixels (sqrt(box area)). The default is heuristically defined as 224 pixels in the FPN paper (based on ImageNet pre-training). canonical_level (int): The feature map level index on which a canonically-sized box should be placed. The default is defined as level 4 in the FPN paper. """ super().__init__() if isinstance(output_size, int): output_size = (output_size, output_size) assert len(output_size) == 2 assert isinstance(output_size[0], int) and isinstance(output_size[1], int) self.output_size = output_size if pooler_type == "ROIAlign": self.level_poolers = nn.ModuleList( ROIAlign( output_size, spatial_scale=scale, sampling_ratio=sampling_ratio, aligned=False ) for scale in scales ) elif pooler_type == "ROIAlignV2": self.level_poolers = nn.ModuleList( ROIAlign( output_size, spatial_scale=scale, sampling_ratio=sampling_ratio, aligned=True ) for scale in scales ) elif pooler_type == "ROIPool": self.level_poolers = nn.ModuleList( RoIPool(output_size, spatial_scale=scale) for scale in scales ) elif pooler_type == "ROIAlignRotated": self.level_poolers = nn.ModuleList( ROIAlignRotated(output_size, spatial_scale=scale, sampling_ratio=sampling_ratio) for scale in scales ) else: raise ValueError("Unknown pooler type: {}".format(pooler_type)) # Map scale (defined as 1 / stride) to its feature map level under the # assumption that stride is a power of 2. min_level = -math.log2(scales[0]) max_level = -math.log2(scales[-1]) assert math.isclose(min_level, int(min_level)) and math.isclose(max_level, int(max_level)) self.min_level = int(min_level) self.max_level = int(max_level) assert 0 < self.min_level and self.min_level <= self.max_level assert self.min_level <= canonical_level and canonical_level <= self.max_level self.canonical_level = canonical_level assert canonical_box_size > 0 self.canonical_box_size = canonical_box_size def forward(self, x, box_lists): """ Args: x (list[Tensor]): A list of feature maps with scales matching those used to construct this module. box_lists (list[Boxes] | list[RotatedBoxes]): A list of N Boxes or N RotatedBoxes, where N is the number of images in the batch. Returns: Tensor: A tensor of shape (M, C, output_size, output_size) where M is the total number of boxes aggregated over all N batch images and C is the number of channels in `x`. """ num_level_assignments = len(self.level_poolers) pooler_fmt_boxes = convert_boxes_to_pooler_format(box_lists) if num_level_assignments == 1: return self.level_poolers[0](x[0], pooler_fmt_boxes) level_assignments = assign_boxes_to_levels( box_lists, self.min_level, self.max_level, self.canonical_box_size, self.canonical_level ) num_boxes = len(pooler_fmt_boxes) num_channels = x[0].shape[1] output_size = self.output_size[0] dtype, device = x[0].dtype, x[0].device output = torch.zeros( (num_boxes, num_channels, output_size, output_size), dtype=dtype, device=device ) for level, (x_level, pooler) in enumerate(zip(x, self.level_poolers)): inds = torch.nonzero(level_assignments == level).squeeze(1) pooler_fmt_boxes_level = pooler_fmt_boxes[inds] output[inds] = pooler(x_level, pooler_fmt_boxes_level) return output ================================================ FILE: detectron2/modeling/postprocessing.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from torch.nn import functional as F import math import numpy as np from detectron2.layers import paste_masks_in_image from detectron2.structures import Boxes, BoxMode, Instances import pysobatools.sobaeval as eval def decode(segm): return eval.maskUtils.decode(segm).astype('uint8') def encode(segm): return eval.maskUtils.encode(segm) def detector_postprocess(results, output_height, output_width, mask_threshold=0.5): """ Resize the output instances. The input images are often resized when entering an object detector. As a result, we often need the outputs of the detector in a different resolution from its inputs. This function will resize the raw outputs of an R-CNN detector to produce outputs according to the desired output resolution. Args: results (Instances): the raw outputs from the detector. `results.image_size` contains the input image resolution the detector sees. This object might be modified in-place. output_height, output_width: the desired output resolution. Returns: Instances: the resized output from the model, based on the output resolution """ scale_x, scale_y = (output_width / results.image_size[1], output_height / results.image_size[0]) results = Instances((output_height, output_width), **results.get_fields()) if results.has("pred_boxes"): output_boxes = results.pred_boxes elif results.has("proposal_boxes"): output_boxes = results.proposal_boxes output_boxes.tensor[:, 0::2] *= scale_x output_boxes.tensor[:, 1::2] *= scale_y output_boxes.clip(results.image_size) results = results[output_boxes.nonempty()] if results.has("pred_masks"): results.pred_masks = paste_masks_in_image( results.pred_masks[:, 0, :, :], # N, 1, M, M results.pred_boxes, results.image_size, threshold=mask_threshold, ) if results.has("pred_keypoints"): results.pred_keypoints[:, :, 0] *= scale_x results.pred_keypoints[:, :, 1] *= scale_y return results def sem_seg_postprocess(result, img_size, output_height, output_width): """ Return semantic segmentation predictions in the original resolution. The input images are often resized when entering semantic segmentor. Moreover, in same cases, they also padded inside segmentor to be divisible by maximum network stride. As a result, we often need the predictions of the segmentor in a different resolution from its inputs. Args: result (Tensor): semantic segmentation prediction logits. A tensor of shape (C, H, W), where C is the number of classes, and H, W are the height and width of the prediction. img_size (tuple): image size that segmentor is taking as input. output_height, output_width: the desired output resolution. Returns: semantic segmentation prediction (Tensor): A tensor of the shape (C, output_height, output_width) that contains per-pixel soft predictions. """ result = result[:, : img_size[0], : img_size[1]].expand(1, -1, -1, -1) result = F.interpolate( result, size=(output_height, output_width), mode="bilinear", align_corners=False )[0] return result def takeTwo(elm): return elm[1] # # """ # param: # rec1: (x0, y0, w, h) # rec2: (x0, y0, w, h) # x0, y0: the upper left point of rec. # w, h: the length and width of rec. # """ def compute_iou(rec1, rec2): left_x = max(rec1[0], rec2[0]) left_y = max(rec1[1], rec2[1]) right_x = min(rec1[0] + rec1[2], rec2[0] + rec2[2]) right_y = min(rec1[1] + rec1[3], rec2[1] + rec2[3]) if left_x >= right_x or left_y >= right_y: return 0 else: S_mid = (right_y - left_y) * (right_x - left_x) S_total = (rec1[2] * rec1[3]) + (rec2[2] * rec2[3]) - S_mid return S_mid / S_total def box_combine(o, s, box1, box2): """ args: box1 : (x1_0, y1_0, x1_1, y1_1) box2: (x2_0, y2_0, x2_1, y2_1) return: dict["1_2":(min(x1_0,x2_0),min(y1_0,y2_0),max(x1_1,x2-1),max(y2_1,y2_2))] """ name = '{}_{}'.format(o, s) combine = (min(box1[0], box2[0]), min(box1[1], box2[1]), max(box1[2], box2[2]), max(box1[3], box2[3])) combine = (combine[0], combine[1], combine[2] - combine[0], combine[3] - combine[1]) # XYXY to XYWH return [name, combine] def compute_direction(box1,box2): pass def rect_distance(a, b): x1, y1, x1b, y1b = a x2, y2, x2b, y2b = b left = x2b < x1 right = x1b < x2 bottom = y2b < y1 top = y1b < y2 if top and left: return dist((x1, y1b), (x2b, y2)) elif left and bottom: return dist((x1, y1), (x2b, y2b)) elif bottom and right: return dist((x1b, y1), (x2, y2b)) elif right and top: return dist((x1b, y1b), (x2, y2)) elif left: return x1 - x2b elif right: return x2 - x1b elif bottom: return y1 - y2b elif top: return y2 - y1b else: return 0 def dist(a, b): return math.sqrt((a[0] - b[0])**2 + (a[1] - b[1])**2) def matchor(instance, association): results = [] objects = [i for i, v in enumerate(instance.pred_classes) if v == 0] shadows = [i for i, v in enumerate(instance.pred_classes) if v == 1] boxes = [] for o in objects: if instance.scores[o] < 0.5: continue for s in shadows: if instance.scores[s] < 0.5: continue o_box = instance.pred_boxes[o].tensor[0].numpy() s_box = instance.pred_boxes[s].tensor[0].numpy() o_area = (o_box[2] - o_box[0]) * (o_box[3] - o_box[1]) s_area = (s_box[2] - s_box[0]) * (s_box[3] - s_box[1]) if compute_iou((o_box[0], o_box[1], o_box[2] - o_box[0], o_box[3] - o_box[1]), (s_box[0], s_box[1], s_box[2] - s_box[0], s_box[3] - s_box[1])) == 0: if rect_distance(o_box, s_box) >= s_box[3] - s_box[1]: continue boxes.append(box_combine(o, s, o_box, s_box)) ass_boxes = association.pred_boxes.tensor.numpy() pair = [] for i, ass_box in enumerate(ass_boxes): scores = [] ass_box = [ass_box[0], ass_box[1], ass_box[2] - ass_box[0], ass_box[3] - ass_box[1]] for box in boxes: k, v = box scores.append([str(i) + '_' + k, compute_iou(ass_box, v)]) if len(ass_boxes) == 1: pair.append(sorted(scores, key=takeTwo, reverse=True)[:1]) else: pair.append(sorted(scores, key=takeTwo, reverse=True)[:1]) if not sum([sc[1] > 0.5 for sc in pair[i]]): pair[i] = [[0, 0]] O = {} S = {} for k, v in enumerate(pair): if v != [[0, 0]] and v != []: r, o, s = v[0][0].split('_') if o in O: if s in S: if v[0][1] > O[o][1] and v[0][1] > S[s][1]: O[o] = v[0] S[s] = v[0] else: if v[0][1] > O[o][1]: O[o] = v[0] elif s in S: if v[0][1] > S[s][1]: S[s] = v[0] else: O[o] = v[0] S[s] = v[0] for k, v in S.items(): r, o, s = v[0].split('_') results.append((int(o), int(s), int(r))) ins_association = instance.pred_classes * 0 ret_association = association.pred_classes * 0 if results == []: instance.pred_associations = ins_association association.pred_associations = ret_association return instance, association association_id = 1 for i in results: if ins_association[i[0]]+ins_association[i[1]] == 0: ins_association[i[0]] = association_id ins_association[i[1]] = association_id ret_association[i[2]] = association_id association_id += 1 instance.pred_associations = ins_association association.pred_associations = ret_association return instance, association def combine_association(instance, association): pred_masks = [mask.numpy() for mask in instance.pred_masks] pred_scores = instance.scores.numpy() pred_boxes = instance.pred_boxes.tensor.numpy().tolist() pred_classes = instance.pred_classes.numpy() h, w = pred_masks[0].shape pred_associations = instance.pred_associations.numpy() pred_light = association.pred_light.tensor.numpy() ret = Instances((h,w)) ins = Instances((h,w)) if np.sum(pred_associations) == 0: ret.pred_boxes = association.pred_boxes ret.scores = association.scores ret.pred_classes = association.pred_classes ret.pred_light = association.pred_light.tensor.numpy().tolist() segm = np.zeros((h,w,1),order='F',dtype='uint8') ret.pred_masks = [segm] * len(association.pred_boxes) ret.pred_associations = association.pred_associations.numpy().astype('int').tolist() instance.pred_associations = pred_associations.astype('int').tolist() return ret,instance mask_map = {} for i, ass in enumerate(pred_associations): if ass != 0: if ass in mask_map: if pred_classes[i] == 1: mask_map[ass].append((pred_masks[i], pred_scores[i],pred_classes[i],pred_boxes[i])) else: mask_map[ass] = [(pred_masks[i], pred_scores[i],pred_classes[i],pred_boxes[i]),mask_map[ass][0]] else: mask_map[ass] = [(pred_masks[i], pred_scores[i],pred_classes[i],pred_boxes[i])] results = [] boxes = [] scores = [] classes = [] associations = [] light = [] for i,ass in enumerate(association.pred_associations): if ass != 0: light.append(pred_light[i].tolist()) for k, v in mask_map.items(): associations.append(int(k)) s, o = v avg_score = float((s[1]+ o[1])/2) _s = s[0].reshape(h,w,1) _o = o[0].reshape(h,w,1) comb = _s + _o classes.append(0) segm = encode(np.array(comb,order='F',dtype='uint8'))[0] boxes.append(BoxMode.convert(eval.maskUtils.toBbox(segm), BoxMode.XYWH_ABS, BoxMode.XYXY_ABS)) results.append(comb) scores.append(avg_score) ret.pred_masks = results ret.pred_boxes = boxes ret.scores = scores ret.pred_classes = classes ret.pred_associations = associations ret.pred_light= light instance.pred_associations = instance.pred_associations.numpy().astype('int').tolist() return ret,instance ================================================ FILE: detectron2/modeling/proposal_generator/LISA_rpn.py ================================================ # Copyright (c) Tianyu Wang. All Rights Reserved. from typing import Dict, List import torch import torch.nn.functional as F from torch import nn from detectron2.layers import ShapeSpec from detectron2.utils.registry import Registry from detectron2.modeling.anchor_generator import build_anchor_generator from detectron2.modeling.box_regression import Box2BoxTransform from detectron2.modeling.matcher import Matcher from detectron2.modeling import PROPOSAL_GENERATOR_REGISTRY, RPN_HEAD_REGISTRY from detectron2.modeling.proposal_generator.rpn_outputs import RPNOutputs, find_top_rpn_proposals from detectron2.modeling.proposal_generator.rpn import StandardRPNHead, RPN from detectron2.structures import BoxMode,Boxes """ Registry for LISA RPN heads, which take CNN feature maps and perform objectness classification and bounding box regression for anchors. """ # NOTE: `cfg.MODEL.RPN.HEAD_NAME` should be "LISARPNHead". def build_rpn_head(cfg, input_shape,shadow_object_part=False): """ Build an RPN head defined by `cfg.MODEL.RPN.HEAD_NAME`. """ name = cfg.MODEL.RPN.HEAD_NAME return RPN_HEAD_REGISTRY.get(name)(cfg, input_shape,shadow_object_part) @RPN_HEAD_REGISTRY.register() class LISARPNHead(StandardRPNHead): def __init__(self, cfg, input_shape: List[ShapeSpec], shadow_object_part= False): super(LISARPNHead, self).__init__(cfg,input_shape) self.shadow_object_part = shadow_object_part if self.shadow_object_part: in_channels = [s.channels for s in input_shape] assert len(set(in_channels)) == 1, "Each level must have the same channel!" in_channels = in_channels[0] self.conv = nn.Conv2d(in_channels , in_channels, kernel_size=3, stride=1, padding=1) for l in [self.conv]: nn.init.normal_(l.weight, std=0.01) nn.init.constant_(l.bias, 0) def forward(self, features): """ Args: features (list[Tensor]): list of feature maps """ pred_objectness_logits = [] pred_anchor_deltas = [] if self.shadow_object_part == False: pre_features = [] for i,x in enumerate(features): t = F.relu(self.conv(x)) # if self.shadow_object_part == False: # pre_features.append(t) pred_objectness_logits.append(self.objectness_logits(t)) pred_anchor_deltas.append(self.anchor_deltas(t)) if self.shadow_object_part == False: return pred_objectness_logits, pred_anchor_deltas, None else: return pred_objectness_logits, pred_anchor_deltas def build_proposal_generator(cfg, input_shape, **args): """ Build a proposal generator from `cfg.MODEL.PROPOSAL_GENERATOR.NAME`. The name can be "PrecomputedProposals" to use no proposal generator. """ name = cfg.MODEL.PROPOSAL_GENERATOR.NAME if name == "PrecomputedProposals": return None return PROPOSAL_GENERATOR_REGISTRY.get(name)(cfg, input_shape,**args) @PROPOSAL_GENERATOR_REGISTRY.register() class LISARPN(RPN): def __init__(self, cfg, input_shape: Dict[str, ShapeSpec], shadow_object_part= False): super(LISARPN, self).__init__(cfg, input_shape) self.shadow_object_part = shadow_object_part if self.shadow_object_part: self.rpn_head = build_rpn_head(cfg, [input_shape[f] for f in self.in_features], self.shadow_object_part) def forward(self, images, features, gt_instances=None, pre_proposals=None): gt_boxes = [x.gt_boxes for x in gt_instances] if gt_instances is not None else None del gt_instances if self.shadow_object_part == False: features = [features[f] for f in self.in_features] pred_objectness_logits, pred_anchor_deltas, pre_features = self.rpn_head(features) anchors = self.anchor_generator(features) else: features = [features[f] for f in self.in_features] pred_objectness_logits, pred_anchor_deltas = self.rpn_head(features) anchors = self.anchor_generator(features) assert len(anchors[0]) == len(pre_proposals), "number of pre_proposals {} and pre_anchors {} should be same.".format(len(anchors[0]),len(pre_proposals)) outputs = RPNOutputs( self.box2box_transform, self.anchor_matcher, self.batch_size_per_image, self.positive_fraction, images, pred_objectness_logits, pred_anchor_deltas, anchors, self.boundary_threshold, gt_boxes, self.smooth_l1_beta, ) if self.training: if self.shadow_object_part == False: losses = {k+'_rela': v * self.loss_weight for k, v in outputs.losses().items()} else: losses = {k: v * self.loss_weight for k, v in outputs.losses().items()} else: losses = {} with torch.no_grad(): pre_proposals = outputs.predict_proposals() # Find the top proposals by applying NMS and removing boxes that # are too small. The proposals are treated as fixed for approximate # joint training with roi heads. This approach ignores the derivative # w.r.t. the proposal boxes’ coordinates that are also network # responses, so is approximate. proposals = find_top_rpn_proposals( pre_proposals, outputs.predict_objectness_logits(), images, self.nms_thresh, self.pre_nms_topk[self.training], self.post_nms_topk[self.training], self.min_box_side_len, self.training, ) # For RPN-only models, the proposals are the final output and we return them in # high-to-low confidence order. # For end-to-end models, the RPN proposals are an intermediate state # and this sorting is actually not needed. But the cost is negligible. inds = [p.objectness_logits.sort(descending=True)[1] for p in proposals] proposals = [p[ind] for p, ind in zip(proposals, inds)] if self.shadow_object_part == False: return proposals, losses, pre_features, pre_proposals else: return proposals, losses ================================================ FILE: detectron2/modeling/proposal_generator/__init__.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .build import PROPOSAL_GENERATOR_REGISTRY, build_proposal_generator from .rpn import RPN_HEAD_REGISTRY, build_rpn_head ================================================ FILE: detectron2/modeling/proposal_generator/build.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from detectron2.utils.registry import Registry PROPOSAL_GENERATOR_REGISTRY = Registry("PROPOSAL_GENERATOR") PROPOSAL_GENERATOR_REGISTRY.__doc__ = """ Registry for proposal generator, which produces object proposals from feature maps. The registered object will be called with `obj(cfg, input_shape)`. The call should return a `nn.Module` object. """ from . import rpn, rrpn # noqa F401 isort:skip def build_proposal_generator(cfg, input_shape): """ Build a proposal generator from `cfg.MODEL.PROPOSAL_GENERATOR.NAME`. The name can be "PrecomputedProposals" to use no proposal generator. """ name = cfg.MODEL.PROPOSAL_GENERATOR.NAME if name == "PrecomputedProposals": return None return PROPOSAL_GENERATOR_REGISTRY.get(name)(cfg, input_shape) ================================================ FILE: detectron2/modeling/proposal_generator/proposal_utils.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import math import torch from detectron2.structures import Instances def add_ground_truth_to_proposals(gt_boxes, proposals, gt_light =None): """ Call `add_ground_truth_to_proposals_single_image` for all images. Args: gt_boxes(list[Boxes]): list of N elements. Element i is a Boxes representing the gound-truth for image i. proposals (list[Instances]): list of N elements. Element i is a Instances representing the proposals for image i. Returns: list[Instances]: list of N Instances. Each is the proposals for the image, with field "proposal_boxes" and "objectness_logits". """ assert gt_boxes is not None assert len(proposals) == len(gt_boxes) if len(proposals) == 0: return proposals if gt_light == None: gt_light = [None] * len(gt_boxes) return [ add_ground_truth_to_proposals_single_image(gt_boxes_i, proposals_i, gt_light_i) for gt_boxes_i, proposals_i,gt_light_i in zip(gt_boxes, proposals,gt_light) ] def add_ground_truth_to_proposals_single_image(gt_boxes, proposals,gt_light): """ Augment `proposals` with ground-truth boxes from `gt_boxes`. Args: Same as `add_ground_truth_to_proposals`, but with gt_boxes and proposals per image. Returns: Same as `add_ground_truth_to_proposals`, but for only one image. """ device = proposals.objectness_logits.device # Concatenating gt_boxes with proposals requires them to have the same fields # Assign all ground-truth boxes an objectness logit corresponding to P(object) \approx 1. gt_logit_value = math.log((1.0 - 1e-10) / (1 - (1.0 - 1e-10))) gt_logits = gt_logit_value * torch.ones(len(gt_boxes), device=device) gt_proposal = Instances(proposals.image_size) gt_proposal.proposal_boxes = gt_boxes gt_proposal.objectness_logits = gt_logits if gt_light != None: gt_proposal.proposal_light = gt_light new_proposals = Instances.cat([proposals, gt_proposal]) return new_proposals ================================================ FILE: detectron2/modeling/proposal_generator/rpn.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from typing import Dict, List import torch import torch.nn.functional as F from torch import nn from detectron2.layers import ShapeSpec from detectron2.utils.registry import Registry from ..anchor_generator import build_anchor_generator from ..box_regression import Box2BoxTransform from ..matcher import Matcher from .build import PROPOSAL_GENERATOR_REGISTRY from .rpn_outputs import RPNOutputs, find_top_rpn_proposals RPN_HEAD_REGISTRY = Registry("RPN_HEAD") """ Registry for RPN heads, which take feature maps and perform objectness classification and bounding box regression for anchors. """ def build_rpn_head(cfg, input_shape): """ Build an RPN head defined by `cfg.MODEL.RPN.HEAD_NAME`. """ name = cfg.MODEL.RPN.HEAD_NAME return RPN_HEAD_REGISTRY.get(name)(cfg, input_shape) @RPN_HEAD_REGISTRY.register() class StandardRPNHead(nn.Module): """ RPN classification and regression heads. Uses a 3x3 conv to produce a shared hidden state from which one 1x1 conv predicts objectness logits for each anchor and a second 1x1 conv predicts bounding-box deltas specifying how to deform each anchor into an object proposal. """ def __init__(self, cfg, input_shape: List[ShapeSpec]): super().__init__() # Standard RPN is shared across levels: in_channels = [s.channels for s in input_shape] assert len(set(in_channels)) == 1, "Each level must have the same channel!" in_channels = in_channels[0] # RPNHead should take the same input as anchor generator # NOTE: it assumes that creating an anchor generator does not have unwanted side effect. anchor_generator = build_anchor_generator(cfg, input_shape) num_cell_anchors = anchor_generator.num_cell_anchors box_dim = anchor_generator.box_dim assert ( len(set(num_cell_anchors)) == 1 ), "Each level must have the same number of cell anchors" num_cell_anchors = num_cell_anchors[0] # 3x3 conv for the hidden representation self.conv = nn.Conv2d(in_channels, in_channels, kernel_size=3, stride=1, padding=1) # 1x1 conv for predicting objectness logits self.objectness_logits = nn.Conv2d(in_channels, num_cell_anchors, kernel_size=1, stride=1) # 1x1 conv for predicting box2box transform deltas self.anchor_deltas = nn.Conv2d( in_channels, num_cell_anchors * box_dim, kernel_size=1, stride=1 ) for l in [self.conv, self.objectness_logits, self.anchor_deltas]: nn.init.normal_(l.weight, std=0.01) nn.init.constant_(l.bias, 0) def forward(self, features): """ Args: features (list[Tensor]): list of feature maps """ pred_objectness_logits = [] pred_anchor_deltas = [] for x in features: t = F.relu(self.conv(x)) pred_objectness_logits.append(self.objectness_logits(t)) pred_anchor_deltas.append(self.anchor_deltas(t)) return pred_objectness_logits, pred_anchor_deltas @PROPOSAL_GENERATOR_REGISTRY.register() class RPN(nn.Module): """ Region Proposal Network, introduced by the Faster R-CNN paper. """ def __init__(self, cfg, input_shape: Dict[str, ShapeSpec]): super().__init__() # fmt: off self.min_box_side_len = cfg.MODEL.PROPOSAL_GENERATOR.MIN_SIZE self.in_features = cfg.MODEL.RPN.IN_FEATURES self.nms_thresh = cfg.MODEL.RPN.NMS_THRESH self.batch_size_per_image = cfg.MODEL.RPN.BATCH_SIZE_PER_IMAGE self.positive_fraction = cfg.MODEL.RPN.POSITIVE_FRACTION self.smooth_l1_beta = cfg.MODEL.RPN.SMOOTH_L1_BETA self.loss_weight = cfg.MODEL.RPN.LOSS_WEIGHT # fmt: on # Map from self.training state to train/test settings self.pre_nms_topk = { True: cfg.MODEL.RPN.PRE_NMS_TOPK_TRAIN, False: cfg.MODEL.RPN.PRE_NMS_TOPK_TEST, } self.post_nms_topk = { True: cfg.MODEL.RPN.POST_NMS_TOPK_TRAIN, False: cfg.MODEL.RPN.POST_NMS_TOPK_TEST, } self.boundary_threshold = cfg.MODEL.RPN.BOUNDARY_THRESH self.anchor_generator = build_anchor_generator( cfg, [input_shape[f] for f in self.in_features] ) self.box2box_transform = Box2BoxTransform(weights=cfg.MODEL.RPN.BBOX_REG_WEIGHTS) self.anchor_matcher = Matcher( cfg.MODEL.RPN.IOU_THRESHOLDS, cfg.MODEL.RPN.IOU_LABELS, allow_low_quality_matches=True ) self.rpn_head = build_rpn_head(cfg, [input_shape[f] for f in self.in_features]) def forward(self, images, features, gt_instances=None): """ Args: images (ImageList): input images of length `N` features (dict[str: Tensor]): input data as a mapping from feature map name to tensor. Axis 0 represents the number of images `N` in the input data; axes 1-3 are channels, height, and width, which may vary between feature maps (e.g., if a feature pyramid is used). gt_instances (list[Instances], optional): a length `N` list of `Instances`s. Each `Instances` stores ground-truth instances for the corresponding image. Returns: proposals: list[Instances] or None loss: dict[Tensor] """ gt_boxes = [x.gt_boxes for x in gt_instances] if gt_instances is not None else None del gt_instances features = [features[f] for f in self.in_features] pred_objectness_logits, pred_anchor_deltas = self.rpn_head(features) anchors = self.anchor_generator(features) # Real anchors # TODO: The anchors only depend on the feature map shape; there's probably # an opportunity for some optimizations (e.g., caching anchors). outputs = RPNOutputs( self.box2box_transform, self.anchor_matcher, self.batch_size_per_image, self.positive_fraction, images, pred_objectness_logits, pred_anchor_deltas, anchors, self.boundary_threshold, gt_boxes, self.smooth_l1_beta, ) if self.training: losses = {k: v * self.loss_weight for k, v in outputs.losses().items()} else: losses = {} with torch.no_grad(): # Find the top proposals by applying NMS and removing boxes that # are too small. The proposals are treated as fixed for approximate # joint training with roi heads. This approach ignores the derivative # w.r.t. the proposal boxes’ coordinates that are also network # responses, so is approximate. proposals = find_top_rpn_proposals( outputs.predict_proposals(), outputs.predict_objectness_logits(), images, self.nms_thresh, self.pre_nms_topk[self.training], self.post_nms_topk[self.training], self.min_box_side_len, self.training, ) # For RPN-only models, the proposals are the final output and we return them in # high-to-low confidence order. # For end-to-end models, the RPN proposals are an intermediate state # and this sorting is actually not needed. But the cost is negligible. inds = [p.objectness_logits.sort(descending=True)[1] for p in proposals] proposals = [p[ind] for p, ind in zip(proposals, inds)] return proposals, losses ================================================ FILE: detectron2/modeling/proposal_generator/rpn_outputs.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import itertools import logging import numpy as np import torch import torch.nn.functional as F from fvcore.nn import smooth_l1_loss from detectron2.layers import batched_nms, cat from detectron2.structures import Boxes, Instances, pairwise_iou from detectron2.utils.events import get_event_storage from ..sampling import subsample_labels logger = logging.getLogger(__name__) # TODO: comments for future refactoring of this module # # From @rbg: # This code involves a significant amount of tensor reshaping and permuting. Look for # ways to simplify this. """ Shape shorthand in this module: N: number of images in the minibatch L: number of feature maps per image on which RPN is run A: number of cell anchors (must be the same for all feature maps) Hi, Wi: height and width of the i-th feature map 4: size of the box parameterization Naming convention: objectness: refers to the binary classification of an anchor as object vs. not object. deltas: refers to the 4-d (dx, dy, dw, dh) deltas that parameterize the box2box transform (see :class:`box_regression.Box2BoxTransform`). pred_objectness_logits: predicted objectness scores in [-inf, +inf]; use sigmoid(pred_objectness_logits) to estimate P(object). gt_objectness_logits: ground-truth binary classification labels for objectness pred_anchor_deltas: predicted box2box transform deltas gt_anchor_deltas: ground-truth box2box transform deltas """ def find_top_rpn_proposals( proposals, pred_objectness_logits, images, nms_thresh, pre_nms_topk, post_nms_topk, min_box_side_len, training, ): """ For each feature map, select the `pre_nms_topk` highest scoring proposals, apply NMS, clip proposals, and remove small boxes. Return the `post_nms_topk` highest scoring proposals among all the feature maps if `training` is True, otherwise, returns the highest `post_nms_topk` scoring proposals for each feature map. Args: proposals (list[Tensor]): A list of L tensors. Tensor i has shape (N, Hi*Wi*A, 4). All proposal predictions on the feature maps. pred_objectness_logits (list[Tensor]): A list of L tensors. Tensor i has shape (N, Hi*Wi*A). images (ImageList): Input images as an :class:`ImageList`. nms_thresh (float): IoU threshold to use for NMS pre_nms_topk (int): number of top k scoring proposals to keep before applying NMS. When RPN is run on multiple feature maps (as in FPN) this number is per feature map. post_nms_topk (int): number of top k scoring proposals to keep after applying NMS. When RPN is run on multiple feature maps (as in FPN) this number is total, over all feature maps. min_box_side_len (float): minimum proposal box side length in pixels (absolute units wrt input images). training (bool): True if proposals are to be used in training, otherwise False. This arg exists only to support a legacy bug; look for the "NB: Legacy bug ..." comment. Returns: proposals (list[Instances]): list of N Instances. The i-th Instances stores post_nms_topk object proposals for image i. """ image_sizes = images.image_sizes # in (h, w) order num_images = len(image_sizes) device = proposals[0].device # 1. Select top-k anchor for every level and every image topk_scores = [] # #lvl Tensor, each of shape N x topk topk_proposals = [] level_ids = [] # #lvl Tensor, each of shape (topk,) batch_idx = torch.arange(num_images, device=device) for level_id, proposals_i, logits_i in zip( itertools.count(), proposals, pred_objectness_logits ): Hi_Wi_A = logits_i.shape[1] num_proposals_i = min(pre_nms_topk, Hi_Wi_A) # sort is faster than topk (https://github.com/pytorch/pytorch/issues/22812) # topk_scores_i, topk_idx = logits_i.topk(num_proposals_i, dim=1) logits_i, idx = logits_i.sort(descending=True, dim=1) topk_scores_i = logits_i[batch_idx, :num_proposals_i] topk_idx = idx[batch_idx, :num_proposals_i] # each is N x topk topk_proposals_i = proposals_i[batch_idx[:, None], topk_idx] # N x topk x 4 topk_proposals.append(topk_proposals_i) topk_scores.append(topk_scores_i) level_ids.append(torch.full((num_proposals_i,), level_id, dtype=torch.int64, device=device)) # 2. Concat all levels together topk_scores = cat(topk_scores, dim=1) topk_proposals = cat(topk_proposals, dim=1) level_ids = cat(level_ids, dim=0) # 3. For each image, run a per-level NMS, and choose topk results. results = [] for n, image_size in enumerate(image_sizes): boxes = Boxes(topk_proposals[n]) scores_per_img = topk_scores[n] boxes.clip(image_size) # filter empty boxes keep = boxes.nonempty(threshold=min_box_side_len) lvl = level_ids if keep.sum().item() != len(boxes): boxes, scores_per_img, lvl = boxes[keep], scores_per_img[keep], level_ids[keep] keep = batched_nms(boxes.tensor, scores_per_img, lvl, nms_thresh) # In Detectron1, there was different behavior during training vs. testing. # (https://github.com/facebookresearch/Detectron/issues/459) # During training, topk is over the proposals from *all* images in the training batch. # During testing, it is over the proposals for each image separately. # As a result, the training behavior becomes batch-dependent, # and the configuration "POST_NMS_TOPK_TRAIN" end up relying on the batch size. # This bug is addressed in Detectron2 to make the behavior independent of batch size. keep = keep[:post_nms_topk] res = Instances(image_size) res.proposal_boxes = boxes[keep] res.objectness_logits = scores_per_img[keep] results.append(res) return results def rpn_losses( gt_objectness_logits, gt_anchor_deltas, pred_objectness_logits, pred_anchor_deltas, smooth_l1_beta, ): """ Args: gt_objectness_logits (Tensor): shape (N,), each element in {-1, 0, 1} representing ground-truth objectness labels with: -1 = ignore; 0 = not object; 1 = object. gt_anchor_deltas (Tensor): shape (N, box_dim), row i represents ground-truth box2box transform targets (dx, dy, dw, dh) or (dx, dy, dw, dh, da) that map anchor i to its matched ground-truth box. pred_objectness_logits (Tensor): shape (N,), each element is a predicted objectness logit. pred_anchor_deltas (Tensor): shape (N, box_dim), each row is a predicted box2box transform (dx, dy, dw, dh) or (dx, dy, dw, dh, da) smooth_l1_beta (float): The transition point between L1 and L2 loss in the smooth L1 loss function. When set to 0, the loss becomes L1. When set to +inf, the loss becomes constant 0. Returns: objectness_loss, localization_loss, both unnormalized (summed over samples). """ pos_masks = gt_objectness_logits == 1 localization_loss = smooth_l1_loss( pred_anchor_deltas[pos_masks], gt_anchor_deltas[pos_masks], smooth_l1_beta, reduction="sum" ) valid_masks = gt_objectness_logits >= 0 objectness_loss = F.binary_cross_entropy_with_logits( pred_objectness_logits[valid_masks], gt_objectness_logits[valid_masks].to(torch.float32), reduction="sum", ) return objectness_loss, localization_loss class RPNOutputs(object): def __init__( self, box2box_transform, anchor_matcher, batch_size_per_image, positive_fraction, images, pred_objectness_logits, pred_anchor_deltas, anchors, boundary_threshold=0, gt_boxes=None, smooth_l1_beta=0.0, ): """ Args: box2box_transform (Box2BoxTransform): :class:`Box2BoxTransform` instance for anchor-proposal transformations. anchor_matcher (Matcher): :class:`Matcher` instance for matching anchors to ground-truth boxes; used to determine training labels. batch_size_per_image (int): number of proposals to sample when training positive_fraction (float): target fraction of sampled proposals that should be positive images (ImageList): :class:`ImageList` instance representing N input images pred_objectness_logits (list[Tensor]): A list of L elements. Element i is a tensor of shape (N, A, Hi, Wi) representing the predicted objectness logits for anchors. pred_anchor_deltas (list[Tensor]): A list of L elements. Element i is a tensor of shape (N, A*4, Hi, Wi) representing the predicted "deltas" used to transform anchors to proposals. anchors (list[list[Boxes]]): A list of N elements. Each element is a list of L Boxes. The Boxes at (n, l) stores the entire anchor array for feature map l in image n (i.e. the cell anchors repeated over all locations in feature map (n, l)). boundary_threshold (int): if >= 0, then anchors that extend beyond the image boundary by more than boundary_thresh are not used in training. Set to a very large number or < 0 to disable this behavior. Only needed in training. gt_boxes (list[Boxes], optional): A list of N elements. Element i a Boxes storing the ground-truth ("gt") boxes for image i. smooth_l1_beta (float): The transition point between L1 and L2 loss in the smooth L1 loss function. When set to 0, the loss becomes L1. When set to +inf, the loss becomes constant 0. """ self.box2box_transform = box2box_transform self.anchor_matcher = anchor_matcher self.batch_size_per_image = batch_size_per_image self.positive_fraction = positive_fraction self.pred_objectness_logits = pred_objectness_logits self.pred_anchor_deltas = pred_anchor_deltas self.anchors = anchors self.gt_boxes = gt_boxes self.num_feature_maps = len(pred_objectness_logits) self.num_images = len(images) self.image_sizes = images.image_sizes self.boundary_threshold = boundary_threshold self.smooth_l1_beta = smooth_l1_beta def _get_ground_truth(self): """ Returns: gt_objectness_logits: list of N tensors. Tensor i is a vector whose length is the total number of anchors in image i (i.e., len(anchors[i])). Label values are in {-1, 0, 1}, with meanings: -1 = ignore; 0 = negative class; 1 = positive class. gt_anchor_deltas: list of N tensors. Tensor i has shape (len(anchors[i]), 4). """ gt_objectness_logits = [] gt_anchor_deltas = [] # Concatenate anchors from all feature maps into a single Boxes per image anchors = [Boxes.cat(anchors_i) for anchors_i in self.anchors] for image_size_i, anchors_i, gt_boxes_i in zip(self.image_sizes, anchors, self.gt_boxes): """ image_size_i: (h, w) for the i-th image anchors_i: anchors for i-th image gt_boxes_i: ground-truth boxes for i-th image """ match_quality_matrix = pairwise_iou(gt_boxes_i, anchors_i) matched_idxs, gt_objectness_logits_i = self.anchor_matcher(match_quality_matrix) if self.boundary_threshold >= 0: # Discard anchors that go out of the boundaries of the image # NOTE: This is legacy functionality that is turned off by default in Detectron2 anchors_inside_image = anchors_i.inside_box(image_size_i, self.boundary_threshold) gt_objectness_logits_i[~anchors_inside_image] = -1 if len(gt_boxes_i) == 0: # These values won't be used anyway since the anchor is labeled as background gt_anchor_deltas_i = torch.zeros_like(anchors_i.tensor) else: # TODO wasted computation for ignored boxes matched_gt_boxes = gt_boxes_i[matched_idxs] gt_anchor_deltas_i = self.box2box_transform.get_deltas( anchors_i.tensor, matched_gt_boxes.tensor ) gt_objectness_logits.append(gt_objectness_logits_i) gt_anchor_deltas.append(gt_anchor_deltas_i) return gt_objectness_logits, gt_anchor_deltas def losses(self): """ Return the losses from a set of RPN predictions and their associated ground-truth. Returns: dict[loss name -> loss value]: A dict mapping from loss name to loss value. Loss names are: `loss_rpn_cls` for objectness classification and `loss_rpn_loc` for proposal localization. """ def resample(label): """ Randomly sample a subset of positive and negative examples by overwriting the label vector to the ignore value (-1) for all elements that are not included in the sample. """ pos_idx, neg_idx = subsample_labels( label, self.batch_size_per_image, self.positive_fraction, 0 ) # Fill with the ignore label (-1), then set positive and negative labels label.fill_(-1) label.scatter_(0, pos_idx, 1) label.scatter_(0, neg_idx, 0) return label gt_objectness_logits, gt_anchor_deltas = self._get_ground_truth() """ gt_objectness_logits: list of N tensors. Tensor i is a vector whose length is the total number of anchors in image i (i.e., len(anchors[i])) gt_anchor_deltas: list of N tensors. Tensor i has shape (len(anchors[i]), B), where B is the box dimension """ # Collect all objectness labels and delta targets over feature maps and images # The final ordering is L, N, H, W, A from slowest to fastest axis. num_anchors_per_map = [np.prod(x.shape[1:]) for x in self.pred_objectness_logits] num_anchors_per_image = sum(num_anchors_per_map) # Stack to: (N, num_anchors_per_image) gt_objectness_logits = torch.stack( [resample(label) for label in gt_objectness_logits], dim=0 ) # Log the number of positive/negative anchors per-image that's used in training num_pos_anchors = (gt_objectness_logits == 1).sum().item() num_neg_anchors = (gt_objectness_logits == 0).sum().item() storage = get_event_storage() storage.put_scalar("rpn/num_pos_anchors", num_pos_anchors / self.num_images) storage.put_scalar("rpn/num_neg_anchors", num_neg_anchors / self.num_images) assert gt_objectness_logits.shape[1] == num_anchors_per_image # Split to tuple of L tensors, each with shape (N, num_anchors_per_map) gt_objectness_logits = torch.split(gt_objectness_logits, num_anchors_per_map, dim=1) # Concat from all feature maps gt_objectness_logits = cat([x.flatten() for x in gt_objectness_logits], dim=0) # Stack to: (N, num_anchors_per_image, B) gt_anchor_deltas = torch.stack(gt_anchor_deltas, dim=0) assert gt_anchor_deltas.shape[1] == num_anchors_per_image B = gt_anchor_deltas.shape[2] # box dimension (4 or 5) # Split to tuple of L tensors, each with shape (N, num_anchors_per_image) gt_anchor_deltas = torch.split(gt_anchor_deltas, num_anchors_per_map, dim=1) # Concat from all feature maps gt_anchor_deltas = cat([x.reshape(-1, B) for x in gt_anchor_deltas], dim=0) # Collect all objectness logits and delta predictions over feature maps # and images to arrive at the same shape as the labels and targets # The final ordering is L, N, H, W, A from slowest to fastest axis. pred_objectness_logits = cat( [ # Reshape: (N, A, Hi, Wi) -> (N, Hi, Wi, A) -> (N*Hi*Wi*A, ) x.permute(0, 2, 3, 1).flatten() for x in self.pred_objectness_logits ], dim=0, ) pred_anchor_deltas = cat( [ # Reshape: (N, A*B, Hi, Wi) -> (N, A, B, Hi, Wi) -> (N, Hi, Wi, A, B) # -> (N*Hi*Wi*A, B) x.view(x.shape[0], -1, B, x.shape[-2], x.shape[-1]) .permute(0, 3, 4, 1, 2) .reshape(-1, B) for x in self.pred_anchor_deltas ], dim=0, ) objectness_loss, localization_loss = rpn_losses( gt_objectness_logits, gt_anchor_deltas, pred_objectness_logits, pred_anchor_deltas, self.smooth_l1_beta, ) normalizer = 1.0 / (self.batch_size_per_image * self.num_images) loss_cls = objectness_loss * normalizer # cls: classification loss loss_loc = localization_loss * normalizer # loc: localization loss losses = {"loss_rpn_cls": loss_cls, "loss_rpn_loc": loss_loc} return losses def predict_proposals(self): """ Transform anchors into proposals by applying the predicted anchor deltas. anchors (list[list[Boxes]]): A list of N elements. Each element is a list of L Boxes. The Boxes at (n, l) stores the entire anchor array for feature map l in image n (i.e. the cell anchors repeated over all locations in feature map (n, l)). Returns: proposals (list[Tensor]): A list of L tensors. Tensor i has shape (N, Hi*Wi*A, B), where B is box dimension (4 or 5). """ proposals = [] # Transpose anchors from images-by-feature-maps (N, L) to feature-maps-by-images (L, N) anchors = list(zip(*self.anchors)) # For each feature map for anchors_i, pred_anchor_deltas_i in zip(anchors, self.pred_anchor_deltas): B = anchors_i[0].tensor.size(1) N, _, Hi, Wi = pred_anchor_deltas_i.shape # Reshape: (N, A*B, Hi, Wi) -> (N, A, B, Hi, Wi) -> (N, Hi, Wi, A, B) -> (N*Hi*Wi*A, B) pred_anchor_deltas_i = ( pred_anchor_deltas_i.view(N, -1, B, Hi, Wi).permute(0, 3, 4, 1, 2).reshape(-1, B) ) # Concatenate all anchors to shape (N*Hi*Wi*A, B) # type(anchors_i[0]) is Boxes (B = 4) or RotatedBoxes (B = 5) anchors_i = type(anchors_i[0]).cat(anchors_i) proposals_i = self.box2box_transform.apply_deltas( pred_anchor_deltas_i, anchors_i.tensor ) # Append feature map proposals with shape (N, Hi*Wi*A, B) proposals.append(proposals_i.view(N, -1, B)) return proposals def predict_objectness_logits(self): """ Return objectness logits in the same format as the proposals returned by :meth:`predict_proposals`. Returns: pred_objectness_logits (list[Tensor]): A list of L tensors. Tensor i has shape (N, Hi*Wi*A). """ pred_objectness_logits = [ # Reshape: (N, A, Hi, Wi) -> (N, Hi, Wi, A) -> (N, Hi*Wi*A) score.permute(0, 2, 3, 1).reshape(self.num_images, -1) for score in self.pred_objectness_logits ] return pred_objectness_logits ================================================ FILE: detectron2/modeling/proposal_generator/rrpn.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging from typing import Dict import torch from detectron2.layers import ShapeSpec from ..box_regression import Box2BoxTransformRotated from .build import PROPOSAL_GENERATOR_REGISTRY from .rpn import RPN from .rrpn_outputs import RRPNOutputs, find_top_rrpn_proposals logger = logging.getLogger(__name__) @PROPOSAL_GENERATOR_REGISTRY.register() class RRPN(RPN): """ Rotated RPN subnetwork. Please refer to https://arxiv.org/pdf/1703.01086.pdf for the original RRPN paper: Ma, J., Shao, W., Ye, H., Wang, L., Wang, H., Zheng, Y., & Xue, X. (2018). Arbitrary-oriented scene text detection via rotation proposals. IEEE Transactions on Multimedia, 20(11), 3111-3122. """ def __init__(self, cfg, input_shape: Dict[str, ShapeSpec]): super().__init__(cfg, input_shape) self.box2box_transform = Box2BoxTransformRotated(weights=cfg.MODEL.RPN.BBOX_REG_WEIGHTS) def forward(self, images, features, gt_instances=None): """ Args: images (ImageList): input images of length `N` features (dict[str: Tensor]): input data as a mapping from feature map name to tensor. Axis 0 represents the number of images `N` in the input data; axes 1-3 are channels, height, and width, which may vary between feature maps (e.g., if a feature pyramid is used). gt_instances (list[Instances], optional): a length `N` list of `Instances`s. Each `Instances` stores ground-truth instances for the corresponding image. Returns: proposals: list[Instances] or None loss: dict[Tensor] """ gt_boxes = [x.gt_boxes for x in gt_instances] if gt_instances is not None else None del gt_instances features = [features[f] for f in self.in_features] pred_objectness_logits, pred_anchor_deltas = self.rpn_head(features) anchors = self.anchor_generator(features) outputs = RRPNOutputs( self.box2box_transform, self.anchor_matcher, self.batch_size_per_image, self.positive_fraction, images, pred_objectness_logits, pred_anchor_deltas, anchors, self.boundary_threshold, gt_boxes, self.smooth_l1_beta, ) if self.training: losses = outputs.losses() else: losses = {} with torch.no_grad(): # Find the top proposals by applying NMS and removing boxes that # are too small. The proposals are treated as fixed for approximate # joint training with roi heads. This approach ignores the derivative # w.r.t. the proposal boxes’ coordinates that are also network # responses, so is approximate. proposals = find_top_rrpn_proposals( outputs.predict_proposals(), outputs.predict_objectness_logits(), images, self.nms_thresh, self.pre_nms_topk[self.training], self.post_nms_topk[self.training], self.min_box_side_len, self.training, ) return proposals, losses ================================================ FILE: detectron2/modeling/proposal_generator/rrpn_outputs.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import itertools import logging import torch from detectron2.layers import batched_nms_rotated, cat from detectron2.structures import Instances, RotatedBoxes, pairwise_iou_rotated from .rpn_outputs import RPNOutputs logger = logging.getLogger(__name__) """ Shape shorthand in this module: N: number of images in the minibatch L: number of feature maps per image on which RRPN is run A: number of cell anchors (must be the same for all feature maps) Hi, Wi: height and width of the i-th feature map 5: size of the box parameterization Naming convention: objectness: refers to the binary classification of an anchor as object vs. not object. deltas: refers to the 5-d (dx, dy, dw, dh, da) deltas that parameterize the rotated box2box transform (see :class:`box_regression.Box2BoxTransformRotated`). pred_objectness_logits: predicted objectness scores in [-inf, +inf]; use sigmoid(pred_objectness_logits) to estimate P(object). gt_objectness_logits: ground-truth binary classification labels for objectness pred_anchor_deltas: predicted rotated box2box transform deltas gt_anchor_deltas: ground-truth rotated box2box transform deltas """ def find_top_rrpn_proposals( proposals, pred_objectness_logits, images, nms_thresh, pre_nms_topk, post_nms_topk, min_box_side_len, training, ): """ For each feature map, select the `pre_nms_topk` highest scoring proposals, apply NMS, clip proposals, and remove small boxes. Return the `post_nms_topk` highest scoring proposals among all the feature maps if `training` is True, otherwise, returns the highest `post_nms_topk` scoring proposals for each feature map. Args: proposals (list[Tensor]): A list of L tensors. Tensor i has shape (N, Hi*Wi*A, 5). All proposal predictions on the feature maps. pred_objectness_logits (list[Tensor]): A list of L tensors. Tensor i has shape (N, Hi*Wi*A). images (ImageList): Input images as an :class:`ImageList`. nms_thresh (float): IoU threshold to use for NMS pre_nms_topk (int): number of top k scoring proposals to keep before applying NMS. When RRPN is run on multiple feature maps (as in FPN) this number is per feature map. post_nms_topk (int): number of top k scoring proposals to keep after applying NMS. When RRPN is run on multiple feature maps (as in FPN) this number is total, over all feature maps. min_box_side_len (float): minimum proposal box side length in pixels (absolute units wrt input images). training (bool): True if proposals are to be used in training, otherwise False. This arg exists only to support a legacy bug; look for the "NB: Legacy bug ..." comment. Returns: proposals (list[Instances]): list of N Instances. The i-th Instances stores post_nms_topk object proposals for image i. """ image_sizes = images.image_sizes # in (h, w) order num_images = len(image_sizes) device = proposals[0].device # 1. Select top-k anchor for every level and every image topk_scores = [] # #lvl Tensor, each of shape N x topk topk_proposals = [] level_ids = [] # #lvl Tensor, each of shape (topk,) batch_idx = torch.arange(num_images, device=device) for level_id, proposals_i, logits_i in zip( itertools.count(), proposals, pred_objectness_logits ): Hi_Wi_A = logits_i.shape[1] num_proposals_i = min(pre_nms_topk, Hi_Wi_A) # sort is faster than topk (https://github.com/pytorch/pytorch/issues/22812) # topk_scores_i, topk_idx = logits_i.topk(num_proposals_i, dim=1) logits_i, idx = logits_i.sort(descending=True, dim=1) topk_scores_i = logits_i[batch_idx, :num_proposals_i] topk_idx = idx[batch_idx, :num_proposals_i] # each is N x topk topk_proposals_i = proposals_i[batch_idx[:, None], topk_idx] # N x topk x 5 topk_proposals.append(topk_proposals_i) topk_scores.append(topk_scores_i) level_ids.append(torch.full((num_proposals_i,), level_id, dtype=torch.int64, device=device)) # 2. Concat all levels together topk_scores = cat(topk_scores, dim=1) topk_proposals = cat(topk_proposals, dim=1) level_ids = cat(level_ids, dim=0) # 3. For each image, run a per-level NMS, and choose topk results. results = [] for n, image_size in enumerate(image_sizes): boxes = RotatedBoxes(topk_proposals[n]) scores_per_img = topk_scores[n] boxes.clip(image_size) # filter empty boxes keep = boxes.nonempty(threshold=min_box_side_len) lvl = level_ids if keep.sum().item() != len(boxes): boxes, scores_per_img, lvl = (boxes[keep], scores_per_img[keep], level_ids[keep]) keep = batched_nms_rotated(boxes.tensor, scores_per_img, lvl, nms_thresh) # In Detectron1, there was different behavior during training vs. testing. # (https://github.com/facebookresearch/Detectron/issues/459) # During training, topk is over the proposals from *all* images in the training batch. # During testing, it is over the proposals for each image separately. # As a result, the training behavior becomes batch-dependent, # and the configuration "POST_NMS_TOPK_TRAIN" end up relying on the batch size. # This bug is addressed in Detectron2 to make the behavior independent of batch size. keep = keep[:post_nms_topk] res = Instances(image_size) res.proposal_boxes = boxes[keep] res.objectness_logits = scores_per_img[keep] results.append(res) return results class RRPNOutputs(RPNOutputs): def __init__( self, box2box_transform, anchor_matcher, batch_size_per_image, positive_fraction, images, pred_objectness_logits, pred_anchor_deltas, anchors, boundary_threshold=0, gt_boxes=None, smooth_l1_beta=0.0, ): """ Args: box2box_transform (Box2BoxTransformRotated): :class:`Box2BoxTransformRotated` instance for anchor-proposal transformations. anchor_matcher (Matcher): :class:`Matcher` instance for matching anchors to ground-truth boxes; used to determine training labels. batch_size_per_image (int): number of proposals to sample when training positive_fraction (float): target fraction of sampled proposals that should be positive images (ImageList): :class:`ImageList` instance representing N input images pred_objectness_logits (list[Tensor]): A list of L elements. Element i is a tensor of shape (N, A, Hi, Wi) representing the predicted objectness logits for anchors. pred_anchor_deltas (list[Tensor]): A list of L elements. Element i is a tensor of shape (N, A*5, Hi, Wi) representing the predicted "deltas" used to transform anchors to proposals. anchors (list[list[RotatedBoxes]]): A list of N elements. Each element is a list of L RotatedBoxes. The RotatedBoxes at (n, l) stores the entire anchor array for feature map l in image n (i.e. the cell anchors repeated over all locations in feature map (n, l)). boundary_threshold (int): if >= 0, then anchors that extend beyond the image boundary by more than boundary_thresh are not used in training. Set to a very large number or < 0 to disable this behavior. Only needed in training. gt_boxes (list[RotatedBoxes], optional): A list of N elements. Element i a RotatedBoxes storing the ground-truth ("gt") rotated boxes for image i. smooth_l1_beta (float): The transition point between L1 and L2 loss in the smooth L1 loss function. When set to 0, the loss becomes L1. When set to +inf, the loss becomes constant 0. """ super(RRPNOutputs, self).__init__( box2box_transform, anchor_matcher, batch_size_per_image, positive_fraction, images, pred_objectness_logits, pred_anchor_deltas, anchors, boundary_threshold, gt_boxes, smooth_l1_beta, ) def _get_ground_truth(self): """ Returns: gt_objectness_logits: list of N tensors. Tensor i is a vector whose length is the total number of anchors in image i (i.e., len(anchors[i])). Label values are in {-1, 0, 1}, with meanings: -1 = ignore; 0 = negative class; 1 = positive class. gt_anchor_deltas: list of N tensors. Tensor i has shape (len(anchors[i]), 5). """ gt_objectness_logits = [] gt_anchor_deltas = [] # Concatenate anchors from all feature maps into a single RotatedBoxes per image anchors = [RotatedBoxes.cat(anchors_i) for anchors_i in self.anchors] for image_size_i, anchors_i, gt_boxes_i in zip(self.image_sizes, anchors, self.gt_boxes): """ image_size_i: (h, w) for the i-th image anchors_i: anchors for i-th image gt_boxes_i: ground-truth boxes for i-th image """ match_quality_matrix = pairwise_iou_rotated(gt_boxes_i, anchors_i) matched_idxs, gt_objectness_logits_i = self.anchor_matcher(match_quality_matrix) if self.boundary_threshold >= 0: # Discard anchors that go out of the boundaries of the image # NOTE: This is legacy functionality that is turned off by default in Detectron2 anchors_inside_image = anchors_i.inside_box(image_size_i, self.boundary_threshold) gt_objectness_logits_i[~anchors_inside_image] = -1 if len(gt_boxes_i) == 0: # These values won't be used anyway since the anchor is labeled as background gt_anchor_deltas_i = torch.zeros_like(anchors_i.tensor) else: # TODO wasted computation for ignored boxes matched_gt_boxes = gt_boxes_i[matched_idxs] gt_anchor_deltas_i = self.box2box_transform.get_deltas( anchors_i.tensor, matched_gt_boxes.tensor ) gt_objectness_logits.append(gt_objectness_logits_i) gt_anchor_deltas.append(gt_anchor_deltas_i) return gt_objectness_logits, gt_anchor_deltas ================================================ FILE: detectron2/modeling/roi_heads/LISA_rcnn.py ================================================ # Copyright (c) Tianyu Wang. All Rights Reserved. import torch from torch import nn from torch.autograd.function import Function from detectron2.layers import ShapeSpec from detectron2.structures import Boxes, Instances, RotatedBoxes, pairwise_iou, pairwise_iou_rotated from detectron2.utils.events import get_event_storage from detectron2.utils.registry import Registry from detectron2.modeling.matcher import Matcher from detectron2.modeling.poolers import ROIPooler from detectron2.modeling import ROI_HEADS_REGISTRY, StandardROIHeads from detectron2.modeling.roi_heads.roi_heads import Res5ROIHeads from detectron2.modeling.roi_heads.box_head import build_box_head from detectron2.modeling.box_regression import Box2BoxTransform from detectron2.modeling.roi_heads.fast_rcnn import FastRCNNOutputLayers, FastRCNNOutputs, fast_rcnn_inference,LightdirectionOutputLayer from detectron2.modeling.proposal_generator.proposal_utils import add_ground_truth_to_proposals from detectron2.modeling.sampling import subsample_labels import numpy as np # class @ROI_HEADS_REGISTRY.register() class RelationROIHeads(StandardROIHeads): pass """ This class is used by Relation RPN. """ # def __init__(self, cfg, input_shape: Dict[str, ShapeSpec]): # super(RelationROIHeads, self).__init__(cfg,input_shape) # pass def _init_box_head(self,cfg): pooler_resolution = cfg.MODEL.ROI_BOX_HEAD.POOLER_RESOLUTION pooler_scales = tuple(1.0 / self.feature_strides[k] for k in self.in_features) sampling_ratio = cfg.MODEL.ROI_BOX_HEAD.POOLER_SAMPLING_RATIO pooler_type = cfg.MODEL.ROI_BOX_HEAD.POOLER_TYPE in_channels = [self.feature_channels[f] for f in self.in_features] # Check all channel counts are equal assert len(set(in_channels)) == 1, in_channels in_channels = in_channels[0] self.box_pooler = ROIPooler( output_size=pooler_resolution, scales=pooler_scales, sampling_ratio=sampling_ratio, pooler_type=pooler_type, ) pooled_shape = ShapeSpec( channels=in_channels, width=pooler_resolution, height=pooler_resolution ) self.relation_box_head = build_box_head(cfg,pooled_shape) self.relation_box_predictor = FastRCNNOutputLayers( self.relation_box_head.output_size, self.num_classes -1 , cls_agnostic_bbox_reg = False ) self.box_head = build_box_head(cfg,pooled_shape) self.box_predictor = FastRCNNOutputLayers( self.box_head.output_size, self.num_classes, cls_agnostic_bbox_reg = False ) self.light_direction_head = build_box_head(cfg,pooled_shape) self.light_direction_predictor = LightdirectionOutputLayer( self.light_direction_head.output_size) def forward(self,images, features, relation_proposals, proposals, relation_targets=None, targets=None): del images if self.training: relation_proposals = self.label_and_sample_proposals(relation_proposals, relation_targets, True) proposals = self.label_and_sample_proposals(proposals,targets) del targets del relation_targets features_list = [features[f] for f in self.in_features] if self.training: losses = self._forward_relation_box(features_list,relation_proposals) losses.update(self._forward_box(features_list, proposals)) # During training the proposals used by the box head are # used by the mask, keypoint (and densepose) heads. losses.update(self._forward_mask(features_list, proposals)) losses.update(self._forward_keypoint(features_list, relation_proposals)) return proposals, losses else: pred_instances = self._forward_box(features_list, proposals) pred_instances = self.forward_with_given_boxes(features, pred_instances) pred_relations = self._forward_relation_box(features_list,proposals) # During inference cascaded prediction is used: the mask and keypoints heads are only # applied to the top scoring box detections. # pred_relations = self.forward_with_given_relation_boxes(features,pred_relations) return pred_instances, pred_relations ,{} # def forward_with_given_relation_boxes(self,feature, instances): # assert not self.training # assert instances[0].has("pred_boxes") and instances[0].has("pred_classes") # features = [feature[f] for f in self.in_features] # # instances = self._forward_mask(features, instances) # instances = self._forward_keypoint(features, instances) # return instances def _forward_relation_box(self, features, relation_proposals): box_features = self.box_pooler(features, [x.proposal_boxes for x in relation_proposals]) # light_features = self.box_pooler(s) light_features = self.light_direction_head(box_features) box_features = self.relation_box_head(box_features) pred_light_direction = self.light_direction_predictor(light_features) pred_class_logits, pred_proposal_deltas = self.relation_box_predictor(box_features) del box_features, light_features outputs = FastRCNNOutputs( self.box2box_transform, pred_class_logits, pred_proposal_deltas, relation_proposals, self.smooth_l1_beta, pred_light_direction ) if self.training: return {k+'_rela': v for k, v in outputs.losses().items()} else: pred_instances, _ = outputs.inference( self.test_score_thresh, self.test_nms_thresh, self.test_detections_per_img ) # print(pred_instances) return pred_instances @torch.no_grad() def label_and_sample_proposals(self, proposals, targets, isrelation = False): """ Prepare some proposals to be used to train the ROI heads. It performs box matching between `proposals` and `targets`, and assigns training labels to the proposals. It returns `self.batch_size_per_image` random samples from proposals and groundtruth boxes, with a fraction of positives that is no larger than `self.positive_sample_fraction. Args: See :meth:`ROIHeads.forward` Returns: list[Instances]: length `N` list of `Instances`s containing the proposals sampled for training. Each `Instances` has the following fields: - proposal_boxes: the proposal boxes - gt_boxes: the ground-truth box that the proposal is assigned to (this is only meaningful if the proposal has a label > 0; if label = 0 then the ground-truth box is random) Other fields such as "gt_classes", "gt_masks", that's included in `targets`. """ gt_boxes = [x.gt_boxes for x in targets] if targets[0].has('gt_light'): gt_light = [x.gt_light for x in targets] # Augment proposals with ground-truth boxes. # In the case of learned proposals (e.g., RPN), when training starts # the proposals will be low quality due to random initialization. # It's possible that none of these initial # proposals have high enough overlap with the gt objects to be used # as positive examples for the second stage components (box head, # cls head, mask head). Adding the gt boxes to the set of proposals # ensures that the second stage components will have some positive # examples from the start of training. For RPN, this augmentation improves # convergence and empirically improves box AP on COCO by about 0.5 # points (under one tested configuration). if self.proposal_append_gt: proposals = add_ground_truth_to_proposals(gt_boxes, proposals,gt_light) else: gt_light = None if self.proposal_append_gt: proposals = add_ground_truth_to_proposals(gt_boxes,proposals) proposals_with_gt = [] num_fg_samples = [] num_bg_samples = [] for proposals_per_image, targets_per_image in zip(proposals, targets): has_gt = len(targets_per_image) > 0 match_quality_matrix = pairwise_iou( targets_per_image.gt_boxes, proposals_per_image.proposal_boxes ) matched_idxs, proposals_labels = self.proposal_matcher(match_quality_matrix) if isrelation: num_classes = self.num_classes - 1 else: num_classes = self.num_classes # Get the corresponding GT for each proposal if has_gt: gt_classes = targets_per_image.gt_classes[matched_idxs] # print(gt_classes) # Label unmatched proposals (0 label from matcher) as background (label=num_classes) gt_classes[proposals_labels == 0] = num_classes # Label ignore proposals (-1 label) gt_classes[proposals_labels == -1] = -1 else: gt_classes = torch.zeros_like(matched_idxs) + num_classes sampled_fg_inds, sampled_bg_inds = subsample_labels( gt_classes, self.batch_size_per_image, self.positive_sample_fraction, num_classes, ) sampled_inds = torch.cat([sampled_fg_inds, sampled_bg_inds], dim=0) proposals_per_image = proposals_per_image[sampled_inds] proposals_per_image.gt_classes = gt_classes[sampled_inds] # We index all the attributes of targets that start with "gt_" # and have not been added to proposals yet (="gt_classes"). if has_gt: sampled_targets = matched_idxs[sampled_inds] # NOTE: here the indexing waste some compute, because heads # like masks, keypoints, etc, will filter the proposals again, # (by foreground/background, or number of keypoints in the image, etc) # so we essentially index the data twice. for (trg_name, trg_value) in targets_per_image.get_fields().items(): if trg_name.startswith("gt_") and not proposals_per_image.has(trg_name): proposals_per_image.set(trg_name, trg_value[sampled_targets]) else: gt_boxes = Boxes( targets_per_image.gt_boxes.tensor.new_zeros((len(sampled_inds), 4)) ) proposals_per_image.gt_boxes = gt_boxes if gt_light != None: gt_light = Boxes( targets_per_image.gt_light.tensor.new_zeros((len(sampled_inds), 4)) ) proposal_per_image.gt_light = gt_light num_fg_samples.append(sampled_fg_inds.numel()) num_bg_samples.append(sampled_bg_inds.numel()) proposals_with_gt.append(proposals_per_image) # Log the number of fg/bg samples that are selected for training ROI heads storage = get_event_storage() storage.put_scalar("roi_head/num_fg_samples", np.mean(num_fg_samples)) storage.put_scalar("roi_head/num_bg_samples", np.mean(num_bg_samples)) return proposals_with_gt ================================================ FILE: detectron2/modeling/roi_heads/__init__.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .box_head import ROI_BOX_HEAD_REGISTRY, build_box_head from .keypoint_head import ROI_KEYPOINT_HEAD_REGISTRY, build_keypoint_head from .mask_head import ROI_MASK_HEAD_REGISTRY, build_mask_head from .roi_heads import ROI_HEADS_REGISTRY, ROIHeads, StandardROIHeads, build_roi_heads from . import cascade_rcnn # isort:skip ================================================ FILE: detectron2/modeling/roi_heads/box_head.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import numpy as np import fvcore.nn.weight_init as weight_init import torch from torch import nn from torch.nn import functional as F from detectron2.layers import Conv2d, ShapeSpec, get_norm from detectron2.utils.registry import Registry ROI_BOX_HEAD_REGISTRY = Registry("ROI_BOX_HEAD") ROI_BOX_HEAD_REGISTRY.__doc__ = """ Registry for box heads, which make box predictions from per-region features. The registered object will be called with `obj(cfg, input_shape)`. """ @ROI_BOX_HEAD_REGISTRY.register() class FastRCNNConvFCHead(nn.Module): """ A head with several 3x3 conv layers (each followed by norm & relu) and several fc layers (each followed by relu). """ def __init__(self, cfg, input_shape: ShapeSpec): """ The following attributes are parsed from config: num_conv, num_fc: the number of conv/fc layers conv_dim/fc_dim: the dimension of the conv/fc layers norm: normalization for the conv layers """ super().__init__() # fmt: off num_conv = cfg.MODEL.ROI_BOX_HEAD.NUM_CONV conv_dim = cfg.MODEL.ROI_BOX_HEAD.CONV_DIM num_fc = cfg.MODEL.ROI_BOX_HEAD.NUM_FC fc_dim = cfg.MODEL.ROI_BOX_HEAD.FC_DIM norm = cfg.MODEL.ROI_BOX_HEAD.NORM # fmt: on assert num_conv + num_fc > 0 self._output_size = (input_shape.channels, input_shape.height, input_shape.width) self.conv_norm_relus = [] for k in range(num_conv): conv = Conv2d( self._output_size[0], conv_dim, kernel_size=3, padding=1, bias=not norm, norm=get_norm(norm, conv_dim), activation=F.relu, ) self.add_module("conv{}".format(k + 1), conv) self.conv_norm_relus.append(conv) self._output_size = (conv_dim, self._output_size[1], self._output_size[2]) self.fcs = [] for k in range(num_fc): fc = nn.Linear(np.prod(self._output_size), fc_dim) self.add_module("fc{}".format(k + 1), fc) self.fcs.append(fc) self._output_size = fc_dim for layer in self.conv_norm_relus: weight_init.c2_msra_fill(layer) for layer in self.fcs: weight_init.c2_xavier_fill(layer) def forward(self, x): for layer in self.conv_norm_relus: x = layer(x) if len(self.fcs): if x.dim() > 2: x = torch.flatten(x, start_dim=1) for layer in self.fcs: x = F.relu(layer(x)) return x @property def output_size(self): return self._output_size def build_box_head(cfg, input_shape): """ Build a box head defined by `cfg.MODEL.ROI_BOX_HEAD.NAME`. """ name = cfg.MODEL.ROI_BOX_HEAD.NAME return ROI_BOX_HEAD_REGISTRY.get(name)(cfg, input_shape) ================================================ FILE: detectron2/modeling/roi_heads/cascade_rcnn.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import torch from torch import nn from torch.autograd.function import Function from detectron2.layers import ShapeSpec from detectron2.structures import Boxes, Instances, pairwise_iou from detectron2.utils.events import get_event_storage from ..box_regression import Box2BoxTransform from ..matcher import Matcher from ..poolers import ROIPooler from .box_head import build_box_head from .fast_rcnn import FastRCNNOutputLayers, FastRCNNOutputs, fast_rcnn_inference from .roi_heads import ROI_HEADS_REGISTRY, StandardROIHeads class _ScaleGradient(Function): @staticmethod def forward(ctx, input, scale): ctx.scale = scale return input @staticmethod def backward(ctx, grad_output): return grad_output * ctx.scale, None @ROI_HEADS_REGISTRY.register() class CascadeROIHeads(StandardROIHeads): def _init_box_head(self, cfg): # fmt: off pooler_resolution = cfg.MODEL.ROI_BOX_HEAD.POOLER_RESOLUTION pooler_scales = tuple(1.0 / self.feature_strides[k] for k in self.in_features) sampling_ratio = cfg.MODEL.ROI_BOX_HEAD.POOLER_SAMPLING_RATIO pooler_type = cfg.MODEL.ROI_BOX_HEAD.POOLER_TYPE cascade_bbox_reg_weights = cfg.MODEL.ROI_BOX_CASCADE_HEAD.BBOX_REG_WEIGHTS cascade_ious = cfg.MODEL.ROI_BOX_CASCADE_HEAD.IOUS self.num_cascade_stages = len(cascade_ious) assert len(cascade_bbox_reg_weights) == self.num_cascade_stages assert cfg.MODEL.ROI_BOX_HEAD.CLS_AGNOSTIC_BBOX_REG, \ "CascadeROIHeads only support class-agnostic regression now!" assert cascade_ious[0] == cfg.MODEL.ROI_HEADS.IOU_THRESHOLDS[0] # fmt: on in_channels = [self.feature_channels[f] for f in self.in_features] # Check all channel counts are equal assert len(set(in_channels)) == 1, in_channels in_channels = in_channels[0] self.box_pooler = ROIPooler( output_size=pooler_resolution, scales=pooler_scales, sampling_ratio=sampling_ratio, pooler_type=pooler_type, ) pooled_shape = ShapeSpec( channels=in_channels, width=pooler_resolution, height=pooler_resolution ) self.box_head = nn.ModuleList() self.box_predictor = nn.ModuleList() self.box2box_transform = [] self.proposal_matchers = [] for k in range(self.num_cascade_stages): box_head = build_box_head(cfg, pooled_shape) self.box_head.append(box_head) self.box_predictor.append( FastRCNNOutputLayers( box_head.output_size, self.num_classes, cls_agnostic_bbox_reg=True ) ) self.box2box_transform.append(Box2BoxTransform(weights=cascade_bbox_reg_weights[k])) if k == 0: # The first matching is done by the matcher of ROIHeads (self.proposal_matcher). self.proposal_matchers.append(None) else: self.proposal_matchers.append( Matcher([cascade_ious[k]], [0, 1], allow_low_quality_matches=False) ) def forward(self, images, features, proposals, targets=None): del images if self.training: proposals = self.label_and_sample_proposals(proposals, targets) features_list = [features[f] for f in self.in_features] if self.training: # Need targets to box head losses = self._forward_box(features_list, proposals, targets) losses.update(self._forward_mask(features_list, proposals)) losses.update(self._forward_keypoint(features_list, proposals)) return proposals, losses else: pred_instances = self._forward_box(features_list, proposals) pred_instances = self.forward_with_given_boxes(features, pred_instances) return pred_instances, {} def _forward_box(self, features, proposals, targets=None): head_outputs = [] image_sizes = [x.image_size for x in proposals] for k in range(self.num_cascade_stages): if k > 0: # The output boxes of the previous stage are the input proposals of the next stage proposals = self._create_proposals_from_boxes( head_outputs[-1].predict_boxes(), image_sizes ) if self.training: proposals = self._match_and_label_boxes(proposals, k, targets) head_outputs.append(self._run_stage(features, proposals, k)) if self.training: losses = {} storage = get_event_storage() for stage, output in enumerate(head_outputs): with storage.name_scope("stage{}".format(stage)): stage_losses = output.losses() losses.update({k + "_stage{}".format(stage): v for k, v in stage_losses.items()}) return losses else: # Each is a list[Tensor] of length #image. Each tensor is Ri x (K+1) scores_per_stage = [h.predict_probs() for h in head_outputs] # Average the scores across heads scores = [ sum(list(scores_per_image)) * (1.0 / self.num_cascade_stages) for scores_per_image in zip(*scores_per_stage) ] # Use the boxes of the last head boxes = head_outputs[-1].predict_boxes() pred_instances, _ = fast_rcnn_inference( boxes, scores, image_sizes, self.test_score_thresh, self.test_nms_thresh, self.test_detections_per_img, ) return pred_instances @torch.no_grad() def _match_and_label_boxes(self, proposals, stage, targets): """ Match proposals with groundtruth using the matcher at the given stage. Label the proposals as foreground or background based on the match. Args: proposals (list[Instances]): One Instances for each image, with the field "proposal_boxes". stage (int): the current stage targets (list[Instances]): the ground truth instances Returns: list[Instances]: the same proposals, but with fields "gt_classes" and "gt_boxes" """ num_fg_samples, num_bg_samples = [], [] for proposals_per_image, targets_per_image in zip(proposals, targets): match_quality_matrix = pairwise_iou( targets_per_image.gt_boxes, proposals_per_image.proposal_boxes ) # proposal_labels are 0 or 1 matched_idxs, proposal_labels = self.proposal_matchers[stage](match_quality_matrix) if len(targets_per_image) > 0: gt_classes = targets_per_image.gt_classes[matched_idxs] # Label unmatched proposals (0 label from matcher) as background (label=num_classes) gt_classes[proposal_labels == 0] = self.num_classes gt_boxes = targets_per_image.gt_boxes[matched_idxs] else: gt_classes = torch.zeros_like(matched_idxs) + self.num_classes gt_boxes = Boxes( targets_per_image.gt_boxes.tensor.new_zeros((len(proposals_per_image), 4)) ) proposals_per_image.gt_classes = gt_classes proposals_per_image.gt_boxes = gt_boxes num_fg_samples.append((proposal_labels == 1).sum().item()) num_bg_samples.append(proposal_labels.numel() - num_fg_samples[-1]) # Log the number of fg/bg samples in each stage storage = get_event_storage() storage.put_scalar( "stage{}/roi_head/num_fg_samples".format(stage), sum(num_fg_samples) / len(num_fg_samples), ) storage.put_scalar( "stage{}/roi_head/num_bg_samples".format(stage), sum(num_bg_samples) / len(num_bg_samples), ) return proposals def _run_stage(self, features, proposals, stage): """ Args: features (list[Tensor]): #lvl input features to ROIHeads proposals (list[Instances]): #image Instances, with the field "proposal_boxes" stage (int): the current stage Returns: FastRCNNOutputs: the output of this stage """ box_features = self.box_pooler(features, [x.proposal_boxes for x in proposals]) # The original implementation averages the losses among heads, # but scale up the parameter gradients of the heads. # This is equivalent to adding the losses among heads, # but scale down the gradients on features. box_features = _ScaleGradient.apply(box_features, 1.0 / self.num_cascade_stages) box_features = self.box_head[stage](box_features) pred_class_logits, pred_proposal_deltas = self.box_predictor[stage](box_features) del box_features outputs = FastRCNNOutputs( self.box2box_transform[stage], pred_class_logits, pred_proposal_deltas, proposals, self.smooth_l1_beta, ) return outputs def _create_proposals_from_boxes(self, boxes, image_sizes): """ Args: boxes (list[Tensor]): per-image predicted boxes, each of shape Ri x 4 image_sizes (list[tuple]): list of image shapes in (h, w) Returns: list[Instances]: per-image proposals with the given boxes. """ # Just like RPN, the proposals should not have gradients boxes = [Boxes(b.detach()) for b in boxes] proposals = [] for boxes_per_image, image_size in zip(boxes, image_sizes): boxes_per_image.clip(image_size) if self.training: # do not filter empty boxes at inference time, # because the scores from each stage need to be aligned and added later boxes_per_image = boxes_per_image[boxes_per_image.nonempty()] prop = Instances(image_size) prop.proposal_boxes = boxes_per_image proposals.append(prop) return proposals ================================================ FILE: detectron2/modeling/roi_heads/fast_rcnn.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import numpy as np import torch from fvcore.nn import smooth_l1_loss from torch import nn from torch.nn import functional as F from detectron2.layers import batched_nms, cat from detectron2.structures import Boxes, Instances from detectron2.utils.events import get_event_storage logger = logging.getLogger(__name__) """ Shape shorthand in this module: N: number of images in the minibatch R: number of ROIs, combined over all images, in the minibatch Ri: number of ROIs in image i K: number of foreground classes. E.g.,there are 80 foreground classes in COCO. Naming convention: deltas: refers to the 4-d (dx, dy, dw, dh) deltas that parameterize the box2box transform (see :class:`box_regression.Box2BoxTransform`). pred_class_logits: predicted class scores in [-inf, +inf]; use softmax(pred_class_logits) to estimate P(class). gt_classes: ground-truth classification labels in [0, K], where [0, K) represent foreground object classes and K represents the background class. pred_proposal_deltas: predicted box2box transform deltas for transforming proposals to detection box predictions. gt_proposal_deltas: ground-truth box2box transform deltas """ def fast_rcnn_losses( gt_classes, gt_proposal_deltas, pred_class_logits, pred_proposal_deltas,smooth_l1_beta,gt_light_direction= None,pred_light_direction=None ): """ When box dimension is 4: Computes the classification and box delta losses defined in the Fast R-CNN paper. When box dimension is 5: Computes the same losses for Fast R-CNN with rotated boxes. Args: gt_classes (Tensor): A tensor of shape (R,) storing ground-truth classification labels in [0, K], including K fg class and 1 bg class. gt_proposal_deltas (Tensor): Shape (R, box_dim), row i represents ground-truth box2box transform targets (dx, dy, dw, dh) or (dx, dy, dw, dh, da) that map object instance i to its matched ground-truth box. pred_class_logits (Tensor): A tensor for shape (R, K + 1) storing predicted classification logits for the K+1-way classification problem. Each row corresponds to a predicted object instance. pred_proposal_deltas (Tensor): shape depends on whether we are doing cls-agnostic or cls-specific regression, and the box dimensions. When box_dim is 4: 1. cls-specific: Shape (R, 4 * K), each row stores a list of class-specific predicted box2box transform [dx_0, dy_0, dw_0, dh_0, ..., dx_k, dy_k, dw_k, dh_k, ...] for each class k in [0, K). (No predictions for the background class.) 2. cls-agnostic: Shape (R, 4), the second row stores the class-agnostic (foreground) predicted box2box transform. When box_dim is 5: 1. cls-specific: Shape (R, 5 * K), each row stores a list of class-specific predicted rotated box2box transform [dx_0, dy_0, dw_0, dh_0, da_0, ..., dx_k, dy_k, dw_k, dh_k, da_k, ...] for each class k in [0, K). (No predictions for the background class.) 2. cls-agnostic: Shape (R, 5), the second row stores the class-agnostic (foreground) predicted rotated box2box transform. smooth_l1_beta (float): The transition point between L1 and L2 loss in the smooth L1 loss function. When set to 0, the loss becomes L1. When set to +inf, the loss becomes constant 0. Returns: loss_cls, loss_box_reg (Tensor): Scalar loss values. """ box_dim = gt_proposal_deltas.size(1) cls_agnostic_bbox_reg = pred_proposal_deltas.size(1) == box_dim device = pred_class_logits.device loss_cls = F.cross_entropy(pred_class_logits, gt_classes, reduction="mean") bg_class_ind = pred_class_logits.shape[1] - 1 # Box delta loss is only computed between the prediction for the gt class k # (if 0 <= k < bg_class_ind) and the target; there is no loss defined on predictions # for non-gt classes and background. # Empty fg_inds produces a valid loss of zero as long as the size_average # arg to smooth_l1_loss is False (otherwise it uses torch.mean internally # and would produce a nan loss). fg_inds = torch.nonzero((gt_classes >= 0) & (gt_classes < bg_class_ind)).squeeze(1) if cls_agnostic_bbox_reg: # pred_proposal_deltas only corresponds to foreground class for agnostic gt_class_cols = torch.arange(box_dim, device=device) else: fg_gt_classes = gt_classes[fg_inds] # pred_proposal_deltas for class k are located in columns [b * k : b * k + b], # where b is the dimension of box representation (4 or 5) # Note that compared to Detectron1, # we do not perform bounding box regression for background classes. gt_class_cols = box_dim * fg_gt_classes[:, None] + torch.arange(box_dim, device=device) loss_box_reg = smooth_l1_loss( pred_proposal_deltas[fg_inds[:, None], gt_class_cols], gt_proposal_deltas[fg_inds], smooth_l1_beta, reduction="sum", ) if type(pred_light_direction) == type(pred_proposal_deltas): pred_light_direction_ = pred_light_direction[fg_inds[:,None],gt_class_cols] gt_light_direction_ = gt_light_direction[fg_inds] # gt_gradient = x2 = pred_light_direction_[:,0] y2 = pred_light_direction_[:,1] x1 = pred_light_direction_[:,2] y1 = pred_light_direction_[:,3] pred_angle = torch.atan2(y2-y1,x2-x1) gt_angle = torch.atan2(gt_light_direction_[:,3]-gt_light_direction_[:,1],gt_light_direction_[:,2]-gt_light_direction_[:,0]) loss_light_reg = smooth_l1_loss( pred_angle, gt_angle, smooth_l1_beta, reduction='sum', ) loss_light_reg =loss_light_reg/gt_classes.numel() else: loss_light_reg = None # The loss is normalized using the total number of regions (R), not the number # of foreground regions even though the box regression loss is only defined on # foreground regions. Why? Because doing so gives equal training influence to # each foreground example. To see how, consider two different minibatches: # (1) Contains a single foreground region # (2) Contains 100 foreground regions # If we normalize by the number of foreground regions, the single example in # minibatch (1) will be given 100 times as much influence as each foreground # example in minibatch (2). Normalizing by the total number of regions, R, # means that the single example in minibatch (1) and each of the 100 examples # in minibatch (2) are given equal influence. loss_box_reg = loss_box_reg / gt_classes.numel() return loss_cls, loss_box_reg,loss_light_reg def fast_rcnn_inference(boxes, scores, image_shapes, score_thresh, nms_thresh, topk_per_image,light= None): """ Call `fast_rcnn_inference_single_image` for all images. Args: boxes (list[Tensor]): A list of Tensors of predicted class-specific or class-agnostic boxes for each image. Element i has shape (Ri, K * 4) if doing class-specific regression, or (Ri, 4) if doing class-agnostic regression, where Ri is the number of predicted objects for image i. This is compatible with the output of :meth:`FastRCNNOutputs.predict_boxes`. scores (list[Tensor]): A list of Tensors of predicted class scores for each image. Element i has shape (Ri, K + 1), where Ri is the number of predicted objects for image i. Compatible with the output of :meth:`FastRCNNOutputs.predict_probs`. image_shapes (list[tuple]): A list of (width, height) tuples for each image in the batch. score_thresh (float): Only return detections with a confidence score exceeding this threshold. nms_thresh (float): The threshold to use for box non-maximum suppression. Value in [0, 1]. topk_per_image (int): The number of top scoring detections to return. Set < 0 to return all detections. Returns: instances: (list[Instances]): A list of N instances, one for each image in the batch, that stores the topk most confidence detections. kept_indices: (list[Tensor]): A list of 1D tensor of length of N, each element indicates the corresponding boxes/scores index in [0, Ri) from the input, for image i. """ if type(light) == type(boxes): result_per_image = [ fast_rcnn_inference_single_image( boxes_per_image, scores_per_image, image_shape, score_thresh, nms_thresh, topk_per_image,light_per_image ) for scores_per_image, boxes_per_image, image_shape,light_per_image in zip(scores, boxes, image_shapes,light) ] else: result_per_image = [ fast_rcnn_inference_single_image( boxes_per_image, scores_per_image, image_shape, score_thresh, nms_thresh, topk_per_image ) for scores_per_image, boxes_per_image, image_shape in zip(scores,boxes,image_shapes) ] return tuple(list(x) for x in zip(*result_per_image)) def fast_rcnn_inference_single_image( boxes, scores, image_shape, score_thresh, nms_thresh, topk_per_image,light=None ): """ Single-image inference. Return bounding-box detection results by thresholding on scores and applying non-maximum suppression (NMS). Args: Same as `fast_rcnn_inference`, but with boxes, scores, and image shapes per image. Returns: Same as `fast_rcnn_inference`, but for only one image. """ scores = scores[:, :-1] num_bbox_reg_classes = boxes.shape[1] // 4 # Convert to Boxes to use the `clip` function ... boxes = Boxes(boxes.reshape(-1, 4)) boxes.clip(image_shape) boxes = boxes.tensor.view(-1, num_bbox_reg_classes, 4) # R x C x 4 if type(light) == type(boxes): # print(light) light = Boxes(light.reshape(-1,4)) # light.clip(image_shape) light = light.tensor.view(-1,num_bbox_reg_classes,4) # Filter results based on detection scores filter_mask = scores > score_thresh # R x K # R' x 2. First column contains indices of the R predictions; # Second column contains indices of classes. filter_inds = filter_mask.nonzero() if num_bbox_reg_classes == 1: boxes = boxes[filter_inds[:, 0], 0] if type(light) == type(boxes): light = light[filter_inds[:, 0], 0] else: boxes = boxes[filter_mask] if type(light) == type(boxes): light = light[filter_mask] scores = scores[filter_mask] # Apply per-class NMS keep = batched_nms(boxes, scores, filter_inds[:, 1], nms_thresh) keep = keep[:topk_per_image] boxes, scores, filter_inds = boxes[keep], scores[keep], filter_inds[keep] if type(light) == type(boxes): light = light[keep] result = Instances(image_shape) result.pred_boxes = Boxes(boxes) result.scores = scores result.pred_classes = filter_inds[:, 1] if type(light) == type(boxes): result.pred_light = Boxes(light) return result, filter_inds[:, 0] class FastRCNNOutputs(object): """ A class that stores information about outputs of a Fast R-CNN head. """ def __init__( self, box2box_transform, pred_class_logits, pred_proposal_deltas, proposals, smooth_l1_beta,pred_light_direction=None ): """ Args: box2box_transform (Box2BoxTransform/Box2BoxTransformRotated): box2box transform instance for proposal-to-detection transformations. pred_class_logits (Tensor): A tensor of shape (R, K + 1) storing the predicted class logits for all R predicted object instances. pred_proposal_deltas (Tensor): A tensor of shape (R, K * B) or (R, B) for class-specific or class-agnostic storing the predicted deltas that transform proposals into final box detections, where B is the box dimension (4 or 5) proposals (list[Instances]): A list of N Instances, where Instances i stores the proposals for image i, in the field "proposal_boxes". When training, each Instances must have ground-truth labels stored in the field "gt_classes" and "gt_boxes". smooth_l1_beta (float): The transition point between L1 and L2 loss in the smooth L1 loss function. When set to 0, the loss becomes L1. When set to +inf, the loss becomes constant 0. """ self.box2box_transform = box2box_transform self.num_preds_per_image = [len(p) for p in proposals] self.pred_class_logits = pred_class_logits self.pred_proposal_deltas = pred_proposal_deltas self.smooth_l1_beta = smooth_l1_beta self.pred_light_direction = pred_light_direction box_type = type(proposals[0].proposal_boxes) # cat(..., dim=0) concatenates over all images in the batch self.proposals = box_type.cat([p.proposal_boxes for p in proposals]) assert not self.proposals.tensor.requires_grad, "Proposals should not require gradients!" self.image_shapes = [x.image_size for x in proposals] # The following fields should exist only when training. if proposals[0].has("gt_boxes"): self.gt_boxes = box_type.cat([p.gt_boxes for p in proposals]) assert proposals[0].has("gt_classes") self.gt_classes = cat([p.gt_classes for p in proposals], dim=0) if proposals[0].has("gt_light"): self.gt_light_direction = box_type.cat([p.gt_light for p in proposals]) else: self.gt_light_direction = None def _log_accuracy(self): """ Log the accuracy metrics to EventStorage. """ num_instances = self.gt_classes.numel() pred_classes = self.pred_class_logits.argmax(dim=1) bg_class_ind = self.pred_class_logits.shape[1] - 1 fg_inds = (self.gt_classes >= 0) & (self.gt_classes < bg_class_ind) num_fg = fg_inds.nonzero().numel() fg_gt_classes = self.gt_classes[fg_inds] fg_pred_classes = pred_classes[fg_inds] num_false_negative = (fg_pred_classes == bg_class_ind).nonzero().numel() num_accurate = (pred_classes == self.gt_classes).nonzero().numel() fg_num_accurate = (fg_pred_classes == fg_gt_classes).nonzero().numel() storage = get_event_storage() storage.put_scalar("fast_rcnn/cls_accuracy", num_accurate / num_instances) if num_fg > 0: storage.put_scalar("fast_rcnn/fg_cls_accuracy", fg_num_accurate / num_fg) storage.put_scalar("fast_rcnn/false_negative", num_false_negative / num_fg) def losses(self): """ Returns: A dict of losses (scalar tensors) containing keys "loss_cls" and "loss_box_reg". """ self._log_accuracy() gt_proposal_deltas = self.box2box_transform.get_deltas( self.proposals.tensor, self.gt_boxes.tensor ) if self.gt_light_direction != None: gt_light_direction = self.box2box_transform.trans_light( self.gt_light_direction.tensor ) # gt_light_direction = self.gt_light_direction else: gt_light_direction = None loss_cls, loss_box_reg,loss_light_reg = fast_rcnn_losses( self.gt_classes, gt_proposal_deltas, self.pred_class_logits, self.pred_proposal_deltas, self.smooth_l1_beta, gt_light_direction, self.pred_light_direction ) if type(loss_light_reg) == type(loss_box_reg): return {"loss_cls": loss_cls, "loss_box_reg": loss_box_reg,'loss_light_reg': loss_light_reg} else: return{"loss_cls":loss_cls, "loss_box_reg": loss_box_reg} def predict_boxes(self): """ Returns: list[Tensor]: A list of Tensors of predicted class-specific or class-agnostic boxes for each image. Element i has shape (Ri, K * B) or (Ri, B), where Ri is the number of predicted objects for image i and B is the box dimension (4 or 5) """ boxes = self.box2box_transform.apply_deltas( self.pred_proposal_deltas, self.proposals.tensor ) return boxes.split(self.num_preds_per_image, dim=0) def predict_light(self,light): return light.split(self.num_preds_per_image,dim=0) def predict_probs(self): """ Returns: list[Tensor]: A list of Tensors of predicted class probabilities for each image. Element i has shape (Ri, K + 1), where Ri is the number of predicted objects for image i. """ probs = F.softmax(self.pred_class_logits, dim=-1) return probs.split(self.num_preds_per_image, dim=0) def inference(self, score_thresh, nms_thresh, topk_per_image): """ Args: score_thresh (float): same as fast_rcnn_inference. nms_thresh (float): same as fast_rcnn_inference. topk_per_image (int): same as fast_rcnn_inference. Returns: list[Instances]: same as fast_rcnn_inference. list[Tensor]: same as fast_rcnn_inference. """ boxes = self.predict_boxes() scores = self.predict_probs() if type(self.pred_proposal_deltas) == type(self.pred_light_direction): light = self.predict_light(self.pred_light_direction) else: light = None image_shapes = self.image_shapes return fast_rcnn_inference( boxes, scores, image_shapes, score_thresh, nms_thresh, topk_per_image,light ) class FastRCNNOutputLayers(nn.Module): """ Two linear layers for predicting Fast R-CNN outputs: (1) proposal-to-detection box regression deltas (2) classification scores """ def __init__(self, input_size, num_classes, cls_agnostic_bbox_reg, box_dim=4): """ Args: input_size (int): channels, or (channels, height, width) num_classes (int): number of foreground classes cls_agnostic_bbox_reg (bool): whether to use class agnostic for bbox regression box_dim (int): the dimension of bounding boxes. Example box dimensions: 4 for regular XYXY boxes and 5 for rotated XYWHA boxes """ super(FastRCNNOutputLayers, self).__init__() if not isinstance(input_size, int): input_size = np.prod(input_size) # The prediction layer for num_classes foreground classes and one background class # (hence + 1) self.cls_score = nn.Linear(input_size, num_classes + 1) num_bbox_reg_classes = 1 if cls_agnostic_bbox_reg else num_classes self.bbox_pred = nn.Linear(input_size, num_bbox_reg_classes * box_dim) nn.init.normal_(self.cls_score.weight, std=0.01) nn.init.normal_(self.bbox_pred.weight, std=0.001) for l in [self.cls_score, self.bbox_pred]: nn.init.constant_(l.bias, 0) def forward(self, x): if x.dim() > 2: x = torch.flatten(x, start_dim=1) scores = self.cls_score(x) proposal_deltas = self.bbox_pred(x) return scores, proposal_deltas class LightdirectionOutputLayer(nn.Module): def __init__(self, input_size, box_dim =4): super(LightdirectionOutputLayer, self).__init__() if not isinstance(input_size, int): input_size = np.prod(input_size) self.bbox_pred = nn.Linear(input_size, box_dim) nn.init.normal_(self.bbox_pred.weight, std=0.001) for l in [self.bbox_pred]: nn.init.constant_(l.bias,0) def forward(self,x): if x.dim() > 2: x = torch.flatten(x, start_dim=1) proposal_light_direction = self.bbox_pred(x) return proposal_light_direction ================================================ FILE: detectron2/modeling/roi_heads/keypoint_head.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import torch from torch import nn from torch.nn import functional as F from detectron2.layers import Conv2d, ConvTranspose2d, ShapeSpec, cat, interpolate from detectron2.structures import heatmaps_to_keypoints from detectron2.utils.events import get_event_storage from detectron2.utils.registry import Registry _TOTAL_SKIPPED = 0 ROI_KEYPOINT_HEAD_REGISTRY = Registry("ROI_KEYPOINT_HEAD") ROI_KEYPOINT_HEAD_REGISTRY.__doc__ = """ Registry for keypoint heads, which make keypoint predictions from per-region features. The registered object will be called with `obj(cfg, input_shape)`. """ def build_keypoint_head(cfg, input_shape): """ Build a keypoint head from `cfg.MODEL.ROI_KEYPOINT_HEAD.NAME`. """ name = cfg.MODEL.ROI_KEYPOINT_HEAD.NAME return ROI_KEYPOINT_HEAD_REGISTRY.get(name)(cfg, input_shape) def keypoint_rcnn_loss(pred_keypoint_logits, instances, normalizer): """ Arguments: pred_keypoint_logits (Tensor): A tensor of shape (N, K, S, S) where N is the total number of instances in the batch, K is the number of keypoints, and S is the side length of the keypoint heatmap. The values are spatial logits. instances (list[Instances]): A list of M Instances, where M is the batch size. These instances are predictions from the model that are in 1:1 correspondence with pred_keypoint_logits. Each Instances should contain a `gt_keypoints` field containing a `structures.Keypoint` instance. normalizer (float): Normalize the loss by this amount. If not specified, we normalize by the number of visible keypoints in the minibatch. Returns a scalar tensor containing the loss. """ heatmaps = [] valid = [] keypoint_side_len = pred_keypoint_logits.shape[2] for instances_per_image in instances: if len(instances_per_image) == 0: continue keypoints = instances_per_image.gt_keypoints heatmaps_per_image, valid_per_image = keypoints.to_heatmap( instances_per_image.proposal_boxes.tensor, keypoint_side_len ) heatmaps.append(heatmaps_per_image.view(-1)) valid.append(valid_per_image.view(-1)) if len(heatmaps): keypoint_targets = cat(heatmaps, dim=0) valid = cat(valid, dim=0).to(dtype=torch.uint8) valid = torch.nonzero(valid).squeeze(1) # torch.mean (in binary_cross_entropy_with_logits) doesn't # accept empty tensors, so handle it separately if len(heatmaps) == 0 or valid.numel() == 0: global _TOTAL_SKIPPED _TOTAL_SKIPPED += 1 storage = get_event_storage() storage.put_scalar("kpts_num_skipped_batches", _TOTAL_SKIPPED, smoothing_hint=False) return pred_keypoint_logits.sum() * 0 N, K, H, W = pred_keypoint_logits.shape pred_keypoint_logits = pred_keypoint_logits.view(N * K, H * W) keypoint_loss = F.cross_entropy( pred_keypoint_logits[valid], keypoint_targets[valid], reduction="sum" ) # If a normalizer isn't specified, normalize by the number of visible keypoints in the minibatch # print(valid.shape,'<-- target') # print(pred_keypoint_logits[valid].shape, "<-- pred keypoint") # print(keypoint_targets[valid].shape,'<-- target') # assert 1 != 1 if normalizer is None: normalizer = valid.numel() keypoint_loss /= normalizer return keypoint_loss def keypoint_rcnn_inference(pred_keypoint_logits, pred_instances): """ Post process each predicted keypoint heatmap in `pred_keypoint_logits` into (x, y, score, prob) and add it to the `pred_instances` as a `pred_keypoints` field. Args: pred_keypoint_logits (Tensor): A tensor of shape (N, K, S, S) where N is the total number of instances in the batch, K is the number of keypoints, and S is the side length of the keypoint heatmap. The values are spatial logits. pred_instances (list[Instances]): A list of M Instances, where M is the batch size. Returns: None. boxes will contain an extra "pred_keypoints" field. The field is a tensor of shape (#instance, K, 3) where the last dimension corresponds to (x, y, probability). """ # flatten all bboxes from all images together (list[Boxes] -> Nx4 tensor) bboxes_flat = cat([b.pred_boxes.tensor for b in pred_instances], dim=0) keypoint_results = heatmaps_to_keypoints(pred_keypoint_logits.detach(), bboxes_flat.detach()) num_instances_per_image = [len(i) for i in pred_instances] keypoint_results = keypoint_results.split(num_instances_per_image, dim=0) for keypoint_results_per_image, instances_per_image in zip(keypoint_results, pred_instances): # keypoint_results_per_image is (num instances)x(num keypoints)x(x, y, score, prob) keypoint_xyp = keypoint_results_per_image[:, :, [0, 1, 3]] instances_per_image.pred_keypoints = keypoint_xyp @ROI_KEYPOINT_HEAD_REGISTRY.register() class KRCNNConvDeconvUpsampleHead(nn.Module): """ A standard keypoint head containing a series of 3x3 convs, followed by a transpose convolution and bilinear interpolation for upsampling. """ def __init__(self, cfg, input_shape: ShapeSpec): """ The following attributes are parsed from config: conv_dims: an iterable of output channel counts for each conv in the head e.g. (512, 512, 512) for three convs outputting 512 channels. num_keypoints: number of keypoint heatmaps to predicts, determines the number of channels in the final output. """ super(KRCNNConvDeconvUpsampleHead, self).__init__() # fmt: off # default up_scale to 2 (this can eventually be moved to config) up_scale = 2 conv_dims = cfg.MODEL.ROI_KEYPOINT_HEAD.CONV_DIMS num_keypoints = cfg.MODEL.ROI_KEYPOINT_HEAD.NUM_KEYPOINTS in_channels = input_shape.channels # fmt: on self.blocks = [] for idx, layer_channels in enumerate(conv_dims, 1): module = Conv2d(in_channels, layer_channels, 3, stride=1, padding=1) self.add_module("conv_fcn{}".format(idx), module) self.blocks.append(module) in_channels = layer_channels deconv_kernel = 4 self.score_lowres = ConvTranspose2d( in_channels, num_keypoints, deconv_kernel, stride=2, padding=deconv_kernel // 2 - 1 ) self.up_scale = up_scale for name, param in self.named_parameters(): if "bias" in name: nn.init.constant_(param, 0) elif "weight" in name: # Caffe2 implementation uses MSRAFill, which in fact # corresponds to kaiming_normal_ in PyTorch nn.init.kaiming_normal_(param, mode="fan_out", nonlinearity="relu") def forward(self, x): for layer in self.blocks: x = F.relu(layer(x)) x = self.score_lowres(x) x = interpolate(x, scale_factor=self.up_scale, mode="bilinear", align_corners=False) return x ================================================ FILE: detectron2/modeling/roi_heads/mask_head.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import fvcore.nn.weight_init as weight_init import torch from torch import nn from torch.nn import functional as F from detectron2.layers import Conv2d, ConvTranspose2d, ShapeSpec, cat, get_norm from detectron2.utils.events import get_event_storage from detectron2.utils.registry import Registry ROI_MASK_HEAD_REGISTRY = Registry("ROI_MASK_HEAD") ROI_MASK_HEAD_REGISTRY.__doc__ = """ Registry for mask heads, which predicts instance masks given per-region features. The registered object will be called with `obj(cfg, input_shape)`. """ def mask_rcnn_loss(pred_mask_logits, instances): """ Compute the mask prediction loss defined in the Mask R-CNN paper. Args: pred_mask_logits (Tensor): A tensor of shape (B, C, Hmask, Wmask) or (B, 1, Hmask, Wmask) for class-specific or class-agnostic, where B is the total number of predicted masks in all images, C is the number of foreground classes, and Hmask, Wmask are the height and width of the mask predictions. The values are logits. instances (list[Instances]): A list of N Instances, where N is the number of images in the batch. These instances are in 1:1 correspondence with the pred_mask_logits. The ground-truth labels (class, box, mask, ...) associated with each instance are stored in fields. Returns: mask_loss (Tensor): A scalar tensor containing the loss. """ cls_agnostic_mask = pred_mask_logits.size(1) == 1 total_num_masks = pred_mask_logits.size(0) mask_side_len = pred_mask_logits.size(2) assert pred_mask_logits.size(2) == pred_mask_logits.size(3), "Mask prediction must be square!" gt_classes = [] gt_masks = [] for instances_per_image in instances: if len(instances_per_image) == 0: continue if not cls_agnostic_mask: gt_classes_per_image = instances_per_image.gt_classes.to(dtype=torch.int64) gt_classes.append(gt_classes_per_image) gt_masks_per_image = instances_per_image.gt_masks.crop_and_resize( instances_per_image.proposal_boxes.tensor, mask_side_len ).to(device=pred_mask_logits.device) # A tensor of shape (N, M, M), N=#instances in the image; M=mask_side_len gt_masks.append(gt_masks_per_image) if len(gt_masks) == 0: return pred_mask_logits.sum() * 0 gt_masks = cat(gt_masks, dim=0) if cls_agnostic_mask: pred_mask_logits = pred_mask_logits[:, 0] else: indices = torch.arange(total_num_masks) gt_classes = cat(gt_classes, dim=0) pred_mask_logits = pred_mask_logits[indices, gt_classes] if gt_masks.dtype == torch.bool: gt_masks_bool = gt_masks else: # Here we allow gt_masks to be float as well (depend on the implementation of rasterize()) gt_masks_bool = gt_masks > 0.5 # Log the training accuracy (using gt classes and 0.5 threshold) mask_incorrect = (pred_mask_logits > 0.0) != gt_masks_bool mask_accuracy = 1 - (mask_incorrect.sum().item() / max(mask_incorrect.numel(), 1.0)) num_positive = gt_masks_bool.sum().item() false_positive = (mask_incorrect & ~gt_masks_bool).sum().item() / max( gt_masks_bool.numel() - num_positive, 1.0 ) false_negative = (mask_incorrect & gt_masks_bool).sum().item() / max(num_positive, 1.0) storage = get_event_storage() storage.put_scalar("mask_rcnn/accuracy", mask_accuracy) storage.put_scalar("mask_rcnn/false_positive", false_positive) storage.put_scalar("mask_rcnn/false_negative", false_negative) mask_loss = F.binary_cross_entropy_with_logits( pred_mask_logits, gt_masks.to(dtype=torch.float32), reduction="mean" ) return mask_loss def mask_rcnn_inference(pred_mask_logits, pred_instances): """ Convert pred_mask_logits to estimated foreground probability masks while also extracting only the masks for the predicted classes in pred_instances. For each predicted box, the mask of the same class is attached to the instance by adding a new "pred_masks" field to pred_instances. Args: pred_mask_logits (Tensor): A tensor of shape (B, C, Hmask, Wmask) or (B, 1, Hmask, Wmask) for class-specific or class-agnostic, where B is the total number of predicted masks in all images, C is the number of foreground classes, and Hmask, Wmask are the height and width of the mask predictions. The values are logits. pred_instances (list[Instances]): A list of N Instances, where N is the number of images in the batch. Each Instances must have field "pred_classes". Returns: None. pred_instances will contain an extra "pred_masks" field storing a mask of size (Hmask, Wmask) for predicted class. Note that the masks are returned as a soft (non-quantized) masks the resolution predicted by the network; post-processing steps, such as resizing the predicted masks to the original image resolution and/or binarizing them, is left to the caller. """ cls_agnostic_mask = pred_mask_logits.size(1) == 1 if cls_agnostic_mask: mask_probs_pred = pred_mask_logits.sigmoid() else: # Select masks corresponding to the predicted classes num_masks = pred_mask_logits.shape[0] class_pred = cat([i.pred_classes for i in pred_instances]) indices = torch.arange(num_masks, device=class_pred.device) mask_probs_pred = pred_mask_logits[indices, class_pred][:, None].sigmoid() # mask_probs_pred.shape: (B, 1, Hmask, Wmask) num_boxes_per_image = [len(i) for i in pred_instances] mask_probs_pred = mask_probs_pred.split(num_boxes_per_image, dim=0) for prob, instances in zip(mask_probs_pred, pred_instances): instances.pred_masks = prob # (1, Hmask, Wmask) @ROI_MASK_HEAD_REGISTRY.register() class MaskRCNNConvUpsampleHead(nn.Module): """ A mask head with several conv layers, plus an upsample layer (with `ConvTranspose2d`). """ def __init__(self, cfg, input_shape: ShapeSpec): """ The following attributes are parsed from config: num_conv: the number of conv layers conv_dim: the dimension of the conv layers norm: normalization for the conv layers """ super(MaskRCNNConvUpsampleHead, self).__init__() # fmt: off num_classes = cfg.MODEL.ROI_HEADS.NUM_CLASSES conv_dims = cfg.MODEL.ROI_MASK_HEAD.CONV_DIM self.norm = cfg.MODEL.ROI_MASK_HEAD.NORM num_conv = cfg.MODEL.ROI_MASK_HEAD.NUM_CONV input_channels = input_shape.channels cls_agnostic_mask = cfg.MODEL.ROI_MASK_HEAD.CLS_AGNOSTIC_MASK # fmt: on self.conv_norm_relus = [] for k in range(num_conv): conv = Conv2d( input_channels if k == 0 else conv_dims, conv_dims, kernel_size=3, stride=1, padding=1, bias=not self.norm, norm=get_norm(self.norm, conv_dims), activation=F.relu, ) self.add_module("mask_fcn{}".format(k + 1), conv) self.conv_norm_relus.append(conv) self.deconv = ConvTranspose2d( conv_dims if num_conv > 0 else input_channels, conv_dims, kernel_size=2, stride=2, padding=0, ) num_mask_classes = 1 if cls_agnostic_mask else num_classes self.predictor = Conv2d(conv_dims, num_mask_classes, kernel_size=1, stride=1, padding=0) for layer in self.conv_norm_relus + [self.deconv]: weight_init.c2_msra_fill(layer) # use normal distribution initialization for mask prediction layer nn.init.normal_(self.predictor.weight, std=0.001) if self.predictor.bias is not None: nn.init.constant_(self.predictor.bias, 0) def forward(self, x): for layer in self.conv_norm_relus: x = layer(x) x = F.relu(self.deconv(x)) return self.predictor(x) def build_mask_head(cfg, input_shape): """ Build a mask head defined by `cfg.MODEL.ROI_MASK_HEAD.NAME`. """ name = cfg.MODEL.ROI_MASK_HEAD.NAME return ROI_MASK_HEAD_REGISTRY.get(name)(cfg, input_shape) ================================================ FILE: detectron2/modeling/roi_heads/roi_heads.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import numpy as np from typing import Dict import torch from torch import nn from detectron2.layers import ShapeSpec from detectron2.structures import Boxes, Instances, RotatedBoxes, pairwise_iou, pairwise_iou_rotated from detectron2.utils.events import get_event_storage from detectron2.utils.registry import Registry from ..backbone.resnet import BottleneckBlock, make_stage from ..box_regression import Box2BoxTransform, Box2BoxTransformRotated from ..matcher import Matcher from ..poolers import ROIPooler from ..proposal_generator.proposal_utils import add_ground_truth_to_proposals from ..sampling import subsample_labels from .box_head import build_box_head from .fast_rcnn import FastRCNNOutputLayers, FastRCNNOutputs from .keypoint_head import build_keypoint_head, keypoint_rcnn_inference, keypoint_rcnn_loss from .mask_head import build_mask_head, mask_rcnn_inference, mask_rcnn_loss ROI_HEADS_REGISTRY = Registry("ROI_HEADS") ROI_HEADS_REGISTRY.__doc__ = """ Registry for ROI heads in a generalized R-CNN model. ROIHeads take feature maps and region proposals, and perform per-region computation. The registered object will be called with `obj(cfg, input_shape)`. The call is expected to return an :class:`ROIHeads`. """ logger = logging.getLogger(__name__) def build_roi_heads(cfg, input_shape): """ Build ROIHeads defined by `cfg.MODEL.ROI_HEADS.NAME`. """ name = cfg.MODEL.ROI_HEADS.NAME return ROI_HEADS_REGISTRY.get(name)(cfg, input_shape) def select_foreground_proposals(proposals, bg_label): """ Given a list of N Instances (for N images), each containing a `gt_classes` field, return a list of Instances that contain only instances with `gt_classes != -1 && gt_classes != bg_label`. Args: proposals (list[Instances]): A list of N Instances, where N is the number of images in the batch. bg_label: label index of background class. Returns: list[Instances]: N Instances, each contains only the selected foreground instances. list[Tensor]: N boolean vector, correspond to the selection mask of each instance. True for selected instances. """ assert isinstance(proposals, (list, tuple)) assert isinstance(proposals[0], Instances) assert proposals[0].has("gt_classes") fg_proposals = [] fg_selection_masks = [] for proposals_per_image in proposals: gt_classes = proposals_per_image.gt_classes fg_selection_mask = (gt_classes != -1) & (gt_classes != bg_label) fg_inds = fg_selection_mask.nonzero().squeeze(1) fg_proposals.append(proposals_per_image[fg_inds]) fg_selection_masks.append(fg_selection_mask) return fg_proposals, fg_selection_masks def select_proposals_with_visible_keypoints(proposals): """ Args: proposals (list[Instances]): a list of N Instances, where N is the number of images. Returns: proposals: only contains proposals with at least one visible keypoint. Note that this is still slightly different from Detectron. In Detectron, proposals for training keypoint head are re-sampled from all the proposals with IOU>threshold & >=1 visible keypoint. Here, the proposals are first sampled from all proposals with IOU>threshold, then proposals with no visible keypoint are filtered out. This strategy seems to make no difference on Detectron and is easier to implement. """ ret = [] all_num_fg = [] for proposals_per_image in proposals: gt_keypoints = proposals_per_image.gt_keypoints.tensor # #fg x K x 3 vis_mask = gt_keypoints[:, :, 2] >= 1 xs, ys = gt_keypoints[:, :, 0], gt_keypoints[:, :, 1] proposal_boxes = proposals_per_image.proposal_boxes.tensor.unsqueeze(dim=1) # #fg x 1 x 4 kp_in_box = ( (xs >= proposal_boxes[:, :, 0]) & (xs <= proposal_boxes[:, :, 2]) & (ys >= proposal_boxes[:, :, 1]) & (ys <= proposal_boxes[:, :, 3]) ) selection = (kp_in_box & vis_mask).any(dim=1) selection_idxs = torch.nonzero(selection).squeeze(1) all_num_fg.append(selection_idxs.numel()) ret.append(proposals_per_image[selection_idxs]) storage = get_event_storage() storage.put_scalar("keypoint_head/num_fg_samples", np.mean(all_num_fg)) return ret class ROIHeads(torch.nn.Module): """ ROIHeads perform all per-region computation in an R-CNN. It contains logic of cropping the regions, extract per-region features, and make per-region predictions. It can have many variants, implemented as subclasses of this class. """ def __init__(self, cfg, input_shape: Dict[str, ShapeSpec]): super(ROIHeads, self).__init__() # fmt: off self.batch_size_per_image = cfg.MODEL.ROI_HEADS.BATCH_SIZE_PER_IMAGE self.positive_sample_fraction = cfg.MODEL.ROI_HEADS.POSITIVE_FRACTION self.test_score_thresh = cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST self.test_nms_thresh = cfg.MODEL.ROI_HEADS.NMS_THRESH_TEST self.test_detections_per_img = cfg.TEST.DETECTIONS_PER_IMAGE self.in_features = cfg.MODEL.ROI_HEADS.IN_FEATURES self.num_classes = cfg.MODEL.ROI_HEADS.NUM_CLASSES self.proposal_append_gt = cfg.MODEL.ROI_HEADS.PROPOSAL_APPEND_GT self.feature_strides = {k: v.stride for k, v in input_shape.items()} self.feature_channels = {k: v.channels for k, v in input_shape.items()} self.cls_agnostic_bbox_reg = cfg.MODEL.ROI_BOX_HEAD.CLS_AGNOSTIC_BBOX_REG self.smooth_l1_beta = cfg.MODEL.ROI_BOX_HEAD.SMOOTH_L1_BETA # fmt: on # Matcher to assign box proposals to gt boxes self.proposal_matcher = Matcher( cfg.MODEL.ROI_HEADS.IOU_THRESHOLDS, cfg.MODEL.ROI_HEADS.IOU_LABELS, allow_low_quality_matches=False, ) # Box2BoxTransform for bounding box regression self.box2box_transform = Box2BoxTransform(weights=cfg.MODEL.ROI_BOX_HEAD.BBOX_REG_WEIGHTS) @torch.no_grad() def label_and_sample_proposals(self, proposals, targets): """ Prepare some proposals to be used to train the ROI heads. It performs box matching between `proposals` and `targets`, and assigns training labels to the proposals. It returns `self.batch_size_per_image` random samples from proposals and groundtruth boxes, with a fraction of positives that is no larger than `self.positive_sample_fraction. Args: See :meth:`ROIHeads.forward` Returns: list[Instances]: length `N` list of `Instances`s containing the proposals sampled for training. Each `Instances` has the following fields: - proposal_boxes: the proposal boxes - gt_boxes: the ground-truth box that the proposal is assigned to (this is only meaningful if the proposal has a label > 0; if label = 0 then the ground-truth box is random) Other fields such as "gt_classes", "gt_masks", that's included in `targets`. """ gt_boxes = [x.gt_boxes for x in targets] # Augment proposals with ground-truth boxes. # In the case of learned proposals (e.g., RPN), when training starts # the proposals will be low quality due to random initialization. # It's possible that none of these initial # proposals have high enough overlap with the gt objects to be used # as positive examples for the second stage components (box head, # cls head, mask head). Adding the gt boxes to the set of proposals # ensures that the second stage components will have some positive # examples from the start of training. For RPN, this augmentation improves # convergence and empirically improves box AP on COCO by about 0.5 # points (under one tested configuration). if self.proposal_append_gt: proposals = add_ground_truth_to_proposals(gt_boxes, proposals) proposals_with_gt = [] num_fg_samples = [] num_bg_samples = [] for proposals_per_image, targets_per_image in zip(proposals, targets): has_gt = len(targets_per_image) > 0 match_quality_matrix = pairwise_iou( targets_per_image.gt_boxes, proposals_per_image.proposal_boxes ) matched_idxs, proposals_labels = self.proposal_matcher(match_quality_matrix) # Get the corresponding GT for each proposal if has_gt: gt_classes = targets_per_image.gt_classes[matched_idxs] # print(gt_classes) # Label unmatched proposals (0 label from matcher) as background (label=num_classes) gt_classes[proposals_labels == 0] = self.num_classes # Label ignore proposals (-1 label) gt_classes[proposals_labels == -1] = -1 else: gt_classes = torch.zeros_like(matched_idxs) + self.num_classes sampled_fg_inds, sampled_bg_inds = subsample_labels( gt_classes, self.batch_size_per_image, self.positive_sample_fraction, self.num_classes, ) sampled_inds = torch.cat([sampled_fg_inds, sampled_bg_inds], dim=0) proposals_per_image = proposals_per_image[sampled_inds] proposals_per_image.gt_classes = gt_classes[sampled_inds] # We index all the attributes of targets that start with "gt_" # and have not been added to proposals yet (="gt_classes"). if has_gt: sampled_targets = matched_idxs[sampled_inds] # NOTE: here the indexing waste some compute, because heads # like masks, keypoints, etc, will filter the proposals again, # (by foreground/background, or number of keypoints in the image, etc) # so we essentially index the data twice. for (trg_name, trg_value) in targets_per_image.get_fields().items(): if trg_name.startswith("gt_") and not proposals_per_image.has(trg_name): proposals_per_image.set(trg_name, trg_value[sampled_targets]) else: gt_boxes = Boxes( targets_per_image.gt_boxes.tensor.new_zeros((len(sampled_inds), 4)) ) proposals_per_image.gt_boxes = gt_boxes num_fg_samples.append(sampled_fg_inds.numel()) num_bg_samples.append(sampled_bg_inds.numel()) proposals_with_gt.append(proposals_per_image) # Log the number of fg/bg samples that are selected for training ROI heads storage = get_event_storage() storage.put_scalar("roi_head/num_fg_samples", np.mean(num_fg_samples)) storage.put_scalar("roi_head/num_bg_samples", np.mean(num_bg_samples)) return proposals_with_gt def forward(self, images, features, proposals, targets=None): """ Args: images (ImageList): features (dict[str: Tensor]): input data as a mapping from feature map name to tensor. Axis 0 represents the number of images `N` in the input data; axes 1-3 are channels, height, and width, which may vary between feature maps (e.g., if a feature pyramid is used). proposals (list[Instances]): length `N` list of `Instances`s. The i-th `Instances` contains object proposals for the i-th input image, with fields "proposal_boxes" and "objectness_logits". targets (list[Instances], optional): length `N` list of `Instances`s. The i-th `Instances` contains the ground-truth per-instance annotations for the i-th input image. Specify `targets` during training only. It may have the following fields: - gt_boxes: the bounding box of each instance. - gt_classes: the label for each instance with a category ranging in [0, #class]. - gt_masks: the ground-truth mask of the instance. Returns: results (list[Instances]): length `N` list of `Instances`s containing the detected instances. Returned during inference only; may be [] during training. losses (dict[str: Tensor]): mapping from a named loss to a tensor storing the loss. Used during training only. """ raise NotImplementedError() @ROI_HEADS_REGISTRY.register() class Res5ROIHeads(ROIHeads): """ The ROIHeads in a typical "C4" R-CNN model, where the box and mask head share the cropping and the per-region feature computation by a Res5 block. """ def __init__(self, cfg, input_shape): super().__init__(cfg, input_shape) assert len(self.in_features) == 1 # fmt: off pooler_resolution = cfg.MODEL.ROI_BOX_HEAD.POOLER_RESOLUTION pooler_type = cfg.MODEL.ROI_BOX_HEAD.POOLER_TYPE pooler_scales = (1.0 / self.feature_strides[self.in_features[0]], ) sampling_ratio = cfg.MODEL.ROI_BOX_HEAD.POOLER_SAMPLING_RATIO self.mask_on = cfg.MODEL.MASK_ON # fmt: on assert not cfg.MODEL.KEYPOINT_ON self.pooler = ROIPooler( output_size=pooler_resolution, scales=pooler_scales, sampling_ratio=sampling_ratio, pooler_type=pooler_type, ) self.res5, out_channels = self._build_res5_block(cfg) self.box_predictor = FastRCNNOutputLayers( out_channels, self.num_classes, self.cls_agnostic_bbox_reg ) if self.mask_on: self.mask_head = build_mask_head( cfg, ShapeSpec(channels=out_channels, width=pooler_resolution, height=pooler_resolution), ) def _build_res5_block(self, cfg): # fmt: off stage_channel_factor = 2 ** 3 # res5 is 8x res2 num_groups = cfg.MODEL.RESNETS.NUM_GROUPS width_per_group = cfg.MODEL.RESNETS.WIDTH_PER_GROUP bottleneck_channels = num_groups * width_per_group * stage_channel_factor out_channels = cfg.MODEL.RESNETS.RES2_OUT_CHANNELS * stage_channel_factor stride_in_1x1 = cfg.MODEL.RESNETS.STRIDE_IN_1X1 norm = cfg.MODEL.RESNETS.NORM assert not cfg.MODEL.RESNETS.DEFORM_ON_PER_STAGE[-1], \ "Deformable conv is not yet supported in res5 head." # fmt: on blocks = make_stage( BottleneckBlock, 3, first_stride=2, in_channels=out_channels // 2, bottleneck_channels=bottleneck_channels, out_channels=out_channels, num_groups=num_groups, norm=norm, stride_in_1x1=stride_in_1x1, ) return nn.Sequential(*blocks), out_channels def _shared_roi_transform(self, features, boxes): x = self.pooler(features, boxes) return self.res5(x) def forward(self, images, features, proposals, targets=None): """ See :class:`ROIHeads.forward`. """ del images if self.training: proposals = self.label_and_sample_proposals(proposals, targets) del targets proposal_boxes = [x.proposal_boxes for x in proposals] box_features = self._shared_roi_transform( [features[f] for f in self.in_features], proposal_boxes ) feature_pooled = box_features.mean(dim=[2, 3]) # pooled to 1x1 pred_class_logits, pred_proposal_deltas = self.box_predictor(feature_pooled) del feature_pooled outputs = FastRCNNOutputs( self.box2box_transform, pred_class_logits, pred_proposal_deltas, proposals, self.smooth_l1_beta, ) if self.training: del features losses = outputs.losses() if self.mask_on: proposals, fg_selection_masks = select_foreground_proposals( proposals, self.num_classes ) # Since the ROI feature transform is shared between boxes and masks, # we don't need to recompute features. The mask loss is only defined # on foreground proposals, so we need to select out the foreground # features. mask_features = box_features[torch.cat(fg_selection_masks, dim=0)] del box_features mask_logits = self.mask_head(mask_features) losses["loss_mask"] = mask_rcnn_loss(mask_logits, proposals) return [], losses else: pred_instances, _ = outputs.inference( self.test_score_thresh, self.test_nms_thresh, self.test_detections_per_img ) pred_instances = self.forward_with_given_boxes(features, pred_instances) return pred_instances, {} def forward_with_given_boxes(self, features, instances): """ Use the given boxes in `instances` to produce other (non-box) per-ROI outputs. Args: features: same as in `forward()` instances (list[Instances]): instances to predict other outputs. Expect the keys "pred_boxes" and "pred_classes" to exist. Returns: instances (Instances): the same `Instances` object, with extra fields such as `pred_masks` or `pred_keypoints`. """ assert not self.training assert instances[0].has("pred_boxes") and instances[0].has("pred_classes") if self.mask_on: features = [features[f] for f in self.in_features] x = self._shared_roi_transform(features, [x.pred_boxes for x in instances]) mask_logits = self.mask_head(x) mask_rcnn_inference(mask_logits, instances) return instances @ROI_HEADS_REGISTRY.register() class StandardROIHeads(ROIHeads): """ It's "standard" in a sense that there is no ROI transform sharing or feature sharing between tasks. The cropped rois go to separate branches (boxes and masks) directly. This way, it is easier to make separate abstractions for different branches. This class is used by most models, such as FPN and C5. To implement more models, you can subclass it and implement a different :meth:`forward()` or a head. """ def __init__(self, cfg, input_shape): super(StandardROIHeads, self).__init__(cfg, input_shape) self._init_box_head(cfg) self._init_mask_head(cfg) self._init_keypoint_head(cfg) def _init_box_head(self, cfg): # fmt: off pooler_resolution = cfg.MODEL.ROI_BOX_HEAD.POOLER_RESOLUTION pooler_scales = tuple(1.0 / self.feature_strides[k] for k in self.in_features) sampling_ratio = cfg.MODEL.ROI_BOX_HEAD.POOLER_SAMPLING_RATIO pooler_type = cfg.MODEL.ROI_BOX_HEAD.POOLER_TYPE # fmt: on # If StandardROIHeads is applied on multiple feature maps (as in FPN), # then we share the same predictors and therefore the channel counts must be the same in_channels = [self.feature_channels[f] for f in self.in_features] # Check all channel counts are equal assert len(set(in_channels)) == 1, in_channels in_channels = in_channels[0] self.box_pooler = ROIPooler( output_size=pooler_resolution, scales=pooler_scales, sampling_ratio=sampling_ratio, pooler_type=pooler_type, ) # Here we split "box head" and "box predictor", which is mainly due to historical reasons. # They are used together so the "box predictor" layers should be part of the "box head". # New subclasses of ROIHeads do not need "box predictor"s. self.box_head = build_box_head( cfg, ShapeSpec(channels=in_channels, height=pooler_resolution, width=pooler_resolution) ) self.box_predictor = FastRCNNOutputLayers( self.box_head.output_size, self.num_classes, self.cls_agnostic_bbox_reg ) def _init_mask_head(self, cfg): # fmt: off self.mask_on = cfg.MODEL.MASK_ON if not self.mask_on: return pooler_resolution = cfg.MODEL.ROI_MASK_HEAD.POOLER_RESOLUTION pooler_scales = tuple(1.0 / self.feature_strides[k] for k in self.in_features) sampling_ratio = cfg.MODEL.ROI_MASK_HEAD.POOLER_SAMPLING_RATIO pooler_type = cfg.MODEL.ROI_MASK_HEAD.POOLER_TYPE # fmt: on in_channels = [self.feature_channels[f] for f in self.in_features][0] self.mask_pooler = ROIPooler( output_size=pooler_resolution, scales=pooler_scales, sampling_ratio=sampling_ratio, pooler_type=pooler_type, ) self.mask_head = build_mask_head( cfg, ShapeSpec(channels=in_channels, width=pooler_resolution, height=pooler_resolution) ) def _init_keypoint_head(self, cfg): # fmt: off self.keypoint_on = cfg.MODEL.KEYPOINT_ON if not self.keypoint_on: return pooler_resolution = cfg.MODEL.ROI_KEYPOINT_HEAD.POOLER_RESOLUTION pooler_scales = tuple(1.0 / self.feature_strides[k] for k in self.in_features) # noqa sampling_ratio = cfg.MODEL.ROI_KEYPOINT_HEAD.POOLER_SAMPLING_RATIO pooler_type = cfg.MODEL.ROI_KEYPOINT_HEAD.POOLER_TYPE self.normalize_loss_by_visible_keypoints = cfg.MODEL.ROI_KEYPOINT_HEAD.NORMALIZE_LOSS_BY_VISIBLE_KEYPOINTS # noqa self.keypoint_loss_weight = cfg.MODEL.ROI_KEYPOINT_HEAD.LOSS_WEIGHT # fmt: on in_channels = [self.feature_channels[f] for f in self.in_features][0] self.keypoint_pooler = ROIPooler( output_size=pooler_resolution, scales=pooler_scales, sampling_ratio=sampling_ratio, pooler_type=pooler_type, ) self.keypoint_head = build_keypoint_head( cfg, ShapeSpec(channels=in_channels, width=pooler_resolution, height=pooler_resolution) ) def forward(self, images, features, proposals, targets=None): """ See :class:`ROIHeads.forward`. """ del images if self.training: proposals = self.label_and_sample_proposals(proposals, targets) del targets features_list = [features[f] for f in self.in_features] if self.training: losses = self._forward_box(features_list, proposals) # During training the proposals used by the box head are # used by the mask, keypoint (and densepose) heads. losses.update(self._forward_mask(features_list, proposals)) losses.update(self._forward_keypoint(features_list, proposals)) return proposals, losses else: pred_instances = self._forward_box(features_list, proposals) # During inference cascaded prediction is used: the mask and keypoints heads are only # applied to the top scoring box detections. pred_instances = self.forward_with_given_boxes(features, pred_instances) return pred_instances, {} def forward_with_given_boxes(self, features, instances): """ Use the given boxes in `instances` to produce other (non-box) per-ROI outputs. This is useful for downstream tasks where a box is known, but need to obtain other attributes (outputs of other heads). Test-time augmentation also uses this. Args: features: same as in `forward()` instances (list[Instances]): instances to predict other outputs. Expect the keys "pred_boxes" and "pred_classes" to exist. Returns: instances (Instances): the same `Instances` object, with extra fields such as `pred_masks` or `pred_keypoints`. """ assert not self.training assert instances[0].has("pred_boxes") and instances[0].has("pred_classes") features = [features[f] for f in self.in_features] instances = self._forward_mask(features, instances) instances = self._forward_keypoint(features, instances) return instances def _forward_box(self, features, proposals): """ Forward logic of the box prediction branch. Args: features (list[Tensor]): #level input features for box prediction proposals (list[Instances]): the per-image object proposals with their matching ground truth. Each has fields "proposal_boxes", and "objectness_logits", "gt_classes", "gt_boxes". Returns: In training, a dict of losses. In inference, a list of `Instances`, the predicted instances. """ box_features = self.box_pooler(features, [x.proposal_boxes for x in proposals]) box_features = self.box_head(box_features) pred_class_logits, pred_proposal_deltas = self.box_predictor(box_features) del box_features outputs = FastRCNNOutputs( self.box2box_transform, pred_class_logits, pred_proposal_deltas, proposals, self.smooth_l1_beta, ) if self.training: return outputs.losses() else: pred_instances, _ = outputs.inference( self.test_score_thresh, self.test_nms_thresh, self.test_detections_per_img ) return pred_instances def _forward_mask(self, features, instances): """ Forward logic of the mask prediction branch. Args: features (list[Tensor]): #level input features for mask prediction instances (list[Instances]): the per-image instances to train/predict masks. In training, they can be the proposals. In inference, they can be the predicted boxes. Returns: In training, a dict of losses. In inference, update `instances` with new fields "pred_masks" and return it. """ if not self.mask_on: return {} if self.training else instances if self.training: # The loss is only defined on positive proposals. proposals, _ = select_foreground_proposals(instances, self.num_classes) proposal_boxes = [x.proposal_boxes for x in proposals] mask_features = self.mask_pooler(features, proposal_boxes) mask_logits = self.mask_head(mask_features) return {"loss_mask": mask_rcnn_loss(mask_logits, proposals)} else: pred_boxes = [x.pred_boxes for x in instances] mask_features = self.mask_pooler(features, pred_boxes) mask_logits = self.mask_head(mask_features) mask_rcnn_inference(mask_logits, instances) return instances def _forward_keypoint(self, features, instances): """ Forward logic of the keypoint prediction branch. Args: features (list[Tensor]): #level input features for keypoint prediction instances (list[Instances]): the per-image instances to train/predict keypoints. In training, they can be the proposals. In inference, they can be the predicted boxes. Returns: In training, a dict of losses. In inference, update `instances` with new fields "pred_keypoints" and return it. """ if not self.keypoint_on: return {} if self.training else instances num_images = len(instances) if self.training: # The loss is defined on positive proposals with at >=1 visible keypoints. proposals, _ = select_foreground_proposals(instances, self.num_classes) proposals = select_proposals_with_visible_keypoints(proposals) proposal_boxes = [x.proposal_boxes for x in proposals] keypoint_features = self.keypoint_pooler(features, proposal_boxes) keypoint_logits = self.keypoint_head(keypoint_features) normalizer = ( num_images * self.batch_size_per_image * self.positive_sample_fraction * keypoint_logits.shape[1] ) loss = keypoint_rcnn_loss( keypoint_logits, proposals, normalizer=None if self.normalize_loss_by_visible_keypoints else normalizer, ) return {"loss_keypoint": loss * self.keypoint_loss_weight} else: pred_boxes = [x.pred_boxes for x in instances] keypoint_features = self.keypoint_pooler(features, pred_boxes) keypoint_logits = self.keypoint_head(keypoint_features) keypoint_rcnn_inference(keypoint_logits, instances) return instances @ROI_HEADS_REGISTRY.register() class RROIHeads(StandardROIHeads): """ This class is used by Rotated RPN (RRPN). For now, it just supports box_head but not mask or keypoints. """ def __init__(self, cfg, input_shape: Dict[str, ShapeSpec]): super(RROIHeads, self).__init__(cfg, input_shape) self.box2box_transform = Box2BoxTransformRotated( weights=cfg.MODEL.ROI_BOX_HEAD.BBOX_REG_WEIGHTS ) def _init_box_head(self, cfg): # fmt: off pooler_resolution = cfg.MODEL.ROI_BOX_HEAD.POOLER_RESOLUTION pooler_scales = tuple(1.0 / self.feature_strides[k] for k in self.in_features) sampling_ratio = cfg.MODEL.ROI_BOX_HEAD.POOLER_SAMPLING_RATIO pooler_type = cfg.MODEL.ROI_BOX_HEAD.POOLER_TYPE # fmt: on # If StandardROIHeads is applied on multiple feature maps (as in FPN), # then we share the same predictors and therefore the channel counts must be the same in_channels = [self.feature_channels[f] for f in self.in_features] # Check all channel counts are equal assert len(set(in_channels)) == 1, in_channels in_channels = in_channels[0] self.box_pooler = ROIPooler( output_size=pooler_resolution, scales=pooler_scales, sampling_ratio=sampling_ratio, pooler_type=pooler_type, ) self.box_head = build_box_head( cfg, ShapeSpec(channels=in_channels, height=pooler_resolution, width=pooler_resolution) ) self.box_predictor = FastRCNNOutputLayers( input_size=self.box_head.output_size, num_classes=self.num_classes, cls_agnostic_bbox_reg=self.cls_agnostic_bbox_reg, box_dim=5, ) @torch.no_grad() def label_and_sample_proposals(self, proposals, targets): """ Prepare some proposals to be used to train the RROI heads. It performs box matching between `proposals` and `targets`, and assigns training labels to the proposals. It returns `self.batch_size_per_image` random samples from proposals and groundtruth boxes, with a fraction of positives that is no larger than `self.positive_sample_fraction. Args: See :meth:`StandardROIHeads.forward` Returns: list[Instances]: length `N` list of `Instances`s containing the proposals sampled for training. Each `Instances` has the following fields: - proposal_boxes: the proposal rotated boxes - gt_boxes: the ground-truth rotated boxes that the proposal is assigned to (this is only meaningful if the proposal has a label > 0; if label = 0 then the ground-truth box is random) - other fields such as "gt_classes" and "gt_masks" that are included in `targets`. """ gt_boxes = [x.gt_boxes for x in targets] # Augment proposals with ground-truth boxes. # In the case of learned proposals (e.g., RPN), in the beginning of training # the proposals are of low quality due to random initialization. # It's possible that none of these initial # proposals have high enough overlap with the gt objects to be used # as positive examples for the second stage components (box head, # cls head, mask head). Adding the gt boxes to the set of proposals # ensures that the second stage components will have some positive # examples from the start of training. For RPN, this augmentation improves # convergence and empirically improves box AP on COCO by about 0.5 # points (under one tested configuration). proposals = add_ground_truth_to_proposals(gt_boxes, proposals) proposals_with_gt = [] num_fg_samples = [] num_bg_samples = [] for proposals_per_image, targets_per_image in zip(proposals, targets): has_gt = len(targets_per_image) > 0 match_quality_matrix = pairwise_iou_rotated( targets_per_image.gt_boxes, proposals_per_image.proposal_boxes ) matched_idxs, proposals_labels = self.proposal_matcher(match_quality_matrix) # Get the corresponding GT for each proposal if has_gt: gt_classes = targets_per_image.gt_classes[matched_idxs] # Label unmatched proposals (0 label from matcher) as background (label=num_classes) gt_classes[proposals_labels == 0] = self.num_classes # Label ignore proposals (-1 label) gt_classes[proposals_labels == -1] = -1 else: gt_classes = torch.zeros_like(matched_idxs) + self.num_classes sampled_fg_inds, sampled_bg_inds = subsample_labels( gt_classes, self.batch_size_per_image, self.positive_sample_fraction, self.num_classes, ) sampled_inds = torch.cat([sampled_fg_inds, sampled_bg_inds], dim=0) proposals_per_image = proposals_per_image[sampled_inds] proposals_per_image.gt_classes = gt_classes[sampled_inds] if has_gt: sampled_targets = matched_idxs[sampled_inds] proposals_per_image.gt_boxes = targets_per_image.gt_boxes[sampled_targets] else: gt_boxes = RotatedBoxes( targets_per_image.gt_boxes.tensor.new_zeros((len(sampled_inds), 5)) ) proposals_per_image.gt_boxes = gt_boxes num_fg_samples.append(sampled_fg_inds.numel()) num_bg_samples.append(sampled_bg_inds.numel()) proposals_with_gt.append(proposals_per_image) # Log the number of fg/bg samples that are selected for training ROI heads storage = get_event_storage() storage.put_scalar("roi_head/num_fg_samples", np.mean(num_fg_samples)) storage.put_scalar("roi_head/num_bg_samples", np.mean(num_bg_samples)) return proposals_with_gt ================================================ FILE: detectron2/modeling/roi_heads/rotated_fast_rcnn.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import numpy as np from typing import Dict import torch from detectron2.layers import ShapeSpec, batched_nms_rotated from detectron2.structures import Instances, RotatedBoxes, pairwise_iou_rotated from detectron2.utils.events import get_event_storage from ..box_regression import Box2BoxTransformRotated from ..poolers import ROIPooler from ..proposal_generator.proposal_utils import add_ground_truth_to_proposals from .box_head import build_box_head from .fast_rcnn import FastRCNNOutputLayers, FastRCNNOutputs from .roi_heads import ROI_HEADS_REGISTRY, StandardROIHeads logger = logging.getLogger(__name__) """ Shape shorthand in this module: N: number of images in the minibatch R: number of ROIs, combined over all images, in the minibatch Ri: number of ROIs in image i K: number of foreground classes. E.g.,there are 80 foreground classes in COCO. Naming convention: deltas: refers to the 5-d (dx, dy, dw, dh, da) deltas that parameterize the box2box transform (see :class:`box_regression.Box2BoxTransformRotated`). pred_class_logits: predicted class scores in [-inf, +inf]; use softmax(pred_class_logits) to estimate P(class). gt_classes: ground-truth classification labels in [0, K], where [0, K) represent foreground object classes and K represents the background class. pred_proposal_deltas: predicted rotated box2box transform deltas for transforming proposals to detection box predictions. gt_proposal_deltas: ground-truth rotated box2box transform deltas """ def fast_rcnn_inference_rotated( boxes, scores, image_shapes, score_thresh, nms_thresh, topk_per_image ): """ Call `fast_rcnn_inference_single_image_rotated` for all images. Args: boxes (list[Tensor]): A list of Tensors of predicted class-specific or class-agnostic boxes for each image. Element i has shape (Ri, K * 5) if doing class-specific regression, or (Ri, 5) if doing class-agnostic regression, where Ri is the number of predicted objects for image i. This is compatible with the output of :meth:`FastRCNNOutputs.predict_boxes`. scores (list[Tensor]): A list of Tensors of predicted class scores for each image. Element i has shape (Ri, K + 1), where Ri is the number of predicted objects for image i. Compatible with the output of :meth:`FastRCNNOutputs.predict_probs`. image_shapes (list[tuple]): A list of (width, height) tuples for each image in the batch. score_thresh (float): Only return detections with a confidence score exceeding this threshold. nms_thresh (float): The threshold to use for box non-maximum suppression. Value in [0, 1]. topk_per_image (int): The number of top scoring detections to return. Set < 0 to return all detections. Returns: instances: (list[Instances]): A list of N instances, one for each image in the batch, that stores the topk most confidence detections. kept_indices: (list[Tensor]): A list of 1D tensor of length of N, each element indicates the corresponding boxes/scores index in [0, Ri) from the input, for image i. """ result_per_image = [ fast_rcnn_inference_single_image_rotated( boxes_per_image, scores_per_image, image_shape, score_thresh, nms_thresh, topk_per_image ) for scores_per_image, boxes_per_image, image_shape in zip(scores, boxes, image_shapes) ] return tuple(list(x) for x in zip(*result_per_image)) def fast_rcnn_inference_single_image_rotated( boxes, scores, image_shape, score_thresh, nms_thresh, topk_per_image ): """ Single-image inference. Return rotated bounding-box detection results by thresholding on scores and applying rotated non-maximum suppression (Rotated NMS). Args: Same as `fast_rcnn_inference_rotated`, but with rotated boxes, scores, and image shapes per image. Returns: Same as `fast_rcnn_inference_rotated`, but for only one image. """ B = 5 # box dimension scores = scores[:, :-1] num_bbox_reg_classes = boxes.shape[1] // B # Convert to Boxes to use the `clip` function ... boxes = RotatedBoxes(boxes.reshape(-1, B)) boxes.clip(image_shape) boxes = boxes.tensor.view(-1, num_bbox_reg_classes, B) # R x C x B # Filter results based on detection scores filter_mask = scores > score_thresh # R x K # R' x 2. First column contains indices of the R predictions; # Second column contains indices of classes. filter_inds = filter_mask.nonzero() if num_bbox_reg_classes == 1: boxes = boxes[filter_inds[:, 0], 0] else: boxes = boxes[filter_mask] scores = scores[filter_mask] # Apply per-class Rotated NMS keep = batched_nms_rotated(boxes, scores, filter_inds[:, 1], nms_thresh) if topk_per_image >= 0: keep = keep[:topk_per_image] boxes, scores, filter_inds = boxes[keep], scores[keep], filter_inds[keep] result = Instances(image_shape) result.pred_boxes = RotatedBoxes(boxes) result.scores = scores result.pred_classes = filter_inds[:, 1] return result, filter_inds[:, 0] class RotatedFastRCNNOutputs(FastRCNNOutputs): """ A class that stores information about outputs of a Fast R-CNN head with RotatedBoxes. """ def inference(self, score_thresh, nms_thresh, topk_per_image): """ Args: score_thresh (float): same as `fast_rcnn_inference_rotated`. nms_thresh (float): same as `fast_rcnn_inference_rotated`. topk_per_image (int): same as `fast_rcnn_inference_rotated`. Returns: list[Instances]: same as `fast_rcnn_inference_rotated`. list[Tensor]: same as `fast_rcnn_inference_rotated`. """ boxes = self.predict_boxes() scores = self.predict_probs() image_shapes = self.image_shapes return fast_rcnn_inference_rotated( boxes, scores, image_shapes, score_thresh, nms_thresh, topk_per_image ) @ROI_HEADS_REGISTRY.register() class RROIHeads(StandardROIHeads): """ This class is used by Rotated RPN (RRPN). For now, it just supports box head but not mask or keypoints. """ def __init__(self, cfg, input_shape: Dict[str, ShapeSpec]): super().__init__(cfg, input_shape) self.box2box_transform = Box2BoxTransformRotated( weights=cfg.MODEL.ROI_BOX_HEAD.BBOX_REG_WEIGHTS ) assert ( not self.mask_on and not self.keypoint_on ), "Mask/Keypoints not supported in Rotated ROIHeads." def _init_box_head(self, cfg): # fmt: off pooler_resolution = cfg.MODEL.ROI_BOX_HEAD.POOLER_RESOLUTION pooler_scales = tuple(1.0 / self.feature_strides[k] for k in self.in_features) sampling_ratio = cfg.MODEL.ROI_BOX_HEAD.POOLER_SAMPLING_RATIO pooler_type = cfg.MODEL.ROI_BOX_HEAD.POOLER_TYPE # fmt: on # If StandardROIHeads is applied on multiple feature maps (as in FPN), # then we share the same predictors and therefore the channel counts must be the same in_channels = [self.feature_channels[f] for f in self.in_features] # Check all channel counts are equal assert len(set(in_channels)) == 1, in_channels in_channels = in_channels[0] assert pooler_type in ["ROIAlignRotated"] self.box_pooler = ROIPooler( output_size=pooler_resolution, scales=pooler_scales, sampling_ratio=sampling_ratio, pooler_type=pooler_type, ) self.box_head = build_box_head( cfg, ShapeSpec(channels=in_channels, height=pooler_resolution, width=pooler_resolution) ) self.box_predictor = FastRCNNOutputLayers( input_size=self.box_head.output_size, num_classes=self.num_classes, cls_agnostic_bbox_reg=self.cls_agnostic_bbox_reg, box_dim=5, ) @torch.no_grad() def label_and_sample_proposals(self, proposals, targets): """ Prepare some proposals to be used to train the RROI heads. It performs box matching between `proposals` and `targets`, and assigns training labels to the proposals. It returns `self.batch_size_per_image` random samples from proposals and groundtruth boxes, with a fraction of positives that is no larger than `self.positive_sample_fraction. Args: See :meth:`StandardROIHeads.forward` Returns: list[Instances]: length `N` list of `Instances`s containing the proposals sampled for training. Each `Instances` has the following fields: - proposal_boxes: the rotated proposal boxes - gt_boxes: the ground-truth rotated boxes that the proposal is assigned to (this is only meaningful if the proposal has a label > 0; if label = 0 then the ground-truth box is random) - gt_classes: the ground-truth classification lable for each proposal """ gt_boxes = [x.gt_boxes for x in targets] if self.proposal_append_gt: proposals = add_ground_truth_to_proposals(gt_boxes, proposals) proposals_with_gt = [] num_fg_samples = [] num_bg_samples = [] for proposals_per_image, targets_per_image in zip(proposals, targets): has_gt = len(targets_per_image) > 0 match_quality_matrix = pairwise_iou_rotated( targets_per_image.gt_boxes, proposals_per_image.proposal_boxes ) matched_idxs, matched_labels = self.proposal_matcher(match_quality_matrix) sampled_idxs, gt_classes = self._sample_proposals( matched_idxs, matched_labels, targets_per_image.gt_classes ) proposals_per_image = proposals_per_image[sampled_idxs] proposals_per_image.gt_classes = gt_classes if has_gt: sampled_targets = matched_idxs[sampled_idxs] proposals_per_image.gt_boxes = targets_per_image.gt_boxes[sampled_targets] else: gt_boxes = RotatedBoxes( targets_per_image.gt_boxes.tensor.new_zeros((len(sampled_idxs), 5)) ) proposals_per_image.gt_boxes = gt_boxes num_bg_samples.append((gt_classes == self.num_classes).sum().item()) num_fg_samples.append(gt_classes.numel() - num_bg_samples[-1]) proposals_with_gt.append(proposals_per_image) # Log the number of fg/bg samples that are selected for training ROI heads storage = get_event_storage() storage.put_scalar("roi_head/num_fg_samples", np.mean(num_fg_samples)) storage.put_scalar("roi_head/num_bg_samples", np.mean(num_bg_samples)) return proposals_with_gt def _forward_box(self, features, proposals): """ Forward logic of the box prediction branch. Args: features (list[Tensor]): #level input features for box prediction proposals (list[Instances]): the per-image object proposals with their matching ground truth. Each has fields "proposal_boxes", and "objectness_logits", "gt_classes", "gt_boxes". Returns: In training, a dict of losses. In inference, a list of `Instances`, the predicted instances. """ box_features = self.box_pooler(features, [x.proposal_boxes for x in proposals]) box_features = self.box_head(box_features) pred_class_logits, pred_proposal_deltas = self.box_predictor(box_features) del box_features outputs = RotatedFastRCNNOutputs( self.box2box_transform, pred_class_logits, pred_proposal_deltas, proposals, self.smooth_l1_beta, ) if self.training: return outputs.losses() else: pred_instances, _ = outputs.inference( self.test_score_thresh, self.test_nms_thresh, self.test_detections_per_img ) return pred_instances ================================================ FILE: detectron2/modeling/sampling.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import torch __all__ = ["subsample_labels"] def subsample_labels(labels, num_samples, positive_fraction, bg_label): """ Return `num_samples` random samples from `labels`, with a fraction of positives no larger than `positive_fraction`. Args: labels (Tensor): (N, ) label vector with values: * -1: ignore * bg_label: background ("negative") class * otherwise: one or more foreground ("positive") classes num_samples (int): The total number of labels with value >= 0 to return. Values that are not sampled will be filled with -1 (ignore). positive_fraction (float): The number of subsampled labels with values > 0 is `min(num_positives, int(positive_fraction * num_samples))`. The number of negatives sampled is `min(num_negatives, num_samples - num_positives_sampled)`. In order words, if there are not enough positives, the sample is filled with negatives. If there are also not enough negatives, then as many elements are sampled as is possible. bg_label (int): label index of background ("negative") class. Returns: pos_idx, neg_idx (Tensor): 1D indices. The total number of indices is `num_samples` if possible. The fraction of positive indices is `positive_fraction` if possible. """ positive = torch.nonzero((labels != -1) & (labels != bg_label)).squeeze(1) negative = torch.nonzero(labels == bg_label).squeeze(1) num_pos = int(num_samples * positive_fraction) # protect against not enough positive examples num_pos = min(positive.numel(), num_pos) num_neg = num_samples - num_pos # protect against not enough negative examples num_neg = min(negative.numel(), num_neg) # randomly select positive and negative examples perm1 = torch.randperm(positive.numel(), device=positive.device)[:num_pos] perm2 = torch.randperm(negative.numel(), device=negative.device)[:num_neg] pos_idx = positive[perm1] neg_idx = negative[perm2] return pos_idx, neg_idx ================================================ FILE: detectron2/modeling/test_time_augmentation.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy import numpy as np from contextlib import contextmanager from itertools import count import torch from torch import nn from detectron2.data.detection_utils import read_image from detectron2.data.transforms import ResizeShortestEdge from detectron2.structures import Instances from .meta_arch import GeneralizedRCNN from .postprocessing import detector_postprocess from .roi_heads.fast_rcnn import fast_rcnn_inference_single_image __all__ = ["DatasetMapperTTA", "GeneralizedRCNNWithTTA"] class DatasetMapperTTA: """ Implement test-time augmentation for detection data. It is a callable which takes a dataset dict from a detection dataset, and returns a list of dataset dicts where the images are augmented from the input image by the transformations defined in the config. This is used for test-time augmentation. """ def __init__(self, cfg): self.min_sizes = cfg.TEST.AUG.MIN_SIZES self.max_size = cfg.TEST.AUG.MAX_SIZE self.flip = cfg.TEST.AUG.FLIP self.image_format = cfg.INPUT.FORMAT def __call__(self, dataset_dict): """ Args: dict: a detection dataset dict Returns: list[dict]: a list of dataset dicts, which contain augmented version of the input image. The total number of dicts is ``len(min_sizes) * (2 if flip else 1)``. """ ret = [] if "image" not in dataset_dict: numpy_image = read_image(dataset_dict["file_name"], self.image_format) else: numpy_image = dataset_dict["image"].permute(1, 2, 0).numpy().astype("uint8") for min_size in self.min_sizes: image = np.copy(numpy_image) tfm = ResizeShortestEdge(min_size, self.max_size).get_transform(image) resized = tfm.apply_image(image) resized = torch.as_tensor(resized.transpose(2, 0, 1).astype("float32")) dic = copy.deepcopy(dataset_dict) dic["horiz_flip"] = False dic["image"] = resized ret.append(dic) if self.flip: dic = copy.deepcopy(dataset_dict) dic["horiz_flip"] = True dic["image"] = torch.flip(resized, dims=[2]) ret.append(dic) return ret class GeneralizedRCNNWithTTA(nn.Module): """ A GeneralizedRCNN with test-time augmentation enabled. Its :meth:`__call__` method has the same interface as :meth:`GeneralizedRCNN.forward`. """ def __init__(self, cfg, model, tta_mapper=None, batch_size=3): """ Args: cfg (CfgNode): model (GeneralizedRCNN): a GeneralizedRCNN to apply TTA on. tta_mapper (callable): takes a dataset dict and returns a list of augmented versions of the dataset dict. Defaults to `DatasetMapperTTA(cfg)`. batch_size (int): batch the augmented images into this batch size for inference. """ super().__init__() assert isinstance( model, GeneralizedRCNN ), "TTA is only supported on GeneralizedRCNN. Got a model of type {}".format(type(model)) self.cfg = cfg.clone() assert not self.cfg.MODEL.KEYPOINT_ON, "TTA for keypoint is not supported yet" assert ( not self.cfg.MODEL.LOAD_PROPOSALS ), "TTA for pre-computed proposals is not supported yet" self.model = model if tta_mapper is None: tta_mapper = DatasetMapperTTA(cfg) self.tta_mapper = tta_mapper self.batch_size = batch_size @contextmanager def _turn_off_roi_head(self, attr): """ Open a context where one head in `model.roi_heads` is temporarily turned off. Args: attr (str): the attribute in `model.roi_heads` which can be used to turn off a specific head, e.g., "mask_on", "keypoint_on". """ roi_heads = self.model.roi_heads try: old = getattr(roi_heads, attr) except AttributeError: # The head may not be implemented in certain ROIHeads old = None if old is None: yield else: setattr(roi_heads, attr, False) yield setattr(roi_heads, attr, old) def _batch_inference(self, batched_inputs, detected_instances=None, do_postprocess=True): """ Execute inference on a list of inputs, using batch size = self.batch_size, instead of the length of the list. Inputs & outputs have the same format as :meth:`GeneralizedRCNN.inference` """ if detected_instances is None: detected_instances = [None] * len(batched_inputs) outputs = [] inputs, instances = [], [] for idx, input, instance in zip(count(), batched_inputs, detected_instances): inputs.append(input) instances.append(instance) if len(inputs) == self.batch_size or idx == len(batched_inputs) - 1: outputs.extend( self.model.inference( inputs, instances if instances[0] is not None else None, do_postprocess=do_postprocess, ) ) inputs, instances = [], [] return outputs def __call__(self, batched_inputs): """ Same input/output format as :meth:`GeneralizedRCNN.forward` """ return [self._inference_one_image(x) for x in batched_inputs] def _inference_one_image(self, input): """ Args: input (dict): one dataset dict Returns: dict: one output dict """ augmented_inputs = self.tta_mapper(input) do_hflip = [k.pop("horiz_flip", False) for k in augmented_inputs] heights = [k["height"] for k in augmented_inputs] widths = [k["width"] for k in augmented_inputs] assert ( len(set(heights)) == 1 and len(set(widths)) == 1 ), "Augmented version of the inputs should have the same original resolution!" height = heights[0] width = widths[0] # 1. Detect boxes from all augmented versions # 1.1: forward with all augmented images with self._turn_off_roi_head("mask_on"), self._turn_off_roi_head("keypoint_on"): # temporarily disable mask/keypoint head outputs = self._batch_inference(augmented_inputs, do_postprocess=False) # 1.2: union the results all_boxes = [] all_scores = [] all_classes = [] for idx, output in enumerate(outputs): rescaled_output = detector_postprocess(output, height, width) pred_boxes = rescaled_output.pred_boxes.tensor if do_hflip[idx]: pred_boxes[:, [0, 2]] = width - pred_boxes[:, [2, 0]] all_boxes.append(pred_boxes) all_scores.extend(rescaled_output.scores) all_classes.extend(rescaled_output.pred_classes) all_boxes = torch.cat(all_boxes, dim=0).cpu() num_boxes = len(all_boxes) # 1.3: select from the union of all results num_classes = self.cfg.MODEL.ROI_HEADS.NUM_CLASSES all_scores_2d = torch.zeros(num_boxes, num_classes, device=all_boxes.device) for idx, cls, score in zip(count(), all_classes, all_scores): all_scores_2d[idx, cls] = score merged_instances, _ = fast_rcnn_inference_single_image( all_boxes, all_scores_2d, (height, width), 1e-8, self.cfg.MODEL.ROI_HEADS.NMS_THRESH_TEST, self.cfg.TEST.DETECTIONS_PER_IMAGE, ) if not self.cfg.MODEL.MASK_ON: return {"instances": merged_instances} # 2. Use the detected boxes to obtain masks # 2.1: rescale the detected boxes augmented_instances = [] for idx, input in enumerate(augmented_inputs): actual_height, actual_width = input["image"].shape[1:3] scale_x = actual_width * 1.0 / width scale_y = actual_height * 1.0 / height pred_boxes = merged_instances.pred_boxes.clone() pred_boxes.tensor[:, 0::2] *= scale_x pred_boxes.tensor[:, 1::2] *= scale_y if do_hflip[idx]: pred_boxes.tensor[:, [0, 2]] = actual_width - pred_boxes.tensor[:, [2, 0]] aug_instances = Instances( image_size=(actual_height, actual_width), pred_boxes=pred_boxes, pred_classes=merged_instances.pred_classes, scores=merged_instances.scores, ) augmented_instances.append(aug_instances) # 2.2: run forward on the detected boxes outputs = self._batch_inference(augmented_inputs, augmented_instances, do_postprocess=False) for idx, output in enumerate(outputs): if do_hflip[idx]: output.pred_masks = output.pred_masks.flip(dims=[3]) # 2.3: average the predictions all_pred_masks = torch.stack([o.pred_masks for o in outputs], dim=0) avg_pred_masks = torch.mean(all_pred_masks, dim=0) output = outputs[0] output.pred_masks = avg_pred_masks output = detector_postprocess(output, height, width) return {"instances": output} ================================================ FILE: detectron2/solver/__init__.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .build import build_lr_scheduler, build_optimizer from .lr_scheduler import WarmupCosineLR, WarmupMultiStepLR __all__ = [k for k in globals().keys() if not k.startswith("_")] ================================================ FILE: detectron2/solver/build.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from typing import Any, Dict, List import torch from detectron2.config import CfgNode from .lr_scheduler import WarmupCosineLR, WarmupMultiStepLR def build_optimizer(cfg: CfgNode, model: torch.nn.Module) -> torch.optim.Optimizer: """ Build an optimizer from config. """ params: List[Dict[str, Any]] = [] for key, value in model.named_parameters(): if not value.requires_grad: continue lr = cfg.SOLVER.BASE_LR weight_decay = cfg.SOLVER.WEIGHT_DECAY if key.endswith("norm.weight") or key.endswith("norm.bias"): weight_decay = cfg.SOLVER.WEIGHT_DECAY_NORM elif key.endswith(".bias"): # NOTE: unlike Detectron v1, we now default BIAS_LR_FACTOR to 1.0 # and WEIGHT_DECAY_BIAS to WEIGHT_DECAY so that bias optimizer # hyperparameters are by default exactly the same as for regular # weights. lr = cfg.SOLVER.BASE_LR * cfg.SOLVER.BIAS_LR_FACTOR weight_decay = cfg.SOLVER.WEIGHT_DECAY_BIAS params += [{"params": [value], "lr": lr, "weight_decay": weight_decay}] optimizer = torch.optim.SGD(params, lr, momentum=cfg.SOLVER.MOMENTUM) return optimizer def build_lr_scheduler( cfg: CfgNode, optimizer: torch.optim.Optimizer ) -> torch.optim.lr_scheduler._LRScheduler: """ Build a LR scheduler from config. """ name = cfg.SOLVER.LR_SCHEDULER_NAME if name == "WarmupMultiStepLR": return WarmupMultiStepLR( optimizer, cfg.SOLVER.STEPS, cfg.SOLVER.GAMMA, warmup_factor=cfg.SOLVER.WARMUP_FACTOR, warmup_iters=cfg.SOLVER.WARMUP_ITERS, warmup_method=cfg.SOLVER.WARMUP_METHOD, ) elif name == "WarmupCosineLR": return WarmupCosineLR( optimizer, cfg.SOLVER.MAX_ITER, warmup_factor=cfg.SOLVER.WARMUP_FACTOR, warmup_iters=cfg.SOLVER.WARMUP_ITERS, warmup_method=cfg.SOLVER.WARMUP_METHOD, ) else: raise ValueError("Unknown LR scheduler: {}".format(name)) ================================================ FILE: detectron2/solver/lr_scheduler.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import math from bisect import bisect_right from typing import List import torch # NOTE: PyTorch's LR scheduler interface uses names that assume the LR changes # only on epoch boundaries. We typically use iteration based schedules instead. # As a result, "epoch" (e.g., as in self.last_epoch) should be understood to mean # "iteration" instead. # FIXME: ideally this would be achieved with a CombinedLRScheduler, separating # MultiStepLR with WarmupLR but the current LRScheduler design doesn't allow it. class WarmupMultiStepLR(torch.optim.lr_scheduler._LRScheduler): def __init__( self, optimizer: torch.optim.Optimizer, milestones: List[int], gamma: float = 0.1, warmup_factor: float = 0.001, warmup_iters: int = 1000, warmup_method: str = "linear", last_epoch: int = -1, ): if not list(milestones) == sorted(milestones): raise ValueError( "Milestones should be a list of" " increasing integers. Got {}", milestones ) self.milestones = milestones self.gamma = gamma self.warmup_factor = warmup_factor self.warmup_iters = warmup_iters self.warmup_method = warmup_method super().__init__(optimizer, last_epoch) def get_lr(self) -> List[float]: warmup_factor = _get_warmup_factor_at_iter( self.warmup_method, self.last_epoch, self.warmup_iters, self.warmup_factor ) return [ base_lr * warmup_factor * self.gamma ** bisect_right(self.milestones, self.last_epoch) for base_lr in self.base_lrs ] def _compute_values(self) -> List[float]: # The new interface return self.get_lr() class WarmupCosineLR(torch.optim.lr_scheduler._LRScheduler): def __init__( self, optimizer: torch.optim.Optimizer, max_iters: int, warmup_factor: float = 0.001, warmup_iters: int = 1000, warmup_method: str = "linear", last_epoch: int = -1, ): self.max_iters = max_iters self.warmup_factor = warmup_factor self.warmup_iters = warmup_iters self.warmup_method = warmup_method super().__init__(optimizer, last_epoch) def get_lr(self) -> List[float]: warmup_factor = _get_warmup_factor_at_iter( self.warmup_method, self.last_epoch, self.warmup_iters, self.warmup_factor ) # Different definitions of half-cosine with warmup are possible. For # simplicity we multiply the standard half-cosine schedule by the warmup # factor. An alternative is to start the period of the cosine at warmup_iters # instead of at 0. In the case that warmup_iters << max_iters the two are # very close to each other. return [ base_lr * warmup_factor * 0.5 * (1.0 + math.cos(math.pi * self.last_epoch / self.max_iters)) for base_lr in self.base_lrs ] def _compute_values(self) -> List[float]: # The new interface return self.get_lr() def _get_warmup_factor_at_iter( method: str, iter: int, warmup_iters: int, warmup_factor: float ) -> float: """ Return the learning rate warmup factor at a specific iteration. See https://arxiv.org/abs/1706.02677 for more details. Args: method (str): warmup method; either "constant" or "linear". iter (int): iteration at which to calculate the warmup factor. warmup_iters (int): the number of warmup iterations. warmup_factor (float): the base warmup factor (the meaning changes according to the method used). Returns: float: the effective warmup factor at the given iteration. """ if iter >= warmup_iters: return 1.0 if method == "constant": return warmup_factor elif method == "linear": alpha = iter / warmup_iters return warmup_factor * (1 - alpha) + alpha else: raise ValueError("Unknown warmup method: {}".format(method)) ================================================ FILE: detectron2/structures/__init__.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .boxes import Boxes, BoxMode, pairwise_iou from .image_list import ImageList from .instances import Instances from .keypoints import Keypoints, heatmaps_to_keypoints from .masks import BitMasks, PolygonMasks, rasterize_polygons_within_box from .rotated_boxes import RotatedBoxes from .rotated_boxes import pairwise_iou as pairwise_iou_rotated __all__ = [k for k in globals().keys() if not k.startswith("_")] ================================================ FILE: detectron2/structures/boxes.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import numpy as np from enum import Enum, unique from typing import Iterator, List, Tuple, Union import torch from detectron2.layers import cat _RawBoxType = Union[List[float], Tuple[float, ...], torch.Tensor, np.ndarray] @unique class BoxMode(Enum): """ Enum of different ways to represent a box. Attributes: XYXY_ABS: (x0, y0, x1, y1) in absolute floating points coordinates. The coordinates in range [0, width or height]. XYWH_ABS: (x0, y0, w, h) in absolute floating points coordinates. XYXY_REL: (x0, y0, x1, y1) in range [0, 1]. They are relative to the size of the image. XYWH_REL: (x0, y0, w, h) in range [0, 1]. They are relative to the size of the image. """ XYXY_ABS = 0 XYWH_ABS = 1 XYXY_REL = 2 XYWH_REL = 3 @staticmethod def convert(box: _RawBoxType, from_mode: "BoxMode", to_mode: "BoxMode") -> _RawBoxType: """ Args: box: can be a 4-tuple, 4-list or a Nx4 array/tensor. from_mode, to_mode (BoxMode) Returns: The converted box of the same type. """ if from_mode == to_mode: return box original_type = type(box) single_box = isinstance(box, (list, tuple)) if single_box: arr = np.array(box) assert arr.shape == ( 4, ), "BoxMode.convert takes either a 4-tuple/list or a Nx4 array/tensor" else: arr = box assert to_mode.value < 2 and from_mode.value < 2, "Relative mode not yet supported!" original_shape = arr.shape arr = arr.reshape(-1, 4) if to_mode == BoxMode.XYXY_ABS and from_mode == BoxMode.XYWH_ABS: arr[:, 2] += arr[:, 0] arr[:, 3] += arr[:, 1] elif from_mode == BoxMode.XYXY_ABS and to_mode == BoxMode.XYWH_ABS: arr[:, 2] -= arr[:, 0] arr[:, 3] -= arr[:, 1] else: raise RuntimeError("Cannot be here!") if single_box: return original_type(arr.flatten()) return arr.reshape(*original_shape) class Boxes: """ This structure stores a list of boxes as a Nx4 torch.Tensor. It supports some common methods about boxes (`area`, `clip`, `nonempty`, etc), and also behaves like a Tensor (support indexing, `to(device)`, `.device`, and iteration over all boxes) Attributes: tensor: float matrix of Nx4. """ BoxSizeType = Union[List[int], Tuple[int, int]] def __init__(self, tensor: torch.Tensor): """ Args: tensor (Tensor[float]): a Nx4 matrix. Each row is (x1, y1, x2, y2). """ device = tensor.device if isinstance(tensor, torch.Tensor) else torch.device("cpu") tensor = torch.as_tensor(tensor, dtype=torch.float32, device=device) if tensor.numel() == 0: tensor = torch.zeros(0, 4, dtype=torch.float32, device=device) assert tensor.dim() == 2 and tensor.size(-1) == 4, tensor.size() self.tensor = tensor def clone(self) -> "Boxes": """ Clone the Boxes. Returns: Boxes """ return Boxes(self.tensor.clone()) def to(self, device: str) -> "Boxes": return Boxes(self.tensor.to(device)) def area(self) -> torch.Tensor: """ Computes the area of all the boxes. Returns: torch.Tensor: a vector with areas of each box. """ box = self.tensor area = (box[:, 2] - box[:, 0]) * (box[:, 3] - box[:, 1]) return area def clip(self, box_size: BoxSizeType) -> None: """ Clip (in place) the boxes by limiting x coordinates to the range [0, width] and y coordinates to the range [0, height]. Args: box_size (height, width): The clipping box's size. """ assert torch.isfinite(self.tensor).all() h, w = box_size self.tensor[:, 0].clamp_(min=0, max=w) self.tensor[:, 1].clamp_(min=0, max=h) self.tensor[:, 2].clamp_(min=0, max=w) self.tensor[:, 3].clamp_(min=0, max=h) def nonempty(self, threshold: int = 0) -> torch.Tensor: """ Find boxes that are non-empty. A box is considered empty, if either of its side is no larger than threshold. Returns: Tensor: a binary vector which represents whether each box is empty (False) or non-empty (True). """ box = self.tensor widths = box[:, 2] - box[:, 0] heights = box[:, 3] - box[:, 1] keep = (widths > threshold) & (heights > threshold) return keep def __getitem__(self, item: Union[int, slice, torch.BoolTensor]) -> "Boxes": """ Returns: Boxes: Create a new :class:`Boxes` by indexing. The following usage are allowed: 1. `new_boxes = boxes[3]`: return a `Boxes` which contains only one box. 2. `new_boxes = boxes[2:10]`: return a slice of boxes. 3. `new_boxes = boxes[vector]`, where vector is a torch.BoolTensor with `length = len(boxes)`. Nonzero elements in the vector will be selected. Note that the returned Boxes might share storage with this Boxes, subject to Pytorch's indexing semantics. """ if isinstance(item, int): return Boxes(self.tensor[item].view(1, -1)) b = self.tensor[item] assert b.dim() == 2, "Indexing on Boxes with {} failed to return a matrix!".format(item) return Boxes(b) def __len__(self) -> int: return self.tensor.shape[0] def __repr__(self) -> str: return "Boxes(" + str(self.tensor) + ")" def inside_box(self, box_size: BoxSizeType, boundary_threshold: int = 0) -> torch.Tensor: """ Args: box_size (height, width): Size of the reference box. boundary_threshold (int): Boxes that extend beyond the reference box boundary by more than boundary_threshold are considered "outside". Returns: a binary vector, indicating whether each box is inside the reference box. """ height, width = box_size inds_inside = ( (self.tensor[..., 0] >= -boundary_threshold) & (self.tensor[..., 1] >= -boundary_threshold) & (self.tensor[..., 2] < width + boundary_threshold) & (self.tensor[..., 3] < height + boundary_threshold) ) return inds_inside def get_centers(self) -> torch.Tensor: """ Returns: The box centers in a Nx2 array of (x, y). """ return (self.tensor[:, :2] + self.tensor[:, 2:]) / 2 @staticmethod def cat(boxes_list: List["Boxes"]) -> "Boxes": """ Concatenates a list of Boxes into a single Boxes Arguments: boxes_list (list[Boxes]) Returns: Boxes: the concatenated Boxes """ assert isinstance(boxes_list, (list, tuple)) assert len(boxes_list) > 0 assert all(isinstance(box, Boxes) for box in boxes_list) cat_boxes = type(boxes_list[0])(cat([b.tensor for b in boxes_list], dim=0)) return cat_boxes @property def device(self) -> str: return self.tensor.device def __iter__(self) -> Iterator[torch.Tensor]: """ Yield a box as a Tensor of shape (4,) at a time. """ yield from self.tensor # implementation from https://github.com/kuangliu/torchcv/blob/master/torchcv/utils/box.py # with slight modifications def pairwise_iou(boxes1: Boxes, boxes2: Boxes) -> torch.Tensor: """ Given two lists of boxes of size N and M, compute the IoU (intersection over union) between __all__ N x M pairs of boxes. The box order must be (xmin, ymin, xmax, ymax). Args: boxes1,boxes2 (Boxes): two `Boxes`. Contains N & M boxes, respectively. Returns: Tensor: IoU, sized [N,M]. """ area1 = boxes1.area() area2 = boxes2.area() boxes1, boxes2 = boxes1.tensor, boxes2.tensor lt = torch.max(boxes1[:, None, :2], boxes2[:, :2]) # [N,M,2] rb = torch.min(boxes1[:, None, 2:], boxes2[:, 2:]) # [N,M,2] wh = (rb - lt).clamp(min=0) # [N,M,2] inter = wh[:, :, 0] * wh[:, :, 1] # [N,M] # handle empty boxes iou = torch.where( inter > 0, inter / (area1[:, None] + area2 - inter), torch.zeros(1, dtype=inter.dtype, device=inter.device), ) return iou def matched_boxlist_iou(boxes1: Boxes, boxes2: Boxes) -> torch.Tensor: """ Compute pairwise intersection over union (IOU) of two sets of matched boxes. The box order must be (xmin, ymin, xmax, ymax). Similar to boxlist_iou, but computes only diagonal elements of the matrix Arguments: boxes1: (Boxes) bounding boxes, sized [N,4]. boxes2: (Boxes) bounding boxes, sized [N,4]. Returns: (tensor) iou, sized [N]. """ assert len(boxes1) == len(boxes2), ( "boxlists should have the same" "number of entries, got {}, {}".format(len(boxes1), len(boxes2)) ) area1 = boxes1.area() # [N] area2 = boxes2.area() # [N] box1, box2 = boxes1.tensor, boxes2.tensor lt = torch.max(box1[:, :2], box2[:, :2]) # [N,2] rb = torch.min(box1[:, 2:], box2[:, 2:]) # [N,2] wh = (rb - lt).clamp(min=0) # [N,2] inter = wh[:, 0] * wh[:, 1] # [N] iou = inter / (area1 + area2 - inter) # [N] return iou ================================================ FILE: detectron2/structures/image_list.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. from __future__ import division from typing import Any, List, Sequence, Tuple, Union import torch from torch.nn import functional as F class ImageList(object): """ Structure that holds a list of images (of possibly varying sizes) as a single tensor. This works by padding the images to the same size, and storing in a field the original sizes of each image Attributes: image_sizes (list[tuple[int, int]]): each tuple is (h, w) """ def __init__(self, tensor: torch.Tensor, image_sizes: List[Tuple[int, int]]): """ Arguments: tensor (Tensor): of shape (N, H, W) or (N, C_1, ..., C_K, H, W) where K >= 1 image_sizes (list[tuple[int, int]]): Each tuple is (h, w). """ self.tensor = tensor self.image_sizes = image_sizes def __len__(self) -> int: return len(self.image_sizes) def __getitem__(self, idx: Union[int, slice]) -> torch.Tensor: """ Access the individual image in its original size. Returns: Tensor: an image of shape (H, W) or (C_1, ..., C_K, H, W) where K >= 1 """ size = self.image_sizes[idx] return self.tensor[idx, ..., : size[0], : size[1]] # type: ignore def to(self, *args: Any, **kwargs: Any) -> "ImageList": cast_tensor = self.tensor.to(*args, **kwargs) return ImageList(cast_tensor, self.image_sizes) @staticmethod def from_tensors( tensors: Sequence[torch.Tensor], size_divisibility: int = 0, pad_value: float = 0.0 ) -> "ImageList": """ Args: tensors: a tuple or list of `torch.Tensors`, each of shape (Hi, Wi) or (C_1, ..., C_K, Hi, Wi) where K >= 1. The Tensors will be padded with `pad_value` so that they will have the same shape. size_divisibility (int): If `size_divisibility > 0`, also adds padding to ensure the common height and width is divisible by `size_divisibility` pad_value (float): value to pad Returns: an `ImageList`. """ assert len(tensors) > 0 assert isinstance(tensors, (tuple, list)) for t in tensors: assert isinstance(t, torch.Tensor), type(t) assert t.shape[1:-2] == tensors[0].shape[1:-2], t.shape # per dimension maximum (H, W) or (C_1, ..., C_K, H, W) where K >= 1 among all tensors max_size = tuple(max(s) for s in zip(*[img.shape for img in tensors])) if size_divisibility > 0: import math stride = size_divisibility max_size = list(max_size) # type: ignore max_size[-2] = int(math.ceil(max_size[-2] / stride) * stride) # type: ignore max_size[-1] = int(math.ceil(max_size[-1] / stride) * stride) # type: ignore max_size = tuple(max_size) image_sizes = [im.shape[-2:] for im in tensors] if len(tensors) == 1: # This seems slightly (2%) faster. # TODO: check whether it's faster for multiple images as well image_size = image_sizes[0] padded = F.pad( tensors[0], [0, max_size[-1] - image_size[1], 0, max_size[-2] - image_size[0]], value=pad_value, ) batched_imgs = padded.unsqueeze_(0) else: batch_shape = (len(tensors),) + max_size batched_imgs = tensors[0].new_full(batch_shape, pad_value) for img, pad_img in zip(tensors, batched_imgs): pad_img[..., : img.shape[-2], : img.shape[-1]].copy_(img) return ImageList(batched_imgs.contiguous(), image_sizes) ================================================ FILE: detectron2/structures/instances.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import itertools from typing import Any, Dict, List, Tuple, Union import torch from detectron2.layers import cat class Instances: """ This class represents a list of instances in an image. It stores the attributes of instances (e.g., boxes, masks, labels, scores) as "fields". All fields must have the same `__len__` which is the number of instances. All other (non-field) attributes of this class are considered private: they must start with '_' and are not modifiable by a user. Some basic usage: 1. Set/Get a field: instances.gt_boxes = Boxes(...) print(instances.pred_masks) print('gt_masks' in instances) 2. `len(instances)` returns the number of instances 3. Indexing: `instances[indices]` will apply the indexing on all the fields and returns a new `Instances`. Typically, `indices` is a binary vector of length num_instances, or a vector of integer indices. """ def __init__(self, image_size: Tuple[int, int], **kwargs: Any): """ Args: image_size (height, width): the spatial size of the image. kwargs: fields to add to this `Instances`. """ self._image_size = image_size self._fields: Dict[str, Any] = {} for k, v in kwargs.items(): self.set(k, v) @property def image_size(self) -> Tuple[int, int]: """ Returns: tuple: height, width """ return self._image_size def __setattr__(self, name: str, val: Any) -> None: if name.startswith("_"): super().__setattr__(name, val) else: self.set(name, val) def __getattr__(self, name: str) -> Any: if name == "_fields" or name not in self._fields: raise AttributeError("Cannot find field '{}' in the given Instances!".format(name)) return self._fields[name] def set(self, name: str, value: Any) -> None: """ Set the field named `name` to `value`. The length of `value` must be the number of instances, and must agree with other existing fields in this object. """ data_len = len(value) if len(self._fields): assert ( len(self) == data_len ), "Adding a field of length {} to a Instances of length {}".format(data_len, len(self)) self._fields[name] = value def has(self, name: str) -> bool: """ Returns: bool: whether the field called `name` exists. """ return name in self._fields def remove(self, name: str) -> None: """ Remove the field called `name`. """ del self._fields[name] def get(self, name: str) -> Any: """ Returns the field called `name`. """ return self._fields[name] def get_fields(self) -> Dict[str, Any]: """ Returns: dict: a dict which maps names (str) to data of the fields Modifying the returned dict will modify this instance. """ return self._fields # Tensor-like methods def to(self, device: str) -> "Instances": """ Returns: Instances: all fields are called with a `to(device)`, if the field has this method. """ ret = Instances(self._image_size) for k, v in self._fields.items(): if hasattr(v, "to"): v = v.to(device) ret.set(k, v) return ret def __getitem__(self, item: Union[int, slice, torch.BoolTensor]) -> "Instances": """ Args: item: an index-like object and will be used to index all the fields. Returns: If `item` is a string, return the data in the corresponding field. Otherwise, returns an `Instances` where all fields are indexed by `item`. """ ret = Instances(self._image_size) for k, v in self._fields.items(): ret.set(k, v[item]) return ret def __len__(self) -> int: for v in self._fields.values(): return len(v) raise NotImplementedError("Empty Instances does not support __len__!") @staticmethod def cat(instance_lists: List["Instances"]) -> "Instances": """ Args: instance_lists (list[Instances]) Returns: Instances """ assert all(isinstance(i, Instances) for i in instance_lists) assert len(instance_lists) > 0 if len(instance_lists) == 1: return instance_lists[0] image_size = instance_lists[0].image_size for i in instance_lists[1:]: assert i.image_size == image_size ret = Instances(image_size) for k in instance_lists[0]._fields.keys(): values = [i.get(k) for i in instance_lists] v0 = values[0] if isinstance(v0, torch.Tensor): values = cat(values, dim=0) elif isinstance(v0, list): values = list(itertools.chain(*values)) elif hasattr(type(v0), "cat"): values = type(v0).cat(values) else: raise ValueError("Unsupported type {} for concatenation".format(type(v0))) ret.set(k, values) return ret def __str__(self) -> str: s = self.__class__.__name__ + "(" s += "num_instances={}, ".format(len(self)) s += "image_height={}, ".format(self._image_size[0]) s += "image_width={}, ".format(self._image_size[1]) s += "fields=[{}])".format(", ".join(self._fields.keys())) return s def __repr__(self) -> str: s = self.__class__.__name__ + "(" s += "num_instances={}, ".format(len(self)) s += "image_height={}, ".format(self._image_size[0]) s += "image_width={}, ".format(self._image_size[1]) s += "fields=[" for k, v in self._fields.items(): s += "{} = {}, ".format(k, v) s += "])" return s ================================================ FILE: detectron2/structures/keypoints.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import numpy as np from typing import Any, List, Tuple, Union import torch from detectron2.layers import interpolate class Keypoints: """ Stores keypoint annotation data. GT Instances have a `gt_keypoints` property containing the x,y location and visibility flag of each keypoint. This tensor has shape (N, K, 3) where N is the number of instances and K is the number of keypoints per instance. The visibility flag follows the COCO format and must be one of three integers: * v=0: not labeled (in which case x=y=0) * v=1: labeled but not visible * v=2: labeled and visible """ def __init__(self, keypoints: Union[torch.Tensor, np.ndarray, List[List[float]]]): """ Arguments: keypoints: A Tensor, numpy array, or list of the x, y, and visibility of each keypoint. The shape should be (N, K, 3) where N is the number of instances, and K is the number of keypoints per instance. """ device = keypoints.device if isinstance(keypoints, torch.Tensor) else torch.device("cpu") keypoints = torch.as_tensor(keypoints, dtype=torch.float32, device=device) assert keypoints.dim() == 3 and keypoints.shape[2] == 3, keypoints.shape self.tensor = keypoints def __len__(self) -> int: return self.tensor.size(0) def to(self, *args: Any, **kwargs: Any) -> "Keypoints": return type(self)(self.tensor.to(*args, **kwargs)) def to_heatmap(self, boxes: torch.Tensor, heatmap_size: int) -> torch.Tensor: """ Arguments: boxes: Nx4 tensor, the boxes to draw the keypoints to Returns: heatmaps: A tensor of shape (N, K) containing an integer spatial label in the range [0, heatmap_size**2 - 1] for each keypoint in the input. valid: A tensor of shape (N, K) containing whether each keypoint is in the roi or not. """ return _keypoints_to_heatmap(self.tensor, boxes, heatmap_size) def __getitem__(self, item: Union[int, slice, torch.BoolTensor]) -> "Keypoints": """ Create a new `Keypoints` by indexing on this `Keypoints`. The following usage are allowed: 1. `new_kpts = kpts[3]`: return a `Keypoints` which contains only one instance. 2. `new_kpts = kpts[2:10]`: return a slice of key points. 3. `new_kpts = kpts[vector]`, where vector is a torch.ByteTensor with `length = len(kpts)`. Nonzero elements in the vector will be selected. Note that the returned Keypoints might share storage with this Keypoints, subject to Pytorch's indexing semantics. """ if isinstance(item, int): return Keypoints([self.tensor[item]]) return Keypoints(self.tensor[item]) def __repr__(self) -> str: s = self.__class__.__name__ + "(" s += "num_instances={})".format(len(self.tensor)) return s # TODO make this nicer, this is a direct translation from C2 (but removing the inner loop) def _keypoints_to_heatmap( keypoints: torch.Tensor, rois: torch.Tensor, heatmap_size: int ) -> Tuple[torch.Tensor, torch.Tensor]: """ Encode keypoint locations into a target heatmap for use in SoftmaxWithLoss across space. Maps keypoints from the half-open interval [x1, x2) on continuous image coordinates to the closed interval [0, heatmap_size - 1] on discrete image coordinates. We use the continuous-discrete conversion from Heckbert 1990 ("What is the coordinate of a pixel?"): d = floor(c) and c = d + 0.5, where d is a discrete coordinate and c is a continuous coordinate. Arguments: keypoints: tensor of keypoint locations in of shape (N, K, 3). rois: Nx4 tensor of rois in xyxy format heatmap_size: integer side length of square heatmap. Returns: heatmaps: A tensor of shape (N, K) containing an integer spatial label in the range [0, heatmap_size**2 - 1] for each keypoint in the input. valid: A tensor of shape (N, K) containing whether each keypoint is in the roi or not. """ if rois.numel() == 0: return rois.new().long(), rois.new().long() offset_x = rois[:, 0] offset_y = rois[:, 1] scale_x = heatmap_size / (rois[:, 2] - rois[:, 0]) scale_y = heatmap_size / (rois[:, 3] - rois[:, 1]) offset_x = offset_x[:, None] offset_y = offset_y[:, None] scale_x = scale_x[:, None] scale_y = scale_y[:, None] x = keypoints[..., 0] y = keypoints[..., 1] x_boundary_inds = x == rois[:, 2][:, None] y_boundary_inds = y == rois[:, 3][:, None] x = (x - offset_x) * scale_x x = x.floor().long() y = (y - offset_y) * scale_y y = y.floor().long() x[x_boundary_inds] = heatmap_size - 1 y[y_boundary_inds] = heatmap_size - 1 valid_loc = (x >= 0) & (y >= 0) & (x < heatmap_size) & (y < heatmap_size) vis = keypoints[..., 2] > 0 valid = (valid_loc & vis).long() lin_ind = y * heatmap_size + x heatmaps = lin_ind * valid return heatmaps, valid @torch.no_grad() def heatmaps_to_keypoints(maps: torch.Tensor, rois: torch.Tensor) -> torch.Tensor: """ Args: maps (Tensor): (#ROIs, #keypoints, POOL_H, POOL_W) rois (Tensor): (#ROIs, 4) Extract predicted keypoint locations from heatmaps. Output has shape (#rois, #keypoints, 4) with the last dimension corresponding to (x, y, logit, prob) for each keypoint. Converts a discrete image coordinate in an NxN image to a continuous keypoint coordinate. We maintain consistency with keypoints_to_heatmap by using the conversion from Heckbert 1990: c = d + 0.5, where d is a discrete coordinate and c is a continuous coordinate. """ offset_x = rois[:, 0] offset_y = rois[:, 1] widths = (rois[:, 2] - rois[:, 0]).clamp(min=1) heights = (rois[:, 3] - rois[:, 1]).clamp(min=1) widths_ceil = widths.ceil() heights_ceil = heights.ceil() num_rois, num_keypoints = maps.shape[:2] xy_preds = maps.new_zeros(rois.shape[0], num_keypoints, 4) width_corrections = widths / widths_ceil height_corrections = heights / heights_ceil keypoints_idx = torch.arange(num_keypoints, device=maps.device) for i in range(num_rois): outsize = (int(heights_ceil[i]), int(widths_ceil[i])) roi_map = interpolate(maps[[i]], size=outsize, mode="bicubic", align_corners=False).squeeze( 0 ) # #keypoints x H x W # softmax over the spatial region max_score, _ = roi_map.view(num_keypoints, -1).max(1) max_score = max_score.view(num_keypoints, 1, 1) tmp_full_resolution = (roi_map - max_score).exp_() tmp_pool_resolution = (maps[i] - max_score).exp_() # Produce scores over the region H x W, but normalize with POOL_H x POOL_W # So that the scores of objects of different absolute sizes will be more comparable roi_map_probs = tmp_full_resolution / tmp_pool_resolution.sum((1, 2), keepdim=True) w = roi_map.shape[2] pos = roi_map.view(num_keypoints, -1).argmax(1) x_int = pos % w y_int = (pos - x_int) // w assert ( roi_map_probs[keypoints_idx, y_int, x_int] == roi_map_probs.view(num_keypoints, -1).max(1)[0] ).all() x = (x_int.float() + 0.5) * width_corrections[i] y = (y_int.float() + 0.5) * height_corrections[i] xy_preds[i, :, 0] = x + offset_x[i] xy_preds[i, :, 1] = y + offset_y[i] xy_preds[i, :, 2] = roi_map[keypoints_idx, y_int, x_int] xy_preds[i, :, 3] = roi_map_probs[keypoints_idx, y_int, x_int] return xy_preds ================================================ FILE: detectron2/structures/masks.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. import copy import itertools import numpy as np from typing import Any, Iterator, List, Union import pycocotools.mask as mask_util import torch from torch import device from detectron2.layers.roi_align import ROIAlign from detectron2.utils.memory import retry_if_cuda_oom from .boxes import Boxes def polygon_area(x, y): # Using the shoelace formula # https://stackoverflow.com/questions/24467972/calculate-area-of-polygon-given-x-y-coordinates return 0.5 * np.abs(np.dot(x, np.roll(y, 1)) - np.dot(y, np.roll(x, 1))) def polygons_to_bitmask(polygons: List[np.ndarray], height: int, width: int) -> np.ndarray: """ Args: polygons (list[ndarray]): each array has shape (Nx2,) height, width (int) Returns: ndarray: a bool mask of shape (height, width) """ if len(polygons) == 0: # COCOAPI does not support empty polygons return np.zeros((height, width)).astype(np.bool) rles = mask_util.frPyObjects(polygons, height, width) rle = mask_util.merge(rles) return mask_util.decode(rle).astype(np.bool) def rasterize_polygons_within_box( polygons: List[np.ndarray], box: np.ndarray, mask_size: int ) -> torch.Tensor: """ Rasterize the polygons into a mask image and crop the mask content in the given box. The cropped mask is resized to (mask_size, mask_size). This function is used when generating training targets for mask head in Mask R-CNN. Given original ground-truth masks for an image, new ground-truth mask training targets in the size of `mask_size x mask_size` must be provided for each predicted box. This function will be called to produce such targets. Args: polygons (list[ndarray[float]]): a list of polygons, which represents an instance. box: 4-element numpy array mask_size (int): Returns: Tensor: BoolTensor of shape (mask_size, mask_size) """ # 1. Shift the polygons w.r.t the boxes w, h = box[2] - box[0], box[3] - box[1] polygons = copy.deepcopy(polygons) for p in polygons: p[0::2] = p[0::2] - box[0] p[1::2] = p[1::2] - box[1] # 2. Rescale the polygons to the new box size # max() to avoid division by small number ratio_h = mask_size / max(h, 0.1) ratio_w = mask_size / max(w, 0.1) if ratio_h == ratio_w: for p in polygons: p *= ratio_h else: for p in polygons: p[0::2] *= ratio_w p[1::2] *= ratio_h # 3. Rasterize the polygons with coco api mask = polygons_to_bitmask(polygons, mask_size, mask_size) mask = torch.from_numpy(mask) return mask class BitMasks: """ This class stores the segmentation masks for all objects in one image, in the form of bitmaps. Attributes: tensor: bool Tensor of N,H,W, representing N instances in the image. """ def __init__(self, tensor: Union[torch.Tensor, np.ndarray]): """ Args: tensor: bool Tensor of N,H,W, representing N instances in the image. """ if isinstance(tensor, torch.Tensor): tensor = tensor.to(torch.bool) else: tensor = torch.as_tensor(tensor, dtype=torch.bool, device=torch.device("cpu")) assert tensor.dim() == 3, tensor.size() self.image_size = tensor.shape[1:] self.tensor = tensor @torch.jit.unused def to(self, *args: Any, **kwargs: Any) -> "BitMasks": return BitMasks(self.tensor.to(*args, **kwargs)) @property def device(self) -> torch.device: return self.tensor.device @torch.jit.unused def __getitem__(self, item: Union[int, slice, torch.BoolTensor]) -> "BitMasks": """ Returns: BitMasks: Create a new :class:`BitMasks` by indexing. The following usage are allowed: 1. `new_masks = masks[3]`: return a `BitMasks` which contains only one mask. 2. `new_masks = masks[2:10]`: return a slice of masks. 3. `new_masks = masks[vector]`, where vector is a torch.BoolTensor with `length = len(masks)`. Nonzero elements in the vector will be selected. Note that the returned object might share storage with this object, subject to Pytorch's indexing semantics. """ if isinstance(item, int): return BitMasks(self.tensor[item].unsqueeze(0)) m = self.tensor[item] assert m.dim() == 3, "Indexing on BitMasks with {} returns a tensor with shape {}!".format( item, m.shape ) return BitMasks(m) @torch.jit.unused def __iter__(self) -> torch.Tensor: yield from self.tensor @torch.jit.unused def __repr__(self) -> str: s = self.__class__.__name__ + "(" s += "num_instances={})".format(len(self.tensor)) return s def __len__(self) -> int: return self.tensor.shape[0] def nonempty(self) -> torch.Tensor: """ Find masks that are non-empty. Returns: Tensor: a BoolTensor which represents whether each mask is empty (False) or non-empty (True). """ return self.tensor.flatten(1).any(dim=1) @staticmethod def from_polygon_masks( polygon_masks: Union["PolygonMasks", List[List[np.ndarray]]], height: int, width: int ) -> "BitMasks": """ Args: polygon_masks (list[list[ndarray]] or PolygonMasks) height, width (int) """ if isinstance(polygon_masks, PolygonMasks): polygon_masks = polygon_masks.polygons masks = [polygons_to_bitmask(p, height, width) for p in polygon_masks] if len(masks): return BitMasks(torch.stack([torch.from_numpy(x) for x in masks])) else: return BitMasks(torch.empty(0, height, width, dtype=torch.bool)) @staticmethod def from_roi_masks(roi_masks: "ROIMasks", height: int, width: int) -> "BitMasks": """ Args: roi_masks: height, width (int): """ return roi_masks.to_bitmasks(height, width) def crop_and_resize(self, boxes: torch.Tensor, mask_size: int) -> torch.Tensor: """ Crop each bitmask by the given box, and resize results to (mask_size, mask_size). This can be used to prepare training targets for Mask R-CNN. It has less reconstruction error compared to rasterization with polygons. However we observe no difference in accuracy, but BitMasks requires more memory to store all the masks. Args: boxes (Tensor): Nx4 tensor storing the boxes for each mask mask_size (int): the size of the rasterized mask. Returns: Tensor: A bool tensor of shape (N, mask_size, mask_size), where N is the number of predicted boxes for this image. """ assert len(boxes) == len(self), "{} != {}".format(len(boxes), len(self)) device = self.tensor.device batch_inds = torch.arange(len(boxes), device=device).to(dtype=boxes.dtype)[:, None] rois = torch.cat([batch_inds, boxes], dim=1) # Nx5 bit_masks = self.tensor.to(dtype=torch.float32) rois = rois.to(device=device) output = ( ROIAlign((mask_size, mask_size), 1.0, 0, aligned=True) .forward(bit_masks[:, None, :, :], rois) .squeeze(1) ) output = output >= 0.5 return output def get_bounding_boxes(self) -> Boxes: """ Returns: Boxes: tight bounding boxes around bitmasks. If a mask is empty, it's bounding box will be all zero. """ boxes = torch.zeros(self.tensor.shape[0], 4, dtype=torch.float32) x_any = torch.any(self.tensor, dim=1) y_any = torch.any(self.tensor, dim=2) for idx in range(self.tensor.shape[0]): x = torch.where(x_any[idx, :])[0] y = torch.where(y_any[idx, :])[0] if len(x) > 0 and len(y) > 0: boxes[idx, :] = torch.as_tensor( [x[0], y[0], x[-1] + 1, y[-1] + 1], dtype=torch.float32 ) return Boxes(boxes) @staticmethod def cat(bitmasks_list: List["BitMasks"]) -> "BitMasks": """ Concatenates a list of BitMasks into a single BitMasks Arguments: bitmasks_list (list[BitMasks]) Returns: BitMasks: the concatenated BitMasks """ assert isinstance(bitmasks_list, (list, tuple)) assert len(bitmasks_list) > 0 assert all(isinstance(bitmask, BitMasks) for bitmask in bitmasks_list) cat_bitmasks = type(bitmasks_list[0])(torch.cat([bm.tensor for bm in bitmasks_list], dim=0)) return cat_bitmasks class PolygonMasks: """ This class stores the segmentation masks for all objects in one image, in the form of polygons. Attributes: polygons: list[list[ndarray]]. Each ndarray is a float64 vector representing a polygon. """ def __init__(self, polygons: List[List[Union[torch.Tensor, np.ndarray]]]): """ Arguments: polygons (list[list[np.ndarray]]): The first level of the list correspond to individual instances, the second level to all the polygons that compose the instance, and the third level to the polygon coordinates. The third level array should have the format of [x0, y0, x1, y1, ..., xn, yn] (n >= 3). """ if not isinstance(polygons, list): raise ValueError( "Cannot create PolygonMasks: Expect a list of list of polygons per image. " "Got '{}' instead.".format(type(polygons)) ) def _make_array(t: Union[torch.Tensor, np.ndarray]) -> np.ndarray: # Use float64 for higher precision, because why not? # Always put polygons on CPU (self.to is a no-op) since they # are supposed to be small tensors. # May need to change this assumption if GPU placement becomes useful if isinstance(t, torch.Tensor): t = t.cpu().numpy() return np.asarray(t).astype("float64") def process_polygons( polygons_per_instance: List[Union[torch.Tensor, np.ndarray]] ) -> List[np.ndarray]: if not isinstance(polygons_per_instance, list): raise ValueError( "Cannot create polygons: Expect a list of polygons per instance. " "Got '{}' instead.".format(type(polygons_per_instance)) ) # transform each polygon to a numpy array polygons_per_instance = [_make_array(p) for p in polygons_per_instance] for polygon in polygons_per_instance: if len(polygon) % 2 != 0 or len(polygon) < 6: raise ValueError(f"Cannot create a polygon from {len(polygon)} coordinates.") return polygons_per_instance self.polygons: List[List[np.ndarray]] = [ process_polygons(polygons_per_instance) for polygons_per_instance in polygons ] def to(self, *args: Any, **kwargs: Any) -> "PolygonMasks": return self @property def device(self) -> torch.device: return torch.device("cpu") def get_bounding_boxes(self) -> Boxes: """ Returns: Boxes: tight bounding boxes around polygon masks. """ boxes = torch.zeros(len(self.polygons), 4, dtype=torch.float32) for idx, polygons_per_instance in enumerate(self.polygons): minxy = torch.as_tensor([float("inf"), float("inf")], dtype=torch.float32) maxxy = torch.zeros(2, dtype=torch.float32) for polygon in polygons_per_instance: coords = torch.from_numpy(polygon).view(-1, 2).to(dtype=torch.float32) minxy = torch.min(minxy, torch.min(coords, dim=0).values) maxxy = torch.max(maxxy, torch.max(coords, dim=0).values) boxes[idx, :2] = minxy boxes[idx, 2:] = maxxy return Boxes(boxes) def nonempty(self) -> torch.Tensor: """ Find masks that are non-empty. Returns: Tensor: a BoolTensor which represents whether each mask is empty (False) or not (True). """ keep = [1 if len(polygon) > 0 else 0 for polygon in self.polygons] return torch.from_numpy(np.asarray(keep, dtype=np.bool)) def __getitem__(self, item: Union[int, slice, List[int], torch.BoolTensor]) -> "PolygonMasks": """ Support indexing over the instances and return a `PolygonMasks` object. `item` can be: 1. An integer. It will return an object with only one instance. 2. A slice. It will return an object with the selected instances. 3. A list[int]. It will return an object with the selected instances, correpsonding to the indices in the list. 4. A vector mask of type BoolTensor, whose length is num_instances. It will return an object with the instances whose mask is nonzero. """ if isinstance(item, int): selected_polygons = [self.polygons[item]] elif isinstance(item, slice): selected_polygons = self.polygons[item] elif isinstance(item, list): selected_polygons = [self.polygons[i] for i in item] elif isinstance(item, torch.Tensor): # Polygons is a list, so we have to move the indices back to CPU. if item.dtype == torch.bool: assert item.dim() == 1, item.shape item = item.nonzero().squeeze(1).cpu().numpy().tolist() elif item.dtype in [torch.int32, torch.int64]: item = item.cpu().numpy().tolist() else: raise ValueError("Unsupported tensor dtype={} for indexing!".format(item.dtype)) selected_polygons = [self.polygons[i] for i in item] return PolygonMasks(selected_polygons) def __iter__(self) -> Iterator[List[np.ndarray]]: """ Yields: list[ndarray]: the polygons for one instance. Each Tensor is a float64 vector representing a polygon. """ return iter(self.polygons) def __repr__(self) -> str: s = self.__class__.__name__ + "(" s += "num_instances={})".format(len(self.polygons)) return s def __len__(self) -> int: return len(self.polygons) def crop_and_resize(self, boxes: torch.Tensor, mask_size: int) -> torch.Tensor: """ Crop each mask by the given box, and resize results to (mask_size, mask_size). This can be used to prepare training targets for Mask R-CNN. Args: boxes (Tensor): Nx4 tensor storing the boxes for each mask mask_size (int): the size of the rasterized mask. Returns: Tensor: A bool tensor of shape (N, mask_size, mask_size), where N is the number of predicted boxes for this image. """ assert len(boxes) == len(self), "{} != {}".format(len(boxes), len(self)) device = boxes.device # Put boxes on the CPU, as the polygon representation is not efficient GPU-wise # (several small tensors for representing a single instance mask) boxes = boxes.to(torch.device("cpu")) results = [ rasterize_polygons_within_box(poly, box.numpy(), mask_size) for poly, box in zip(self.polygons, boxes) ] """ poly: list[list[float]], the polygons for one instance box: a tensor of shape (4,) """ if len(results) == 0: return torch.empty(0, mask_size, mask_size, dtype=torch.bool, device=device) return torch.stack(results, dim=0).to(device=device) def area(self): """ Computes area of the mask. Only works with Polygons, using the shoelace formula: https://stackoverflow.com/questions/24467972/calculate-area-of-polygon-given-x-y-coordinates Returns: Tensor: a vector, area for each instance """ area = [] for polygons_per_instance in self.polygons: area_per_instance = 0 for p in polygons_per_instance: area_per_instance += polygon_area(p[0::2], p[1::2]) area.append(area_per_instance) return torch.tensor(area) @staticmethod def cat(polymasks_list: List["PolygonMasks"]) -> "PolygonMasks": """ Concatenates a list of PolygonMasks into a single PolygonMasks Arguments: polymasks_list (list[PolygonMasks]) Returns: PolygonMasks: the concatenated PolygonMasks """ assert isinstance(polymasks_list, (list, tuple)) assert len(polymasks_list) > 0 assert all(isinstance(polymask, PolygonMasks) for polymask in polymasks_list) cat_polymasks = type(polymasks_list[0])( list(itertools.chain.from_iterable(pm.polygons for pm in polymasks_list)) ) return cat_polymasks class ROIMasks: """ Represent masks by N smaller masks defined in some ROIs. Once ROI boxes are given, full-image bitmask can be obtained by "pasting" the mask on the region defined by the corresponding ROI box. """ def __init__(self, tensor: torch.Tensor): """ Args: tensor: (N, M, M) mask tensor that defines the mask within each ROI. """ if tensor.dim() != 3: raise ValueError("ROIMasks must take a masks of 3 dimension.") self.tensor = tensor def to(self, device: torch.device) -> "ROIMasks": return ROIMasks(self.tensor.to(device)) @property def device(self) -> device: return self.tensor.device def __len__(self): return self.tensor.shape[0] def __getitem__(self, item) -> "ROIMasks": """ Returns: ROIMasks: Create a new :class:`ROIMasks` by indexing. The following usage are allowed: 1. `new_masks = masks[2:10]`: return a slice of masks. 2. `new_masks = masks[vector]`, where vector is a torch.BoolTensor with `length = len(masks)`. Nonzero elements in the vector will be selected. Note that the returned object might share storage with this object, subject to Pytorch's indexing semantics. """ t = self.tensor[item] if t.dim() != 3: raise ValueError( f"Indexing on ROIMasks with {item} returns a tensor with shape {t.shape}!" ) return ROIMasks(t) @torch.jit.unused def __repr__(self) -> str: s = self.__class__.__name__ + "(" s += "num_instances={})".format(len(self.tensor)) return s @torch.jit.unused def to_bitmasks(self, boxes: torch.Tensor, height, width, threshold=0.5): """ Args: see documentation of :func:`paste_masks_in_image`. """ from detectron2.layers.mask_ops import paste_masks_in_image, _paste_masks_tensor_shape if torch.jit.is_tracing(): if isinstance(height, torch.Tensor): paste_func = _paste_masks_tensor_shape else: paste_func = paste_masks_in_image else: paste_func = retry_if_cuda_oom(paste_masks_in_image) bitmasks = paste_func(self.tensor, boxes.tensor, (height, width), threshold=threshold) return BitMasks(bitmasks) ================================================ FILE: detectron2/structures/rotated_boxes.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from typing import Iterator, List, Union import torch from detectron2.layers import cat from detectron2.layers.rotated_boxes import pairwise_iou_rotated from .boxes import Boxes class RotatedBoxes(Boxes): """ This structure stores a list of rotated boxes as a Nx5 torch.Tensor. It supports some common methods about boxes (`area`, `clip`, `nonempty`, etc), and also behaves like a Tensor (support indexing, `to(device)`, `.device`, and iteration over all boxes) """ def __init__(self, tensor: torch.Tensor): """ Args: tensor (Tensor[float]): a Nx5 matrix. Each row is (x_center, y_center, width, height, angle), in which angle is represented in degrees. While there's no strict range restriction for it, the recommended principal range is between (-180, 180] degrees. Assume we have a horizontal box B = (x_center, y_center, width, height), where width is along the x-axis and height is along the y-axis. The rotated box B_rot (x_center, y_center, width, height, angle) can be seen as: 1. When angle == 0: B_rot == B 2. When angle > 0: B_rot is obtained by rotating B w.r.t its center by :math:`|angle|` degrees CCW; 3. When angle < 0: B_rot is obtained by rotating B w.r.t its center by :math:`|angle|` degrees CW. Mathematically, since the right-handed coordinate system for image space is (y, x), where y is top->down and x is left->right, the 4 vertices of the rotated rectangle :math:`(yr_i, xr_i)` (i = 1, 2, 3, 4) can be obtained from the vertices of the horizontal rectangle (y_i, x_i) (i = 1, 2, 3, 4) in the following way (:math:`\\theta = angle*\\pi/180` is the angle in radians, (y_c, x_c) is the center of the rectangle): .. math:: yr_i = \\cos(\\theta) (y_i - y_c) - \\sin(\\theta) (x_i - x_c) + y_c, xr_i = \\sin(\\theta) (y_i - y_c) + \\cos(\\theta) (x_i - x_c) + x_c, which is the standard rigid-body rotation transformation. Intuitively, the angle is (1) the rotation angle from y-axis in image space to the height vector (top->down in the box's local coordinate system) of the box in CCW, and (2) the rotation angle from x-axis in image space to the width vector (left->right in the box's local coordinate system) of the box in CCW. More intuitively, consider the following horizontal box ABCD represented in (x1, y1, x2, y2): (3, 2, 7, 4), covering the [3, 7] x [2, 4] region of the continuous coordinate system which looks like this: .. code:: none O--------> x | | A---B | | | | D---C | v y Note that each capital letter represents one 0-dimensional geometric point instead of a 'square pixel' here. In the example above, using (x, y) to represent a point we have: .. math:: O = (0, 0), A = (3, 2), B = (7, 2), C = (7, 4), D = (3, 4) We name vector AB = vector DC as the width vector in box's local coordinate system, and vector AD = vector BC as the height vector in box's local coordinate system. Initially, when angle = 0 degree, they're aligned with the positive directions of x-axis and y-axis in the image space, respectively. For better illustration, we denote the center of the box as E, .. code:: none O--------> x | | A---B | | E | | D---C | v y where the center E = ((3+7)/2, (2+4)/2) = (5, 3). Also, .. math:: width = |AB| = |CD| = 7 - 3 = 4, height = |AD| = |BC| = 4 - 2 = 2. Therefore, the corresponding representation for the same shape in rotated box in (x_center, y_center, width, height, angle) format is: (5, 3, 4, 2, 0), Now, let's consider (5, 3, 4, 2, 90), which is rotated by 90 degrees CCW (counter-clockwise) by definition. It looks like this: .. code:: none O--------> x | B-C | | | | |E| | | | | A-D v y The center E is still located at the same point (5, 3), while the vertices ABCD are rotated by 90 degrees CCW with regard to E: A = (4, 5), B = (4, 1), C = (6, 1), D = (6, 5) Here, 90 degrees can be seen as the CCW angle to rotate from y-axis to vector AD or vector BC (the top->down height vector in box's local coordinate system), or the CCW angle to rotate from x-axis to vector AB or vector DC (the left->right width vector in box's local coordinate system). .. math:: width = |AB| = |CD| = 5 - 1 = 4, height = |AD| = |BC| = 6 - 4 = 2. Next, how about (5, 3, 4, 2, -90), which is rotated by 90 degrees CW (clockwise) by definition? It looks like this: .. code:: none O--------> x | D-A | | | | |E| | | | | C-B v y The center E is still located at the same point (5, 3), while the vertices ABCD are rotated by 90 degrees CW with regard to E: A = (6, 1), B = (6, 5), C = (4, 5), D = (4, 1) .. math:: width = |AB| = |CD| = 5 - 1 = 4, height = |AD| = |BC| = 6 - 4 = 2. This covers exactly the same region as (5, 3, 4, 2, 90) does, and their IoU will be 1. However, these two will generate different RoI Pooling results and should not be treated as an identical box. On the other hand, it's easy to see that (X, Y, W, H, A) is identical to (X, Y, W, H, A+360N), for any integer N. For example (5, 3, 4, 2, 270) would be identical to (5, 3, 4, 2, -90), because rotating the shape 270 degrees CCW is equivalent to rotating the same shape 90 degrees CW. We could rotate further to get (5, 3, 4, 2, 180), or (5, 3, 4, 2, -180): .. code:: none O--------> x | | C---D | | E | | B---A | v y .. math:: A = (7, 4), B = (3, 4), C = (3, 2), D = (7, 2), width = |AB| = |CD| = 7 - 3 = 4, height = |AD| = |BC| = 4 - 2 = 2. Finally, this is a very inaccurate (heavily quantized) illustration of how (5, 3, 4, 2, 60) looks like in case anyone wonders: .. code:: none O--------> x | B\ | / C | /E / | A / | `D v y It's still a rectangle with center of (5, 3), width of 4 and height of 2, but its angle (and thus orientation) is somewhere between (5, 3, 4, 2, 0) and (5, 3, 4, 2, 90). """ device = tensor.device if isinstance(tensor, torch.Tensor) else torch.device("cpu") tensor = torch.as_tensor(tensor, dtype=torch.float32, device=device) if tensor.numel() == 0: tensor = torch.zeros(0, 5, dtype=torch.float32, device=device) assert tensor.dim() == 2 and tensor.size(-1) == 5, tensor.size() self.tensor = tensor def clone(self) -> "RotatedBoxes": """ Clone the RotatedBoxes. Returns: RotatedBoxes """ return RotatedBoxes(self.tensor.clone()) def to(self, device: str) -> "RotatedBoxes": return RotatedBoxes(self.tensor.to(device)) def area(self) -> torch.Tensor: """ Computes the area of all the boxes. Returns: torch.Tensor: a vector with areas of each box. """ box = self.tensor area = box[:, 2] * box[:, 3] return area def normalize_angles(self) -> None: """ Restrict angles to the range of (-180, 180] degrees """ self.tensor[:, 4] = self.tensor[:, 4] % 360 self.tensor[:, 4][torch.where(self.tensor[:, 4] > 180)] -= 360 def clip(self, box_size: Boxes.BoxSizeType, clip_angle_threshold: float = 1.0) -> None: """ Clip (in place) the boxes by limiting x coordinates to the range [0, width] and y coordinates to the range [0, height]. For RRPN: Only clip boxes that are almost horizontal with a tolerance of clip_angle_threshold to maintain backward compatibility. Rotated boxes beyond this threshold are not clipped for two reasons: 1. There are potentially multiple ways to clip a rotated box to make it fit within the image. 2. It's tricky to make the entire rectangular box fit within the image and still be able to not leave out pixels of interest. Therefore we rely on ops like RoIAlignRotated to safely handle this. Args: box_size (height, width): The clipping box's size. clip_angle_threshold: Iff. abs(normalized(angle)) <= clip_angle_threshold (in degrees), we do the clipping as horizontal boxes. """ h, w = box_size # normalize angles to be within (-180, 180] degrees self.normalize_angles() idx = torch.where(torch.abs(self.tensor[:, 4]) <= clip_angle_threshold)[0] # convert to (x1, y1, x2, y2) x1 = self.tensor[idx, 0] - self.tensor[idx, 2] / 2.0 y1 = self.tensor[idx, 1] - self.tensor[idx, 3] / 2.0 x2 = self.tensor[idx, 0] + self.tensor[idx, 2] / 2.0 y2 = self.tensor[idx, 1] + self.tensor[idx, 3] / 2.0 # clip x1.clamp_(min=0, max=w) y1.clamp_(min=0, max=h) x2.clamp_(min=0, max=w) y2.clamp_(min=0, max=h) # convert back to (xc, yc, w, h) self.tensor[idx, 0] = (x1 + x2) / 2.0 self.tensor[idx, 1] = (y1 + y2) / 2.0 # make sure widths and heights do not increase due to numerical errors self.tensor[idx, 2] = torch.min(self.tensor[idx, 2], x2 - x1) self.tensor[idx, 3] = torch.min(self.tensor[idx, 3], y2 - y1) def nonempty(self, threshold: int = 0) -> torch.Tensor: """ Find boxes that are non-empty. A box is considered empty, if either of its side is no larger than threshold. Returns: Tensor: a binary vector which represents whether each box is empty (False) or non-empty (True). """ box = self.tensor widths = box[:, 2] heights = box[:, 3] keep = (widths > threshold) & (heights > threshold) return keep def __getitem__(self, item: Union[int, slice, torch.BoolTensor]) -> "RotatedBoxes": """ Returns: RotatedBoxes: Create a new :class:`RotatedBoxes` by indexing. The following usage are allowed: 1. `new_boxes = boxes[3]`: return a `RotatedBoxes` which contains only one box. 2. `new_boxes = boxes[2:10]`: return a slice of boxes. 3. `new_boxes = boxes[vector]`, where vector is a torch.ByteTensor with `length = len(boxes)`. Nonzero elements in the vector will be selected. Note that the returned RotatedBoxes might share storage with this RotatedBoxes, subject to Pytorch's indexing semantics. """ if isinstance(item, int): return RotatedBoxes(self.tensor[item].view(1, -1)) b = self.tensor[item] assert b.dim() == 2, "Indexing on RotatedBoxes with {} failed to return a matrix!".format( item ) return RotatedBoxes(b) def __len__(self) -> int: return self.tensor.shape[0] def __repr__(self) -> str: return "RotatedBoxes(" + str(self.tensor) + ")" def inside_box(self, box_size: Boxes.BoxSizeType, boundary_threshold: int = 0) -> torch.Tensor: """ Args: box_size (height, width): Size of the reference box covering [0, width] x [0, height] boundary_threshold (int): Boxes that extend beyond the reference box boundary by more than boundary_threshold are considered "outside". For RRPN, it might not be necessary to call this function since it's common for rotated box to extend to outside of the image boundaries (the clip function only clips the near-horizontal boxes) Returns: a binary vector, indicating whether each box is inside the reference box. """ height, width = box_size cnt_x = self.tensor[..., 0] cnt_y = self.tensor[..., 1] half_w = self.tensor[..., 2] / 2.0 half_h = self.tensor[..., 3] / 2.0 a = self.tensor[..., 4] c = torch.abs(torch.cos(a * torch.pi / 180.0)) s = torch.abs(torch.sin(a * torch.pi / 180.0)) # This basically computes the horizontal bounding rectangle of the rotated box max_rect_dx = c * half_w + s * half_h max_rect_dy = c * half_h + s * half_w inds_inside = ( (cnt_x - max_rect_dx >= -boundary_threshold) & (cnt_y - max_rect_dy >= -boundary_threshold) & (cnt_x + max_rect_dx < width + boundary_threshold) & (cnt_y + max_rect_dy < height + boundary_threshold) ) return inds_inside def get_centers(self) -> torch.Tensor: """ Returns: The box centers in a Nx2 array of (x, y). """ return self.tensor[:, :2] @staticmethod def cat(boxes_list: List["RotatedBoxes"]) -> "RotatedBoxes": # type: ignore """ Concatenates a list of RotatedBoxes into a single RotatedBoxes Arguments: boxes_list (list[RotatedBoxes]) Returns: RotatedBoxes: the concatenated RotatedBoxes """ assert isinstance(boxes_list, (list, tuple)) assert len(boxes_list) > 0 assert all(isinstance(box, RotatedBoxes) for box in boxes_list) cat_boxes = type(boxes_list[0])(cat([b.tensor for b in boxes_list], dim=0)) return cat_boxes @property def device(self) -> str: return self.tensor.device def __iter__(self) -> Iterator[torch.Tensor]: """ Yield a box as a Tensor of shape (5,) at a time. """ yield from self.tensor def pairwise_iou(boxes1: RotatedBoxes, boxes2: RotatedBoxes) -> None: """ Given two lists of rotated boxes of size N and M, compute the IoU (intersection over union) between __all__ N x M pairs of boxes. The box order must be (x_center, y_center, width, height, angle). Args: boxes1, boxes2 (RotatedBoxes): two `RotatedBoxes`. Contains N & M rotated boxes, respectively. Returns: Tensor: IoU, sized [N,M]. """ return pairwise_iou_rotated(boxes1.tensor, boxes2.tensor) ================================================ FILE: detectron2/utils/README.md ================================================ # Utility functions This folder contain utility functions that are not used in the core library, but are useful for building models or training code using the config system. ================================================ FILE: detectron2/utils/__init__.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved ================================================ FILE: detectron2/utils/collect_env.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import os import sys from collections import defaultdict import PIL import torch from tabulate import tabulate __all__ = ["collect_env_info"] def collect_torch_env(): try: import torch.__config__ return torch.__config__.show() except ImportError: # compatible with older versions of pytorch from torch.utils.collect_env import get_pretty_env_info return get_pretty_env_info() def get_env_module(): var_name = "DETECTRON2_ENV_MODULE" return var_name, os.environ.get(var_name, "") def collect_env_info(): data = [] data.append(("Python", sys.version.replace("\n", ""))) try: from detectron2 import _C except ImportError: pass else: data.append(("Detectron2 Compiler", _C.get_compiler_version())) data.append(get_env_module()) data.append(("PyTorch", torch.__version__)) data.append(("PyTorch Debug Build", torch.version.debug)) has_cuda = torch.cuda.is_available() data.append(("CUDA available", has_cuda)) if has_cuda: devices = defaultdict(list) for k in range(torch.cuda.device_count()): devices[torch.cuda.get_device_name(k)].append(str(k)) for name, devids in devices.items(): data.append(("GPU " + ",".join(devids), name)) data.append(("Pillow", PIL.__version__)) try: import cv2 data.append(("cv2", cv2.__version__)) except ImportError: pass env_str = tabulate(data) + "\n" env_str += collect_torch_env() return env_str if __name__ == "__main__": print(collect_env_info()) ================================================ FILE: detectron2/utils/colormap.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. """ An awesome colormap for really neat visualizations. Copied from Detectron, and removed gray colors. """ import numpy as np __all__ = ["colormap", "random_color"] # fmt: off # RGB: _COLORS = np.array( [ 0.125, 0.212, 0.263, 0.816, 0.314, 0.365, 0.224, 0.082, 0.443, 0.494, 0.184, 0.556, 0.466, 0.674, 0.188, 0.301, 0.745, 0.933, 0.635, 0.078, 0.184, 0.300, 0.300, 0.300, 0.600, 0.600, 0.600, 1.000, 0.000, 0.000, 1.000, 0.500, 0.000, 0.749, 0.749, 0.000, 0.000, 1.000, 0.000, 0.000, 0.000, 1.000, 0.667, 0.000, 1.000, 0.333, 0.333, 0.000, 0.333, 0.667, 0.000, 0.333, 1.000, 0.000, 0.667, 0.333, 0.000, 0.667, 0.667, 0.000, 0.667, 1.000, 0.000, 1.000, 0.333, 0.000, 1.000, 0.667, 0.000, 1.000, 1.000, 0.000, 0.000, 0.333, 0.500, 0.000, 0.667, 0.500, 0.000, 1.000, 0.500, 0.333, 0.000, 0.500, 0.333, 0.333, 0.500, 0.333, 0.667, 0.500, 0.333, 1.000, 0.500, 0.667, 0.000, 0.500, 0.667, 0.333, 0.500, 0.667, 0.667, 0.500, 0.667, 1.000, 0.500, 1.000, 0.000, 0.500, 1.000, 0.333, 0.500, 1.000, 0.667, 0.500, 1.000, 1.000, 0.500, 0.000, 0.333, 1.000, 0.000, 0.667, 1.000, 0.000, 1.000, 1.000, 0.333, 0.000, 1.000, 0.333, 0.333, 1.000, 0.333, 0.667, 1.000, 0.333, 1.000, 1.000, 0.667, 0.000, 1.000, 0.667, 0.333, 1.000, 0.667, 0.667, 1.000, 0.667, 1.000, 1.000, 1.000, 0.000, 1.000, 1.000, 0.333, 1.000, 1.000, 0.667, 1.000, 0.333, 0.000, 0.000, 0.500, 0.000, 0.000, 0.667, 0.000, 0.000, 0.833, 0.000, 0.000, 1.000, 0.000, 0.000, 0.000, 0.167, 0.000, 0.000, 0.333, 0.000, 0.000, 0.500, 0.000, 0.000, 0.667, 0.000, 0.000, 0.833, 0.000, 0.000, 1.000, 0.000, 0.000, 0.000, 0.167, 0.000, 0.000, 0.333, 0.000, 0.000, 0.500, 0.000, 0.000, 0.667, 0.000, 0.000, 0.833, 0.000, 0.000, 1.000, 0.000, 0.000, 0.000, 0.143, 0.143, 0.143, 0.857, 0.857, 0.857, 1.000, 1.000, 1.000 ] ).astype(np.float32).reshape(-1, 3) # fmt: on def colormap(rgb=False, maximum=255): """ Args: rgb (bool): whether to return RGB colors or BGR colors. maximum (int): either 255 or 1 Returns: ndarray: a float32 array of Nx3 colors, in range [0, 255] or [0, 1] """ assert maximum in [255, 1], maximum c = _COLORS * maximum if not rgb: c = c[:, ::-1] return c def random_color(rgb=False, maximum=255): """ Args: rgb (bool): whether to return RGB colors or BGR colors. maximum (int): either 255 or 1 Returns: ndarray: a vector of 3 numbers """ idx = np.random.randint(0, len(_COLORS)) ret = _COLORS[idx] * maximum if not rgb: ret = ret[::-1] return ret if __name__ == "__main__": import cv2 size = 100 H, W = 10, 10 canvas = np.random.rand(H * size, W * size, 3).astype("float32") for h in range(H): for w in range(W): idx = h * W + w if idx >= len(_COLORS): break canvas[h * size : (h + 1) * size, w * size : (w + 1) * size] = _COLORS[idx] cv2.imshow("a", canvas) cv2.waitKey(0) ================================================ FILE: detectron2/utils/comm.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ This file contains primitives for multi-gpu communication. This is useful when doing distributed training. """ import functools import logging import numpy as np import pickle import torch import torch.distributed as dist _LOCAL_PROCESS_GROUP = None """ A torch process group which only includes processes that on the same machine as the current process. This variable is set when processes are spawned by `launch()` in "engine/launch.py". """ def get_world_size() -> int: if not dist.is_available(): return 1 if not dist.is_initialized(): return 1 return dist.get_world_size() def get_rank() -> int: if not dist.is_available(): return 0 if not dist.is_initialized(): return 0 return dist.get_rank() def get_local_rank() -> int: """ Returns: The rank of the current process within the local (per-machine) process group. """ if not dist.is_available(): return 0 if not dist.is_initialized(): return 0 assert _LOCAL_PROCESS_GROUP is not None return dist.get_rank(group=_LOCAL_PROCESS_GROUP) def get_local_size() -> int: """ Returns: The size of the per-machine process group, i.e. the number of processes per machine. """ if not dist.is_available(): return 1 if not dist.is_initialized(): return 1 return dist.get_world_size(group=_LOCAL_PROCESS_GROUP) def is_main_process() -> bool: return get_rank() == 0 def synchronize(): """ Helper function to synchronize (barrier) among all processes when using distributed training """ if not dist.is_available(): return if not dist.is_initialized(): return world_size = dist.get_world_size() if world_size == 1: return dist.barrier() @functools.lru_cache() def _get_global_gloo_group(): """ Return a process group based on gloo backend, containing all the ranks The result is cached. """ if dist.get_backend() == "nccl": return dist.new_group(backend="gloo") else: return dist.group.WORLD def _serialize_to_tensor(data, group): backend = dist.get_backend(group) assert backend in ["gloo", "nccl"] device = torch.device("cpu" if backend == "gloo" else "cuda") buffer = pickle.dumps(data) if len(buffer) > 1024 ** 3: logger = logging.getLogger(__name__) logger.warning( "Rank {} trying to all-gather {:.2f} GB of data on device {}".format( get_rank(), len(buffer) / (1024 ** 3), device ) ) storage = torch.ByteStorage.from_buffer(buffer) tensor = torch.ByteTensor(storage).to(device=device) return tensor def _pad_to_largest_tensor(tensor, group): """ Returns: list[int]: size of the tensor, on each rank Tensor: padded tensor that has the max size """ world_size = dist.get_world_size(group=group) assert ( world_size >= 1 ), "comm.gather/all_gather must be called from ranks within the given group!" local_size = torch.tensor([tensor.numel()], dtype=torch.int64, device=tensor.device) size_list = [ torch.zeros([1], dtype=torch.int64, device=tensor.device) for _ in range(world_size) ] dist.all_gather(size_list, local_size, group=group) size_list = [int(size.item()) for size in size_list] max_size = max(size_list) # we pad the tensor because torch all_gather does not support # gathering tensors of different shapes if local_size != max_size: padding = torch.zeros((max_size - local_size,), dtype=torch.uint8, device=tensor.device) tensor = torch.cat((tensor, padding), dim=0) return size_list, tensor def all_gather(data, group=None): """ Run all_gather on arbitrary picklable data (not necessarily tensors). Args: data: any picklable object group: a torch process group. By default, will use a group which contains all ranks on gloo backend. Returns: list[data]: list of data gathered from each rank """ if get_world_size() == 1: return [data] if group is None: group = _get_global_gloo_group() if dist.get_world_size(group) == 1: return [data] tensor = _serialize_to_tensor(data, group) size_list, tensor = _pad_to_largest_tensor(tensor, group) max_size = max(size_list) # receiving Tensor from all ranks tensor_list = [ torch.empty((max_size,), dtype=torch.uint8, device=tensor.device) for _ in size_list ] dist.all_gather(tensor_list, tensor, group=group) data_list = [] for size, tensor in zip(size_list, tensor_list): buffer = tensor.cpu().numpy().tobytes()[:size] data_list.append(pickle.loads(buffer)) return data_list def gather(data, dst=0, group=None): """ Run gather on arbitrary picklable data (not necessarily tensors). Args: data: any picklable object dst (int): destination rank group: a torch process group. By default, will use a group which contains all ranks on gloo backend. Returns: list[data]: on dst, a list of data gathered from each rank. Otherwise, an empty list. """ if get_world_size() == 1: return [data] if group is None: group = _get_global_gloo_group() if dist.get_world_size(group=group) == 1: return [data] rank = dist.get_rank(group=group) tensor = _serialize_to_tensor(data, group) size_list, tensor = _pad_to_largest_tensor(tensor, group) # receiving Tensor from all ranks if rank == dst: max_size = max(size_list) tensor_list = [ torch.empty((max_size,), dtype=torch.uint8, device=tensor.device) for _ in size_list ] dist.gather(tensor, tensor_list, dst=dst, group=group) data_list = [] for size, tensor in zip(size_list, tensor_list): buffer = tensor.cpu().numpy().tobytes()[:size] data_list.append(pickle.loads(buffer)) return data_list else: dist.gather(tensor, [], dst=dst, group=group) return [] def shared_random_seed(): """ Returns: int: a random number that is the same across all workers. If workers need a shared RNG, they can use this shared seed to create one. All workers must call this function, otherwise it will deadlock. """ ints = np.random.randint(2 ** 31) all_ints = all_gather(ints) return all_ints[0] def reduce_dict(input_dict, average=True): """ Reduce the values in the dictionary from all processes so that process with rank 0 has the reduced results. Args: input_dict (dict): inputs to be reduced. All the values must be scalar CUDA Tensor. average (bool): whether to do average or sum Returns: a dict with the same keys as input_dict, after reduction. """ world_size = get_world_size() if world_size < 2: return input_dict with torch.no_grad(): names = [] values = [] # sort the keys so that they are consistent across processes for k in sorted(input_dict.keys()): names.append(k) values.append(input_dict[k]) values = torch.stack(values, dim=0) dist.reduce(values, dst=0) if dist.get_rank() == 0 and average: # only main process gets accumulated, so only divide by # world_size in this case values /= world_size reduced_dict = {k: v for k, v in zip(names, values)} return reduced_dict ================================================ FILE: detectron2/utils/develop.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. """ Utilities for developers only. These are not visible to users (not automatically imported). And should not appeared in docs.""" # adapted from https://github.com/tensorpack/tensorpack/blob/master/tensorpack/utils/develop.py def create_dummy_class(klass, dependency, message=""): """ When a dependency of a class is not available, create a dummy class which throws ImportError when used. Args: klass (str): name of the class. dependency (str): name of the dependency. message: extra message to print Returns: class: a class object """ err = "Cannot import '{}', therefore '{}' is not available.".format(dependency, klass) if message: err = err + " " + message class _DummyMetaClass(type): # throw error on class attribute access def __getattr__(_, __): # noqa: B902 raise ImportError(err) class _Dummy(object, metaclass=_DummyMetaClass): # throw error on constructor def __init__(self, *args, **kwargs): raise ImportError(err) return _Dummy def create_dummy_func(func, dependency, message=""): """ When a dependency of a function is not available, create a dummy function which throws ImportError when used. Args: func (str): name of the function. dependency (str or list[str]): name(s) of the dependency. message: extra message to print Returns: function: a function object """ err = "Cannot import '{}', therefore '{}' is not available.".format(dependency, func) if message: err = err + " " + message if isinstance(dependency, (list, tuple)): dependency = ",".join(dependency) def _dummy(*args, **kwargs): raise ImportError(err) return _dummy ================================================ FILE: detectron2/utils/env.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. import importlib import importlib.util import logging import numpy as np import os import random import sys from datetime import datetime import torch __all__ = ["seed_all_rng"] TORCH_VERSION = tuple(int(x) for x in torch.__version__.split(".")[:2]) """ PyTorch version as a tuple of 2 ints. Useful for comparison. """ DOC_BUILDING = os.getenv("_DOC_BUILDING", False) # set in docs/conf.py """ Whether we're building documentation. """ def seed_all_rng(seed=None): """ Set the random seed for the RNG in torch, numpy and python. Args: seed (int): if None, will use a strong random seed. """ if seed is None: seed = ( os.getpid() + int(datetime.now().strftime("%S%f")) + int.from_bytes(os.urandom(2), "big") ) logger = logging.getLogger(__name__) logger.info("Using a generated random seed {}".format(seed)) np.random.seed(seed) torch.manual_seed(seed) random.seed(seed) os.environ["PYTHONHASHSEED"] = str(seed) # from https://stackoverflow.com/questions/67631/how-to-import-a-module-given-the-full-path def _import_file(module_name, file_path, make_importable=False): spec = importlib.util.spec_from_file_location(module_name, file_path) module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module) if make_importable: sys.modules[module_name] = module return module def _configure_libraries(): """ Configurations for some libraries. """ # An environment option to disable `import cv2` globally, # in case it leads to negative performance impact disable_cv2 = int(os.environ.get("DETECTRON2_DISABLE_CV2", False)) if disable_cv2: sys.modules["cv2"] = None else: # Disable opencl in opencv since its interaction with cuda often has negative effects # This envvar is supported after OpenCV 3.4.0 os.environ["OPENCV_OPENCL_RUNTIME"] = "disabled" try: import cv2 if int(cv2.__version__.split(".")[0]) >= 3: cv2.ocl.setUseOpenCL(False) except ModuleNotFoundError: # Other types of ImportError, if happened, should not be ignored. # Because a failed opencv import could mess up address space # https://github.com/skvark/opencv-python/issues/381 pass def get_version(module, digit=2): return tuple(map(int, module.__version__.split(".")[:digit])) # fmt: off assert get_version(torch) >= (1, 4), "Requires torch>=1.4" import fvcore assert get_version(fvcore, 3) >= (0, 1, 2), "Requires fvcore>=0.1.2" import yaml assert get_version(yaml) >= (5, 1), "Requires pyyaml>=5.1" # fmt: on _ENV_SETUP_DONE = False def setup_environment(): """Perform environment setup work. The default setup is a no-op, but this function allows the user to specify a Python source file or a module in the $DETECTRON2_ENV_MODULE environment variable, that performs custom setup work that may be necessary to their computing environment. """ global _ENV_SETUP_DONE if _ENV_SETUP_DONE: return _ENV_SETUP_DONE = True _configure_libraries() custom_module_path = os.environ.get("DETECTRON2_ENV_MODULE") if custom_module_path: setup_custom_environment(custom_module_path) else: # The default setup is a no-op pass def setup_custom_environment(custom_module): """ Load custom environment setup by importing a Python source file or a module, and run the setup function. """ if custom_module.endswith(".py"): module = _import_file("detectron2.utils.env.custom_module", custom_module) else: module = importlib.import_module(custom_module) assert hasattr(module, "setup_environment") and callable(module.setup_environment), ( "Custom environment module defined in {} does not have the " "required callable attribute 'setup_environment'." ).format(custom_module) module.setup_environment() def fixup_module_metadata(module_name, namespace, keys=None): """ Fix the __qualname__ of module members to be their exported api name, so when they are referenced in docs, sphinx can find them. Reference: https://github.com/python-trio/trio/blob/6754c74eacfad9cc5c92d5c24727a2f3b620624e/trio/_util.py#L216-L241 """ if not DOC_BUILDING: return seen_ids = set() def fix_one(qualname, name, obj): # avoid infinite recursion (relevant when using # typing.Generic, for example) if id(obj) in seen_ids: return seen_ids.add(id(obj)) mod = getattr(obj, "__module__", None) if mod is not None and (mod.startswith(module_name) or mod.startswith("fvcore.")): obj.__module__ = module_name # Modules, unlike everything else in Python, put fully-qualitied # names into their __name__ attribute. We check for "." to avoid # rewriting these. if hasattr(obj, "__name__") and "." not in obj.__name__: obj.__name__ = name obj.__qualname__ = qualname if isinstance(obj, type): for attr_name, attr_value in obj.__dict__.items(): fix_one(objname + "." + attr_name, attr_name, attr_value) if keys is None: keys = namespace.keys() for objname in keys: if not objname.startswith("_"): obj = namespace[objname] fix_one(objname, objname, obj) ================================================ FILE: detectron2/utils/events.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import datetime import json import logging import os from collections import defaultdict from contextlib import contextmanager import torch from fvcore.common.file_io import PathManager from fvcore.common.history_buffer import HistoryBuffer _CURRENT_STORAGE_STACK = [] def get_event_storage(): assert len( _CURRENT_STORAGE_STACK ), "get_event_storage() has to be called inside a 'with EventStorage(...)' context!" return _CURRENT_STORAGE_STACK[-1] class JSONWriter: """ Write scalars to a json file. It saves scalars as one json per line (instead of a big json) for easy parsing. Examples parsing such a json file: .. code-block:: none $ cat metrics.json | jq -s '.[0:2]' [ { "data_time": 0.008433341979980469, "iteration": 20, "loss": 1.9228371381759644, "loss_box_reg": 0.050025828182697296, "loss_classifier": 0.5316952466964722, "loss_mask": 0.7236229181289673, "loss_rpn_box": 0.0856662318110466, "loss_rpn_cls": 0.48198649287223816, "lr": 0.007173333333333333, "time": 0.25401854515075684 }, { "data_time": 0.007216215133666992, "iteration": 40, "loss": 1.282649278640747, "loss_box_reg": 0.06222952902317047, "loss_classifier": 0.30682939291000366, "loss_mask": 0.6970193982124329, "loss_rpn_box": 0.038663312792778015, "loss_rpn_cls": 0.1471673548221588, "lr": 0.007706666666666667, "time": 0.2490077018737793 } ] $ cat metrics.json | jq '.loss_mask' 0.7126231789588928 0.689423680305481 0.6776131987571716 ... """ def __init__(self, json_file, window_size=20): """ Args: json_file (str): path to the json file. New data will be appended if the file exists. window_size (int): the window size of median smoothing for the scalars whose `smoothing_hint` are True. """ self._file_handle = PathManager.open(json_file, "a") self._window_size = window_size def write(self): storage = get_event_storage() to_save = {"iteration": storage.iter} to_save.update(storage.latest_with_smoothing_hint(self._window_size)) self._file_handle.write(json.dumps(to_save, sort_keys=True) + "\n") self._file_handle.flush() try: os.fsync(self._file_handle.fileno()) except AttributeError: pass def __del__(self): # not guaranteed to be called at exit, but probably fine self._file_handle.close() class TensorboardXWriter: """ Write all scalars to a tensorboard file. """ def __init__(self, log_dir: str, window_size: int = 20, **kwargs): """ Args: log_dir (str): The directory to save the output events window_size (int): the scalars will be median-smoothed by this window size kwargs: other arguments passed to `torch.utils.tensorboard.SummaryWriter(...)` """ self._window_size = window_size from torch.utils.tensorboard import SummaryWriter self._writer = SummaryWriter(log_dir, **kwargs) def write(self): storage = get_event_storage() for k, v in storage.latest_with_smoothing_hint(self._window_size).items(): self._writer.add_scalar(k, v, storage.iter) def __del__(self): if hasattr(self, "_writer"): # doesn't exist when the code fails at import self._writer.close() class CommonMetricPrinter: """ Print __common__ metrics to the terminal, including iteration time, ETA, memory, all losses, and the learning rate. To print something different, please implement a similar printer by yourself. """ def __init__(self, max_iter): """ Args: max_iter (int): the maximum number of iterations to train. Used to compute ETA. """ self.logger = logging.getLogger(__name__) self._max_iter = max_iter def write(self): storage = get_event_storage() iteration = storage.iter data_time, time = None, None eta_string = "N/A" try: data_time = storage.history("data_time").avg(20) time = storage.history("time").global_avg() eta_seconds = storage.history("time").median(1000) * (self._max_iter - iteration) eta_string = str(datetime.timedelta(seconds=int(eta_seconds))) except KeyError: # they may not exist in the first few iterations (due to warmup) pass try: lr = "{:.6f}".format(storage.history("lr").latest()) except KeyError: lr = "N/A" if torch.cuda.is_available(): max_mem_mb = torch.cuda.max_memory_allocated() / 1024.0 / 1024.0 else: max_mem_mb = None # NOTE: max_mem is parsed by grep in "dev/parse_results.sh" self.logger.info( """\ eta: {eta} iter: {iter} {losses} \ {time} {data_time} \ lr: {lr} {memory}\ """.format( eta=eta_string, iter=iteration, losses=" ".join( [ "{}: {:.3f}".format(k, v.median(20)) for k, v in storage.histories().items() if "loss" in k ] ), time="time: {:.4f}".format(time) if time is not None else "", data_time="data_time: {:.4f}".format(data_time) if data_time is not None else "", lr=lr, memory="max_mem: {:.0f}M".format(max_mem_mb) if max_mem_mb is not None else "", ) ) class EventStorage: """ The user-facing class that provides metric storage functionalities. In the future we may add support for storing / logging other types of data if needed. """ def __init__(self, start_iter=0): """ Args: start_iter (int): the iteration number to start with """ self._history = defaultdict(HistoryBuffer) self._smoothing_hints = {} self._latest_scalars = {} self._iter = start_iter self._current_prefix = "" def put_scalar(self, name, value, smoothing_hint=True): """ Add a scalar `value` to the `HistoryBuffer` associated with `name`. Args: smoothing_hint (bool): a 'hint' on whether this scalar is noisy and should be smoothed when logged. The hint will be accessible through :meth:`EventStorage.smoothing_hints`. A writer may ignore the hint and apply custom smoothing rule. It defaults to True because most scalars we save need to be smoothed to provide any useful signal. """ name = self._current_prefix + name history = self._history[name] value = float(value) history.update(value, self._iter) self._latest_scalars[name] = value existing_hint = self._smoothing_hints.get(name) if existing_hint is not None: assert ( existing_hint == smoothing_hint ), "Scalar {} was put with a different smoothing_hint!".format(name) else: self._smoothing_hints[name] = smoothing_hint def put_scalars(self, *, smoothing_hint=True, **kwargs): """ Put multiple scalars from keyword arguments. Examples: storage.put_scalars(loss=my_loss, accuracy=my_accuracy, smoothing_hint=True) """ for k, v in kwargs.items(): self.put_scalar(k, v, smoothing_hint=smoothing_hint) def history(self, name): """ Returns: HistoryBuffer: the scalar history for name """ ret = self._history.get(name, None) if ret is None: raise KeyError("No history metric available for {}!".format(name)) return ret def histories(self): """ Returns: dict[name -> HistoryBuffer]: the HistoryBuffer for all scalars """ return self._history def latest(self): """ Returns: dict[name -> number]: the scalars that's added in the current iteration. """ return self._latest_scalars def latest_with_smoothing_hint(self, window_size=20): """ Similar to :meth:`latest`, but the returned values are either the un-smoothed original latest value, or a median of the given window_size, depend on whether the smoothing_hint is True. This provides a default behavior that other writers can use. """ result = {} for k, v in self._latest_scalars.items(): result[k] = self._history[k].median(window_size) if self._smoothing_hints[k] else v return result def smoothing_hints(self): """ Returns: dict[name -> bool]: the user-provided hint on whether the scalar is noisy and needs smoothing. """ return self._smoothing_hints def step(self): """ User should call this function at the beginning of each iteration, to notify the storage of the start of a new iteration. The storage will then be able to associate the new data with the correct iteration number. """ self._iter += 1 self._latest_scalars = {} @property def iter(self): return self._iter @property def iteration(self): # for backward compatibility return self._iter def __enter__(self): _CURRENT_STORAGE_STACK.append(self) return self def __exit__(self, exc_type, exc_val, exc_tb): assert _CURRENT_STORAGE_STACK[-1] == self _CURRENT_STORAGE_STACK.pop() @contextmanager def name_scope(self, name): """ Yields: A context within which all the events added to this storage will be prefixed by the name scope. """ old_prefix = self._current_prefix self._current_prefix = name.rstrip("/") + "/" yield self._current_prefix = old_prefix ================================================ FILE: detectron2/utils/logger.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import functools import logging import os import sys from collections import Counter from fvcore.common.file_io import PathManager from tabulate import tabulate from termcolor import colored class _ColorfulFormatter(logging.Formatter): def __init__(self, *args, **kwargs): self._root_name = kwargs.pop("root_name") + "." self._abbrev_name = kwargs.pop("abbrev_name", "") if len(self._abbrev_name): self._abbrev_name = self._abbrev_name + "." super(_ColorfulFormatter, self).__init__(*args, **kwargs) def formatMessage(self, record): record.name = record.name.replace(self._root_name, self._abbrev_name) log = super(_ColorfulFormatter, self).formatMessage(record) if record.levelno == logging.WARNING: prefix = colored("WARNING", "red", attrs=["blink"]) elif record.levelno == logging.ERROR or record.levelno == logging.CRITICAL: prefix = colored("ERROR", "red", attrs=["blink", "underline"]) else: return log return prefix + " " + log @functools.lru_cache() # so that calling setup_logger multiple times won't add many handlers def setup_logger( output=None, distributed_rank=0, *, color=True, name="detectron2", abbrev_name=None ): """ Args: output (str): a file name or a directory to save log. If None, will not save log file. If ends with ".txt" or ".log", assumed to be a file name. Otherwise, logs will be saved to `output/log.txt`. name (str): the root module name of this logger abbrev_name (str): an abbreviation of the module, to avoid long names in logs. Set to "" to not log the root module in logs. By default, will abbreviate "detectron2" to "d2" and leave other modules unchanged. """ logger = logging.getLogger(name) logger.setLevel(logging.DEBUG) logger.propagate = False if abbrev_name is None: abbrev_name = "d2" if name == "detectron2" else name plain_formatter = logging.Formatter( "[%(asctime)s] %(name)s %(levelname)s: %(message)s", datefmt="%m/%d %H:%M:%S" ) # stdout logging: master only if distributed_rank == 0: ch = logging.StreamHandler(stream=sys.stdout) ch.setLevel(logging.DEBUG) if color: formatter = _ColorfulFormatter( colored("[%(asctime)s %(name)s]: ", "green") + "%(message)s", datefmt="%m/%d %H:%M:%S", root_name=name, abbrev_name=str(abbrev_name), ) else: formatter = plain_formatter ch.setFormatter(formatter) logger.addHandler(ch) # file logging: all workers if output is not None: if output.endswith(".txt") or output.endswith(".log"): filename = output else: filename = os.path.join(output, "log.txt") if distributed_rank > 0: filename = filename + ".rank{}".format(distributed_rank) PathManager.mkdirs(os.path.dirname(filename)) fh = logging.StreamHandler(_cached_log_stream(filename)) fh.setLevel(logging.DEBUG) fh.setFormatter(plain_formatter) logger.addHandler(fh) return logger # cache the opened file object, so that different calls to `setup_logger` # with the same file name can safely write to the same file. @functools.lru_cache(maxsize=None) def _cached_log_stream(filename): return PathManager.open(filename, "a") """ Below are some other convenient logging methods. They are mainly adopted from https://github.com/abseil/abseil-py/blob/master/absl/logging/__init__.py """ def _find_caller(): """ Returns: str: module name of the caller tuple: a hashable key to be used to identify different callers """ frame = sys._getframe(2) while frame: code = frame.f_code if os.path.join("utils", "logger.") not in code.co_filename: mod_name = frame.f_globals["__name__"] if mod_name == "__main__": mod_name = "detectron2" return mod_name, (code.co_filename, frame.f_lineno, code.co_name) frame = frame.f_back _LOG_COUNTER = Counter() def log_first_n(lvl, msg, n=1, *, name=None, key="caller"): """ Log only for the first n times. Args: lvl (int): the logging level msg (str): n (int): name (str): name of the logger to use. Will use the caller's module by default. key (str or tuple[str]): the string(s) can be one of "caller" or "message", which defines how to identify duplicated logs. For example, if called with `n=1, key="caller"`, this function will only log the first call from the same caller, regardless of the message content. If called with `n=1, key="message"`, this function will log the same content only once, even if they are called from different places. If called with `n=1, key=("caller", "message")`, this function will not log only if the same caller has logged the same message before. """ if isinstance(key, str): key = (key,) assert len(key) > 0 caller_module, caller_key = _find_caller() hash_key = () if "caller" in key: hash_key = hash_key + caller_key if "message" in key: hash_key = hash_key + (msg,) _LOG_COUNTER[hash_key] += 1 if _LOG_COUNTER[hash_key] <= n: logging.getLogger(name or caller_module).log(lvl, msg) def log_every_n(lvl, msg, n=1, *, name=None): """ Log once per n times. Args: lvl (int): the logging level msg (str): n (int): name (str): name of the logger to use. Will use the caller's module by default. """ caller_module, key = _find_caller() _LOG_COUNTER[key] += 1 if n == 1 or _LOG_COUNTER[key] % n == 1: logging.getLogger(name or caller_module).log(lvl, msg) def create_small_table(small_dict): """ Create a small table using the keys of small_dict as headers. This is only suitable for small dictionaries. Args: small_dict (dict): a result dictionary of only a few items. Returns: str: the table as a string. """ keys, values = tuple(zip(*small_dict.items())) table = tabulate( [values], headers=keys, tablefmt="pipe", floatfmt=".3f", stralign="center", numalign="center", ) return table ================================================ FILE: detectron2/utils/memory.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import logging from contextlib import contextmanager from functools import wraps import torch __all__ = ["retry_if_cuda_oom"] @contextmanager def _ignore_torch_cuda_oom(): """ A context which ignores CUDA OOM exception from pytorch. """ try: yield except RuntimeError as e: # NOTE: the string may change? if "CUDA out of memory. " in str(e): pass else: raise def retry_if_cuda_oom(func): """ Makes a function retry itself after encountering pytorch's CUDA OOM error. It will first retry after calling `torch.cuda.empty_cache()`. If that still fails, it will then retry by trying to convert inputs to CPUs. In this case, it expects the function to dispatch to CPU implementation. The return values may become CPU tensors as well and it's user's responsibility to convert it back to CUDA tensor if needed. Args: func: a stateless callable that takes tensor-like objects as arguments Returns: a callable which retries `func` if OOM is encountered. Examples: .. code-block:: python output = retry_if_cuda_oom(some_torch_function)(input1, input2) # output may be on CPU even if inputs are on GPU Note: 1. When converting inputs to CPU, it will only look at each argument and check if it has `.device` and `.to` for conversion. Nested structures of tensors are not supported. 2. Since the function might be called more than once, it has to be stateless. """ def maybe_to_cpu(x): try: like_gpu_tensor = x.device.type == "cuda" and hasattr(x, "to") except AttributeError: like_gpu_tensor = False if like_gpu_tensor: return x.to(device="cpu") else: return x @wraps(func) def wrapped(*args, **kwargs): with _ignore_torch_cuda_oom(): return func(*args, **kwargs) # Clear cache and retry torch.cuda.empty_cache() with _ignore_torch_cuda_oom(): return func(*args, **kwargs) # Try on CPU. This slows down the code significantly, therefore print a notice. logger = logging.getLogger(__name__) logger.info("Attempting to copy inputs of {} to CPU due to CUDA OOM".format(str(func))) new_args = (maybe_to_cpu(x) for x in args) new_kwargs = {k: maybe_to_cpu(v) for k, v in kwargs.items()} return func(*new_args, **new_kwargs) return wrapped ================================================ FILE: detectron2/utils/registry.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved class Registry(object): """ The registry that provides name -> object mapping, to support third-party users' custom modules. To create a registry (inside detectron2): .. code-block:: python BACKBONE_REGISTRY = Registry('BACKBONE') To register an object: .. code-block:: python @BACKBONE_REGISTRY.register() class MyBackbone(): ... Or: .. code-block:: python BACKBONE_REGISTRY.register(MyBackbone) """ def __init__(self, name): """ Args: name (str): the name of this registry """ self._name = name self._obj_map = {} def _do_register(self, name, obj): assert ( name not in self._obj_map ), "An object named '{}' was already registered in '{}' registry!".format(name, self._name) self._obj_map[name] = obj def register(self, obj=None): """ Register the given object under the the name `obj.__name__`. Can be used as either a decorator or not. See docstring of this class for usage. """ if obj is None: # used as a decorator def deco(func_or_class): name = func_or_class.__name__ self._do_register(name, func_or_class) return func_or_class return deco # used as a function call name = obj.__name__ self._do_register(name, obj) def get(self, name): ret = self._obj_map.get(name) if ret is None: raise KeyError("No object named '{}' found in '{}' registry!".format(name, self._name)) return ret ================================================ FILE: detectron2/utils/serialize.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import cloudpickle class PicklableWrapper(object): """ Wrap an object to make it more picklable, note that it uses heavy weight serialization libraries that are slower than pickle. It's best to use it only on closures (which are usually not picklable). This is a simplified version of https://github.com/joblib/joblib/blob/master/joblib/externals/loky/cloudpickle_wrapper.py """ def __init__(self, obj): self._obj = obj def __reduce__(self): s = cloudpickle.dumps(self._obj) return cloudpickle.loads, (s,) def __call__(self, *args, **kwargs): return self._obj(*args, **kwargs) def __getattr__(self, attr): # Ensure that the wrapped object can be used seamlessly as the previous object. if attr not in ["_obj"]: return getattr(self._obj, attr) return getattr(self, attr) ================================================ FILE: detectron2/utils/video_visualizer.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import numpy as np import pycocotools.mask as mask_util from detectron2.utils.visualizer import ( ColorMode, Visualizer, _create_text_labels, _PanopticPrediction, ) from .colormap import random_color class _DetectedInstance: """ Used to store data about detected objects in video frame, in order to transfer color to objects in the future frames. Attributes: label (int): bbox (tuple[float]): mask_rle (dict): color (tuple[float]): RGB colors in range (0, 1) ttl (int): time-to-live for the instance. For example, if ttl=2, the instance color can be transferred to objects in the next two frames. """ __slots__ = ["label", "bbox", "mask_rle", "color", "ttl"] def __init__(self, label, bbox, mask_rle, color, ttl): self.label = label self.bbox = bbox self.mask_rle = mask_rle self.color = color self.ttl = ttl class VideoVisualizer: def __init__(self, metadata, instance_mode=ColorMode.IMAGE): """ Args: metadata (MetadataCatalog): image metadata. """ self.metadata = metadata self._old_instances = [] assert instance_mode in [ ColorMode.IMAGE, ColorMode.IMAGE_BW, ], "Other mode not supported yet." self._instance_mode = instance_mode def draw_instance_predictions(self, frame, predictions): """ Draw instance-level prediction results on an image. Args: frame (ndarray): an RGB image of shape (H, W, C), in the range [0, 255]. predictions (Instances): the output of an instance detection/segmentation model. Following fields will be used to draw: "pred_boxes", "pred_classes", "scores", "pred_masks" (or "pred_masks_rle"). Returns: output (VisImage): image object with visualizations. """ frame_visualizer = Visualizer(frame, self.metadata) num_instances = len(predictions) if num_instances == 0: return frame_visualizer.output boxes = predictions.pred_boxes.tensor.numpy() if predictions.has("pred_boxes") else None scores = predictions.scores if predictions.has("scores") else None classes = predictions.pred_classes.numpy() if predictions.has("pred_classes") else None keypoints = predictions.pred_keypoints if predictions.has("pred_keypoints") else None if predictions.has("pred_masks"): masks = predictions.pred_masks # mask IOU is not yet enabled # masks_rles = mask_util.encode(np.asarray(masks.permute(1, 2, 0), order="F")) # assert len(masks_rles) == num_instances else: masks = None detected = [ _DetectedInstance(classes[i], boxes[i], mask_rle=None, color=None, ttl=8) for i in range(num_instances) ] colors = self._assign_colors(detected) labels = _create_text_labels(classes, scores, self.metadata.thing_classes) if self._instance_mode == ColorMode.IMAGE_BW: # any() returns uint8 tensor frame_visualizer.output.img = frame_visualizer._create_grayscale_image( (masks.any(dim=0) > 0).numpy() if masks is not None else None ) alpha = 0.3 else: alpha = 0.5 frame_visualizer.overlay_instances( boxes=None if masks is not None else boxes, # boxes are a bit distracting masks=masks, labels=labels, keypoints=keypoints, assigned_colors=colors, alpha=alpha, ) return frame_visualizer.output def draw_sem_seg(self, frame, sem_seg, area_threshold=None): """ Args: sem_seg (ndarray or Tensor): semantic segmentation of shape (H, W), each value is the integer label. area_threshold (Optional[int]): only draw segmentations larger than the threshold """ # don't need to do anything special frame_visualizer = Visualizer(frame, self.metadata) frame_visualizer.draw_sem_seg(sem_seg, area_threshold=None) return frame_visualizer.output def draw_panoptic_seg_predictions( self, frame, panoptic_seg, segments_info, area_threshold=None, alpha=0.5 ): frame_visualizer = Visualizer(frame, self.metadata) pred = _PanopticPrediction(panoptic_seg, segments_info) if self._instance_mode == ColorMode.IMAGE_BW: frame_visualizer.output.img = frame_visualizer._create_grayscale_image( pred.non_empty_mask() ) # draw mask for all semantic segments first i.e. "stuff" for mask, sinfo in pred.semantic_masks(): category_idx = sinfo["category_id"] try: mask_color = [x / 255 for x in self.metadata.stuff_colors[category_idx]] except AttributeError: mask_color = None frame_visualizer.draw_binary_mask( mask, color=mask_color, text=self.metadata.stuff_classes[category_idx], alpha=alpha, area_threshold=area_threshold, ) all_instances = list(pred.instance_masks()) if len(all_instances) == 0: return frame_visualizer.output # draw mask for all instances second masks, sinfo = list(zip(*all_instances)) num_instances = len(masks) masks_rles = mask_util.encode( np.asarray(np.asarray(masks).transpose(1, 2, 0), dtype=np.uint8, order="F") ) assert len(masks_rles) == num_instances category_ids = [x["category_id"] for x in sinfo] detected = [ _DetectedInstance(category_ids[i], bbox=None, mask_rle=masks_rles[i], color=None, ttl=8) for i in range(num_instances) ] colors = self._assign_colors(detected) labels = [self.metadata.thing_classes[k] for k in category_ids] frame_visualizer.overlay_instances( boxes=None, masks=masks, labels=labels, keypoints=None, assigned_colors=colors, alpha=alpha, ) return frame_visualizer.output def _assign_colors(self, instances): """ Naive tracking heuristics to assign same color to the same instance, will update the internal state of tracked instances. Returns: list[tuple[float]]: list of colors. """ # Compute iou with either boxes or masks: is_crowd = np.zeros((len(instances),), dtype=np.bool) if instances[0].bbox is None: assert instances[0].mask_rle is not None # use mask iou only when box iou is None # because box seems good enough rles_old = [x.mask_rle for x in self._old_instances] rles_new = [x.mask_rle for x in instances] ious = mask_util.iou(rles_old, rles_new, is_crowd) threshold = 0.5 else: boxes_old = [x.bbox for x in self._old_instances] boxes_new = [x.bbox for x in instances] ious = mask_util.iou(boxes_old, boxes_new, is_crowd) threshold = 0.6 if len(ious) == 0: ious = np.zeros((len(self._old_instances), len(instances)), dtype="float32") # Only allow matching instances of the same label: for old_idx, old in enumerate(self._old_instances): for new_idx, new in enumerate(instances): if old.label != new.label: ious[old_idx, new_idx] = 0 matched_new_per_old = np.asarray(ious).argmax(axis=1) max_iou_per_old = np.asarray(ious).max(axis=1) # Try to find match for each old instance: extra_instances = [] for idx, inst in enumerate(self._old_instances): if max_iou_per_old[idx] > threshold: newidx = matched_new_per_old[idx] if instances[newidx].color is None: instances[newidx].color = inst.color continue # If an old instance does not match any new instances, # keep it for the next frame in case it is just missed by the detector inst.ttl -= 1 if inst.ttl > 0: extra_instances.append(inst) # Assign random color to newly-detected instances: for inst in instances: if inst.color is None: inst.color = random_color(rgb=True, maximum=1) self._old_instances = instances[:] + extra_instances return [d.color for d in instances] ================================================ FILE: detectron2/utils/visualizer.py ================================================ #Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import colorsys import numpy as np from enum import Enum, unique import cv2 import matplotlib as mpl import matplotlib.colors as mplc import matplotlib.figure as mplfigure import pysobatools.mask as mask_util import torch from matplotlib.backends.backend_agg import FigureCanvasAgg from detectron2.structures import BitMasks, Boxes, BoxMode, Keypoints, PolygonMasks from .colormap import random_color,colormap __all__ = ["ColorMode", "VisImage", "Visualizer"] _SMALL_OBJECT_AREA_THRESH = 1000 _LARGE_MASK_AREA_THRESH = 120000 _OFF_WHITE = (1.0, 1.0, 240.0 / 255) _BLACK = (0, 0, 0) _RED = (1.0, 0, 0) _KEYPOINT_THRESHOLD = 0.05 @unique class ColorMode(Enum): """ Enum of different color modes to use for instance visualizations. Attributes: IMAGE: Picks a random color for every instance and overlay segmentations with low opacity. SEGMENTATION: Let instances of the same category have similar colors, and overlay them with high opacity. This provides more attention on the quality of segmentation. IMAGE_BW: same as IMAGE, but convert all areas without masks to gray-scale. """ IMAGE = 0 SEGMENTATION = 1 IMAGE_BW = 2 class GenericMask: """ Attribute: polygons (list[ndarray]): list[ndarray]: polygons for this mask. Each ndarray has format [x, y, x, y, ...] mask (ndarray): a binary mask """ def __init__(self, mask_or_polygons, height, width): self._mask = self._polygons = self._has_holes = None self.height = height self.width = width m = mask_or_polygons if isinstance(m, dict): # RLEs assert "counts" in m and "size" in m if isinstance(m["counts"], list): # uncompressed RLEs h, w = m["size"] assert h == height and w == width m = mask_util.frPyObjects(m, h, w) self._mask = mask_util.decode(m)[:, :] return if isinstance(m, list): # list[ndarray] self._polygons = [np.asarray(x).reshape(-1) for x in m] return if isinstance(m, np.ndarray): # assumed to be a binary mask assert m.shape[1] != 2, m.shape assert m.shape == (height, width), m.shape self._mask = m.astype("uint8") return raise ValueError("GenericMask cannot handle object {} of type '{}'".format(m, type(m))) @property def mask(self): if self._mask is None: self._mask = self.polygons_to_mask(self._polygons) return self._mask @property def polygons(self): if self._polygons is None: self._polygons, self._has_holes = self.mask_to_polygons(self._mask) return self._polygons @property def has_holes(self): if self._has_holes is None: if self._mask is not None: self._polygons, self._has_holes = self.mask_to_polygons(self._mask) else: self._has_holes = False # if original format is polygon, does not have holes return self._has_holes def mask_to_polygons(self, mask): # cv2.RETR_CCOMP flag retrieves all the contours and arranges them to a 2-level # hierarchy. External contours (boundary) of the object are placed in hierarchy-1. # Internal contours (holes) are placed in hierarchy-2. # cv2.CHAIN_APPROX_NONE flag gets vertices of polygons from contours. mask = mask.copy() res = cv2.findContours(mask.astype("uint8"), cv2.RETR_CCOMP, cv2.CHAIN_APPROX_NONE) hierarchy = res[-1] # try: has_holes = (hierarchy.reshape(-1, 4)[:, 3] >= 0).sum() > 0 # except: # print(hierarchy) # assert 1!= 1 res = res[-2] res = [x.flatten() for x in res] res = [x for x in res if len(x) >= 6] return res, has_holes def polygons_to_mask(self, polygons): rle = mask_util.frPyObjects(polygons, self.height, self.width) rle = mask_util.merge(rle) return mask_util.decode(rle)[:, :] def area(self): return self.mask.sum() def bbox(self): p = mask_util.frPyObjects(self.polygons, self.height, self.width) p = mask_util.merge(p) bbox = mask_util.toBbox(p) bbox[2] += bbox[0] bbox[3] += bbox[1] return bbox class _PanopticPrediction: def __init__(self, panoptic_seg, segments_info): self._seg = panoptic_seg self._sinfo = {s["id"]: s for s in segments_info} # seg id -> seg info segment_ids, areas = torch.unique(panoptic_seg, sorted=True, return_counts=True) areas = areas.numpy() sorted_idxs = np.argsort(-areas) self._seg_ids, self._seg_areas = segment_ids[sorted_idxs], areas[sorted_idxs] self._seg_ids = self._seg_ids.tolist() for sid, area in zip(self._seg_ids, self._seg_areas): if sid in self._sinfo: self._sinfo[sid]["area"] = float(area) def non_empty_mask(self): """ Returns: (H, W) array, a mask for all pixels that have a prediction """ empty_ids = [] for id in self._seg_ids: if id not in self._sinfo: empty_ids.append(id) if len(empty_ids) == 0: return np.zeros(self._seg.shape, dtype=np.uint8) assert ( len(empty_ids) == 1 ), ">1 ids corresponds to no labels. This is currently not supported" return (self._seg != empty_ids[0]).numpy().astype(np.bool) def semantic_masks(self): for sid in self._seg_ids: sinfo = self._sinfo.get(sid) if sinfo is None or sinfo["isthing"]: # Some pixels (e.g. id 0 in PanopticFPN) have no instance or semantic predictions. continue yield (self._seg == sid).numpy().astype(np.bool), sinfo def instance_masks(self): for sid in self._seg_ids: sinfo = self._sinfo.get(sid) if sinfo is None or not sinfo["isthing"]: continue mask = (self._seg == sid).numpy().astype(np.bool) if mask.sum() > 0: yield mask, sinfo def _create_text_labels(classes, scores, class_names): """ Args: classes (list[int] or None): scores (list[float] or None): class_names (list[str] or None): Returns: list[str] or None """ labels = None if class_names is not None and len(class_names) >= 1: labels = [class_names[i] for i in classes] if scores is not None: if labels is None: labels = ["{:.0f}%".format(s * 100) for s in scores] else: labels = ["{}".format(l) for l in labels] # print(labels) return labels class VisImage: def __init__(self, img, scale=1.0): """ Args: img (ndarray): an RGB image of shape (H, W, 3). scale (float): scale the input image """ self.img = img self.scale = scale self.width, self.height = img.shape[1], img.shape[0] self._setup_figure(img) def _setup_figure(self, img): """ Args: Same as in :meth:`__init__()`. Returns: fig (matplotlib.pyplot.figure): top level container for all the image plot elements. ax (matplotlib.pyplot.Axes): contains figure elements and sets the coordinate system. """ fig = mplfigure.Figure(frameon=False) self.dpi = fig.get_dpi() # add a small 1e-2 to avoid precision lost due to matplotlib's truncation # (https://github.com/matplotlib/matplotlib/issues/15363) fig.set_size_inches( (self.width * self.scale + 1e-2) / self.dpi, (self.height * self.scale + 1e-2) / self.dpi, ) self.canvas = FigureCanvasAgg(fig) # self.canvas = mpl.backends.backend_cairo.FigureCanvasCairo(fig) ax = fig.add_axes([0.0, 0.0, 1.0, 1.0]) ax.axis("off") ax.set_xlim(0.0, self.width) ax.set_ylim(self.height) self.fig = fig self.ax = ax def save(self, filepath): """ Args: filepath (str): a string that contains the absolute path, including the file name, where the visualized image will be saved. """ cv2.imwrite(filepath, self.get_image()[:, :, ::-1]) def get_image(self): """ Returns: ndarray: the visualized image of shape (H, W, 3) (RGB) in uint8 type. The shape is scaled w.r.t the input image using the given `scale` argument. """ canvas = self.canvas s, (width, height) = canvas.print_to_buffer() if (self.width, self.height) != (width, height): img = cv2.resize(self.img, (width, height)) else: img = self.img # buf = io.BytesIO() # works for cairo backend # canvas.print_rgba(buf) # width, height = self.width, self.height # s = buf.getvalue() buffer = np.frombuffer(s, dtype="uint8") # imshow is slow. blend manually (still quite slow) img_rgba = buffer.reshape(height, width, 4) rgb, alpha = np.split(img_rgba, [3], axis=2) try: import numexpr as ne # fuse them with numexpr visualized_image = ne.evaluate("img * (1 - alpha / 255.0) + rgb * (alpha / 255.0)") except ImportError: alpha = alpha.astype("float32") / 255.0 visualized_image = img * (1 - alpha) + rgb * alpha visualized_image = visualized_image.astype("uint8") return visualized_image class Visualizer: def __init__(self, img_rgb, metadata, scale=1.0, instance_mode=ColorMode.IMAGE): """ Args: img_rgb: a numpy array of shape (H, W, C), where H and W correspond to the height and width of the image respectively. C is the number of color channels. The image is required to be in RGB format since that is a requirement of the Matplotlib library. The image is also expected to be in the range [0, 255]. metadata (MetadataCatalog): image metadata. """ self.img = np.asarray(img_rgb).clip(0, 255).astype(np.uint8) self.metadata = metadata self.output = VisImage(self.img, scale=scale) self.cpu_device = torch.device("cpu") # too small texts are useless, therefore clamp to 9 self._default_font_size = max( np.sqrt(self.output.height * self.output.width) // 90, 10 // scale ) self._instance_mode = instance_mode self._colors = colormap(True,1) def draw_instance_predictions(self, predictions,is_ass= False, labels_align = 'left'): """ Draw instance-level prediction results on an image. Args: predictions (Instances): the output of an instance detection/segmentation model. Following fields will be used to draw: "pred_boxes", "pred_classes", "scores", "pred_masks" (or "pred_masks_rle"). Returns: output (VisImage): image object with visualizations. """ boxes = predictions.pred_boxes if predictions.has("pred_boxes") else None scores = predictions.scores if predictions.has("scores") else None classes = predictions.pred_classes if predictions.has("pred_classes") else None associations = predictions.pred_associations if predictions.has("pred_associations") else None if is_ass: labels = _create_text_labels(classes, scores, ['obj+shad']) else: labels = _create_text_labels(classes, scores, self.metadata.get("thing_classes",None)) keypoints = predictions.pred_keypoints if predictions.has("pred_keypoints") else None if predictions.has("pred_masks"): masks = predictions.pred_masks masks = [GenericMask(x, self.output.height, self.output.width) for x in masks] else: masks = None if self._instance_mode == ColorMode.SEGMENTATION and self.metadata.get("thing_colors"): colors = [ self._jitter([x / 255 for x in self.metadata.thing_colors[c]]) for c in classes ] alpha = 0.8 else: colors = [self._colors[k] for k in associations] alpha = 0.5 if self._instance_mode == ColorMode.IMAGE_BW: self.output.img = self._create_grayscale_image( (predictions.pred_masks.any(dim=0) > 0).numpy() ) alpha = 0.3 self.overlay_instances( masks=masks, boxes=boxes, labels=labels, keypoints=keypoints, assigned_colors=colors, alpha=alpha, labels_align=labels_align, associations= associations ) return self.output def draw_sem_seg(self, sem_seg, area_threshold=None, alpha=0.8): """ Draw semantic segmentation predictions/labels. Args: sem_seg (Tensor or ndarray): the segmentation of shape (H, W). area_threshold (int): segments with less than `area_threshold` are not drawn. alpha (float): the larger it is, the more opaque the segmentations are. Returns: output (VisImage): image object with visualizations. """ if isinstance(sem_seg, torch.Tensor): sem_seg = sem_seg.numpy() labels, areas = np.unique(sem_seg, return_counts=True) sorted_idxs = np.argsort(-areas).tolist() labels = labels[sorted_idxs] for label in labels: try: mask_color = [x / 255 for x in self.metadata.stuff_colors[label]] except (AttributeError, IndexError): mask_color = None binary_mask = (sem_seg == label).astype(np.uint8) text = self.metadata.stuff_classes[label] self.draw_binary_mask( binary_mask, color=mask_color, edge_color=_OFF_WHITE, text=text, alpha=alpha, area_threshold=area_threshold, ) return self.output def draw_panoptic_seg_predictions( self, panoptic_seg, segments_info, area_threshold=None, alpha=0.7 ): """ Draw panoptic prediction results on an image. Args: panoptic_seg (Tensor): of shape (height, width) where the values are ids for each segment. segments_info (list[dict]): Describe each segment in `panoptic_seg`. Each dict contains keys "id", "category_id", "isthing". area_threshold (int): stuff segments with less than `area_threshold` are not drawn. Returns: output (VisImage): image object with visualizations. """ pred = _PanopticPrediction(panoptic_seg, segments_info) if self._instance_mode == ColorMode.IMAGE_BW: self.output.img = self._create_grayscale_image(pred.non_empty_mask()) # draw mask for all semantic segments first i.e. "stuff" for mask, sinfo in pred.semantic_masks(): category_idx = sinfo["category_id"] try: mask_color = [x / 255 for x in self.metadata.stuff_colors[category_idx]] except AttributeError: mask_color = None text = self.metadata.stuff_classes[category_idx] self.draw_binary_mask( mask, color=mask_color, edge_color=_OFF_WHITE, text=text, alpha=alpha, area_threshold=area_threshold, ) # draw mask for all instances second all_instances = list(pred.instance_masks()) if len(all_instances) == 0: return self.output masks, sinfo = list(zip(*all_instances)) category_ids = [x["category_id"] for x in sinfo] try: scores = [x["score"] for x in sinfo] except KeyError: scores = None labels = _create_text_labels(category_ids, scores, self.metadata.thing_classes) try: colors = [random_color(rgb=True, maximum=1) for k in category_ids] except AttributeError: colors = None self.overlay_instances(masks=masks, labels=labels, assigned_colors=colors) return self.output def draw_dataset_dict(self, dic): annos = dic.get("annotations", None) asso_annos = dic.get("association_anno",None) if annos: if "segmentation" in annos[0]: masks = [x["segmentation"] for x in annos] else: masks = None if "keypoints" in annos[0]: keypts = [x["keypoints"] for x in annos] keypts = np.array(keypts).reshape(len(annos), -1, 3) else: keypts = None boxes = [BoxMode.convert(x["bbox"], x["bbox_mode"], BoxMode.XYXY_ABS) for x in annos] colos = [self._colors[i] for i in range(1,int(len(boxes)/2)+1)]*2 labels = [x["category_id"] for x in annos] names = self.metadata.get("thing_classes", None) if names: labels = [names[i] for i in labels] labels = [i + ("|crowd" if a.get("iscrowd", 0) else "") for i, a in zip(labels, annos)] self.overlay_instances(labels=labels, boxes=boxes, masks=masks, keypoints=keypts,assigned_colors=colos) if asso_annos: asso_boxes = [BoxMode.convert(x["bbox"],x["bbox_mode"], BoxMode.XYXY_ABS) for x in asso_annos] colos = colos[:int(len(colos)/2)] asso_labels = [x["category_id"] for x in asso_annos] names = ['obj+shad'] if names: asso_labels = [names[i] for i in asso_labels] self.overlay_instances(labels=asso_labels,boxes=asso_boxes,labels_align='right',assigned_colors=colos) sem_seg = dic.get("sem_seg", None) if sem_seg is None and "sem_seg_file_name" in dic: sem_seg = cv2.imread(dic["sem_seg_file_name"], cv2.IMREAD_GRAYSCALE) if sem_seg is not None: self.draw_sem_seg(sem_seg, area_threshold=0, alpha=0.5) return self.output def overlay_instances( self, *, boxes=None, labels=None, masks=None, keypoints=None, assigned_colors=None, alpha=0.5, labels_align = "left", associations = None ): """ Args: boxes (Boxes or ndarray): either a :class:`Boxes` or a Nx4 numpy array of XYXY_ABS format for the N objects in a single image. labels (list[str]): the text to be displayed for each instance. masks (masks-like object): Supported types are: * `structures.masks.PolygonMasks`, `structures.masks.BitMasks`. * list[list[ndarray]]: contains the segmentation masks for all objects in one image. The first level of the list corresponds to individual instances. The second level to all the polygon that compose the instance, and the third level to the polygon coordinates. The third level should have the format of [x0, y0, x1, y1, ..., xn, yn] (n >= 3). * list[ndarray]: each ndarray is a binary mask of shape (H, W). * list[dict]: each dict is a COCO-style RLE. keypoints (Keypoint or array like): an array-like object of shape (N, K, 3), where the N is the number of instances and K is the number of keypoints. The last dimension corresponds to (x, y, visibility or score). assigned_colors (list[matplotlib.colors]): a list of colors, where each color corresponds to each mask or box in the image. Refer to 'matplotlib.colors' for full list of formats that the colors are accepted in. Returns: output (VisImage): image object with visualizations. """ num_instances = None if boxes is not None: boxes = self._convert_boxes(boxes) num_instances = len(boxes) if masks is not None: masks = self._convert_masks(masks) if num_instances: assert len(masks) == num_instances else: num_instances = len(masks) if keypoints is not None: if num_instances: assert len(keypoints) == num_instances else: num_instances = len(keypoints) keypoints = self._convert_keypoints(keypoints) if labels is not None: assert len(labels) == num_instances if assigned_colors is None: assigned_colors = [random_color(rgb=True, maximum=1) for _ in range(num_instances)] if num_instances == 0: return self.output # Display in largest to smallest order to reduce occlusion. areas = None if boxes is not None: areas = np.prod(boxes[:, 2:] - boxes[:, :2], axis=1) elif masks is not None: areas = np.asarray([x.area() for x in masks]) for i in range(num_instances): if associations is not None: if associations[i] == 0: continue color = assigned_colors[i] if boxes is not None: self.draw_box(boxes[i], edge_color=color) pass if masks is not None: try : for segment in masks[i].polygons: if labels[i] == 'Shadow': alpha = 0.8 else: alpha = 0.5 self.draw_polygon(segment.reshape(-1, 2), color, alpha=alpha) except: continue if labels is not None: # first get a box if boxes is not None: x0, y0, x1, y1 = boxes[i] text_pos = (x0, y0) # if drawing boxes, put text on the box corner. horiz_align = labels_align if horiz_align == 'right': text_pos = (x1,y1-20) elif masks is not None: x0, y0, x1, y1 = masks[i].bbox() # draw text in the center (defined by median) when box is not drawn # median is less sensitive to outliers. text_pos = np.median(masks[i].mask.nonzero(), axis=1)[::-1] horiz_align = "center" else: continue # drawing the box confidence for keypoints isn't very useful. # for small objects, draw text at the side to avoid occlusion instance_area = (y1 - y0) * (x1 - x0) if ( instance_area < _SMALL_OBJECT_AREA_THRESH * self.output.scale or y1 - y0 < 40 * self.output.scale ): if y1 >= self.output.height - 5: text_pos = (x1, y0) else: text_pos = (x0, y1) height_ratio = (y1 - y0) / np.sqrt(self.output.height * self.output.width) lighter_color = self._change_color_brightness(color, brightness_factor=0.7) font_size = ( np.clip((height_ratio - 0.02) / 0.08 + 1, 1.2, 2) * 0.5 * self._default_font_size ) self.draw_text( labels[i], text_pos, color=lighter_color, horizontal_alignment=horiz_align, font_size=font_size, ) # draw keypoints if keypoints is not None: for keypoints_per_instance in keypoints: self.draw_and_connect_keypoints(keypoints_per_instance) return self.output def draw_and_connect_keypoints(self, keypoints): """ Draws keypoints of an instance and follows the rules for keypoint connections to draw lines between appropriate keypoints. This follows color heuristics for line color. Args: keypoints (Tensor): a tensor of shape (K, 3), where K is the number of keypoints and the last dimension corresponds to (x, y, probability). Returns: output (VisImage): image object with visualizations. """ visible = {} for idx, keypoint in enumerate(keypoints): # draw keypoint x, y, prob = keypoint if prob > _KEYPOINT_THRESHOLD: self.draw_circle((x, y), color=_RED) keypoint_name = self.metadata.keypoint_names[idx] visible[keypoint_name] = (x, y) for kp0, kp1, color in self.metadata.keypoint_connection_rules: if kp0 in visible and kp1 in visible: x0, y0 = visible[kp0] x1, y1 = visible[kp1] color = tuple(x / 255.0 for x in color) self.draw_line([x0, x1], [y0, y1], color=color) # draw lines from nose to mid-shoulder and mid-shoulder to mid-hip # Note that this strategy is specific to person keypoints. # For other keypoints, it should just do nothing try: ls_x, ls_y = visible["left_shoulder"] rs_x, rs_y = visible["right_shoulder"] mid_shoulder_x, mid_shoulder_y = (ls_x + rs_x) / 2, (ls_y + rs_y) / 2 except KeyError: pass else: # draw line from nose to mid-shoulder nose_x, nose_y = visible.get("nose", (None, None)) if nose_x is not None: self.draw_line([nose_x, mid_shoulder_x], [nose_y, mid_shoulder_y], color=_RED) try: # draw line from mid-shoulder to mid-hip lh_x, lh_y = visible["left_hip"] rh_x, rh_y = visible["right_hip"] except KeyError: pass else: mid_hip_x, mid_hip_y = (lh_x + rh_x) / 2, (lh_y + rh_y) / 2 self.draw_line([mid_hip_x, mid_shoulder_x], [mid_hip_y, mid_shoulder_y], color=_RED) return self.output """ Primitive drawing functions: """ def draw_text( self, text, position, *, font_size=None, color="g", horizontal_alignment="center" ): """ Args: text (str): class label position (tuple): a tuple of the x and y coordinates to place text on image. font_size (int, optional): font of the text. If not provided, a font size proportional to the image width is calculated and used. color: color of the text. Refer to `matplotlib.colors` for full list of formats that are accepted. horizontal_alignment (str): see `matplotlib.text.Text` Returns: output (VisImage): image object with text drawn. """ if not font_size: font_size = self._default_font_size # since the text background is dark, we don't want the text to be dark color = np.maximum(list(mplc.to_rgb(color)), 0.2) color[np.argmax(color)] = max(0.8, np.max(color)) x, y = position self.output.ax.text( x, y, text, size=font_size * self.output.scale, family="sans-serif", bbox={"facecolor": "black", "alpha": 0.8, "pad": 0.7, "edgecolor": "none"}, verticalalignment="top", horizontalalignment=horizontal_alignment, color=color, zorder=10, ) return self.output def draw_box(self, box_coord, alpha=0.5, edge_color="g", line_style="-"): """ Args: box_coord (tuple): a tuple containing x0, y0, x1, y1 coordinates, where x0 and y0 are the coordinates of the image's top left corner. x1 and y1 are the coordinates of the image's bottom right corner. alpha (float): blending efficient. Smaller values lead to more transparent masks. edge_color: color of the outline of the box. Refer to `matplotlib.colors` for full list of formats that are accepted. line_style (string): the string to use to create the outline of the boxes. Returns: output (VisImage): image object with box drawn. """ x0, y0, x1, y1 = box_coord width = x1 - x0 height = y1 - y0 linewidth = max(5,1) self.output.ax.add_patch( mpl.patches.Rectangle( (x0, y0), width, height, fill=False, edgecolor=edge_color, linewidth=linewidth * self.output.scale, alpha=alpha, linestyle=line_style, ) ) return self.output def draw_circle(self, circle_coord, color, radius=3): """ Args: circle_coord (list(int) or tuple(int)): contains the x and y coordinates of the center of the circle. color: color of the polygon. Refer to `matplotlib.colors` for a full list of formats that are accepted. radius (int): radius of the circle. Returns: output (VisImage): image object with box drawn. """ x, y = circle_coord self.output.ax.add_patch( mpl.patches.Circle(circle_coord, radius=radius, fill=True, color=color) ) return self.output def draw_line(self, x_data, y_data, color): """ Args: x_data (list[int]): a list containing x values of all the points being drawn. Length of list should match the length of y_data. y_data (list[int]): a list containing y values of all the points being drawn. Length of list should match the length of x_data. color: color of the line. Refer to `matplotlib.colors` for a full list of formats that are accepted. Returns: output (VisImage): image object with line drawn. """ linewidth = max(self._default_font_size / 3, 1) self.output.ax.add_line( mpl.lines.Line2D(x_data, y_data, linewidth=linewidth * self.output.scale, color=color) ) return self.output def draw_binary_mask( self, binary_mask, color=None, *, edge_color=None, text=None, alpha=0.5, area_threshold=4096 ): """ Args: binary_mask (ndarray): numpy array of shape (H, W), where H is the image height and W is the image width. Each value in the array is either a 0 or 1 value of uint8 type. color: color of the mask. Refer to `matplotlib.colors` for a full list of formats that are accepted. If None, will pick a random color. edge_color: color of the polygon edges. Refer to `matplotlib.colors` for a full list of formats that are accepted. text (str): if None, will be drawn in the object's center of mass. alpha (float): blending efficient. Smaller values lead to more transparent masks. area_threshold (float): a connected component small than this will not be shown. Returns: output (VisImage): image object with mask drawn. """ if color is None: color = random_color(rgb=True, maximum=1) if area_threshold is None: area_threshold = 4096 has_valid_segment = False binary_mask = binary_mask.astype("uint8") # opencv needs uint8 mask = GenericMask(binary_mask, self.output.height, self.output.width) shape2d = (binary_mask.shape[0], binary_mask.shape[1]) if not mask.has_holes: # draw polygons for regular masks for segment in mask.polygons: area = mask_util.area(mask_util.frPyObjects([segment], shape2d[0], shape2d[1])) if area < area_threshold: continue has_valid_segment = True segment = segment.reshape(-1, 2) self.draw_polygon(segment, color=color, edge_color=edge_color, alpha=alpha) else: rgba = np.zeros(shape2d + (4,), dtype="float32") rgba[:, :, :3] = color rgba[:, :, 3] = (mask.mask == 1).astype("float32") * alpha has_valid_segment = True self.output.ax.imshow(rgba) if text is not None and has_valid_segment: # TODO sometimes drawn on wrong objects. the heuristics here can improve. lighter_color = self._change_color_brightness(color, brightness_factor=0.7) _num_cc, cc_labels, stats, centroids = cv2.connectedComponentsWithStats(binary_mask, 8) largest_component_id = np.argmax(stats[1:, -1]) + 1 # draw text on the largest component, as well as other very large components. for cid in range(1, _num_cc): if cid == largest_component_id or stats[cid, -1] > _LARGE_MASK_AREA_THRESH: # median is more stable than centroid # center = centroids[largest_component_id] center = np.median((cc_labels == cid).nonzero(), axis=1)[::-1] self.draw_text(text, center, color=lighter_color) return self.output def draw_polygon(self, segment, color, edge_color=None, alpha=0.5): """ Args: segment: numpy array of shape Nx2, containing all the points in the polygon. color: color of the polygon. Refer to `matplotlib.colors` for a full list of formats that are accepted. edge_color: color of the polygon edges. Refer to `matplotlib.colors` for a full list of formats that are accepted. If not provided, a darker shade of the polygon color will be used instead. alpha (float): blending efficient. Smaller values lead to more transparent masks. Returns: output (VisImage): image object with polygon drawn. """ if edge_color is None: # make edge color darker than the polygon color if alpha > 0.8: edge_color = self._change_color_brightness(color, brightness_factor=-0.7) else: edge_color = color edge_color = mplc.to_rgb(edge_color) + (1,) polygon = mpl.patches.Polygon( segment, fill=True, facecolor=mplc.to_rgb(color) + (alpha,), edgecolor=edge_color, linewidth=max(self._default_font_size // 15 * self.output.scale, 1), ) self.output.ax.add_patch(polygon) return self.output """ Internal methods: """ def _jitter(self, color): """ Randomly modifies given color to produce a slightly different color than the color given. Args: color (tuple[double]): a tuple of 3 elements, containing the RGB values of the color picked. The values in the list are in the [0.0, 1.0] range. Returns: jittered_color (tuple[double]): a tuple of 3 elements, containing the RGB values of the color after being jittered. The values in the list are in the [0.0, 1.0] range. """ color = mplc.to_rgb(color) vec = np.random.rand(3) # better to do it in another color space vec = vec / np.linalg.norm(vec) * 0.5 res = np.clip(vec + color, 0, 1) return tuple(res) def _create_grayscale_image(self, mask=None): """ Create a grayscale version of the original image. The colors in masked area, if given, will be kept. """ img_bw = self.img.astype("f4").mean(axis=2) img_bw = np.stack([img_bw] * 3, axis=2) if mask is not None: img_bw[mask] = self.img[mask] return img_bw def _change_color_brightness(self, color, brightness_factor): """ Depending on the brightness_factor, gives a lighter or darker color i.e. a color with less or more saturation than the original color. Args: color: color of the polygon. Refer to `matplotlib.colors` for a full list of formats that are accepted. brightness_factor (float): a value in [-1.0, 1.0] range. A lightness factor of 0 will correspond to no change, a factor in [-1.0, 0) range will result in a darker color and a factor in (0, 1.0] range will result in a lighter color. Returns: modified_color (tuple[double]): a tuple containing the RGB values of the modified color. Each value in the tuple is in the [0.0, 1.0] range. """ assert brightness_factor >= -1.0 and brightness_factor <= 1.0 color = mplc.to_rgb(color) polygon_color = colorsys.rgb_to_hls(*mplc.to_rgb(color)) modified_lightness = polygon_color[1] + (brightness_factor * polygon_color[1]) modified_lightness = 0.0 if modified_lightness < 0.0 else modified_lightness modified_lightness = 1.0 if modified_lightness > 1.0 else modified_lightness modified_color = colorsys.hls_to_rgb(polygon_color[0], modified_lightness, polygon_color[2]) return modified_color def _convert_boxes(self, boxes): """ Convert different format of boxes to a Nx4 array. """ if isinstance(boxes, Boxes): return boxes.tensor.numpy() else: return np.asarray(boxes) def _convert_masks(self, masks_or_polygons): """ Convert different format of masks or polygons to a tuple of masks and polygons. Returns: list[GenericMask]: """ m = masks_or_polygons if isinstance(m, PolygonMasks): m = m.polygons if isinstance(m, BitMasks): m = m.tensor.numpy() if isinstance(m, torch.Tensor): m = m.numpy() ret = [] for x in m: if isinstance(x, GenericMask): ret.append(x) else: ret.append(GenericMask(x, self.output.height, self.output.width)) return ret def _convert_keypoints(self, keypoints): if isinstance(keypoints, Keypoints): keypoints = keypoints.tensor keypoints = np.asarray(keypoints) return keypoints def get_output(self): """ Returns: output (VisImage): the image output containing the visualizations added to the image. """ return self.output ================================================ FILE: detectron2/utils/visualizer.py.back ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import colorsys import numpy as np from enum import Enum, unique import cv2 import matplotlib as mpl import matplotlib.colors as mplc import matplotlib.figure as mplfigure import pysobatools.mask as mask_util import torch from matplotlib.backends.backend_agg import FigureCanvasAgg from detectron2.structures import BitMasks, Boxes, BoxMode, Keypoints, PolygonMasks from .colormap import random_color,colormap __all__ = ["ColorMode", "VisImage", "Visualizer"] _SMALL_OBJECT_AREA_THRESH = 1000 _LARGE_MASK_AREA_THRESH = 120000 _OFF_WHITE = (1.0, 1.0, 240.0 / 255) _BLACK = (0, 0, 0) _RED = (1.0, 0, 0) _KEYPOINT_THRESHOLD = 0.05 @unique class ColorMode(Enum): """ Enum of different color modes to use for instance visualizations. Attributes: IMAGE: Picks a random color for every instance and overlay segmentations with low opacity. SEGMENTATION: Let instances of the same category have similar colors, and overlay them with high opacity. This provides more attention on the quality of segmentation. IMAGE_BW: same as IMAGE, but convert all areas without masks to gray-scale. """ IMAGE = 0 SEGMENTATION = 1 IMAGE_BW = 2 class GenericMask: """ Attribute: polygons (list[ndarray]): list[ndarray]: polygons for this mask. Each ndarray has format [x, y, x, y, ...] mask (ndarray): a binary mask """ def __init__(self, mask_or_polygons, height, width): self._mask = self._polygons = self._has_holes = None self.height = height self.width = width m = mask_or_polygons if isinstance(m, dict): # RLEs assert "counts" in m and "size" in m if isinstance(m["counts"], list): # uncompressed RLEs h, w = m["size"] assert h == height and w == width m = mask_util.frPyObjects(m, h, w) self._mask = mask_util.decode(m)[:, :] return if isinstance(m, list): # list[ndarray] self._polygons = [np.asarray(x).reshape(-1) for x in m] return if isinstance(m, np.ndarray): # assumed to be a binary mask assert m.shape[1] != 2, m.shape assert m.shape == (height, width), m.shape self._mask = m.astype("uint8") return raise ValueError("GenericMask cannot handle object {} of type '{}'".format(m, type(m))) @property def mask(self): if self._mask is None: self._mask = self.polygons_to_mask(self._polygons) return self._mask @property def polygons(self): if self._polygons is None: self._polygons, self._has_holes = self.mask_to_polygons(self._mask) return self._polygons @property def has_holes(self): if self._has_holes is None: if self._mask is not None: self._polygons, self._has_holes = self.mask_to_polygons(self._mask) else: self._has_holes = False # if original format is polygon, does not have holes return self._has_holes def mask_to_polygons(self, mask): # cv2.RETR_CCOMP flag retrieves all the contours and arranges them to a 2-level # hierarchy. External contours (boundary) of the object are placed in hierarchy-1. # Internal contours (holes) are placed in hierarchy-2. # cv2.CHAIN_APPROX_NONE flag gets vertices of polygons from contours. mask = mask.copy() res = cv2.findContours(mask.astype("uint8"), cv2.RETR_CCOMP, cv2.CHAIN_APPROX_NONE) hierarchy = res[-1] # try: has_holes = (hierarchy.reshape(-1, 4)[:, 3] >= 0).sum() > 0 # except: # assert 1!= 1 res = res[-2] res = [x.flatten() for x in res] res = [x for x in res if len(x) >= 6] return res, has_holes def polygons_to_mask(self, polygons): rle = mask_util.frPyObjects(polygons, self.height, self.width) rle = mask_util.merge(rle) return mask_util.decode(rle)[:, :] def area(self): return self.mask.sum() def bbox(self): p = mask_util.frPyObjects(self.polygons, self.height, self.width) p = mask_util.merge(p) bbox = mask_util.toBbox(p) bbox[2] += bbox[0] bbox[3] += bbox[1] return bbox class _PanopticPrediction: def __init__(self, panoptic_seg, segments_info): self._seg = panoptic_seg self._sinfo = {s["id"]: s for s in segments_info} # seg id -> seg info segment_ids, areas = torch.unique(panoptic_seg, sorted=True, return_counts=True) areas = areas.numpy() sorted_idxs = np.argsort(-areas) self._seg_ids, self._seg_areas = segment_ids[sorted_idxs], areas[sorted_idxs] self._seg_ids = self._seg_ids.tolist() for sid, area in zip(self._seg_ids, self._seg_areas): if sid in self._sinfo: self._sinfo[sid]["area"] = float(area) def non_empty_mask(self): """ Returns: (H, W) array, a mask for all pixels that have a prediction """ empty_ids = [] for id in self._seg_ids: if id not in self._sinfo: empty_ids.append(id) if len(empty_ids) == 0: return np.zeros(self._seg.shape, dtype=np.uint8) assert ( len(empty_ids) == 1 ), ">1 ids corresponds to no labels. This is currently not supported" return (self._seg != empty_ids[0]).numpy().astype(np.bool) def semantic_masks(self): for sid in self._seg_ids: sinfo = self._sinfo.get(sid) if sinfo is None or sinfo["isthing"]: # Some pixels (e.g. id 0 in PanopticFPN) have no instance or semantic predictions. continue yield (self._seg == sid).numpy().astype(np.bool), sinfo def instance_masks(self): for sid in self._seg_ids: sinfo = self._sinfo.get(sid) if sinfo is None or not sinfo["isthing"]: continue mask = (self._seg == sid).numpy().astype(np.bool) if mask.sum() > 0: yield mask, sinfo def _create_text_labels(classes, scores, class_names): """ Args: classes (list[int] or None): scores (list[float] or None): class_names (list[str] or None): Returns: list[str] or None """ labels = None if class_names is not None and len(class_names) >= 1: labels = [class_names[i] for i in classes] if scores is not None: if labels is None: labels = ["{:.0f}%".format(s * 100) for s in scores] else: labels = ["{}".format(l) for l in labels] return labels class VisImage: def __init__(self, img, scale=1.0): """ Args: img (ndarray): an RGB image of shape (H, W, 3). scale (float): scale the input image """ self.img = img self.scale = scale self.width, self.height = img.shape[1], img.shape[0] self._setup_figure(img) def _setup_figure(self, img): """ Args: Same as in :meth:`__init__()`. Returns: fig (matplotlib.pyplot.figure): top level container for all the image plot elements. ax (matplotlib.pyplot.Axes): contains figure elements and sets the coordinate system. """ fig = mplfigure.Figure(frameon=False) self.dpi = fig.get_dpi() # add a small 1e-2 to avoid precision lost due to matplotlib's truncation # (https://github.com/matplotlib/matplotlib/issues/15363) fig.set_size_inches( (self.width * self.scale + 1e-2) / self.dpi, (self.height * self.scale + 1e-2) / self.dpi, ) self.canvas = FigureCanvasAgg(fig) # self.canvas = mpl.backends.backend_cairo.FigureCanvasCairo(fig) ax = fig.add_axes([0.0, 0.0, 1.0, 1.0]) ax.axis("off") ax.set_xlim(0.0, self.width) ax.set_ylim(self.height) self.fig = fig self.ax = ax def save(self, filepath): """ Args: filepath (str): a string that contains the absolute path, including the file name, where the visualized image will be saved. """ cv2.imwrite(filepath, self.get_image()[:, :, ::-1]) def get_image(self): """ Returns: ndarray: the visualized image of shape (H, W, 3) (RGB) in uint8 type. The shape is scaled w.r.t the input image using the given `scale` argument. """ canvas = self.canvas s, (width, height) = canvas.print_to_buffer() if (self.width, self.height) != (width, height): img = cv2.resize(self.img, (width, height)) else: img = self.img # buf = io.BytesIO() # works for cairo backend # width, height = self.width, self.height # s = buf.getvalue() buffer = np.frombuffer(s, dtype="uint8") # imshow is slow. blend manually (still quite slow) img_rgba = buffer.reshape(height, width, 4) rgb, alpha = np.split(img_rgba, [3], axis=2) try: import numexpr as ne # fuse them with numexpr visualized_image = ne.evaluate("img * (1 - alpha / 255.0) + rgb * (alpha / 255.0)") except ImportError: alpha = alpha.astype("float32") / 255.0 visualized_image = img * (1 - alpha) + rgb * alpha visualized_image = visualized_image.astype("uint8") return visualized_image class Visualizer: def __init__(self, img_rgb, metadata, scale=1.0, instance_mode=ColorMode.IMAGE): """ Args: img_rgb: a numpy array of shape (H, W, C), where H and W correspond to the height and width of the image respectively. C is the number of color channels. The image is required to be in RGB format since that is a requirement of the Matplotlib library. The image is also expected to be in the range [0, 255]. metadata (MetadataCatalog): image metadata. """ self.img = np.asarray(img_rgb).clip(0, 255).astype(np.uint8) self.metadata = metadata self.output = VisImage(self.img, scale=scale) self.cpu_device = torch.device("cpu") # too small texts are useless, therefore clamp to 9 self._default_font_size = max( np.sqrt(self.output.height * self.output.width) // 90, 10 // scale ) self._instance_mode = instance_mode self._colors = colormap(True,1) def draw_instance_predictions(self, predictions,is_ass= False, labels_align = 'left'): """ Draw instance-level prediction results on an image. Args: predictions (Instances): the output of an instance detection/segmentation model. Following fields will be used to draw: "pred_boxes", "pred_classes", "scores", "pred_masks" (or "pred_masks_rle"). Returns: output (VisImage): image object with visualizations. """ boxes = predictions.pred_boxes if predictions.has("pred_boxes") else None scores = predictions.scores if predictions.has("scores") else None classes = predictions.pred_classes if predictions.has("pred_classes") else None associations = predictions.pred_associations if predictions.has("pred_associations") else None if is_ass: labels = _create_text_labels(classes, scores, ['obj+shad']) else: labels = _create_text_labels(classes, scores, self.metadata.get("thing_classes",None)) keypoints = predictions.pred_keypoints if predictions.has("pred_keypoints") else None if predictions.has("pred_masks"): masks = predictions.pred_masks masks = [GenericMask(x, self.output.height, self.output.width) for x in masks] else: masks = None if self._instance_mode == ColorMode.SEGMENTATION and self.metadata.get("thing_colors"): colors = [ self._jitter([x / 255 for x in self.metadata.thing_colors[c]]) for c in classes ] alpha = 0.8 else: colors = [self._colors[k] for k in associations] alpha = 0.5 if self._instance_mode == ColorMode.IMAGE_BW: self.output.img = self._create_grayscale_image( (predictions.pred_masks.any(dim=0) > 0).numpy() ) alpha = 0.3 self.overlay_instances( masks=masks, boxes=boxes, labels=labels, keypoints=keypoints, assigned_colors=colors, alpha=alpha, labels_align=labels_align, associations= associations ) return self.output def draw_sem_seg(self, sem_seg, area_threshold=None, alpha=0.8): """ Draw semantic segmentation predictions/labels. Args: sem_seg (Tensor or ndarray): the segmentation of shape (H, W). area_threshold (int): segments with less than `area_threshold` are not drawn. alpha (float): the larger it is, the more opaque the segmentations are. Returns: output (VisImage): image object with visualizations. """ if isinstance(sem_seg, torch.Tensor): sem_seg = sem_seg.numpy() labels, areas = np.unique(sem_seg, return_counts=True) sorted_idxs = np.argsort(-areas).tolist() labels = labels[sorted_idxs] for label in labels: try: mask_color = [x / 255 for x in self.metadata.stuff_colors[label]] except (AttributeError, IndexError): mask_color = None binary_mask = (sem_seg == label).astype(np.uint8) text = self.metadata.stuff_classes[label] self.draw_binary_mask( binary_mask, color=mask_color, edge_color=_OFF_WHITE, text=text, alpha=alpha, area_threshold=area_threshold, ) return self.output def draw_panoptic_seg_predictions( self, panoptic_seg, segments_info, area_threshold=None, alpha=0.7 ): """ Draw panoptic prediction results on an image. Args: panoptic_seg (Tensor): of shape (height, width) where the values are ids for each segment. segments_info (list[dict]): Describe each segment in `panoptic_seg`. Each dict contains keys "id", "category_id", "isthing". area_threshold (int): stuff segments with less than `area_threshold` are not drawn. Returns: output (VisImage): image object with visualizations. """ pred = _PanopticPrediction(panoptic_seg, segments_info) if self._instance_mode == ColorMode.IMAGE_BW: self.output.img = self._create_grayscale_image(pred.non_empty_mask()) # draw mask for all semantic segments first i.e. "stuff" for mask, sinfo in pred.semantic_masks(): category_idx = sinfo["category_id"] try: mask_color = [x / 255 for x in self.metadata.stuff_colors[category_idx]] except AttributeError: mask_color = None text = self.metadata.stuff_classes[category_idx] self.draw_binary_mask( mask, color=mask_color, edge_color=_OFF_WHITE, text=text, alpha=alpha, area_threshold=area_threshold, ) # draw mask for all instances second all_instances = list(pred.instance_masks()) if len(all_instances) == 0: return self.output masks, sinfo = list(zip(*all_instances)) category_ids = [x["category_id"] for x in sinfo] try: scores = [x["score"] for x in sinfo] except KeyError: scores = None labels = _create_text_labels(category_ids, scores, self.metadata.thing_classes) try: colors = [random_color(rgb=True, maximum=1) for k in category_ids] except AttributeError: colors = None self.overlay_instances(masks=masks, labels=labels, assigned_colors=colors) return self.output def draw_dataset_dict(self, dic): annos = dic.get("annotations", None) soba_annos = dic.get("association_anno",None) if annos: if "segmentation" in annos[0]: masks = [x["segmentation"] for x in annos] else: masks = None if "keypoints" in annos[0]: keypts = [x["keypoints"] for x in annos] keypts = np.array(keypts).reshape(len(annos), -1, 3) else: keypts = None boxes = [BoxMode.convert(x["bbox"], x["bbox_mode"], BoxMode.XYXY_ABS) for x in annos] colos = [self._colors[i] for i in range(1,int(len(boxes)/2)+1)]*2 labels = [x["category_id"] for x in annos] names = self.metadata.get("thing_classes", None) if names: labels = [names[i] for i in labels] labels = [i + ("|crowd" if a.get("iscrowd", 0) else "") for i, a in zip(labels, annos)] self.overlay_instances(labels=labels, boxes=boxes, masks=masks, keypoints=keypts,assigned_colors=colos) if soba_annos: soba_boxes = [BoxMode.convert(x["bbox"],x["bbox_mode"], BoxMode.XYXY_ABS) for x in soba_annos] colos = colos[:int(len(colos)/2)] soba_labels = [x["category_id"] for x in soba_annos] names = ['obj+shad'] if names: soba_labels = [names[i] for i in soba_labels] self.overlay_instances(labels=soba_labels,boxes=soba_boxes,labels_align='right',assigned_colors=colos) sem_seg = dic.get("sem_seg", None) if sem_seg is None and "sem_seg_file_name" in dic: sem_seg = cv2.imread(dic["sem_seg_file_name"], cv2.IMREAD_GRAYSCALE) if sem_seg is not None: self.draw_sem_seg(sem_seg, area_threshold=0, alpha=0.5) return self.output def overlay_instances( self, *, boxes=None, labels=None, masks=None, keypoints=None, assigned_colors=None, alpha=0.5, labels_align = "left", associations = None ): """ Args: boxes (Boxes or ndarray): either a :class:`Boxes` or a Nx4 numpy array of XYXY_ABS format for the N objects in a single image. labels (list[str]): the text to be displayed for each instance. masks (masks-like object): Supported types are: * `structures.masks.PolygonMasks`, `structures.masks.BitMasks`. * list[list[ndarray]]: contains the segmentation masks for all objects in one image. The first level of the list corresponds to individual instances. The second level to all the polygon that compose the instance, and the third level to the polygon coordinates. The third level should have the format of [x0, y0, x1, y1, ..., xn, yn] (n >= 3). * list[ndarray]: each ndarray is a binary mask of shape (H, W). * list[dict]: each dict is a COCO-style RLE. keypoints (Keypoint or array like): an array-like object of shape (N, K, 3), where the N is the number of instances and K is the number of keypoints. The last dimension corresponds to (x, y, visibility or score). assigned_colors (list[matplotlib.colors]): a list of colors, where each color corresponds to each mask or box in the image. Refer to 'matplotlib.colors' for full list of formats that the colors are accepted in. Returns: output (VisImage): image object with visualizations. """ num_instances = None if boxes is not None: boxes = self._convert_boxes(boxes) num_instances = len(boxes) if masks is not None: masks = self._convert_masks(masks) if num_instances: assert len(masks) == num_instances else: num_instances = len(masks) if keypoints is not None: if num_instances: assert len(keypoints) == num_instances else: num_instances = len(keypoints) keypoints = self._convert_keypoints(keypoints) if labels is not None: assert len(labels) == num_instances if assigned_colors is None: assigned_colors = [random_color(rgb=True, maximum=1) for _ in range(num_instances)] if num_instances == 0: return self.output # Display in largest to smallest order to reduce occlusion. areas = None if boxes is not None: areas = np.prod(boxes[:, 2:] - boxes[:, :2], axis=1) elif masks is not None: areas = np.asarray([x.area() for x in masks]) for i in range(num_instances): if associations is not None: if associations[i] == 0: continue color = assigned_colors[i] if boxes is not None: self.draw_box(boxes[i], edge_color=color) pass if masks is not None: for segment in masks[i].polygons: if labels[i] == 'Shadow': alpha = 0.8 else: alpha = 0.5 self.draw_polygon(segment.reshape(-1, 2), color, alpha=alpha) if labels is not None: # first get a box if boxes is not None: x0, y0, x1, y1 = boxes[i] text_pos = (x0, y0) # if drawing boxes, put text on the box corner. horiz_align = labels_align if horiz_align == 'right': text_pos = (x1,y1-20) elif masks is not None: x0, y0, x1, y1 = masks[i].bbox() # draw text in the center (defined by median) when box is not drawn # median is less sensitive to outliers. text_pos = np.median(masks[i].mask.nonzero(), axis=1)[::-1] horiz_align = "center" else: continue # drawing the box confidence for keypoints isn't very useful. # for small objects, draw text at the side to avoid occlusion instance_area = (y1 - y0) * (x1 - x0) if ( instance_area < _SMALL_OBJECT_AREA_THRESH * self.output.scale or y1 - y0 < 40 * self.output.scale ): if y1 >= self.output.height - 5: text_pos = (x1, y0) else: text_pos = (x0, y1) height_ratio = (y1 - y0) / np.sqrt(self.output.height * self.output.width) lighter_color = self._change_color_brightness(color, brightness_factor=0.7) font_size = ( np.clip((height_ratio - 0.02) / 0.08 + 1, 1.2, 2) * 0.5 * self._default_font_size ) self.draw_text( labels[i], text_pos, color=lighter_color, horizontal_alignment=horiz_align, font_size=font_size, ) # draw keypoints if keypoints is not None: for keypoints_per_instance in keypoints: self.draw_and_connect_keypoints(keypoints_per_instance) return self.output def draw_and_connect_keypoints(self, keypoints): """ Draws keypoints of an instance and follows the rules for keypoint connections to draw lines between appropriate keypoints. This follows color heuristics for line color. Args: keypoints (Tensor): a tensor of shape (K, 3), where K is the number of keypoints and the last dimension corresponds to (x, y, probability). Returns: output (VisImage): image object with visualizations. """ visible = {} for idx, keypoint in enumerate(keypoints): # draw keypoint x, y, prob = keypoint if prob > _KEYPOINT_THRESHOLD: self.draw_circle((x, y), color=_RED) keypoint_name = self.metadata.keypoint_names[idx] visible[keypoint_name] = (x, y) for kp0, kp1, color in self.metadata.keypoint_connection_rules: if kp0 in visible and kp1 in visible: x0, y0 = visible[kp0] x1, y1 = visible[kp1] color = tuple(x / 255.0 for x in color) self.draw_line([x0, x1], [y0, y1], color=color) # draw lines from nose to mid-shoulder and mid-shoulder to mid-hip # Note that this strategy is specific to person keypoints. # For other keypoints, it should just do nothing try: ls_x, ls_y = visible["left_shoulder"] rs_x, rs_y = visible["right_shoulder"] mid_shoulder_x, mid_shoulder_y = (ls_x + rs_x) / 2, (ls_y + rs_y) / 2 except KeyError: pass else: # draw line from nose to mid-shoulder nose_x, nose_y = visible.get("nose", (None, None)) if nose_x is not None: self.draw_line([nose_x, mid_shoulder_x], [nose_y, mid_shoulder_y], color=_RED) try: # draw line from mid-shoulder to mid-hip lh_x, lh_y = visible["left_hip"] rh_x, rh_y = visible["right_hip"] except KeyError: pass else: mid_hip_x, mid_hip_y = (lh_x + rh_x) / 2, (lh_y + rh_y) / 2 self.draw_line([mid_hip_x, mid_shoulder_x], [mid_hip_y, mid_shoulder_y], color=_RED) return self.output """ Primitive drawing functions: """ def draw_text( self, text, position, *, font_size=None, color="g", horizontal_alignment="center" ): """ Args: text (str): class label position (tuple): a tuple of the x and y coordinates to place text on image. font_size (int, optional): font of the text. If not provided, a font size proportional to the image width is calculated and used. color: color of the text. Refer to `matplotlib.colors` for full list of formats that are accepted. horizontal_alignment (str): see `matplotlib.text.Text` Returns: output (VisImage): image object with text drawn. """ if not font_size: font_size = self._default_font_size # since the text background is dark, we don't want the text to be dark color = np.maximum(list(mplc.to_rgb(color)), 0.2) color[np.argmax(color)] = max(0.8, np.max(color)) x, y = position self.output.ax.text( x, y, text, size=font_size * self.output.scale, family="sans-serif", bbox={"facecolor": "black", "alpha": 0.8, "pad": 0.7, "edgecolor": "none"}, verticalalignment="top", horizontalalignment=horizontal_alignment, color=color, zorder=10, ) return self.output def draw_box(self, box_coord, alpha=0.5, edge_color="g", line_style="-"): """ Args: box_coord (tuple): a tuple containing x0, y0, x1, y1 coordinates, where x0 and y0 are the coordinates of the image's top left corner. x1 and y1 are the coordinates of the image's bottom right corner. alpha (float): blending efficient. Smaller values lead to more transparent masks. edge_color: color of the outline of the box. Refer to `matplotlib.colors` for full list of formats that are accepted. line_style (string): the string to use to create the outline of the boxes. Returns: output (VisImage): image object with box drawn. """ x0, y0, x1, y1 = box_coord width = x1 - x0 height = y1 - y0 linewidth = max(5,1) self.output.ax.add_patch( mpl.patches.Rectangle( (x0, y0), width, height, fill=False, edgecolor=edge_color, linewidth=linewidth * self.output.scale, alpha=alpha, linestyle=line_style, ) ) return self.output def draw_circle(self, circle_coord, color, radius=3): """ Args: circle_coord (list(int) or tuple(int)): contains the x and y coordinates of the center of the circle. color: color of the polygon. Refer to `matplotlib.colors` for a full list of formats that are accepted. radius (int): radius of the circle. Returns: output (VisImage): image object with box drawn. """ x, y = circle_coord self.output.ax.add_patch( mpl.patches.Circle(circle_coord, radius=radius, fill=True, color=color) ) return self.output def draw_line(self, x_data, y_data, color): """ Args: x_data (list[int]): a list containing x values of all the points being drawn. Length of list should match the length of y_data. y_data (list[int]): a list containing y values of all the points being drawn. Length of list should match the length of x_data. color: color of the line. Refer to `matplotlib.colors` for a full list of formats that are accepted. Returns: output (VisImage): image object with line drawn. """ linewidth = max(self._default_font_size / 3, 1) self.output.ax.add_line( mpl.lines.Line2D(x_data, y_data, linewidth=linewidth * self.output.scale, color=color) ) return self.output def draw_binary_mask( self, binary_mask, color=None, *, edge_color=None, text=None, alpha=0.5, area_threshold=4096 ): """ Args: binary_mask (ndarray): numpy array of shape (H, W), where H is the image height and W is the image width. Each value in the array is either a 0 or 1 value of uint8 type. color: color of the mask. Refer to `matplotlib.colors` for a full list of formats that are accepted. If None, will pick a random color. edge_color: color of the polygon edges. Refer to `matplotlib.colors` for a full list of formats that are accepted. text (str): if None, will be drawn in the object's center of mass. alpha (float): blending efficient. Smaller values lead to more transparent masks. area_threshold (float): a connected component small than this will not be shown. Returns: output (VisImage): image object with mask drawn. """ if color is None: color = random_color(rgb=True, maximum=1) if area_threshold is None: area_threshold = 4096 has_valid_segment = False binary_mask = binary_mask.astype("uint8") # opencv needs uint8 mask = GenericMask(binary_mask, self.output.height, self.output.width) shape2d = (binary_mask.shape[0], binary_mask.shape[1]) if not mask.has_holes: # draw polygons for regular masks for segment in mask.polygons: area = mask_util.area(mask_util.frPyObjects([segment], shape2d[0], shape2d[1])) if area < area_threshold: continue has_valid_segment = True segment = segment.reshape(-1, 2) self.draw_polygon(segment, color=color, edge_color=edge_color, alpha=alpha) else: rgba = np.zeros(shape2d + (4,), dtype="float32") rgba[:, :, :3] = color rgba[:, :, 3] = (mask.mask == 1).astype("float32") * alpha has_valid_segment = True self.output.ax.imshow(rgba) if text is not None and has_valid_segment: # TODO sometimes drawn on wrong objects. the heuristics here can improve. lighter_color = self._change_color_brightness(color, brightness_factor=0.7) _num_cc, cc_labels, stats, centroids = cv2.connectedComponentsWithStats(binary_mask, 8) largest_component_id = np.argmax(stats[1:, -1]) + 1 # draw text on the largest component, as well as other very large components. for cid in range(1, _num_cc): if cid == largest_component_id or stats[cid, -1] > _LARGE_MASK_AREA_THRESH: # median is more stable than centroid # center = centroids[largest_component_id] center = np.median((cc_labels == cid).nonzero(), axis=1)[::-1] self.draw_text(text, center, color=lighter_color) return self.output def draw_polygon(self, segment, color, edge_color=None, alpha=0.5): """ Args: segment: numpy array of shape Nx2, containing all the points in the polygon. color: color of the polygon. Refer to `matplotlib.colors` for a full list of formats that are accepted. edge_color: color of the polygon edges. Refer to `matplotlib.colors` for a full list of formats that are accepted. If not provided, a darker shade of the polygon color will be used instead. alpha (float): blending efficient. Smaller values lead to more transparent masks. Returns: output (VisImage): image object with polygon drawn. """ if edge_color is None: # make edge color darker than the polygon color if alpha > 0.8: edge_color = self._change_color_brightness(color, brightness_factor=-0.7) else: edge_color = color edge_color = mplc.to_rgb(edge_color) + (1,) polygon = mpl.patches.Polygon( segment, fill=True, facecolor=mplc.to_rgb(color) + (alpha,), edgecolor=edge_color, linewidth=max(self._default_font_size // 15 * self.output.scale, 1), ) self.output.ax.add_patch(polygon) return self.output """ Internal methods: """ def _jitter(self, color): """ Randomly modifies given color to produce a slightly different color than the color given. Args: color (tuple[double]): a tuple of 3 elements, containing the RGB values of the color picked. The values in the list are in the [0.0, 1.0] range. Returns: jittered_color (tuple[double]): a tuple of 3 elements, containing the RGB values of the color after being jittered. The values in the list are in the [0.0, 1.0] range. """ color = mplc.to_rgb(color) vec = np.random.rand(3) # better to do it in another color space vec = vec / np.linalg.norm(vec) * 0.5 res = np.clip(vec + color, 0, 1) return tuple(res) def _create_grayscale_image(self, mask=None): """ Create a grayscale version of the original image. The colors in masked area, if given, will be kept. """ img_bw = self.img.astype("f4").mean(axis=2) img_bw = np.stack([img_bw] * 3, axis=2) if mask is not None: img_bw[mask] = self.img[mask] return img_bw def _change_color_brightness(self, color, brightness_factor): """ Depending on the brightness_factor, gives a lighter or darker color i.e. a color with less or more saturation than the original color. Args: color: color of the polygon. Refer to `matplotlib.colors` for a full list of formats that are accepted. brightness_factor (float): a value in [-1.0, 1.0] range. A lightness factor of 0 will correspond to no change, a factor in [-1.0, 0) range will result in a darker color and a factor in (0, 1.0] range will result in a lighter color. Returns: modified_color (tuple[double]): a tuple containing the RGB values of the modified color. Each value in the tuple is in the [0.0, 1.0] range. """ assert brightness_factor >= -1.0 and brightness_factor <= 1.0 color = mplc.to_rgb(color) polygon_color = colorsys.rgb_to_hls(*mplc.to_rgb(color)) modified_lightness = polygon_color[1] + (brightness_factor * polygon_color[1]) modified_lightness = 0.0 if modified_lightness < 0.0 else modified_lightness modified_lightness = 1.0 if modified_lightness > 1.0 else modified_lightness modified_color = colorsys.hls_to_rgb(polygon_color[0], modified_lightness, polygon_color[2]) return modified_color def _convert_boxes(self, boxes): """ Convert different format of boxes to a Nx4 array. """ if isinstance(boxes, Boxes): return boxes.tensor.numpy() else: return np.asarray(boxes) def _convert_masks(self, masks_or_polygons): """ Convert different format of masks or polygons to a tuple of masks and polygons. Returns: list[GenericMask]: """ m = masks_or_polygons if isinstance(m, PolygonMasks): m = m.polygons if isinstance(m, BitMasks): m = m.tensor.numpy() if isinstance(m, torch.Tensor): m = m.numpy() ret = [] for x in m: if isinstance(x, GenericMask): ret.append(x) else: ret.append(GenericMask(x, self.output.height, self.output.width)) return ret def _convert_keypoints(self, keypoints): if isinstance(keypoints, Keypoints): keypoints = keypoints.tensor keypoints = np.asarray(keypoints) return keypoints def get_output(self): """ Returns: output (VisImage): the image output containing the visualizations added to the image. """ return self.output ================================================ FILE: dev/README.md ================================================ ## Some scripts for developers to use, include: - `linter.sh`: lint the codebase before commit - `run_{inference,instant}_tests.sh`: run inference/training for a few iterations. Note that these tests require 2 GPUs. - `parse_results.sh`: parse results from a log file. ================================================ FILE: dev/linter.sh ================================================ #!/bin/bash -e # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # Run this script at project root by "./dev/linter.sh" before you commit vergte() { [ "$2" = "$(echo -e "$1\n$2" | sort -V | head -n1)" ] } { black --version | grep "19.3b0" > /dev/null } || { echo "Linter requires black==19.3b0 !" exit 1 } ISORT_TARGET_VERSION="4.3.21" ISORT_VERSION=$(isort -v | grep VERSION | awk '{print $2}') vergte "$ISORT_VERSION" "$ISORT_TARGET_VERSION" || { echo "Linter requires isort>=${ISORT_TARGET_VERSION} !" exit 1 } set -v echo "Running isort ..." isort -y -sp . --atomic echo "Running black ..." black -l 100 . echo "Running flake8 ..." if [ -x "$(command -v flake8-3)" ]; then flake8-3 . else python3 -m flake8 . fi # echo "Running mypy ..." # Pytorch does not have enough type annotations # mypy detectron2/solver detectron2/structures detectron2/config echo "Running clang-format ..." find . -regex ".*\.\(cpp\|c\|cc\|cu\|cxx\|h\|hh\|hpp\|hxx\|tcc\|mm\|m\)" -print0 | xargs -0 clang-format -i command -v arc > /dev/null && arc lint ================================================ FILE: dev/packaging/README.md ================================================ ## To build a cu101 wheel for release: ``` $ nvidia-docker run -it --storage-opt "size=20GB" --name pt pytorch/manylinux-cuda101 # inside the container: # git clone https://github.com/facebookresearch/detectron2/ # cd detectron2 # export CU_VERSION=cu101 D2_VERSION_SUFFIX= PYTHON_VERSION=3.7 PYTORCH_VERSION=1.4 # ./dev/packaging/build_wheel.sh ``` ## To build all wheels for `CUDA {9.2,10.0,10.1}` x `Python {3.6,3.7,3.8}`: ``` ./dev/packaging/build_all_wheels.sh ./dev/packaging/gen_wheel_index.sh /path/to/wheels ``` ================================================ FILE: dev/packaging/build_all_wheels.sh ================================================ #!/bin/bash -e PYTORCH_VERSION=1.4 build_for_one_cuda() { cu=$1 case "$cu" in cu*) container_name=manylinux-cuda${cu/cu/} ;; cpu) container_name=manylinux-cuda101 ;; *) echo "Unrecognized cu=$cu" exit 1 ;; esac echo "Launching container $container_name ..." for py in 3.6 3.7 3.8; do docker run -itd \ --name $container_name \ --mount type=bind,source="$(pwd)",target=/detectron2 \ pytorch/$container_name cat </dev/null 2>&1 && pwd )" . "$script_dir/pkg_helpers.bash" echo "Build Settings:" echo "CU_VERSION: $CU_VERSION" # e.g. cu100 echo "D2_VERSION_SUFFIX: $D2_VERSION_SUFFIX" # e.g. +cu100 or "" echo "PYTHON_VERSION: $PYTHON_VERSION" # e.g. 3.6 echo "PYTORCH_VERSION: $PYTORCH_VERSION" # e.g. 1.4 setup_cuda setup_wheel_python export TORCH_VERSION_SUFFIX="+$CU_VERSION" if [[ "$CU_VERSION" == "cu101" ]]; then export TORCH_VERSION_SUFFIX="" fi pip_install pip numpy -U pip_install "torch==$PYTORCH_VERSION$TORCH_VERSION_SUFFIX" \ -f https://download.pytorch.org/whl/$CU_VERSION/torch_stable.html # use separate directories to allow parallel build BASE_BUILD_DIR=build/$CU_VERSION/$PYTHON_VERSION python setup.py \ build -b $BASE_BUILD_DIR \ bdist_wheel -b $BASE_BUILD_DIR/build_dist -d wheels/$CU_VERSION ================================================ FILE: dev/packaging/gen_wheel_index.sh ================================================ #!/bin/bash -e root=$1 if [[ -z "$root" ]]; then echo "Usage: ./gen_wheel_index.sh /path/to/wheels" exit fi index=$root/index.html cd "$root" for cu in cpu cu92 cu100 cu101; do cd $cu for whl in *.whl; do echo "$whl
" done > index.html cd "$root" done for whl in $(find . -type f -name '*.whl' -printf '%P\n' | sort); do echo "$whl
" done > "$index" ================================================ FILE: dev/packaging/pkg_helpers.bash ================================================ #!/bin/bash -e # Function to retry functions that sometimes timeout or have flaky failures retry () { $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*) } # Install with pip a bit more robustly than the default pip_install() { retry pip install --progress-bar off "$@" } setup_cuda() { # Now work out the CUDA settings # Like other torch domain libraries, we choose common GPU architectures only. export FORCE_CUDA=1 case "$CU_VERSION" in cu101) export CUDA_HOME=/usr/local/cuda-10.1/ export TORCH_CUDA_ARCH_LIST="3.5;3.7;5.0;5.2;6.0+PTX;6.1+PTX;7.0+PTX;7.5+PTX" ;; cu100) export CUDA_HOME=/usr/local/cuda-10.0/ export TORCH_CUDA_ARCH_LIST="3.5;3.7;5.0;5.2;6.0+PTX;6.1+PTX;7.0+PTX;7.5+PTX" ;; cu92) export CUDA_HOME=/usr/local/cuda-9.2/ export TORCH_CUDA_ARCH_LIST="3.5;3.7;5.0;5.2;6.0+PTX;6.1+PTX;7.0+PTX" ;; cpu) unset FORCE_CUDA export CUDA_VISIBLE_DEVICES= ;; *) echo "Unrecognized CU_VERSION=$CU_VERSION" exit 1 ;; esac } setup_wheel_python() { case "$PYTHON_VERSION" in 3.6) python_abi=cp36-cp36m ;; 3.7) python_abi=cp37-cp37m ;; 3.8) python_abi=cp38-cp38 ;; *) echo "Unrecognized PYTHON_VERSION=$PYTHON_VERSION" exit 1 ;; esac export PATH="/opt/python/$python_abi/bin:$PATH" } ================================================ FILE: dev/parse_results.sh ================================================ #!/bin/bash # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # A shell script that parses metrics from the log file. # Make it easier for developers to track performance of models. LOG="$1" if [[ -z "$LOG" ]]; then echo "Usage: $0 /path/to/log/file" exit 1 fi # [12/15 11:47:32] trainer INFO: Total training time: 12:15:04.446477 (0.4900 s / it) # [12/15 11:49:03] inference INFO: Total inference time: 0:01:25.326167 (0.13652186737060548 s / img per device, on 8 devices) # [12/15 11:49:03] inference INFO: Total inference pure compute time: ..... # training time trainspeed=$(grep -o 'Overall training.*' "$LOG" | grep -Eo '\(.*\)' | grep -o '[0-9\.]*') echo "Training speed: $trainspeed s/it" # inference time: there could be multiple inference during training inferencespeed=$(grep -o 'Total inference pure.*' "$LOG" | tail -n1 | grep -Eo '\(.*\)' | grep -o '[0-9\.]*' | head -n1) echo "Inference speed: $inferencespeed s/it" # [12/15 11:47:18] trainer INFO: eta: 0:00:00 iter: 90000 loss: 0.5407 (0.7256) loss_classifier: 0.1744 (0.2446) loss_box_reg: 0.0838 (0.1160) loss_mask: 0.2159 (0.2722) loss_objectness: 0.0244 (0.0429) loss_rpn_box_reg: 0.0279 (0.0500) time: 0.4487 (0.4899) data: 0.0076 (0.0975) lr: 0.000200 max mem: 4161 memory=$(grep -o 'max[_ ]mem: [0-9]*' "$LOG" | tail -n1 | grep -o '[0-9]*') echo "Training memory: $memory MB" echo "Easy to copypaste:" echo "$trainspeed","$inferencespeed","$memory" echo "------------------------------" # [12/26 17:26:32] engine.coco_evaluation: copypaste: Task: bbox # [12/26 17:26:32] engine.coco_evaluation: copypaste: AP,AP50,AP75,APs,APm,APl # [12/26 17:26:32] engine.coco_evaluation: copypaste: 0.0017,0.0024,0.0017,0.0005,0.0019,0.0011 # [12/26 17:26:32] engine.coco_evaluation: copypaste: Task: segm # [12/26 17:26:32] engine.coco_evaluation: copypaste: AP,AP50,AP75,APs,APm,APl # [12/26 17:26:32] engine.coco_evaluation: copypaste: 0.0014,0.0021,0.0016,0.0005,0.0016,0.0011 echo "COCO Results:" num_tasks=$(grep -o 'copypaste:.*Task.*' "$LOG" | sort -u | wc -l) # each task has 3 lines grep -o 'copypaste:.*' "$LOG" | cut -d ' ' -f 2- | tail -n $((num_tasks * 3)) ================================================ FILE: dev/run_inference_tests.sh ================================================ #!/bin/bash -e # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved BIN="python tools/train_net.py" OUTPUT="inference_test_output" NUM_GPUS=2 CFG_LIST=( "${@:1}" ) if [ ${#CFG_LIST[@]} -eq 0 ]; then CFG_LIST=( ./configs/quick_schedules/*inference_acc_test.yaml ) fi echo "========================================================================" echo "Configs to run:" echo "${CFG_LIST[@]}" echo "========================================================================" for cfg in "${CFG_LIST[@]}"; do echo "========================================================================" echo "Running $cfg ..." echo "========================================================================" $BIN \ --eval-only \ --num-gpus $NUM_GPUS \ --config-file "$cfg" \ OUTPUT_DIR $OUTPUT rm -rf $OUTPUT done echo "========================================================================" echo "Running demo.py ..." echo "========================================================================" DEMO_BIN="python demo/demo.py" COCO_DIR=datasets/coco/val2014 mkdir -pv $OUTPUT set -v $DEMO_BIN --config-file ./configs/quick_schedules/panoptic_fpn_R_50_inference_acc_test.yaml \ --input $COCO_DIR/COCO_val2014_0000001933* --output $OUTPUT rm -rf $OUTPUT ================================================ FILE: dev/run_instant_tests.sh ================================================ #!/bin/bash -e # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved BIN="python tools/train_net.py" OUTPUT="instant_test_output" NUM_GPUS=2 CFG_LIST=( "${@:1}" ) if [ ${#CFG_LIST[@]} -eq 0 ]; then CFG_LIST=( ./configs/quick_schedules/*instant_test.yaml ) fi echo "========================================================================" echo "Configs to run:" echo "${CFG_LIST[@]}" echo "========================================================================" for cfg in "${CFG_LIST[@]}"; do echo "========================================================================" echo "Running $cfg ..." echo "========================================================================" $BIN --num-gpus $NUM_GPUS --config-file "$cfg" \ SOLVER.IMS_PER_BATCH $(($NUM_GPUS * 2)) \ OUTPUT_DIR "$OUTPUT" rm -rf "$OUTPUT" done ================================================ FILE: docker/Dockerfile ================================================ FROM nvidia/cuda:10.0-cudnn7-devel ENV DEBIAN_FRONTEND noninteractive RUN apt-get update && apt-get install -y \ python3-opencv ca-certificates python3-dev git wget sudo \ cmake ninja-build protobuf-compiler libprotobuf-dev && \ rm -rf /var/lib/apt/lists/* RUN ln -sv /usr/bin/python3 /usr/bin/python RUN wget https://bootstrap.pypa.io/get-pip.py && \ python3 get-pip.py && \ rm get-pip.py # install dependencies # See https://pytorch.org/ for other options if you use a different version of CUDA RUN pip install tensorboard cython jupyter scikit-image numpy opencv-python RUN pip install torch==1.3.0+cu100 torchvision==0.4.1+cu100 -f https://download.pytorch.org/whl/torch_stable.html RUN pip install --user 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI' RUN pip install --user 'git+https://github.com/facebookresearch/fvcore' # set FORCE_CUDA because during `docker build` cuda is not accessible ENV FORCE_CUDA="1" # This will by default build detectron2 for all common cuda architectures and take a lot more time, # because inside `docker build`, there is no way to tell which architecture will be used. ARG TORCH_CUDA_ARCH_LIST="Kepler;Kepler+Tesla;Maxwell;Maxwell+Tegra;Pascal;Volta;Turing" ENV TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST}" #RUN pip install --user -e detectron2_repo # Set a fixed model cache directory. #ENV FVCORE_CACHE="/tmp" WORKDIR /home/ISD/ # Install Instance Shadow Detection RUN git clone https://github.com/stevewongv/InstanceShadowDetection.git RUN cd InstanceShadowDetection && python setup.py install RUN cd InstanceShadowDetection/PythonAPI && python setup.py install ================================================ FILE: docker/Dockerfile-circleci ================================================ FROM nvidia/cuda:10.1-cudnn7-devel # This dockerfile only aims to provide an environment for unittest on CircleCI ENV DEBIAN_FRONTEND noninteractive RUN apt-get update && apt-get install -y \ python3-opencv ca-certificates python3-dev git wget sudo && \ rm -rf /var/lib/apt/lists/* RUN wget -q https://bootstrap.pypa.io/get-pip.py && \ python3 get-pip.py && \ rm get-pip.py # install dependencies # See https://pytorch.org/ for other options if you use a different version of CUDA RUN pip install torch torchvision tensorboard cython RUN pip install 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI' ================================================ FILE: docker/docker-compose.yml ================================================ version: "2.3" services: detectron2: build: context: . dockerfile: Dockerfile args: USER_ID: ${USER_ID:-1000} runtime: nvidia # TODO: Exchange with "gpu: all" in the future (see https://github.com/facebookresearch/detectron2/pull/197/commits/00545e1f376918db4a8ce264d427a07c1e896c5a). shm_size: "8gb" ulimits: memlock: -1 stack: 67108864 volumes: - /tmp/.X11-unix:/tmp/.X11-unix:ro environment: - DISPLAY=$DISPLAY - NVIDIA_VISIBLE_DEVICES=all ================================================ FILE: docs/.gitignore ================================================ _build ================================================ FILE: docs/Makefile ================================================ # Minimal makefile for Sphinx documentation # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build SOURCEDIR = . BUILDDIR = _build # Put it first so that "make" without argument is like "make help". help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) .PHONY: help Makefile # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) ================================================ FILE: docs/README.md ================================================ # Read the docs: The latest documentation built from this directory is available at [detectron2.readthedocs.io](https://detectron2.readthedocs.io/). Documents in this directory are not meant to be read on github. # Build the docs: 1. Install detectron2 according to [INSTALL.md](INSTALL.md). 2. Install additional libraries required to build docs: - docutils>=0.14 - Sphinx>=1.7 - recommonmark==0.4.0 - sphinx_rtd_theme - mock 3. Run `make html` from this directory. ================================================ FILE: docs/conf.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # flake8: noqa # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # import os import sys import mock # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # import sphinx_rtd_theme # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # # to support markdown from recommonmark.parser import CommonMarkParser sys.path.insert(0, os.path.abspath("../")) DEPLOY = os.environ.get("READTHEDOCS") == "True" # -- Project information ----------------------------------------------------- try: import torch # noqa except ImportError: for m in [ "torch", "torchvision", "torch.nn", "torch.nn.parallel", "torch.distributed", "torch.multiprocessing", "torch.autograd", "torch.autograd.function", "torch.nn.modules", "torch.nn.modules.utils", "torch.utils", "torch.utils.data", "torch.onnx", "torchvision", "torchvision.ops", ]: sys.modules[m] = mock.Mock(name=m) for m in [ "cv2", "scipy", "portalocker", "detectron2._C", "pycocotools", "pycocotools.mask", "pycocotools.coco", "pycocotools.cocoeval", "google", "google.protobuf", "google.protobuf.internal", "onnx", "caffe2", "caffe2.proto", "caffe2.python", "caffe2.python.utils", "caffe2.python.onnx", "caffe2.python.onnx.backend", ]: sys.modules[m] = mock.Mock(name=m) sys.modules["cv2"].__version__ = "3.4" import detectron2 # isort: skip project = "detectron2" copyright = "2019, detectron2 contributors" author = "detectron2 contributors" # The short X.Y version version = detectron2.__version__ # The full version, including alpha/beta/rc tags release = version # -- General configuration --------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. # needs_sphinx = "1.7" # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ "sphinx.ext.autodoc", "sphinx.ext.napoleon", "sphinx.ext.intersphinx", "sphinx.ext.todo", "sphinx.ext.coverage", "sphinx.ext.mathjax", "sphinx.ext.viewcode", "sphinx.ext.githubpages", ] # -- Configurations for plugins ------------ napoleon_google_docstring = True napoleon_include_init_with_doc = True napoleon_include_special_with_doc = True napoleon_numpy_docstring = False napoleon_use_rtype = False autodoc_inherit_docstrings = False autodoc_member_order = "bysource" if DEPLOY: intersphinx_timeout = 10 else: # skip this when building locally intersphinx_timeout = 0.1 intersphinx_mapping = { "python": ("https://docs.python.org/3.6", None), "numpy": ("https://docs.scipy.org/doc/numpy/", None), "torch": ("https://pytorch.org/docs/master/", None), } # ------------------------- # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] source_parsers = {".md": CommonMarkParser} source_suffix = [".rst", ".md"] # The master toctree document. master_doc = "index" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. language = None # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "build", "README.md"] # The name of the Pygments (syntax highlighting) style to use. pygments_style = "sphinx" # -- Options for HTML output ------------------------------------------------- html_theme = "sphinx_rtd_theme" html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # # html_theme_options = {} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] # Custom sidebar templates, must be a dictionary that maps document names # to template names. # # The default sidebars (for documents that don't match any pattern) are # defined by theme itself. Builtin themes are using these templates by # default: ``['localtoc.html', 'relations.html', 'sourcelink.html', # 'searchbox.html']``. # # html_sidebars = {} # -- Options for HTMLHelp output --------------------------------------------- # Output file base name for HTML help builder. htmlhelp_basename = "detectron2doc" # -- Options for LaTeX output ------------------------------------------------ latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. # # 'preamble': '', # Latex figure (float) alignment # # 'figure_align': 'htbp', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ (master_doc, "detectron2.tex", "detectron2 Documentation", "detectron2 contributors", "manual") ] # -- Options for manual page output ------------------------------------------ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [(master_doc, "detectron2", "detectron2 Documentation", [author], 1)] # -- Options for Texinfo output ---------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ( master_doc, "detectron2", "detectron2 Documentation", author, "detectron2", "One line description of project.", "Miscellaneous", ) ] # -- Options for todo extension ---------------------------------------------- # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True _DEPRECATED_NAMES = set() def autodoc_skip_member(app, what, name, obj, skip, options): # we hide something deliberately if getattr(obj, "__HIDE_SPHINX_DOC__", False): return True # Hide some names that are deprecated or not intended to be used if name in _DEPRECATED_NAMES: return True return None def url_resolver(url): if ".html" not in url: url = url.replace("../", "") return "https://github.com/facebookresearch/detectron2/blob/master/" + url else: if DEPLOY: return "http://detectron2.readthedocs.io/" + url else: return "/" + url def setup(app): from recommonmark.transform import AutoStructify app.connect("autodoc-skip-member", autodoc_skip_member) # app.connect('autodoc-skip-member', autodoc_skip_member) app.add_config_value( "recommonmark_config", { "url_resolver": url_resolver, "auto_toc_tree_section": "Contents", "enable_math": True, "enable_inline_math": True, "enable_eval_rst": True, }, True, ) app.add_transform(AutoStructify) ================================================ FILE: docs/index.rst ================================================ .. detectron2 documentation master file, created by sphinx-quickstart on Sat Sep 21 13:46:45 2019. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to detectron2's documentation! ====================================== .. toctree:: :maxdepth: 2 tutorials/index notes/index modules/index ================================================ FILE: docs/modules/checkpoint.rst ================================================ detectron2.checkpoint package ============================= .. automodule:: detectron2.checkpoint :members: :undoc-members: :show-inheritance: ================================================ FILE: docs/modules/config.rst ================================================ detectron2.config package ========================= .. automodule:: detectron2.config :members: :undoc-members: :show-inheritance: :inherited-members: Config References ----------------- .. literalinclude:: ../../detectron2/config/defaults.py :language: python :linenos: :lines: 4- ================================================ FILE: docs/modules/data.rst ================================================ detectron2.data package ======================= .. automodule:: detectron2.data :members: :undoc-members: :show-inheritance: detectron2.data.detection\_utils module --------------------------------------- .. automodule:: detectron2.data.detection_utils :members: :undoc-members: :show-inheritance: detectron2.data.datasets module --------------------------------------- .. automodule:: detectron2.data.datasets :members: :undoc-members: :show-inheritance: detectron2.data.samplers module --------------------------------------- .. automodule:: detectron2.data.samplers :members: :undoc-members: :show-inheritance: detectron2.data.transforms module --------------------------------------- .. automodule:: detectron2.data.transforms :members: :undoc-members: :show-inheritance: ================================================ FILE: docs/modules/engine.rst ================================================ detectron2.engine package ========================= .. automodule:: detectron2.engine :members: :undoc-members: :show-inheritance: detectron2.engine.defaults module --------------------------------- .. automodule:: detectron2.engine.defaults :members: :undoc-members: :show-inheritance: detectron2.engine.hooks module --------------------------------- .. automodule:: detectron2.engine.hooks :members: :undoc-members: :show-inheritance: ================================================ FILE: docs/modules/evaluation.rst ================================================ detectron2.evaluation package ============================= .. automodule:: detectron2.evaluation :members: :undoc-members: :show-inheritance: ================================================ FILE: docs/modules/export.rst ================================================ detectron2.export package ========================= .. automodule:: detectron2.export :members: :undoc-members: :show-inheritance: ================================================ FILE: docs/modules/index.rst ================================================ API Documentation ================== .. toctree:: checkpoint config data engine evaluation layers model_zoo modeling solver structures utils export ================================================ FILE: docs/modules/layers.rst ================================================ detectron2.layers package ========================= .. automodule:: detectron2.layers :members: :undoc-members: :show-inheritance: ================================================ FILE: docs/modules/model_zoo.rst ================================================ detectron2.model_zoo package ============================ .. automodule:: detectron2.model_zoo :members: :undoc-members: :show-inheritance: ================================================ FILE: docs/modules/modeling.rst ================================================ detectron2.modeling package =========================== .. automodule:: detectron2.modeling :members: :undoc-members: :show-inheritance: detectron2.modeilng.poolers module --------------------------------------- .. automodule:: detectron2.modeling.poolers :members: :undoc-members: :show-inheritance: detectron2.modeilng.sampling module ------------------------------------ .. automodule:: detectron2.modeling.sampling :members: :undoc-members: :show-inheritance: detectron2.modeilng.box_regression module ------------------------------------------ .. automodule:: detectron2.modeling.box_regression :members: :undoc-members: :show-inheritance: Model Registries ----------------- These are different registries provided in modeling. Each registry provide you the ability to replace it with your customized component, without having to modify detectron2's code. Note that it is impossible to allow users to customize any line of code directly. Even just to add one line at some place, you'll likely need to find out the smallest registry which contains that line, and register your component to that registry. .. autodata:: detectron2.modeling.META_ARCH_REGISTRY .. autodata:: detectron2.modeling.BACKBONE_REGISTRY .. autodata:: detectron2.modeling.PROPOSAL_GENERATOR_REGISTRY .. autodata:: detectron2.modeling.RPN_HEAD_REGISTRY .. autodata:: detectron2.modeling.ANCHOR_GENERATOR_REGISTRY .. autodata:: detectron2.modeling.ROI_HEADS_REGISTRY .. autodata:: detectron2.modeling.ROI_BOX_HEAD_REGISTRY .. autodata:: detectron2.modeling.ROI_MASK_HEAD_REGISTRY .. autodata:: detectron2.modeling.ROI_KEYPOINT_HEAD_REGISTRY ================================================ FILE: docs/modules/solver.rst ================================================ detectron2.solver package ========================= .. automodule:: detectron2.solver :members: :undoc-members: :show-inheritance: ================================================ FILE: docs/modules/structures.rst ================================================ detectron2.structures package ============================= .. automodule:: detectron2.structures :members: :undoc-members: :show-inheritance: ================================================ FILE: docs/modules/utils.rst ================================================ detectron2.utils package ======================== detectron2.utils.colormap module -------------------------------- .. automodule:: detectron2.utils.colormap :members: :undoc-members: :show-inheritance: detectron2.utils.comm module ---------------------------- .. automodule:: detectron2.utils.comm :members: :undoc-members: :show-inheritance: detectron2.utils.events module ------------------------------ .. automodule:: detectron2.utils.events :members: :undoc-members: :show-inheritance: detectron2.utils.logger module ------------------------------ .. automodule:: detectron2.utils.logger :members: :undoc-members: :show-inheritance: detectron2.utils.registry module -------------------------------- .. automodule:: detectron2.utils.registry :members: :undoc-members: :show-inheritance: detectron2.utils.memory module ---------------------------------- .. automodule:: detectron2.utils.memory :members: :undoc-members: :show-inheritance: detectron2.utils.video\_visualizer module ----------------------------------------- .. automodule:: detectron2.utils.video_visualizer :members: :undoc-members: :show-inheritance: detectron2.utils.visualizer module ---------------------------------- .. automodule:: detectron2.utils.visualizer :members: :undoc-members: :show-inheritance: ================================================ FILE: docs/notes/benchmarks.md ================================================ # Benchmarks Here we benchmark the training speed of a Mask R-CNN in detectron2, with some other popular open source Mask R-CNN implementations. ### Settings * Hardware: 8 NVIDIA V100s with NVLink. * Software: Python 3.7, CUDA 10.0, cuDNN 7.6.4, PyTorch 1.3.0 (at [this link](https://download.pytorch.org/whl/nightly/cu100/torch-1.3.0%2Bcu100-cp37-cp37m-linux_x86_64.whl)), TensorFlow 1.15.0rc2, Keras 2.2.5, MxNet 1.6.0b20190820. * Model: an end-to-end R-50-FPN Mask-RCNN model, using the same hyperparameter as the [Detectron baseline config](https://github.com/facebookresearch/Detectron/blob/master/configs/12_2017_baselines/e2e_mask_rcnn_R-50-FPN_1x.yaml). * Metrics: We use the average throughput in iterations 100-500 to skip GPU warmup time. Note that for R-CNN-style models, the throughput of a model typically changes during training, because it depends on the predictions of the model. Therefore this metric is not directly comparable with "train speed" in model zoo, which is the average speed of the entire training run. ### Main Results ```eval_rst +-------------------------------+--------------------+ | Implementation | Throughput (img/s) | +===============================+====================+ | |D2| |PT| | 59 | +-------------------------------+--------------------+ | maskrcnn-benchmark_ |PT| | 51 | +-------------------------------+--------------------+ | tensorpack_ |TF| | 50 | +-------------------------------+--------------------+ | mmdetection_ |PT| | 41 | +-------------------------------+--------------------+ | simpledet_ |mxnet| | 39 | +-------------------------------+--------------------+ | Detectron_ |C2| | 19 | +-------------------------------+--------------------+ | `matterport/Mask_RCNN`__ |TF| | 14 | +-------------------------------+--------------------+ .. _maskrcnn-benchmark: https://github.com/facebookresearch/maskrcnn-benchmark/ .. _tensorpack: https://github.com/tensorpack/tensorpack/tree/master/examples/FasterRCNN .. _mmdetection: https://github.com/open-mmlab/mmdetection/ .. _simpledet: https://github.com/TuSimple/simpledet/ .. _Detectron: https://github.com/facebookresearch/Detectron __ https://github.com/matterport/Mask_RCNN/ .. |D2| image:: https://github.com/facebookresearch/detectron2/raw/master/.github/Detectron2-Logo-Horz.svg?sanitize=true :height: 15pt :target: https://github.com/facebookresearch/detectron2/ .. |PT| image:: https://pytorch.org/assets/images/logo-icon.svg :width: 15pt :height: 15pt :target: https://pytorch.org .. |TF| image:: https://static.nvidiagrid.net/ngc/containers/tensorflow.png :width: 15pt :height: 15pt :target: https://tensorflow.org .. |mxnet| image:: https://github.com/dmlc/web-data/raw/master/mxnet/image/mxnet_favicon.png :width: 15pt :height: 15pt :target: https://mxnet.apache.org/ .. |C2| image:: https://caffe2.ai/static/logo.svg :width: 15pt :height: 15pt :target: https://caffe2.ai ``` Details for each implementation: * __Detectron2__: ``` python tools/train_net.py --config-file configs/Detectron1-Comparisons/mask_rcnn_R_50_FPN_noaug_1x.yaml --num-gpus 8 ``` * __maskrcnn-benchmark__: use commit `0ce8f6f` with `sed -i ‘s/torch.uint8/torch.bool/g’ **/*.py` to make it compatible with latest PyTorch. Then, run training with ``` python -m torch.distributed.launch --nproc_per_node=8 tools/train_net.py --config-file configs/e2e_mask_rcnn_R_50_FPN_1x.yaml ``` The speed we observed is faster than its model zoo, likely due to different software versions. * __tensorpack__: at commit `caafda`, `export TF_CUDNN_USE_AUTOTUNE=0`, then run ``` mpirun -np 8 ./train.py --config DATA.BASEDIR=/data/coco TRAINER=horovod BACKBONE.STRIDE_1X1=True TRAIN.STEPS_PER_EPOCH=50 --load ImageNet-R50-AlignPadding.npz ``` * __mmdetection__: at commit `4d9a5f`, apply the following diff, then run ``` ./tools/dist_train.sh configs/mask_rcnn_r50_fpn_1x.py 8 ``` The speed we observed is faster than its model zoo, likely due to different software versions.
(diff to make it use the same architecture - click to expand) ```diff diff --git i/configs/mask_rcnn_r50_fpn_1x.py w/configs/mask_rcnn_r50_fpn_1x.py index 04f6d22..ed721f2 100644 --- i/configs/mask_rcnn_r50_fpn_1x.py +++ w/configs/mask_rcnn_r50_fpn_1x.py @@ -1,14 +1,15 @@ # model settings model = dict( type='MaskRCNN', - pretrained='torchvision://resnet50', + pretrained='open-mmlab://resnet50_caffe', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, - style='pytorch'), + norm_cfg=dict(type="BN", requires_grad=False), + style='caffe'), neck=dict( type='FPN', in_channels=[256, 512, 1024, 2048], @@ -115,7 +116,7 @@ test_cfg = dict( dataset_type = 'CocoDataset' data_root = 'data/coco/' img_norm_cfg = dict( - mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) + mean=[123.675, 116.28, 103.53], std=[1.0, 1.0, 1.0], to_rgb=False) train_pipeline = [ dict(type='LoadImageFromFile'), dict(type='LoadAnnotations', with_bbox=True, with_mask=True), ```
* __SimpleDet__: at commit `9187a1`, run ``` python detection_train.py --config config/mask_r50v1_fpn_1x.py ``` * __Detectron__: run ``` python tools/train_net.py --cfg configs/12_2017_baselines/e2e_mask_rcnn_R-50-FPN_1x.yaml ``` Note that many of its ops run on CPUs, therefore the performance is limited. * __matterport/Mask_RCNN__: at commit `3deaec`, apply the following diff, `export TF_CUDNN_USE_AUTOTUNE=0`, then run ``` python coco.py train --dataset=/data/coco/ --model=imagenet ``` Note that many small details in this implementation might be different from Detectron's standards.
(diff to make it use the same hyperparameters - click to expand) ```diff diff --git i/mrcnn/model.py w/mrcnn/model.py index 62cb2b0..61d7779 100644 --- i/mrcnn/model.py +++ w/mrcnn/model.py @@ -2367,8 +2367,8 @@ class MaskRCNN(): epochs=epochs, steps_per_epoch=self.config.STEPS_PER_EPOCH, callbacks=callbacks, - validation_data=val_generator, - validation_steps=self.config.VALIDATION_STEPS, + #validation_data=val_generator, + #validation_steps=self.config.VALIDATION_STEPS, max_queue_size=100, workers=workers, use_multiprocessing=True, diff --git i/mrcnn/parallel_model.py w/mrcnn/parallel_model.py index d2bf53b..060172a 100644 --- i/mrcnn/parallel_model.py +++ w/mrcnn/parallel_model.py @@ -32,6 +32,7 @@ class ParallelModel(KM.Model): keras_model: The Keras model to parallelize gpu_count: Number of GPUs. Must be > 1 """ + super().__init__() self.inner_model = keras_model self.gpu_count = gpu_count merged_outputs = self.make_parallel() diff --git i/samples/coco/coco.py w/samples/coco/coco.py index 5d172b5..239ed75 100644 --- i/samples/coco/coco.py +++ w/samples/coco/coco.py @@ -81,7 +81,10 @@ class CocoConfig(Config): IMAGES_PER_GPU = 2 # Uncomment to train on 8 GPUs (default is 1) - # GPU_COUNT = 8 + GPU_COUNT = 8 + BACKBONE = "resnet50" + STEPS_PER_EPOCH = 50 + TRAIN_ROIS_PER_IMAGE = 512 # Number of classes (including background) NUM_CLASSES = 1 + 80 # COCO has 80 classes @@ -496,29 +499,10 @@ if __name__ == '__main__': # *** This training schedule is an example. Update to your needs *** # Training - Stage 1 - print("Training network heads") model.train(dataset_train, dataset_val, learning_rate=config.LEARNING_RATE, epochs=40, - layers='heads', - augmentation=augmentation) - - # Training - Stage 2 - # Finetune layers from ResNet stage 4 and up - print("Fine tune Resnet stage 4 and up") - model.train(dataset_train, dataset_val, - learning_rate=config.LEARNING_RATE, - epochs=120, - layers='4+', - augmentation=augmentation) - - # Training - Stage 3 - # Fine tune all layers - print("Fine tune all layers") - model.train(dataset_train, dataset_val, - learning_rate=config.LEARNING_RATE / 10, - epochs=160, - layers='all', + layers='3+', augmentation=augmentation) elif args.command == "evaluate": ```
================================================ FILE: docs/notes/changelog.md ================================================ # Change Log ### Releases See release log at [https://github.com/facebookresearch/detectron2/releases](https://github.com/facebookresearch/detectron2/releases) ### Notable Backward Incompatible Changes: * 2019-11-11: `detectron2.data.detection_utils.read_image` transposes images with exif information. * 2019-10-10: initial release. ### Config Version Change Log * v1: Rename `RPN_HEAD.NAME` to `RPN.HEAD_NAME`. * v2: A batch of rename of many configurations before release. ### Known Bugs in Historical Versions: * Dec 19 - Dec 26: Using aspect ratio grouping causes a drop in accuracy. * Oct 10 - Nov 9: Test time augmentation does not predict the last category. ================================================ FILE: docs/notes/compatibility.md ================================================ # Compatibility with Other Libraries ## Compatibility with Detectron (and maskrcnn-benchmark) Detectron2 addresses some legacy issues left in Detectron. As a result, their models are not compatible: running inference with the same model weights will produce different results in the two code bases. The major differences regarding inference are: - The height and width of a box with corners (x1, y1) and (x2, y2) is now computed more naturally as width = x2 - x1 and height = y2 - y1; In Detectron, a "+ 1" was added both height and width. Note that the relevant ops in Caffe2 have [adopted this change of convention](https://github.com/pytorch/pytorch/pull/20550) with an extra option. So it is still possible to run inference with a Detectron2-trained model in Caffe2. The change in height/width calculations most notably changes: - encoding/decoding in bounding box regression. - non-maximum suppression. The effect here is very negligible, though. - RPN now uses simpler anchors with fewer quantization artifacts. In Detectron, the anchors were quantized and [do not have accurate areas](https://github.com/facebookresearch/Detectron/issues/227). In Detectron2, the anchors are center-aligned to feature grid points and not quantized. - Classification layers have a different ordering of class labels. This involves any trainable parameter with shape (..., num_categories + 1, ...). In Detectron2, integer labels [0, K-1] correspond to the K = num_categories object categories and the label "K" corresponds to the special "background" category. In Detectron, label "0" means background, and labels [1, K] correspond to the K categories. - ROIAlign is implemented differently. The new implementation is [available in Caffe2](https://github.com/pytorch/pytorch/pull/23706). 1. All the ROIs are shifted by half a pixel compared to Detectron in order to create better image-feature-map alignment. See `layers/roi_align.py` for details. To enable the old behavior, use `ROIAlign(aligned=False)`, or `POOLER_TYPE=ROIAlign` instead of `ROIAlignV2` (the default). 1. The ROIs are not required to have a minimum size of 1. This will lead to tiny differences in the output, but should be negligible. - Mask inference function is different. In Detectron2, the "paste_mask" function is different and should be more accurate than in Detectron. This change can improve mask AP on COCO by ~0.5% absolute. There are some other differences in training as well, but they won't affect model-level compatibility. The major ones are: - We fixed a [bug](https://github.com/facebookresearch/Detectron/issues/459) in Detectron, by making `RPN.POST_NMS_TOPK_TRAIN` per-image, rather than per-batch. The fix may lead to a small accuracy drop for a few models (e.g. keypoint detection) and will require some parameter tuning to match the Detectron results. - For simplicity, we change the default loss in bounding box regression to L1 loss, instead of smooth L1 loss. We have observed that this tends to slightly decrease box AP50 while improving box AP for higher overlap thresholds (and leading to a slight overall improvement in box AP). - We interpret the coordinates in COCO bounding box and segmentation annotations as coordinates in range `[0, width]` or `[0, height]`. The coordinates in COCO keypoint annotations are interpreted as pixel indices in range `[0, width - 1]` or `[0, height - 1]`. Note that this affects how flip augmentation is implemetned. We will later share more details and rationale behind the above mentioned issues about pixels, coordinates, and "+1"s. ## Compatibility with Caffe2 As mentioned above, despite the incompatibilities with Detectron, the relevant ops have been implemented in Caffe2, in [PR1](https://github.com/pytorch/pytorch/pull/20550) and [PR2](https://github.com/pytorch/pytorch/pull/23706). Therefore, models trained with detectron2 can be converted in Caffe2. See [Deployment](../tutorials/deployment.html) for the tutorial. ## Compatibility with TensorFlow Most ops are available in TensorFlow, although some tiny differences in the implementation of resize / ROIAlign / padding need to be addressed. A working conversion script is provided by [tensorpack FasterRCNN](https://github.com/tensorpack/tensorpack/tree/master/examples/FasterRCNN/convert_d2) to run a standard Detectron2 model in TensorFlow. ================================================ FILE: docs/notes/index.rst ================================================ Notes ====================================== .. toctree:: :maxdepth: 2 benchmarks compatibility contributing changelog ================================================ FILE: docs/tutorials/README.md ================================================ # Read the docs: The latest documentation built from this directory is available at [detectron2.readthedocs.io](https://detectron2.readthedocs.io/). Documents in this directory are not meant to be read on github. ================================================ FILE: docs/tutorials/configs.md ================================================ # Use Configs Detectron2's config system uses yaml and [yacs](https://github.com/rbgirshick/yacs). In addition to the basic operations that access and update a config, we provide the following extra functionalities: 1. The config can have `_BASE_: base.yaml` field, which will load a base config first. Values in the base config will be overwritten in sub-configs, if there are any conflicts. We provided several base configs for standard model architectures. 2. We provide config versioning, for backward compatibility. If your config file is versioned with a config line like `VERSION: 2`, detectron2 will still recognize it even if we rename some keys in the future. ### Use Configs Some basic usage of the `CfgNode` object is shown below: ```python from detectron2.config import get_cfg cfg = get_cfg() # obtain detectron2's default config cfg.xxx = yyy # add new configs for your own custom components cfg.merge_from_file("my_cfg.yaml") # load values from a file cfg.merge_from_list(["MODEL.WEIGHTS", "weights.pth"]) # can also load values from a list of str print(cfg.dump()) # print formatted configs ``` To see a list of available configs in detectron2, see [Config References](../modules/config.html#config-references) ### Best Practice with Configs 1. Treat the configs you write as "code": avoid copying them or duplicating them; use `_BASE_` to share common parts between configs. 2. Keep the configs you write simple: don't include keys that do not affect the experimental setting. 3. Keep a version number in your configs (or the base config), e.g., `VERSION: 2`, for backward compatibility. We print a warning when reading a config without version number. The official configs do not include version number because they are meant to be always up-to-date. 4. Save a full config together with a trained model, and use it to run inference. This is more robust to changes that may happen to the config definition (e.g., if a default value changed), although we will try to avoid such changes. ================================================ FILE: docs/tutorials/data_loading.md ================================================ # Use Custom Dataloaders ## How the Existing Dataloader Works Detectron2 contains a builtin data loading pipeline. It's good to understand how it works, in case you need to write a custom one. Detectron2 provides two functions [build_detection_{train,test}_loader](../modules/data.html#detectron2.data.build_detection_train_loader) that create a default data loader from a given config. Here is how `build_detection_{train,test}_loader` work: 1. It takes the name of a registered dataset (e.g., "coco_2017_train") and loads a `list[dict]` representing the dataset items in a lightweight, canonical format. These dataset items are not yet ready to be used by the model (e.g., images are not loaded into memory, random augmentations have not been applied, etc.). Details about the dataset format and dataset registration can be found in [datasets](datasets.html). 2. Each dict in this list is mapped by a function ("mapper"): * Users can customize this mapping function by specifying the "mapper" argument in `build_detection_{train,test}_loader`. The default mapper is [DatasetMapper]( ../modules/data.html#detectron2.data.DatasetMapper). * The output format of such function can be arbitrary, as long as it is accepted by the consumer of this data loader (usually the model). The outputs of the default mapper, after batching, follow the default model input format documented in [Use Models](https://detectron2.readthedocs.io/tutorials/models.html#model-input-format). * The role of the mapper is to transform the lightweight, canonical representation of a dataset item into a format that is ready for the model to consume (including, e.g., read images, perform random data augmentation and convert to torch Tensors). If you would like to perform custom transformations to data, you often want a custom mapper. 3. The outputs of the mapper are batched (simply into a list). 4. This batched data is the output of the data loader. Typically, it's also the input of `model.forward()`. ## Write a Custom Dataloader Using a different "mapper" with `build_detection_{train,test}_loader(mapper=)` works for most use cases of custom data loading. For example, if you want to resize all images to a fixed size for Mask R-CNN training, write this: ```python from detectron2.data import build_detection_train_loader from detectron2.data import transforms as T from detectron2.data import detection_utils as utils def mapper(dataset_dict): # Implement a mapper, similar to the default DatasetMapper, but with your own customizations dataset_dict = copy.deepcopy(dataset_dict) # it will be modified by code below image = utils.read_image(dataset_dict["file_name"], format="BGR") image, transforms = T.apply_transform_gens([T.Resize((800, 800))], image) dataset_dict["image"] = torch.as_tensor(image.transpose(2, 0, 1).astype("float32")) annos = [ utils.transform_instance_annotations(obj, transforms, image.shape[:2]) for obj in dataset_dict.pop("annotations") if obj.get("iscrowd", 0) == 0 ] instances = utils.annotations_to_instances(annos, image.shape[:2]) dataset_dict["instances"] = utils.filter_empty_instances(instances) return dataset_dict data_loader = build_detection_train_loader(cfg, mapper=mapper) # use this dataloader instead of the default ``` Refer to [API documentation of detectron2.data](../modules/data.html) for details. If you want to change not only the mapper (e.g., to write different sampling or batching logic), you can write your own data loader. The data loader is simply a python iterator that produces [the format](models.html) your model accepts. You can implement it using any tools you like. ## Use a Custom Dataloader If you use [DefaultTrainer](../modules/engine.html#detectron2.engine.defaults.DefaultTrainer), you can overwrite its `build_{train,test}__loader` method to use your own dataloader. See the [densepose dataloader](../../projects/DensePose/train_net.py) for an example. If you write your own training loop, you can plug in your data loader easily. ================================================ FILE: docs/tutorials/datasets.md ================================================ # Use Custom Datasets If you want to use a custom dataset while also reusing detectron2's data loaders, you will need to 1. Register your dataset (i.e., tell detectron2 how to obtain your dataset). 2. Optionally, register metadata for your dataset. Next, we explain the above two concepts in details. The [Colab Notebook](https://colab.research.google.com/drive/16jcaJoc6bCFAQ96jDe2HwtXj7BMD_-m5) has a working example of how to register and train on a dataset of custom formats. ### Register a Dataset To let detectron2 know how to obtain a dataset named "my_dataset", you will implement a function that returns the items in your dataset and then tell detectron2 about this function: ```python def get_dicts(): ... return list[dict] in the following format from detectron2.data import DatasetCatalog DatasetCatalog.register("my_dataset", get_dicts) ``` Here, the snippet associates a dataset "my_dataset" with a function that returns the data. If you do not modify downstream code (i.e., you use the standard data loader and data mapper), then the function has to return a list of dicts in detectron2's standard dataset format, described next. You can also use arbitrary custom data format, as long as the downstream code (mainly the [custom data loader](data_loading.html)) supports it. For standard tasks (instance detection, instance/semantic/panoptic segmentation, keypoint detection), we use a format similar to COCO's json annotations as the basic dataset representation. The format uses one dict to represent the annotations of one image. The dict may have the following fields. The fields are often optional, and some functions may be able to infer certain fields from others if needed, e.g., the data loader will load the image from "file_name" and load "sem_seg" from "sem_seg_file_name". + `file_name`: the full path to the image file. Will apply rotation and flipping if the image has such exif information. + `sem_seg_file_name`: the full path to the ground truth semantic segmentation file. + `sem_seg`: semantic segmentation ground truth in a 2D `torch.Tensor`. Values in the array represent category labels starting from 0. + `height`, `width`: integer. The shape of image. + `image_id` (str or int): a unique id that identifies this image. Used during evaluation to identify the images, but a dataset may use it for different purposes. + `annotations` (list[dict]): the per-instance annotations of every instance in this image. Each annotation dict may contain: + `bbox` (list[float]): list of 4 numbers representing the bounding box of the instance. + `bbox_mode` (int): the format of bbox. It must be a member of [structures.BoxMode](../modules/structures.html#detectron2.structures.BoxMode). Currently supports: `BoxMode.XYXY_ABS`, `BoxMode.XYWH_ABS`. + `category_id` (int): an integer in the range [0, num_categories) representing the category label. The value num_categories is reserved to represent the "background" category, if applicable. + `segmentation` (list[list[float]] or dict): + If `list[list[float]]`, it represents a list of polygons, one for each connected component of the object. Each `list[float]` is one simple polygon in the format of `[x1, y1, ..., xn, yn]`. The Xs and Ys are either relative coordinates in [0, 1], or absolute coordinates, depend on whether "bbox_mode" is relative. + If `dict`, it represents the per-pixel segmentation mask in COCO's RLE format. The dict should have keys "size" and "counts". You can convert a uint8 segmentation mask of 0s and 1s into RLE format by `pycocotools.mask.encode(np.asarray(mask, order="F"))`. + `keypoints` (list[float]): in the format of [x1, y1, v1,..., xn, yn, vn]. v[i] means the [visibility](http://cocodataset.org/#format-data) of this keypoint. `n` must be equal to the number of keypoint categories. The Xs and Ys are either relative coordinates in [0, 1], or absolute coordinates, depend on whether "bbox_mode" is relative. Note that the coordinate annotations in COCO format are integers in range [0, H-1 or W-1]. By default, detectron2 adds 0.5 to absolute keypoint coordinates to convert them from discrete pixel indices to floating point coordinates. + `iscrowd`: 0 or 1. Whether this instance is labeled as COCO's "crowd region". Don't include this field if you don't know what it means. + `proposal_boxes` (array): 2D numpy array with shape (K, 4) representing K precomputed proposal boxes for this image. + `proposal_objectness_logits` (array): numpy array with shape (K, ), which corresponds to the objectness logits of proposals in 'proposal_boxes'. + `proposal_bbox_mode` (int): the format of the precomputed proposal bbox. It must be a member of [structures.BoxMode](../modules/structures.html#detectron2.structures.BoxMode). Default format is `BoxMode.XYXY_ABS`. If your dataset is already in the COCO format, you can simply register it by ```python from detectron2.data.datasets import register_coco_instances register_coco_instances("my_dataset", {}, "json_annotation.json", "path/to/image/dir") ``` which will take care of everything (including metadata) for you. If your dataset is in COCO format with custom per-instance annotations, the [load_coco_json](../modules/data.html#detectron2.data.datasets.load_coco_json) function can be used. ### "Metadata" for Datasets Each dataset is associated with some metadata, accessible through `MetadataCatalog.get(dataset_name).some_metadata`. Metadata is a key-value mapping that contains primitive information that helps interpret what's in the dataset, e.g., names of classes, colors of classes, root of files, etc. This information will be useful for augmentation, evaluation, visualization, logging, etc. The structure of metadata depends on the what is needed from the corresponding downstream code. If you register a new dataset through `DatasetCatalog.register`, you may also want to add its corresponding metadata through `MetadataCatalog.get(dataset_name).set(name, value)`, to enable any features that need metadata. You can do it like this (using the metadata field "thing_classes" as an example): ```python from detectron2.data import MetadataCatalog MetadataCatalog.get("my_dataset").thing_classes = ["person", "dog"] ``` Here is a list of metadata keys that are used by builtin features in detectron2. If you add your own dataset without these metadata, some features may be unavailable to you: * `thing_classes` (list[str]): Used by all instance detection/segmentation tasks. A list of names for each instance/thing category. If you load a COCO format dataset, it will be automatically set by the function `load_coco_json`. * `thing_colors` (list[tuple(r, g, b)]): Pre-defined color (in [0, 255]) for each thing category. Used for visualization. If not given, random colors are used. * `stuff_classes` (list[str]): Used by semantic and panoptic segmentation tasks. A list of names for each stuff category. * `stuff_colors` (list[tuple(r, g, b)]): Pre-defined color (in [0, 255]) for each stuff category. Used for visualization. If not given, random colors are used. * `keypoint_names` (list[str]): Used by keypoint localization. A list of names for each keypoint. * `keypoint_flip_map` (list[tuple[str]]): Used by the keypoint localization task. A list of pairs of names, where each pair are the two keypoints that should be flipped if the image is flipped during augmentation. * `keypoint_connection_rules`: list[tuple(str, str, (r, g, b))]. Each tuple specifies a pair of keypoints that are connected and the color to use for the line between them when visualized. Some additional metadata that are specific to the evaluation of certain datasets (e.g. COCO): * `thing_dataset_id_to_contiguous_id` (dict[int->int]): Used by all instance detection/segmentation tasks in the COCO format. A mapping from instance class ids in the dataset to contiguous ids in range [0, #class). Will be automatically set by the function `load_coco_json`. * `stuff_dataset_id_to_contiguous_id` (dict[int->int]): Used when generating prediction json files for semantic/panoptic segmentation. A mapping from semantic segmentation class ids in the dataset to contiguous ids in [0, num_categories). It is useful for evaluation only. * `json_file`: The COCO annotation json file. Used by COCO evaluation for COCO-format datasets. * `panoptic_root`, `panoptic_json`: Used by panoptic evaluation. * `evaluator_type`: Used by the builtin main training script to select evaluator. No need to use it if you write your own main script. You can just provide the [DatasetEvaluator](../modules/evaluation.html#detectron2.evaluation.DatasetEvaluator) for your dataset directly in your main script. NOTE: For background on the concept of "thing" and "stuff", see [On Seeing Stuff: The Perception of Materials by Humans and Machines](http://persci.mit.edu/pub_pdfs/adelson_spie_01.pdf). In detectron2, the term "thing" is used for instance-level tasks, and "stuff" is used for semantic segmentation tasks. Both are used in panoptic segmentation. ### Update the Config for New Datasets Once you've registered the dataset, you can use the name of the dataset (e.g., "my_dataset" in example above) in `DATASETS.{TRAIN,TEST}`. There are other configs you might want to change to train or evaluate on new datasets: * `MODEL.ROI_HEADS.NUM_CLASSES` and `MODEL.RETINANET.NUM_CLASSES` are the number of thing classes for R-CNN and RetinaNet models. * `MODEL.ROI_KEYPOINT_HEAD.NUM_KEYPOINTS` sets the number of keypoints for Keypoint R-CNN. You'll also need to set [Keypoint OKS](http://cocodataset.org/#keypoints-eval) with `TEST.KEYPOINT_OKS_SIGMAS` for evaluation. * `MODEL.SEM_SEG_HEAD.NUM_CLASSES` sets the number of stuff classes for Semantic FPN & Panoptic FPN. * If you're training Fast R-CNN (with precomputed proposals), `DATASETS.PROPOSAL_FILES_{TRAIN,TEST}` need to match the datasts. The format of proposal files are documented [here](../modules/data.html#detectron2.data.load_proposals_into_dataset). ================================================ FILE: docs/tutorials/deployment.md ================================================ # Deployment ## Caffe2 Deployment We currently support converting a detectron2 model to Caffe2 format through ONNX. The converted Caffe2 model is able to run without detectron2 dependency in either Python or C++. It has a runtime optimized for CPU & mobile inference, but not for GPU inference. Caffe2 conversion requires PyTorch ≥ 1.4 and ONNX ≥ 1.6. ### Coverage It supports 3 most common meta architectures: `GeneralizedRCNN`, `RetinaNet`, `PanopticFPN`, and almost all official models under these 3 meta architectures. Users' custom extensions under these architectures (added through registration) are supported as long as they do not contain control flow or operators not available in Caffe2 (e.g. deformable convolution). For example, custom backbones and heads are often supported out of the box. ### Usage The conversion APIs are documented at [the API documentation](../modules/export.html). We provide a tool, `tools/caffe2_converter.py` as an example that uses these APIs to convert a standard model. To convert an official Mask R-CNN trained on COCO, first [prepare the COCO dataset](../../datasets/), then pick the model from [Model Zoo](../../MODEL_ZOO.md), and run: ``` python tools/caffe2_converter.py --config-file configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml \ --output ./caffe2_model --run-eval \ MODEL.WEIGHTS detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl \ MODEL.DEVICE cpu ``` Note that: 1. The conversion needs valid sample inputs & weights to trace the model. That's why the script requires the dataset. You can modify the script to obtain sample inputs in other ways. 2. GPU conversion is supported only with Pytorch's master. So we use `MODEL.DEVICE cpu`. 3. With the `--run-eval` flag, it will evaluate the converted models to verify its accuracy. The accuracy is typically slightly different (within 0.1 AP) from PyTorch due to numerical precisions between different implementations. It's recommended to always verify the accuracy in case your custom model is not supported by the conversion. The converted model is available at the specified `caffe2_model/` directory. Two files `model.pb` and `model_init.pb` that contain network structure and network parameters are necessary for deployment. These files can then be loaded in C++ or Python using Caffe2's APIs. The script generates `model.svg` file which contains a visualization of the network. You can also load `model.pb` to tools such as [netron](https://github.com/lutzroeder/netron) to visualize it. ### Inputs & Outputs All converted models take two input tensors: "data" which is an NCHW image, and "im_info" which is a Nx3 tensor of (height, width, unused legacy parameter) for each image (the shape of "data" might be larger than that in "im_info" due to padding). The converted models do not contain post-processing operations that transform raw layer outputs into formatted predictions. The models only produce raw outputs from the final layers that are not post-processed, because in actual deployment, an application often needs its custom lightweight post-processing (e.g. full-image masks for every detected object is often not necessary). Due to different inputs & outputs formats, the `Caffe2Model.__call__` method includes pre/post-processing code in order to match the formats of original detectron2 models. They can serve as a reference for pre/post-processing in actual deployment. ================================================ FILE: docs/tutorials/evaluation.md ================================================ # Evaluation Evaluation is a process that takes a number of inputs/outputs pairs and aggregate them. You can always [use the model](models.html) directly and just parse its inputs/outputs manually to perform evaluation. Alternatively, evaluation is implemented in detectron2 using the [DatasetEvaluator](../modules/evaluation.html#detectron2.evaluation.DatasetEvaluator) interface. Detectron2 includes a few `DatasetEvaluator` that computes metrics using standard dataset-specific APIs (e.g., COCO, LVIS). You can also implement your own `DatasetEvaluator` that performs some other jobs using the inputs/outputs pairs. For example, to count how many instances are detected on the validation set: ``` class Counter(DatasetEvaluator): def reset(self): self.count = 0 def process(self, inputs, outputs): for output in outputs: self.count += len(output["instances"]) def evaluate(self): # save self.count somewhere, or print it, or return it. return {"count": self.count} ``` Once you have some `DatasetEvaluator`, you can run it with [inference_on_dataset](../modules/evaluation.html#detectron2.evaluation.inference_on_dataset). For example, ```python val_results = inference_on_dataset( model, val_data_loader, DatasetEvaluators([COCOEvaluator(...), Counter()])) ``` Compared to running the evaluation manually using the model, the benefit of this function is that you can merge evaluators together using [DatasetEvaluators](../modules/evaluation.html#detectron2.evaluation.DatasetEvaluators). In this way you can run all evaluations without having to go through the dataset multiple times. The `inference_on_dataset` function also provides accurate speed benchmarks for the given model and dataset. ================================================ FILE: docs/tutorials/extend.md ================================================ # Extend Detectron2's Defaults __Research is about doing things in new ways__. This brings a tension in how to create abstractions in code, which is a challenge for any research engineering project of a significant size: 1. On one hand, it needs to have very thin abstractions to allow for the possibility of doing everything in new ways. It should be reasonably easy to break existing abstractions and replace them with new ones. 2. On the other hand, such a project also needs reasonably high-level abstractions, so that users can easily do things in standard ways, without worrying too much about the details that only certain researchers care about. In detectron2, there are two types of interfaces that address this tension together: 1. Functions and classes that take only a "config" argument (optionally with a minimal set of extra arguments in cases of mature interfaces). Such functions and classes implement the "standard default" behavior: it will read what it needs from the config and do the "standard" thing. Users only need to load a standard config and pass it around, without having to worry about which arguments are used and what they all mean. 2. Functions and classes that have well-defined explicit arguments. Each of these is a small building block of the entire system. They require users' effort to stitch together, but can be stitched together in more flexible ways. When you need to implement something different from the "standard defaults" included in detectron2, these well-defined components can be reused. If you only need the standard behavior, the [Beginner's Tutorial](getting_started.html) should suffice. If you need to extend detectron2 to your own needs, see the following tutorials for more details: * Detectron2 includes a few standard datasets, but you can use custom ones. See [Use Custom Datasets](datasets.html). * Detectron2 contains the standard logic that creates a data loader from a dataset, but you can write your own as well. See [Use Custom Data Loaders](data_loading.html). * Detectron2 implements many standard detection models, and provide ways for you to overwrite its behaviors. See [Use Models](models.html) and [Write Models](write-models.html). * Detectron2 provides a default training loop that is good for common training tasks. You can customize it with hooks, or write your own loop instead. See [training](training.html). ================================================ FILE: docs/tutorials/index.rst ================================================ Tutorials ====================================== .. toctree:: :maxdepth: 2 install getting_started extend datasets data_loading models write-models training evaluation configs deployment ================================================ FILE: docs/tutorials/models.md ================================================ # Use Models Models (and their sub-models) in detectron2 are built by functions such as `build_model`, `build_backbone`, `build_roi_heads`: ```python from detectron2.modeling import build_model model = build_model(cfg) # returns a torch.nn.Module ``` Note that `build_model` only builds the model structure, and fill it with random parameters. To load an existing checkpoint to the model, use `DetectionCheckpointer(model).load(file_path)`. Detectron2 recognizes models in pytorch's `.pth` format, as well as the `.pkl` files in our model zoo. You can use a model by just `outputs = model(inputs)`. Next, we explain the inputs/outputs format used by the builtin models in detectron2. [DefaultPredictor](../modules/engine.html#detectron2.engine.defaults.DefaultPredictor) is a wrapper around model that provides the default behavior for regular inference. It includes model loading as well as preprocessing, and operates on single image rather than batches. ### Model Input Format All builtin models take a `list[dict]` as the inputs. Each dict corresponds to information about one image. The dict may contain the following keys: * "image": `Tensor` in (C, H, W) format. The meaning of channels are defined by `cfg.INPUT.FORMAT`. * "instances": an [Instances](../modules/structures.html#detectron2.structures.Instances) object, with the following fields: + "gt_boxes": a [Boxes](../modules/structures.html#detectron2.structures.Boxes) object storing N boxes, one for each instance. + "gt_classes": `Tensor` of long type, a vector of N labels, in range [0, num_categories). + "gt_masks": a [PolygonMasks](../modules/structures.html#detectron2.structures.PolygonMasks) or [BitMasks](../modules/structures.html#detectron2.structures.BitMasks) object storing N masks, one for each instance. + "gt_keypoints": a [Keypoints](../modules/structures.html#detectron2.structures.Keypoints) object storing N keypoint sets, one for each instance. * "proposals": an [Instances](../modules/structures.html#detectron2.structures.Instances) object used only in Fast R-CNN style models, with the following fields: + "proposal_boxes": a [Boxes](../modules/structures.html#detectron2.structures.Boxes) object storing P proposal boxes. + "objectness_logits": `Tensor`, a vector of P scores, one for each proposal. * "height", "width": the **desired** output height and width, which is not necessarily the same as the height or width of the `image` input field. For example, the `image` input field might be a resized image, but you may want the outputs to be in **original** resolution. If provided, the model will produce output in this resolution, rather than in the resolution of the `image` as input into the model. This is more efficient and accurate. * "sem_seg": `Tensor[int]` in (H, W) format. The semantic segmentation ground truth. Values represent category labels starting from 0. #### How it connects to data loader: The output of the default [DatasetMapper]( ../modules/data.html#detectron2.data.DatasetMapper) is a dict that follows the above format. After the data loader performs batching, it becomes `list[dict]` which the builtin models support. ### Model Output Format When in training mode, the builtin models output a `dict[str->ScalarTensor]` with all the losses. When in inference mode, the builtin models output a `list[dict]`, one dict for each image. Based on the tasks the model is doing, each dict may contain the following fields: * "instances": [Instances](../modules/structures.html#detectron2.structures.Instances) object with the following fields: * "pred_boxes": [Boxes](../modules/structures.html#detectron2.structures.Boxes) object storing N boxes, one for each detected instance. * "scores": `Tensor`, a vector of N scores. * "pred_classes": `Tensor`, a vector of N labels in range [0, num_categories). + "pred_masks": a `Tensor` of shape (N, H, W), masks for each detected instance. + "pred_keypoints": a `Tensor` of shape (N, num_keypoint, 3). Each row in the last dimension is (x, y, score). Scores are larger than 0. * "sem_seg": `Tensor` of (num_categories, H, W), the semantic segmentation prediction. * "proposals": [Instances](../modules/structures.html#detectron2.structures.Instances) object with the following fields: * "proposal_boxes": [Boxes](../modules/structures.html#detectron2.structures.Boxes) object storing N boxes. * "objectness_logits": a torch vector of N scores. * "panoptic_seg": A tuple of `(Tensor, list[dict])`. The tensor has shape (H, W), where each element represent the segment id of the pixel. Each dict describes one segment id and has the following fields: * "id": the segment id * "isthing": whether the segment is a thing or stuff * "category_id": the category id of this segment. It represents the thing class id when `isthing==True`, and the stuff class id otherwise. ### How to use a model in your code: Contruct your own `list[dict]` as inputs, with the necessary keys. Then call `outputs = model(inputs)`. For example, in order to do inference, provide dicts with "image", and optionally "height" and "width". Note that when in training mode, all models are required to be used under an `EventStorage`. The training statistics will be put into the storage: ```python from detectron2.utils.events import EventStorage with EventStorage() as storage: losses = model(inputs) ``` Another small thing to remember: detectron2 models do not support `model.to(device)` or `model.cpu()`. The device is defined in `cfg.MODEL.DEVICE` and cannot be changed afterwards. ### Partially execute a model: Sometimes you may want to obtain an intermediate tensor inside a model. Since there are typically hundreds of intermediate tensors, there isn't an API that provides you the intermediate result you need. You have the following options: 1. Write a (sub)model. Following the [tutorial](write-models.html), you can rewrite a model component (e.g. a head of a model), such that it does the same thing as the existing component, but returns the output you need. 2. Partially execute a model. You can create the model as usual, but use custom code to execute it instead of its `forward()`. For example, the following code obtains mask features before mask head. ```python images = ImageList(...) # preprocessed input tensor model = build_model(cfg) features = model.backbone(images.tensor) proposals, _ = model.proposal_generator(images, features) instances = model.roi_heads._forward_box( [features[k] for k in model.roi_heads.in_features], proposals ) mask_features = model.roi_heads.mask_pooler(features, [x.pred_boxes for x in instances]) ``` Note that both options require you to read the existing forward code to understand how to write code to obtain the outputs you need. ================================================ FILE: docs/tutorials/training.md ================================================ # Training From the previous tutorials, you may now have a custom model and data loader. You are free to create your own optimizer, and write the training logic: it's usually easy with PyTorch, and allow researchers to see the entire training logic more clearly. One such example is provided in [tools/plain_train_net.py](../../tools/plain_train_net.py). We also provide a standarized "trainer" abstraction with a [minimal hook system](../modules/engine.html#detectron2.engine.HookBase) that helps simplify the standard types of training. You can use [SimpleTrainer().train()](../modules/engine.html#detectron2.engine.SimpleTrainer) which does single-cost single-optimizer single-data-source training. Or use [DefaultTrainer().train()](../modules/engine.html#detectron2.engine.defaults.DefaultTrainer) which includes more standard behavior that one might want to opt in. This also means that it's less likely to support some non-standard behavior you might want during research. ### Logging of Metrics During training, metrics are logged with a centralized [EventStorage](../modules/utils.html#detectron2.utils.events.EventStorage). You can use the following code to access it and log metrics to it: ``` from detectron2.utils.events import get_event_storage # inside the model: if self.training: value = # compute the value from inputs storage = get_event_storage() storage.put_scalar("some_accuracy", value) ``` Refer to its documentation for more details. ================================================ FILE: docs/tutorials/write-models.md ================================================ # Write Models If you are trying to do something completely new, you may wish to implement a model entirely from scratch within detectron2. However, in many situations you may be interested in modifying or extending some components of an existing model. Therefore, we also provide a registration mechanism that lets you override the behavior of certain internal components of standard models. For example, to add a new backbone, import this code in your code: ```python from detectron2.modeling import BACKBONE_REGISTRY, Backbone, ShapeSpec @BACKBONE_REGISTRY.register() class ToyBackBone(Backbone): def __init__(self, cfg, input_shape): # create your own backbone self.conv1 = nn.Conv2d(3, 64, kernel_size=7, stride=16, padding=3) def forward(self, image): return {"conv1": self.conv1(image)} def output_shape(self): return {"conv1": ShapeSpec(channels=64, stride=16)} ``` Then, you can use `cfg.MODEL.BACKBONE.NAME = 'ToyBackBone'` in your config object. `build_model(cfg)` will then call your `ToyBackBone` instead. As another example, to add new abilities to the ROI heads in the Generalized R-CNN meta-architecture, you can implement a new [ROIHeads](../modules/modeling.html#detectron2.modeling.ROIHeads) subclass and put it in the `ROI_HEADS_REGISTRY`. See [densepose in detectron2](../../projects/DensePose) for an example that implements new ROIHeads. And [projects/](../../projects/) contains examples that implement a few different architectures. A complete list of registries can be found in [API documentation](../modules/modeling.html#model-registries). You can register components in these registries to customize different parts of a model, or the entire model. ================================================ FILE: projects/LISA/LISA/LISA_meta_arch.py ================================================ # Copyright (c) Tianyu Wang. All Rights Reserved. import logging import torch from torch import nn from detectron2.structures import ImageList from detectron2.utils.logger import log_first_n from detectron2.modeling.backbone import build_backbone from detectron2.modeling.postprocessing import detector_postprocess, matchor, combine_association from .LISA_rpn import build_proposal_generator from detectron2.modeling.roi_heads import build_roi_heads from detectron2.modeling.meta_arch.build import META_ARCH_REGISTRY from detectron2.modeling.meta_arch.rcnn import __all__, GeneralizedRCNN from detectron2.utils.registry import Registry __all__.append("LISARCNN") @META_ARCH_REGISTRY.register() class LISARCNN(GeneralizedRCNN): def __init__(self,cfg): super(LISARCNN, self).__init__(cfg) self.association_proposal_generator = build_proposal_generator(cfg, self.backbone.output_shape(), shadow_object_part= False) self.proposal_generator = build_proposal_generator(cfg, self.backbone.output_shape(), shadow_object_part= True) self.to(self.device) def forward(self, batched_inputs): if not self.training: return self.inference(batched_inputs) images = self.preprocess_image(batched_inputs) if "instances" in batched_inputs[0]: gt_instances = [x["instances"].to(self.device) for x in batched_inputs] if "associations" in batched_inputs[0]: gt_associations = [x["associations"].to(self.device) for x in batched_inputs] elif "targets" in batched_inputs[0]: log_first_n( logging.WARN, "'targets' in the model inputs is now renamed to 'instances'!", n=10 ) gt_instances = [x["targets"].to(self.device) for x in batched_inputs] else: gt_instances = None features = self.backbone(images.tensor) if self.association_proposal_generator: association_proposals, association_losses, pre_features, pre_proposals = self.association_proposal_generator(images, features, gt_associations) if self.proposal_generator: proposals, proposal_losses = self.proposal_generator(images,features,gt_instances,pre_proposals) _, detector_losses = self.roi_heads(images, features, association_proposals, proposals, gt_associations, gt_instances) losses = {} losses.update(detector_losses) losses.update(proposal_losses) losses.update(association_losses) return losses def inference(self, batched_inputs, detected_instances=None, do_postprocess=True): assert not self.training images = self.preprocess_image(batched_inputs) features = self.backbone(images.tensor) if detected_instances is None: if self.association_proposal_generator: association_proposals, _, pre_features, pre_proposals = self.association_proposal_generator(images, features) else: assert "associations" in batched_inputs[0] proposals = [x["associations"].to(self.device) for x in batched_inputs] if self.proposal_generator: # concat_features = {} # for pre_features,(k,v) in zip(pre_features,features.items()): # concat_features[k] = torch.cat([v,pre_features],1) proposals, _ = self.proposal_generator(images,features,pre_proposals = pre_proposals) else: assert "proposals" in batched_inputs[0] proposals = [x["proposals"].to(self.device) for x in batched_inputs] results,associations, _ = self.roi_heads(images, features, association_proposals, proposals, None, None) if do_postprocess: processed_results = [] for results_per_image, input_per_image, image_size in zip( results, batched_inputs, images.image_sizes ): height = input_per_image.get("height", image_size[0]) width = input_per_image.get("width", image_size[1]) r = detector_postprocess(results_per_image, height, width) processed_results.append({"instances": r.to(torch.device('cpu'))}) processed_associations = [] for results_per_image, input_per_image, image_size in zip( associations, batched_inputs, images.image_sizes ): height = input_per_image.get("height", image_size[0]) width = input_per_image.get("width", image_size[1]) r = detector_postprocess(results_per_image, height, width) processed_associations.append({"instances": r.to(torch.device('cpu'))}) for instances, associations in zip(processed_results, processed_associations): _instances, _associations = matchor(instances["instances"],associations["instances"]) _associations,_instances = combine_association(_instances,_associations) associations["instances"] = _associations instances["instances"] = _instances return processed_results,processed_associations else: return results,associations ================================================ FILE: projects/LISA/LISA/LISA_rcnn.py ================================================ # Copyright (c) Tianyu Wang. All Rights Reserved. import torch from torch import nn from torch.autograd.function import Function from detectron2.layers import ShapeSpec from detectron2.structures import Boxes, Instances, RotatedBoxes, pairwise_iou, pairwise_iou_rotated from detectron2.utils.events import get_event_storage from detectron2.utils.registry import Registry from detectron2.modeling.matcher import Matcher from detectron2.modeling.poolers import ROIPooler from detectron2.modeling import ROI_HEADS_REGISTRY, StandardROIHeads from detectron2.modeling.roi_heads.roi_heads import Res5ROIHeads from detectron2.modeling.roi_heads.box_head import build_box_head from detectron2.modeling.box_regression import Box2BoxTransform from detectron2.modeling.roi_heads.fast_rcnn import FastRCNNOutputLayers, FastRCNNOutputs, fast_rcnn_inference,LightdirectionOutputLayer from detectron2.modeling.proposal_generator.proposal_utils import add_ground_truth_to_proposals from detectron2.modeling.sampling import subsample_labels import numpy as np # class @ROI_HEADS_REGISTRY.register() class LISAROIHeads(StandardROIHeads): pass """ This class is used by association RPN. """ # def __init__(self, cfg, input_shape: Dict[str, ShapeSpec]): # super(associationROIHeads, self).__init__(cfg,input_shape) # pass def _init_box_head(self,cfg): pooler_resolution = cfg.MODEL.ROI_BOX_HEAD.POOLER_RESOLUTION pooler_scales = tuple(1.0 / self.feature_strides[k] for k in self.in_features) sampling_ratio = cfg.MODEL.ROI_BOX_HEAD.POOLER_SAMPLING_RATIO pooler_type = cfg.MODEL.ROI_BOX_HEAD.POOLER_TYPE in_channels = [self.feature_channels[f] for f in self.in_features] # Check all channel counts are equal assert len(set(in_channels)) == 1, in_channels in_channels = in_channels[0] self.box_pooler = ROIPooler( output_size=pooler_resolution, scales=pooler_scales, sampling_ratio=sampling_ratio, pooler_type=pooler_type, ) pooled_shape = ShapeSpec( channels=in_channels, width=pooler_resolution, height=pooler_resolution ) self.association_box_head = build_box_head(cfg,pooled_shape) self.association_box_predictor = FastRCNNOutputLayers( self.association_box_head.output_size, self.num_classes -1 , cls_agnostic_bbox_reg = False ) self.box_head = build_box_head(cfg,pooled_shape) self.box_predictor = FastRCNNOutputLayers( self.box_head.output_size, self.num_classes, cls_agnostic_bbox_reg = False ) self.light_direction_head = build_box_head(cfg,pooled_shape) self.light_direction_predictor = LightdirectionOutputLayer( self.light_direction_head.output_size) def forward(self,images, features, association_proposals, proposals, association_targets=None, targets=None): del images if self.training: association_proposals = self.label_and_sample_proposals(association_proposals, association_targets, True) proposals = self.label_and_sample_proposals(proposals,targets) del targets del association_targets features_list = [features[f] for f in self.in_features] if self.training: losses = self._forward_association_box(features_list,association_proposals) losses.update(self._forward_box(features_list, proposals)) # During training the proposals used by the box head are # used by the mask, keypoint (and densepose) heads. losses.update(self._forward_mask(features_list, proposals)) losses.update(self._forward_keypoint(features_list, association_proposals)) return proposals, losses else: pred_instances = self._forward_box(features_list, proposals) pred_instances = self.forward_with_given_boxes(features, pred_instances) pred_associations = self._forward_association_box(features_list,association_proposals) # During inference cascaded prediction is used: the mask and keypoints heads are only # applied to the top scoring box detections. # pred_associations = self.forward_with_given_association_boxes(features,pred_associations) return pred_instances, pred_associations ,{} def _forward_association_box(self, features, association_proposals): box_features = self.box_pooler(features, [x.proposal_boxes for x in association_proposals]) light_features = self.light_direction_head(box_features) box_features = self.association_box_head(box_features) pred_light_direction = self.light_direction_predictor(light_features) pred_class_logits, pred_proposal_deltas = self.association_box_predictor(box_features) del box_features, light_features outputs = FastRCNNOutputs( self.box2box_transform, pred_class_logits, pred_proposal_deltas, association_proposals, self.smooth_l1_beta, pred_light_direction ) if self.training: return {k+'_asso': v for k, v in outputs.losses().items()} else: pred_instances, _ = outputs.inference( self.test_score_thresh, self.test_nms_thresh, self.test_detections_per_img ) # print(pred_instances) return pred_instances @torch.no_grad() def label_and_sample_proposals(self, proposals, targets, isassociation = False): """ Prepare some proposals to be used to train the ROI heads. It performs box matching between `proposals` and `targets`, and assigns training labels to the proposals. It returns `self.batch_size_per_image` random samples from proposals and groundtruth boxes, with a fraction of positives that is no larger than `self.positive_sample_fraction. Args: See :meth:`ROIHeads.forward` Returns: list[Instances]: length `N` list of `Instances`s containing the proposals sampled for training. Each `Instances` has the following fields: - proposal_boxes: the proposal boxes - gt_boxes: the ground-truth box that the proposal is assigned to (this is only meaningful if the proposal has a label > 0; if label = 0 then the ground-truth box is random) Other fields such as "gt_classes", "gt_masks", that's included in `targets`. """ gt_boxes = [x.gt_boxes for x in targets] if targets[0].has('gt_light'): gt_light = [x.gt_light for x in targets] # Augment proposals with ground-truth boxes. # In the case of learned proposals (e.g., RPN), when training starts # the proposals will be low quality due to random initialization. # It's possible that none of these initial # proposals have high enough overlap with the gt objects to be used # as positive examples for the second stage components (box head, # cls head, mask head). Adding the gt boxes to the set of proposals # ensures that the second stage components will have some positive # examples from the start of training. For RPN, this augmentation improves # convergence and empirically improves box AP on COCO by about 0.5 # points (under one tested configuration). if self.proposal_append_gt: proposals = add_ground_truth_to_proposals(gt_boxes, proposals,gt_light) else: gt_light = None if self.proposal_append_gt: proposals = add_ground_truth_to_proposals(gt_boxes,proposals) proposals_with_gt = [] num_fg_samples = [] num_bg_samples = [] for proposals_per_image, targets_per_image in zip(proposals, targets): has_gt = len(targets_per_image) > 0 match_quality_matrix = pairwise_iou( targets_per_image.gt_boxes, proposals_per_image.proposal_boxes ) matched_idxs, proposals_labels = self.proposal_matcher(match_quality_matrix) if isassociation: num_classes = self.num_classes - 1 else: num_classes = self.num_classes # Get the corresponding GT for each proposal if has_gt: gt_classes = targets_per_image.gt_classes[matched_idxs] # Label unmatched proposals (0 label from matcher) as background (label=num_classes) gt_classes[proposals_labels == 0] = num_classes # Label ignore proposals (-1 label) gt_classes[proposals_labels == -1] = -1 else: gt_classes = torch.zeros_like(matched_idxs) + num_classes sampled_fg_inds, sampled_bg_inds = subsample_labels( gt_classes, self.batch_size_per_image, self.positive_sample_fraction, num_classes, ) sampled_inds = torch.cat([sampled_fg_inds, sampled_bg_inds], dim=0) proposals_per_image = proposals_per_image[sampled_inds] proposals_per_image.gt_classes = gt_classes[sampled_inds] # We index all the attributes of targets that start with "gt_" # and have not been added to proposals yet (="gt_classes"). if has_gt: sampled_targets = matched_idxs[sampled_inds] # NOTE: here the indexing waste some compute, because heads # like masks, keypoints, etc, will filter the proposals again, # (by foreground/background, or number of keypoints in the image, etc) # so we essentially index the data twice. for (trg_name, trg_value) in targets_per_image.get_fields().items(): if trg_name.startswith("gt_") and not proposals_per_image.has(trg_name): proposals_per_image.set(trg_name, trg_value[sampled_targets]) else: gt_boxes = Boxes( targets_per_image.gt_boxes.tensor.new_zeros((len(sampled_inds), 4)) ) proposals_per_image.gt_boxes = gt_boxes if gt_light != None: gt_light = Boxes( targets_per_image.gt_light.tensor.new_zeros((len(sampled_inds), 4)) ) proposal_per_image.gt_light = gt_light num_fg_samples.append(sampled_fg_inds.numel()) num_bg_samples.append(sampled_bg_inds.numel()) proposals_with_gt.append(proposals_per_image) # Log the number of fg/bg samples that are selected for training ROI heads storage = get_event_storage() storage.put_scalar("roi_head/num_fg_samples", np.mean(num_fg_samples)) storage.put_scalar("roi_head/num_bg_samples", np.mean(num_bg_samples)) return proposals_with_gt ================================================ FILE: projects/LISA/LISA/LISA_rpn.py ================================================ # Copyright (c) Tianyu Wang. All Rights Reserved. from typing import Dict, List import torch import torch.nn.functional as F from torch import nn from detectron2.layers import ShapeSpec from detectron2.utils.registry import Registry from detectron2.modeling.anchor_generator import build_anchor_generator from detectron2.modeling.box_regression import Box2BoxTransform from detectron2.modeling.matcher import Matcher from detectron2.modeling import PROPOSAL_GENERATOR_REGISTRY, RPN_HEAD_REGISTRY from detectron2.modeling.proposal_generator.rpn_outputs import RPNOutputs, find_top_rpn_proposals from detectron2.modeling.proposal_generator.rpn import StandardRPNHead, RPN from detectron2.structures import BoxMode,Boxes """ Registry for LISA RPN heads, which take CNN feature maps and perform objectness classification and bounding box regression for anchors. """ # NOTE: `cfg.MODEL.RPN.HEAD_NAME` should be "LISARPNHead". def build_rpn_head(cfg, input_shape,shadow_object_part=False): """ Build an RPN head defined by `cfg.MODEL.RPN.HEAD_NAME`. """ name = cfg.MODEL.RPN.HEAD_NAME return RPN_HEAD_REGISTRY.get(name)(cfg, input_shape,shadow_object_part) @RPN_HEAD_REGISTRY.register() class LISARPNHead(StandardRPNHead): def __init__(self, cfg, input_shape: List[ShapeSpec], shadow_object_part= False): super(LISARPNHead, self).__init__(cfg,input_shape) self.shadow_object_part = shadow_object_part if self.shadow_object_part: in_channels = [s.channels for s in input_shape] assert len(set(in_channels)) == 1, "Each level must have the same channel!" in_channels = in_channels[0] self.conv = nn.Conv2d(in_channels , in_channels, kernel_size=3, stride=1, padding=1) for l in [self.conv]: nn.init.normal_(l.weight, std=0.01) nn.init.constant_(l.bias, 0) def forward(self, features): """ Args: features (list[Tensor]): list of feature maps """ pred_objectness_logits = [] pred_anchor_deltas = [] if self.shadow_object_part == False: pre_features = [] for i,x in enumerate(features): t = F.relu(self.conv(x)) pred_objectness_logits.append(self.objectness_logits(t)) pred_anchor_deltas.append(self.anchor_deltas(t)) if self.shadow_object_part == False: return pred_objectness_logits, pred_anchor_deltas, None else: return pred_objectness_logits, pred_anchor_deltas def build_proposal_generator(cfg, input_shape, **args): """ Build a proposal generator from `cfg.MODEL.PROPOSAL_GENERATOR.NAME`. The name can be "PrecomputedProposals" to use no proposal generator. """ name = cfg.MODEL.PROPOSAL_GENERATOR.NAME if name == "PrecomputedProposals": return None return PROPOSAL_GENERATOR_REGISTRY.get(name)(cfg, input_shape,**args) @PROPOSAL_GENERATOR_REGISTRY.register() class LISARPN(RPN): def __init__(self, cfg, input_shape: Dict[str, ShapeSpec], shadow_object_part= False): super(LISARPN, self).__init__(cfg, input_shape) self.shadow_object_part = shadow_object_part if self.shadow_object_part: self.rpn_head = build_rpn_head(cfg, [input_shape[f] for f in self.in_features], self.shadow_object_part) def forward(self, images, features, gt_instances=None, pre_proposals=None): gt_boxes = [x.gt_boxes for x in gt_instances] if gt_instances is not None else None del gt_instances if self.shadow_object_part == False: features = [features[f] for f in self.in_features] pred_objectness_logits, pred_anchor_deltas, pre_features = self.rpn_head(features) anchors = self.anchor_generator(features) else: features = [features[f] for f in self.in_features] pred_objectness_logits, pred_anchor_deltas = self.rpn_head(features) anchors = self.anchor_generator(features) assert len(anchors[0]) == len(pre_proposals), "number of pre_proposals {} and pre_anchors {} should be same.".format(len(anchors[0]),len(pre_proposals)) outputs = RPNOutputs( self.box2box_transform, self.anchor_matcher, self.batch_size_per_image, self.positive_fraction, images, pred_objectness_logits, pred_anchor_deltas, anchors, self.boundary_threshold, gt_boxes, self.smooth_l1_beta, ) if self.training: if self.shadow_object_part == False: losses = {k+'_asso': v * self.loss_weight for k, v in outputs.losses().items()} else: losses = {k: v * self.loss_weight for k, v in outputs.losses().items()} else: losses = {} with torch.no_grad(): pre_proposals = outputs.predict_proposals() # Find the top proposals by applying NMS and removing boxes that # are too small. The proposals are treated as fixed for approximate # joint training with roi heads. This approach ignores the derivative # w.r.t. the proposal boxes’ coordinates that are also network # responses, so is approximate. proposals = find_top_rpn_proposals( pre_proposals, outputs.predict_objectness_logits(), images, self.nms_thresh, self.pre_nms_topk[self.training], self.post_nms_topk[self.training], self.min_box_side_len, self.training, ) # For RPN-only models, the proposals are the final output and we return them in # high-to-low confidence order. # For end-to-end models, the RPN proposals are an intermediate state # and this sorting is actually not needed. But the cost is negligible. inds = [p.objectness_logits.sort(descending=True)[1] for p in proposals] proposals = [p[ind] for p, ind in zip(proposals, inds)] if self.shadow_object_part == False: return proposals, losses, pre_features, pre_proposals else: return proposals, losses ================================================ FILE: projects/LISA/LISA/__init__.py ================================================ # Copyright (c) Tianyu Wang. All Rights Reserved. from .config import add_lisa_config from .LISA_meta_arch import LISARCNN from .LISA_rcnn import LISAROIHeads from .LISA_rpn import LISARPN ================================================ FILE: projects/LISA/LISA/config.py ================================================ # -*- coding: utf-8 -*- from detectron2.config import CfgNode as CN def add_lisa_config(cfg): """ Add config for RelationNet. """ _C = cfg _C.MODEL.LISA = CN() ================================================ FILE: projects/LISA/SOAP.py ================================================ import numpy as np import pysobatools.sobaeval as SOAPEval import pysobatools.cocoeval as Eval from pysobatools.soba import SOBA import json soba = SOBA('../../../SOBA/annotations/SOBA_val.json') results = json.load(open('./output_light/inference/soba_instances_results.json')) association = json.load(open('./output_light/inference/soba_association_results.json')) instance_soba = soba.loadRes(results) association_soba = soba.loadRes_asso(association) sobaeval= SOAPEval.SOAPeval(soba,instance_soba,association_soba) print('segmentaion:') sobaeval.evaluate_asso() sobaeval.accumulate() sobaeval.summarize() print('bbox:') sobaeval= SOAPEval.SOAPeval(soba,instance_soba,association_soba) sobaeval.params.iouType = 'bbox' sobaeval.evaluate_asso() sobaeval.accumulate() sobaeval.summarize() print("--------------") sobaeval= Eval.COCOeval(soba,association_soba) sobaeval.evaluate_asso() sobaeval.accumulate() sobaeval.summarize() sobaeval= Eval.COCOeval(soba,association_soba) sobaeval.params.iouType="bbox" sobaeval.evaluate_asso() sobaeval.accumulate() sobaeval.summarize() ================================================ FILE: projects/LISA/__init__.py ================================================ from .utils import * ================================================ FILE: projects/LISA/config/Base-RCNN-FPN.yaml ================================================ MODEL: META_ARCHITECTURE: "GeneralizedRCNN" BACKBONE: NAME: "build_resnet_fpn_backbone" RESNETS: OUT_FEATURES: ["res2", "res3", "res4", "res5"] FPN: IN_FEATURES: ["res2", "res3", "res4", "res5"] ANCHOR_GENERATOR: SIZES: [[32], [64], [128], [256], [512]] # One size for each in feature map ASPECT_RATIOS: [[0.5, 1.0, 2.0]] # Three aspect ratios (same for all in feature maps) RPN: IN_FEATURES: ["p2", "p3", "p4", "p5", "p6"] PRE_NMS_TOPK_TRAIN: 2000 # Per FPN level PRE_NMS_TOPK_TEST: 1000 # Per FPN level # Detectron1 uses 2000 proposals per-batch, # (See "modeling/rpn/rpn_outputs.py" for details of this legacy issue) # which is approximately 1000 proposals per-image since the default batch size for FPN is 2. POST_NMS_TOPK_TRAIN: 1000 POST_NMS_TOPK_TEST: 1000 ROI_HEADS: NAME: "StandardROIHeads" IN_FEATURES: ["p2", "p3", "p4", "p5"] ROI_BOX_HEAD: NAME: "FastRCNNConvFCHead" NUM_FC: 2 POOLER_RESOLUTION: 7 ROI_MASK_HEAD: NAME: "MaskRCNNConvUpsampleHead" NUM_CONV: 4 POOLER_RESOLUTION: 14 DATASETS: TRAIN: ("coco_2017_train",) TEST: ("coco_2017_val",) SOLVER: IMS_PER_BATCH: 16 BASE_LR: 0.02 STEPS: (60000, 80000) MAX_ITER: 90000 INPUT: MIN_SIZE_TRAIN: (640, 672, 704, 736, 768, 800) ================================================ FILE: projects/LISA/config/LISA_101_FPN_3x.yaml ================================================ _BASE_: "Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "./R-101.pkl" MASK_ON: True RESNETS: DEPTH: 101 META_ARCHITECTURE: "LISARCNN" PROPOSAL_GENERATOR: NAME: "LISARPN" RPN: HEAD_NAME: "LISARPNHead" PRE_NMS_TOPK_TRAIN: 2000 # Per FPN level PRE_NMS_TOPK_TEST: 1000 # Per FPN level # Detectron1 uses 2000 proposals per-batch, # (See "modeling/rpn/rpn_outputs.py" for details of this legacy issue) # which is approximately 1000 proposals per-image since the default batch size for FPN is 2. POST_NMS_TOPK_TRAIN: 2000 POST_NMS_TOPK_TEST: 1000 ROI_HEADS: NAME: "LISAROIHeads" NUM_CLASSES: 2 ROI_BOX_HEAD: SMOOTH_L1_BETA: 0.5 SOLVER: STEPS: (40000, 100000) MAX_ITER: 40000 BASE_LR: 0.001 IMS_PER_BATCH: 8 DATASETS: TRAIN: ("soba_cast_shadow_train_full",) TEST: ("soba_cast_shadow_val_full",) OUTPUT_DIR: "./output_light" ================================================ FILE: projects/LISA/config/LISA_101_FPN_3x_demo.yaml ================================================ _BASE_: "Base-RCNN-FPN.yaml" MODEL: WEIGHTS: "output_light/last_checkpoint.pth" MASK_ON: True RESNETS: DEPTH: 101 META_ARCHITECTURE: "LISARCNN" PROPOSAL_GENERATOR: NAME: "LISARPN" RPN: HEAD_NAME: "LISARPNHead" PRE_NMS_TOPK_TRAIN: 2000 # Per FPN level PRE_NMS_TOPK_TEST: 1000 # Per FPN level # Detectron1 uses 2000 proposals per-batch, # (See "modeling/rpn/rpn_outputs.py" for details of this legacy issue) # which is approximately 1000 proposals per-image since the default batch size for FPN is 2. POST_NMS_TOPK_TRAIN: 2000 POST_NMS_TOPK_TEST: 1000 ROI_HEADS: NAME: "LISAROIHeads" NUM_CLASSES: 2 ROI_BOX_HEAD: SMOOTH_L1_BETA: 0.5 SOLVER: STEPS: (80000, 100000) MAX_ITER: 150000 BASE_LR: 0.001 IMS_PER_BATCH: 8 DATASETS: TRAIN: ("coco_cast_shadow_train_beta_full",) TEST: ("coco_cast_shadow_val_beta_full",) OUTPUT_DIR: "./output_light" ================================================ FILE: projects/LISA/defaults.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ This file contains components with some default boilerplate logic user may need in training / testing. They will not work for everyone, but many users may find them useful. The behavior of functions/classes in this file is subject to change, since they are meant to represent the "common default behavior" people need in their projects. """ import argparse import logging import os from collections import OrderedDict import torch from fvcore.common.file_io import PathManager from fvcore.nn.precise_bn import get_bn_modules from torch.nn.parallel import DistributedDataParallel import detectron2.data.transforms as T from detectron2.checkpoint import DetectionCheckpointer from detectron2.data import ( MetadataCatalog, build_detection_test_loader, build_detection_train_loader, ) from detectron2.evaluation import ( DatasetEvaluator, inference_on_dataset, print_csv_format, verify_results, ) from detectron2.modeling import build_model from detectron2.solver import build_lr_scheduler, build_optimizer from detectron2.utils import comm from detectron2.utils.collect_env import collect_env_info from detectron2.utils.env import seed_all_rng from detectron2.utils.events import CommonMetricPrinter, JSONWriter, TensorboardXWriter from detectron2.utils.logger import setup_logger from . import hooks from .train_loop import SimpleTrainer __all__ = ["default_argument_parser", "default_setup", "DefaultPredictor", "DefaultTrainer"] def default_argument_parser(): """ Create a parser with some common arguments used by detectron2 users. Returns: argparse.ArgumentParser: """ parser = argparse.ArgumentParser(description="Detectron2 Training") parser.add_argument("--config-file", default="", metavar="FILE", help="path to config file") parser.add_argument( "--resume", action="store_true", help="whether to attempt to resume from the checkpoint directory", ) parser.add_argument("--eval-only", action="store_true", help="perform evaluation only") parser.add_argument("--num-gpus", type=int, default=1, help="number of gpus *per machine*") parser.add_argument("--num-machines", type=int, default=1) parser.add_argument( "--machine-rank", type=int, default=0, help="the rank of this machine (unique per machine)" ) # PyTorch still may leave orphan processes in multi-gpu training. # Therefore we use a deterministic way to obtain port, # so that users are aware of orphan processes by seeing the port occupied. port = 2 ** 15 + 2 ** 14 + hash(os.getuid()) % 2 ** 14 parser.add_argument("--dist-url", default="tcp://127.0.0.1:{}".format(port)) parser.add_argument( "opts", help="Modify config options using the command-line", default=None, nargs=argparse.REMAINDER, ) return parser def default_setup(cfg, args): """ Perform some basic common setups at the beginning of a job, including: 1. Set up the detectron2 logger 2. Log basic information about environment, cmdline arguments, and config 3. Backup the config to the output directory Args: cfg (CfgNode): the full config to be used args (argparse.NameSpace): the command line arguments to be logged """ output_dir = cfg.OUTPUT_DIR if comm.is_main_process() and output_dir: PathManager.mkdirs(output_dir) rank = comm.get_rank() setup_logger(output_dir, distributed_rank=rank, name="fvcore") logger = setup_logger(output_dir, distributed_rank=rank) logger.info("Rank of current process: {}. World size: {}".format(rank, comm.get_world_size())) logger.info("Environment info:\n" + collect_env_info()) logger.info("Command line arguments: " + str(args)) if hasattr(args, "config_file"): logger.info( "Contents of args.config_file={}:\n{}".format( args.config_file, PathManager.open(args.config_file, "r").read() ) ) logger.info("Running with full config:\n{}".format(cfg)) if comm.is_main_process() and output_dir: # Note: some of our scripts may expect the existence of # config.yaml in output directory path = os.path.join(output_dir, "config.yaml") with PathManager.open(path, "w") as f: f.write(cfg.dump()) logger.info("Full config saved to {}".format(os.path.abspath(path))) # make sure each worker has a different, yet deterministic seed if specified seed_all_rng(None if cfg.SEED < 0 else cfg.SEED + rank) # cudnn benchmark has large overhead. It shouldn't be used considering the small size of # typical validation set. if not (hasattr(args, "eval_only") and args.eval_only): torch.backends.cudnn.benchmark = cfg.CUDNN_BENCHMARK class DefaultPredictor: """ Create a simple end-to-end predictor with the given config. The predictor takes an BGR image and produce a dict of predictions. Attributes: metadata (Metadata): the metadata of the underlying dataset, obtained from cfg.DATASETS.TEST. """ def __init__(self, cfg): self.cfg = cfg.clone() # cfg can be modified by model self.model = build_model(self.cfg) self.model.eval() self.metadata = MetadataCatalog.get(cfg.DATASETS.TEST[0]) checkpointer = DetectionCheckpointer(self.model) checkpointer.load(cfg.MODEL.WEIGHTS) self.transform_gen = T.ResizeShortestEdge( [cfg.INPUT.MIN_SIZE_TEST, cfg.INPUT.MIN_SIZE_TEST], cfg.INPUT.MAX_SIZE_TEST ) self.input_format = cfg.INPUT.FORMAT assert self.input_format in ["RGB", "BGR"], self.input_format @torch.no_grad() def __call__(self, original_image): """ Args: original_image (np.ndarray): an image of shape (H, W, C) (in BGR order). Returns: predictions (dict): the output of the model """ # Apply pre-processing to image. if self.input_format == "RGB": # whether the model expects BGR inputs or RGB original_image = original_image[:, :, ::-1] height, width = original_image.shape[:2] image = self.transform_gen.get_transform(original_image).apply_image(original_image) image = torch.as_tensor(image.astype("float32").transpose(2, 0, 1)) inputs = {"image": image, "height": height, "width": width} predictions = self.model([inputs])[0] return predictions class DefaultTrainer(SimpleTrainer): """ A trainer with default training logic. Compared to `SimpleTrainer`, it contains the following logic in addition: 1. Create model, optimizer, scheduler, dataloader from the given config. 2. Load a checkpoint or `cfg.MODEL.WEIGHTS`, if exists. 3. Register a few common hooks. It is created to simplify the **standard model training workflow** and reduce code boilerplate for users who only need the standard training workflow, with standard features. It means this class makes *many assumptions* about your training logic that may easily become invalid in a new research. In fact, any assumptions beyond those made in the :class:`SimpleTrainer` are too much for research. The code of this class has been annotated about restrictive assumptions it mades. When they do not work for you, you're encouraged to write your own training logic. Also note that the behavior of this class, like other functions/classes in this file, is not stable, since it is meant to represent the "common default behavior". It is only guaranteed to work well with the standard models and training workflow in detectron2. To obtain more stable behavior, write your own training logic with other public APIs. Attributes: scheduler: checkpointer (DetectionCheckpointer): cfg (CfgNode): """ def __init__(self, cfg): """ Args: cfg (CfgNode): """ # Assume these objects must be constructed in this order. model = self.build_model(cfg) optimizer = self.build_optimizer(cfg, model) data_loader = self.build_train_loader(cfg) # For training, wrap with DDP. But don't need this for inference. if comm.get_world_size() > 1: # print(comm.get_local_rank()) model = DistributedDataParallel( model, device_ids=[comm.get_local_rank()], broadcast_buffers=False ) super().__init__(model, data_loader, optimizer) self.scheduler = self.build_lr_scheduler(cfg, optimizer) # Assume no other objects need to be checkpointed. # We can later make it checkpoint the stateful hooks self.checkpointer = DetectionCheckpointer( # Assume you want to save checkpoints together with logs/statistics model, cfg.OUTPUT_DIR, optimizer=optimizer, scheduler=self.scheduler, ) self.start_iter = 0 self.max_iter = cfg.SOLVER.MAX_ITER self.cfg = cfg self.register_hooks(self.build_hooks()) def resume_or_load(self, resume=True): """ If `resume==True`, and last checkpoint exists, resume from it. Otherwise, load a model specified by the config. Args: resume (bool): whether to do resume or not """ # The checkpoint stores the training iteration that just finished, thus we start # at the next iteration (or iter zero if there's no checkpoint). self.start_iter = ( self.checkpointer.resume_or_load(self.cfg.MODEL.WEIGHTS, resume=resume).get( "iteration", -1 ) + 1 ) def build_hooks(self): """ Build a list of default hooks. Returns: list[HookBase]: """ cfg = self.cfg.clone() cfg.defrost() cfg.DATALOADER.NUM_WORKERS = 0 # save some memory and time for PreciseBN ret = [ hooks.IterationTimer(), hooks.LRScheduler(self.optimizer, self.scheduler), hooks.PreciseBN( # Run at the same freq as (but before) evaluation. cfg.TEST.EVAL_PERIOD, self.model, # Build a new data loader to not affect training self.build_train_loader(cfg), cfg.TEST.PRECISE_BN.NUM_ITER, ) if cfg.TEST.PRECISE_BN.ENABLED and get_bn_modules(self.model) else None, ] # Do PreciseBN before checkpointer, because it updates the model and need to # be saved by checkpointer. # This is not always the best: if checkpointing has a different frequency, # some checkpoints may have more precise statistics than others. if comm.is_main_process(): ret.append(hooks.PeriodicCheckpointer(self.checkpointer, cfg.SOLVER.CHECKPOINT_PERIOD)) def test_and_save_results(): self._last_eval_results = self.test(self.cfg, self.model) return self._last_eval_results # Do evaluation after checkpointer, because then if it fails, # we can use the saved checkpoint to debug. ret.append(hooks.EvalHook(cfg.TEST.EVAL_PERIOD, test_and_save_results)) if comm.is_main_process(): # run writers in the end, so that evaluation metrics are written ret.append(hooks.PeriodicWriter(self.build_writers())) return ret def build_writers(self): """ Build a list of default writers, that write metrics to the screen, a json file, and a tensorboard event file respectively. Returns: list[Writer]: a list of objects that have a ``.write`` method. """ # Assume the default print/log frequency. return [ # It may not always print what you want to see, since it prints "common" metrics only. CommonMetricPrinter(self.max_iter), JSONWriter(os.path.join(self.cfg.OUTPUT_DIR, "metrics.json")), TensorboardXWriter(self.cfg.OUTPUT_DIR), ] def train(self): """ Run training. Returns: OrderedDict of results, if evaluation is enabled. Otherwise None. """ super().train(self.start_iter, self.max_iter) if hasattr(self, "_last_eval_results") and comm.is_main_process(): verify_results(self.cfg, self._last_eval_results) return self._last_eval_results @classmethod def build_model(cls, cfg): """ Returns: torch.nn.Module: """ model = build_model(cfg) logger = logging.getLogger(__name__) logger.info("Model:\n{}".format(model)) return model @classmethod def build_optimizer(cls, cfg, model): """ Returns: torch.optim.Optimizer: """ return build_optimizer(cfg, model) @classmethod def build_lr_scheduler(cls, cfg, optimizer): return build_lr_scheduler(cfg, optimizer) @classmethod def build_train_loader(cls, cfg): """ Returns: iterable """ return build_detection_train_loader(cfg) @classmethod def build_test_loader(cls, cfg, dataset_name): """ Returns: iterable """ return build_detection_test_loader(cfg, dataset_name) @classmethod def build_evaluator(cls, cfg, dataset_name): """ Returns: DatasetEvaluator """ raise NotImplementedError @classmethod def test(cls, cfg, model, evaluators=None): """ Args: cfg (CfgNode): model (nn.Module): evaluators (list[DatasetEvaluator] or None): if None, will call :meth:`build_evaluator`. Otherwise, must have the same length as `cfg.DATASETS.TEST`. Returns: dict: a dict of result metrics """ logger = logging.getLogger(__name__) if isinstance(evaluators, DatasetEvaluator): evaluators = [evaluators] if evaluators is not None: assert len(cfg.DATASETS.TEST) == len(evaluators), "{} != {}".format( len(cfg.DATASETS.TEST), len(evaluators) ) results = OrderedDict() for idx, dataset_name in enumerate(cfg.DATASETS.TEST): data_loader = cls.build_test_loader(cfg, dataset_name) # When evaluators are passed in as arguments, # implicitly assume that evaluators can be created before data_loader. evaluator = ( evaluators[idx] if evaluators is not None else cls.build_evaluator(cfg, dataset_name) ) results_i = inference_on_dataset(model, data_loader, evaluator) results[dataset_name] = results_i if comm.is_main_process(): assert isinstance( results_i, dict ), "Evaluator must return a dict on the main process. Got {} instead.".format( results_i ) logger.info("Evaluation results for {} in csv format:".format(dataset_name)) print_csv_format(results_i) if len(results) == 1: results = list(results.values())[0] return results ================================================ FILE: projects/LISA/demo.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import argparse import glob import multiprocessing as mp import os import time import cv2 import tqdm import skimage.io as io import numpy as np import skimage.transform as tf from detectron2.config import get_cfg from detectron2.data.detection_utils import read_image from detectron2.utils.logger import setup_logger from predictor import VisualizationDemo from LISA import add_lisa_config def setup_cfg(args): # load config from file and command-line arguments cfg = get_cfg() cfg.merge_from_file(args.config_file) cfg.merge_from_list(args.opts) # Set score_threshold for builtin models cfg.MODEL.RETINANET.SCORE_THRESH_TEST = args.confidence_threshold cfg.MODEL.ROI_HEADS.SCORE_THRESH_TEST = args.confidence_threshold cfg.MODEL.PANOPTIC_FPN.COMBINE.INSTANCES_CONFIDENCE_THRESH = args.confidence_threshold cfg.freeze() return cfg def get_parser(): parser = argparse.ArgumentParser(description="Detectron2 Demo") parser.add_argument( "--config-file", default="configs/quick_schedules/e2e_mask_rcnn_R_50_FPN_inference_acc_test.yaml", metavar="FILE", help="path to config file", ) parser.add_argument("--webcam", action="store_true", help="Take inputs from webcam.") parser.add_argument("--video-input", help="Path to video file.") parser.add_argument("--input", nargs="+", help="A list of space separated input images") parser.add_argument( "--output", help="A file or directory to save output visualizations. " "If not given, will show output in an OpenCV window.", ) parser.add_argument( "--confidence-threshold", type=float, default=0.5, help="Minimum score for instance predictions to be shown", ) parser.add_argument( "--opts", help="Modify model config options using the command-line", default=[], nargs=argparse.REMAINDER, ) return parser if __name__ == "__main__": mp.set_start_method("spawn", force=True) args = get_parser().parse_args() logger = setup_logger() logger.info("Arguments: " + str(args)) cfg = setup_cfg(args) demo = VisualizationDemo(cfg) if args.input: if len(args.input) == 1: args.input = glob.glob(os.path.expanduser(args.input[0])) for path in tqdm.tqdm(args.input, disable=not args.output): # use PIL, to be consistent with evaluation img = read_image(path, format="BGR") start_time = time.time() predictions, visualized_output = demo.run_on_image(img) logger.info( "{}: detected {} instances in {:.2f}s".format( path, len(predictions[0][0]["instances"]), time.time() - start_time ) ) ins,rel = predictions #for i,mask in enumerate(rel[0]['instances'].pred_masks): # mask = mask[:,:,0] # mask = np.array([mask,mask,mask,mask]).astype('uint8').transpose(1,2,0) * 255 # io.imsave('./demo/mask{}.png'.format(i),mask) # print(predictions) # print(visualized_output) if args.output: if os.path.isdir(args.output): assert os.path.isdir(args.output), args.output out_filename = os.path.join(args.output, os.path.basename(path)) else: assert len(args.input) == 1, "Please specify a directory with args.output" out_filename = args.output visualized_output.save(out_filename) else: cv2.imshow("COCO detections", visualized_output.get_image()[:, :, ::-1]) if cv2.waitKey(0) == 27: break # esc to quit elif args.webcam: assert args.input is None, "Cannot have both --input and --webcam!" cam = cv2.VideoCapture(0) for vis in tqdm.tqdm(demo.run_on_video(cam)): cv2.imshow("COCO detections", vis) if cv2.waitKey(1) == 27: break # esc to quit cv2.destroyAllWindows() elif args.video_input: video = cv2.VideoCapture(args.video_input) width = int(video.get(cv2.CAP_PROP_FRAME_WIDTH)) height = int(video.get(cv2.CAP_PROP_FRAME_HEIGHT)) frames_per_second = video.get(cv2.CAP_PROP_FPS) num_frames = int(video.get(cv2.CAP_PROP_FRAME_COUNT)) basename = os.path.basename(args.video_input) if args.output: if os.path.isdir(args.output): output_fname = os.path.join(args.output, basename) output_fname = os.path.splitext(output_fname)[0] + ".mkv" else: output_fname = args.output assert not os.path.isfile(output_fname), output_fname output_file = cv2.VideoWriter( filename=output_fname, # some installation of opencv may not support x264 (due to its license), # you can try other format (e.g. MPEG) fourcc=cv2.VideoWriter_fourcc(*"x264"), fps=float(frames_per_second), frameSize=(width, height), isColor=True, ) assert os.path.isfile(args.video_input) for vis_frame in tqdm.tqdm(demo.run_on_video(video), total=num_frames): if args.output: output_file.write(vis_frame) else: cv2.imshow(basename, vis_frame) if cv2.waitKey(1) == 27: break # esc to quit video.release() if args.output: output_file.release() else: cv2.destroyAllWindows() ================================================ FILE: projects/LISA/output_light/inference/soba_association_results.json ================================================ [{"image_id": 1, "category_id": 1, "bbox": [208.0, 135.0, 177.0, 293.0], "score": 0.9999988675117493, "association_id": 1, "light": [-1.8854426145553589, -1.7631640434265137, 1.7723000049591064, 1.5570213794708252], "segmentation": {"size": [768, 1024], "counts": "jZl4=ag04M2N101N2N2O1O1N2O0O101N2O0O4M2M2O1O001O1N3N2N2N1O1O1O1O001O001O3M2N1O0O2O2N8G4I6N0O2O0O2F]MU[Oc2gd0>K5M3N2OkNc[OhN[d0Y1e[OgN[d0Y1f[OgNYd0X1h[OiNWd0\\Of[OY13\\OVd0ZOh[OY14\\O[?VOmD3fK[12]OU?2ZDVO`LZ12_Oo>b0RDcNoL\\11^Om>g0PD^NSM]1O@l>g0QD[NUM^1N@k>k0nCXNYM]1MAk>R1gCPNbM]1LBj>c1TC_MWN]1JAj>m1kBUMbN]1HBj>R2fBPMhN]1GAk>V2aBiLQOn2^>>WBfL^Ol2[>n1fARNZ>m1gASNY>l1hAUNW>k1iAaM\\OmMj>c4jA_M^OmMh>d4jA_M@kMf>f4kA]M@mMd>g4lA\\M@mMd>g4lA\\M@mMe>e4lA^M_OmMf>d4mA]M\\OPNg>b4SBYMVOUNh>a4UBWMSOXNh>a4VBVMQOZNi>_4XBVMoN[Ni>_4YBUMnN\\Ni>_4YBUMnN\\Ni>_4ZBSMnN^Nh>_4[BRMmN_Ni>^4ZBRMnN`Nh>_4ZBoLoNaNh>a4YBmLoNbNh>b4YBjLPOdNh>b4WBZLjNRO72h>c4WBWLkNTO62h>c4YBTLkNUO54g>d4ZBQLkNUO55g>f4\\BkKjNWO58f>e4]BjK[OBX>d4^BiKZOBY>f4]BgKZOBZ>g4\\BgKZOBZ>h4\\BeKZOCZ>i4[BcK[OEZ>h4\\BbKZOE[>j4ZBaK[OE[>k4ZB_KZOG\\>k4ZB]KYOH]>m4YB[KYOI^>m4YBYKYOJ^>m4YBYKXOJ`>n4XBWKVOMb>l4XBWKROOh>j4WBVKnN2m>h4VBSKmN5n>h4VBRKkN6P?h4WBPKiN8o>i4XBoJhN8Q?i4XBnJgN9Q?i4YBnJdN:S?h4ZBmJbN;U?i4YBlJ`Ne4oAZKR>f4nAZKS>e4mA[KT>d4kA\\KX>c4gA]KZ>b4fA^K[>a4eA^K]>a4cA_K^>`4bAiJeN8k?n4_AhJiN:i?l4^AiJkN:j?k4ZAkJmN9j?k4YAkJnN:k?j4WAkJnN;l?k4UAiJoN`4XA`Kk>^4TAaKo>^4PAbKR?]4m@cKZ?X4d@hKS`0j3d^OoK:7^a0W4`^OgKga0T4W^OmKla0P4T^OPLQb0l3m]OULPc0n2o\\ORM\\c0d2d\\O\\M_c0b2`\\O^Mbc0`2]\\O`Mgc0\\2Z\\OdMlc0V2T\\OiMTd0P2l[OPNZd0i1g[OVNbd0b1^[O^Nee0>\\ZOAne04UZOJSf0NnYO1Wf0IkYO7Pg0N101N3Mfkn>"}}, {"image_id": 1, "category_id": 1, "bbox": [360.0, 138.0, 406.0, 614.0], "score": 0.999998152256012, "association_id": 2, "light": [-2.4960312843322754, -1.2195820808410645, 2.3225607872009277, 1.0873587131500244], "segmentation": {"size": [768, 1024], "counts": "Q`^85hg06K4M4K4M2O11N2O1N3M3N2M100O10O0010O01O1O10O0010O10003L7MM10O000O1O1O10O01O001O001O1O1O3dHYOXGk0a8_OYGf0_8C[G`0`8E]G=^8H`G:[8JdG7Y8MeG5R83nGMi7=VHCb7f0]HZO\\7n0cHROT7X1kHiNi6c1VI]N`6n1_ISNV6X2kIhMl5a2UJ_Ma5j2aJUM`4i3_KXLR4V4nKkKi3]4WLbKd3d4[L[Kb3j4\\LWKa3l4_LTK]3R5aLmJ\\3X5cLhJY3]5fLcJX3`5gL_JX3c5hL]JV3f5iL[JT3g5lLYJS3h5mLYJP3h5QMZJk2h5TM[Ji2f5WM[Jf2f5[M[Jc2f5]M[Ja2e5`M[J_2e5bM[J]2f5cMYJ]2g5dMYJ[2g5fMXJZ2h5fMYJY2g5hMYJW2h5iMWJW2i5iMXJV2h5kMXJT2h5lMYJS2g5mMYJS2g5\\K`HiNi1j5h5YKcHlNf1j5g5UKiHQO`1i5g5SKmHSO]1i5f5QKQIUOZ1i5f5oJSIWOX1h5f5RKQIVOY1h5g5RKPITO[1i5e5TKoHRO^1i5c5UKoHQO`1i5b5VKmHPOc1i5`5WKmHoNe1i5_5WKlHnNi1i5[5ZKkHkNn1h5X5]KkHhN5_Ne0Z7\\6^KjHhN4eNd0T7^6_KjHgN3jNd0o6`6_KiHgN4lNc0m6a6_KhHgN4POa0j6d6^KgHgN4SOa0g6d6`KfHfN5UO`0d6f6`KeHfN6WO>c6h6`KdHeN5[O>_6i6bKcHcN7^O;]6l6bKaHcN8@:Z6m6dKaH`N9D8W6o6eK_H`N9H7R6Q7fK`H^N9K6P6R7gK^H]N;M7l5P7kK^HZN<07i5o6mK_HXN;39f5n6oK]HWN=59c5n6PL]HVN=79b5m6QL^HTN<;:^5m6SL\\HSN><:]5m6SL\\HRN>>:\\5m6TLZHRN??9[5o6SLYHSN>`0;Y5o6TLWHSN>a0=W5o6ULUHRN?d0f0>S5P7ZLPHmM`0h0a0P5P7\\LmGkMb0k0a0m4Q7^LjGjMc0l0d0j4o6aLjGfMd0Q1c0g4P7aLiGfMc0T1f0c4n6dLiGcMc0X1f0`4o6dLiGbMb0[1g0^4n6fLlG[M2ALQ2X1\\4o6fLmGYMOMEj1`1Y4o6gLPHTMM^2T1f3P7gLSHoLKd2S1e3o6jLiH@7f3Q7lLfH^O9e3Q7nLhHZO7h3R7mLhH[O6g3S7nLgH[O6f3S7oLhHZO6f3S7oLhH[O5e3T7oLgH\\O6d3S7QMfH\\O7b3T7QMeH^O7`3U7QMeH^O7`3T7RMeH_O6_3V7QMdHA6]3V7RMdHA6]3W7QMcHC6[3X7QMbHD6[3X7RMaHC8Z3X7SM_HD8Y3Z7RM^HE9X3Y7TM\\HE;X3Y7TMZHFZ4k7kMlGcNLYO=X4k7lMlGaNO[O9X4m7lMjG`N0_O8T4o7lMjG_N0B6S4P8mMiG]N1F4P4R8nMhG[N3I2m3T8oMfG[N3K2k3U8PNeGYN4O1g3W8QNdGWN53Ne3Y8RNcGVN64Nc3Y8SNcGUN67N`3Z8TNaGUN78M`3Z8SNcGSN6;N^3Y8UNbGRN7ZOUTQ6"}}, {"image_id": 2, "category_id": 1, "bbox": [183.0, 375.0, 488.0, 731.0], "score": 0.9999985098838806, "association_id": 1, "light": [-1.6857788562774658, -2.483166456222534, 1.5531294345855713, 2.3420069217681885], "segmentation": {"size": [1280, 1024], "counts": "laU7X1_V1a0G4L2N3N1N2O1O1O1O3M4L4L5K5K5K4L3bkNfMoR1k3K2N1O2N1O2N1O1O2N001O001O1O001O1O1O2N2N1O1O1O1O001O000010O0001O001O001O001O1O1O1O1O1O001O001O001O00001O001O1O001O1O2N001O1O001O001O1O001O100O1O1O1O1O001O00001O00001O0000001O001O001O010O1O1O1O1O1O10O0001O01O00010fIQoNa5PQ1[JVoNb5mP1YJXoNe5jP1UJ[oNi5`Q1N1O1000001O1O1O1O1O1aKhmNS3YR1iLQnNPOO_3RR1]MdnNa2\\Q1\\MjmNTOe0^3cQ1ZMemNMN2N2O1O1O1O2M2N3N2N2Dg[OD[d08>J^Wcb0"}}, {"image_id": 3, "category_id": 1, "bbox": [77.0, 219.0, 946.0, 389.0], "score": 0.9996058344841003, "association_id": 1, "light": [-1.3938037157058716, -2.5917248725891113, 1.3562194108963013, 2.4783990383148193], "segmentation": {"size": [682, 1024], "counts": "Qkc11Ye01N2O1N2O2M2N4M4K2N2O1N2N2SJZOSGg0j8^ORGe0i8ATGa0i8DSG>i8FUGPGCo8>PGBo8?PGBP9?oFBo8`0PG@P9a0oF_OP9b0PG^Oo8d0PG\\OP9e0nF\\OQ9g0mFYOR9j0lFWOS9j0lFVOS9m0jFTOU9o0iFQOV9S1gFmNX9W1eFiNZ9[1bFfN]9^1`FbN_9c1\\F^Nc9f1ZFZNf9i1VFXNi9k1UFVNi9n1SFSNm9n1QFSNn9o1QFQNo9P2oEQNP:P2PFPNo9R2oEoMQ:R2mEoMR:R2nEnMR:S2lEnMT:R2lEnMS:T2kEmMU:S2kEmMT:U2kEkMU:U2jElMV:U2iEkMW:U2iElMU:V2jEjMV:V2iEkMW:V2hEjMX:V2hEjMW:X2hEhMX:Y2gEgMY:Y2fEhMZ:Y2eEgM[:Z2dEfM\\:[2cEeM\\:]2bEdM^:^2`EbM`:_2_EaMa:`2^E`Mb:b2[E_Me:b2ZE^Me:d2ZE\\Mf:e2XE\\Mh:e2WE[Mi:f2UE[Mk:f2TEZMl:f2SE[Mm:f2REZMn:g2PEZMo:g2QEYMo:h2oDYMQ;g2oDYMQ;h2mDYMS;g2mDYMS;g2lDZMT;g2kDYMU;g2kDYMU;g2jDZMU;h2jDXMV;h2jDXMV;h2iDYMW;h2hDXMX;h2hDXMX;i2fDXMZ;h2fDXMZ;i2eDWM[;j2dDVM\\;k2bDVM^;j2bDVM^;k2aDUM_;l2`DTM`;m2^DTMb;n2\\DRMd;o2[DQMe;P3YDQMg;Q3WDoLi;Q3WDoLi;R3UDoLk;R3TDnLl;R3SDoLm;R3RDnLn;R3QDoLo;Q3PDPMPPCAQ==RCBo<e0L3M1O1M3N2O100O1O0N3O10O010ON10011O0000ONO4N2N3O000M300010O001N1O20O02N1O3L4M2O1N2N3M3N1ZCTNU:PBHS>2nAOU>NlA2V>KjA7W>EiA=\\>1O1000000O101O0000000000O100000000000000O1BbA:YUk5"}}, {"image_id": 4, "category_id": 1, "bbox": [238.0, 269.0, 276.0, 185.0], "score": 0.9999955296516418, "association_id": 2, "light": [-2.7548646926879883, -1.9430928230285645, 2.6450157165527344, 1.7103960514068604], "segmentation": {"size": [480, 640], "counts": "Vl_37f>8I5J4J5O2M4lDPOR8S1kGTOi7W1PHQOc7g1UFhM03o0b0i8d2lF_MR9f2hF\\MW9g2fF[MY9g2cF[M\\9f2eFYM[9h2eFWMZ9j2hFTMW9m2kFPMU9R3lFlLS9U3PGgLP9Z3oFUL[O3P:j3cFVL[OOR:l3bF[L]9e3^F`La9a3_F`L`9`3_FaL`9`3`F`L_9`3bFaL\\9`3cFaL]9_3cF`L]9a3cF^L]9c3bF]L_9c3aF\\L`9d3`F[L`9e3`F[La9f3^FYLc9g3]FYLc9h3[FXLe9i3[FWLe9j3ZFVLe9k3ZFVLf9k3XFULh9l3XFTLh9m3VFTLi9m3WFSLi9n3VFRLi9o3XFoKi9R4WFmKi9T4WFjKj9W4VFbKL0n9h4TFVKl9l431O2RFTKd9U5O1O1O1O1O5K3M1O1O001O000000000000QNmFQNS9m1nFTNR9k1nFVNR9i1nFXNR9g1mF[NS9e1lF[NU9e1kF[NU9d1kF]NU9c1kF\\NV9c1jFlMOQOW9R3kFmM5iNQ9Z3hFoMi9P2WFQNi9n1WFSNi9l1XFTNh9l1WFVNh9j1XFUNi9k1WFTNj9l1VFSNk9l1UFSNm9m1SFQNo9o1QFPNP:P2PFoMQ:Q2nEoMS:Q2mEoMS:Q2mEoMS:Q2mEnMT:R2lEmMV:R2kElMV:T2jEkMW:V2hEjMX:V2hEiMZ:V2fEjMZ:V2fEiM[:X2eEfM]:Y2cEfM^:[2bEcM`:\\2`EcMa:^2_EaMa:_2_E`Mb:_31O0O100O1O2N100O1000000O1000000000000000000000000000QFQLm8o3RGTLl8l3SGVLl8j3RGYLm8g3QG[Lo8e3nF_LQ9a3kFcLU9]3iFfLV9Z3hFhLX9X3fFkLY9T3gFmLY9R3hFmLY9Q3iFnLX9P3jFoLV9Q3kFmLW9g2[FgL?=[9m2VFeL>:a9R3QFaL`09c9W3cFdLa9^3^F^Lf9c3YF\\Lh9d3XF[L_O4n9b3bFYL_O9l9a3cFUL@N21O0000001O01O0O10001O1O00001O0QOaE\\Ma:`2aE`M`:^2\\EfMf:X32O1O2O0jNREYNo:d1TE[Nn:`1UE`Nl:Z1ZEbNj:]1VEbNm:]1SEbNn:]1REcNP;[1QEeNP;[1oDeNR;Z1nDfNS;Y1mDfNU;Z1jDfNW;Z1hDfN[;X1dDgN_;X1`DhNb;V1^DjNc;V1]DhNe;W1[DiNf;W1ZDhNf;X1[DfNg;Z1YDcNk;\\1VDaNl;_1TD[NS2M4DU[O2Re0000000O10000O10000O1O1O_Yn6"}}, {"image_id": 5, "category_id": 1, "bbox": [0.0, 153.0, 322.0, 187.0], "score": 0.9981808662414551, "association_id": 1, "light": [-1.7202225923538208, -1.363750696182251, 1.724881649017334, 1.2142659425735474], "segmentation": {"size": [683, 1024], "counts": "_6X2mb0mLXAS3a`0O001O00100O001O001O01O01O0000000010O000001O0000001O00000Di]OdMXb0[2h]OeMXb0[2i]OdMWb0]2i]ObMXb0]2h]OcMXb0]2h]OcMYb0\\2h]OcMYb0\\2g]OdMZb0[2f]OdM\\b0[2e]OdM\\b0[2d]OeM\\b0\\2c]OcM_b0\\2a]OdM_b0\\2b]OcM^b0]2b]ObM`b0]2`]OcM`b0^2`]O`Mab0`25010O0010O01O0X]O_Mgb0`2Y]OaM3O^b0`2_]ObM00bb0f20O0F^]OlMbb0S2^]OmMbb0S2^]OnM1G\\b0[2c]ORN^b0m1b]OTN]b0k1c]OVN]b0j1c]OWN]b0h1c]OXN]b0\\20O1O1O2N1O1O1O100O001O1O1O2N1O2UOS]OTOmb0e11UOR]OWOob0h0Q]OXOob0h0Q]OXOPc0f0P]O[OPc0e0P]O[ORc0b0o\\O^ORc0`0n\\OARc0?n\\OASc0=m\\OESc0:m\\OFTc08l\\OITc07l\\OIUc06j\\OKVc04k\\OLVc03i\\ONXc00i\\O0Wc00i\\O0Wc0Oi\\O2Xc0Li\\O4Wc0Kj\\O5Wc0Ji\\O6Wc0Ij\\O7Vc0Ii\\O8Xc0Fi\\O:Wc0Fi\\O;Vc0Dk\\OVc0@k\\O`0Vc0^Oj\\Oc0Wc0\\Oi\\Od0Xc0ZOi\\Of0Xc0XOi\\Oh0Wc0XOi\\Oh0Xc0WOi\\Oh0Wc0XOi\\Oh0Xc0VOi\\Oj0Xc0UOh\\Ok0Yc0TOg\\Ol0Zc0ROg\\On0Zc0QOf\\Oo0Zc0POg\\OP1Zc0oNf\\OQ1jc001O01O0001O001O00001O00001O00000O2O001O001O1N101O0000001N10000O2O2M2N5ES[O0Ue0N2Onlc>"}}, {"image_id": 5, "category_id": 1, "bbox": [322.0, 66.0, 687.0, 351.0], "score": 0.9981313943862915, "association_id": 3, "light": [-2.0658626556396484, -1.5898399353027344, 1.9670677185058594, 1.5236592292785645], "segmentation": {"size": [683, 1024], "counts": "hTg62Xe0:bIFXG>Y80dG3X81RD^OX1d0c:0RD_OY1d0c:NQDA[1c0b:MQDA]1c0a:M[C]OTO6n2a0b:NYC@RO4R3?b:NXCDnN2W3=b:NVC;W2Hb:NTC=Y2Ec:5kB9`2Ce:Y2ZEgMf:Z2YEgMf:Z2YEfMg:\\2WEdMh:a2SE`Mm:d2oD\\MQ;h2kDXMU;i2jDWMV;k2hDVMW;k2gDVMY;k2fDUMZ;l2eDTM[;m2dDSM\\;m2dDSM\\;n2bDSM^;n2aDRM_;o2`DQM`;o2`DRM_;o2`DPMb;P3^DoLb;R3]DnLd;R3\\DmLd;U3ZDkLg;V3XDhLi;Z3VDeLk;\\3SDdLn;VOlBV3U1cMo;ROXCU3i0gM\\=W2bBiMa=U2_BiMe=U2[BiMi=U2WBiMk=V2VBhMl=X2UBeMl=\\2UBaMm=^2TB`Mn=`2SB]Mn=d2RBZMP>e2QBYMQ>g2oAWMR>i2PBTMQ>m2W2O0010O0100O10O0101O2M3N2M3N1N100O100O100O10O01O10O01O010O10O010000O0101O1O0O2O001N10001N1000O0100O100O00100O1O1O10O02N2N101N2N1O2dIRMXJo2c5XMYJi2d5]MnEOU2d2l7aMjENY2b2j7dMiEM]2_2h7fMiEL_2^2f7jMgEKb2\\2e7kMgEKc2[2d7lMgEKd2Y2c7oMgEIg2X2`7QNVEWOEb0d3V2`7SNSE;]3b1_7UNPE=`3_1_7UNmD?d3\\1_73`HN_72bHN^72aHN_73`HN_73`HN_73`HM`73`HN_73`HN_73`HO^72aHO^72aHO^71cHO\\72cHN]73bHN]72cHO\\72cHN]72cHO\\72cHN]72cHO\\72dHM\\73dHM]73bHN]72cHN]73bHM^73bHM^73bHN^72aHN_72aHN`72_HOa71^HOb71^HOc71]HOd70[H0f70YH0i7NWH3j7LUH4m7KRH5P8JoG6S8IlG7U8HkG9V8FiG:X8FgG:Z8FeG:\\8FcG:^8FaG:_8FaG;_8E`G;a8E^G;b8E^G;c8E\\G;d8E\\G;e8EYGo8AoF`0R9@lFa0U9_OjFa0X9^OfFc0\\9\\ObFe0`9[O^Fe0d9[OYFf0i9YOUFh0m9WOQFj0Q:VOlEk0U:UOiEl0Y:SOeEn0\\:QOdEo0]:QOaEP1`:PO_EP1b:oN]ER1d:nN[ER1e:nN[ER1f:nNXES1h:mNXES1i:mNVES1j:nNVEQ1k:oNTEQ1m:nNSER1n:nNQER1o:oNQEP1P;oNPEQ1Q;oNnDQ1T;nNlDQ1U;nNkDR1V;nNiDR1Z;lNgDR1_;hNbDV1e;eN\\DY1e;fN]DX1d;hN]DV1c;jN_DT1b;lN_DR1b;mN_DR1a;oN_DP1b;PO^Do0b;QO^Do0c;RO\\Dm0d;UO[Dj0f;WOYDh0g;YOYDf0g;\\OXDc0i;]OWDb0i;@WD>j;BVD=j;DVD;k;DVD;k;EVD9k;FVD9j;GWD8k;GUD8l;GUD8l;GUD8k;HVD7k;IUD6l;ITD7m;HTD7l;IUD6l;JTD5l;KUD4l;KTD5l;KUD4l;KTD5l;KUD4l;LSD4m;LTD3l;MTD3m;LTD3l;MUD2l;MTD3l;MUD2k;OTD1m;NTD1l;OUD0l;OTD1l;OUD0l;OUD0k;0UD0k;0VDOk;1UDNk;2UDNk;2VDMk;2VDMj;3VDMj;3WDLi;4WDLi;4XDKi;5VDKj;5WDJi;6WDJi;6WDJi;6WDJi;6XDIh;8WDHi;8WDHj;7VDIj;8UDIj;7VDIj;7VDIj;8UDHk;8UDHk;8UDHk;9TDHk;8UDHk;9TDGl;:SDFm;:SDFm;:SDFm;;RDEn;;RDEn;SCBm<>TCAm<>SCBm<>SCBm<>TCAlP=j1XAhMj1;o_LbAa3^>_LbAb3\\>_LeA`3[>`LeAa3Y>`LgA`3X>aLhA`3W>`LiAa3U>`LkA`3T>aLlA`3S>`LmAa3Q>`LoAa3P>_LPBb3n=`LQBa3n=_LRBa3n=_LSBa3l=_LTBb3k=^LUBb3k=^LUBc3j=]LVBd3i=\\LWBd3i=\\LWBe3h=[LXBe3i=YLXBg3m=TLSBl3g?O0001O0001O0000000010O00000001O0000010O00001O00001N10001O0000001O0000001OQO\\LW@d3i?^LU@b3k?_LT@a3k?aLU@]3l?cLT@]3l?cLT@]3l?dLS@\\3m?cLT@]3l?cLT@]3l?cLU@\\3k?dLU@\\3k?dLU@\\3l?bLU@^3k?bLV@]3j?aLX@^3j?_LX@a3i`001O00001N10001O000O10001O0000000O10000000000000000O1000001O00000000000000000O10000000000000000000000001O00000000000^MjLnBW3Q=kLnBU3R=mLlBS3S=oLlBQ3S=RMkBn2U=SMjBm2V=SMjBm2U=UMjBk2V=UMjBk2V=UMjBk2W=TMiBl2W=TMiBl2W=TMiBl2W=TMiBl2W=TMiBm2W=QMjBo2V=QMjBo2V=QMjBo2V=QMjBo2W=PMiBP3W=oLjBQ3V=oLjBQ3V=nLkBR3V=lLkBU3T=jLmBV3S=jLmBV3S=hLoBX3R=fLoBZ3a?001O00000001O0001O00000001O000001O000[NgLXAY3e>kLZAU3f>lLYAT3g>mLYAR3g>nLYAR3g>oLXAQ3h>oLXAQ3h>oLXAR3g>nLYAR3g>nLYAR3g>oLXAQ3h>oLYAP3g>PMYAP3g>PMZAo2f>QMZAo2f>QMZAo2f>QM[An2e>RM[An2e>RM\\Am2d>TM[Al2e>TM\\Ak2d>UM\\Ak2d>UM\\Ak2d>UM]Aj2d>UM\\Ak2d>UM\\Ak2d>UM]Aj2c>WM\\Ai2d>WM\\Ai2d>WM\\Ai2e>VM\\Ai2d>WM\\Ai2d>WM\\Ai2e>VM[Ak2d>UM\\Ak2d>UM]Aj2c>VM]Aj2d>UM\\Ak2d>UM\\Ak2d>UM\\Ak2e>TM\\Ak2d>UM\\Ak2d>UM\\Ak2e>TM[Am2d>SM]Al2c>TM]Al2d>TM[Al2e>TM\\Ak2e>TM[Al2e>TM[Al2e>TM\\Al2c>TM]Al2c>TM]Al2c>TM]Al2d>SM]Al2c>TM]Am2b>SM^Am2b>SM^Am2b>SM^Am2b>SM^Am2b>TM]Am2b>SM^Am2c>RM]An2c>RM]Ao2b>RM]An2c>RM]An2c>RM]Ao2b>QM^Ao2b>RM^Am2c>RM]Ao2b>QM^Ao2b>RM]An2c>RM]An2c>RM]Ao2c>PM]AP3c>QM\\Ao2l=lLVA4n0P3k=nLVA3n0o2j=PMXA2m0o2i=PMZA1m0o2i=PMZA2l0n2i=RMZA0m0n2i=RMZA0m0n2f=UM]ANl0n2b=XMbAJl0n2`=ZMeAGk0o2_=\\MeAEl0o2^=]MfAEk0n2^=^MgADk0o2]=]MhADl0n2[=`MhABm0n2[=`MhACl0n2Z=`MjABl0n2Z=`MjABl0n2Z=aMiAAm0o2X=aMkA@m0o2X=aMkAAm0n2W=bMkA@n0n2V=cMlA_On0o2U=bMmA_On0P3T=bMmA^Oo0P3T=bMmA^Oo0P3T=cMlA^Oo0P3S=cMoA\\Oo0P3R=dMoA\\Oo0Q3Q=dMoA[OP1Q3ha;C_D^D@c;`0^D]Od;c0]D[Od;e0]DYOd;h0\\DUOf;k0[DSOf;m0\\DoNf;Q1[DlNg;T1ZDjNg;W1YDfNi;Z1YDcNh;]1YDaNh;_1ZD]Nh;c1YD[Nh;f1YDWNh;i1YDUNg;l1ZDPNi;P2XDmMk;R2VDkMl;U2UDgMn;Y2TDcMn;]2SD_MPWc0Cg\\O?Xc0Ah\\O`0Wc0Ag\\Oa0Wc0Ah\\O`0Wc0@h\\Ob0Wc0_Oh\\Ob0Wc0_Og\\Oc0Xc0^Og\\Ob0Xc0@f\\Ob0Yc0_Of\\Oa0Zc0@d\\Ob0[c0_Oc\\Ob0]c0_Ob\\Ob0]c0@`\\Oa0_c0g0O00001O000O2O00001O000100O010O100O2O8H4L1O00O1O2O1N2N2O1N2N101N2N00100O001O0010O01O01O010O0010O010O010O0100O010O10O0100000O01000O10O10O1O010O010O0010O010O01O10O01O100O100O100O101N1O2O0O100O100O100O10O01O1O1O1O2N2N2N2N1O2N2N1O2N001O1O1O001O1O001O001O001O00001O001O0O101O0000001O00001O0000001O00000O2O0000001O0000001O000000001O01O00010O00ZN]LdAc3\\>]LeAc3Z>^LeAb3Z>_LfAa3Z>`LfA_3Y>bLgA^3Y>bLgA_3W>cLiA\\3a:bL[G2TN\\3V:oLcGGVNZ3Q:WMgG_OYNY3j9`MjGYO[NX3e9fMmGSO^NW3b9kMnGoN`NU3`9PNmGlNcNT3^9SNnGjNcNS3]9WNmGgNgNQ3Z9[NmGeNiNQ3W9]NnGdNjNo2W9_NnGbNlNn2T9cNnGaNmNl2T9dNnGaNnNk2S9fNnG_NPOj2T9eNmG_NPOl2T9eNlG]NROn2R9eNmGZNSOP3Q9eNmGYNTOQ3P9fNmGVNTOT3P9fNlGTNVOU3n8hNmGoMXOX3l8iNmGlMYO[3j8iNPJW1Q6iNoIV1R6jNmIV1S6kNmIU1S6lNkIT1U6mNjIS1W6nNhIQ1Y6oNfIQ1Z6POeIQ1[6oNeIP1[6QOdIo0]6QObIP1]6QOcIn0^6ROaIn0_6SO`Im0a6SO^In0a6SO_Il0a6UO^Ik0c6TO]Im0b6TO]Il0c6UO]Ik0c6TO]Il0c6UO\\Ik0e6UOZIk0g6TOYIm0g6SOXIm0i6ROWIn0i6SOWIm0i6ROWIn0j6ROUIn0l6QOTIo0n6POQIQ1o6nNQIR1P7nNoHR1S7lNmHU1S7kNmHT1ULdL`:W2[IU1ULdLa:V2ZIV1ULeLa:U2YIV1VLeLb:T2XIX1ULeLc:S2WIX1VLfLc:Q2WIY1VLgLc:o1XIY1ULiLc:n1WIY1VLjLb:m1XIZ1ULjLc:k1XI[1ULlLa:j1YIZ1VLnL`:g1ZI[1VLoL_:f1[I[1VLoL`:e1ZI]1ULnLa:f1ZI[1TLPMc:d1YI\\1TLQMb:c1ZI\\1TLQMb:d1YI[1ULQMb:d1YI[1ULQMb:e1XIZ1VLRMb:d1WIZ1WLRMb:d1WIZ1WLRMb:e1WIX1WLSMb:f1VIW1XLSMc:f1TIW1YLSMc:h1RIU1[LTMb:i1QIS1]LTMb:k1oHQ1_LTMc:l1lHP1`LUMd:m1kHm0aLVMd:o1iHk0cLVMe:P2fHj0eLVMe:R2dHh0gLWMd:S2cHf0iLWMd:T2bHe0jLWMe:T2aHd0jLXMe:V2_Hb0lLXMf:V2]Hb0mLXMf:W2\\Ha0nLXMf:X2[H`0oLXMg:X2ZH?oLZMf:X2ZH>PMZMf:Y2YH=QMZMf:Y2YH=QMZMg:Y2XH4gMaMS8f1hIf0>3fMaMT8g1hId0>4fM`MU8h1gId0>4gM_MT8i1gId0>5fM^MU8i1gId0>5fM^MU8j1fIc0?5fM^MU8j1fIc0?5gM]MU8j1eId0?6fM\\MV8j1eIe0>5gM[MW8k1dIe0>5gM[MW8k1dIe0>6fMZMX8l1cId0?6gMYMW8m1cIe0>5hMXMX8n1bIe0>6gMWMZ8m1aIf0=7iMTMZ8o1`If0=7iMTMZ8o1`Ig0<7iMRM\\8P2_Ig0<7_6SOTIf0=7_6SOTIg0<7_6ROUIg0<7`6QOTIh0<7`6QOTIi0;7`6POUIi0;7`6POUIi0;7`6QOTIh0<8_6POUIi0;7`6POUIi0;7`6POUIi0;8`6nNUIk0:7a6nNUIk0:7a6nNUIl097a6mNUIm097b6mNTIl0:7b6mNTIm097b6lNUIm0:6a6mNUIn096a6lNVIn096b6lNTIn0:6b6lNTIo096b6kNUIo096b6kNUIo097a6jNVIP195a6lNUIo0:6`6kNVIo0:6`6kNVIP196`6jNWIP196`6kNVIo0:7_6jNWIP1:6^6jNXIP1:6^6jNXIP1:7]6jNXIo0;8\\6iNYIP1:7^6hNXIQ1:8]6hNXIP1<7\\6iNXIP1<7\\6iNXIQ1;7\\6iNXIP1<7\\6iNXIP1<7\\6iNXIP1<8[6hNYIP1=7Z6jNXIP1=6[6jNXIP1=7Z6jNXIo0>7Z6jNXIo0>7[6iNWIP1?6Z6kNVIP1?5\\6jNUIQ1`05Z6kNUIP1a05[6jNTIQ1b04Z6lNSIQ1b03\\6kNRIR1c02[6lNRIR1d01[6mNPIR1e01\\6lNoHT1e0O\\6mNoHT1f0N\\6nNmHT1h0NZ6nNnHU1h0L[6nNmHV1i0KZ6POlHV1i0J\\6oNjHX1k0H[6POjHX1l0G[6POiHZ1k0F\\6QOhHY1m0E[6ROhHZ1m0C\\6ROgH\\1l0C\\6QOhH\\1m0B\\6ROfH]1m0A]6ROfH]1n0@\\6SOfH^1m0_O]6SOfH^1n0^O]6SOeH`1m0]O^6TOdH_1n0]O^6TOdH_1o0\\O]6UOdH`1n0[O^6UOdH`1o0ZO^6UOcHa1o0ZO^6UOcHa1P1YO]6VOcHb1o0WO_6WObHb1P1VO^6YObH`1Q1VO]6ZObH`1R1UO\\6[ObHa1S1QO\\6^OaHa1U1oNZ6@aHa1W1mNX6BaHb1X1jNX6C`Hc1Y1hNX6E`Hb1Z1gNV6G`Hb1\\1eNT6I`Hc1]1aNT6M^Hb1`1_NR6O^Hb1a1^NQ60^Hb1b1\\NQ62^Hb1a1[NR62]Hc1b1YNR64\\Hc1b1YNR64\\Hc1c1WNR66[Hd1c1UNR67\\Hc1c1TNR6:ZHb1d1SNS6;YHb1e1PNU6=VHd1e1mMV6?VHc1d1mMW6`0UHc1e1kMXMaN`8Q2cHc1e1jMXMdN_8o1eHc1d1gMZMhN]8m1eHd1e1eMYMkN]8l1fHd1c1cM\\MmN\\8k1fHd1c1bM\\MoN[8k1fHe1c1^M^MROY8k1gHd1c1\\M_MUOX8j1gHe1b1YMaMWOW8k1gHd1c1WMaMYOV8k1gHe1c1SMbM]OT8k1gHe1e1oLbMAS8j1gHf1f1iLcMGQ8i1gHg1g1cLdMLo7j1fHg1R3_LY4i1fHh1P3_LZ4i1fHi1o2^L\\4h1fHi1n2_L\\4h1fHj1m2^L^4g1fHj1l2_L^4g1fHk1l2\\L`4h1eHk1k2]L`4h1eHk1k2]La4g1dHm1j2\\Lb4g1eHl1So:BUE:k:GYE3h:M]EMd:3bEF_::gE_OZ:a0kEWOX:j0oEhNW:X1SFWNT:i1g4000mAVNe8k1XGXNg8h1XGZNg8f1YGZNg8f1YGZNg8f1YGZNg8f1YGZNg8g1WGZNi8f1WGZNi8f1WG[Nh8e1XG[Nh8e1XG[Nh8e1XG[Nh8f1WGZNi8f1WGZNi8f1WGZNi8f1WGZNi8f1WG[Nh8e1XG[Nh8e1XG[Nh8f1VG[Nj8e1VG[Nj8e1VG[Nj8e1VG\\Ni8d1WG\\Ni8d1WG\\Ni8d1WG\\Ni8d1WG\\Ni8e1VG\\Ni8d1WG\\Ni8d1WG\\Ni8d1XGZNi8f1XGXNj8g1XGUNj8k1WGSNj8m1Z500001O000000000000010O000000000010O00000001O0001O01O0000010O00001O01O01O00001O010O001O001O01O01O00010O01O010O0010O01O0010O01O2N1N3M3N2M3YO_\\O_Occ0?c\\O[O`c0a0h\\OXO[c0e0h0L4K5L5JQ^\\2"}}, {"image_id": 6, "category_id": 1, "bbox": [193.0, 20.0, 454.0, 881.0], "score": 0.9999930262565613, "association_id": 1, "light": [-1.322417974472046, -2.231844902038574, 1.157697319984436, 2.100700855255127], "segmentation": {"size": [1024, 768], "counts": "lQQ64jo06J5K7I3M4M2M3N1O100O2N100O2O0O101N2N3M3M2M4M2M3N101WYOaNo>_1n@hNn>X1n@POm>Q1n@YOm>g0o@Am>?PAFn>;o@In>8PALn>4QAOm>2PA1o>OPA3o>No@4P?Mn@5Q?Lm@6R?Lk@6T?Kk@6S?Lk@5U?Lj@5U?Li@5W?Kh@7W?Jf@8Z?He@:Z?Fc@=]?Da@>^?Ba@?_?A`@a0_?@_@b0`?^O_@d0`?]O^@e0a?\\O\\@g0c?ZOZ@h0f?ZOT@k0k?WOn_Oo0Q`0SOi_OQ1W`0POe_OS1[`0nNb_OU1]`0lNa_OU1_`0lN^_OV1b`0lNY_OW1g`0kNS_OY1m`0iNZ\\On3fc0V400O10000001O01O0000000000000O1000000000000000000O1000000O100000000O10000000000O10000O10000O1000000000000O1000000000000000000S\\OREhb0n:R]OmEMUO`a0n:^^ORG^a0n8_^OXG^a0h8`^O\\G^a0d8b^O^G]a0a8c^OaG[a0_8e^OcGYa0]8f^OgGWa0Y8i^OiGVa0Df_Oh4TOgKSa0^OR@e4kNoKQa0[OY@b4fNULo`0XO_@_4bN]Lm`0ROc@`4`N`Lk`0oNh@_4]NdLj`0lNk@^4[NhLi`0hNQAY8m>fGeAl7Y>RHPCi6meKgGP1aI^3e>aKkGP1aIa3b>^KnGQ1_Ie3a>XKQHR1_Ih3_>TKTHS1]Ij3_>RKTHU1]Ij3^>PKVHV1[Ik3_>mJWHX1ZIm3_>iJXHP8eMXGP5f0]MR8YMnGm40jM[1WIR4h3SKP5_ORNV8fLgHS5ROXNX8^LmHX5jN]N[1RI[4R3fK^5bN`N[1QI_4m2gKb5]NbN\\1oHa4k2hKc5YNgN[1mHd4f2kKf5RNmN[1jHg4a2mKi5mMQO]1fHi4]2oKm5gMWO\\1fHi4S2VLQ6bM\\OY1hHi4i1_LT6\\M_O1oGd0l0[5_1fL\\6TM^OMWHh0e0^5W1kLf6iL5f0SHb5o0RMS`0WMQ_Of5h0WMY`0oLS_Og5c0[M]`0iLT_Ok5<^Mc`0aLV_Oo56aMbb0^2Z]OeMhb0Y2V]OiMkb0V2R]OlMPc0T2k\\OPNVc0Q2d\\OSN]c0Q2X\\OUNhc0P2j[OZNVd0j1^[O]Nbd0b6O1O0001O1O1O1N10001N10O010000000000100010O000O10O000001O1O101N2O1O0O10O01O00001N2O2N2N2O1N2N1O100O1O001O1O2N1N3N2N2M2O1N1O2O0O2N2N2N3M3M2N1O1O2O0O001O1O2N1O2N1O3M2N1O2N1O010O001O1O010O001O0010O100O100O2O1O1O1O00000000O00100O0010O01O010O001O1O2N1O2N2N2N2N2M3N1O1O1O100XKiXOe0Xg0XOkXOg0Vg0VOnXOh0Tg0TOoXOk0Sg0ROoXOn0Rg0nNQYOQ1Qg0lNQYOS1Qg0iNRYOW1nf0gNTYOX1mf0fNUYOY1lf0fNUYOY1lf0fNUYOX1lf0iNSYOW1nf0hNSYOW1nf0hNSYOW1mf0iNTYOU1nf0jNTYOT1lf0lNUYOS1kf0mNVYOR1kf0mNVYOQ1kf0POVYOn0kf0POWYOo0if0QOXYOn0if0QOYYOm0gf0SO[YOk0ff0TO\\YOj0ef0UO]YOi0df0VO^YOh0cf0WO`YOf0af0XObYOf0`f0XObYOf0_f0YObYOf0`f0XOaYOf0af0YO`YOf0`f0ZOaYOe0`f0ZObYOc0_f0]ObYOb0_f0\\OcYOb0^f0^OdYO`0]f0_OeYO>\\f0BeYO<]f0CeYO:\\f0FhYO5Yf0KkYO0Wf0OlYOMUf03nYOITf07oYODRf0ZBnLh;k4dD\\JP:j5jE[Jm9P6kEUJn9S7K4N2M3M3N200O1000000000O0nNdFbIE\\Oc9l6TG`I[ODa9b6nGaIQ8R6[HoIe7l5`HTJ`7n4cF_KP2D]7i4aIWK_6f4dIZK\\6d4fI\\KZ6c4fI^KZ6b4hHXK`N6h8b4cHhKZNFS9b4`HlK\\NBT9c4XHSLcNZOU9e4XGPMB[NV9g4QGTMHTNX9j4kFUMLRNY9m4]F\\M9gMZ9`7fF`HZ9a7eF_H[9a7eF^H]9`7dF`H\\9_7\\F]H33b9`7ZF^H33d9]7ZFaH12f9^6]FRJL^O12h9W=000000000000O10001O0000000000000000000000000000000000000000000000O2O000001Ac^O9]a0Gc^O9]a0Gd^O8\\a0Ge^O9[a0Ge^O9[a0Ge^O9aa001O0000000001O0000000000000000000000O1000000000000000000O10000000000O1000000O100000000O2O0O10001NRa]8"}}, {"image_id": 7, "category_id": 1, "bbox": [630.0, 299.0, 103.0, 117.0], "score": 0.9999975562095642, "association_id": 1, "light": [-3.052081346511841, -1.6455615758895874, 2.9090237617492676, 1.404773473739624], "segmentation": {"size": [576, 1024], "counts": "PgR;1ma06K2O0O10000O01O1O1O10O010N2N100QOIU@7i?1P@1o?4g_O1Y`08^_OJa`0k0O01000Q@kNS?V1g@VOR?j0l@]Oo>o1K4L3M4L3M5K2N2N10jLhAc2X>ZMlAe2i>UOTA]Nn>^1\\AZNf>f1cASN[>m1eASN\\>l1cAUN]>k1cAUN^>j1bAVN_>j1`AVNa>k1]AUNd>o1WAQNi>T1g@D?XOl>l0UADM@P?f0YAIFAS??^AN^ODW?9^A3ZOD]?OaA8TOIk`01W_O0\\a000000000000000000000000000000000000000000000000000000000000000O100000000000001O0000000000001O0OTYS5"}}, {"image_id": 8, "category_id": 1, "bbox": [193.0, 86.0, 296.0, 190.0], "score": 0.9999995827674866, "association_id": 3, "light": [-3.0191335678100586, -1.600159764289856, 2.7622909545898438, 1.3627523183822632], "segmentation": {"size": [768, 813], "counts": "kk`4i1me0G4O1N2N101O001N101O0O2O00001N10001N2O001O0O2O000000001O0000001O001O00001N1e[O`LVd0`3i[OiLoc0W3P\\OjLPd0V3o[OlLPd0c3O002M5L3M1O001O001O1N103M1O1O1O00001OjNg\\OeMYc0[2g\\OfMXc0Z2h\\OgMWc0Y2i\\OhMVc0X2j\\OhMVc0X2j\\OhMWc0W2i\\OjMVc0U2k\\OkMUc0U2k\\OkMUc0U2k\\OlMTc0T2l\\OlMTc0T2l\\OmMSc0S2m\\OmMSc0S2m\\OnMQc0S2o\\OmMQc0S2o\\OmMQc0S2o\\OmMQc0S2o\\OmMQc0S2o\\OmMQc0S2o\\OnMPc0R2P]OnMPc0R2P]OnMPc0R2P]OnMPc0R2P]OnMPc0R2P]OnMPc0R2P]OnMPc0R2P]OnMPc0R2P]OnMPc0R2P]OnMPc0R2P]OoMob0Q2Q]OoMob0Q2Q]OoMob0Q2Q]OoMob0R2P]OoMob0Q2Q]OoMob0Q2Q]OPNnb0P2R]OPNnb0P2R]OPNnb0P2R]OPNnb0P2R]OQNmb0o1S]OQNmb0o1S]OQNmb0a300001O0_NR]OPNnb0a3000001O00001O001O00000000001O0000^NV]OnMjb0R2V]OnMjb0R2V]OnMjb0R2V]OnMjb0R2V]OnMjb0R2V]OoMib0Q2W]OoMib0Q2W]OoMib0Q2W]OoMhb0R2X]OoMgb0Q2Y]OoMgb0Q2Y]OPNfb0P2Z]OPNfb0P2Z]OPNfb0P2Z]OPNfb0P2Z]OPNfb0P2[]OPNcb0Q2]]OoMcb0R2\\]OnMdb0R2\\]OnMdb0R2\\]OnMdb0R2]]OmMcb0T2\\]OlMdb0T2\\]OlMdb0U2\\]OjMdb0V2\\]OkMcb0V2]]OiMcb0W2]]OiMcb0W2]]OiMcb0W2^]OhMbb0Y2]]OgMbb0Z2_]OeMab0[2`]OdM`b0\\2`]OeM_b0\\2a]OcM_b0]2a]OcM_b0]2a]OcM^b0^2b]ObM^b0^2c]OaM]b0`2b]O`M^b0`2b]O`M^b0`2b]O`M^b0`2c]O_M]b0a2c]O_M\\b0c2c]O]M]b0c2c]O]M]b0c2c]O]M]b0b2d]O^M\\b0b2d]O^M[b0c2e]O]M[b0c2e]O]M[b0b2f]O^MZb0b2f]O^MZb0b2f]O^MZb0b2e]O_M[b0a2e]O_M[b0a2e]O_M[b0a2e]O_M[b0`2e]OaM[b0_2e]OaM[b0_2e]OaM[b0_2d]ObM\\b0^2d]ObM\\b0^2d]ObM\\b0^2c]ObM^b0^2b]ObM^b0^2a]OcM_b0]2a]OcM_b0o30]Na]OeM_b0[2a]OeM_b0n3O10000000000000000001O0O100ZN`]OlM_b0U2a]OkM_b0U2a]OkM_b0U2a]OkM_b0j310000O1O100O100O1O1N2O1O2N1O100O1O1O2O0O101N101O000O1O2hNi\\OeMWc0[2i\\OdMXc0\\2h\\OdMXc0\\2h\\OdMXc0[2i\\OeMWc0[2i\\OdMXc0\\2h\\OdMYc0[2g\\OeMYc0[2f\\OeM[c0[2e\\OdM]c0_30kNc\\OfM^c0Z2b\\OfM_c0]31O1N2O1kN\\\\OlMec0V32kNY\\OoMhc0o1Y\\OQNjc0k1V\\OUNmc0g1U\\OYNmc0c1U\\O\\Nmc0b1S\\O^Nnc0a1P\\ObNQd0\\1n[OeNTd0Y1l[OhNUd0V1k[OjNWd0V1g[OjN^d0i0l[OVOaf0M9Fa0ZOoUe6"}}, {"image_id": 8, "category_id": 1, "bbox": [7.0, 289.0, 281.0, 177.0], "score": 0.9999998807907104, "association_id": 4, "light": [-3.1650242805480957, -1.439558506011963, 2.9918465614318848, 1.1672853231430054], "segmentation": {"size": [768, 813], "counts": "ca5d2[e04K3N1O2O0O101N1O101N101O000O101O0000000O1000001O00000000000O2O0000000000000O100_[OjLXd0V3h[OkLWd0U3i[OmLUd0S3j[ORMQd0o2o[OWMkc0h2V\\O\\Mfc0d2Z\\O]Mec0c2Z\\O_Mec0a2[\\O`Mdc0`2\\\\OaMcc0_2]\\OaMcc0_2]\\ObMbc0^2^\\OcM`c0^2`\\OdM^c0\\2b\\OfM\\c0Z2d\\OhMZc0X2f\\OiMYc0W2f\\OkMYc0U2g\\OkMYc0U2g\\OlMYc0S2g\\OmMYc0S2g\\OnMXc0R2h\\OoMWc0Q2i\\OPNVc0P2j\\OQNUc0o1k\\OQNUc0o1k\\ORNTc0n1l\\ORNTc0n1l\\ORNTc0n1l\\OSNSc0m1m\\OSNSc0m1n\\OSNQc0m1o\\OTNPc0l1P]OTNPc0l1P]OUNob0k1Q]OUNob0k1Q]OUNob0l1P]OTNQc0k1o\\OUNQc0k1o\\OVNPc0j1P]OVNPc0j1Q]OUNob0l1P]OTNQc0k1o\\OUNQc0k1o\\OUNPc0_3O001O00]NR]OTNnb0l1R]OUNmb0_3O1000001O\\NU]OSNkb0m1U]OSNkb0m1U]OSNkb0m1U]OSNkb0m1U]OSNjb0n1V]ORNjb0n1W]OQNib0o1W]OQNib0o1W]OQNib0o1W]OQNib0o1W]OQNib0o1V]OSNib0m1W]OSNjb0l1V]OTNjb0l1V]OUNib0k1W]OUNib0k1W]OVNhb0j1X]OVNhb0j1X]OVNhb0j1X]OVNhb0j1X]OWNgb0i1Y]OWNgb0i1Y]OWNgb0i1Y]OWNgb0i1Y]OWNgb0i1Y]OWNgb0i1Y]OWNgb0i1Y]OWNgb0i1Y]OWNgb0i1Y]OWNgb0i1Y]OWNgb0i1Y]OWNfb0j1Z]OVNfb0j1Z]OWNeb0i1[]OWNeb0b3000XN[]OUNeb0k1[]OUNeb0k1[]OUNeb0k1[]OUNeb0k1[]OUNeb0k1[]OVNdb0j1]]OUNcb0l1\\]OTNcb0m1]]OSNcb0m1]]OSNcb0m1]]OSNcb0n1]]ORNbb0n1^]ORNbb0n1^]ORNbb0n1_]OQNab0o1_]OQNab0P2_]OoMab0Q2_]OoMab0Q2_]OoMab0Q2_]OPN`b0P2a]OoM^b0R2b]OnM^b0R2b]OnM^b0R2b]OnM^b0R2b]OnM^b0R2c]OmM]b0S2c]OmM]b0S2b]OnM^b0R2b]OnM^b0R2b]OnM^b0R2b]OnM^b0R2b]OnM^b0R2b]OnM^b0R2b]OnM_b0Q2a]OoM_b0Q2`]OPN`b0P2`]OPN`b0P2`]OPN`b0P2_]OQNab0o1_]OQNab0g30000000000001O0VN^]OVNbb0j1^]OVNbb0d30UN^]OXNbb0h1^]OXNbb0h1^]OXNbb0h1^]OXNbb0h1^]OXNbb0h1^]OXNbb0h1^]OXNbb0g1^]OZNbb0f1^]OZNbb0f1^]OZNbb0f1^]OZNbb0f1^]OZNbb0f1^]OZNbb0b30000O101O0000000000000000000000000000000O100000000O11O00000oMa]OaN_b0_1a]O`Nab0_1_]OaNab0_1_]OaNab0_1_]OaNab0_1_]O`Nbb0`1^]O`Nbb0`1^]O_Ncb0^31O1O1N3O0O1O100O1O2N1O2O1N2N101O0O2O0O2O1O2N2M4M1O1O0O2O0aNY\\OeNhc0Y1Y\\OfNhc0Z1X\\OfNjc0W1W\\OiNkc0U1U\\OjNnc0T1R\\OlNoc0R1R\\OnNnc0R1Q\\OnNQd0Q1o[OoNQd0P1P\\OoNRd0P1n[OPOSd0n0n[OQOTd0h0R\\OXORd0>T\\OAWf0kNZYOm0of0M9FR[Y<"}}, {"image_id": 8, "category_id": 1, "bbox": [408.0, 304.0, 281.0, 174.0], "score": 0.9996356964111328, "association_id": 2, "light": [-2.08481764793396, -2.0195953845977783, 1.8986135721206665, 1.8003787994384766], "segmentation": {"size": [768, 813], "counts": "bZb9`1Yf03Se09J3M2ZNKR]OIg0>Wb09b]OI]b0V`0Cf_Oc0V`0_Oc_On0T`0UOg_OT1S`0nNj_OV1KRNV?i0n@W1HWNU?b0RAY1GXNS?b0SAY1IWNl>f0ZAU1IWNX=D\\CR1BV1HUNV=H^Cm0EV1FWNT=K\\Ci0JV1EWNT=0PCk06o0EXNR=W2ZCAA\\NS=S2[CCA[NR=T2\\CBA[NR=R2^CD\\O^NU=m1`CFYO`NU=j1cCFXO`NU=i1cCHXO_NT=i1eCHWO_NT=h1eCJWO]NT=j1dCJXO\\NS=j1eCKXO[NR=j1fCLXOZNQ=k1fCLYOYNQ=k1dCN[OWNP=m1cCM\\OWNQ=n1_CM@UNQ=Z1lBTN?_2DRNQ=Z1oBXN5_2JPNR=X1PC]NM^21lMT=W1nBl1MnLU=U1oBm1LnLU=T1PCn1KnLU=V1mBm1MnLW=a5iB`JY=^5gBbJZ=]5eBdJ\\=[5cBgJ]=X5cBhJ]=V5dBlJ\\=Q5fBoJ[=k4jBUKW=g4lBYKW=c4jB]KW=a4jB_KW=^4kBcKU=[4dBYJN\\1^=Z4cB]JNY1`=X4bB`JMY1a=V4cBbJKX1b=U4dBcJJX1b=T4eBeJGX1d=S4dBWL]=g3dBYL\\=f3dB[L\\=d3eB\\L\\=a3fB_LZ=_3hBaLX=^3iBbLX=\\3iBdLX=Z3iBfLW=X3jBiLV=U3lBkLU=S3lBmLT=S3lBmLT=R3mBnLT=Q3lBoLT=P3mBPMS=P3mBPMT=o2lBPMV=n2kBRMV=m2jBSMW=l2iBTMX=l2gBTMZ=l2eBTM[=n2bBSM_=n2^BSMc=n2[BRMe=o2ZBQMg=o2WBRMj=o2SBRMo=o2mASMS>m2jAUMW>k2hAUMZ>]OhAm3Z>nKjAQ4Y>iKkAV4W>gKkAX4V>fKlAY4U>eKmAZ4W>aKkA^4[>[KgAd4]>WKdAi4^>QKgAn4Z?100O1O1001O2O0fMj_O]OV`0a0l_O^OV`0`0k_O@V`0>k_OBV`0:m_OFT`00U@0m?KW@3k?JW@eNZOl0a`0;W@gN\\Ok0``04\\@POVOj0b`0N]@WOSOi0d`0G_@_OPOf0e`0D_@FnNd0f`0_Oa@MjNb0mb0]OU]Ob0kb0]OV]Ob0kb0^OW]O>kb0AV]O>kb0BV]O=jb0BW]O=jb0BY]O:ib0EY]O9ib0EY]O9nc0Njjh8"}}, {"image_id": 9, "category_id": 1, "bbox": [761.0, 392.0, 74.0, 117.0], "score": 0.9077272415161133, "association_id": 3, "light": [-1.8120059967041016, -2.3405635356903076, 1.7455443143844604, 2.187856435775757], "segmentation": {"size": [683, 1024], "counts": "YPl?3kd0f0F2L3L3O2M2N4M4L4M5L1N5a\\OgNdb0S2L3M4L8I2N4K3N0O100N20O0N3M2M3101N3N2N1O10O2M1N3_Oc0L2Na]O`MVb0n1X^OUNia0h1X^OYNia0e1W^O\\Nka0`1W^O`Nka0]1V^OcNka0M]]OW1h0mNka0Kh]Oo0=UOla0Hl]O>DC04e03^b04o\\ODO2e07Wd0O001O000010O0000010O00001O01O000000001O0O10001N2Ncbm3"}}, {"image_id": 9, "category_id": 1, "bbox": [205.0, 461.0, 206.0, 222.0], "score": 0.9328086376190186, "association_id": 5, "light": [-2.8298752307891846, -1.1163127422332764, 2.7068471908569336, 0.9031901955604553], "segmentation": {"size": [683, 1024], "counts": "WYY41n20X?7c@OW?5f@NX?5d@N[?3b@O]?4`@M_?5]@Oa?3[@0e?1X@1g?0W@2h?0V@1j?0T@1k?0T@0l?2R@Nn?4P@Mo?5o_OKR`06m_OJR`07m_OIT`08k_OGV`09i_OHW`08[^OlNZ1k0\\`09Y^OnNY1j0^`08Y^OoNW1i0a`08X^OoNV1i0c`08W^OoNT1k0e`0<[_OCf`0=Y_ODg`0[NRBn0kNnNg0j1Y>_NRBi0POlNf0l1U>dNSBd03h0i=fNSBb04h0h=hNRBa06g0f=lNRB=7h0f=nNPB;:g0e=ROkA:?e0d=XObA9j0?c=Y1[BhNc=Z1\\BgNd=Y1[BhNd=Y1[BhNe=Y1YBhNf=Z1XBgNh=Z1VBgNj=\\1RBeNn=_1mAbNR>b1jA_NV>c1fA^N[>c1bA_N^>c1^A_Nb>b1\\A_Nd>T40000000O010000O1000O01O101N100O101O0O1000000000000000000000000000000000000O1000000000000000001O000000000000000000000000000000000000000000000000000001O0000000000000000000000000000001O00001O001O1O1O001O001O00001O00001O0TL[AR1f>kN^AS1c>jN`AT1b>hNaAX1`>dNdA[1^>^NhAa1Z>YNjAg1Y>SNkAl1V>PNnAo1S>oMnAQ2S>mMoAQ2T>kMnAU2S>fMRBY2W>UMRBk2X`0O0000001N101O001O1O1O1N2K6@a0FgYh<"}}, {"image_id": 9, "category_id": 1, "bbox": [808.0, 399.0, 38.0, 85.0], "score": 0.9756857752799988, "association_id": 6, "light": [-2.7204675674438477, -1.9434350728988647, 2.664654493331909, 1.7765934467315674], "segmentation": {"size": [683, 1024], "counts": "\\[k`0221Re00mZO12Mkd0?_[OA12cb04c]O:BBK1<0ab07c]Oe0KUObb09`]Oc0MTObb0j1\\]OWNdb0i1\\]OWNdb0i1\\]OWNcb0c1W]OXN86ab0_1f]OaNYb0_1h]OaNWb0_1j]O`NVb0a1j]O_NUb0`1m]O`NSb0`1n]O_NRb0a1n]O_NQb0a1P^O_NQb0`1o]O`NQb0`1P^O_NPb0a1P^O_NRb0_1n]OaNRb0_1n]OaNSb0^1n]OaNSb0^1m]OcNRb0]1n]OcNSb0[1n]OeNRb0Z1o]OfNRb0X1o]OiNQb0V1o]OjNQb0e0S]OEm0Foa0d0W]OCl0Ina0b0X]OAn0Lla0_8SB`Gn=[8WBeG`2iMZ8[:ZElGj1[No8c9ZERHe1]NS9]9ZEVHa1_NW9V9[E[H\\1aN[9P9\\E^HW1cN`9k8[EaHU1eN`9h8]EcHQ1fNc9e8_EdHl0hNg9a8`EfHh0jNh9^8dEfHb0mNk9\\8fEeH>oNm9Z8hEfH9QOP:X8jEfH3TOR:U8nEgHMUOV:S8nEiHJTOY:Q8PFlHCTO]:P8RFmH]OTOb:m7SFPIXOUOd:k7UFRITOSOh:j7UFTIPOSOk:i7WFSIlNUOn:f7XFWIfNTOS;d7YFXI`NVOX;a7ZF\\Kg9c4[F[Kf9c4]F[Kd9d4_FYKb9f4`FXKa9g4bFVK\\NRLP:g8gGSKXNYLQ:c8iGRKVN[LR:a8kGRKRN^LT:_8kGRKPN`LU:^8mGPKnMcLU:\\8nGPKlMeLW:Z8mGQKlMeLW:Z8nGoJlMgLW:X8oGoJkMiLW:W8PHmJiMmLX:U8PHlJiMoLW:U8RHiJhMRMW:T8SHfJhMVMV:S8THbJhM\\MV:o7UH_JiMbMS:n7VH[JjMgMQ:m7VHXJlMkMP:k7UHVJmMPNP:h7THUJnMSNo9f7UHTJnMVNn9e7UHRJnMZNn9c7UHQJnM\\Nn9b7UHoIoM_Nm9a7THoIPN`Nm9`7THnIPNaNn9`7RHnIQNbNo9^7QHnIQNdNo9]7QHmIQNfNP:[7PHmIQNhNP:Z7PHlIPNjNT:W7mGlIQNmNT:U7lGlIQNoNZ:n6gGPJPNRO`:g6bGSJPNUOe:b6]GVJoMXOi:]6ZGWJnM]Ol:W6YGWJnMBl:T6WGWJoMDn:S6TGUJoMIP;o5RGUJdMDTN9\\=h5nFWJdMKnM7g=`5iFYJdMa0l;n4bF\\JeMf0l;l4iHUKZ7h4fHXK\\7f4dHYK`7d4_H]Kd7a4[H^Kh7`4WHaKl7\\4SHeKo7Y4PHhKQ8W4oGhKS8W4lGjKU8V4jGjKW8U4iGkKX8T4hGlKX8T4hGlKY8T4fGlK[8S4eGmK[8S4dGnK]8R4bGnK^8R4bGnK_8R4`GnKa8Q4_GoKa8R4^GoKb8P4^GPLc8o3]GQLd8o3[GQLe8P4YGQLh8n3XGRLi8n3VGQLl8o3SGQLn8o3PGRLR9m3RFWKYKl0g>l3nEZKZKj0j>k3jE\\K\\Ki0m>i3fE_K\\Kh0Q?g3bEaK]Kh0T?e3]EdK^Kh0X?b3YEgK^Kg0\\?_3UEkK_Kf0^?^3RElK`Ke0`?_3nDnKaKc0c?]3lDPLaKc0d?]3iDQLcKb0e?\\3hDRLcKb0f?[3gDTLaKb0i?Z3eDTLbKa0l?Y3aDWLcK`0m?Y3_DWLdK`0o?W3]DYLdK`0R`0U3YD[LdKa0V`0Q3VD^LdKa0X`0P3SD^LfKb0Z`0n2oC`LgKa0]`0n2kCaLgKb0_`0l2iCcLhKa0a`0k2fCdLiKa0b`0k2dCdLjKa0d`0j2aCeLkKa0e`0k2^CdLmK`0g`0l2[CdLmKa0i`0k2XCeLoK`0j`0k2VCdLQL`0k`0k2TCeLPLa0n`0i2QCfLQLa0Pa0h2nBgLRL`0Ra0h2lBhLRL`0Ta0g2hBiLTLa0Ua0e2gBjLTLa0Wa0d2dBkLUL`0Ya0d2bBlLUL`0Za0d2`BlLVL?\\a0d2^BmLUL?_a0d2[BlLWL?`a0d2YBmLWL>ba0d2WBnLVL>ea0d2TBnLWL=ha0c2QBPMWL=ia0c2oAoLXL>la0b2kAPMYL=oa0b2gAQMZLRc0U2X@]MfL>Sc0U2U@^MgL=Vc0U2R@^MhL=Wc0T2Q@_MhL=Xc0T2o_O_MhL=[c0T2l_O_MiL=\\c0T2j_O_MjL=^c0S2g_O`MjL=cc0R2a_OaMlL=fc0P2]_OcMmL=jc0o1V_OdMoL>nc0m1Q_OeMQM=Sd0k1k^OhMQM>Wd0i1f^OiMRM?Zd0g1c^OjMSM?[d0g1a^OjMSM`0]d0f1_^OkMRM`0`d0d1^^OlMRM`0ad0d1\\^OlMSM`0bd0d1Y^OmMTM?ed0c1W^OnMTM?fd0c1U^OnMUM?gd0c1S^OoMUM>id0c1Q^OmNPb0R1P^OnNRb0R1l]OnNVb0Q1i]OoNYb0P1f]OPO\\b0P1b]OoNab0Q1]]OoNdb0Q1[]OoNfb0R1X]OnNib0R1U]OnNmb0R1R]OnNob0R1P]OnNQc0Q1o\\OoNRc0P1n\\OPOSc0P1k\\OQOVc0n0j\\OROWc0n0h\\OROZc0l0f\\OTO\\c0k0c\\OTO`c0j0`\\OVOcc0h0[\\OYOgc0e0Y\\O[Ohc0e0W\\O[Ojc0e0U\\O[Olc0d0T\\O\\Omc0d0R\\O\\Ooc0d0P\\O\\OQd0c0o[O]ORd0c0m[O]OSd0e0j[O\\OWd0d0h[O\\OYd0e0e[O[O\\d0e0c[O[O_d0d0`[O\\Oad0d0^[O\\Odd0c0[[O]Ogd0b0W[O_Okd0`0T[O@md0`0R[O@Pe0?oZOARe0?mZOASe0`0lZO@Ue0?kZOAVe0?iZOAXe0?gZOBXe0?gZOAZe0?eZOA\\e0?cZOA^e0`0`ZO@be0`0\\ZO@ee0`0ZZO@he0`0VZO@le0?SZOAoe0>PZOBQf0>nYOBTf0=kYODUf0SYOAof0`0PYO^ORg0c0lXO\\OUg0e0jXOZOWg0g0hXOXOYg0i0fXOVO[g0j0eXOUO[g0n0bXORO_g0P1_XOnNcg0U1ZXOiNhg0Z1UXOdNmg0_1TXOZNPh0h1l02O200O1O1NO1O1O001O001N2N1O2N2N2N2N1O2O1N1O2N1O2N1O1O2M3M4L3M5J;Edn6WOkQIUh0CkWO>Sh0DlWO^KWn<3M23M2N1N2O0O0001O0O2O1N100O100O010O001O001O0nLYBYHh=]7dB`H\\=\\7jBbHV=\\7mBcHT=[7nBdHR=Z7QCfHo`0TOS=b1`CoMZO\\11TOV=_1oE\\OkLUOX=\\1nE@iLUOY=Z1nEBhLTO[=X1oEDeLTO]=V1oEGbLTO`=T1nEJ`LSOb=Q1PFL]LSOe=n0PFOZLSOh=k0PF3ULSOm=g0PF6RLSOP>d0PF8PLTOR>a0PF;mKTOU>>QF=iKUOX>;RF?dKWO[>8SF`0bKXO\\>6TFb0_KXO^>4UFc0]KYO_>2VFd0[KZOa>OVFf0XK\\Oc>KXFh0UK\\Of>HYFi0RK_Oj>@XFP1nJ@Pf0>PZOBRf0jFPBT9R>lFnAQ9U>oFkAm8Y>SGhAj8[>UGeAh8^>YGaAe8a>[G_Ad8b>\\G^Ab8d>^G\\Aa8e>_G[Aa8e>_G[Aa8e>_G[A`8f>`GZA`8f>`GZA`8f>`GZA`8f>`GZA_8g>aGYA_8g>aGZA^8f>bGZA^8f>bGZA]8g>cGYA]8g>cGYA]8g>cGYA]8g>cGYA\\8h>dGXA[8i>eGXAY8j>fGVAY8k>gGUAX8l>hGTAW8m>iGTAU8m>kGSAS8o>mGQAR8P?nGQAo7Q?QHo@m7S?SHm@k7U?UHl@g7W?YHi@e7Y?[Hg@c7[?]Hf@`7]?_Hc@`7^?`Hb@_7`?`Ha@^7`?bH`@]7a?cH_@\\7c?cH]@\\7d?dH\\@[7f?dH[@[7Z5dCV2Q5`HZ7W5cD`1R4YIZ7T5mD^1j3]IX7S5UE]1b3aIX7o4\\E]1\\3dIW7n4bE\\1V3gIV7l4hE\\1Q3iIU7i4PF[1k2lIT7h4VFZ1e2oIR7g4^FX1_2RJQ7d4hFU1W2XJn6a4TGS1m1\\Jl6b4^Gn0e1aJj6`4iGk0\\1eJh6a4RHg0U1iJe6a4\\Hc0n0lJc6c4dH>h0oJb6c4kHQNTBd4KZM^>f2aAYMb>e2^A[Md>c2\\A\\Mg>b2YA^Mj>_2VA`Mm>^43L2O1O001N101N2O1N3M3L4L3M3N2N2O1N2O1O2M2O3M4K6VN__O`Nc`0]1^_ObNd`0[1^_OeNd`0W1^_OhNd`0U1^_OjNc`0U1__OhNd`0V1]_OhNf`0V1[_OhNi`0T1Y_OkNj`0Q1X_OnNk`0b0d_O]Oh`0Kd_O4jb00000O2O1N2O0O2N4M3GoXh5"}}, {"image_id": 13, "category_id": 1, "bbox": [200.0, 595.0, 66.0, 74.0], "score": 0.9997410178184509, "association_id": 1, "light": [-2.143784523010254, -1.3253211975097656, 2.0579376220703125, 1.150414228439331], "segmentation": {"size": [683, 1024], "counts": "VQV41Ze000001O00001O0001O0001O01O01O0000100O000010O010O00001O^e20aZM3M2N2N1N2M3K5K5A?@`0J6H8N2O1000000000000002N:F2N4L4L6J4L3lNR\\Oe0ad0I5K2N3KQnh?"}}, {"image_id": 13, "category_id": 1, "bbox": [326.0, 432.0, 698.0, 232.0], "score": 0.9999042749404907, "association_id": 2, "light": [-2.6782541275024414, -1.6578285694122314, 2.670149803161621, 1.543189287185669], "segmentation": {"size": [683, 1024], "counts": "QRj62Ye00O2O0O101O0O10001N100O10001N10000O2O000O10000000000O10001O00000000000O1000000000000O10000000000000000O10000000000TN@m^O`0Qa0Hi^O8Va0Ne^O2Ya03d^OM[a05c^OL\\a06c^OJ\\a08c^OH[a0;d^OE[a0I^@Ef0j1NhNi>0_@Ah0h10gNi>>UAm01eNi>`0g@jN1Q2?eNi>a0d@mN1n1b0dNh>c0b@nN2l1d0cNh>d0`@oN3j1e0cNg>U1a@9h0bNg>V1`@8h0cNh>^3WAbLi>^3WAbLi>^3VAcLi>^3WAbLi>^3WAbLi>^3VAcLj>]3VAcLj>]3UAdLk>\\3UAdLj>]3VAcLj>]3VAcLj>]3UAdLk>\\3UAdLk>\\3UAdLj>]3VAcLj>]3VAcLj>]3VAcLj>]3UAdLk>]3TAcLk>^3UAbLk>^3UAbLk>^3UAbLk>^3UAbLk>^3UAbLa>ROUA]4:aLa>ROVA\\49bLa>ROVA\\49bLk>^3UAbLk>_3TAbLk>^3TAcLl>]3TAcLl>^3SAbLm>^3SAbLn>]3RAcLn>]3RAcLn>^3QAbLo>^3QAbLP?^3o@cLP?]3PAcLP?^3o@bLR?]3n@cLS?]3l@cLU?XOa@i3:oLV?QOh@o31PMd?o2\\@QMf?n2Y@QMj?m2W@RMj?m2V@SMS`0e2m_OYMU`0f2k_OZMU`0f2l_OXMV`0h2i_OWMX`0i2j_OTMW`0l2k_OPMW`0Q3o_O\\L@2g`0a3l0001O0000101N2N3M2N2N2O0O2N2N1O1O2N100O1N01O1O1O0O2O1N2O1O001O1O10O01O1O100O10O10O10000O10O10O10O1O010O010i^OXLj`0h3S_OiL_`0X3a_OjL]`0U3c_OmL[`0T3d_OmL\\`0R3e_OoLY`0R3g_OnLY`0R3f_OoLY`0Q3h_OPMW`0P3i_OPMV`0Q3j_OoLV`0P3k_OPMU`0P3j_OQMV`0o2j_OQMV`0o2j_ORMT`0o2l_OQMT`0n2m_ORMS`0n2m_OQMT`0o2l_OQMT`0o2l_OQMS`0P3l_OQMT`0n2m_ORMS`0n2m_ORMS`0n2m_ORMR`0o2m_ORMS`0m2n_OSMR`0m2n_OSMR`0m2m_OSMT`0m2l_OSMS`0m2n_OSMR`0m2n_OSMR`0m2m_OTMS`0l2m_OTMS`0k2n_OUMQ`0l2o_OTMQ`0l2o_OTMQ`0l2o_OTMQ`0k2P@UMP`0k2P@UMo?l2Q@TMo?k2Q@VMo?j2Q@UMP`0k2P@UMP`0k2P@UMP`0k2P@UMo?l2Q@TMo?k2R@UMn?k2R@UMn?k2R@UMn?k2R@UMn?k2R@UMn?k2R@UMn?k2R@UMn?k2R@TMn?m2R@SMn?m2Q@TMo?l2Q@TMo?l2Q@TMo?l2Q@TMo?l2Q@TMo?l2Q@SMo?m2R@SMn?m2R@SMn?m2Q@TMo?l2Q@TMo?l2Q@TMo?l2Q@TMo?l2Q@TMn?m2R@SMn?m2R@SMn?m2R@SMn?m2R@SMn?m2R@SMn?m2R@RMn?o2R@QMn?o2R@QMn?o2R@QMn?o2R@QMn?n2S@RMl?o2T@QMl?o2T@QMl?o2T@QMl?o2S@RMm?n2S@RMl?o2T@QMl?o2T@PMm?P3S@PMm?P3S@PMl?Q3T@oLl?Q3T@oLl?Q3T@oLl?Q3T@oLk?R3U@nLk?R3U@nLk?R3U@nLk?R3U@nLj?R3W@nLi?R3W@nLi?R3W@nLi?R3W@nLh?S3X@lLi?T3W@lLi?T3W@lLh?U3W@lLi?T3W@lLi?T3W@lLi?T3W@lLi?T3W@lLi?T3W@lLh?U3X@kLh?U3X@kLh?U3X@kLh?U3X@kLh?U3X@kLh?U3X@kLg?V3Y@jLg?V3Y@jLg?V3Y@jLg?V3Y@jLg?V3Y@jLg?V3X@kLh?U3X@kLg?V3Y@jLg?V3Y@jLg?V3Y@jLg?U3Z@kLf?U3Z@kLf?U3Z@kLf?U3Z@kLf?U3Z@kLf?U3Z@kLe?V3[@iLf?W3Z@iLf?V3Z@kLf?U3Z@kLf?U3Z@kLf?U3Z@kLf?U3Z@kLe?V3[@jLe?V3[@jLe?U3[@lLe?T3[@kLf?U3Z@kLf?U3Z@kLf?T3[@lLe?T3[@lLd?U3\\@kLd?U3\\@kLd?U3\\@kLd?U3\\@kLd?T3\\@mLd?S3\\@mLd?S3\\@mLd?S3\\@mLd?S3\\@mLd?S3\\@mLd?S3\\@mLd?R3]@nLc?R3]@nLc?R3]@nLc?R3]@nLc?R3]@nLc?R3]@nLc?R3]@nLc?R3\\@oLd?Q3\\@oLd?P3]@PMc?P3]@PMc?P3]@PMc?P3]@oLd?Q3\\@oLd?Q3[@PMe?P3[@PMe?P3[@PMe?P3[@PMe?P3[@PMe?P3[@PMe?P3[@PMe?P3[@PMe?P3[@PMe?P3[@PMe?P3Z@QMf?o2Z@QMf?o2Z@QMf?o2Z@QMf?o2Z@QMg?n2Y@RMg?n2Y@RMg?n2Y@RMg?n2Y@RMg?n2Y@RMg?m2Z@SMf?m2Z@SMf?m2Z@SMf?m2Z@SMf?m2Z@SMf?m2Z@SMf?m2Z@SMf?m2Z@SMf?m2Z@SMf?m2Z@SMf?m2Z@SMf?m2Z@SMf?m2Z@SMf?m2Z@SMf?n2X@SMh?m2X@SMi?l2W@TMi?l2X@SMh?m2X@SMh?m2X@SMh?m2X@SMh?m2X@SMh?m2X@SMh?m2X@SMh?m2X@SMh?m2X@SMh?m2X@SMh?m2X@SMh?m2X@SMi?l2W@TMi?l2W@TMi?l2W@TMi?l2W@TMi?l2W@TMi?l2W@TMi?l2W@TMi?m2W@RMi?n2W@RMi?n2W@RMi?n2W@RMi?n2W@RMh?P3W@PMi?P3W@PMi?P3W@PMi?P3W@PMi?Q3V@oLj?Q3V@PMi?P3W@PMi?Q3V@oLj?Q3V@oLj?R3U@nLk?R3U@nLk?R3V@mLj?S3V@mLj?T3U@lLk?T3U@lLk?T3U@lLk?T3U@lLk?T3U@lLk?Z40000000kNU@jLk?V3U@jLk?V3U@jLk?V3U@jLk?V3U@jLk?V3U@kLj?U3V@kLj?V3V@iLj?W3V@iLj?W3V@iLj?W3V@iLj?W3V@iLj?W3W@hLi?X3W@hLi?X3W@hLi?X3W@iLh?W3X@iLh?X3X@gLh?Y3X@gLh?Y3X@gLh?Y3X@gLh?Y3Y@fLg?Z3Y@gLf?Y3Z@gLf?Y3[@fLe?Z3[@fLe?Z3\\@eLd?[3\\@eLd?[3\\@fLc?[3]@dLc?\\3]@dLc?\\3]@dLc?\\3]@dLc?\\3]@dLc?\\3^@cLb?]3]@dLc?\\3]@dLc?\\3]@dLc?\\3]@eLb?[3^@eLb?\\3]@dLc?\\3]@dLc?\\3]@dLc?\\3]@dLc?\\3]@dLc?\\3]@eLb?[3^@eLb?[3^@eLb?[3^@eLb?[3^@fL`?[3`@eL`?Z3`@gL`?Y3`@gL`?Y3`@hL_?X3a@hL_?X3a@hL_?X3a@hL_?W3b@iL]?X3c@iL\\?W3d@iL\\?W3d@iL\\?W3d@iL\\?W3d@iL[?W3f@iLZ?W3f@iLZ?W3f@iLZ?W3f@jLX?W3h@iLX?W3h@iLX?V3i@jLW?V3i@jLW?V3i@jLV?W3j@iLV?W3j@iLV?W3j@jLU?V3k@jLU?V3k@jLU?V3k@jLU?V3k@jLU?V3k@jLT?W3k@kLT?U3l@kLT?U3l@kLT?U3l@kLT?U3l@kLT?U3l@kLT?U3l@kLT?U3l@kLT?U3l@kLS?V3n@jLQ?V3o@jLQ?V3o@jLQ?V3o@jLQ?V3o@jLQ?V3o@jLQ?V3o@jLQ?V3o@jLQ?V3PAiLP?W3PAiLP?X3o@iLo>X3QAhLo>X3RAgLn>Y3RAgLn>Y3SAfLm>Z3SAfLm>[3SAdLl>]3TAdLk>\\3UAdLk>\\3VAcLj>]3VAcLj>^3UAbLk>^3UAbLj>_3VAaLj>_3VAaLj>_3WA`Li>a3VA_Lj>a3VA_Li>b3WA^Li>b3WA^Li>c3VA^Li>b3XA]Lg>d3YA\\Lg>e3YAZLg>f3ZAYLe>h3[AXLe>i3[AVLe>j3[AVLe>k3[ATLd>m3\\ASLd>n3]APLc>P4aAlK_>U4cAiK[>Y4eAfK[>Z4fAeKZ>\\4fAcKZ>^4eAbKZ>`4fA_KZ>b4eA^K[>c4eA\\K[>e4dA[K\\>e4eA[KY>g4fAYKZ>h4eAXK[>i4dAWK\\>i4dAWK\\>j4cAVK\\>k4dAUK\\>l4dASK\\>n4cARK]>n4cARK]>n4cARK]>o4bARK]>n4dAQK\\>P5cAPK\\>Q5eAnJ[>R5eAnJ[>S5eAlJ[>T5fAkJZ>V5eAkJZ>U5gAjJY>W5fAiJY>X5gAhJY>Y5fAhJY>X5hAgJX>Z5gAfJY>[5fAeJZ>[5fAeJY>]5gAcJX>]5hAcJX>]5hAcJX>^5gAbJY>^5gAbJX>`5gA`JY>`5gA`JY>`5gAaJX>_5hAaJX>_5hAaJX>_5hAaJW>`5iA`JW>`5jA_JV>a5jA`JU>a5jA_JV>a5jA_JU>b5kA^JU>b5kA_JT>a5lA_JT>a5lA_JT>a5lA`JR>a5nA_JR>a5nA`JQ>`5oA`JQ>`5oAaJP>_5PBaJo=`5QB`Jo=`5QBaJn=_5RBaJn=_5SB`Jm=`5SB`Jl=a5TB_Jl=a5TB_Jl=a5TB_Jl=a5TB_Jl=a5TB_Jl=a5TB_Jl=`5UB`Jk=`5UB`Jk=`5UB`Jk=`5UB`Jl=_5TBaJl=_5TBaJl=_5TBaJl=_5TBaJl=_5TBaJl=_5TBbJk=^5UBbJk=]5VBcJj=]5VBcJj=]5VBcJj=]5VBcJj=]5VBcJj=]5VBcJk=\\5UBdJk=\\5UBdJk=[5VBeJj=[5VBeJj=[5VBeJj=[5WBdJi=[5XBdJj=[5VBeJj=Z5WBfJi=X5ZBfJh=W5ZBiJf=U5]BiJe=T5]BlJd=Q5_BmJc=o4aBoJb=c4dASKo06b=`4n1IUB"}}, {"image_id": 13, "category_id": 1, "bbox": [9.0, 214.0, 1004.0, 308.0], "score": 0.9995362758636475, "association_id": 3, "light": [-2.4286303520202637, -1.8617019653320312, 2.3380329608917236, 1.7432308197021484], "segmentation": {"size": [683, 1024], "counts": "W_61Ye02O1O1N101O00000O1000000O10000000000O1000000000000O100000000000000O1000000000000O1oL`0W@@c?h0[@XOb?l0]@TOb?n0]@ROb?P1]@POb?R1]@nNc?S1[@nNd?T1[@lNe?U1Z@kNe?W1Z@iNf?W1Z@iNe?Y1Z@gNf?Z1Y@fNf?[1Z@dNg?]1X@cNh?]1X@cNh?]1W@dNi?]1V@cNj?]1V@cNj?^1U@bNk?^1U@bNk?^1U@bNk?^1U@bNk?_1T@aNl?_1T@aNl?_1T@aNl?`1S@`Nm?`1S@`Nm?`1S@`Nm?`1R@aNn?`1Q@_NP`0a1P@_NP`0a1P@_NP`0a1P@_NP`0b1o_O^NQ`0b1o_O^NQ`0b1o_O^NQ`0b1o_O^NQ`0c1n_O]NR`0c1m_O^NS`0b1m_O^NS`0b1m_O^NS`0b1m_O^NS`0c1l_O]NT`0c1l_O]NT`0c1l_O]NT`0c1l_O]NT`0c1k_O^NU`0c1j_O]NV`0c1j_O]NV`0c1j_O\\NW`0d1i_O\\NW`0d1i_O\\NW`0d1i_O\\NV`0f1i_OZNW`0f1i_OZNW`0f1i_OZNW`0f1i_OZNW`0f1i_OZNW`0g1h_OYNX`0g1h_OYNX`0g1h_OYNW`0h1i_OXNW`0i1g_OXNY`0h1g_OXNY`0h1g_OXNY`0h1g_OXNX`0j1g_OVNY`0j1g_OVNY`0j1g_OVNY`0j1g_OVNY`0k1e_OVNZ`0k1f_OUNZ`0k1f_OUNZ`0k1f_OUNZ`0k1e_OVN[`0k1d_OTN\\`0m1d_OSN\\`0m1d_OSN\\`0m1d_OSN[`0n1e_ORN[`0n1e_ORN[`0o1d_OQN\\`0o1d_OQN[`0P2e_OPN[`0P2e_OPN[`0P2e_OPN[`0P2e_OPNZ`0Q2f_OoMZ`0R2e_OnM[`0R2d_OoM\\`0Q2d_OoM\\`0Q2d_OoM\\`0Q2d_OoM[`0R2e_OnM[`0R2e_OnM[`0R2e_OnM[`0S2d_OmM\\`0S2d_OmM\\`0S2d_OmM\\`0S2d_OmM[`0T2e_OlM[`0T2e_OlM[`0T2d_OmM\\`0S2d_OmM\\`0S2d_OmM\\`0T2c_OkM^`0U2b_OkM^`0U2b_OkM^`0U2b_OkM]`0V2c_OiM^`0W2b_OiM^`0W2c_OhM]`0X2c_OgM^`0Z2a_OfM_`0Z2a_OfM_`0Z2a_OeM``0[2`_OeM``0[2`_OeM``0[2`_OdMa`0\\2__OcMa`0^2__ObMa`0^2`_O`Ma`0`2__O_Mb`0b2]_O^Mc`0b2]_O]Mc`0d2]_O\\Mc`0d2^_OZMc`0f2]_OZMc`0f2]_OZMb`0g2__OWMb`0i2^_OWMb`0i2^_OWMb`0i2^_OWMa`0j2`_OTMa`0m2^_OSMa`0n2^_OTMa`0l2__OTMa`0l2__OTM``0m2__OTMa`0l2__OUM_`0l2`_OUM``0k2`_OUM_`0l2`_OVM^`0k2`_OWM``0j2__OVMa`0j2^_OXM``0i2`_OWM``0i2`_OXM^`0i2b_OWM^`0i2b_OXM]`0h2c_OXM]`0h2b_OZM\\`0h2c_OXM]`0h2c_OYM\\`0g2d_OYM\\`0g2d_OYM[`0h2e_OYMZ`0g2f_OYMZ`0f2g_OZMX`0g2h_OZMW`0f2h_O[MX`0e2h_O[MW`0f2i_OZMW`0f2i_O[MU`0f2k_OZMU`0f2k_OZMT`0g2l_OZMS`0f2m_OZMR`0g2m_OZMS`0f2m_O[MQ`0f2o_OZMP`0g2P@YMo?h2P@ZMn?g2P@[Mo?e2Q@\\Mn?e2Q@]Mm?d2S@\\Ml?e2S@\\Mm?d2S@\\Ml?e2S@\\Ml?e2T@\\Mk?d2T@]Mk?d2Q@`Mo?`2Q@`Mn?a2Q@`Mo?`2Q@`Mn?a2R@_Mn?a2Q@`Mo?`2Q@`Mn?a2R@`Mm?`2S@`Mm?_2T@aMk?`2T@aMl?_2T@aMk?`2U@`Mk?`2U@`Mj?a2V@_Mj?a2V@_Mi?b2V@_Mj?`2W@`Mh?a2X@_Mh?a2X@_Mg?b2Y@^Mg?b2Y@^Mg?b2Y@^Mf?c2Y@^Mg?b2Y@^Mf?c2Z@]Mf?c2Z@]Mf?c2Z@]Me?c2\\@]Md?c2\\@]Md?c2\\@]Mc?d2]@\\Mc?d2\\@]Md?c2\\@]Mc?d2]@\\Mc?d2]@\\Mc?d2]@\\Mb?e2^@[Mb?e2^@[Mb?e2^@[Mb?e2^@[Ma?f2_@ZMa?f2_@ZMa?f2_@ZM`?g2`@YM`?g2`@YM`?g2`@YM`?g2`@YM_?h2a@XM_?h2a@XM_?h2a@XM_?h2a@XM^?i2b@WM^?i2b@WM^?i2b@WM^?i2b@WM]?j2c@VM]?j2c@VM]?j2c@VM]?j2c@WM\\?i2d@WM\\?i2d@WM\\?i2d@WM[?j2e@VM[?j2e@VM[?j2e@VM[?j2e@VM[?j2e@VM[?j2e@VM[?j2e@VMZ?k2f@UMZ?k2f@UMZ?k2f@VMY?j2g@VMY?j2g@VMY?j2g@VMY?j2g@VMY?j2g@WMX?i2h@WMX?i2h@WMX?i2h@WMX?i2h@XMW?h2i@XMW?h2i@XMW?h2i@YMV?g2j@YMV?g2j@YMV?g2j@YMV?g2j@ZMU?f2k@ZMU?f2k@ZMU?f2k@ZMU?f2l@YMT?g2l@ZMS?f2m@ZMS?f2m@ZMS?f2m@ZMS?f2m@ZMS?f2m@ZMS?f2m@ZMS?f2m@[MR?e2o@ZMQ?f2o@ZMQ?f2o@ZMQ?f2o@[MP?e2PA[MP?e2QAZMo>f2QAZMo>f2QA[Mn>e2SA\\Mk>d2UAbMe>^2[AdMc>]2]AdMa>\\2_AdMa>\\2_AeM`>[2aAdM_>\\2aAeM^>\\2aAdM_>\\2aAdM_>\\2aAeM^>[2cAdM]>]2bAcM^>]2bAdM]>\\2cAdM]>]2bAcM^>]2bAcM^>^2aAbM_>^2bAaM]>`2cA`M]>a2bA`M]>`2cA`M]>a2bA_M^>a2cA^M]>c2bA]M^>c2bA]M^>d2bA\\M]>d2cA\\M]>d2eAZM[>g2gAVMY>j2jATMU>l2lASMT>n2lAQMT>o2mAQMR>o2oAPMQ>P3oAPMQ>Q3oAnLQ>R3oAnLQ>R3oAoLP>Q3QBnLo=S3PBmLP>S3PBmLP>S3PBmLP>S3QBlLo=U3PBkLP>U3PBkLP>V3oAjLQ>V3oAjLQ>V3PBiLP>X3oAhLQ>X3oAhLQ>Y3oAfLQ>Z3oAfLQ>[3oAdLQ>]3nAcLR>^3nA`LS>b3lA]LT>d3mAZLS>g3VBoKj=R4WBlKi=V4WBhKi=Y4WBfKi=[4WBdKi=]4WBbKi=_4WB`Ki=a4VB^Kk=c4UB\\Kk=e4TB[Kl=f4SBZKm=f4TBYKl=h4SBXKm=i4RBWKn=i4SBVKm=k4RBTKo=l4QBTKo=l4QBTKo=m4QBRKo=n4QBRKo=o4PBQKP>o4QBoJP>Q5PBoJP>R5PBmJP>S5PBlJQ>T5PBkJP>V5PBiJP>W5RBfJo=[5SBaJn=_5VB[Jl=e5m01Oi0WO1O001O001O001O001O001O001O001O01O00000000000000000O10000oN^AYKb>g4`AWK`>h4bAWK^>h4eAVK[>i4hAUKX>j4jAUKV>j4mATKS>k4oATKQ>k4QBSKP>k4SBTKm=k4UBTKl=j4UBVKk=h4XBWKh=g4ZBYKf=d4^B[Kb=c4`B]K`=a4cB^K]=`4eB`K[=_4fBaKZ=_4gB`KY=_4hB`KY=`4gB`KY=`4gB`KY=_4iB`KW=`4iB`KW=`4jB^KW=a4jB_KV=a4jB_KV=a4kB]KV=b4kB^KU=b4lB\\KU=d4kB\\KU=c4mB[KT=e4lB[KT=d4PB\\Km>d4RA]Kn>c4l@\\K_O2e?a4l@fKS?Z4m@fKS?Y4m@iKR?W4n@hKS?W4o@hKQ?X4o@hKQ?W4QAaKZO2e?]4QA_K\\O3d?]4WAbKj>]4WAbKi>]4S1O100O10000O100O10000O10O0100O100O100O1O100O1O1O1O100O1O10O0100O100O10000O10000O10000O1000000O1000000O1000000O100O100O10000O100O100O10000O100O10000O10000O10000O10000O100O100O10000O100O1000000O1000000O100000000O101O0000000O10000000000000000000000000000000000000000000000000001O0000000000000000000000000O1000000000O1000000000O10000000000000000O100000O10000000O10000000000O10000000X_ORMS?m2n@SMR?m2n@SMR?m2m@UMR?k2n@UMR?k2n@UMR?j2o@VMQ?j2o@VMQ?j2o@VMQ?j2o@VMQ?i2PAWMP?i2PAWMP?i2PAWMP?i2PAXMo>g2QAZMo>f2QAZMo>f2QAZMo>f2QAZMo>f2QAZMo>f2QAZMo>e2RA[Mn>e2RA[Mn>e2RA[Mn>e2RA[Mn>e2RA[Mn>d2SA]Ml>c2TA]M\\NJ\\`0i2XA]M[NK]`0h2WA^M[NK^`0g2WAbMi>^2WAbMi>^2WAbMi>]2XAcMh>]2XAcMh>]2XAcMg>^2ZA]MYNL]`0g2ZA]Mj>c2VA]Mj>c2VA\\Mk>c2VA]Mj>c2WA\\Mi>d2WA\\Mi>d2WA\\Mi>d2WA\\Mi>d2WA[Mj>e2WAZMi>e2XA[Mh>e2XA[Mh>e2XAZMi>f2XAYMh>g2n1000000O1000000000O10O10000000000000O100000000O100000O010000O10000O100O10000O10000O1000O10O10000000000O2O000000000000001O0O100000000000001O000O10000000000000001N10000000000O1000000O10000O100O100O1O1O1O100O1O1O1O1O100O1O1O100O1O100O100O1000O0100O100O010O100\\OWLe_Oi3Y`0\\Ld_Oe3Z`0_Lc_Ob3Z`0cLc_O]3[`0hLc_OX3\\`0kL`_OW3_`0j001O000001O0000000000001O001O00100O010O100O100O10O0100O1O1O1O100O1O1K5I7L4K4N3M3N2O1N2O1N2O1O1O1O1O1O100O1O100O1O1O1O100O1O2M2N2M3L4K5K6\\OR]OcNTc0\\1>N2O1O1O2O0O1O1O2N1O101N1O100O2O0O`BPOoI3l;m0UJQOmI5KL^;l0jJUOkI6IKb;j0jJUOkI6IKb;i0kJVOjI6JJa;j0kJVOkI5LH_;l0jJWOlI3m;e0YJVOlI2m;h0WJVOe6i0\\IWOVJ0Z;h0`JXOUJ2Z;e0bJXOUJ3Y;e0bJXOTJ5Z;a0dJYORJ6Z;a0dJYORJ6[;?fKAZ4?fKAZ4>gKBZ4SVOB^g00gZO?iMB]g04iZO:iMA]g09hZO=We0EhZOg[OBWd0a0h[O_OVd0e0i[OZOWd0h0h[OWOXd0k0f[OUOZd0m0e[ORO\\d0P1b[OoN_d0S1^[OmNcd0V1Z[OhNgd0[1W[OcNjd0`1T[O_Njd0g1S[OWNnd0l1P[OSNQe0o1mZOQNSe0R2jZOmMVe0V2hZOjMWe0Z2fZOfMXe0T3PZOkLoe0\\3lYOdLQf0a3mYO]Lke0P4RZOmKoe0Z46\\ZOCXe0i0fZOXOmd0V1R[OjNbd0b1^[O_NVd0m1h[OTNRd0T2l[OmMnc0Y2Q\\OgMjc0_2U\\OaMhc0c2W\\O^Mgc0d2X\\O]Mgc0e2W\\O\\Mgc0i2U\\OXMhc0m2U\\OTMjc0R3P\\OoLnc0Y3k[OgLUd0]3g[OcLXd0e3b[OYL^d0R53N12O2M4M1N3N2M1O1O1O1O3M2O1N1O100O2M2O100000O11O0002M2N2L5M2N3M2N2M3J6QOo0I6L5M3L4M3N3N1O1N101O1O001O1O001N1bMRYOj0nf0QO^YOM^ODVg0;cYOJ^ODSg0>fYOH]OCQg0b0fYOGA^Omf0g0iYOAWg0;l1In[g`0"}}, {"image_id": 15, "category_id": 1, "bbox": [76.0, 175.0, 434.0, 251.0], "score": 1.0, "association_id": 2, "light": [-1.4171404838562012, -3.102489709854126, 1.2076191902160645, 3.004786491394043], "segmentation": {"size": [426, 640], "counts": "fjo0g0^<H4L3M6K4L3N2N3M3M2N2N3M8H2N2N3MV1LA4]66kJKVOKB4]66kJKVOKB4]65lJLUOKB4]65lJLUOKB4^64kJMUOLA3_63lJNTOLA3a6MnJ5oNKB3U92YGKB3U92YGKB3U92XGLC2U92XGLC2U92XGLC2U93WGKD2U93WGKC3V92WGKC3V93VGKC2W93VGKC2W93VGKC2W93VGKC2W94UGJD2W94VGIC3W94VGIC3W95UGIC2X95UGIC2X96TGHC3Y95TGHC3Z95RGIC2[95SGHB3[96RGGC3[96RGHB2\\97QGGC2\\97RGFB3\\98QGEC3\\98QGFB2]98QGFB2]99PGEC2]99oFFD1]99oFFC2^99nFFC1_9:mFED1_9:lFFE0_9;kFFENa9=iFEFNa9?gFDGMb9a0TFPO;b0OMb9i0TFiN1b08Mc9i0QFkN3`08Ld9P1TFTO8Ld9Q1SFSO9Ld9Q1SFSO9Ld9R1QFTO9Kf9Q1QFTO9Jg9k1XFVNh9j1WFWNh9k1VFUNk9k1TFVNl9d20O1000000O10000000000O1000000O1000O010000000000O101O0000000000000000000000001O000001O01O000010O00010O0000010O000001O00000010O000001O0000000010O000000001O00001O000000010O00000000000010O0001O001O00001O0001O01O000000001O001O00001O0000001O00000001O01O000010O0010O000001O01O000001O0000001O001O00001O0000001O0000001O00001O001O00001O000000001O0000001O001O1O1O1O001O001O0000001O001O001O2N2N1O1O1O1O001O00001O0000001N10001O00001O00001O00001O0000100O007I3M4L00001O0000001O00001O00002N2N2N001O0000001O000O101O00001O1O2N1O1O1O001N2O001O001N2O0ZOdC=^<@hC\\4FaK<]4FbKbKC[4c0aK]O]4h0_KZO_4h0`KWO`4l0]KSOd4Q1XKlNj4Z1PKcNR5b1jJ]NX5e1eJ[N\\5i1aJVN`5m1\\JRNe5T2UJkMm5Y2nIfMS62lHl0n0ROV6`2gI`MX6f2_I_M^6h4N2O012N2M=D=C7H4L5K4L3L3N2O0O100O10000000000O1O1N2M3M3N2M2L4J50M3M5M300\\OZKdHf4U7aKkH_4n6hKRIX4g6oKZIP4Z6\\LfId3k5kLUJU3g5oLYJQ3e5QM[Jo2d5RM\\Jn2b5TM_Jk2^5XMbJh2Z5\\MfJd2X5^MiJa2U5aMkJ_2S5cMmJ]2l4jMTKV2c4SN]Km1]4YNcKg1[4\\NdKd1Y4_NhK`1Q4gNoKY1P3HPM8i2OWM1f22ZMNc25]MK]2;cMEU2d0jM\\OT2f0mMYOR2h0nMXOR2h0nMXOR2h0oMWOP2k0oMVO7^Kl0\\5mNVO4fKj0T5SOVO1iKj0Q5UOWOMmKk0n4WO:h0FXO;EF?2EMc0H@8i61O01O01O00001O0010O01O1O0010O0000000000001O01O0001N10001O001O0000001O0001O000000001O0001O01O0001O001O001N2NQ>"}}, {"image_id": 16, "category_id": 1, "bbox": [247.0, 600.0, 193.0, 76.0], "score": 0.9999996423721313, "association_id": 1, "light": [-2.1943283081054688, -1.6876800060272217, 2.136971950531006, 1.605538010597229], "segmentation": {"size": [683, 1024], "counts": "l\\U53We02O00001N10000000000000000O1000000000000000000000000O100000000O1000000000000O1000000000000000000000000000000000000000000000000000000000000O1000000000O1000XNF`^O9_a0M\\^O3ba04Y^OLga06W^OJha08W^OGja0N2O100O010000V\\OmN\\c0T1b\\OnN]c0R1b\\OoN^c0Q1a\\OQO^c0^11O1N2O0O2L4L3N2O100O2O0O101O0010O00010O100O1O1000O2O4K102M2N101N101N1O1N3N2M3Mllj0"}}, {"image_id": 16, "category_id": 1, "bbox": [530.0, 514.0, 148.0, 80.0], "score": 0.9999995827674866, "association_id": 3, "light": [-2.29561185836792, -1.5280168056488037, 2.287526845932007, 1.413456916809082], "segmentation": {"size": [683, 1024], "counts": "bRR;2Xe02O001O0O101O000000000000001O0000000O100000000000000000000O100000O10000000O1000000000000000O10O1000000000000O100000000000O10000000O100000000000O2O000000cNHj\\O1C5`01mb0o0n\\OQOQc0V1i\\OjNVc0]1d\\OcNZc0h1N20O0100000Ih\\O[NXc0e1h\\O[NXc0d1h\\O]NXc0c1h\\O]NXc0o0h\\O]O0CYc0m0X]OQOA1Wc0l0a]OTO`b0j0a]OVO_b0j0a]OVO_b0i0b]OWO^b0h0c]OXO]b0h0c]OXO\\b0i0d]OWO\\b0i0d]OWOUb0NP]Om0j0UOVb0R1i]OnNVb0S1j]OmNVb0T1i]OlNWb0T1i]OlNXb0S1h]OmNXb0T1g]OlNYb0U1f]OjN[b0V1f]OiN[b0X1]]OnNcb0U1W]OnNjb0Y1l\\OgNZc0c11O0O101O0O1O2N1N2N2L4J6O2O01O0010O10O111O2M1006I1O5J4L1O2O0O1N3N1N2M]WV7"}}, {"image_id": 16, "category_id": 1, "bbox": [532.0, 491.0, 115.0, 56.0], "score": 0.9999253749847412, "association_id": 4, "light": [-2.133171319961548, -1.9655787944793701, 2.022139072418213, 1.7871482372283936], "segmentation": {"size": [683, 1024], "counts": "l[S;1Ze01O000000000O100000001O000000000O10O10000000000000O10000000000000000000000000000O100000O1000eNM^]O3`b02]]ONcb03\\]OMcb05\\]OKdb06[]OIeb0;X]OEhb0XmNIfR1:VmNHhR1?olNDPS1l100O1N2O1OO1N2O0101O1O10FmlN[MUS1P3N5K1O00000000000000O1M31O1O0000001O1O001O001O001O2N1O2N3M3M3M5K2N001O0000000001O1O2N1O2M6lNhmNjMZR1m0`mNcNO?;@G;`R1n0cnNROjNC19lR1e0XnNQOkNe0^S13imN7SR1EnmN>oS12M10000000O1000000O10OXOjjN;WU1CmjN:TU1CPkN;PU1ERkN:nT1FRkN9nT1HQkN8oT1IQkN6oT1KPkN5QU1KojN5PU1KQkN5nT1LRkN3nT1NQkN3oT1MQkN3nT1NRkN2mT1OSkN1kT11UkNOjT13TkNNkT13UkNMjT14UkNMjT14VkNLiT15WkNKhT16WkNJiT17WkNIhT18XkNHfT1:YkNFgT1Z]OV@Xc0f?i1L4L4M2N3N3N1O1O1N2O1O1O1O1O1O1NVZOTAXd0i>f[O_AWd0\\>_[ObAnN7ae0P>g[O_BWd0Sga0W:f@WEcMd0ga0U:mBmES=S:jBPFV=P:d_OaEnNi0^a0e9Y_OcIg`0]6U_OgIk`0Y6S_OiIm`0V6R_OlIn`0T6P_OoIo`0S6m^OoISa0T6h^OnIXa0U6b^OnI^a0W6P^OVJPb0S=00000000000000000000O10O100000000O101O0O100O100SMk\\OaBXc0X=n\\OfBUc0S=P]OdBGeM]c0]?U]OPCQc0djd0h8iXOkF\\2ne0W7dYOYH=`0Qf0U7dYOZH:b0Sf0R7fYOZH7d0Tf0P7gYOZH5g0Uf0m6hYO[H3g0Wf0l6hYO[H2h0Xf0k6hYO\\HOi0[f0i6hYO]HMj0\\f0g6jYO^HHl0_f0e6jYO^HGm0`f0c6lYO]HEP1`f0b6T\\O_Imc0`6S\\O_IPd0_6P\\O`IRd0`6m[O_IUd0`6k[O_IXd0`6g[O`I\\d0^6c[ObI_d0]6a[ObIbd0\\6][OcIgd0Z6Z[OdIkd0Y6T[OgIod0W6P[OiISe0U6lZOkIVe0S6jZOmIXe0R6gZOnI[e0Q6eZOnI\\e0R6bZOoI`e0o5`ZOPJce0o5[ZOPJhe0P6VZOQJle0m5TZOSJme0m5RZOSJPf0k5PZOVJQf0h5oYOXJTf0d5mYO[JWf0`5kYO`JZf0X5hYOhJ^f0Q5dYOoJ`f0k4aYOVKcf0d4_YO\\Kdf0_4^YO`Kef0]4[YOcKif0X4XYOhKlf0S4TYOnKQg0k3RYOULTg0b3oXO^Lmg0b2XXO]M\\h0k1kWORN_h0]1kWO_N^h0T1jWOfN`h0o0gWOlNah0j0eWOSOdh0:iWODao0N]QT:"}}, {"image_id": 18, "category_id": 1, "bbox": [84.0, 81.0, 215.0, 369.0], "score": 1.0, "association_id": 3, "light": [-2.53208589553833, -1.9450876712799072, 2.4903793334960938, 1.7533659934997559], "segmentation": {"size": [572, 1024], "counts": "_S_18aa0:F6G8J5L5K4M2M3M4M2N2M3K4M4N2N1O2O1O1O001000000O100nAhM`lH^6U7nI]HT6d7hI^HX6d7fI\\HZ6h7aIYH_6m7ZIUHe6f5`HQL=ZNS7b5gHVL0XNY7`5kHYLHWN_7]5nH]L_OVNc7Y5UIcLSOTNi7S5ZIkLiNSNn7n4^IoLbNSNP8l4aIPM_NTNP8i4fIQMYNWNQ8d4nIQMPN[NR8c4SJoLkM^NR8`4XJPMfM`NS8]4ZJRMbMbNV8U4^JWM\\MeNX8a3nJiMjLfNZ8^2nKjNhKiN\\8X2PLnNdKkN[8U2VLmN_KnN\\8S2XLlN\\KRO\\8Q2[LkNYKTO\\8P2^LjNUKWO^8m1_LjNTKYO]8l1aLiNSK[O]8h1fLgNoJB[8e1oLZNnJ1T8b1PN^NP2a1PN`NR2^1nMbNU2[1jMfNY2W1gMiN[2T1eMmN\\2R1dMnN^2o0cMQO_2l0bMTOb2g0^MZOe2b0\\M^Of2?[M@i28\\MHR3AVM`0S:0000O1000O10O100000O1000O1000O1000O10000000O010000O10000O1000000O100O1000O10O100000000O10000000O100000O10000000O10O1000000000000O100000000O10000000000O100000000O1000000O101O001N[bd<"}}, {"image_id": 18, "category_id": 1, "bbox": [453.0, 30.0, 150.0, 427.0], "score": 0.9999991059303284, "association_id": 2, "light": [-2.4488799571990967, -2.0365848541259766, 2.2244129180908203, 1.8098467588424683], "segmentation": {"size": [572, 1024], "counts": "SWm75ca08H7F;H8I5L2L5K4M3N3K7[Of0_Od0F9H?@;F6J5L3N3M3M1O2M1O2N3N1O2N5L2M2N3L6K`0gD\\JZ9\\7F6VHaGl5f8eIjGS6U:WI]En5g:nIZER6g:mIZEP6i:nIXEf43QLg:XOVE]4k0kKQ:HTEZ4X1aKh93QE\\4bg2Z1DfN?U1CjNb0Q1_OoNf0j0\\OVOl0`0VO@T14nNL\\1GgN8_900000000000000000000O10000000000O1000000000000O10000O1000001N10001O000O101O0O2O_hZ7"}}, {"image_id": 18, "category_id": 1, "bbox": [668.0, 15.0, 124.0, 446.0], "score": 0.9999998807907104, "association_id": 4, "light": [-2.1856534481048584, -2.3892314434051514, 2.007209062576294, 2.1974289417266846], "segmentation": {"size": [572, 1024], "counts": "kZe;3Ua0e0F:K5M3M0OOO3N201O2N1L4N3N0O1O0N2N3M2J6H62O2N4L3A`0K4O1ObHaNbN^1^1eN_NZ1lJWOk3AU1X1nJDe3TO[1W1PKL`3nN_1W1mJ2`3hNb1V1kJ9`3aNe1V1iJ=`3]Nf1V1iJa0^3YNj1V1fJe0^3UNl1X1bJh0_3PNn1\\1ZJn0d3fMR2`1PJR1l3]MU2e1gIT1R4VMW2k1_IU1X4PMX2g5eMXJ\\2o5]MnIgKOf6^6bMcI\\2b6_M`I]2g6^M\\IY2Q7aMPIR2n7[MSHU2c8bL[GiN3a4i8^L_GjNIe4o8VLaGROAf4Z9[KiGLoNf4^;XKcDf4_;XKcDd4`;[KbDb4`;]KbD`4`;`KdDZ4^;eKcDZ4^;fKcDY4^;fKcDY4];fKeDY4\\;fKdDZ4];eKdDZ4\\;fKeDY4];eKcD[4`6AT9OoUQ4"}}, {"image_id": 18, "category_id": 1, "bbox": [320.0, 87.0, 114.0, 357.0], "score": 0.9259598851203918, "association_id": 1, "light": [-1.7284009456634521, -2.432504415512085, 1.5578043460845947, 2.270106077194214], "segmentation": {"size": [572, 1024], "counts": "kjb5?\\a04QALo;7hC7PG8I6J7J5M3M3M2N3M2N2N2O1N2N2N101N2O1N2N1O2O1N3M2N2N2N1O2M3N1O2N1O2N1O2N1O2O0O2N1O2N1O2N100O2O0O101N100O2O0O101O0O2O0O2O0O2O0O2N2O1N2N101N2N2N2N2N1O2O1N2N2N101N2O0O2O1N2O0O2O001N101N101O000O2O0O10001N100O101N1O100O1O2O0O1O1O100O2O0O100O100O2O000O10000O10001O000O101O0000001O0O2O00001O0O2O001O1O001N2O1O001O1N101O001N101O000O2O00000O2O000O100O101N100O100O100O2O0O10000O10001N10000O101O000O10001O0O1000001O0O10001O0O2O00001N101O0O2O0O2O001N1O101N100O1O2O0O101N100O10001N100O10001O0O100000000O100000000000000000000O10000000001O000000000O1000000000000000000O10000000000O10000O100O10000O100O1O100O1O100O100O100O100O10000O10000O10000O1000000O10000000000000000000000000000000000000000000000000000O1000000000000000000000000000000O100000000000000O10000000000O10000000000O100000000O1000000O100000000O1000000O1000001O0O1000000O101O00000O10001O000O1000001O000O10001O0000001O0O101O001O001O1N101O1O1O2N1O1O1N3N1O2N2N2N2N1O1N3N1O1O1O1O1O001O1N2O001O001O001O001O001O1O1O1O1O1O1O1O2N1O2N1O2N2N2N1O1N2O2N1O001O1O1O1O001O001O1O001O00001O001O001N101O1O001O001N101O001O001N10001O001N10001O000O2O00001N10001O0O101O00001O001O001O001O001O001O1O001O00001O001O00001O00001O0000001O0O10001O000000001N10000O101O000O101O00000O2O00001O0O101O001O001N101O001O001O0O101O001O0000001O000000001O00000000001O0000000000001O0000000000001O000000000000001O00000000001O000O10001O00001O0000001O00001O001O00001O001O001O001O00001O001O000000001O00000000000000000000000000000000000000000000001O00000000000000000000000000000000000000001O000000000000000000000000000000001O00000000000000000000000000000000000000000000000001O0000000000000000000000000000000000001O00000000000000001O00000000001O0000001O0000001O0000001O00001O001O00001O001O001O00001O001O00001O001O001O001O001O001O001O001O1O0O2O1O001Oc0]O4L4L3M3M3M2N1fCk^O`:V`0nCd@_1[O_:o?ZDa@T1E_:h?gD\\@h01]:a?UEW@;=]:Z?cEQ@Nh0]:T?aG`@]8]?h3M3N2N2O1O1O1O1O1O100O100O10000O10VFe@h3Z?ZLQAZ3o>hLPAW3o>lLPAS3P?PMn@o2Q?TMm@l2S?WMk@h2T?[Mk@d2T?_Mk@`2U?bMi@^2V?eMi@Z2V?l600O1O1O100O100O100O100O01000O100O10000O10000O1000000O10O10O100O100O100O1O100O1O1O00100O1O100O100O1000000O100000000O100000000O1000O100RJeAPK[>Q5oAdJP>_5WBXJi=i5_BnIa=S6fBeIZ=]6eBbI[=`6dB_I\\=d6bB[I^=g6aBXI_=k6_BTIa=P7\\BoHd=X7VBgHj=j7fAUHZ>\\<0000000000000O10000000000O100000000O100000000O10000O1000000O10000O1000000O100000000O1O100O1O1O1O1O1O1O1O1O1O1K5E;E;O11O1O1O1O1O1O1O1O1O1O1O1O1O1O1O1O1O10O01O10O01O10O0100O010O10O10O10O10000O10O010O1O1O10O01O1O010O001O0010O0001O00010O000000000000010O0000000000000001O00000000000000000000001O0000000000000000001O0000000000001O00001O00001O00001O001O001O001O1O001O001O001O001O001O00001O00001O0000001O0000001O0000000000000000000000000000000000000000000000001O00001O00001O001O001O001O1O001O1O1O1O1O001O001O001O00001O00001O00001O0000001O00000O101O00001O00001O00001O001O001O1O001O1O1N2O001O1O0O2O0O2O000O2O0O2O0O100O2N1O100O2N100O101N101O0O101N101O0O2O1O001N2O1O1N2O1O1O1N100O2O001N1O101N1O101N1O1O2N1O1O101N1O100O2O0O2O1O1N101N3N1O1N3N1N2O1O0O2O1N101N101N101N1O2N1O2N2N2M3N2N2N3M2M3N3M2N101N2N1O2N2N1O2N1O2N1O2N2N2N2N2N2N3N1N2N3M1O2N2N2N1O2N1O2O1N1O2M3N2N1O3M2N2N3L4M2N2M3N2M3N2N2N1O2N2O0O2N2N2M3N2N3L5K6J5K6J6J4L4M3L3N2N3M2N2N1O2N3M2M3M4L3L8H9G9DSad2"}}, {"image_id": 20, "category_id": 1, "bbox": [227.0, 242.0, 615.0, 441.0], "score": 0.9999990463256836, "association_id": 1, "light": [-1.5223686695098877, -1.6767048835754395, 1.3363885879516602, 1.5367496013641357], "segmentation": {"size": [844, 1500], "counts": "Vgk58Tj01O0O2O00001O0000000O101O0000000000001O00000O1000000000000000000O2O00000000000000000000000O10001O000000001O0000000O2O00000000000O10001N1000000O2O00001N10000000001N1000000O101O0000001O0O10001O000000000O2O000O10000O2O00000O2O0000000O10001N10000O100O100O100O2O00000O1000000O10000O1N2N2L4O1O100O10000O1000000O10000O100N1M4H8N2O100O100O100000000O100000000000O1000000000O10O1000000000000000000O1000000000000000001O000000000000001O0O101O0000001O000000001O000O101O00001N101O0000001N10000000001O000000000000001O000000000000000000000000000000XXOmMWg0S2hXOnMXg0R2hXOnMXg0R2hXOnMXg0R2gXOoMYg0Q2gXOoMYg0Q2fXOQNYg0P2fXOPNZg0P2fXOPNZg0P2eXOQN[g0o1eXOQN[g0o1dXORN\\g0o1bXORN^g0n1bXORN^g0Q2^XOPNbg0]200000000000000000001O00000000000000000000000000000000000000000000O1000000000000O1000000000000O1000000000000000000000O10000000O10000000O1000000000000O10000000000000000000000000000O1000001O000000000oJjMlAV2n=XNjAh1o=lNdAT1S>7k@Io>b0l@^OS?g0i@YOU?k0j@UOT?o0i@QOWQ1cASOY>P1cAVOX>n0cAXOY>k0dAWOZ>[2M2M2O3M4L5Kf0ZOa0_O6J2N1O1O0000O1O1PO\\CcLeb5B_J>`5C_J=a5C_J=a5D^Jh5_OYJa0j5[OWJe0l5VOWJi0`;00000000000001O00000000001O0000001O0001O0000000000000000001O000000000010O001O1O00001O01O00000001O00000010O000001O0000001O01O01O000010O01O1O0010O00010O010O0001O0000001O0001O0001O0000001O00000O100000000000000000000000O0100000000O10000O10000O100O1O2L3M4NcWS6"}}, {"image_id": 22, "category_id": 1, "bbox": [169.0, 31.0, 288.0, 727.0], "score": 0.9999977946281433, "association_id": 1, "light": [-1.6605138778686523, -2.099789619445801, 1.4732459783554077, 1.9300251007080078], "segmentation": {"size": [768, 621], "counts": "m^o32ng00O101N10000O10001O000O1000000O1000000O10000000000O100000000O10000000000O10000O10000000000O100000O010000000000O10000O1000000QBKR46iK:l3FPLf0h3ZOULo0e3QOXLW1c3iNXLa1c3`NWLi1d3XNXLP2d3PNXLW2e3iMWL]2g3cMULb2j3^MRLh2l3XMQLl2n3TMPLo2dLbLd2`0e0R3bLcLh2;e0T3_LfLj26e0W3\\LhLn21d0Z3ZLiLQ3Md0\\3VLlLU3Hc0_3TLmLX3Dc0`3SLoLY3Ac0b3RLPMY3^Od0d3QLPMZ3\\Oc0h3PLnL\\3ZOc0k3nKmL^3XOb0P4kKlLa3TOb0U4iKjLc3RO`0^4eKcLi3oN?g4aK^Lm3kN`0o4[K[LR4fNa0W5VKWLV4bNb0^5RKSLZ4_Nc0b5nJSL]4[Nd0f5jJSL`4WNe0k5dJSLe4RNg0o5]JTLj4mMi0T6kI_LY5]Mk0T:ROlEn0W:oNiEQ1[:kNeET1_:iNaEW1a:gN_EY1c:eN]EZ1f:dNZE[1i:cNWE]1j:bNVE]1m:aNSE^1Q;_NnDa1U;]NkDb1Y;\\NfDc1^;ZNbDe1b;XN^Df1f;XNZDf1i;YNWDe1m;YNSDe1PHPB2V>OiAL\\>4dAG`>:`A^Of>d0ZASOn>n0RAhNW?Y1i@aN[?a1e@\\N\\?f1d@WN]?k1d@RNd=QNiBP4BmMd=n3\\BPLc=S4]BmK_=W4aBhK\\=\\4dBcKY=b4fB]KV=h4jBXKR=l4nBSKP=P5PCoJoV4oAkKS>Q4mAPLX>k3gAXL\\>b3dA`L[?_2f@dMa`0R1^_OSOZa00g^O4`b0aN`]Ob1mb0mMS]OW2Pc0bMQ]O`2Rc0ZMn\\Oi2Tc0SMk\\OS3Tc0hLl\\Ob3ob0YLQ]OS4gb0jKY]OR5\\b06J5K3_C[Ka5h4XJ_Kf5c4TJbKl5_4oIdKP6`4jIdKU6_4iFRKEc0`9`4^FXKMeC^Oa<:eCBb<5dCFgo5XARJg>n5XAUJf>k5ZAVJe>j5[AWJc>j5]AWJb>i5]AXJc>h5]AXJc>h5]AXJc>h5]AYJb>g5^AYJb>g5^AYJb>g5^AYJb>g5^AZJa>f5_AZJa>f5_AZJa>f5_A[J`>e5`A[J`>e5`A\\J_>d5aA\\J_>d5aA]J]>d5cA]J\\>c5dA]J\\>c5cA_J\\>a5dA_J\\>a5dA`J[>`5eA`J[>`5eA`J[>`5eAaJZ>_5fAaJZ>_5fAaJZ>_5fAbJX>_5hAaJX>_5hAaJX>_5hAaJX>_5hAaJX>_5hAbJW>^5iAbJW>^5iAbJW>^5iAbJV>_5jAbJU>^5kAbJU>^5kAbJU>^5kAcJT>]5lAcJT>]5lAcJS>^5mAcJR>]5nAcJR>]5nAcJR>]5nAdJQ>\\5oAdJQ>\\5oAdJP>]5PBcJP>]5PBdJo=\\5QBdJo=\\5QBdJo=\\5QBdJo=\\5QBdJo=\\5QBdJn=]5RBdJm=\\5SBdJm=\\5SBdJm=\\5SBdJm=\\5SBdJm=\\5SBeJl=[5TBeJl=[5TBeJl=[5TBeJk=\\5UBdJk=\\5TBfJk=Z5UBfJk=Z5UBfJk=Z5UBfJk=Z5UBfJk=Z5UBgJj=Y5VBgJj=Y5VBgJj=Y5VBgJj=Y5VBgJj=Y5VBgJi=Z5WBfJi=Z5VBgJj=Y5VBgJj=Y5VBhJi=X5WBhJi=X5WBhJi=X5WBhJi=X5WBhJh=Y5XBgJh=Y5XBgJh=Y5WBhJi=X5WBhJi=X5WBhJi=X5WBhJi=X5WBhJi=X5WBhJi=X5VBiJi=X5WBhJi=X5WBhJi=X5WBhJi=X5WBhJi=X5WBhJi=X5VBiJj=W5VBiJj=W5VBiJi=X5WBhJi=X5WBhJi=X5WBhJi=X5WBhJi=X5WBhJi=X5WBhJh=Y5XBgJh=Y5XBgJh=Y5XBgJh=Y5XBgJg=Z5YBfJg=Z5YBfJg=Z5YBfJf=[5ZBeJf=[5ZBeJf=[5ZBeJe=\\5[BdJe=\\5[BdJe=\\5[BdJe=\\5[BdJd=]5\\BcJd=]5]BbJc=^5]BbJc=^5]BbJb=_5^BaJb=_5^BaJb=_5^BaJb=_5^BaJa=`5_B`Ja=`5_B`Ja=`5_B`J`=a5aB^J_=b5aB^J_=b5aB^J^=c5bB]J^=c5bB]J^=c5bB]J]=d5dB[J\\=e5dB[J\\=e5dB[J[=f5eBZJ[=f5eBZJ[=f5eBZJZ=g5fBYJZ=g5fBYJY=h5hBWJX=i5hBWJW=j5iBVJW=j5iBVJV=k5jBUJV=k5jBUJU=l5kBTJU=l5kBTJT=m5lBSJS=n5mBRJR=o5nBQJQ=P6PCoIoP1a=V2RBjL=P1a=V2QBkL=o0c=V2PBjL>P1c=T2PBlL=P1c=T2oAmL>o0c=S2PBnL=o0d=R2oAoL=o0d=Q2oAPM>o0d=o1oARM=o0e=m1oATM;P1g=i1oAXM:o0h=g1oAZM9n0j=f1nA\\M8n0k=d1nA^M7n0l=a1nAbM5n0n=]1oAfM2m0P>X1QBlMNm0R>S1RBQNLl0S>P1RBUNKk0T>m0RBYNIj0W>k0PB\\NHj0Y>g0PB`NEk0[>d0nAeNEh0^>a0jAkNGe0`>>iAnNFd0b>=hAPODe0e>9hAROBf0f>6iAVO_Od0j>4hAXO]Oe0l>0hA\\O[Oe0n>LiAd1Y>WNjAh1Z>jMPBW2S>]MVBc2Y`00000O100000000O1000000O10000O10O010000O10000O100000000O1000O1000O10000O100O0O2L4I7O1O1O100O100O10O010000O2O000O10000O100O2O0O1O1O1O2N1O1O2N2N101O1O0O2O001nMm\\Oj1[c0O0O2O1O1O1[Na\\O[1hc002N1N2mNo[Oj0[d0M3YOc[O42IoWb1"}}, {"image_id": 24, "category_id": 1, "bbox": [50.0, 555.0, 104.0, 118.0], "score": 0.9999998807907104, "association_id": 3, "light": [-1.319387674331665, -2.491478204727173, 1.1577484607696533, 2.3572685718536377], "segmentation": {"size": [768, 513], "counts": "SSV1U1hf06E?H3J6L4K4L4M3L4M2J6M4I6N2N4M2N1O2N1O1O100000000000000000000000000000000000iLi[Oe2Wd0YMn[Od2Rd0ZMT\\Ob2lc0]MV\\Ob2jc0]MZ\\O_2gc0`M[\\O_2fc0_M]\\O_2dc0\\Mb\\Ob2_d0N102N5K2N5K3M3M4^OkYOQOaf0MTZO4lf00000O1000000000000000O100000000000O100000000O2O00000000000O10O11O0O10O100000O1001OO101O000O2N^c\\8"}}, {"image_id": 24, "category_id": 1, "bbox": [318.0, 505.0, 102.0, 96.0], "score": 0.9999983906745911, "association_id": 7, "light": [-1.20527184009552, -2.8900034427642822, 1.1181498765945435, 2.645603895187378], "segmentation": {"size": [768, 513], "counts": "\\Q_74gg0>Bo0TO4K3M4M3M2N2O1O2N1O1O1M3N2O1K5N2N2O100O1O100000000O10000O1O1000000O10000000000001O00000cMZ[ODGM0b1od0hNR\\OS1mc0jN\\\\OP1dc0oNb\\Ol0^c0ROf\\Ol0Zc0QOU]O4PN2ag000000O1001O00000000000000000000001O0000000O10000000000000000000001O000000000O101O000O2O000000000000\\UU2"}}, {"image_id": 24, "category_id": 1, "bbox": [2.0, 333.0, 70.0, 85.0], "score": 0.9931771755218506, "association_id": 5, "light": [-2.553144693374634, -1.4721717834472656, 2.452892303466797, 1.310878038406372], "segmentation": {"size": [768, 513], "counts": "^j1i0Vg05L1O1O2bYOVObe0o0PZO\\One0`1K6TZOPN\\e0Z2001O0O3N2M4M3M3N0N111N1O1O2N1O2M2O2N2M3N2N4M3M5J:F>B6J01O000000000001O00O2O0000000001O0000001O00001O01O000001N10000000000OS[Z:"}}, {"image_id": 24, "category_id": 1, "bbox": [196.0, 308.0, 63.0, 70.0], "score": 0.9999804496765137, "association_id": 4, "light": [-0.9560285210609436, -2.744659423828125, 0.8865196108818054, 2.463252305984497], "segmentation": {"size": [768, 513], "counts": "QZc4R1if0:J4K5L4L4L4K5M00000000000000000002N2N2N2N1O2N003M1O2N2N1O2N2M3VOeYOJaf0MfYOJ`W20j_N2O00000000000000001O000001N1000001O000000000000000O]Tn5"}}, {"image_id": 24, "category_id": 1, "bbox": [0.0, 424.0, 123.0, 112.0], "score": 0.9999997615814209, "association_id": 1, "light": [-0.55742347240448, -3.1450366973876953, 0.3948069214820862, 2.9922142028808594], "segmentation": {"size": [768, 513], "counts": "k>:`g0oYO0he01RZO_OFm0le0IWZO`0fe0o0N1O1O1O1O1O001O001O1O0002OO01O1O010O100O1O1O1O1O00001O2N001O1O001O1N2N5O1L3EeYOkN^f0j0jYOVOXf0?PZOBWg0000000000000000001O0000000000001O0000000000001N100000000000000O2O0000\\Yb6"}}, {"image_id": 24, "category_id": 1, "bbox": [303.0, 350.0, 50.0, 70.0], "score": 0.9961066246032715, "association_id": 15, "light": [-1.6078553199768066, -2.5851762294769287, 1.5609209537506104, 2.4509689807891846], "segmentation": {"size": [768, 513], "counts": "^cS73ig0b0A9F6J9YYOeNO3Pf0k1L4N001O000000000001O1O3M4L3M3M3GeYOhN\\f0Q1iYOoNhf0:]YOG^g000000001O00000000000000001O000000000000000000000000Pcg3"}}, {"image_id": 24, "category_id": 1, "bbox": [349.0, 288.0, 53.0, 55.0], "score": 0.9995363354682922, "association_id": 12, "light": [-1.7765514850616455, -2.0906429290771484, 1.7170817852020264, 2.0046186447143555], "segmentation": {"size": [768, 513], "counts": "aQV88fg01O5I4O100O002M3N3L2O2O1O0010O00]YOTOSf0l0aYORO28]f0k0aYOUO_f0V11O1O2N1O2N1O2NWYOlNhf0Q1YYOoNif0o0WYOQOkf0l0UYOUOPg0f0PYOZOUg0OjXO162MNig01O000000000000001O00000001O0O1000001O0000\\mb2"}}, {"image_id": 24, "category_id": 1, "bbox": [436.0, 324.0, 75.0, 97.0], "score": 0.9976018667221069, "association_id": 14, "light": [-0.48288920521736145, -2.9619197845458984, 0.4435770809650421, 2.786979913711548], "segmentation": {"size": [768, 513], "counts": "h[W:2c02[f01TYO10O71HMif00YYO3N251gf0HXYO?MKjf0HWYOj0jf0WOTYOi0mf05O1O0L6O0POhNU[O\\1hd0hN_ZOM>_1Se0iNmZOX1Qe0iNoZOW1Qe0jNmZOW1Se0kNjZOW1Te0iNlZOX1Te0hNiZO[1We0fNfZO\\1Ye0g0OOiZO`MPe0_2Q[ObMnd0^2R[ObMnd0Z2V[OgMjd0T2Z[OlMfd0R2\\[OnMfd0m1\\[OUNfd0d1^[O\\Ned0^1^[ObNbd0\\1`[OdN`d0Z1b[OfNfd0l0`[OUObd04R\\OLmc04T\\OLlc03T\\ONmc01S\\OOnc0OS\\O1mc0OS\\O1nc0LS\\O4me0000000002O1N1O0000000001O001N10001O0000000000000O101O0000000000001O1OPS1"}}, {"image_id": 25, "category_id": 1, "bbox": [63.0, 50.0, 556.0, 574.0], "score": 0.9984437227249146, "association_id": 1, "light": [-1.443637728691101, -1.5681229829788208, 1.2444041967391968, 1.454077124595642], "segmentation": {"size": [683, 1024], "counts": "]`Z1`0id07J4L3M2O2M2N2OO1O1O1O1N2O1O1O1O1O00100O100O10000O2N2O1N2N3M2JPh:JZXE3M4L5K4L4f[OG[c0<`\\OG`c0;Z\\OJdc0o001N100O1O100O01000O01000O01O1O100O01000O100O010O1O001O001O001O010O0001O10O010O010O0001O00O1N2N2O1O100010O010O01000O010O010O0000000O1000010O0010O0100O010O001O000000000000001O0010O01O10O01O1O00001O0O1O01000010O010O010O010O10O0010O00O00001O1O10O100010O010O01O010O001O0O100O1001O01O01O01000O010O1O01O01O000O100001O01O01O10O10O010O10O0001O0000O101O0O110O001O10O010O01O001O00O1M2N3O10O11O00010O0100O010O0010O0000OO2N2O1O2O001O010O10O010O010O01O0000N2O1O1O1000001O010O010O010O01O000000000001O010O0010O010O010O0010OO1O001O1O101O001O010O010O10O0100O001O000000001O000010O010O010O010O01O000O1O1O1N11001O00010O010O010O010O0000000O2O000000000010O001O0100O0O2O1O00100O1O010O10000O10O11N100N2N3M2N2N3L3L5MjmU15QRjN4M2N2N1N3WJ_OcFe0[9^O`Fe0_9]O^Fg0`9[O[Ff0g9\\ORFh0n9ZOnEh0S:YOkEg0V:YOhEg0Z:ZObEb0e:^OYE`0k:@SE`0o:AoD>S;BiD?Z;AdD?^;B_D?b;B[D?f;BVD?l;BRD=PWcPOQAR1P?nNo@R1R?oNk@R1V?oNh@Q1X?QOe@Q1[?POb@Q1^?SO]@n0c?UOX@m0i?SOU@o0k?SOQ@n0P`0WOi_Oj0X`0YOc_Oi0_`0VO]_Ol0e`0TOV_Oo0n`0YOc^Oj0_a0`12N3M4L3N1M7J4L2N2N3M2O0O01000O10N10001N100O10O10O01N2N2O100O1O1dNY]O3hb0KQ^OYOTb0d0S^OTOQb0j0Y1O1O1O2N1O3J6Klo]8"}}, {"image_id": 26, "category_id": 1, "bbox": [678.0, 168.0, 325.0, 654.0], "score": 0.9999982714653015, "association_id": 2, "light": [-1.2828845977783203, -2.9883363246917725, 1.0991482734680176, 2.74814772605896], "segmentation": {"size": [941, 1024], "counts": "ki_c02Ym03O00001O000O2O00000O101O00000O1000000O100N2O100O1O1O10O100O10000O0100000O10000000000O1001O0000000000000000010O000000000000001O000001O0000eG=lBCoeIVAY6_>RJaAn5V>[JkAd5P>`JQB`5l=cJVB[5h=gJYBX5d=kJ\\BU5a=nJ`BP5\\=UKdBk4W=YKjBg4P=`KoB`4lf0mAZOi=P1WBPOf=S1[BlNc=V1]BjNa=X1_BhN`=Y1`BgN_=Z1aBfN^=[1bBdN^=]1bBcN]=kLUBm0?W2[=`LhBT1M\\2Z=ZLSCW1C_2Y=WL[CW1\\Ob2X=TLbCX1VOd2W=RLhCX1QOf2V=QLlCY1nNe2U=PLPD[1kNe2T=nKUD\\1gNf2R=mK[D\\1cNg2Q=kK_D^1`Ng2P=iKdD_1\\Nh2n\\5kAX2Q>hMnA^2m=bMSBb2j=^MUBg2f=YMZBi2d=XMZBk2d=VM[Bl2c=`600O001O001O001O001O0001O0001O01O00001O0010O0000000O1000000000000O10000000000000000000000O100000000`KZ@XKg?d4b@WK^?f4j@UKV?h4RARKo>j4[APKf>k4bAPK_>k4kAoJW>m4RBlJo=Q5ZBhJh=T5gB^J\\=_5VCPJk`HiA]7]>`HcA^7b>_HSA^MCQ:a?\\Hk@eMDm9g?YHd@kMEj9m?WH]@QNEg9S`0THW@WNEd9Y`0RHo_O]NFa9``0nGh_OdNF^9f`0lGa_Oh8b`0UG]_Ol8f`0QGY_OP9l`0lFS_OT9Ra0\\Ff_OW9b`0kEW@R:da0N1N3N1O1O0000001O00000000001O0O10O0100O1O100O1O1N2N1N3M3M2OVLUHVBi7\\fMm@Y2U?m52N200O2N3M3M3L4L4L4M4L4M3M3N2M3N1O2N1N2O2N1O002N2M3N3M4L3M2N2N2N1O0000000000000000000000000000000000000000O1O1O1O1O2N1N2N2N2N3L5L4K5L5J8I6I7I6J5L5J7IR1[I`A\\LP?m2jA`Le>i2eBULa=b3PCoKW=i3WCjKobKeAZ4[>eKhAY4X>fKjAX4W>gKmANOj2T>XMbCa2_<]MiC[2XEfDg0aLBP?@bDj0bLCRc07S]ODSc05T]OEQc06V1Ka\\`<"}}, {"image_id": 27, "category_id": 1, "bbox": [646.0, 301.0, 220.0, 212.0], "score": 0.7627537250518799, "association_id": 4, "light": [-2.8714189529418945, -1.601693868637085, 2.78662109375, 1.4349607229232788], "segmentation": {"size": [683, 1024], "counts": "d[_=6eb0Ki]O2Y1?a`0g0k^O@Qa0f0i^O\\OSa0n0b^OXOTa0d2N2N2N3L3L4M3N2N2K5K5M3M3L4L4M3N2M3N2N2N2O1N2O1O1O1M3K5L4N2O1M3N2N2O1N2O1N2O10000O1000000000000000000000000000000000000000000000000000O100O100O1N2N2N2O1N2N2O1N2N2N2hJi@[4X?bKm@Z4U?dKn@Z4S?eKPAW4R?hKQAT4Q?kKRAR4o>nKRAP4o>oKSAo3o>oKUAm3l>QLYAj3i>TL[Ah3h>UL\\Ah3f>TL`Ag2aNXNda0c1b^OcM08ba0Q2n^OkMWa0P2m^OiMZa0S2V1E;F7JU:BiEf0Q:[OlEk0P:UOoEo0n9QOPFS1o9lNoEX1o9hNoE]1n9cNoEb1P:]NfEn1Y:RNaEV2]:iM`E]2_:bM^Eb2b:mJ^Dm1i0_3h:]JkDn17l3g;QLYDQ4g;nKWDU4i;jKVDX4j;gKTD[4n;dKlCa4V<_K`Cj4`5kD0RL22nDORL2:Nh>OlD0TL191ab0MX]O00074oa0Kj]O30Li07\\a0Li]O3Y13m`0Kh]O3[12Zc01O1O1000000000000000000000000000O100000000O2O000O101N2O1NbYl7"}}, {"image_id": 27, "category_id": 1, "bbox": [601.0, 307.0, 348.0, 235.0], "score": 0.9999934434890747, "association_id": 3, "light": [-2.799510955810547, -1.7192256450653076, 2.673008441925049, 1.5054742097854614], "segmentation": {"size": [683, 1024], "counts": "n[a<110Ve04O001O0O101O00000O2O000000001O000CGh[O9Wd0Hi[O8Wd0Ih[O7Xd0Ih[O7Xd0Ih[O7Xd0Ih[O7Wd0Ji[O6Wd0Ji[O6Wd0Ji[O6Wd0Ji[O6Wd0Jj[O5Vd0Kj[O5Vd0Li[O4Wd0Kj[O5Vd0Kj[O5Wd0Ji[O6Wd0Ji[O6Yd0Gh[O9ed001O000000000000000001O0001O00000000000001O0000000000000000000O2O000000000000000000000000000000000000000000001O0000001O00001O00000000001O0000001O01O000001O000000001O01O000000000001@DP\\O;oc0Ho[O8Qd0HP\\O7Pd0Jo[O6Qd0Jo[O6Pd0LP\\O3Pd0No[O2Qd0No[O2Qd0On[O1Rd0Oo[O0Qd00o[O0Qd00o[O0Qd01o[ONQd02o[ONQd02o[ONQd02o[ONQd02o[ONQd02o[ONQd02o[ONQd03n[OMRd03o[OLQd04o[OLQd04o[OLQd04o[OLQd04o[OLQd04o[OLQd04o[OLQd04o[OLQd03P\\OMPd03P\\OMPd03P\\OMPd03P\\OLQd04o[OLQd04o[OLQd04n[OMRd03n[OMRd03n[OMRd03n[OMRd03n[OMRd02o[ONQd02o[ONQd02o[OMRd03n[OMRd03n[OMRd03n[OMSd02m[ONSd02m[ONSd01n[ONSd02m[ONSd02m[OMTd03l[OMTd03l[OMTd03l[OLUd04k[OLUd04k[OLUd04l[OKTd05l[OJVd04l[OKTd05l[OIVd07?0000000000000000000001O000000000001O00000001O0000000000001O01O000000000000010O000000000000001O000001O0001O000000000000000000000001O000O2O001N102Mab2\\1i[M]1kN6K4K4K5J5J7L3N2M3N2N2L4L4M3M3N2O1M3K500O1O100O1O1O1N2H8L4N2M3L4N2N2O1O1O1O1N2N2O100O1O1O1O1N200O1O10000000O10000000000`NfAnK[>k3oARLQ>l3WBnKi=Q4[BmKd=f3ZAlKX1:_=f3QCWLP=a3a2L4O1N2Nk@eL^SO\\BIGQ1l=YOaB[OJZ1e=]OcBQOMa1_=@\\D?b;F]D7b;N\\D1c;6XDaNlLn0k>i0fDlN[;Y1eDbNZ;`1iD\\NV;f1QBkMj1W6N2O1O1O1N10M3L4O2O001NcAXI[>g6eAZI[>d6gA]IX>b6iA^IW>`6jAcIT>^6kAdIS>\\6mAeIR>[6nAeIR>[6nAeIR>Z6oAfIQ>Y6PBgIP>X6QBiIn=V6SBjIl=W6TBiIl=W6TBiIl=W6TBiIl=W6TBiIl=W6TBiIl=V6UBjIl=S6VBnIi=Q6XBoIh=Q6XBoIh=P6YBPJg=P6YBPJg=P6ZBoIf=Q6ZBoIf=P6[BPJe=n5]BRJc=l5_BTJb=i5`BWJ`=g5bBYJ_=e5bB[J_=b5cB^J^=Y5jBgJY=l2XBSNk0QOP=NcAY2W1hMh01n\\d0Dd[O;\\d0Ed[O;\\d0Ed[O;\\d0Ed[O;[d0Fe[O:[d0Gd[O9\\d0Gd[O9\\d0Ge[O8[d0He[O8[d0He[O8[d0Id[O7\\d0Ie[O6[d0Je[O6[d0Je[O6[d0Je[O6[d0Je[O6[d0Je[O6[d0Je[O6[d0Jf[O5Zd0Kf[O5Zd0Le[O4[d0Le[O4[d0Le[O4[d0Le[O4[d0Kf[O5Zd0Kf[O5Zd0Kf[O5Zd0Kf[O5Zd0Kf[O4[d0Le[O4[d0Ld[O5\\d0Kd[O5\\d0Kd[O5\\d0Je[O6[d0Jd[O7\\d0Id[O7\\d0E_[O159]d0F^[O159]d0F_[OO5;\\d0F_[OO5;\\d0Fg[O:Yd0Fg[O9Zd0Gf[O9Zd0Gf[O9Zd0Gf[O8[d0He[O8[d0He[O8[d0He[O8[d0He[O7\\d0Id[O7\\d0Id[O6]d0Jc[O5^d0Kb[O4_d0La[O3`d0M`[O1bd0O^[O0cd00<0000001O000000000000000000000000000000000000000\\WZ4"}}, {"image_id": 27, "category_id": 1, "bbox": [390.0, 215.0, 93.0, 119.0], "score": 0.9072425365447998, "association_id": 5, "light": [-2.2073888778686523, -1.4736545085906982, 2.1571242809295654, 1.3633825778961182], "segmentation": {"size": [683, 1024], "counts": "[]T81Ye03M3kZOMhd0`0L3M3YN[Od^Oi0Xa0ZOd^Oj0[a0WO`^On0_a0XOY^Ok0ea0WOW^Om0fa0WOT^On0ja0UOP^OP1na0SOe]O[O2d1Yb0V1N101M2O2O001O1N10001N1000001O0O10000O10001O000O101O02N1O00O1O21N2N3M00O11O4L2O6I1O1O3M3M3M3M2N1O1O2N5K2O0O2N2N3M4L4_Oa\\OoNmc0?V\\OAlc0:W\\OFPd0OT\\O1cd010O000001O000001O000O20OO10001O1Od`X;"}}, {"image_id": 28, "category_id": 1, "bbox": [342.0, 300.0, 57.0, 168.0], "score": 0.9570960998535156, "association_id": 1, "light": [-1.621281385421753, -2.5060319900512695, 1.5868490934371948, 2.3784844875335693], "segmentation": {"size": [768, 1024], "counts": "hjP8c0[g04K5M2N3L4L4M6K3M4K8H7G6L5U\\OaMla0e2m]O^Mna0m2k]OTMQb0T3h]OnLVb0W3b]OnL[b0X3_]OkL`b0[3X]OhLfb0a3o\\OcLPc0W4O1O100O2O0N2O1O101O0O10000O10TO^]OZLcb0g3Y]O[Lhb0^42lJZ]Oj4Qc0M3M1lMm\\OYOTc0>W]O_Ojb0=\\]O\\OXObN^c0o1]]O]OUOcNac0m1^]O]OROeNac0h1g]O^OhNjNbc0e1W^OQOXNZObc0c1`^OjNnMCbc0c1e^OcNjMKWd0b0c^O_Ond010O2O001O_Yd>"}}, {"image_id": 28, "category_id": 1, "bbox": [259.0, 302.0, 393.0, 287.0], "score": 0.9980900287628174, "association_id": 2, "light": [-1.6788790225982666, -1.896336317062378, 1.5737335681915283, 1.7369645833969116], "segmentation": {"size": [768, 1024], "counts": "\\iR61og0001O0000000000001O000000000000001O0000000000001O00001O0000000000001O00000000000001O01O01O000000010O000000000001O000001O000000000000000001O0000010O00000000001O00001O00001O0000001O0001O0001O000000001O0001O00000000000001O00000001O00000000000000000000000000000000000000000000000000000001O00000000000001O000000000001O0000000000000000000000001O0000000001O000001O0001O0001O000001O00000001O0001O00000001O00000000001O01O0000000001O00000000001O0000000000000000001O000000000000000]N2T[ONid09S[OGld0R[OBnd0>R[OBnd0>R[OBmd0?S[OAmd0?S[OAmd0?S[OAld0?U[OAkd0?U[OAjd0?X[O@gd0`0Z[O@fd0`0Z[O@ed0`0\\[O@cd0`0_[O_Oad0a0_[O_Oad0`0`[O@_d0a0a[O_O_d0`0b[O@^d0`0b[O@^d0?d[O@\\d0`0d[O@[d0`0f[O@Zd0`0f[O@Zd0?h[O@Xd0`0h[OAWd0>j[OBVd0>k[OAUd0?k[OATd0?m[OASd0?m[OARd0`0n[O@Rd0`0o[O_OPd0a0Q\\O_Onc0b0R\\O^Olc0d0T\\O\\Ojc0f0W\\OYOfc0i0[\\OXObc0j0^\\OVO`c0k0a\\OUO^c0k0c\\OUO]c0j0d\\OVO[c0j0g\\OUOXc0l0h\\OTOWc0l0j\\OTOUc0l0l\\OTOSc0m0m\\OSOQc0n0P]OROmb0Q1S]OoNlb0Q1V]OnNib0S1W]OmNhb0S1Y]OmNgb0R1Z]OoNeb0P1\\]OPOcb0P1^]OPObb0o0_]OQO`b0o0a]OQO^b0o0c]OQO\\b0n0f]OROYb0n0i]OQO[>JXCU1_NQOW>MXCQ1cNROT>OVCo0hNROn=6WCg0lNSOl=>QC>TOTOhPOn`0e[OCZd0>f[OAZd0`0g[O]OZd0d0g[OXO[d0h0g[OPO^d0R1V12_YOmNSf0U1lYOmNSf0S1oYOjNRf0U1RZOgNoe06iYO63O`f0HfYO013[f0LYZONje02\\cf8"}}, {"image_id": 28, "category_id": 1, "bbox": [672.0, 412.0, 322.0, 180.0], "score": 0.8670398592948914, "association_id": 3, "light": [-0.7980889678001404, -2.5591981410980225, 0.6734708547592163, 2.5472850799560547], "segmentation": {"size": [768, 1024], "counts": "eah?2mg02O000000001O000000001O0000000000001O000000000000001O0000010O0000000000001O00000001O0001O0000000000000001O000001O00000000000000000000000000000000001O0000000000000001O000001O000000000000000001O000000000001O0000000000001O000001O00^KI[A7d>LZA4f>MYA3g>NXA2h>MYA3g>MYA3g>LZA4f>K[A5e>I]A7d>G]A9Uc001O000000000000010O0000000000000000000001O0000000001O00000001O0cMHS]O7mb0IS]O7mb0JR]O6mb0KS]O5mb0KS]O5mb0KS]O5nb0JR]O7mb0HT]O8lb0HT]O8lb0HT]O8Ze000001O000000000SKIRB6l=NRB2m=0RB1m=0RB0m=1SBOm=2RBNn=2RBNn=2RBNn=3QBMo=3QBMo=3QBMo=3QBNn=2RBNm=3SBMm=3SBMm=3SBMm=3SBMm=3SBMm=3SBMn=2RBNn=1SBOn=0RB1n=MSB3n=LRB4o=KQB5P>IQB7P>ESB;ib00001O000000000001O01O00000000000000000000001O0000000000000000000000001O00000000000000000000001O0000001O00001O0000VKJjA7U>KiA5V>MiA3W>NhA2W>OjA0V>1iAOW>1iAOV>3iAMW>3iAMW>3iAMX>2iAMW>2n_OIQO5Ra01l_OKRO5Ra0Od_OLcM2g13Ra0Oc_O5[OLVa0J__O<[OIgc07Y\\OIfc08Z\\OHfc08Z\\OHfc08Z\\OHec09\\\\OFdc0:\\\\OFcc0;]\\OEbc0<^\\ODac0=_\\OC`c0>`\\OC_c0d\\OB\\c0>e\\OA[c0?e\\OA[c0>f\\OBZc0=g\\OCYc0=g\\OCYc0\\6ZAgIe>_60001O000000000000000O100000001O0O1000000O100O1O100O2O0O10000O10000000000O1000000000000000010O000001O00001O001O001O1O001O001O00001O00000001O0000000000000O100000\\OaA]J^>d5bA\\J^>d5bA\\J]>e5cA[J]>e5cA[J\\>f5dAZJ\\>f5dAZJ[>g5eAYJ[>g5eAYJ[>g5eAYJ[>[61O0000000000001O001O00001O0000001O000000001O0000001O001O00001O1O1O1O001O1O001O001O001O1O1O4L5K2N1O1O1O1O001O1O2N4A[@iJ05j?m4`0L2M100O10O010O10O010O100O010O1O000001O000000000000000001O1N101O1O1VL]_Ok2d`0jLi_OS3X`0cLT@Z3Pa0N1O1O1N2O1O2M6K=B6K3J5L?@7J5J6SOS\\O2Vd0EdQi<"}}, {"image_id": 30, "category_id": 1, "bbox": [266.0, 240.0, 250.0, 98.0], "score": 0.9999999403953552, "association_id": 1, "light": [-2.8398337364196777, -1.5959200859069824, 2.7442312240600586, 1.4027007818222046], "segmentation": {"size": [450, 736], "counts": "kVe31Q>1O0O2O000O2O00000000000O2O0000000000000O10001O000000000O10001O0O100000000O2O000PODZD<`;L^D4_;3]DM];=_DC_;`0_DA`;a0_D@_;b0`D^O`;c0_D]O`;d0`D\\O^;g0aDYO];k0aDUO\\;R1`DnN^;W1_DiN`;Z1_DeN`;]1_DcN`;_1_DaN`;`1aD_N];T2N2N2O100O10DhDnMW;S2jDlMV;U2iDkMV;V2jDjMV;V2jDjMU;b201O0000000O100000000O10O10O100000_OnDRNR;_2000000000000O100000000000000000_OoDQNQ;o1oDQNQ;o1oDQNQ;o1oDQNQ;o1oDRNP;n1PERNP;n1PERNP;n1PERNP;n1PERNP;`20_OPEPNP;P2PEPNP;P2PEPNP;P2PEPNP;P2PEPNP;P2PEPNP;P2PEPNP;P2PEPNP;a20@PEoMo:Q2QEoMo:Q2QEoMo:b20000000000000000000000000EQEcMo:]2REbMn:_2QEaMo:i200000000000LQEUMP;j2PEVMP;k2PETMP;l230000001OO100O10000O2OkDVMR;m2001O0000001IkD_MU;g200001O001O1O000O101O1O1O001O001O0FbDPN_;Y22N2M2O0F[DWNf;h1ZDXNf;h1ZDXNg;g1YDYNi;e1WD[Nj;n11DUD^Nm;a1SD_Nn;`1RD`Nn;`1RD`No;_1QDaNo;_1QDaNP<^1PDbNP<^1PDbNQ<]1oCcNRElR8"}}, {"image_id": 32, "category_id": 1, "bbox": [742.0, 67.0, 273.0, 741.0], "score": 0.9999998807907104, "association_id": 2, "light": [-1.978847622871399, -2.1311981678009033, 1.8867312669754028, 2.0157694816589355], "segmentation": {"size": [858, 1024], "counts": "lo]c0d1Si0>C8H7I6K5K7I8G;E9G6I5K5L4L3N2N2N2N2N2N2a^OeK\\<]4_CPLXgMWBV2k=cM]B[2d=\\MfBa2\\=XMkBf2W=VMmBi2U=SMnBk2U=QMnBm2V=nLmBP3V=mLkBQ3Y=kLjBR3Y=kLiBS3Z=jLhBS3\\=iLgBU3\\=gLgBW3\\=cLiB[3Z=aLiB^3Y=^LjBa3W=]LkBb3W=\\LjBc3W=[LkBe3V=XLlBh3U=ULmBk3S=QLQCo3P=lKTCS4n9QAHl>:TAFj>;VAGg>;YAEd>>\\AD_>?aABW>d0jA]Oo=i0QBYO4aLl:[4oDWOCQMV;m3WETOiNjMi;U3_Em1\\:VNdEk1X:XNhEj1T:WNlEk1P:XNPFj1j9ZNVFh1b9^N^Fe1Y9`NhFc1P9bNoFb1k8aNUGa1g8aNYGa1c8aN]G`1`8aNaG`1S3fGb0l6[L_1j2UHa0^6eL^1_2jH00001O3M2N00000001O00001O0N3IXj6"}}, {"image_id": 32, "category_id": 1, "bbox": [26.0, 134.0, 288.0, 601.0], "score": 0.9999999403953552, "association_id": 3, "light": [-1.1733837127685547, -2.9392354488372803, 0.9803947806358337, 2.795403480529785], "segmentation": {"size": [858, 1024], "counts": "[Rf0=[j07I5J5K3M4L3N3M3M2N3N1N3M2O1M3N2M3N2O1N2O0010O0000O10O1OO4L3N2M4M2fZOnMka0S2P^O[Nea0h1U^O`Nga0e1Q^OcNia0e1k]OfNma0e1c]OlNQb0l5RO=C6K3M4M4L4K5L2WCcFP8`9lGdFR8^9jGfFT8\\9iGeFW8]9eGeF[8_9`GcF_8a9[GaFe8a9WGaFWN\\Of8U:nHbF[N[Of8U:jHdF^NYOg8T:hHeFaNWOf8V:eHfFdNUOg8W:aHfFhNSOg8Y:]HfFkNROh8Z:YHfFoNPOh8^:RHeFUOnNi8_:nGeFYOlNi8a:hGgF^OiNj8c:`GiFFdNi8g:VGmF1\\Ni8k:\\F_Gk0fMi8W>VGjAj8V>VGiAk8V>VGjAi8V>XGjAh8U>YGjAg8U>[GkAd8S>^GnAb8m=cGSB\\8k=gGTBY8k=iGUBU8j=nGVBP8h=SHXBm7e=WH[Bg7d=\\H[Bc7d=`H\\B_7c=bH^B]7b=dH]B[7c=gH]BV7d=lH\\Be5j0kGkdJRA[5l>gJTAX5l>jJTAU5k>lJUAU5j>lJVAT5g>oJYAQ5d>QK]Ao4^>VKaAk4\\>WKeAi4Y>YKgAg4W>ZKiAg4U>[KkAe4S>]KmAc4P>_KQBa4j=jJRB^M4h7e=nJYBYM1j7c=PK^BSM0m7`=QKaBRMOm7^=RKeBPMLo7\\=TKhBmLLo7V=YKPCfLKQ8ioZOQM^a0e3S]OhMYb0g5D:F9H6N2N2N4L7IX2gM7J4K4K4L5K6J8G:G5K4L3M3N1O3M3M4^EmAU8e>eFQBY9j?N2N1N1O1O2O0O1O1O100O1O1N2N2N2dM__O\\Jd`0b5f_OmIc`0P6e_ObId`0]6m1O1000000O10aJTJhB3n0i5TRNmAQLYOm5k>VNfAlKAn5j>ZN_AfKJP6i>\\NWAbK5Q6e>`NPA`KhN\\AX1e>gNZAZ1g>dNYA]1h>bNWA_1j>VNk@aK`0Z6f>iMhAX2Y>fMgA[2Z>cMfA^2Z>bMfA^2[>oLg@RMm0P6]>lLg@SMl0R6^>jLf@TMk0S6_>iLf@SMj0V6a>fLe@SMj0X6c>cLc@UMi0Y6b>dLe@RMj0Z6a>dLf@QMi0[6`>dLh@PMh0]6_>dLi@oLh0]6^>eLk@mLf0_6^>eLl@kLf0a6^>cLn@kLd0b6]>dLo@iLd0d6]>cLPAgLd0f6[>dLQAfLc0g6\\>bLSAeLb0i6Z>cLVAbL?l6[>bLQB_3n=bLQB_3o=aLPB`3o=`LRB`3n=`LQBa3m=aLSB`3j=bLUB_3h=cLYB]3b=hL^BX3]=lLcBU3Z=nLfBR3W=QMiBo2U=SMkBm2T=TMlBl2Q=WMoBj2mV3o1YFVM`6j0\\3k1VFZM^6k0a3e1RFaM[6j0h3`1nEgMY6i0P4W1iEQNV6g0X4P1dE[NQ6f0c4d0]EjNn5b0j4R55VEAe5:Y5NTEM_54b5EUE3dj06WVOLch0:VWOMch0d0lVODjh0]1D:K5L4M6[IcMeD]2X;hMfDY2V;jMgDZ2U;hMgD]2W;dMhD]2V;eMoDW2o:kMPET2P;mMQER2n:nMm@AT1DjMj2U`0SNh@Fn0GRN`2X`0VNa@HS1CRNa2Z`0UN^@JT1ARNb2\\`0SN\\@NP1DPNa2c`0nMZ@11mNCV4R`0nLV@20QOCQ4W`0jLU@71QO]OQ4]`0gL`_Ol0f0^NUOU4e`0`L`_On0e0Y3k?jKe_Oh0=`3n?hKi_Oe05f3R`0fKc_Og0?a3n?hK]_OEG;R1V4j?jK]_OCJ:Q1@mNU4k`0]Lc_O_OE;R1^4f?gKh_O[OB;S1d4c?fKh_O[OC5X1i4]?hKf_OZOF0]1m4W?iKf_OZOFN_1o4U?gKh_O^OALa1Q5W?bKi_O1P1_4W?`Kg_O3S1\\4W?aKb_O7X1V4W?bK]_O<^1P4Z?ZK\\_Of0Z1Q4_`0oK`_OR4^`0oKd_Oc2eNnLea0a0j_OT2lNYMUa0g0S@U1XNaMg0a0o`0h0U@m0FZNU`0i0c@9_OmNn?j0aAWOfNNh?k0cDUO];j0eDUO[;l0eDSO\\;m0dDQO];P1eDmN\\;S1dDlN\\;U1eDiN`;S1`DkNj;n0TDROn;m0RDROP9md08F:G8H9C`JUA`5h>aJYA`5e>\\JaAd5]>WJjAi5l>000ROXJXBi5a=[JaBe5X=^JlBc5\\>2O1O1N2YNoIRDS6_=4M3QNgIkDZ6P;iIQEX6l:iIUEX6i:hIWEZ6g:cI]E^6g<1O1O1O1O1O1O1O100O1WMZIlFg6P9]IoFd6o8^IPGc6n8`IPGa6n8aIRG_6m8cIQG^6m8dIRG]6l8eISG\\6j8hITGY6h8kIXGU6e8oIYGR6e8PJ[GP6c8SJZGo5e8SJYGn5f8SJYGn5e8UJYGl5d8WJ[Gj5a8ZJ_Gf5^8]J`Ge5^8]JaGd5^8]JaGd5^8]JaGd5^8]JaGd5]8^JbGc5]8^JbGc5i0gHj4j1dIQNE`7j1oHc4c1iIY6b1[H]4_1PJW6a1^H[4]1TJV6_1_H[4\\1VJU6]1bHZ4\\1XJR6\\1eHX4]1[Jo5Y1gHX4^1_Jk5T1mHW4^1dJf5o0RIW4]1jJa5k0VIW2nNdM^2ZO_5f0ZIS2UOgMT2@]5c0]IP2\\OgMm1E[5b0]In1CdMh1LX5`0_In1g3bMj2?aIm1f3dMj2B=C9I7XOdNY]Oa1ab0h0I6G9D=VOi0H8L5M2N2O0O1N2N2MZNP@XNn?h1]@nMd?P2c@iM^?W2g@cM[?\\2i@_MY?`2l@ZMV?c2QAVMR?c25fMa@S2`?_NT@]1l?lNn_OS1S`0SOf_On0[`0UOa_Ok0a`0XO[_Oi0d`0[OW_Of0j`0]OQ_Oe0o`0k1O100O1O1O101O1O1O1O1O100oAjKl:W4kD[Ll:e3REbLh:_3WEdLg:]3VEgLh:Y3UEmLh:T3SETMi:l2jDhMo:Y2dDZNU;g1dDeNV;[1fDlNY2]Lh5h4jGQOV2`Lm5`4iGUOT2aLQ6\\4eGYOR2dLV6U4aG^OS2eLX6c8_IiGZ6h_GBc8=]GBe8<[GDg8;YGEh8:WGFl87TGIo85PGKR94mFLT94lFKU95kFKU95kFJV96jFIW97oFBR9>nFAT9>kFBV9>jFAX9=hFCZ9o^OBPa0?P_OAo`0a0P_O_OPa0a0m^OmNkNb0Wb0b0n^OlNkNb0Vb0d0n^OjNlNb0Ub0e0o^OjNkNa0Ub0f0P_O]Oo`0e0P_O[Oo`0f0Q_OZOn`0h0Q_OXOn`0i0R_OWOm`0j0S_OVOl`0l0S_OTOl`0m0T_OSOl`0m0T_OSOk`0o0T_OQOk`0P1U_OPOk`0P1U_OPOj`0Q1V_OoNj`0R1U_OnNk`0R1U_OnNj`0S1V_OmNj`0S1V_OmNi`0U1V_OkNj`0U1V_OkNj`0U1V_OkNi`0V1W_OjNi`0V1W_OjNi`0W1V_OiNi`0X1W_OhNi`0X1W_OhNh`0Y1X_OgNh`0Y1X_OfNi`0[1V_OeNi`0\\1X_OcNh`0]1X_OcNg`0^1Y_ObNf`0_1Z_OaNf`0`1Y_O`Nf`0a1Z_O_Ne`0b1[_O^Ne`0b1[_O^Nd`0d1[_O\\Nd`0e1\\_O[Nc`0f1]_OZNb`0h1]_OXNb`0i1^_OWNa`0j1__OVNa`0k1^_OUNa`0l1__OTN``0m1`_OSN``0n1__ORN``0o1`_OQN``0o1`_OQN``0P2__OPN``0Q2`_OoM``0Q2`_OoM_`0S2`_OmM``0S2`_OmM``0S2`_OmM_`0U2`_OkM``0U2`_OkM``0U2`_OkM``0U2`_OkM_`0V2b_OiM^`0X2a_OhM_`0X2a_OhM^`0Y2b_OgM^`0Y2b_OgM^`0Y2b_OfM^`0[2b_OeM^`0[2b_OeM^`0\\2a_OdM^`0]2b_OcM^`0]2b_OcM]`0^2c_ObM]`0^2c_ObM\\`0_2d_OaM\\`0`2c_O`M\\`0a2d_O_M\\`0a2d_O_M[`0b2e_O^M[`0b2e_O^MZ`0d2e_O\\M[`0d2e_O\\MZ`0e2f_O[MZ`0e2g_OZMX`0g2h_OYMX`0h2g_OXMX`0i2h_OWMX`0i2h_OWMX`0i2i_OVMV`0l2i_OTMW`0l2i_OTMW`0l2i_OTMW`0l2i_OTMV`0n2j_OQMV`0o2j_OQMV`0o2j_OQMV`0o2j_OQMU`0P3k_OPMU`0Q3j_OoLV`0Q3k_OnLU`0R3k_OnLU`0R3k_OnLT`0S3l_OmLT`0S3l_OmLT`0S3l_OmLT`0S3l_OmLS`0T3m_OlLS`0T3m_OlLS`0T3m_OlLR`0U3n_OkLR`0U3n_OkLQ`0V3o_OjLQ`0V3o_OjLP`0W3P@iLP`0W3P@iLo?X3Q@hLo?X3Q@hLn?Y3R@gLn?Y3R@gLm?Z3S@fLm?[3R@eLm?\\3S@dLm?\\3S@dLl?]3T@cLl?]3T@cLl?]3T@cLk?^3U@bLk?^3U@bLk?^3U@bLk?^3U@bLj?_3V@aLj?_3V@aLj?_3V@aLj?_3V@aLi?`3W@`Li?`3W@`Li?`3W@`Li?`3W@`Li?`3V@aLj?_3V@aLi?_3X@aLh?_3X@aLh?_3W@bLi?^3W@bLi?^3V@cLi?^3W@bLi?^3V@cLj?]3V@cLj?]3V@cLi?]3W@dLi?\\3W@dLi?\\3W@dLi?\\3V@eLi?\\3V@eLj?[3U@fLk?Z3U@fLk?Z3U@fLk?Y3V@gLi?Z3W@fLi?Z3W@fLi?Z3W@fLi?Z3V@gLj?Y3V@gLj?Y3V@gLj?X3W@hLh?Y3X@gLh?Y3X@gLh?Y3X@gLh?Y3X@gLh?Y3X@gLh?Y3X@gLh?Y3X@gLh?Y3X@gLh?Y3X@gLh?Y3X@gLh?Y3X@fLi?Z3W@fLi?Z3W@fLi?Z3V@gLj?Y3V@gLj?Y3V@gLj?Y3V@gLj?Y3V@gLj?Y3V@gLj?Y3V@gLj?Y3U@hLk?X3U@hLk?X3U@hLk?X3U@hLk?X3U@hLk?X3U@hLk?X3U@hLk?X3U@hLk?X3U@hLk?X3U@hLk?X3U@hLk?X3U@gLl?Y3T@gLobKiA^4W>dKgA\\4Y>gKdAY4[>iKdAV4]>jKcAV4]>kKaAV4_>jKaAV4^>lKaAT4_>mK`AR4a>nK_AR4a>oK^AQ4b>PL]AP4c>QL\\An3e>RL[An3e>SLYAn3g>SLXAm3h>TLWAk3j>VLUAj3k>VLUAj3k>WLTAh3l>YLTAg3l>ZLRAf3JbKh>h0^Af3IdKh>g0^Ac3KgKg>f0^Aa3LkKe>e0^A]30nKb>e0^AZ33QL_>f0\\AX36TL]>d0]AV38VL[>e0[AS3=XLX>e0ZAS3>YLX>d0YAR3a0ZLV>e0WAQ3d0ZLU>e0UAR3f0ZLU>e0SAQ3i0ZLT>e0RAQ3k0ZLS>h4mAXKS>g4mAZKS>e4nA[KR>d4oA\\KQ>c4PB]KP>c4oA^KQ>a4PB_KP>a4PB_KP>`4PBaKP>_4PBaKP>_4oAbKQ>^4oAbKQ>^4nAcKR>]4mAdKS>\\4lAeKT>[4lAeKT>[4kAfKU>Z4kAfKU>Y4kAhKU>X4kAhKU>X4jAiKW>V4iAjKW>V4iAjKW>V4hAkKX>U4hAkKX>U4hAkKX>U4hAkKX>U4gAlKY>T4gAlKY>T4gAlKY>T4gAlKY>T4gAlKY>T4gAlKY>T4fAmKZ>S4fAmK[>Q4fAoKZ>6o@l2g0nLZ>6o@l2g0nLZ>6o@l2g0nLZ>6PAk2f0oLZ>6PAk2f0oLZ>6PAk2e0PM[>5PAk2e0PM[>5PAk2e0PM[>4QAl2d0PM[>4QAl2d0PM[>5PAk2e0PM[>5PAk2e0oL\\>6o@k2e0oL\\>6n@l2f0nL\\>6n@l2f0nL]>5m@m2f0nL]>P4cAPL]>P4cAPL]>P4cAPL]>P4cAPL]>P4cAPL]>P4cAPL]>P4cAPL]>P4cAPL]>P4cAPL]>P4cAPL]>P4bAQL^>o3bAQL^>o3bAQL_>n3aARL_>n3aARL_>o3`AQL`>o3`AQL`>o3`AQL`>o3`AQL`>o3`AQL`>o3`APLa>P4_APLb>o3^AQLb>o3^AQLb>o3^AQLb>o3^AQLb>o3^AQLb>o3^AQLb>o3^AQLb>o3^AQLb>o3^AQLc>n3]ARLc>n3]ARLc>n3]ARLc>n3]ARLc>n3]AQLe>n3[ARLe>n3[ARLe>o3ZAQLf>o3ZAQLf>o3ZAQLg>n3YARLg>n3YARLg>n3YARLg>n3YARLg>n3YARLh>m3XASLh>m3WATLi>m3VASLj>m3VASLj>m3VASLj>Jj@[3Fm@_37kLl>En@`36kLl>Eo@_35lLl>DPA`34lLl>DQA_33mLl>CRAa31lLm>CSA`30lLo>BRAb3OlLo>BSAa3NmLo>ATAb3MmLo>ATAb3MmLo>AUAa3LnLo>@VAb3KnLo>@VAb3KnLP?_OVAc3InLQ?^OWAd3HnLQ?]OYAd3FnLS?]OXAd3EoLS?\\OYAe3DoLQ`0P3o_OPMQ`0P3o_OPMQ`0P3o_OPMQ`0P3o_OPMQ`0P3o_OPMR`0o2n_OQMR`0o2n_OQMR`0o2n_OQMR`0o2n_OQMR`0o2n_OPMS`0P3m_OPMT`0o2l_OQMT`0o2l_OQMT`0o2l_OQMT`0o2l_OQMT`0o2l_OQMT`0o2l_OQMT`0o2m_OPMT`0o2l_OQMT`0o2l_OPMU`0P3k_OPMU`0P3k_OPMU`0P3k_OPMU`0P3k_OPMU`0P3k_OPMU`0P3k_OPMV`0o2j_OQMV`0o2j_OQMV`0o2j_OQMV`0o2j_OPMW`0P3i_OPMW`0P3i_OPMW`0o2j_OQMV`0o2k_OPMU`0P3k_OPMU`0P3k_OPMU`0o2l_OQMT`0o2l_OQMT`0o2l_OQMT`0o2m_OPMS`0o2n_OQMR`0o2n_OPMS`0P3m_OPMS`0P3m_OPMS`0o2o_OoLR`0Q3n_OoLR`0Q3o_OnLQ`0R3o_OnLQ`0Q3Q@mLP`0S3P@mLP`0S3P@lLQ`0T3P@jLQ`0V3o_OjLQ`0U3P@kLP`0U3S@gLn?Y3R@gLn?Y3S@fLm?Z3S@fLm?Z3R1O10000000000O100000000O10O1000O10000O1000O0100O10000O01000O1000O010000000O0100000O010000000O10O1000O10O10O1000O0100O010O010O010O0O2N1N3N1O2N2O0O2O001N2J5N3O10O0100O01000O10O10O10O10O10O01000O0100O010O0010O010O010O10O01000O01000O10O100000O10O1000O10O10O1000O0100O0010O010O010O0010O010O01O10O10O010O01O10O01O10O0100001N10000O2O0O10001N100O10001N100O101N100O1O2O0UNY^O1ha0OY^O0ga0O\\^ONfa00\\^OOda00^^ONca02^^OMba02`^OLba03_^OcNJm0ga0?l^O@Ua0`0l^O_OUa0?l^OATa0?m^O_OTa0`0m^O@Ta0?l^OAUa0=m^OAUa0>k^OBVa0"}}, {"image_id": 35, "category_id": 1, "bbox": [248.0, 376.0, 245.0, 98.0], "score": 0.999954104423523, "association_id": 3, "light": [-1.926486849784851, -1.9281883239746094, 1.8013205528259277, 1.8143810033798218], "segmentation": {"size": [900, 928], "counts": "e\\j63ok03L3O1O101N100K5O100oTO^O_j0c0ZUO]OJ0N1nj0b0ZUO]OI4lj0`0[UO\\OI4kj0a0\\UO[OH5lj0`0\\UO[OH6kj0`0\\UOBdj0>[UOCej0>ZUOBfj0a0WUO_Ohj0P1O00O10000FVUOZOjj0f0VUOZOij0g0WUOYOij0g0WUOYOij0g0WUOYOij0g0WUOYOhj0h0XUOXOhj0g0YUOYOgj0g0YUOYOgj0h0XUOXOgj0i0YUOWOgj0i0YUOWOgj0i0YUOWOgj0j0YUOUOgj0k0YUOUOfj0l0ZUOTOfj0U1000O1000000000000000000O2O000O11O2N1O1O1O1O1O2N1N101O00001O0O1000000O101N10000O100O010O1O100O1000000O10000000000000000000000000O101O0O1000000O100O2O0O100O2O0O1O1O0O2O1O1001O1O0kUO^Nhi0b1WVO`Ngi0a1YVO_Ngi0a1YVO`Nfi0`1ZVO_Nfi0b1[VO]Nei0c1[VO\\Nei0e1=0O100O1000O0100O1O100O100O1000CiUOlNWj0U1iUOkNWj0a10CiUOmNWj0S1iUOmNVj0S1kUOmNUj0S1kUOlNVj0T1jUOlNUj0U1kUOkNUj0T1lUOlNTj0T1lUOlNTj0T1lUOlNTj0T1lUOlNSj0T1nUOlNRj0T1nUOlNRj0T1nUOlNRj0S1oUOlNRj0T1nUOlNRj0T1mUOmNSj0R1nUOnNRj0R1nUOnNRj0R1nUOnNRj0Q1oUOoNQj0Q1oUOoNQj0Q1oUOoNQj0Q1oUOnNQj0S1oUOmNQj0S1oUOmNQj0R1oUOoNPj0R1PVOnNoi0S1QVOmNoi0S1QVOmNni0T1RVOlNmi0U1SVOkNmi0T1TVOlNki0U1TVOlNki0U1UVOkNki0U1UVOkNji0V1VVOjNii0W1WVOiNfi0Z1YVOgNei0[1[VOeNdi0\\1[VOeNei0[1ZVOfNei0Z1\\VOfNci0[1\\VOfNdi0[1[VOeNei0[1[VOfNdi0Z1\\VOfNdi0Z1\\VOfNdi0Z1\\VOfNdi0Z1]VOeNci0\\1\\VOdNci0g0fVOoNFN1di04^VO^Oh00VO?di0KdWOFiN>di0IeWOJfN>di0FhWOLdN?di0^OnWO4]N?Yk0BgTO>Xk0BhTO>Yk0AgTO`0^k00001O0@eTO7[k0IfTO7Zk0GhTO8Xk0HiTO7Wk0HjTO9`k00001O001O010O1O00_OKSUO5mj0KTUO5kj0JVUO5]k00001O001O001N2Omkm;"}}, {"image_id": 35, "category_id": 1, "bbox": [0.0, 667.0, 153.0, 80.0], "score": 0.9990361928939819, "association_id": 4, "light": [-2.275362014770508, -1.3273024559020996, 2.177535057067871, 1.2112889289855957], "segmentation": {"size": [900, 928], "counts": "ce0g0Zk09H3M;D4L3L5nUOZNci0h1[VOZNdi0e1[VO]Ndi0c1\\VO^Ndi0b1ZVO`Nci0b1[VObNci0_1]VOaNci0_1\\VObNdi0]1\\VOdNci0]1]VOcNci0o1000]O]VOeNci0[1]VOeNdi0Z1\\VOfNdi0Z1\\VOfNei0Y1[VOgNei0Y1[VOgNfi0X1ZVOhNfi0X1ZVOhNgi0i1100000000^OXVOhNhi0X1XVOhNhi0X1XVOhNhi0X1XVOhNhi0X1XVOhNhi0X1XVOhNhi0X1XVOhNhi0X1XVOgNii0j11O001O1]OTVOlNmi0S1SVOmNni0R1RVOnNoi0P1RVOPOoi0o0QVOQOoi0o0QVOQOPj0n0PVOROPj0n0PVOQORj0n0nUORORj0n0nUORORj0n0nUOROSj0m0mUOSOSj0m0mUOSOSj0m0mUOSOSj0m0mUOSOSj0m0mUOSOSj0m0mUOSOSj0m0mUOSOSj0m0mUOSOSj0m0lUOSOUj0m0kUOSOUj0m0kUOSOUj0m0kUOSOUj0m0kUOSOUj0m0kUOSOUj0m0kUOROUj0o0kUOQOUj0o0kUOQOUj0o0kUOQOTj0P1lUOPOTj0P1lUOPOTj0P1lUOPOTj0P1lUOPOTj0P1lUOPOTj0o0mUOQOSj0o0mUOQOSj0P1lUOPOTj0P1lUOPOTj0P1lUOPOTj0P1lUOoNUj0Q1kUOoNUj0Q1kUOoNVj0P1jUOPOVj0P1kUOoNUj0Q1kUOoNUj0R1jUOnNVj0R1jUOnNVj0R1jUOnNVj0`10CjUOlNVj0T1jUOlNVj0T1jUOlNVj0T1jUOkNWj0a1001O0ChUOnNXj0Q1hUOPOXj0P1hUOPOXj0o0hUOROXj0]1000_OhUOVOYj0Z1001O000\\OfUO^O[j0`0fUO@Zj0?fUOB[j0=eUOC[j0=eUOB\\j0=eUOC\\j0Tk0N100000001O0O100000001N1000001N10001O0O101NV^Xe0"}}, {"image_id": 35, "category_id": 1, "bbox": [424.0, 291.0, 241.0, 88.0], "score": 0.9996543526649475, "association_id": 1, "light": [-1.2881269454956055, -3.327949285507202, 1.1477606296539307, 3.101642370223999], "segmentation": {"size": [900, 928], "counts": "Ynd;1Rl0`0A2M2O001O1O1N101O1O1O00001O000010O01O001O00001O00001O001O00001O0000000O101O0O10001O001O1O1_UOgNVj0Z1fUOkNWj0b10\\NeUO]1bj0O010N2O2N1O1O0000jUOjN_i0T1aVOmN_i0S1`VOoN_i0Q1aVOoN_i0Q1`VOPO`i0P1`VOPOai0o0]VOSOci0m0\\VOTOdi0l0[VOUOei0k0[VOUOfi0j0ZVOVOfi0j0YVOWOgi0i0YVOVOhi0j0WVOWOii0i0VVOWOki0i0TVOXOli0h0TVOXOki0i0TVOXOli0h0TVOWOmi0j0RVOVOni0j0QVOVOPj0j0PVOTORj0m0lUOSOUj0n0jUOROVj0n0iUOROXj0o0gUOQOYj0o0fUORO[j0Z11O1O1O1O10000O1N2O010O10000O0100O010O1000000O1000001O000O101N1O11`NbUOX1Yj0dNkUO1NZ1Uj0hNmUOL0[1Sj0iNmUOL0[1Qj0kNVVOT1ii0mN[VOo0di0RO]VOn0bi0RO^VOn0ai0SO_VOm0ai0SO`VOl0`i0SOaVOm0_i0ROcVOm0]i0ROeVOm0[i0ROgVOm0Yi0ROiVOn0Vi0ROjVOn0Vi0ROkVOm0Ti0TOmVOk0Si0TOoVOl0Qi0ROQWOm0Pi0QORWOn0Rj001O1O1O010O00001O000000000011N001O0000001N10001O0000001N10001N100O101O0OJTUOVOlj0j0TUOWOkj0i0UUOWOjj0j0VUOVOjj0j0WUOVOgj0k0YUOUOgj0k0YUOUOfj0l0ZUOTOfj0l0ZUOTOej0l0\\UOUOcj0k0]UOUObj0k0_UOUO`j0k0bUOTO^j0i0eUOWOZj0g0iUOZOUj0c0oUO]OPj0c0QVO]Oni0d0SVO[Omi0e0SVO\\Oki0d0VVO\\Oii0e0WVO[Ohi0e0YVO\\Oei0b0^VO^Obi0`0`VO@_i0a0aVO@]i0`0dVO@[i0a0fVO^OYi0b0hVO_OWi0a0iVO_OVi0a0kVO_OUi0`0lVOASi0>nVOBRi0=oVODoh0[k0CbTO=]k0AdTOb0_k0O2N101N010O1O010O1O2N101N3LRYY1"}}, {"image_id": 35, "category_id": 1, "bbox": [0.0, 333.0, 346.0, 138.0], "score": 0.9623303413391113, "association_id": 10, "light": [-2.4349613189697266, -1.449957013130188, 2.3138973712921143, 1.2868432998657227], "segmentation": {"size": [900, 928], "counts": "U;W1ej0=I4L3N2M3M2UVOWN[i0i1cVOZN[i0h1cVOYN]i0g1bVO[N]i0e1cVO[N\\i0f1cVO[N]i0e1cVO[N]i0e1cVO[N]i0e1cVO[N]i0e1cVO[N]i0e1cVO[N\\i0f1dVOZN\\i0f1dVOZN\\i0f1dVOZN\\i0f1dVOZN\\i0f1dVOZN\\i0f1dVOZN]i0e1cVO[N]i0e1cVO[N]i0e1cVO[N]i0e1cVO[N]i0e1cVO[N^i0d1bVO\\N^i0d1bVO\\N^i0d1bVO\\N^i0d1bVO[N_i0e1aVO[N_i0d1bVO\\N^i0d1aVO]N`i0b1`VO^N`i0b1`VO^N`i0b1`VO^N`i0b1`VO^N`i0a1aVO_N`i0`1`VO`N`i0`1`VO`N`i0`1`VO`N`i0`1`VO`N`i0`1_VOaNbi0^1^VObNbi0]1_VObNbi0^1^VObNbi0^1^VObNbi0^1^VObNbi0^1^VObNbi0^1^VObNai0_1_VOaNai0_1_VOaNai0_1_VOaNai0_1_VOaNai0_1_VOaNai0_1_VOaNai0_1_VOaNai0_1_VOaNai0_1_VOaNai0_1_VO`Nbi0`1^VO`Nbi0`1^VO`Nbi0`1^VO`Nbi0a1]VO_Nci0a1]VO_Nci0a1]VO_Nci0a1]VO_Nci0b1]VO]Nci0c1]VO]Nci0c1]VO]Nci0c1]VO]Nci0d1]VO[N]1Fef0o1nWO[N\\1Gff0n1nWO[N[1Hgf0[2XYOfMhf0Z2WYOgMif0Y2WYOgMif0X2XYOhMhf0X2WYOiMif0V2XYOjMhf0S2ZYOnMff0T2XYOlMhf0U2WYOlMhf0V2UYOkMkf0Y2QYOgMof0]2mXOcMSg0`2jXO`MVg0d2eXO]M[g0d2dXO\\M\\g0e2cXOZM^g0g2aXOYM_g0h2`XOXM`g0j2QXOlL8:gg0P3WXOQMig0P3VXOPMjg0Q3UXOoLkg0R3SXOoLmg0Q3RXOPMng0Q3QXOoLog0Q3PXOoLQh0Q3oWOoLQh0Q3oWOoLQh0Q3PXOnLPh0R3QXOmLog0T3QXOkLog0U3RXOjLng0V3RXOiLog0X3QXOgLog0Y3QXOgLog0Y3QXOgLog0Y3QXOgLog0Y3RXOfLng0Z3RXOeLog0[3QXOeLog0Z3SXOdLng0\\3RXOdLng0[3TXOcLmg0]3=O10000O1`N[WOAeh0;_WODbh0;_WOEah0;_WOEah0:aWOD`h0;aWOE`h09aWOG_h08bWOG_h08cWOG]h09cWOE_h0:bWODah0:aWOD`h0<`WOCah0aWO@ah0>`WOZOhh0f0YWOWOjh0g0XWOWOih0i0WWOoN[OK_i0U1WWOPO[OJ^i0V1VWOQOQi0o0oVOQOPi0P1PWOPOPi0P1oVOQOQi0o0oVOQOQi0o0nVORORi0n0nVORORi0n0mVOSOSi0l0nVOTORi0l0nVOTORi0l0mVOUOSi0k0mVOUOSi0l0lVOTOTi0m0kVOSOUi0n0jVOROVi0n0jVOQOWi0P1hVOPOXi0P1hVOPOXi0Q1gVOoNYi0Q1gVOoNYi0R1fVOnNZi0R1fVOnNZi0S1eVOmNHE[i0^1mVOmNHE[i0_1lVOlNHF\\i0_1kVOkNIF[i0`1lVOiNKFYi0a1mVOhNJGYi0a1mVOhN\\i0Y1cVOgN]i0Z1cVOdN]i0_1aVOaN_i0a1`VO^N`i0c1`VO[Nai0e1?1O000O10000000O10000O10000O100000000000000000000O0100000000000000O100000000O100000000O1000O10000O00100O1O1O1O1O00100J7N100O1O1O1O2N100O2O0O7J1O001O0O2O001O0OUWOYO\\f0f0cYO\\O\\f0d0ZYO\\OQN1fh0b0XYO_OPN1hh0>XYODmM0kh0;WYOOjf0CVWO4P2;Zf0]ORXO0G8m1:[f0^OYXO6^1;Xf0@ZXO4_1;Xf0AZXO3^1Vf0DdZO;\\e0FdZO:\\e0FdZO8^e0HTZOMhM:Uh0JRZOLjM8Uh0LQZOLjM8Uh0LQZOLjM8Th0MRZOKjM7Uh0NQZOKjM7Uh0NQZOKjM7Uh0OPZOJlM5Uh01oYOJlM4Vh02nYOJlM4Vh03mYOImM3Vh05mYOHmM2Wh06lYOHmM2Wh08jYOFPN0Wh0=fYOCSN0Wh0d0_YO\\ORg0d0nXO\\OQg0f0nXOZOSg0e0mXO[OSg0e0mXO[OSg0f0lXOZOTg0f0U210O01O001O00010O000000000001O00000000jWOYOPe0f0eZO[O]M1mg0e0eZOZO]M2ng0d0eZO[O[M3og0b0fZO\\OZM2Qh0a0eZO]OYM3Rh0`0eZO]OYM3Rh0`0eZO\\OZM4Qh0`0fZO[OYM5Rh0?eZO[OZM6Qh0?kZOBTe0>lZOBTe0>lZOBUe0=kZOCUe0=kZOCUe0=kZOCUe0>jZOBWe0=iZOCWe0=iZOCXe0;iZODXe0fTODZk0d0N101O00001O001O010O00001O01O01O0001O1O001O001O00001O001O001O001O000001O0000001O00010O001O001O0001N101N1O2N3M2N2N2Nabl1GoaRNOak0:O10000O101N10000O2O0O101M21O001O00000000000000001O000000000001O001O002N1O1O2N1O2N1O1O0000001O0000001O001N2O001O1O001O000101N010O10O010O00010O001O01O00O2O0000001N101O001O001N2O001O0010O0001O010O0010O01O0010O01O0010O000000010O000000001O000001O01O000O2O00001O00001O0000001O00000001O00001O001N1000001O0000001O00001O010O001O001O001O0010O0001O0010O0001O010O010O00010O001O01O0010O01O001O001O10O01O00001O001O001O001O1O001O001N101O001O001O00001O00001O00001O001O00001O01N10001O0O101O0O101[NlNWXOU1ig0kNVXOV1ig0kNVXOW1ig0jNTXOX1lg0hNTXOX1lg0hNTXOX1lg0hNSXOY1mg0gNSXOY1lg0hNTXOX1lg0hNTXOX1kg0iNUXOW1kg0hNVXOX1jg0hNVXOX1ig0hNWXOY1ig0fNXXOZ1gg0gNYXOY1gg0fNZXOZ1dg0gN\\XOZ1cg0gN]XOY1bg0fN`XOZ1_g0eNcXO[1]g0cNeXO]1Zg0cNgXO\\1Zg0cNgXO]1Yg0bNhXO]1Yg0bNiXO]1Wg0bNjXO]1Xg0bNhXO]1Qi0N101fN\\UOQ1ej0nN_UOm0_k0[O6JThQ2"}}, {"image_id": 35, "category_id": 1, "bbox": [84.0, 414.0, 338.0, 149.0], "score": 0.9963144063949585, "association_id": 7, "light": [-1.2512637376785278, -2.411135673522949, 1.0411128997802734, 2.2033398151397705], "segmentation": {"size": [900, 928], "counts": "[XZ2275J4Vk0KkTOd0ej0ZO_UOP1_j0RO_UOo0Xj0nNiUO5Mo0Yj0mNiUO5Mn0Yj0oNhUO\\1Xj0eNgUO[1Yj08O10001N10000O1M4O03M1O001O00001O01O000001O01O001O10O01O001nUOTNki0S2O00100O1000O100O1O2N2O1N2N2N001O001O0010O01O3M3M1O1O100O1O\\VOaNdh0^1\\WObNeh0^1ZWObNfh0`1XWO`Nih0`1VWO`Njh0a1UWO_Nkh0b1TWO^Nmh0a1SWO_Nmh0b1RWO^Nnh0b1QWO_NPi0`1mVOcNSi0^1kVOcNUi0]1kVO`NYi0`1g0O2M010O010O0001O01O0000010O000000001O01O0000002O1N001O000000H`UOlN`j0\\1000G`UOnNaj0Q1_UOoNaj0Q1_UOoNaj0Z1O100000000000O10000000O1000000O10001OHbUOjN^j0V1bUOjN^j0V1bUOjN]j0W1cUOiN]j0W1cUOiN]j0W1cUOiN]j0_10000000IcUOgN\\j0Z1dUOfN\\j0Z1dUOfN\\j0a10000000000O2O000O100O1O1O2O0O1O11O00TORNbWOn1]h0TNcWOk1]h0UNcWOk1]h0VNbWOj1]h0WNcWOi1\\h0XNeWOg1Zh0ZNfWOf1Yh0[NSWOI=j1`h0_NQWOI>h1`h0`NQWOJ>d1_OXNQi0;RWOI?d1_h0dNSWOF?f1^h0cNUWOE>h1\\h0dNmWO\\1Qh0eNoWO[1Qh0eNoWO\\1og0eNQXO]1mg0cNSXO^1kg0cNUXO^1jg0bNWXO_1gg0aNYXO`1fg0`NZXOa1dg0`N\\XOa1cg0_N]XOb1bg0_N^XOc1_g0]NaXOf1\\g0ZNeXOf1Zg0[NeXOf1Zg0`NaXOa1\\g0aNcXO`1\\g0aNdXO_1[g0aNeXO`1Zg0aNfXO_1Yg0aNgXO_1Yg0bNgXO^1Xg0bNhXO^1Xg0bNhXO^1Xg0bNhXO^1Xg0bNhXO]1Yg0cNgXO]1Yg0cNfXO^1[g0aNeXO_1[g0aNeXO_1[g0aNeXO_1[g0bNdXO]1]g0cNcXO]1]g0cNcXO^1^OeMhg0m0jXO`1[OeM2Ncg0Q1lXOb1_O_Mdg0Q1kXOe1Ug0[NjXOf1Vg0[NiXOf1Vg0ZNiXOg1Wg0ZNgXOh1Xg0YNfXOh1Zg0YNcXOi1]g0^11O1O1M3N2O1O1O1O100O1O1O1N2K500O1O2O000O2N1O2N1N4I9I6L3NM2N3N10001O01000O10O10O11O1N2LlVOVMUi0i2kVOVMWi0i23O1O1O3M1O1O00001O0000000^N^VOb0bi0\\ObVOa0`i0]OcVOa0]i0^OfVO`0Zi0_OhVO`0Xi0_OkVO?Ui0AlVO>Ti0AmVO?Si0AmVO?Si0@nVO`0Ri0_OPWO`0Pi0_OQWOa0oh0^ORWOc0mh0\\OTWOd0lh0\\OTWOd0YOkN`i0a0XWOg0gh0YOYWOg0gh0XOZWOh0fh0XOZWOh0fh0WO[WOj0dh0VO\\WOj0dh0VO]WOi0ch0VO^WOj0ch0TO^WOm0ah0QObWOn0^h0QOcWOo0]h0oNfWOP1Zh0POfWOP1[h0nNfWOR1Zh0nNgWOQ1Yh0nNhWOR1Xh0nNiWOQ1Wh0nNjWOR1Vh0nNkWOQ1Uh0oNkWOQ1Uh0oNlWOP1Th0POlWOo0Uh0POmWOo0Sh0QOmWOo0ig0QOPWO0X1n0gg0UOnVON\\1l0cg0A^XO>ag0C_XOdKC[4NS3Ue0`NmClMVG;F]3Ue0\\NQDkMYG7^Of3Ve0XN\\EoMZEo3We0RNdEkMREW4We0nMSFU2j9lMTFX2j9hMUF[2h9fMXF]2e9cMZF`2d9aM[Fa2c9_M]Fc2`9]MaFe2\\9\\McFg2Z9YMfFj2U9XMiFm2R9VMiFQ3P9SMmFS3o8mLmF[3P9eLkFc3S9ZLjFn3S9QLlFT4R9kKmFX4R9hKlF\\4S9dKkF_4S9aKkFb4S9`KkFb4T9_KhFe4U9^KgFe4X9]K]Fn4_9VKkE_5Q:fJVER6f:SJdDb6X;cI\\Dh6b;[IUDk6j;YInCm6QR:fBSJU2ULoLF\\>h9jBYJj1XLPMGa>`9nB]J_1]LPMGg>Y9PCaJW1_LRMGl>Q9RChJm0`LUMGR?h8SCoJd0bLWMGX?_8TCWK:cLZMGd?_1g_Oo3Y3VN0dL\\MH``0Om_On4^2fNFeL_MHRc0\\4Q@VOZOfLbMI_c0l3m_OEmNfLgMIhc0a3k_ONcNhLjMIPd0V3i_O:ZNfLmMJWd0m2g_Oc0RNfLPNJ[d0g2h_Oi0jMfLSNJ^d0c2h_On0dMeLUNKbd0]2i_OT1^McLWNLfd0W2i_O[1WMcLYNKjd0S2i_O_1SMbLZNLod0l1h_Og1lLaL]NLSe0g1g_On1fL^L_NNZe0^1e_OW2`L\\LaNO`e0V1c_Oa2XLZLeNOje0j0^_Om2QLYLgN0Rf0a0Y_OW3kKXLjN0Yf08W_Oa3cKVLlN1`f01V_Oh3\\KULoN1df0KW_On3SKULSO2ff0FY_OR4mJULTO3Un0h3eROTLVO4Wn0i3aROQLYO6Yn0g3_ROQLXO8\\n0f3[ROQLZO8^n0f3WROPL\\O:an0d3`SO\\Ldl0e3WSO[Lml0f3nROZLVm0g3eROYL_m0g3^ROXLfm0i3UROWLnm0j3nQOVLUn0l3fQOTL\\n0n3aQOPLbn0S4YQOmKin0T4TQOlKmn0V4Z22O1N101N2O1N2O1O1O001OM6A`0]Od0ZOg0ZNh1hNVhg<"}}, {"image_id": 38, "category_id": 1, "bbox": [835.0, 209.0, 163.0, 288.0], "score": 0.9999998807907104, "association_id": 4, "light": [-2.0547711849212646, -2.419786214828491, 1.935377836227417, 2.255638837814331], "segmentation": {"size": [683, 1024], "counts": "Y]]a01Ve06M2O0O101O0O101O00000000001O00000000000000000000000000O10O100000001O0000000O1000000O100N3O0O10000000000000000000000000001O01OkJe0ZD[O_;S1ZDmN^;`1^D_N^;l1[DTNc;]2nCcMo;`2SD^Mj;T2gDlMV;P2QEPNm:P2UEPNk:P2UEPNj:Q2VEoMj:R2UEmMk:T2WEjMi:V2XEiMg:X2\\E^MXL0Z>c2_EZM[L1V>h2TBgM`2@Z;S4jC[L]h5O2M2J6ZOf0N2O1O1O1O100O1N20O01O010OO2jNRCmIP=k5fCbI_"}}, {"image_id": 38, "category_id": 1, "bbox": [494.0, 331.0, 54.0, 129.0], "score": 0.9999376535415649, "association_id": 3, "light": [-1.5568299293518066, -2.601545572280884, 1.5276362895965576, 2.4528980255126953], "segmentation": {"size": [683, 1024], "counts": "PnY:2Ye01N100000000000001O0O1SM6Y@Ke?9X@Gg?:Y@Ff?`0R^O\\Oj14S`0m0j_OTOT`0U1d_OkN[`0Y1b_OgN]`0^1__ObN``0b1]_O^Na`0f1]_OZNa`0k1\\_OUNb`0o1[_ORNc`0R2[_OmMb`0Y2\\_OgMa`0^2]_ObMa`0c2\\_O]Mb`0j2o^O`MPa0^30Hf^O_LZa0i30If^O]LZa0c3f^O\\L[a0d3f^O[LZa0e3f^O[LZa0f3e^OYL\\a0k31O3K`^OYLaa0f35N2M2N002N2N1O3hNd^O[N]a0\\1P_O^NSa0]1R_O`NPa0[1d1L5GaTm9"}}, {"image_id": 38, "category_id": 1, "bbox": [426.0, 329.0, 42.0, 133.0], "score": 0.9997266530990601, "association_id": 1, "light": [-1.554102897644043, -2.885150909423828, 1.4333040714263916, 2.7343027591705322], "segmentation": {"size": [683, 1024], "counts": "fbl83We0101O0QM7\\@Ib?<[@Dc?`0[@@c?d0[@\\Ob?h0\\@YO`?k0`@UOZ?S1d@mNV?\\1g@dNT?e1h@[NW?i1f@WNZ?P2_@PNa?U2Z@kMf?X2W@hMi?Z2U@gMj?[2T@eMl?]2R@cMn?_2P@aMP`0a2n_O_MR`0d2k_O\\MW`0f2f_OYM\\`0g2c_OXMa`0g2__OVMd`0k2T_OXMPa0h2k^O[MVa0e2f^O]M\\a0Y30O1O001O1O1N1]N[^O@fa0:k^OZOVa0b0U_OVOn`0c0Z_OXOi`0c0]_OXOi`0b0]_OWO_Pc;"}}, {"image_id": 38, "category_id": 1, "bbox": [644.0, 331.0, 153.0, 127.0], "score": 0.977187991142273, "association_id": 7, "light": [-1.7253531217575073, -2.6640708446502686, 1.617229700088501, 2.4520249366760254], "segmentation": {"size": [683, 1024], "counts": "el]=9kd0>TOi0K4L`0A4L2N5K4X^O_M^`0c2`_O]M``0e2R12N1O2N3M3M2X^OTMn`0e30O5K3M3N2M2N3L4YNZ^OCja07\\^OEna0M\\^OMha0M^^ONcc0K4M4IR[3KUeL3O000000000000000000000000O101O00000000000000000000000000000001O000O100000001O000000000000000001O2N1O00^e80`ZG3N10000000000O11O0000000000000001O01O00000000000O10000000000000000000000000000O1000001O000O10000OQof4"}}, {"image_id": 38, "category_id": 1, "bbox": [572.0, 336.0, 84.0, 120.0], "score": 0.9956828355789185, "association_id": 5, "light": [-2.1675400733947754, -2.3112215995788574, 2.0386886596679688, 2.1941421031951904], "segmentation": {"size": [683, 1024], "counts": "jnm;2Ye00O100O1000000000000000000000000nL4e@LT?c0c@^OV?Q1b@oN[?^1[@bNe?_1Z@aNe?b1Y@^Ng?d1W@\\Ni?f1U@ZNk?j1Q@VNo?V2e_OjM[`0Z2a_OfM_`0[2`_OeM``0]2^_OcMc`0^2[_ObMe`0_2Z_OaMg`0`2W_O`Mk`0a2R_O_MPa02Z^OU2e0hM_a0V2_^OiMaa0\\2e04L`0AO00010O000fNR^OWOoa0d0X^OYOha0d0_^OWOca0f0c^OVO^a0e0i^OXOXa0d0l^O[OTa0c0P_O[OPa0`0W_O]Ok`0>]_O[Of`0`0U2N4K3N3NRh0JUXO00001N10000000000000000000000000000001O0000001N]Pe7"}}, {"image_id": 38, "category_id": 1, "bbox": [144.0, 339.0, 56.0, 133.0], "score": 0.7722166180610657, "association_id": 6, "light": [-1.887503743171692, -2.315100908279419, 1.8166993856430054, 2.2711355686187744], "segmentation": {"size": [683, 1024], "counts": "i]P39md09F7G7N101N1T\\OClb0jk0`3mSOUL75_k0S4PTOjKa03^k0U4oSOiKc02]k0W4nSOhKe00]k0Z4lSOgKg0O\\k0\\4kSOfKh0O\\k0]4jSOeKj0NZk0`4jSObKm0NXk0c4hSO`KP1MVk0g4gSO]KS1KUk0l4eSOZKV1JRk0R5dSOUKY1JQk0U5bSOSK]1Hoj0\\5^SOmJc1Gmj0c5YSOhJj1Elj0g5USOeJP2Dij0l5RSObJU2TOoLOjm0_6nRO_JY2oNoLI1:hm0a6lRO_J\\2lNUM3bm0e6jRO]J_2kNUM3am0g6iRO\\Ja2iNWM3^m0k6gROZJd2fNZM4Zm0n6eRO[Jf2aN^M5Wm0Q7bROZJ[3dNSj0V7]ROYJ`3`NSj0P9mUOPGRj0R9mUOmFTj0T9kUOlFUj0T9lUOkFSj0W9jTOiF_NOhl0Y9[TOVGlNAil0Z9YTOVGnN@hl0\\9WTOWGPO]Oil0]9UTOXGQOZOkl0_9RTOXGSOYOjl0a9QTOXGTOVOll0c9oSOWGUOVOll0c9nSOXGml0i8QSOYGnl0h8QSOXGol0i8oROXGQm0i8mROXGRm0j8lROWGTm0j8jROXGUm0j8hROWGXm0j8fROWGZm0j8dROWG\\m0k8`ROWG`m0j8^ROWGbm0l8YROWGem0k8YROVGgm0l8VROUGjm0l8TROUGlm0j8VROUGim0j8ZROUGfm0i8^ROUGam0j8bROUG]m0j8gROTGXm0k8lROSGSm0m8oRORGPm0m8SSORG\\l0]9gSOaFUl0b9nSO]Fmk0f9UTOZFgk0h9\\TOWFck0i9_TOVF`k0i9bTOWF]k0h9fTOWFYk0i9hTOWFXk0h9jTOWFUk0h9nTOVFSk0h9oTOXFQk0f9RUOXFnj0g9VUOVFkj0e9[UOZFej0_9dUO^F]j0Q9[VOgFei0e8VWOTGkh0i8b4M3N2N101N2O1O1O1O1N2O1N2N2N2M3N2O1N200O1O1O10001N1kIVmN_4kR1XK`mNd4aR1UKimNh4XR1TKomNh4QR1VKVnNd4lQ1XKZnNe4gQ1WK_nNe4cQ1XKanNe4aQ1SKgnNl4cS1M2N3N1N2N2O1N2O1O0O2O1O1N2O001O1N101O1O0O2O1O1O1O1N101O1O001O001N101O000000000000O1000000O1000000O10000O100O100O100O1O100O100O10000O10O10O100000000000000000000O10000000000000000000000000000000000O1000000001O00000000000O101O000000000000001O000O100000001O0O100000001O0O10001O001O00001O001O001O00001O0000001O0O10000O2O0O10000O101N10000O100000000O2O0000000O10000000000O2O000O10000O2O000O100O2O0O100O2O0O2N2N2N2N2M4M2N2N2N2N2N2N101N2N2N1O3M2M4L6H9GkYc9"}}, {"image_id": 40, "category_id": 1, "bbox": [681.0, 177.0, 316.0, 471.0], "score": 0.971116304397583, "association_id": 2, "light": [-2.1335456371307373, -1.6812665462493896, 2.0793142318725586, 1.5683385133743286], "segmentation": {"size": [680, 1024], "counts": "e]T>1Re0>C;F6L2O1N2O1N2O1N2O1N2O1O10O0010O0i_O4S;KUDe1S;[NbDU2Z;kM`D_2[;aMbDe2[;[McDj2[;UMcDP3Z;QMcDS3\\;lLaDY3];hL`D]3^;cL]Dd3`;\\L]Dk3_;WL\\Do3b;RLZDS4h2gJ`4X1cHV4n1cK\\59aHX4l1fKa55_HX4k1iKc54PHb4X2^Kh5h6SJ]Ik5e6oIaIo5d6hIcIV6a6_IkI[6[6RIXJh6Z:K1N2O0O1O10O0000010O00000010O00000001O000000001O0000O10000O100O10000O10000O100O10000O10000O100000000O100000000000000O10000000000O1000000O100O100O100O1O1O1O1O1N2O1O100O1O100O100O10000000000O100000000000000000000O10000000000000O100O10000O100O1O100O1O1O1N2N2N2N2N2N2N2M3M3M3L4L4L5J5L4M3M3M3N2NnGbC^7\\TMc8P6QGnLgLc8j5PG`M?dLc8h5PGdM?aLd8f5PGiMc0YLa8e5QGSNZ:eLZES4c0YO];0jD0[;HhD8];AeD>_;]OcDc0_;ZObDf0`;WOaDi0a;SOaDm0a;PO`DP1b;mN_DT1c;gN_DY1d;bN^D^1e;]N]DhNYNi1\\=[O^DjN^Nd1V=^O^DmNaNa1S=_O]DPOaN`1S=]O^DROaN`1R=\\O^DTO`N`1T=XO^DXO_N`1T=TO_D\\O]N`1V=PO_D@\\N_1W=lN`DEYN_1[=dN_DNWN]1_=[N`D7QN^1d=RN_D`0mM^1h=jM`Dg0iM]1j`0cNU_O]1k`0cNU_O]1k`0cNU_O]1k`0cNV_O[1k`0eNU_OZ1l`0fNT_OX1m`0iNS_OV1o`0iNR_OV1n`0jNR_OT1Qa0kNP_OS1Qa0mNP_OP1Sa0oNn^Oo0Sa0QOn^On0Ra0ROP_Ok0Qa0TOR_Oi0o`0WOS_Oe0Pa0ZOQ_Od0Pa0\\OQ_Ob0Qa0]Oo^Ob0Sa0]Oo^O?Ta0_Oo^O=Ua0Al^O=Ua0Cl^O;Va0Cl^O2hNB`b08n^ONaa0L[aa0"}}, {"image_id": 40, "category_id": 1, "bbox": [393.0, 230.0, 313.0, 309.0], "score": 0.9999998807907104, "association_id": 1, "light": [-1.9895436763763428, -2.4926159381866455, 1.8701348304748535, 2.3436872959136963], "segmentation": {"size": [680, 1024], "counts": "jVU83Re03M4M2O2O001N2O001O01N1O4L4LkU2J[jM1O2O1k\\ONQa03k^O9m`0Hm^O?Pa0Bl^Od0Qa0^Ok^Oh0Qa0ZOj^Ol0Sa0VOh^OQ1Ta0QOg^OU1Va0nNe^OV1l`0aN]^O=a0W1m`0@e^Oh0Ua0i1N1G9N2O1000001O0O10000UMjKbDX4Y;TL]Do3`;_LSDc3l;dLlC^3SYMaAe2_>ZMdAd2\\>ZMhAd2X>[MkAc2U>\\MnAb2S>[MRBb2n=]MXB^2i=`M\\B\\2d=bMbBZ2_=dMUDi0l;UOUDk0l;ROVDn0k;POVDP1k;nNVDQ1m;kNUDU1l;iNUDW1l;gNUDX1n;eNSD[1o;aNSD^1P<^NRDb1U6n_O_O24HU1`1ROe>;m_O]O4`1Z1hNb>?l_O^O4^1]1dNa>P1n_O?_1bNV>MZ@Q3`1RMR>]3mAcLP>a3oA_Lo=d3PB[LQ>e3nA\\LR>c3oA]LQ>c3oA]LQ>c3oA]LQ>b3PB^LP>b3PB^LP>b3PB^LP>c3oA]LQ>d3nA[LS>f3lAZLT>f3lAZLT>g3jAZLW>e3iAZLW>h3hAXLX>i3gAWLY>j3eAWLZ>k3eAUL[>l3dATL[>o3cAQL]>P4bAPL]>R4bAmK_>T4`AlK`>U4^AlKb>U4]AkKc>V4\\AiKd>X4\\AhKd>X4\\AhKd>Y4[AgKe>Y4[AfKe>[4[AeKe>[4[AeKd>\\4\\AdKd>\\4[AeKd>\\4\\AdKd>\\4\\AdKc>]4\\AdKd>\\4\\AcKb>`4^A`K_>c4aA]K[>g4eAYKU>m4kASKU>m4jASKZ>j4fAVK^>f4bAZK_>e4`A\\Ka>c4_A]Ka>c4_A]Kb>b4^A^Ke>_4[A`Kh>^4XAbKi>\\4WAeKi>[4WAeKj>Z4VAeKk>[4UAeKk>Z4VAfKj>Z4UAgKk>X4VAhKj>V4XAiKi>V4XAjKh>V4XAjKh>U4XAlKh>S4YAmKf>S4[AmKe>R4\\AnKc>R4^AnKa>Q4aAoK^>Q4cAnK^>Q4cAoK\\>Q4dAPL[>P4fAPLY>P4hAPLW>P4iAQLV>n3lARLS>n3nAQLR>o3oAQLQ>o3oAQLQ>o3oAQLP>P4oAQLQ>o3oAQLP>P4PBPLo=Q4QBoKo=R4PBnKo=S4QBlKo=U4QBkKm=W4SBiKl=X4TBhKk=Z4TBfKj=\\4VBdKi=]4VBcKk=]4UBcKj=^4VBbKj=^4VBbKj=_4TBbKl=^4TBbKl=^4TBbKl=^4TBbKl=^4TBbKm=]4SBcKn=\\4RBdKo=[4QBdKR>Z4nAfKS>Z4lAfKV>X4jAhKW>W4iAiKX>V4hAjKX>V4hAjKY>U4gAkKY>U4gAjK[>U4eAkK[>U4fAjK[>U4eAjK]>U4cAkK^>T4bAlK_>S4bAlK_>S4aAlKa>S4_AmKa>S4`AkKb>S4_AkKd>S4Z1M3M3M4L3F;N1N3N1N2Ok^OlLW`0c0n^Oh1j0hMX`0=R_Oi1f0jMY`0N__OW2;gMo`0W2Q1I8N002UNk\\Oa1_c0M4M3M4L4M3L4M3H:H7FPSU?"}}, {"image_id": 40, "category_id": 1, "bbox": [1.0, 296.0, 85.0, 114.0], "score": 0.9826042056083679, "association_id": 5, "light": [-1.6882739067077637, -2.4285359382629395, 1.5311024188995361, 2.2635107040405273], "segmentation": {"size": [680, 1024], "counts": "`P1a0ed05ZN]O^^Oh0]a0]O_^Og0_a0YO`^Oj0]a0XO_^Om0^a0UOi]O6Fm0]b0nNh]Ol13nMca06Y^Oo12kMea07Y^Oo1OlMfa06[^OP2MjMha06[^OR2LgMia08X^OS2OeMia08W^O]2ia09W^OQMia0o2W^OQMia0o2W^OQMia0o2W^OQMja0n2V^ORMja0n2V^ORMja0n2V^ORMka0l2U^OUMka0j2V^OVMka0i2U^OWMka0h2U^OXMla0h2S^OYMma0f2T^OZMla0e2T^O\\Mla0c2U^O]Mka0b2V^O^Mja0b2V^O^Mia0b2X^O^Mha0a2Y^O_Mfa0a2[^O_Mda0a2]^O_Mca0`2^^O`Maa0`2`^O`M_a0a2a^O^M`a0a2a^O_M^a0b2b^O^M^a0b2b^O^M]a0b2d^O^M\\a0b2d^O^M\\a0a2e^O_M[a0a2e^O_M[a0a2e^O_M[a0a2e^O_M[a0`2f^O`MZa0`2f^O`MZa0`2f^O`MZa0`2f^O_M[a0a2e^O_M[a0a2e^O_M[a0`2f^O`MZa0`2f^O`MZa0`2f^O`MZa0_2h^O`MXa0`2i^O_MWa0`2k^O_MUa0`2m^O_MSa0a2n^O^MRa0b2Z^O^M?OWa0c2Y^OiMQb0j2MYOS^OTNla0j1V^OfML;ma0o1W^OWNia0j1V^OVNja0k1U^OUNka0k1V^OTNka0k0]^OPO10ba0l0f^OmNL5_a0i0d_OVO^`0FQ^Oh0f1A_`0o5PARJP?S6OKQASJn>m5RATJm>m5SASJl>m5TATJl>k5UAUJj>k5VAVJj>j5UAWJj>i5VAXJj>h5VAXJj>g5VAZJi>g5WAYJi>f5WAZJi>g5WAYJi>f5XAZJg>f5YA[Jf>d5\\A\\Jc>d5^A\\Ja>c5aA]J^>d5bA\\J]>d5dA[J]>d5dA\\J[>d5eA]JZ>c5gA]JX>b5jA^JU>b5lA^JS>a5oA_JQ>`5oA`JQ>`5PB`Jn=b5RB^Jn=a5SB_Jl=a5UB_Jj=`5WBaJh=_5YBaJg=^5ZBbJe=^5\\BaJe=^5[BcJe=\\5\\BdJd=\\5\\BdJd=[5]BeJc=[5]BeJb=[5^BeJc=Z5^BfJb=Z5^BfJb=Y5_BgJa=Y5_BgJa=Y5^BgJc=Y5]BgJb=Z5^BfJb=Z5^BfJb=Z5^BfJb=Z5^BfJb=Z5]BfJd=Z5\\BfJd=Z5\\BfJd=Z5\\BfJe=Y5[BgJe=Z5ZBfJf=Z5YBgJg=Y5YBfJh=Z5XBfJh=Z5XBfJh=Z5XBfJg=[5YBeJg=[5YBdJh=\\5WBeJh=]5WBcJi=]5WBcJh=^5XBaJg=a5YB_Jf=b5ZB^Jc=e5]B[Ja=g5^BZJnSGb1j1UNQ7>iEhNBP3Y3nM[7>eEgNBV3U3iMc7=cEfN@[3T3dMk7:^EnN[OZ3W3aMP87[EVOUOY3Y3^MX81XEf3d1QMT9YOUEm3Z1SMa9POREY4j0QMU:eNPEd49oLi:[NmDn4NmLU;WNhDT5IjL^;WNaDk8_;m110000O10000O10001N10000O10O101O0O1RNZD\\Gf;`8bD\\G^;c8eDZG\\;e8hDVGY;j8lDQGT;o8REjFo:W9VEcFi:^9\\E\\Fe:d9_EXF`:j9m11O1O100O1O100O1O1O1N2N2N2M3M3M3M3K5H8E;I7K5M3L4L4K5I7E;I7L4N2L4L4J6J6K5L4N2O1N2O1O1O1O1O101O00100O1OeEiFh5V9WJlFi5T9UJnFm5P9QJQGR6n8lIRGW6m8gISG]6l8eF^Go0F_8Q9QFoGS1POo8W9_ETH]1eNW9U;eFkD]9V;`FjDb9Y;YFgDj9];oEcDS:b;gE]D]:e;]E[Df:f;VEZDl:h;QEWDQ;i;mDWDS;l;kDRDW;P00000000O1000O1000O100000O10O1000O1000O100000O1000O100000O1000000O01000000000O100000O10000000O100000000O1000000000000000000000000O100000000000000000O10000000000000000000000000000O10000000000001O00000000000000000000000000000000001O00000000000000000000000000000000O1000000000O100000O1000000O10000000000O1000000O10000000000000000O1000000000000O1000001N10001N2NUh7"}}, {"image_id": 41, "category_id": 1, "bbox": [127.0, 189.0, 373.0, 395.0], "score": 0.9998842477798462, "association_id": 2, "light": [-1.6761510372161865, -2.3338568210601807, 1.533082127571106, 2.1675877571105957], "segmentation": {"size": [774, 1024], "counts": "iXP3=e26da08k]O=ga0Mk]Oc0ka0Bj]Ok0Pb0YOf]OT1Sb0TO]]Ob1Tb0k2\\O:EY1hN7J7I5K3M4K7J7G6H9Fb0\\Oa0_O=E:E9J5L4N2N1N3N1N2N2N2N2O1O100O100000000000000001O00000O101O2N3M3M2N001O1N2O2N7Ij0WMSCeHP=Q7ZCmHg2fN[b0Q1]]Oe1^b0W2]^OcJQ`0l6L4N100O1O2N1O1N2N3N010O10O01000OO2M2M3O1N0J3013I7A>G:L4O2N2N3O02O1O1O3M6S@XIP>T7YA_I_>W8M1O1O1O1O000001O0O2O003L3M3M2N1L5K4K6B`0Bf@eHb>n6hASIY>h6iAZIW>b6kA^IW>\\5nBdJT=W5oBiJR=S5QClJS=n4PCRKS=g4QCYKP=c4SC]Kn<`4TC`Kn<[4UCdKnc0PDo4MaJP`8kA`GU>b8iA^GW>c8hA]GX>d8gA\\GZ>c8gA\\GZ>d8eA\\G[>e8dA[G]>f8aAZG`>g8^AYGc>m8VASGk>V9k@jFV?X9g@hFZ?Y9d@gF]?Z9a@fF`?Z9_@fFa?[9_@dFa?^9]@bFd?_9Z@`Fg?j9o_OVFQ`0V:101N10000RLS@UMm?f2\\@UMd?h2d@SM]?h2i@VMX?f2n@WMS?d2TAYMm>h0Y@ZMS1j1e>4oCHS^WOCbh0=^WOCbh0=^WOCbh0=^WOCbh0<^WOEbh0;^WOEbh0;\\WOA\\O4Xi0;\\WOGdh09[WOHdh09\\WOGdh09\\WOGdh09[WOHeh08[WOHeh08[WOHeh08ZWOIeh08[WOHeh07\\WOIdh07[WOJeh06[WOJeh06[WOJeh06[WOJeh06[WOJeh06[WOJeh06[WOJeh06[WOJeh06[WOJeh06ZWOKfh05ZWOKfh05ZWOKfh04[WOLeh04[WOLeh04ZWOMfh03ZWOMfh03ZWOMfh03ZWOMfh03ZWOMfh03ZWOMfh03YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh01ZWOOfh01ZWOOfh01ZWOOfh01ZWOOfh01ZWOOfh01ZWOOfh01ZWOOfh01ZWOOfh01ZWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh01ZWOOfh01ZWOOfh01ZWOOfh01ZWOOfh01ZWOOfh01ZWOOfh01ZWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWOMhh02YWONgh02YWONgh02YWONgh02YWONgh01ZWOOfh01YWO0gh00YWO0gh00YWO0gh00YWO0gh0OZWO1fh0OZWO0gh00YWO0gh00YWO0gh00YWO0gh00YWO0gh00YWO0gh00YWO0gh00YWO0gh0OZWO1fh0OYWO1hh0OXWO1hh0OXWO1hh0NYWO2gh0NYWO2hh0MXWO3hh0MXWO3hh0MWWO4ih0KXWO5hh0KXWO5hh0KXWO4ih0LWWO4jh0KVWO5jh0KVWO5jh0KVWO5jh0KUWO6kh0JUWO6kh0JUWO6kh0IVWO7jh0IVWO7jh0IVWO7kh0HUWO8kh0HUWO8kh0HUWO7lh0ITWO7lh0HUWO8kh0HUWO8kh0HUWO8lh0GSWO:mh0FSWO:nh0ERWO;di0O10000000000000000O100000O10000000O100000000000O10000000O1000000000000000O1000000000O10000000O10000000000000000000000000O1000000000000000000000000O100O2O0O3Nlk;"}}, {"image_id": 43, "category_id": 1, "bbox": [1014.0, 115.0, 258.0, 548.0], "score": 0.9956636428833008, "association_id": 2, "light": [-0.7568425536155701, -3.3325130939483643, 0.513113260269165, 3.141535758972168], "segmentation": {"size": [853, 1280], "counts": "TY]j01dj00000001N10000O101O000]VOLeh04YWOLVO0ai04XWOOhh01XWOOhh01XWOOhh01XWOOhh01XWOOhh01WWO0ih00WWO0ih00WWO0ih00mVOLJ4Yi00mVOLJ4Yi00mVOLJ4Yi00mVOLJ4Yi00mVOLJ4Yi00mVOMI3Zi00mVOMI3Zi00mVONH2[i00lVOOI1[i00lVOOI1[i00lVOOI1Zi0OoVO0G1Zi0OoVO0G1Zi0OoVO0G1Zi0OoVO0G1Zi0OoVO1F0\\:7Q4HmA1F0S:g0S4XOTB1F0P:P1P4oNYB2GOn9W1m3hN^B3FNm9[1n3cN_B4FNl9^1m3_NbB6DMl9`1m3]NcB6DMj9c1n3ZNdB6DMi9f1m3WNfB7BMi9i1m3SNhB7BMg9l1n3PNiB?X9d1m3mMjB`0W9h1l3hMmB`0V9k1k3eMoB`0V9l1j3dMPC`0U9o1i3aMRC?V9Q2g3`MSC?V9R2f3_MTC?U9T2f3]MUC?U9U2e3\\MVC?U9V2d3[MWC?T9X2c3ZMYC>T9Y2b3YMZC>T9Z2a3XM[C>T9[2`3WM\\C>T9\\2_3VM]C>T9^2]3TM_C>T9`2[3RMaC>T9b2Y3PMcC>T9c2X3oLdC>T9e2QJmL^50]G>T9g2lIoLb5L^G>T9i2hIPMe5I_G>T9l2bIRMi5CbG?S9P3[IRMo5_OcG?S9S3TITMU6ZOdG?S9V3nHUMZ6VOeG?S9X3jHUM_6SOdG`0S9Y3gHWMa6POeG`0S9\\3bHVMf6nNeG?T9`3\\HUMk6lNeG?T9f3THQMS7jNeG?S9W4bGcLf7gNeG?S9g4aFdLg8VNeG?S9f6XOkHeG?S9f6XOkHeG?S9f6XOkHeG?S9f6XOkHeG?S9f6XOkHeG?S9f6XOkHeG?S9e6YOlHdG?S9e6YOlHdG?S9e6YOlHeG>R9f6YOlHeG>R9f6YOlHeG>R9f6YOlHeG>S9f6WOlHfG>S9g6VOkHgG=T9h6XIQJi1jNkK=T9i6jHhJl1RNVL=T9j6dHRKl1gM\\L=T9k6aHUKm1cM^L=T9m6]HWKo1_M`L=U9n6XHYKR2\\MaL=W9o6QH[KV2YMaL>Y9R7gG]K]2SMcL>[9V7RGgKo2eLdL>^9^;lITDfL>`9^;hITDhL>c9^;bITDkL>e9^;^ITDmL>g9^;ZITDoL>i9^;VITDQM>m9\\;PIVDSM>X:S;cH_DUM>g:f:RHlDWM>o:a:gGQEZM>S;_:aGSE\\M>V;_:[GSE_M>W;_:YGSE`M>X;`:fGaE[8_:dGaE^8^:aGbE`8^:^GcEc8^:[GbEf8^:YGbEg8_:WGbEk8]:TGcEm8^:QGbEQ9`:kF`EW9e:bF[E_9k:ZFUEh9o;QERDP;n;oDRDR;m;nDSDR;n;mDRDS;o;lDQDU;o;jDQDV;PoL];e7^DVK6UM\\;c7bDVK2VM];b7dDWKNXM_;`7dDWKMYM`;_7dDXKKYMc;]7dDXKI[Me;Z7dDZKG\\Mg;X7cD[KF]Mj;U7aD]KE]Mm;T7`D]KC_Mn;S7`D]KB`Mn;S7cDZK_OcMo;S7dDWK]OeMPb0Z_Om0`2aN^>O__O_1R2bNi`0[1V_OeNn`0X1Q_OgNRa0W1m^OjNUa0U1j^OkNWa0U1h^OkNXa0U1h^OkNYa0T1g^OlNYa0T1g^OlNYa0T1g^OlNZa0S1f^OlN[a0T1e^OlN\\a0S1d^OmN\\a0S1d^OmN]a0R1c^OnN^a0Q1a^OPOaa0o0^^OQOda0m0\\^OROha0k0X^OUOja0i0V^OWOka0h0U^OXOma0f0S^OYOna0h0Q^OXOPb0g0P^OYOPb0g0P^OYOQb0g0n]OYORb0g0n]OXOSb0h0m]OXOTb0h0k]OXOUb0i0j]OWOWb0h0i]OXOXb0g0h]OXOYb0h0g]OXOZb0g0f]OYO\\b0e0d]O[O]b0d0c]O\\O_b0c0`]O\\Ocb0b0]]O^Oeb0?\\]OAgb09]]OEhb03\\]OLhf0N]Q6"}}, {"image_id": 43, "category_id": 1, "bbox": [286.0, 178.0, 470.0, 489.0], "score": 0.9476282000541687, "association_id": 3, "light": [-1.5145964622497559, -1.4551153182983398, 1.4413031339645386, 1.3213303089141846], "segmentation": {"size": [853, 1280], "counts": "_i^71cj03N1O000O2O000O10000O1000001O0000000O100000000000000000O1000000000000000000000000000000000000000000000O100000000000000000O100000000000000000000000000O100000000000000000000O1000001O0000O1000000000O10000000000000000000000O10000000000000000000000000000000000000O1000000000000000000000000000000O1000000000000O10000000O100000O1000000000000000000000000O100000000000000000000O10001O00000000000O1kK=X]OCbb0g0Z]OYO`b0P1]]OPO^b0X1_]OhNZb0b1c]O^NTb0o1h]OQNPb0Y2n]OgMja0c2T^O]Mha0i2V^OWMfa0n2Y^ORMca0T3[^OlL`a0Z3_^OfL\\a0b3a^O_L[a0f3c^OZLZa0l3c^OTL[a0P4c^OPL[4^AkK63S>]4dA`K1

a4lASKOa0P>d4mAlJMg0R>d4mAeJMl0R>e4oA^JMo0R>g4PBXJKU1R>j4oAQJH]1R>n4QBdI_Ol1\\>k4nAXISOa2l>`4cAXLZ>o3WA\\Lf>k7M3M3O2M2O1O1O1N2N2M3M3N2M3^NTDWDPW_OBi`0`0U_O@l`0`0S_O@m`0a0R_O_On`0c0P_O]OQa0b0o^O^ORa0a0m^O@Ua0?j^OAXa0=h^OCZa0_^OBaa0>_^OBaa0?^^OAca0?\\^OAea0>[^OBfa0=Z^OCga00O100O2O0O100O1O101N100O100O2O0O100O1O001O1I7I7K5N2O100O100O1N101O1O1O1O1O100O01000000000O010000O1000O10O100000O01000O10O10O1000000O0100000000O01000O1000O01000000O0100000O010000O1000O10O100000O100000O0100000000000O01000000O01000O10O100000000O010000O01000000O0100000000000O01000000O10O1000O10000000O1000O10O10000000OiMkNfFT1V9ROhFn0V9UOjFj0S9ZOmFe0Q9_OmFa0R9AQFVOLX1R:EnEVOOU1R:L[ElN27`0Q1S:g0mEYOQ:i0oEWOQ:i0PFVOo9k0QFUOn9k0SFUOl9l0TFTOl9l0TFTOl9>`E`Nd0R1k9a0^E_Nf0o0m9o0SFQOl9Q1SFZNXO@1O1000O100O10O10000000O1000O1000O0100000O10O10000O1O1000000OWO0dB0\\=1cBO]=1cBO]=1cBO]=1cBO]=1cBO]=1cBO]=1cBO]=1cBO]=1cBO]=1k0OO000eY31ZfL000000000000000000O10000000[Si3"}}, {"image_id": 45, "category_id": 1, "bbox": [441.0, 282.0, 327.0, 285.0], "score": 0.9999969005584717, "association_id": 2, "light": [-2.0102410316467285, -2.2382113933563232, 1.9162917137145996, 2.0559146404266357], "segmentation": {"size": [683, 1024], "counts": "gcV9:Vd0n0A`0SO^N\\]OR2Tb0k0F9M4K4L5G9H8L3M3M3L5K6K5L2N2L5K7I5M2M3L5J8I6K4L4M4L3M3N2M2M2N3M2N2O1O2O0N2O2M2N2OO01O1O1O2M2N4K5M2O1OLTClGifDg4HlJb;:jDe4FRKa;7lDd4DUKb;3mDe4CXKc;NnDf4A\\Kf;GnDb4DgKa=n3eBRL^=h3eBXL^=d3cB\\La=_3`BaLf=X3[BhLj=Q3XBoLk=l2WBTMl=i2SBXMP>g2nAYMX>b2gA^Ma>[2^AeMf>W2ZAiMh>V2WAjMk>S2VAmMn>n1SARNV?d1k@\\N[?]1f@cN]?Y1d@gNa?Q1b@oNg?d0]@\\Oib000000000000000000O10000000000000000000O10000000000000000000000000000000O10000000000000000000000000000000000000000000000000000000O100000O100000000000000000000000O10000000000000000000000O100000001O0000000000000O1000000000000000000000000O10000000000000000000000O1000000000000000000O100000000000000000000000000000000000000000000000000000000000001O00000000000000001O00000O101OeVZ5"}}, {"image_id": 45, "category_id": 1, "bbox": [781.0, 241.0, 242.0, 243.0], "score": 0.9999998807907104, "association_id": 1, "light": [-2.714564800262451, -1.7135803699493408, 2.581700325012207, 1.5106042623519897], "segmentation": {"size": [683, 1024], "counts": "cZY`02Ue07K4K5L3K6I6L4M3M2M4J6]Od0J6K5L4L4Lg0XO9@\\1mAdNT>]1jAcNW>^1gAbNZ>`1cA`N^>`1aA`N_>a1`A_Na>_1`AaNb>[1`AeNf>k0dAUOYb000000000000000000000000000O10O1000000000000000000000000000000O1000000000000000000000000000O100000000000000000000000000O2O0000001Nd6"}}, {"image_id": 46, "category_id": 1, "bbox": [2.0, 172.0, 530.0, 391.0], "score": 0.9999979138374329, "association_id": 2, "light": [-1.732306718826294, -1.964768409729004, 1.620670199394226, 1.8084466457366943], "segmentation": {"size": [683, 1024], "counts": "Vl12Xe02O00000O1000000O1000000000000000000O10000000000000000000000000000O10000000000000000000000000000000000000000O10000000000000000000000000O1000000000000000O1000000000O1000000000O100000000000000000O10000000O10000000O10000000000000000000O100000O10000000000000O100000000000000O10000000000O10000000O100000000000000000O0100000000000000000000O0100000000000O1000O1000000000000000O1000O10000000O10000000000000O1000O10000000O100000O1000O1000000000000000O1000O1000000000O10000000O1000000000000O0100000000000O1000000000000000O10O1000000000000000000O100000000000000000000O100000000000000000000O1000000000000000O01000000000000O10000O1000000O10000000000000000O100000000000000000000O10000000000000EY[O1hd0OY[O0gd0OZ[O1fd0OZ[O1ed00\\[OOdd01\\[OOdd01\\[OOdd00][O0cd00][O0cd00][O0cd00][O0cd00][O0cd00][O0cd0O^[O1bd0O^[O1bd0O^[O1bd0O^[O1bd0O^[O1bd0O^[O1bd0O^[O1bd0O_[O0ad00_[O0ad00_[O0ad0O`[O1`d0O`[O1\\?9QEFcK1Z?>PEAfK1Y?a0oD^OhK1Z?`0nD_OhK1[??mD@hK1\\?>lDAhK1\\??kD@iK1]?>jDAiK1^?>hDAjK1^?>hDAjK1^?>hD@kK2]?>hD@kK2\\?>jD@jK2\\?>jD@jK2\\?>jD@jK2\\?>jD@jK2]?;kDChK2^?8lDEgK3b?1iDLeK3^d0Mb[O3^d0Mb[O3^d0Mb[O3^d0Mb[O3^d0Lc[O4Z?K]E1YK4Q?5eEGZK4l>;iEA[K4j>>jE^O\\K4h>a0kE[O]K4g>c0kEXO_K5d>f0lEUO`K5a>k0ZFUOd9P1YFPOe9S1ZFmNd9W1ZFiNe9X1[FhNd9Z1[FfNd9[1\\FeNb9]1^FcN`9`1_F`N_9b1aF^N]9d1cF\\N\\9e1dFZN\\9h1cFXNm6LcFn1_2VNj65`Fh1e2SNh6=\\Fc1k2PNe6g0VF_1S3jMd6Q1mE[1^3dMd6V1dE^1f3\\Mf6[1PEi1]3hLRM4a:Q5WHQKWMNa:S5PFeKHCEEc:T5cEWLHWO1^Oc:V5`EbL]OoN`0YOc:X5[EgM1QMc:[5XEfM5oLb:S9^EmF`:U9`EkF^:W9bEiF\\:Y9dEgFY:\\9gEdFV:_9jEaFS:b9mE^FW9^:iFbEU9`:kF`ET9a:lF_ES9b:mF^ER9c:nF]ER9c:nF]ER9b:oF^EQ9a:PG_EP9`:QG`Eo8]:TGcEl8[:VGeEj8Y:XGgEh8X:YGhEg8V:[GjEe8T:]GlEc8i8]FTHT1SO_8^8RGaGS11k7\\8UIdGk6[8VIeGj6Z8WIfGj6W8XIiGj6S8XImGi6P8YIPHk6i7XIWHm6b7UI^Ho6]7RIcHR7X7oHhHV7R7kHnHZ7l6gHTI\\7g6fHYI\\7b6gH^IZ7_6hHaIY7]6hHcIY7\\6gHdIY7[6hHeIY7Z6hHeIY7Y6hHgIY7X6gHhIY7W6hHiIZ7U6fHkI[7S6fHmI[7Q6fHoI[7X1jDZ3l3^K[7V1kDY3l3aKY7V1kDW3n3cKX7T1lDW3m3eKX7R1nDW3j3gKX7P1TEV3c3iK[7o0dEg2R3YLZ7P1VFU2`2kL[7n0[FS2i=kM[BS2e=kM]BT2e=hM^BY2d=_MaBb2b=SMfBl2m?1O101N110O108H6J0N1000102N3M2M1N1O105L7I7IN010O0O2N5K4L3M4L3lLh^OP2[a0eMQ_OU2Yb0J6J5K3M2N2N3L9H>B7H5L2M4KeeW:"}}, {"image_id": 46, "category_id": 1, "bbox": [532.0, 529.0, 20.0, 17.0], "score": 0.8657422661781311, "association_id": 3, "light": [-1.9185662269592285, -1.1482255458831787, 1.7994728088378906, 1.103022575378418], "segmentation": {"size": [683, 1024], "counts": "m[S;1Ze0000O100C8W[OHhd0;V[OEid021O00000000O2N2O1MfYj9"}}, {"image_id": 46, "category_id": 1, "bbox": [144.0, 190.0, 275.0, 223.0], "score": 0.8357560038566589, "association_id": 1, "light": [-1.8217592239379883, -0.9243718385696411, 1.7434087991714478, 0.9186803102493286], "segmentation": {"size": [683, 1024], "counts": "[^P31Ze01O000000000000000O1000000000000000000000000000000000O10O10000000000000000000000000000000000000000000000O01000000000000000000000000000000O100000000000000O0100000000000000000000000000000000000000000000000000O1000000000000000000000O1000000000O100000000000000000000000000000000000000O0100000000000000000000000000000000000VJ>kEBP:j0hEWOV:n0^BQOa11P[2PBeMQ>Z2oAfMQ>Z2oAfMR>Y2nAgMR>Y2nAgMS>X2mAiMR>W2nAiMR>X2mAhMT>W2lAiMT>W2lAiMT>W2lAiMU>V2kAjMU>V2kAkMT>U2kAlMV>S2jAmMV>T2iAlMX>S2hAmMX>S2hAmMY>R2gAoMX>Q2hAoMX>R2gAnMZ>Q2fAoMZ>Q2fAoM[>Q2dAoM\\>Q2dAoM]>P2cAPN]>Q2bAoM_>P2aAPN_>P2aAQN_>o1`AQN`>o1`AQNa>n1_ARNa>n1_ARNb>n1]ARNc>n1]ARNc>n1]ARNd>m1\\ASNd>n1[ARNe>n1[ARNe>n1[ARNe>n1[ARNe>n1[ARNe>n1[ARNe>n1[ARNe>o1ZAQNf>o1ZAQNf>o1ZAQNf>o1ZAQNf>o1ZAQNf>o1ZAQNf>o1ZAQNf>o1ZAQNf>P2YAPNg>P2YAPNg>P2YAPNg>P2YAPNg>P2YAPNg>P2YAPNg>Q2XAoMh>Q2XAoMg>R2YAnMg>R2YAnMg>R2YAnMg>R2YAnMg>R2YAnMg>S2XAmMh>S2XAmMh>S2XAmMh>S2XAmMh>S2XAmMh>S2XAmMg>T2YAlMg>T2YAlMg>T2YAlMg>T2YAlMg>T2YAlMf>U2ZAkMf>U2ZAkMf>U2ZAkMf>U2ZAkMf>U2ZAkMf>U2ZAkMe>V2[AjMe>V2[AjMe>V2[AjMe>V2[AjMe>V2[AjMe>V2[AjMe>V2[AjMe>V2[AjMd>W2\\AiMd>W2\\AiMd>W2\\AiMd>W2\\AiMd>W2\\AiMd>W2\\AiMd>X2[AhMe>X2[AhMe>X2[AhMe>X2[AhMd>Y2\\AgMd>Y2\\AgMd>Y2\\AgMd>Y2\\AgMd>Y2\\AgMd>Y2\\AgMd>Y2\\AgMd>Y2\\AgMd>Y2\\AgMd>Z2[AfMd>[2\\AeMd>[2\\AeMd>[2\\AeMd>[2\\AeMd>[2\\AeMd>[2\\AeMd>[2\\AeMd>[2\\AfMc>Z2]AfMb>[2^AeMb>[2^AeMb>\\2]AdMc>\\2]AdMc>\\2]AdMc>\\2]AdMb>]2^AcMb>]2^AcMb>]2^AcMa>^2_AbMa>^2_AbMa>^2_AbM`>_2`AaM`>_2`AaM_>`2aA`M_>`2aA`M^>a2bA_M^>a2bA_M^>a2bA_M]>b2cA^M]>b2cA^M]>b2cA^M]>b2cA^M\\>c2dA]M\\>c2dA]M\\>c2dA]M[>d2eA\\M[>d2eA\\M[>d2eA\\M[>d2eA\\M[>d2eA\\MZ>e2fA[MZ>e2fA[MZ>e2fA\\MY>d2gA\\MX>e2hA[MX>e2hA[MX>e2hA[MX>e2hA[MW>f2iAZMW>f2iAZMV>g2jAYMV>g2jAYMV>g2jAYMU>h2kAXMU>h2kAYMT>g2lAYMT>g2lAYMS>h2mAXMS>h2mAXMS>h2mAXMS>h2mAXMS>h2mAXMS>h2mAYMQ>h2oAXMQ>h2oAXMQ>h2oAXMQ>h2oAXMQ>h2oAXMQ>h2oAXMQ>h2oAXMP>i2PBWMP>i2PBXMo=h2QBXMo=h2QBXMn=h2SBXMm=h2SBXMm=h2SBXMm=h2SBXMl=i2TBWMl=i2TBWMk=j2UBVMk=j2UBVMj=k2VBUMj=k2VBUMi=l2VBUMj=k2VBVMh=k2XA_L9f0_>j2XAcL7c0a>j2WAfL6`0b>k2XAfL5?c>k2WAhL5=d>k2WAiL4k2VAkL4:e>l2WAjL4:e>l2WAkL39f>l2VAmL28h>k2VAmL28h>k2VAmL28g>l2WAmL17h>m2UAmL36h>m2UAmL36h>m2UAmL37g>l2VAmL28g>l2WAlL28g>m2VAkL38g>m2VAkL38g>m2VAkL29g>m2WAjL29g>n2VAiL3:f>m2VAjL49e>n2WAhL4;e>m2WAhL4;e>n2VAgL5n2XAfL5n2XAfL4=c>n2YAeL4>b>n2XAeL6=b>n2XAeL6=b>n2XAeL5?a>m2ZAcL6`0`>n2YAbL7`0`>n2YAbLN^O2R1g>n2YAbLM@1R1g>m2ZAbLMA1P1h>n2YAaLNA1P1h>n2YAaLNB0o0i>n2YAaLMD0m0j>o2XA`LNDOo0i>n2ZA_LNDOo0i>n2[A]LOEMP1i>o2[A[LOFMP1h>P3]AYLOGKP1i>Q3]AVL0Q1c>j2]ATL0S1a>k2_AQL1S1`>l2`AoK1U1^>n2aAkK0Z1^>l2eAhKJ]1`>l2eAaMZ>`2cAcM[>_2cAdMd0mMj<`4aBfM7^NP=m3gBmNT=i4L2O1N2O1O1O7H5L2N001N101O001O1N101O0O101O0O101N10001O0O101O000O2O0000001O000O101O0000000000000000001O0000000O10000000000000hLZDiLf;W3ZDiLf;W3ZDiLf;W3[DhLe;X3[DhLe;X3[DiLd;X3[DhLd;Y3]DfLc;Z3]DfLc;Z3]DfLc;Z3]DfLc;Z3^DeLb;[3^DeLb;\\3]DdLc;\\3^DcLb;]3^DbLc;^3]DbLc;^3^DaLa;`3_D`La;`3`D_L`;a3aD^L_;c3aD\\L_;d3bD[L^;e3cDZL];f3dDYL\\;g3eDXLZ;i3fDWLZ;i3fDWLZ;i3fDWLZ;j3fDULZ;k3fDULZ;k3fDULZ;k3fDULZ;k3fDUL[;j3fDULZ;k3fDULZ;k3fDULZ;k3fDULZ;k3fDULZ;l3eDTL\\;k3dDUL\\;k3dDUL\\;k3dDUL\\;k3dDUL\\;k3eDTL[;l3eDTL[;l3eDTL[;l3eDTL\\;k3dDTL];m3bDSL^;m3bDSL^;m3bDSL^;m3cDRL];n3cDRL];n3cDRL];n3cDRL];n3cDRL^;m3cDRL];o3bDQL^;n3cDRL];n3cDRL];n3cDRL^;l3dDSL\\;m3dDSL\\;l3eDSL];l3cDTL];l3cDTL];k3dDUL];j3cDVL];i3dDWL];h3dDWL\\;h3eDXL\\;g3dDYL\\;f3eDZL\\;e3dD[L\\;d3eD\\L\\;c3dD]L\\;b3eD^L[;b3eD^L\\;`3eD`L[;`3eD`L[;_3gD`LZ;_3fDaLZ;^3gDbLY;^3gDbLY;^3gDaLZ;^3gDbLZ;]3fDcLZ;\\3gDdLY;[3hDeLX;[3hDeLY;Y3hDgLX;W3kDhLU;V3mDjLT;R3oDnLQ;n2SERMn:g2XEYMi:e2XE[Mj:b2XE]Mj:`2WE`Mk:]2VEcMl:[2TEdMm:[2UEdMl:Z2UEfMk:Z2VEeMk:Y2VEgMj:Y2WEfMi:Y2YEfMh:Y2YEfMg:Y2[EfMe:Z2\\EeMd:Z2^EeMc:Z2]EfMc:Z2]EfMc:Z2^EeMb:Z2_EfMa:Z2_EfMb:Y2_EfMa:Z2_EeMb:[2^EeMb:Z2_EfMa:Z2`EeMa:Z2_EfMa:Z2_EfMa:Z2_EfMa:Z2`EeMa:Y2`EgM`:Y2`EgMa:X2_EhMa:X2`EgM`:Y2`EgMa:X2`EgM`:Y2_DmKCi1o;X2\\DSLEd1o;Y2YDVLI`1n;Z2WDYLK\\1o;Z2TD\\LNY1n;[2TD\\LOX1m;\\2TD]LOV1m;]2SD^L0U1m;]2SD^L1T1m;\\2SD`L0T1m;\\2SD`L1S1l;]2RDaL2R1l;]2RDbL2P1l;^2RDbL2P1l;^2RDbL2P1l;^2RDbL3o0k;_2RDbL3o0k;_2RDbL3o0k;_2RDbL3n0l;`2QDbL4m0k;a2QDbL4m0k;a2QDbL4m0k;a2QDbL5l0j;b2QDaL6m0j;a2PDbL6m0j;a2PDbL7k0j;c2oCbL7k0j;c2oCbL8j0i;d2oCbL8j0i;d2oCbL9i0h;e2oCbL:g0h;g2nCbL=d0e;j2nCbL`0`0c;n2mCbLc0=`;Q3mCaLf0<];S3mCaLg0:];T3mCbLg09\\;U3mCbLh08[;V3mCbLh07\\;X3kCaLj06[;Y3kCaLj06[;Y3kCaLk05Z;[3jC`Ll05Z;[3jC`Lm03Z;]3iC`Lm03Z;]3iC`Lm03Z;^3hC^LP13X;_3hC^LP13X;_3hC^LQ11X;b3fC]LR11X;b3fC]LS10W;d3fC[LS11W;d3fC[LT1OW;g3dCZLU1OW;g3dCYLW1NV;j3bCXLY1LV;m3aCVLZ1KV;P4_CUL]1HU;T4]CTL`1ET;X4[CSLR?n3n@PLS?Q4m@mKT?T4m@hKU?Y4k@eKV?\\4m0001O001O001O1O001O1O1O1O1O2N1O2N1O2N0O2O00001O00001O00001OO100000000O1000000O10000O100O1N2N2N2L4UN`_OeNd`0Y1c_O_N``0_1f_O[N\\`0d1g_OXN[`0f1i_OWNX`0h1j_OUNX`0j1j_OTNX`0j1j_OlM_`0S2c_OiM``0V2b_OfMa`0Z2Y1O1O1O1O1O1O2N1O100O1O1O1O2N1O100O1O2N100O100O2O0O101N100O2O0O2O1N1O2O1N2N1O3M2O1N2N2N2N2N2N2N2N2O2M2N2O1M3KbeX3"}}, {"image_id": 49, "category_id": 1, "bbox": [695.0, 51.0, 195.0, 139.0], "score": 0.9999999403953552, "association_id": 1, "light": [-2.705138683319092, -1.6369837522506714, 2.6341233253479004, 1.490216612815857], "segmentation": {"size": [768, 1024], "counts": "o[Y`0h0Sg09I4M2O2M2J7M3L3M4N101O0O2O1O0O2O001O000O101O0O1O2M3M2O2O0O2bZO`MYe0a2gZO`MWe0a2iZO`MUe0f2O3M5K2N1O2M2O1N3M2O1O2N100O1O100O1N2O1N3NAn[ORMQd0o2o[OQMPd0P3P\\OPMPd0P3P\\OPMPd0P3P\\OPMoc0Q3Q\\OPMnc0P3R\\OPMmc0Q3S\\OoLmc0Q3S\\OoLmc0Q3S\\OoLlc0R3T\\OnLlc0R3T\\OnLlc0R3U\\OmLkc0T3T\\OlLkc0U3U\\OkLkc0U3U\\OlLjc0T3V\\OlLjc0T3V\\OlLjc0T3V\\OlLjc0T3V\\OlLjc0T3V\\OlLjc0T3V\\OlLjc0T3V\\OlLjc0T3V\\OlLjc0T3V\\OlLjc0T3V\\OlLjc0T3V\\OlLjc0S3W\\OmLhc0T3W\\OnLhc0R3X\\OnLhc0R3X\\OnLhc0R3X\\OnLhc0R3X\\OnLhc0R3X\\OnLhc0R3X\\OnLhc0R3X\\OnLhc0R3X\\OnLhc0e300000^OX\\OlLhc0T3X\\OmLgc0S3Y\\OmLgc0S3Y\\OmLgc0f300000^OY\\OkLgc0g3000000O1000000000000OF[\\O[Lec0P400000000O10I\\\\ORLdc0o3\\\\OPLdc0P4\\\\OPLdc0P4\\\\OPLdc0P4\\\\OPLdc0P4\\\\OPLdc0P4\\\\OoKec0Q4[\\OoKec0Q4[\\OoKec0V400000000000F[\\OYLec0f3\\\\OZLdc0c3^\\O^Lbc0P40O101UOZ\\OZMfc0e2Z\\O\\Mfc0c2Z\\O^Mfc0^3000ROY\\OcMgc0\\2Y\\OeMgc0Y31QOX\\OfMhc0Z2X\\OfMhc0Y30O2O001O0O10000O101O0O100O2O001O1ROm[OlMTd0S2m[OmMTd0R2l[OnMTd0Q2m[OoMTd0o1m[OQNSd0m1o[OSNQd0e1W\\OZNkc0c1W\\O]Nic0a1Y\\O]Njc0a1W\\O\\Nmc0b1T\\O^Nmc0_1U\\O`Nmc0]1U\\OcNlc0[1U\\OdNmc0Z1T\\OfNmc0X1T\\OgNoc0V1R\\OiNQd0T1P\\OlNWd0i0m[OWO^f0O100O1O10001N10U[T3"}}, {"image_id": 49, "category_id": 1, "bbox": [301.0, 62.0, 130.0, 94.0], "score": 0.9999746680259705, "association_id": 3, "light": [-0.053224604576826096, -4.45531702041626, -0.04128401353955269, 4.309800624847412], "segmentation": {"size": [768, 1024], "counts": "fkQ71hg0?F7J2N3L4K4O2M3N1N3N0O2M2O1fYO`NSf0a1lYO`NTf0a1kYO`NSf0a1lYO`NTf0`1lYO`NSf0a1mYO_NRf0b1nYO^NPf0d1PZO\\Noe0d1RZO\\Nne0d1RZO]Nle0d1SZO]Nme0b1TZO^Nle0b1TZO^Nke0b1VZO^Nie0b1XZO^Nee0e1ZZO\\Nee0e1[ZO\\Nde0d1\\ZO\\Nde0c1]ZO]Nce0c1]ZO]Nce0c1]ZO]Nce0c1\\ZO^Nce0c1]ZO]Nce0c1]ZO]Nbe0d1^ZO\\Nbe0d1^ZO]Nae0c1_ZO]Nae0c1_ZO]Nae0d1^ZO\\Nbe0d1^ZO\\Nae0e1_ZO[N_e0g1aZOYN]e0j1bZOVN]e0k1cZOUN\\e0l1dZOTN[e0Y20000O100O10000O10000O10IiZOeMWe0b20JiZOcMVe0^2jZObMVe0^2jZObMUe0_2kZOaMUe0_2lZO`MTe0`2lZO_MTe0b2mZO\\MTe0d240O100O10O10000000O1000000000000000O10000001O0000000000000001O000000000O10000000000O2O00001N1jMcZOi1]e0VNeZOi1\\e0UNfZOi1[e0WNfZOh1Ze0WNgZOg1[e0XNgZOf1Ze0WNiZOh1je0K5M4K7F6K<@Qel="}}, {"image_id": 49, "category_id": 1, "bbox": [178.0, 46.0, 158.0, 101.0], "score": 0.9999990463256836, "association_id": 5, "light": [-2.390683889389038, -1.9020367860794067, 2.382289409637451, 1.8253531455993652], "segmentation": {"size": [768, 1024], "counts": "ibU4;bg0e0\\O3N2L4L4I7N2N1O2N1O1M3M4O0O100O2O0O1O2N101N100O2N2O1hZOdMjd0\\2U[OfMjd0[2T[OfMkd0[2U[OeMkd0\\2S[OeMld0]2S[OcMld0^2T[ObMld0_2S[OaMmd0_2S[OaMmd0_2S[OaMmd0_2S[OaMmd0_2S[OaMld0`2T[O`Mld0`2T[O`Mld0`2T[O`Mld0`2T[O`Mld0_2U[ObMjd0^2V[ObMid0_2V[ObMjd0]2W[OcMid0]2W[OcMid0\\2X[OdMgd0\\2Z[OdMfd0[2[[OeMed0Z2\\[OfMdd0Z2\\[OfMdd0Z2\\[OfMdd0Y2\\[OhMdd0X2\\[OhMdd0X2\\[OhMdd0X2\\[OhMdd0X2\\[OhMdd0X2\\[OhMdd0X2\\[OhMdd0X2\\[OhMdd0X2[[OiMed0W2[[OiMed0W2[[OiMed0W2[[OiMed0W2[[OiMed0W2[[OiMed0W2[[OiMed0W2[[OiMed0W2[[OiMed0X2Z[OhMfd0X2Z[OhMfd0X2Z[OhMfd0X2Z[OhMfd0X2Z[OhMfd0X2Z[OhMfd0X2Y[OiMgd0W2Y[OiMgd0X2X[OhMhd0X2X[OhMhd0X2X[OhMhd0Y2W[OgMid0Y2W[OgMid0Y2W[OgMid0Z2V[OfMjd0Z2V[OfMjd0Z2V[OfMjd0[2V[OdMjd0\\2V[OdMjd0i21O0000000GU[O]Mkd0d2U[OZMld0f2T[OZMld0g2U[OWMkd0i2V[OVMkd0i2V[OVMjd0j2V[OUMkd0k25000P[OUMkd0k2T[OVMld0j2S[OXMld0h2T[OXMld0h2S[OYMmd0f2S[O[Mmd0l2000000000O100DR[OfMnd0Y2S[OgMmd0Y2S[OgMmd0Y2S[OgMmd0Y2S[OgMmd0X2T[OgMmd0Y2S[OgMnd0X2R[OhMnd0W2T[OhMld0W2Z[OaMid0^2_ZO@ce0>P1N2O2O0O100O1O2O0O1000001N10001NRfn0"}}, {"image_id": 49, "category_id": 1, "bbox": [102.0, 146.0, 848.0, 350.0], "score": 0.9999916553497314, "association_id": 4, "light": [-1.2836220264434814, -2.0319995880126953, 1.1884939670562744, 1.7559003829956055], "segmentation": {"size": [768, 1024], "counts": "bi\\2;`0JTf0[1nYOcN1=mc0[1k[OaNOe0dc0R1V\\ObNMb0gc0R3M4M2N2O1N2O1N2O1N2O1O001O1O001O001O00001O001O00001O00001O00001O0000001O0000001O002O1N0010O010O00100O6J7I2N2N2N3M3M1O1O1O100Ob]OgKVa0X4h^OkKXa0T4f^OnKZa0R4d^OPL]a0o3b^ORL_a0m3`^OTL`a0l3_^OULba0j3]^OXLba0h3]^OYLca0g3]^OYLca0g3^^OXLca0g3^^OXLba0h3^^OXLba0h3_^OWLaa0i3`^OVL`a0j3`^OVL`a0j3`^OVL`a0j3a^OUL_a0k3a^OUL_a0k3b^OTL_a0k3a^OUL_a0k3a^OUL_a0k3a^OUL_a0k3b^OTL^a0l3b^OTL^a0l3b^OTL^a0l3b^OTL^a0l3b^OTL_a0k3b^OTL^a0l3b^OTL^a0l3b^OTL^a0l3b^OTL^a0k3c^OUL]a0k3c^OUL]a0k3c^OUL]a0k3c^OUL]a0k3d^OTL\\a0l3d^OTL]a0k3c^OUL]a0k3c^OUL\\a0l3d^OTL\\a0l3c^OUL\\a0m3c^OSL\\a0n3d^ORL\\a0n3d^ORL[a0o3d^ORL[a0o3e^OQLZa0P4e^OQL[a0o3e^OQLZa0P4e^OQLZa0P4e^OQLZa0P4e^OQLZa0P4d^ORL[a0o3d^ORL[a0o3c^OSL\\a0n3c^OSL\\a0n3c^OSL\\a0n3c^OSL\\a0n3c^OSL]a0m3b^OTL]a0m3b^OTL]a0m3b^OTL^a0l3b^OTL]a0m3b^OTL^a0l3b^OTL]a0m3b^OTL^a0l3b^OTL]a0m3c^OSL]a0n3a^OSL_a0m3a^OSL^a0n3b^ORL^a0n3a^OSL_a0m3a^OSL^a0n3a^OSL_a0m3a^OSL^a0o3`^ORL`a0n3_^OSL`a0n3`^ORL`a0n3_^ORLaa0P4]^OQLca0o3\\^ORLca0o3\\^ORLba0Q4[^OQLba0R4]^OoKaa0Y5N2M3O1O1O1O1O001O100O1O100O010O100@ZIe_Og6W`0c0J7I6M3M3O100O100O101N1O1O1O1N2N2N2O1O100O1O100O100O101O0O010O100O010O10O01O0010O01O010O010O010O010O01O010O10O01O10O010O010O7J2M1O2N2O0O2N1O2N1O1O2M2OWOeAoGZ>Q8fAQHX>o7iAQHV>n7kASHU>l7lATHS>l7mAUHS>j7mAWHR>i7oAXHP>h7oAYHP>g7PBZHP>e7PB\\Ho=e7PB\\HP>c7PB^HP>b7oA`Ho=`7QBaHo=_7PBbHP>^7PBbHP>^7oAcHP>]7QBcHo=]7PBdHP>\\7PBdHP>[7QBeHn=\\7QBfHn=Z7RBfHn=Y7SBgHl=Z7TBfHl=Z7SBgHm=Y7SBgHl=Y7UBgHk=Y7UBgHj=Z7VBfHj=Y7VBhHi=Y7WBgHi=Y7WBgHh=Y7YBgHg=Y7YBgHg=Y7XBhHg=Y7YBgHg=X7ZBhHf=X7ZBhHe=Y7[BhHd=W7\\BjHd=V7\\BjHd=V7\\BjHc=V7^BjHb=V7]BkHc=U7]BkHc=U7]BkHb=U7_BkHa=U7^BlHb=S7_BmHa=S7_BmH`=T7`BlH`=S7aBmH_=S7`BnH`=R7`BnH_=R7bBoH]=Q7cBoH]=Q7cBoH]=Q7cBoH\\=Q7dBPI\\=P7dBPI[=Q7eBoH[=Q7eBoH[=P7fBPIY=Q7gBoHY=Q7gBoHY=Q7gBPIW=Q7hBPIX=o6iBQIV=P7jBPIV=P7jBPIV=P7jBPIU=Q7kBoHU=Q7kBoHU=P7lBPIS=Q7mBoHS=Q7mBPIR=P7mBQIS=o6mBQIS=o6mBQIS=o6mBQIS=o6mBQIS=o6mBQIS=o6mBQIS=o6mBQIS=o6lBSIS=m6mBSIS=m6mBSIR=m6oBSIQ=m6oBSIQ=m6oBSIQ=m6nBTIR=l6nBTIR=l6nBTIR=l6nBTIR=l6nBTIR=l6mBUIS=k6mBVIR=j6nBVIR=j6nBVIR=i6oBWIQ=i6nBXIR=h6nBXIQ=i6oBWIQ=i6oBWIQ=i6oBWIQ=i6oBWIQ=h6PCXIP=h6oBYIQ=g6oBYIQ=g6oBYIQ=f6PC[IoV_OBj`0>W_O@k`0>V_OBj`0=W_OCj`0;W_OEi`0:X_OEj`09W_OGi`08Y_OGh`07Y_OIh`05Y_OJh`05Y_OKh`03Z_OLg`01[_OOf`0N\\_O2e`0I__O6c`0Eb_O:_`0Af_O>[`0[Ol_Od0U`0VOQ@i0cc0O2O1O1O0O2O00001N10001O0O10001N100O2O0O101N103LkSg1"}}, {"image_id": 50, "category_id": 1, "bbox": [390.0, 4.0, 203.0, 231.0], "score": 1.0, "association_id": 1, "light": [-2.282613754272461, -1.9257934093475342, 2.1637234687805176, 1.8335566520690918], "segmentation": {"size": [683, 1024], "counts": "Q[T85Te05L2N2O1N1O100O10001N10000O1000000O10000000000O100000000000000O1000O1000O1000O0100O010N2N101O1O0O2J5M4O001O10O0100000O1000101N_Oa0M3N2N2N1N3M3N2N2N2M3M3M201N1O2N10ZO`]OcN_b0^1a]OaN`b0_1`]OaN_b0`1a]O_N`b0a1`]O_N_b0a1b]O^N_b0b1`]O_N_b0b1a]O]N^b0d1c]O\\N[b0f1d]O[N[b0f1e]OZN[a0]Ob_OY2SOZN]`0Dh_O;f0h1UOYNX`0d0^@V1ZOVNR`0m0^@o0@TNk?Z1\\@[1b?X2N1FFc@\\KQ?e5L4N1O2O100O`MZA\\Ng>c1\\A[Nc>g1[AZNe>V4000O1000000O100000000O100000000O100000000O100000000O1000001O00001O001O1N2O1O001O0dJm@j3MRLX?3n@g3JWLX?1PAf3IYLW?0RAe3H[LW?NSAf3F[LZ?LQAh3F\\L_?_OSAT4^O]LY`0b3f_O^L[`0b3e_O^L\\`0a3d_O_L^`0_3b_OaL_`0]3a_OdL``0[3`_OeLa`0Z3__OfLb`0X3__OhLa`0X3__OgLb`0X3__OhLa`0W3`_OiL``0V3a_OjL_`0U3b_OjL``0U3a_OjL_`0T3c_OlL_`0X2b_OcM05_`0T2^@kMc?S2^@lMd?R2]@nMc?Q2_@mMb?R2l101N11O001O001001N101N010O0O2O001O002M2O1O1N2N2M8Ge\\o8"}}, {"image_id": 50, "category_id": 1, "bbox": [16.0, 83.0, 295.0, 599.0], "score": 1.0, "association_id": 2, "light": [-1.2128093242645264, -2.8320963382720947, 0.9905497431755066, 2.675016164779663], "segmentation": {"size": [683, 1024], "counts": "dZ;1Xe03L4L3L4O2O0O101N1O1O1O1O100O2O0O100O1O1O1O1O1000O01jJGYE:e:MUE3l:NRE3n:MQE4o:MPE3P;MoD3R;MnD3R;NlD3S;NlD3T;MkD4U;LjD5V;KjD6T;KkD6U;IlD7S;JlD7T;HmD8R;InD7R;ImD8R;HoD8Q;HnD9R;GnD9mNfNY9Q1iG:nNfNX9o0kG;mNhNV9m0lGlNoNQ9c0RH?mNQOn8`0UH?mNTOk8=WH`0mNVOj89ZHa0mNVOh89[H`0nNVOg8;[H?nNUOh8;ZHa0oNROh8=YHa0POnNj8a0VHa0POhNP9f0QHb0S;^OmDb0R;^OoDb0Q;^OnDc0R;\\OnDe0R;ZOoDf0Q;YOoDh0]ObNT8d0aHj0POmN_88aHl0lNQOb82cHm0kNROa81cHn0kNROb8OdHo0jNSOa8MeHQ1jNROa8MeHQ1iNTOa8JfHS1iNSO`8KgHR1iNROa8LeHS1kNPO`8LfHT1jNPO`8LeHU1kNoN_8MfHT1kNoN_8MeHU1lNmN_8NeHV1mNkN^8OdHW1nNjN^8OcHX1oNiN]80cHX1POhN\\81dHW1oNjN[8OfHX1oNjNX80iHV1nNkNX80iHV1oNkNU81lHT1oNkNS83mHS1oNlNQ83oHR1POlNn74RIP1POlNm75RIP1POmNk74VIo0POkNi78VIn0ROiNe7b5RNkJa1E8e5TNfJd1G5h5SNbJh1H1j5RN`Jn1GNl5QN]JR2IIo5PNZJW2IES6PNSJ\\2L_OY6PNkIb2MYOb6nM`Ij22POm6kMPIV36iNV7hMeF_O2"}}, {"image_id": 50, "category_id": 1, "bbox": [690.0, 209.0, 320.0, 284.0], "score": 0.999282956123352, "association_id": 3, "light": [-1.3068222999572754, -2.389974355697632, 1.1689540147781372, 2.20499587059021], "segmentation": {"size": [683, 1024], "counts": "Zc\\>3Se07K5M3L5L2O1N2O1O101N101mM]O[_Oe0^`0E\\_O?^`0Ea_O=[`0Fd_O:Z`0Id_O8Z`0Jf_O6X`0Od_O2Z`0Lj_O3U`0Nl_O2Q`00P@0m?2U@Mh?5Y@Kb?9_@G]?;f@DV??k@BQ?`0PA@m>b0TA]Ok>d0VA\\Oh>e0YA[Oe>f0[AZOc>g0^AZO_>h0bAXO[>i0fAXOS>n0mASOa=^1`BcNX=b1iB_NQ=f1PCZNkT2XAkMk>R2VAnMl>P2TAoMn>o1SAQNm>n1SARNn>m1SASNl>m1TASNm>l1SATNm>l1SAUNl>k1UATNk>l1UAVNi>j1WAVNj>i1VAXNi>h1XAXNg>h1YAXNg>h1YAXNg>h1YAYNf>g1[AYNd>g1\\AZNb>h1]AXNc>h1^AXN`>i1`AWN_>k1`AVN^>k1cATN]>l1cAUN[>m1eARN[>n1fARNX>o1hAQNX>P2hAPNV>Q2jAoMV>R2jAmMU>T2kAlMT>V2lAjMR>X2mAhMR>Z2mAfMQ>_2mA`MQ>d2mA\\MR>h2kAXMT>j2lAVMR>l2mATMR>n2nAQMQ>Q3nAoLQ>R3PBnLm=T3SBlLk=W3UBhLg=\\3ZBdL`=b3aB\\LV=m3kBRLQ=R4PCmKnS3@jK;ebDZOfK7h?`0^D\\OjK4h?a0[D]OmK2g?c0YD^OoKOh?d0WD^OQLNh?e0UD^OSLLh?h0TD\\OTLLh?i0RD\\OVLKg?k0RD[OWLHh?n0PDZOXLGh?Q1oCXOYLFh?T1nCVO[LDg?X1mCTOTYO[:b0YE5;YO]:?[E78ZO]:=^E85[O_:9`E;O]Ob:3eE>I_Oi:EgEj0@A[>=dAC^>;bAE_>:aAF`>:_AFb>9]AHd>7\\AIe>7ZAIg>6YAJg>6YAJh>5XAKj>4UALl>3TAMm>2SANn>1RAOo>1o@0Q?0o@0R?On@1R?On@1R?0m@0S?0l@1T?0j@1V?Oe_O^OId0b`0Og@2X?0f@1Z?Od@3\\?Na@4_?M^@5a?M\\@5d?LY@6g?Kl_Oa0S`0@l_Oa0S`0Ak_O`0T`0Bi_O`0U`0Bj_O?T`0Dh_O?U`0Eh_O=U`0Gh_O;V`0Hg_O:W`0Hg_O:X`0Hf_O9Y`0Kb_O7]`0M[_O8e`0IY_O8f`0JX_O7g`0KW_O6i`0V2O001O1O1O100O10O2O1[Mj_O2X`0Jn_O1W`0HQ@O\\`0@Q@0W`9"}}, {"image_id": 51, "category_id": 1, "bbox": [376.0, 385.0, 206.0, 45.0], "score": 0.8635349869728088, "association_id": 1, "light": [-1.244920015335083, -2.621506929397583, 1.1544196605682373, 2.5408709049224854], "segmentation": {"size": [666, 1002], "counts": "Ynd74ed02O1O0000001O00000000000000000000001O000000001O0000000000001OO101O000000000000000000010O00000000000000000000000001O000001O000000000010O0000000001O0001O00000000001O0001O00000001O00000001O0001O00000000001O01O0000000000000001O01O00000000000000010O00000000000010O00000001O0000001O00001O001O000000010O00000O10001O1OcW36VhL7H5F7M4M10001N10M3O10001O001000O2O1O3L3N2N1O1OO1N2N2N200O100O1001O1O000000O1O2M3L4H8M3LUi`8"}}, {"image_id": 51, "category_id": 1, "bbox": [2.0, 208.0, 145.0, 81.0], "score": 0.9999278783798218, "association_id": 2, "light": [-0.9684669375419617, -1.5292199850082397, 0.8735955357551575, 1.3061792850494385], "segmentation": {"size": [666, 1002], "counts": "oa11fd05N1O001O001O1O001O001O0000001O0000000000001O0000010O0001O001O010O00001O001O01O0000000000001N100000000O10001O0O1001O000000O11O01O0000000001O000O2O0001N3M2O0O2M3N1O1O1O1O1M3O1iNQOX^OZ1ea0o0O1O1O100O100O100O10000000000001O1O001O002N4L2N6J7I1O2N3M1O2N2N2N6J2N1O1O1O1O001O00001O1O1O0000001O1N2O1O1N3M5G[j[a0"}}, {"image_id": 52, "category_id": 1, "bbox": [148.0, 77.0, 337.0, 474.0], "score": 0.9999952912330627, "association_id": 1, "light": [-1.5056328773498535, -1.8947323560714722, 1.364293098449707, 1.7225998640060425], "segmentation": {"size": [683, 1024], "counts": "fWS31We06M0O101N1000001N1000001N10000O100000001O0O1000001N1]O_O\\\\Oa0dc0AZ\\O?ec0B[\\O>ec0B[\\O>dc0C[\\O>ec0CZ\\O>Vc0^Oi\\O41>Vc0^Oh\\O60=Wc0^Oi\\O50=Wc0_Oh\\O5O=Yc0^Og\\O8N:[c0_Of\\O7N;\\c0^Of\\O8M:]c0_Oe\\O7M;^c0^Od\\O8N:U>Q4VB]KG9M9P>[4XBSKK9L:o=`4VBmJOU1i=R4VBiJ1V1g=T4VBfJ3V1f=W4UBdJ3V1g=W4VBcJ3V1f=a4ZB`Kd=b4[B^Kc=V6O1N2N2O1O1O100O1OVNeBfKZ=Z4gBfKW=[4kBdK^7bNiMj5jJdKY7kNdKL`Nf5dNcKT7RO_K0aN^5lNaKQ7VO[K2cNX5RO`Ko6YOWK4dNT5WO_Km6[OUK6dNQ5ZO^Kl6^ORK7dNo4^O\\Kk6@PK9dNl4A[Kj6DlJj5_AVJa>j5_AVJb>h5_AXJa>g5`AYJa>e5aAZJ`>c5bA]J^>a5dA_J]>_5dAaJ]>\\5eAdJ\\>Z5eAgJ\\>V5eAjJ\\>T5fAkJ[>S5fAmJ[>Q5fAoJ[>o4fAQKZ>n4gARKZ>k4iATKX>h4kAXKU>f4mAZKT>c4nA]KR>a4PB`Ko=_4RBaKo=]4RBcKn=\\4TBcKm=[4TBeKm=X4UBhKl=U4VBkKl=P4WBPLk=k3YBTLi=h3YBXLi=d3YB\\Lh=a3ZB_Lg=^3\\BaLe=]3\\BcLd=[3^BeLc=Y3^BgLc=V3_BjLb=S3`BnLa=o2`BQMa=l2aBTMa=i2aBVMa=f2aBZM`=d2aB\\Ma=a2`B_Ma=_2`BaMb=Z2aBfMa=U2bBkMa=n1cBRN`=g1eBXNj=d0kB\\Ob=MhB3Xa0000001O000000000O2O0O2OmoV;"}}, {"image_id": 53, "category_id": 1, "bbox": [218.0, 279.0, 156.0, 88.0], "score": 0.9999995231628418, "association_id": 2, "light": [-1.7320530414581299, -2.4777469635009766, 1.647101879119873, 2.231595754623413], "segmentation": {"size": [480, 640], "counts": "PaV31n>101O0000000000001O0000000001O00000001O0000000001O0001O00000001O0001O0000001O0000000O2O00001O00000RNMoD3o:0PE1o:0PE2m:0RE1l:1SE0k:2UEMj:4VEMi:4UEMj:5TELk:6RELm:5RELn:5PELP;5nDKS;=aDG^;<_DEa;=]DBc;b0YD_Og;i0mC[ORN1O2L4M200O2B=L5M3N2Ma\\l3"}}, {"image_id": 53, "category_id": 1, "bbox": [15.0, 182.0, 214.0, 177.0], "score": 0.9999998211860657, "association_id": 1, "light": [-2.2207934856414795, -2.0773699283599854, 2.1353251934051514, 1.988672137260437], "segmentation": {"size": [480, 640], "counts": "\\[71o>1N2O2N1O1O001O1O1O001O0000001O0000001O00000000001O0000000000001O000001O000001O000000010O0000000001O0000010O00001O0000000000001O00000001O00000000001O0001O000001O00001O000\\LBgH=l6g0]HYO`7S1WHmNh7Y1SHgNk7^1SHaNl7R2bGnM\\8^2[GbMb8b2\\G^Mb8f2^GXMb8i2_GUM`8o2^GPMa8W3fFfLI2`9Z4[FeKe9]4ZFbKe9a4YF`Ke9c4YF]Kf9f4XFZKg9h4YFWKg9j4XFVKh9j4XFVKg9l4YFSKg9m4YFSKg9n4YFQKg9o4YFQKg9T500O10_NdF_M[9^2kF_MU9_2oF_MQ9_2RGZMZOYOc9Z3XG\\MUOZOc9U3^G`MnN]Ob9S3bG_MlN^Ob9R3cG`MkN^Ob9R3cG`MkN^Ob9Q3dGaMjN^Ob9Q3dG`MkN_Oa9Q3cGaMlN^Oa9Q3cGaMlN^Oa9R3aGaMnN]Oa9S3]GbMSO[O`9T3ZGcMVOYO`9V3UGcM\\OWO_9W3SGbM_OWO]9Z3oFaMEUO\\9j4fFVKZ9h4hFXKX9g4jFXKU9h4lFXKT9f4nFZKR9b4RG^Kn8_4UGaKk8]4WGcKh8]4YGcKg8\\4ZGdKf8[4[GeKe8Z4\\GfKd8Y4]GgKc8X4^GiKa8Y4]GgKc8[4[GeKe8]4mFdKIOZ9S5cFmJ]9[500000000000000000M301N1SOgFRLZ9]3aGSLf8g3\\1C>L4K5L3M4N101N101O0O201O01N2O00O110O01O0000011O0N1001102NOO0010O2N1O00O02N2N1O100N2O4L3L3kNYCMhbL[7k0PHg2f0^LX7P1hGg2R1XLV7V1SGQ3i1iKS7]1fFo2Z2dKn6c1_Fk2f2bKj6g1ZFi2m2`Kh6j6YIVIe6l6[ISIe6m6\\IRIc6P7]IlHf6T7[IjHTMI[9]7aIhHSM0Z9W7dIgHnL9]9o6eIYIZ6f6bI`I]6_6_IgI`6W6^ImIa6S6]IQJb6n5\\IUJd6j5XI[Jh6d5PIeJo6[5jHmJV7R5gHRKY7o4dHSK\\7n4^HWKa7l4VH[Kj7g4iGdKW8_4_GhKa8\\4VGiKi8]4nFfKQ9o7M2dN]1K4O10O20OXOcH_DZ7W;PIiDo6U;TIkDl6S;VImDj6Q;XIoDh6n:[IREe6j:_IVEa6g:bIYE^6e:dI[E\\6d:eI[E\\6c:fI]EZ6`:iI`EW6[:nIdES6Y:PJgEP6W:SJgEn5W:TJiEl5U:VJjEk5R:YJnEg5d9hJ[FX5`9mJ`FS5^9PK`FQ5^9QKaFP5\\9SKdFm4X9XKfFi4m8dKSG\\4h8iKXGW4f8kKZGU4d8mK[GT4d8mK\\GS4b8oK^GQ4_8RLaGn3\\8ULdGk3Z8WLeGj3Y8XLgGi3W8XLiGi3U8XLkGi3S8XLmGi3Q1]H\\5l3bIj3j0cH`5d3fIm3?iHf5\\3kIa5o5bJQJb5e5dJ[J_5\\5gJdJZ5n4SKQKP5f4WKZKi4b4[K]Kf4^4`KaKa4X4eKhK[4T4iKlKW4R4kKnKV4o3lKPLU4o3lKQLT4n3mKRLS4l3oKTLQ4k3PLULP4i3RLWLo3f3SLZLm3e3TL[Lm3c3TL]Ln3a3RL_Lo3_3RL`LQ4]3PLcLR4Z3oKfLS4X3mKhLT4U3nKkLS4S3nKmLS4P3oKPMQ4n2RLQMo3l2SLSMo3j2SLVMn3h2SLWMo3h2RLWMo3g2P7O3L4M3M2N3L4M2M4L4K5J6J6K5K7GYfi1"}}, {"image_id": 54, "category_id": 1, "bbox": [127.0, 106.0, 130.0, 393.0], "score": 0.9999997615814209, "association_id": 4, "light": [-2.8293466567993164, -2.193561553955078, 2.657528877258301, 1.941909909248352], "segmentation": {"size": [659, 1024], "counts": "PUb27Xd09I4J6XKWOSBS1Q1KR<3UBi0`1XOU<_2gCbMUhN_:_5]DRLT1aNS:b7lE_Hl9h7UFXH`9Q8bFoGU9X8lFiGP9Y8QGgGl8\\8UGdGi8]8XGcGf8]8[GdGd8Y8_GhG_8V8bGmG^8Q8cGPH\\8o7fGQHZ8l7iGTHW8Y5mFiKP1oNS8R5bG\\K?AP8P5QHnJ32l7m4fJSKZ5h4kJXKU5f4lJZKU5d4mJ\\KS5b4oJ^KQ5a4PK_KP5_4RKaKm4^4UKaKl4]4UKdKk4[4VKeKj4Z4WKeKi4\\4WKdKi4[4XKeKg4\\4YKcKf4_4YKbKU4P5kKoJi3^5WLbJf3a5ZL_Jd3c5\\L\\Jb3i5\\LWJ`3P6]LPJ`3W6[LjIc3Z6[LeIe3^6YLbIg3a6VL_Ij3f6QLYIP4k6lKUIT4m6jKSIV4o6gKRIY4R7cKnH\\4W7`KiH`4Z7]KfHc4[7\\KdHe4_7XKaHh4d7SK\\Hm4g7PKYHP5h7oJXHQ5j7mJVHS5l7kJTHU5o7gJRHY5R8dJmG\\5U8cJjG]5Y8aJfG_5a8[J^Ge5l8RJSGn5R9nIlFT6V9c25YFhFi7S;N2N10O1O1O1O2N2N2N1O1O1mKdFmL\\9k2ZGfLEfL_8V4QHhL`0Q2QOQM_8o3_HYLd0`2^NYM`8i3UKkMiKVO=\\Og8]3\\K`MbLoN[O6j8T3eKnLYMNV7k2YNVMh1e2\\NZMf1b2\\N_Me1\\2_NcMc1W2aNjM`1Q2dNoM\\1m1hNSNZ1g1jNYNY1`1kN_NY1Y1lNgNV1T1mNlNU1P1mNPOT1n0mNQOT1n0mNROT1l0mNTOT1k0lNUOV1i0jNVOY1h0gNXO[1f0fNYO[1f0eNZO\\1f0cNZO^1e0bN[O_1d0aN[Oa1e0^N[Oc1d0]N\\Od1c0\\N]Of1?\\N@j19XNGn11TNOX;O10000OaT]?"}}, {"image_id": 54, "category_id": 1, "bbox": [267.0, 107.0, 142.0, 411.0], "score": 0.9999860525131226, "association_id": 2, "light": [-1.614616870880127, -2.432457447052002, 1.4507945775985718, 2.2614662647247314], "segmentation": {"size": [659, 1024], "counts": "ZS\\54]d04L3M4L2M3M3N3M2O1000O010000N2N2M2lBQOd6Q1YITOc6n0[IUOd6j0ZIZOe6e0ZI]Of6b0XIAh6=XIFg68ZIIe68QEBn17P98lDLD]Oj0?e:9aDT2=dMQ;9WDc2c0TMU;:SDi2f0mLT;a0oCh2i0hLS;[5hDgJ]OSOb:U7gEkIFQOT:]9kEdFR:_9iE_FH5]:^9hEgFV:[9jEeFR:_9mEbFn9c9QF^Fm9d9RF]Fl9e9TF[Fj9g9UFZFi9h9VFXFY8IlHR:kNVFn7d0[HR:c7`1O1OoMkHPF[ONk7b9PJ_Fo5Y9YJhFg5n8bJRG^5d8mJ[GT5Y8XKeGj4Q8`KmGb4m7dKRH]4k7fKTH[4i7gKXHY4e7jKZHW4c7lK]HT4a7nK_HR4_7PLaHP4^7QLaHP4_7PLaHP4^7QLbHo3^7QLbHo3]7RLbHo3_7PLaHP4_7PLaHP4`7oK`HQ4`7nK`HS4a7lK_HT4a7lK_HT4c7jK]HV4f7gKZHY4k7bKUH^4P8\\KPHe4S8XKmGh4W8TKiGl4]8nJcGR5d8gJ\\GY5h8cJXG]5j8aJWG_5h8aJXG_5i8`JWG`5j8_JVGb5i8^JWGb5j8]JVGe5i8ZJWGg5i8XJWGo6b7QI^HV7\\7iHdHY7[7fHeH[7Y7fHgH[7W7fHiH[7U7fHkHZ7T7gHlHZ7R7gHnHZ7Q7fHoH[7o6fHQI[7n6eHRI]7k6dHUI_7h6aHXI`7f6aHZIa7b6aH^I`7^6dHaI]7[6fHdI\\7R2RFY1d2eL[7n1WFY1_2iL[7l1YFW1_2lL[7i1\\FS1\\2TM[7f1^Fn0Z2\\M[7b1`Fj0Z2cMX7`1bFg0Y2hMW7`1cFc0X2mMW7^1eF>W2TNV7[1gF:W2[NT7Y1hF7V2_NV7W1fF6V2cNV7T1hF5S2gNV7S1jF2Q2jNX7R1jF0o1nNY7P1jFOo1POX7P1kFMn1ROZ7o0jFMl1TO]7k0jFNj1WO^7i0kFMg1ZO_7h0lFKf1]O`7e0mFLc1_Oa7c0PGEe1H]7?nKAT46SLJ[<000000O100000001O000OgY[<"}}, {"image_id": 54, "category_id": 1, "bbox": [415.0, 84.0, 142.0, 445.0], "score": 0.9999995827674866, "association_id": 1, "light": [-1.9088292121887207, -2.4794390201568604, 1.7584627866744995, 2.2993385791778564], "segmentation": {"size": [659, 1024], "counts": "dY[8l0bc0i0XO;F4L4M3M3M3M3L5H8kDUMW4T3gKmLS4[3jKeLS4`3kK`LS4b3lK`LR4b3mK^LQ4d3oK\\Lo3g3PLYLo3h3QLXLl3l3SLTLi3S4SLoKi3W4TLiKi3f4kKZKR4\\5[KdJc4V6eJjIX5^6dJaIY5k6^JnHYL1X9a7QJ\\HV6j7U35M2nFTHX5P8\\JZHa5l7UJ[Hi5i7PJ\\Hm5h7mI]HP6g7kI\\HS6h7gI\\HX6g7bI^H\\6g7\\I]Hc6g7TI_Hk6e7oH^HQ7d7jH_HV7d7cH`H]7[:O100000O1O1O0O2N2M1O2M22M:F3M[ORHlDi7P;_HoD\\7P;kHPER7l:UITEh6m:ZISEe6l:]ITEa6m:_ITE^6m:dISEX6P;iIPET6Q;nIoDQ6P;QJPEn5n:TJREl5l:WJTEi5j:YJVEf5i:\\JWEd5h:]JWEd5g:]JZEc5c:`J]E`5^:eJbE[5Y:jJfEW5V:mJjES5S:PKmEP5o9TKQFl4g9\\KXFe4^9eKbF[4Z9iKfFW4V9mKiFT4T9oKlFQ4P9SLPGm3j8YLVGg3e8^L[Gb3a8bL^G_3`8cL`G^3^8cLbG^3\\8cLdG^3Z8cLfG^3X8cLgG_3W8bLiG`3S8bLmGc3k7`LTHh3`7]L`Hn3R7ULnHT4CPHb6n3kIg4P6[KoIh4l5[KTJh4e5\\K[Jf4^5_KaJe4Y5^KgJe4S5^KmJd4n4_KQKc4f4eKZK\\4[3nLeLS3R3UMmLl2n2YMRMh2j2[MPMlHMj9Q3\\MRMkHKj9Q3^MSMf2l2[MTMe2k2\\MUMe2i2\\MWMe2i2ZMWMg2h2YMXMh2h2WMXMl2e2TM[Mo2b2RM]MP3b2oL^MR3a2nL`MR3`2mL`MT3`2kL`MV3`2iLaMV3`2iL`MX3_2hLaMY3_2fLaM\\3]2dLcM^3\\2aLdMb3Y2^LfMf3V2\\LiMg3S2ZLmMi3n1YLRNk3i1WLUNP4d1d7K6H`0^OYZ\\9"}}, {"image_id": 55, "category_id": 1, "bbox": [300.0, 230.0, 124.0, 318.0], "score": 0.9999999403953552, "association_id": 1, "light": [-2.273569107055664, -1.8418679237365723, 2.2173025608062744, 1.7739224433898926], "segmentation": {"size": [683, 1024], "counts": "n\\X64md0m0[O`0@>B:G4K5L4K6K3M2N2N3N2N4K6K3M6J9G4L2YNlKRBY4h=QLPBR4l=RLPBQ4m=RLoAR4o=RLkAT4Q>RLdAY4V>kKbA]4Z>_1K=C9G3ZDWHd9n7UFVHi9P8oESHP:P8lERHS:Q8gERHY:Q8`ETH_:n7\\EUHd:l7ZEUHf:m7VEUHj:S8kDPHU;S90000000000000000000fMkE^IU:_6SF[In9e6UFXIk9h6WFUIj95PE\\5Y1[Jh96TE]5W1XJi96TEa5W=TJQCm5V>0oBlIl:T6aDoIn;R6PD]Jb;d5\\D]Jd;d5[D[Jf;f5YDZJg;f5YDYJh;h5WDXJi;i5VDWJj;i5VDWJj;i5UDXJk;i5TDWJl;i5TDWJm;h5SDXJn;h5QDXJPm3^ASLc>n3^AoKc>Q4bA_KXO2U?`4iAaKY>_4eAcK\\>]4bAcKT?h3k@WLZ?f3e@ZL]?f3a@ZL`?\\2W@UN7_Ob?Y2\\@WN1@d?V2^@YNNAd?T2a@[NJAf?Q2d@\\NFBg?P2g@[NCEf?o1j@YNAGf?m1o@WN]OLd?g1ZBYNf=a1`B^Na=_1bBaN_=W1hBiNY=R1kBnNV=n0mBROT=k0nBTOT=h0oBXOR=`0UC@l<;XCEj<7XCInh2QAXMo>h2QAXMo>i2PAWMP?i2PAVMQ?j2o@VMQ?k2n@UMR?k2n@UMR?k2n@UMR?k2n@UMR?l2m@TMS?l2m@TMS?l2m@TMS?l2n@SMS?m2l@SMT?m2l@RMU?n2k@RMU?o2j@QMV?o2j@QMV?P3i@PMX?o2i@PMW?P3i@PMW?P3i@PMW?Q3h@oLX?Q3h@nLY?R3g@nLY?R3g@nLY?R3g@nLZ?Q3f@oLZ?Q3f@oLZ?R3e@nL[?R3f@mL[?R3e@nL[?R3e@nL\\?Q3d@oL]?P3c@oL^?Q3b@oL_?P3a@PM_?P3b@nL_?R3a@nL`?Q3401O3M1O1O1N2O001O003M3M2N1O1O001O0O2O1O1N3N2M2O0O2O001N3N3L3N1N2O2M2O2M3M6Gl_n1"}}, {"image_id": 57, "category_id": 1, "bbox": [102.0, 110.0, 341.0, 259.0], "score": 0.9999980330467224, "association_id": 1, "light": [-1.9967072010040283, -1.6627368927001953, 1.9514491558074951, 1.553058385848999], "segmentation": {"size": [480, 640], "counts": "lR`17f>6L4M1N101O0O2O001O1N4M2N001N2O001O001O1O1O1O6J2M2O001O00001O0O101N5L5K2N2M101O00001O0O2O009G4L1O001O00001O00001N2O001O001O00001O000O101O0O100000001O000O1000000000000000000000000000000O10001O000O100001O00WNgMkFY2P9oMmFQ2n8WNoFj1j8]NVGb1]8mNaGS1T8YOkGg0n7BPH?h7KUH5c7>SHAk7k3N2O1O1O2MZMYHWNd7n1]HoM`7V2_HiM_7[2`HdM^7_2bH`M]7R5O100O1O1O1O1O1O1O1000000O10000000000000000O10000O10000O100O100O100O100O100000000000oNUImIk6V6TIhIl6Y6TIfIk6\\6UIcIk6^6TIbIl6^6UIaIk6`6TI`Il6`6TI`Il6Z700000000000000000000000000000000000000000WOTI^Il6b6TI^Il6[70000000000000000000000000000000000000000000000000000000O100000000000000O100000000000000O101O00001O001O001O1O1N2O001O001O001O1O1O3M2N2N2N1O1O1O1O2N2N2N1O1O1O001O1O1O2N1N2O1O1O001N2O1O2N1N2O1O001O1O1N2O2N1O1O001O0O2O000\\OnFYKT9f4lFYKU9g4kFXKW9g4iFXKY9f4hFYKY9g4gFXK[9g4eFXK]9f4eFXK]9g4cFXK_9f4bFXK`9h4=N2O001N2O1O1O2N2M2O1O1O1O1N3N3M9G:E3N2N1N2N3M4K;D_1gMQCGX_l2"}}, {"image_id": 58, "category_id": 1, "bbox": [353.0, 186.0, 36.0, 84.0], "score": 0.9999741911888123, "association_id": 1, "light": [-2.1039488315582275, -2.023393392562866, 2.023387908935547, 1.8118160963058472], "segmentation": {"size": [431, 640], "counts": "hjd41^=1O0000000_N1bE0Z:5dEK\\:5dEKZ:6gEJT::lEGP:=PFDm9?RFAl9c0RF]On9j0kEVOT:`1WE`Ng:d1WE]Ng:g1WEXNf:T2QElMl:Y2TEeMk:]2UEbMj:`22001O0001O2N3M3K2O3M2QOjDAZ;:P1K8I[^Y3"}}, {"image_id": 59, "category_id": 1, "bbox": [60.0, 109.0, 379.0, 285.0], "score": 0.999998927116394, "association_id": 1, "light": [-2.3024373054504395, -1.8262712955474854, 2.186697483062744, 1.6463152170181274], "segmentation": {"size": [428, 640], "counts": "m[i0>l<4K5UE^Of8f0TGBf8a0UGFf8=WGGe8PFTOn0>P9m0nFTOo8Q1nFPOQ9R1mFoNR9S1lFnNS9U1jFlNT9X1iFjNU9Z1gFgNX9_1bFbN]9c1^F^NR9QOXGf3d8cLVG^3g8hLUGY3h8g0N2O0NoN`G\\M^8b2hGZMU8g2SHSMi7P3^HjL^7Z3hH`LT7e3QIULi6Q4T1500O100000010O1O1O0O2O1N2N101hM_KcKc4]4^K`Kd4`4^K]Kc4b4`K[K`4f4bKWK_4i4mKjJT4V5nKhJR4W5PLgJR4X5oKgJQ4Y5QLdJQ4[5PLcJR4\\5PLaJR4^5PL_JR4_5QL]JR4b5RLWJS4g5PLQJV4n5e1O1O2N1N2RKdHj3]7SLfHl3Z7SLgHm3Y7SLgHm3[7oKgHQ4_7fKdHZ4W8000O100000000aMVK\\Lj4c3ZKZLf4d3^K_JKY1g4W4aKZJM^1b4W4eKTJNd1]4W4WLdJPOa0i4i4[L`JSOd0b4k4_LYJWOi0Z4k4XMQKi2l4\\MRKd2j4cMSK]2i4iMTKX2k4jMSKW2k4mMRKT2m4nMoJU2P5T3O1O100O100OaJTK`2k4_MXK`2h4`MXK`2g4aMZK^2e4cM\\K\\2d4dM]K[2b4fMaKVMBn4l4mMeKS2[4mMeKS2[4mMeKS2Z4nMfKR2Z4nMgKQ2Y4oMgKQ2Y4oMgKQ2Y4oMgKQ2Y4oMgKQ2Y4oMgKQ2Z4nMfKR2Z4nMfKR2Z4nMfKR2[4mMdKT2\\4lMdKT2\\4lMdKT2]4kMcKU2]4kMcKU2^4jMbKV2^4jMcKU2^4jMbKV2^4jMbKV2_4iMaKW2_4iMaKW2`4hM`KX2`4hM`KX2a4hM^KX2b4hM^KX2b4hM^KY2b4fM^KZ2b4fM^KZ2b4fM^KZ2b4fM^KZ2c4eM]K[2c4eM]K\\2b4dM^K\\2b4dM]K]2d4bM\\K_2c4bM\\K_2a0ZKc2W2lL_2>^Ke2S2lLd28^Kk2m1mLk2L`KU3h1hL[MIj6]3T3O0O100O10O0fHjL_4V3]KQM^MFn6Z3_KZM^4f2dKYM[4h2dKXM\\4h2dKYM\\4g2cKYM]4g2cKYM]4h2aKYM_4g2]JcLKf0h5g2\\JeLKc0j5i2YJfLLa0k5i2WJhLN?k5j2UJiLO=l5j2SJlL09n5l2PJlL28n5l2nInL46n5m2lIoL45P6l2lInL56o5l2nIkL49n5l2QJgL24K6L3N3M2M2N3lDYOT8j0eGFP8;mGKo75lG3Q8NeGLC5g=j0K4N2O10000000O1HbBVOa=`0c0I5NWBF[=1gB0P>000000000000000000000000000001O00fnm4"}}, {"image_id": 60, "category_id": 1, "bbox": [309.0, 231.0, 56.0, 61.0], "score": 0.9164212942123413, "association_id": 2, "light": [-1.9533379077911377, -1.9171288013458252, 1.811262607574463, 1.7792768478393555], "segmentation": {"size": [471, 640], "counts": "o[^4`0Q>:I5L2N5L1N2OKgBnNW=[1N4L4M4L2N2N0000O3N3L4L3XOTCXOI1W=b0SC]OU=`0mBAT==lBCW=9jBGS>00000000001O000000000000000001O01O0001O0000000000001O00000O10lVn3"}}, {"image_id": 60, "category_id": 1, "bbox": [382.0, 241.0, 27.0, 29.0], "score": 0.9996330738067627, "association_id": 3, "light": [-2.330597400665283, -2.2946531772613525, 2.231111526489258, 2.192498207092285], "segmentation": {"size": [471, 640], "counts": "gn_55b>O10O1N1N3G9L7L2O1O0001O2N1@_BHX>1N10000001O000000000O10eoY3"}}, {"image_id": 61, "category_id": 1, "bbox": [82.0, 172.0, 147.0, 301.0], "score": 0.9999992847442627, "association_id": 2, "light": [-1.0044996738433838, -4.334400177001953, 0.8307410478591919, 4.204932689666748], "segmentation": {"size": [473, 640], "counts": "aZV11f>4M2O1N2O000O2XI3bNMZ1:cNGX1`0_JTOY28Hk0TO5M4K4K3M5Ii0ZO7I;E?@8H6K3N3M3N1O0O2mE[KP:e4PF]Kn9b4SF^Kl9c4TF^Kj9b4VF`Ki9_4XFaKh9^4ZFbKe9]4\\FcKd9\\4]FeKd9Y4\\FgKe9W4]FiKb9W4^FiKd9T4]FmKe9n3]FRLm9_3XFaLk9V3[FkLg9i2bFWM_9_2kF`MV9]2lFcMU9Z2mFfMS9\\2lFdMU9W2nFiMT9o1gEjMo07[9k1UGUNk8h1WGXNk8`0_E3>]Ob00b99iE24G`0Nd97QFJM1?Md96SGKYO0d9OfH1R;O01O010O0010N2Ne4"}}, {"image_id": 61, "category_id": 1, "bbox": [302.0, 71.0, 280.0, 401.0], "score": 0.9997153282165527, "association_id": 3, "light": [-1.602038860321045, -2.1158246994018555, 1.4658737182617188, 1.9356578588485718], "segmentation": {"size": [473, 640], "counts": "kh[49Z>8C>F:K6J5K4M3L4M2N2M3N3L4L4L4M3L4`E\\Mf8f2VGWNn7m1nGXNm7n1lGZNm7n1hG\\NP8]4I8G7I7J4L4M1N3M2N2N2M4M2O1N20O01O0001O000O10000O0O2LhIhHX5T7kJPIQ5m6RKVIl4i6UKYIh4g6ZKYId4g6_KXI_4i6cKVI[4j6hKUIQ4P7RLoHW3f7kLZHR3f7RMYHl2g7WMXHh2g7ZMYHd2h7]MXHb2g7aMXH^2i7cMVH\\2j7eMVHY2l7hMSHV2o7jMQHT2P8mMoGS2R8nMmGQ2S8PNmGo1T8QNlGn1U8SNiGn1W8TNgGl1Y8Z21O0O2O001O00001N101O0O2O0O2N101N101N3N1N3N2M3N1N2O2M2N3jJ_Fo4d929F9H5J4M2M4M2M4L4M4K4L2M4L3M2L4M4K4M3M3M4M2N2O1O10000O10O10O1001O1N2O2M3N2M2N3N2O1N2]OYMPEj2\\:eMfE^2n9jMSFX2f9`MTF_O7S3`9`M[F[O6X3Z9_M`FXO7Z3W9^MdFWO5]3S9^MYGc2d8_M\\Gc2`8_M`Gc2[8eLjFb0k0j2X8cLQGb0g0m2S8bLXGa0e0o2o7`L^Ga0c0R3j7_LcG?c0S3g7`LfG=c0T3d7aLhGEd5Z4gIlKa08b5Q4^JRLa5P4ZJSLe5P4XJRLg5P4RJULm5k400O100O10O00100N2N10100O100O100O1O1O100O1O1N2N2L4^OfIcK^6Y4b0J6TOl0M3N2O1N2L4M3N2O1O1nMeGe0^8YOWH2k7L[HMh72[HJg75[HHh76[HCj7QGCn8gJBW5a0hJ@R5i0jJWOT5n0iJSOU5T1fJkNY5X1fJhNV5]1iJcNU5_1dJgN[5[1aJSN\\O7Q6i1_JTN_O2P6m1^JhN_5\\1^JUNEGl5Z3TJeLk5m3OFWJVLh5n3WJQLh5W4N3NM\\JfKb5\\4^JcKa5^431H8L4N200O101OO1000O1000000000O1O1VORKXLQ5e3VKULl4i3j000O1O2O0O1N2O1O2[NPJPOT6i0RJTOQ6h0SJTOQ6j0QJSOW6e0PJROX6h0f1N1O1O3M100O2O2M1O2O2N2OO01N2O2M1O101N2OO2OO101O0O10O010O01N4L4KYid1"}}, {"image_id": 63, "category_id": 1, "bbox": [82.0, 111.0, 146.0, 195.0], "score": 0.9998956918716431, "association_id": 2, "light": [-2.59403133392334, -1.6733864545822144, 2.4641075134277344, 1.4995403289794922], "segmentation": {"size": [327, 500], "counts": "W]j0Q1Q97M1N2M3H8N2N2O1N2K4B>O2O0O10BbHVNV7k1TIVNd6g1aI[N]6d1eI]NY6c1hI]NX6b1iI^NW6_1lIbNS6Z1QJgNm5V1WJjNi5U1XJlNg5S1ZJmNe5R1]JRO^5m0dJTOZ5j0iJWOU5i0lJWOS5i0nJXOQ5g0PKYOo4g0RKZOm4f0SKZOm4e0TK[Ol4d0UK\\Ok4d0UK\\Oj4g0TKYOl4h0SKXOm4i0RKWOn4j0hJ`NQOf0W6j0fJdNROa0X6l0bJhNTOXH^On7:XHBn76WHEdmf2"}}, {"image_id": 64, "category_id": 1, "bbox": [3.0, 129.0, 132.0, 143.0], "score": 0.9999935030937195, "association_id": 1, "light": [-1.5783782005310059, -2.2537548542022705, 1.4897308349609375, 2.1186025142669678], "segmentation": {"size": [480, 640], "counts": "Xe12m>2O0O100000000000000O10000000000O101O00001O0000001O00000WNHjD8S;NjD2U;1iD0U;2jDNU;5hDLW;<]DIb;=WDEh;>UDCj;`0SDAl;b0PD@o;c0nC^OP101O000O100000000000000000000000000000000000000001O0000000000000000000001O00000000000000000000000000000000000000000000000000000000000000000001O0000000000O10000000000000000000001O0000000000000000001O0000001O000000000001O0001O0000000000000001O01O000000000000000001O01O00000000000000001O01O00001O10O000001N102N\\_79W`Hd8B_G<`8DiG^NXOd0P9n0iHQOW7n0lHPOT7o0nHPOQ7P1RInNn6R1TIkNm6T1UIkNl6Q1XInNh6n0\\IROf6i0^IVOc66`F^OP3;`65dF]Oo2<]66WJIj54YJKg54[JKe54\\JLe53\\JLd53_JJc55`JH`57cJF^59g4N6HfQ^3"}}, {"image_id": 64, "category_id": 1, "bbox": [408.0, 111.0, 153.0, 74.0], "score": 0.9997970461845398, "association_id": 2, "light": [-2.1923232078552246, -1.556628942489624, 1.9583044052124023, 1.4147099256515503], "segmentation": {"size": [480, 640], "counts": "c]o51o>00001O0000000000001O00000000000000001O00000000000000000000000O10000000000000000000000O10000001O0O1000000000000000000000000000000000001O000000001O0OQl10PTN00001O0_h21_WM3M2O00M3O1O2O0Ocn08VQO6fAEd=a0TBAk=k0O1O001O001O01O1N2O1O0O2M2O00O2YOCjB?U=BhB`0W=f0O1N2N1O100O1O00VOnB^O2CS=o0mBPO00^=S164N3O1O0000O11O00OPChNZF5J_lT1"}}, {"image_id": 65, "category_id": 1, "bbox": [206.0, 173.0, 103.0, 197.0], "score": 0.9999999403953552, "association_id": 3, "light": [-2.4928064346313477, -2.3020191192626953, 2.3832266330718994, 2.1644153594970703], "segmentation": {"size": [427, 640], "counts": "oSf2Q1W<6H8J5I5N3L6K6K6K8G4K;F5K6J4M2N3M3Lb0_O2L3L3E\\KlGh4LYKn7e3SHcMOhNk7b3`HbMDoNh7`3WInLROCf7^3_IgLmNLc7]3PJfLm5Z3SJgLl5[3SJeLl5^3QJbLo5a3nI`LQ6g3iIXLW6T4mHnKEN]7_50000011N6YJbHU5m7N1@jGgKV8o3mGhKN:V8`3_HaL`7[3dHeL]7V3gHkLZ7k2nHUMT7\\2YIdMh6c0\\HHQ1Fc6`0_HGo0Ie6=eH^Oi06c6:iHUOk0`0_69jJGZ57dJI^57`JId57XJJj56TJIo57nIIT67jIIZ66cIJ_67^IId65]IJg63XIMk6NWI2Q:000001O000000001O00001O00010O0010O01O010O000000000000N2M30000O11O00001N3N5J4J`eY4"}}, {"image_id": 65, "category_id": 1, "bbox": [466.0, 205.0, 130.0, 122.0], "score": 0.999999463558197, "association_id": 2, "light": [-2.037116289138794, -1.9565048217773438, 1.948776364326477, 1.8175127506256104], "segmentation": {"size": [427, 640], "counts": "mbR63U=3O2N1O1O100O10000000O1O1O1O10000O10O1O000010OTDIf:7YELe:3ZE0d:0\\E1d:N\\E4b:L^E5`:M`E3`:L`E5`:K^E6S9DYG7B7S9HWG1D9S9IXGND:R9LVGME9T9MTGKZOf0EoNi9c0VGIZOg0GmNi9d0TGJYOf0JmNi9d0PGX1WOTNh9g0cF`1FiMg9\\3YFdLg9[3ZFeLf9j2kFVMU9h2mFXMS9h2lFYMU9d2mF\\MS9Z2WGfMj8V2YGiMi8U2WGlMk8Q2VGoMn8k1SGVNP9f1QGZNP9e1PG[NR9c1nF]NS9c1lF]NT9c1lF]NU9c1jF]NV9d1iF\\NW9e1hF[NX9f1gFZNZ9f1eFZN\\9Q2XFoMi9R2UFnMk9S2UFlMl9S2TFmMl9U2RFkMo9T2QFlMP:T2oElMR:S2nEmMR:S2oElMR:S2nEmMS:R2mEnMT:R2kEnMV:]1]ERO=AW:[1_ERO:CX:Y1`ESO8DZ:V1`EVO5D]:R1`E[O2C_:P1`E]O1D_:m0bE^OOEb:i0`EBNEe:d0`EGJEg:b0`EIIEi:?`EKGFl:;^EOFGm:7_E1CIo:4_E3BIR<7nCIR<7nCIS<6mCJS<6mCKR<5nCKS<4mCLS<4mCMS<2lC0S<1lC0T<0kC1T<1jC0U<1jCOV<2iCNW<4gCLZ<4eCL\\<0gC1i<0000000000000001O00001O0000001O0O10001O0O100O2O0O2NUQb0"}}, {"image_id": 65, "category_id": 1, "bbox": [381.0, 174.0, 90.0, 132.0], "score": 1.0, "association_id": 1, "light": [-2.1022214889526367, -2.4524614810943604, 1.975163221359253, 2.3005526065826416], "segmentation": {"size": [427, 640], "counts": "lRo46Q==D9D9K3L3O1O1O1O1O1O2O002N2M1N3M2C?M2M2O1O2O00010Oh0XO3N4L1O00000>B0mN[F_Ne9`1]F^Ne97VF59^Oc9;VF7l:HUE7?\\OU9<^F8;\\OY9:^F:7]O\\97_F=2\\Oa95_F`0M[Of94_Fa0H[Oj94bF`0@]Oo92bFa0]O]OR:1eF`0WO_OU:1eFa0SO^OY:0fFc0nN]O^:NhFd0gN^Ob:NgFd0fN^Od:OhF`0cNBd:OlF<_NEf:NlFe0V9ZOlFc0T9^OlFa0T9@kF`0U9AkF>V9BjF3]NNj:NjF3\\NOk:MkF1[N2l:JSG6n8HTG7P;01O1O0O101O00000000000000000000000001N10000000000004KdUV2"}}, {"image_id": 65, "category_id": 1, "bbox": [149.0, 196.0, 45.0, 69.0], "score": 0.9999706745147705, "association_id": 4, "light": [-1.895050287246704, -2.1973555088043213, 1.7592391967773438, 2.0614590644836426], "segmentation": {"size": [427, 640], "counts": "S\\n14U=4M2M2N2O1N01L4O100O02M2L4M3L5M2N2N1\\DSOj:o0XEQO`:2jDn0g0PO]:W1dEiN\\:V1eEjN[:V1eEjN[:V1eEjN[:V1eEjN[:W1dEiN\\:X1XElNGLQ;m1nDTNQ;m1nDSNS;l1lDUNV;2hD2>i0DSOU\\2ZAiMa>[2]AgM`>[2`AeM_>]2`AdM^>]2bAdM\\>]2dAcMY>`2hA`MU>b2kA^MT>c2lA]MS>d2mA]MP>e2PB[Mn=g2RBYMk=j2TBXMj=i2VBWMi=j2WBVMi=j2WBVMh=Z3N100O1O100O100O100O100O100000^O`BUM`=k2`BUM_=k2bBUM^=k2bBUM^=k2bBUM^=k2bBVM]=j2bBWM^=i2bBWM^=i2bBWM^=i2bBWM^=i2bBWM^=i2bBWM^=i2bBWM^=i2bBWM^=i2bBWM^=i2bBWM^=i2bBWM^=i2bBWM^=]30[ObBYM^=g2bBYM^=g2bBYM^=g2bBYM^=g2bBYM^=\\30000000ZObB[M^=e2bB[M^=d2cB\\M]=d2cB\\M]=d2bB]M^=c2bB]M^=b2cB^M]=b2cB^M]=b2cB^M]=b2cB^M]=b2cB^M]=b2cB^M]=b2bB_M^=a2bB_M^=a2bB_M^=a2bB_M^=a2bB_M^=a2bB_M^=Y30000000WObBaM^=_2bBaM_=^2aBbM_=^2aBbM_=^2aBbM_=^2aBbM`=]2`BcMa=\\2_BdMa=\\2_BdMb=[2^BeMb=[2^BeMb=[2^BeMc=Z2]BfMc=Z2]BfMd=Z2\\BeMd=[2\\BdMf=[2ZBeMg=Z2YBfMh=P30ZOXBeMi=Z2WBfMk=Y2UBfMl=Y2TBgMm=m21O1O1O1O2M3N1O1]OhAmMZ>c22N1N2O1O1O3M3M2N1O2M3N6J1O1O1N3N8H3M1O002M4AS@VOQ`0d0Q@[OR`0a0P@_OP`0?S@_Oo?=T@Cn?8W@EWed6"}}, {"image_id": 66, "category_id": 1, "bbox": [253.0, 198.0, 232.0, 345.0], "score": 0.999989926815033, "association_id": 2, "light": [-1.720597505569458, -1.7084234952926636, 1.5545456409454346, 1.588791847229004], "segmentation": {"size": [559, 559], "counts": "Y^Z4l0h?\\1\\O:G5K3M4M2K5I8A`0\\Of0CSJBo5S1101VOoIIQ66oIJS6n02ROkI3U6LkI5V6IkI7W6EjIYDMa;5\\DO_;S1K5iDZNb:i1YE\\Nc:X2M3N1N3M2O2N2M3K6J5M4K3N3N10000000O100O10000001O1O3M6K011O20M4L1O1N1O1O00001O1O2N001O0]ObFYM_9e2eFWMEMc9j2PGWMQ9g2oFZMS9c2nF^MV9\\2kFdMX9Y2gFhM]9S2dFmM_9P2`FQNa9n1^FSNd9k1\\FUNf9h1[FXNf98iEh0b0QOg91WF<6De9L\\F82LR<00FQC8o100O1000O100000O10O10000O1000O0100O10000O010000000000O10000O01000000O10000O1000O1000O100000000000000O100000000000000O100000000Oc`_5"}}, {"image_id": 69, "category_id": 1, "bbox": [319.0, 169.0, 209.0, 220.0], "score": 0.9999995827674866, "association_id": 1, "light": [-1.8900774717330933, -1.8224979639053345, 1.7497179508209229, 1.692368745803833], "segmentation": {"size": [480, 640], "counts": "bge4V1_=?J5M1O2M3N2N2N2N1003N:E10WOWNXDi1f;XN[Dg1e;ZN[Df1c;[N]D9\\Ok0VfCB[<=eCD\\<:dCF]<9dCG\\<7eCI\\<6dCK\\<4eCK\\<3eCM^4N2O2N1N101O001O1O001O1O001O1O1O001O001O1O1O1O1O1O1O1O1O1O4L100O101O1N2O0O001O100O0010O1O01O01O00001000O0100O01O01O1O010O10O1O10000O100O010O2O0O2O0O01000O2N010O010O10000O001O00100O1O001O010O100O010O001O1O1O0010O0YOaCE^<:eCD\\<;fCEX<:iCGW<8jCIOZOm;m0UDJK[OPWDDi;j:ROnE=VOe0i:MWEj0d6[NoLR3k2VMQMl2n2VMPMk2o2VMoLl2P3VMmLl2S3TMkLn2T3TMiLn2W3SMgLn2Y3RMfLo2Z3SMcLn2]3SM`Lo2`3SM[LP3e3QMkJOmNX3X6jLgJ`4Y5aKeJ`4[5aKbJ`4f3bJkLP1]O^4f3gJkLl0[O^4j3kJhLh0YOe3[OdKj46_Lb0XOl2d5gLQK`0UOX2O_LP6l0jJd0nNQ2g6]MYJY4g5jKVJU4l5nKoIQ4S6ULeIk3]6YL\\Ii3f6ZLTIg3n6[LnHg3Q7h1100O010O1O001N1O10001O2O001O1N101OO1O1O2N1O1O1O2O1O2N2N2M2O1O1O2N3MmI`I_4^6[KjIe4T6YKoIh4o5XKRJg4o5WKUJg4j5YKYJf4e5ZK^Jd4a5[KaJf4]5ZKdJf4\\5XKfJi4Z5UKgJk4Y5SKjJl4W5RKkJl4V5RKnJl4R5SKoJl4R5SKoJm4Q5QKQKn4P5QKPKo4Q5PKPKo4Q5PKoJP5R5nJPKQ5Q5nJPKQ5W5fJlJY5T7N3M2PL^GU2c8iMaGT2`8jMcGT2^8jMeGT2]8iMgGT2[8iMiGT2Z8hMjGU2X8hMkGQ1QOTOU9IlGn0UOWOQ9HmGm0TO\\Oo8CSHm0PO@Q;;PEFT;4nDLT;1lD0U;MlD5R;KoD4R;KnD6Q;IQE6P;IQE6o:JSE5l:KVE3k:KWE4j:JXE6i:GYE8S;ZOoDf0[<0O01O0001O0000000100000101OO1O0O0001O0000010O000010O000001O001O001O1N6IT^a3"}}, {"image_id": 70, "category_id": 1, "bbox": [604.0, 160.0, 51.0, 59.0], "score": 0.9957584142684937, "association_id": 2, "light": [-1.6982966661453247, -1.7963228225708008, 1.6216434240341187, 1.6197988986968994], "segmentation": {"size": [457, 685], "counts": "`h]82W>0000001O00000000001O0000000000000001O001O001OV>1hA2N2M2M3M4K4K5H8M4G8I7K5N201O0001O=C3M4L?A5K4K4M2NlU="}}, {"image_id": 71, "category_id": 1, "bbox": [187.0, 42.0, 308.0, 485.0], "score": 0.9999991655349731, "association_id": 1, "light": [-2.0386576652526855, -2.512890577316284, 1.82522714138031, 2.2690789699554443], "segmentation": {"size": [559, 559], "counts": "PbV3e0e`06J6I7L3N3L4M2O1N3M2J6I7A`0bN]1I7J6N2O1N3N1nKYK[Kh4a4fKSK[4h4TLmJn3l4`LjJc3d4WMQKl2V1UK^O\\2VOb2U1bKmN]2JS2T1lK_N^2:h1S1TLWN\\2c0a1R1[LSNY2i0]1R1aLjMY2Q1X1R1nLVMV2f1l0S1j1iNWNU1n1gNSNX1S2_NQNa1Z2nMlMWOXJh2_>XMcAg2U=`MnC_2h;oMTDP2h;YNcCTO0b2Z<`NbCoN5a2VWFBg9?ZFAe9`0[F@d9`0\\FAb9`0_F@`9a0`F_O_9a0aF@^9a0bF_O]9a0cF@[9b0eF^OZ9c0fF]OX9d0iF]OU9d0jF]OU9c0lF]OS9c0nF]OR9c0nF]OQ9c0oF^OQ9b0oF^OP9b0QG^Oo8b0QG^Oo8b0PG@n8`0SG@m8`0RGAn8>SGBm8=SGDl8=TGCl8Ti2_OTO3SN>h2BSO1TN=i2BRO3TN;j2CPO3VN:i2EoN3WN8j2FkN6ZN4k2HdN<^NKo2K_N=aNHP3L]N?aNER3MZN`0dNCQ30VN\\1i1fNSNU1mNTNo2k0nMT1UOPNl2n0lMT1XOjM00l2T1iMS1^2PO_MQ1^OhM0010e2X1jMQ1@lMOLg2Y1hM2BiNN>0C1Le2[1gMOLXOGGf2T1dMNOGY2>dML4GW2>bML8FU2`0`ML:FU2Q2kMPNS2Q2mMoMZ1lNoNU3FQNX1oNnNR3IoMW1SOnNn2KoMW1TOlNn2MnMV1VOlNl2NnMV1WOjNm2NnMW1VOjNl2OnMV1ZOgNi23mMV1n2jNRMV1n2jNRMV1n2jNRMV1n2jNQMW1o2iNQMW1o2hNRMX1o2gNQMY1P3fNoL[1R3dNnL\\1R3dNnL[1T3dNlL\\1T3dNkL]1U3cNkL]1U3cNkL]1V3bNjL^1V3bNjL^1a410000000000000000O1000000O1O100O1000000000000O100000000000000O1O1K5N2O100000000000000O1SOQN]Lo1c3QN]Lo1b3RN^Ln1b3RN^Ln1a3SN_Lm1a3SN_Lm1`3TN`Ll1`3TN_Lm1a3SN_Lm1a3SN^Ln1a3SN_Lm1a3SN_Lm1a3SN^Ln1b3RN^Ln1b3RN^Ln1b3RN^Ln1b3RN^Ln1b3RN^Ln1b3RN^Ln1b3RN]Lo1c3QN]Lo1c3QN]Lo1c3QN]Lo1c3QN]Lo1c3RN\\Ln1e3QNZLP2f3PNZLP2f3PNZLP2g3oMTLV2l3kMQLW2P4hMmK[2U4cMjK^2]454L3M1O1O1O2N1O2N1O001O0000000000hNoMVMP2g2UNWMl1f2WNYMi1b2^N\\Mb1a2dN\\M\\1]2nN`MR1\\2TObMl03TNU1S1fNk02^Nm0i0POi02aNk0f0TOj0NdNj0d0WOn0HiNe0;XOaNLf649001O3M2Mb0WInNV6U1O1O002N1O0O10001OO100000000O1O1O1000000000000O1000000000000O10000O100O1O1N2N2O1O10000O10000000000O10000O1O100O100O1000000O100000000000000O1000000000000000000O100000000000000000000000000000000O100000000000000000000000000000000000000000000000000000000O10000000000O1000000O2O0000000O1000000000001N1000001N100O1O10000O10001O00000O100000000O10001N101Olnh0"}}, {"image_id": 72, "category_id": 1, "bbox": [4.0, 6.0, 283.0, 203.0], "score": 0.9997137784957886, "association_id": 1, "light": [-1.9300109148025513, -1.296594500541687, 1.7985711097717285, 1.1540155410766602], "segmentation": {"size": [236, 592], "counts": "no08R74N0O2O0O2O1N3N2M4L3YNZOcLh0X3D^Lb0[3TOk0c1lNWO9UOl0`1ZOPOJ@l0\\1@QOECk0Z1DQOAEk0Y1GPO^OGk0X1JoN[OHl0X1LnNXOJl0W1OmNUOLl0W10lNTOMl0V13kNQOOl0U15kNoNOm0T17lNlN0m0S19lNjN1m0S1:kNiN2m0R1=jNeN5n0Q1?hNcN6o0R1?gNbN7o0R1`0fNaN8o0Q1b0eN`N:n0Q1c0dN^N;P1Q1c0cN]NS1KkN1l1FVN>S1KlN0k1GVN>S1JmN0l1GTN?S1JnNNl1ISN?S1IoN@C6Y22RN?S1IYODc13QN`0S1IZOBd14oMa0S1H\\OAd15mMb0S1H]O_Oe16kMc0S1HT2DiLd0T1FT2EiLe0S1FU2DhLf0S1FU2DgLg0U1CV2DfLi0T1Ci2=WMBj2>VMAk2?UM_Om2a0TMZOP3f0j1100000000000000000O1000000000000000001N10001M3[OdINJ1]`2OkfM0O2hHNT75O101O1O4L7SI1o5h0N0O2O00000000O10000O10000000000O10000O1O100O1000000O10000O10000O100000000O100000000O100000000O1O1O1000000O1000000O1O1N2O1O10000O100O1O100O100O10000000000000000O1000000000000000000000000O1000001O000000000O100000000O101N1IUILl60RI03Nl62QIOV7O40XTV2"}}, {"image_id": 73, "category_id": 1, "bbox": [470.0, 77.0, 130.0, 73.0], "score": 0.9974878430366516, "association_id": 1, "light": [-2.962721347808838, -1.3337149620056152, 2.9230706691741943, 1.1066453456878662], "segmentation": {"size": [457, 685], "counts": "oka6;g=a0E1O2O001N101O00000000000000000O100N2O1O1O2K4F:O1O2N1N2O2O0O100O1O2O000O101N10000O1000000O10000O100000000000000000000000O1000000O100000000001O000000000000001O0000O2O001O001Od0\\O001O001O1O000O101O0000000O1001O1O000O100000O1000000EUCWOmkDHLJZ;TCAl<>UCBk<>UCBk<>VCAj]4_2nKaMR4^2oKbMQ4^2oKbMR4\\2oKdMQ4P2cHiM;Ge2`0ZMBe6^2TIeM9Lc2?ZMDe6[2kLQN`LDe6Z2lLRN_LEd6Y2nLQN^LFd6X2oLQN]LHd6W2oLQN]LHd6V2PMRN\\LHd6V2PMRN\\LIc6U2QMRN[LJd6T2QMRN[LJd6S2SMRNYLKe6R2RMSNXLLf6Q2RMSNXLLf6P2SMTNWLLf6o1TMUNULMh6l1TMWNTLMi6j1TMXNSLOj6f1UM[NQLOk6d1UM]NoK1m6MnHV1W4kNoK2n6HRIV1T4oNkK4]7i0kLPOkK7[7f0lLQOkK9W7f0PMQOhK:V7e0TMQOfK:U7d0WMROcK;R7f0\\MnNbK=T7b0[MPOaK?X7=XMRO`Kb0Z79bMGa2JbHEm4c0b2DkMB;E1O1O2N2N002N1O1O001O001O1O1O001O000000001O001O1O1O00000000000000000000O10000O100O100O100000000O1O1N200O10000O1O1N200O1O1O1O1N2M3O1N2N2M3O1N2J6L5a0_O00oNaIfN_6Z20O2O2M2O1N1O2YNSI>P7T13VNmHh0V7l03M3M;FN1O2N2N101000O1O1O001O1000O0010O00100O0010N101O1O10O010O0O1000010O010N2O001O10O1O1O001O100O10O0O0100010O10O0000O10010O10O10O1O0010O010N101O10O01O000000000100O000000000010O01O00000000010O01000O0010O0O1O2N101O0010O1O1O001O100O1O1O1O1O1O100000000O10000O100N2O100O100O1O1O1O1O1O100O1O100N2O100O100O1O1O1O1O100O2O000O100O100N3N1O100O3M5JWl7"}}, {"image_id": 75, "category_id": 1, "bbox": [64.0, 68.0, 447.0, 420.0], "score": 0.9999988079071045, "association_id": 1, "light": [-1.8610122203826904, -2.016125440597534, 1.6720860004425049, 1.8263859748840332], "segmentation": {"size": [566, 643], "counts": "fdS11ca06K5K2N2N1O1N2O1N2O2N1O1O1O1O1O1O01O01OO1O1000O10000000001N101M2_OUOS@Q1l?<0100O10O10000000000O100000000O0100000001O000000000000010O00001O001O1O1O1O1O1O1O0010O01O001O101N1O1O10O01O0010O00010O01O10O01O1O100O001O1O100O2N1O1O1O1O0010O01O1O1O1O3M2O0O2N1O1O001O101N1O1O2N2N1O1O0010O01O100O100O2O0O10O01O010O010O100O2O1O1O1O000O1001N10100O01O1N100TN_LbEa3\\:kLYEU3f:mLYET3e:nL[EQ3d:QM[EP3c:QM]Eo2b:SM]En2a:TM^Em2a:SM`En2]:SMcEn2Z:TMfEm2X:TMhEm2U:TMmEk2Q:WMoEj2n9XMRFh2m9YMTFg2i9ZMYFe2f9\\M[Fd2c9]M^Fc2`9]MbFc2\\9^MeFb2Y9^MiFc2T9]MnFc2P9\\MSGc2l8]MVGc2g8^MZGc2d8]M^Gb2a8^MaGb2]8^MdGb2[8_MfGa2Y8^MhGc2V8]MlGc2S8\\MnGf2o7[MRHe2l7[MVHe2i7ZMYHe2f7[M\\He2c7ZM_He2`7ZMcHf2[7ZMfHf2Z7YMhHg2V7YMkHh2S7XMoHh2o6XMSIk2h6VMYIn2a6RMbIn2[6SMhIk2V6UMlIj2S6WMmIj2Q6VMQJi2o5WMQJj2m5WMSJi2m5VMTJk2j5VMWJi2i5WMWJj2h5UMYJl2f5TMZJm2d5TM\\Jm2c5RM^Jo2a5QM`Jo2_5QMaJU1gL[Of8@dJT1hL[Od8AeJS1hL\\Ob8@iJR1dL_Oc8_OlJP1`LBb8^OQKn0]LEa8^OTKj0ZLJ`8]OZKe0VLO^8]O]Kd2a4^M_Kc2]4_MdKk0XLUOS81fKe0\\LZOl73hK`0_L]Of75kKZL2`L@U7?[L0bL@Q7a0^LNbL@P7b0YJeNCY1UO@n6c0WJjNCR1ZO_Ol6e0UJoNCm0\\O_Ok6f0TJROCh0_O_Oi6i0RJUOEb0@@h6j0oIZOG;CAf6l0kI]OL5CBd6R1aIA7IFCa6[1oHFi0[OHD_6T4hIWLJD\\6X4iISLLEZ6[4hIoKOEX6_4hIlK0EW6`4hIkK2DU6c4iIhK3ER6f4jIeK4DQ6i4jIcK6Co5m4jI`K8Am5S5iI\\K:Ak5X5hIWK>_Oi5_5fIQKb0@f5d5eIlJe0_Oe5i5cIiJh0^Oc5m5cIdJj0@a5P6bIaJm0_O`5R6bI^Jo0_O]5W6cIYJQ1_O[5[6bIVJT1_OX5^6cISJU1^OV5f6bIjIY1@g4a8ZK_GX4n8hKTGo3T9QLoFj3R9WLnFg3S9ZLmFd3T9\\LlFc3U9^LkF`3U9aLjF`3U9bLjF^3W9aLiF_3Y9`LfF`3\\9_LcFa3_9]LaFc3a9\\L^Fc3e9\\LYFe3j9XLVFh3m9VLRFj3P:TLPFl3R:RLnEn3U:PLiEQ4Z:mKeES4^:kK_EW4e:fKYE[4l:dKnD^4h;nJUDS5[jH_OX7`0iH_OX7a0iH\\OZ7c0hHXO]7e0iHTO\\7i0UIcNQ7Z1h4M3M2O0O101N2O1N2O2M2O1O0O100O10001N101N2O001N100O100O01O10O01O010O00010O010O0000O2O0000001O001O001N101N2N2O1N2N3L3I8IngX2"}}, {"image_id": 76, "category_id": 1, "bbox": [414.0, 199.0, 220.0, 280.0], "score": 0.9752633571624756, "association_id": 2, "light": [-1.7313331365585327, -2.0458791255950928, 1.6067445278167725, 1.9275455474853516], "segmentation": {"size": [479, 640], "counts": "goQ67g>6I4M2O1O001N2O1O00001O0000000000000O1001O00000000000000000000000000000001O00001O001O1O00010O00001O010O00102M5[AMc>4]ALb>901N1000000O010O10MaAF_>9aAH_>8aAH^>9bAG^>9bAG^>9bAG^>9bAF`>9`AGa>;1O1K]AKd>8_Ug7"}}, {"image_id": 77, "category_id": 1, "bbox": [58.0, 72.0, 295.0, 200.0], "score": 0.9999631643295288, "association_id": 1, "light": [-2.224545955657959, -2.035783052444458, 2.074793815612793, 1.819098711013794], "segmentation": {"size": [343, 500], "counts": "\\cc01f:2N2M101O00000O10000O10000O1O100O1O1O1O1N2N1O2N2N2O02O001O0010O01O0000001O00101N2N2OO10O0100O001O001O1O1O1O1O1O001O00001O1O001O001O001O00001N101O001O00001N1000001O00010O001O00001O000mMnNaJR1P5^OoJb0l4DSK=f4IZK7a4N_K2_40aK0_40aK0^41bKO^41bK0\\41dKO\\41eKN[42eKOZ41fK0Y41fKOZ41fK0Y41fK0Y40gK1W40iK0W41hK0W40jKOV42iKOW41hK0W41iKNW43hKNW44hKLW45hKNU44jKNS43lKNS43lKNS43lKMU42lKNT42kKOT42kK1S40kK3S4MlK5S4KlK8R4HnK9Q4GnK:Q4FoK;Q4EnK[1\\5X1nJ]NS5d1VKPNl4Q2WKiMk4`2nJ\\MS5U3UJ]L18m5j3lIUL64\\5j4L1O10O00100O1O1O1O1O001O001O1O1O2N1O0SNYJYM9l0_5g1RKWNn4f1VKYNk4c1ZK[Ng4a1^K]Nc4^1[JgMl0h0k4m1YKmMi4Y1RJiN^1_Od4g1nIkNk7S1UHoNj7P1WHQOi7m0WHTOi7l0WHSOk7l0UHTOk7l0THTOn7k0QHVOP8i0PHVOR8h0nGYOS8f0mGZOT8e0lG[OT8e0lGZOU8f0jG[OV8e0jG[OW8d0iG\\OW8d0iG[OX8e0hG[OX8e0hGZOY8f0gGZOY8g0fGXO[8h0eGXO\\8g0dGYO]8f0cGYO_8f0aGZO`8e0`G[Oa8]11N101O000O2O1O001N2N2O1N1O101N1O1_OnF\\OS9d0mF\\OT9c0lF\\OU9S10O2N1BhF\\OY9o02O1DdF\\O^9a0dF^O]9`0dF@]9?dF@]9?dF@^9>dF@\\9`0eF]O^9b0;10O010O10O010O1O001N1M4M2O101O1O001O100O010O10O1000000000000000000000001O001O001O001O1N101N1O2N2O1N2N2N3M4L[Sa1"}}, {"image_id": 78, "category_id": 1, "bbox": [0.0, 89.0, 240.0, 265.0], "score": 0.9999961256980896, "association_id": 2, "light": [-1.3952348232269287, -2.249032735824585, 1.367882490158081, 2.1623899936676025], "segmentation": {"size": [453, 604], "counts": "Y:e0_=2O1O000O2O00000000000O10000000000000O100000000000000000dIXO[Oh0b0LmN4Q13jNMU16iNJV18iNHV19jNGV1:iNFV1;jNFU1;jNEU1iNCV1>iNBV1?jNAV1`0iN@W1`0iN@W1a0gN@Y1`0gN@Y1a0fN_OZ1a0fN_OZ1b0eN]O\\1c0dN]O\\1d0cN\\O]1d0cN\\O]1e0bN[O^1e0bN[O^1f0aNZO_1f0aNZO_1g0`NXOa1h0^NYOa1h0_NXOa1h0_NXOa1i0^NWOb1i0^NWOb1j0]NVOc1j0]NVOb1l0]NTOc1l0]NTOc1m0\\NSOc1o0\\NQOd1P1[NPOd1R1[NnNd1T1[NmNc1U1\\NkNc1X1[NhNe1Y1ZNgNf1_1TNaNk1c1QN^No1c1PN]NP2c1PN]NP2c1PN]NP2d1oM\\NQ2d1oM[NR2f1mMZNS2f1mMZNS2f1mMZNS2f1mMZNS2f1mMYNT2g1kMZNU2f1kMZNU2f1kMYNV2g1jMYNV2g1jMYNV2f1kMZNU2f1kMYNV2g1jMYNV2f1kMZNU2f1kMZNU2e1lM[NT2e1lM[NT2e1kM\\NT2e1lMZNU2f1kMZNU2f1kMZNU2f1kMZNU2g1jMYNV2g1jMYNV2g1jMYNV2f1kMZNT2P1cNoN^1o0dNQO\\1n0eNRO[1m0fNSOY1m0hNSOX1l0iNTOV1l0kNTOU1k0mNTOR1m0nNSOQ1m0POSOP1m0POSOo0m0ROSOn0m0ROSOn0l0SOTOm0m0SOROl0P1SOPOm0P1SOPOm0Q1ROoNn0R1QOnNo0R1ROmNn0T1QOlNn0U1SOjNm0W1ROiNm0X1TOgNl0Z1SOfNl0\\1SOeNk0^1TJUN_4<\\1S2bNmM^1T2hNeMX1\\2hNcMW1_2iN`MW1a2iN^MW1k2_NUMb1l2]NTMc1m2ZNUMf1m2XNSMh1h1oInNX4[Oi1^1[JROm3Ai1W1bJiNP41^1T1HlN9S1GnN:P1GoN:P1FQO;m0FSO:m0FROo0BQO>o0BQO>P1AoNa0P1@oN`0R1_OmNb0S1^OmNb0T1]OlNc0U1\\OjNf0V1YOjNg0V1YOjNg0X1WOhNi0Y1WOfNj0Z1UOfNk0[1TOdNm0]1ROcNn0^1RO`NP1a1nN^NS1c1h51O0O2O1N100O1O000001O000O100001O1O1O2N1OiNmC=R001N101O006J0O10001O000O1000000O100000000O1000O100000PLCXJ=g5FWJ:h5IVJ7j5JUJ6j5LUJ4k5NSJ2m50QJ0n52QJNo52QJNo53oIOP62oINP63PJMo55PJKP66oIJP68oIHQ69nIHQ69nIGQ6;nIER6QJBo5>QJBn5?RJAm5`0SJ@m5`0SJ@l5a0TJ_Ol5a0TJ_Ok5b0UJ^Ok5b0UJ^Ok5b0UJ^Ok5b0UJ^Ok5b0UJ^Oj5c0VJ]Oj5c0VJ]Oj5c0VJ]Oj5c0VJ]Oj5c0VJ]Oj5c0VJ]Oj5c0VJ]Oi5d0WJ\\Oi5d0WJ\\Oi5d0WJ\\Oi5d0WJ\\Oi5d0WJ\\Oi5d0WJ\\Oi5d0WJ\\Oi5d0WJ\\Oi5d0WJ\\Oi5d0WJ\\Oi5e0WJZOi5f0WJ[Oh5f0WJZOi5f0WJZOi5g0VJYOj5g0VJYOj5g0VJYOj5h0UJXOk5h0UJXOk5i0UJVOk5j0UJVOk5k0TJUOl5k0TJUOl5l0SJTOm5l0SJTOm5m0RJSOn5n0QJROo5n0QJQOP6P1oIPOQ6P1oIPOQ6Q1nIoNR6Q1nIoNR6R1nImNR6T1mIlNS6T1mIlNS6U1lIkNT6U1mIjNS6W1lIhNU6X1kIhNU6Y1jIgNV6Y1jIgNV6Y1jIgNV6Y1jIgNV6Y1jIfNW6[1hIeNX6[1hIeNX6[1hIeNX6[1hIeNX6\\1gIdNY6\\1gIdNY6\\1gIdNY6\\1gIdNY6\\1gIdNY6\\1hIcNX6^1gIbNY6^1gIbNY6^1gIbNY6^1hI`NY6`1gI`NY6`1gI`NY6`1gI`NY6`1gI`NY6`1hI_NX6a1hI_NX6a1iI^NW6b1iI^NX6a1hI_NX6a1hI_NX6`1oGZNd05]7a1oG[NSOOV14i7a1oG\\NQO2U11k7a1nG^NPO3U1Nm7`1oG`NmN4W1Km7a1oGnN4_On7c1nGoNQO\\OU:d1kFPOoN^OU:b1lFQOmN^OW:`1mFROmN]OV:a1nFQOmN\\OV:b1UGjNT9c0cEXO\\14Q9b0gEVO[17n8b0dG]O\\8b0fG]O[8a0gG^OY8a0lGYOV8g0e2N1O100O2O0O1O100000000O2O000000000000010O000001O0000010O00001O010O002N1O6J1O2N1O1O1O00001O00001O0001O00001O00001N101O001O1O1O1O1O1O1O1N2N2N3JShh2"}}, {"image_id": 78, "category_id": 1, "bbox": [1.0, 245.0, 71.0, 65.0], "score": 0.9779088497161865, "association_id": 4, "light": [-1.9518145322799683, -1.7912046909332275, 1.8689275979995728, 1.517995834350586], "segmentation": {"size": [453, 604], "counts": "]g0325e=601O0000000000000O10000000000000000000000000000000000000000001O00\\Od0B2`CRO^2O001N10000O10001O00000O10000000000000000000000000001O00000kJG_L7b30WL0i30XLNi33T51O1O2OO3L4Lb>4ZAc0^O01M4M5]OdB4k=Kkj01SUO6J5L2M4M2N2O2M5L4K;F7H6K4K2O1O1O1N2O2N2N1O0O2O000O1000001N100000000O101O00000O2O001O1O1N101O1O2M2O3jG`M`4b2ZKeMd4]2XKfMg4\\2\\JkLiNo0k6h2_IXNa6o1hHaNX7U4010N2L4M2I8C=N2BkGjJX8S5>O2M2O1N3N1O1O2N1O1O1N2N2N2M4M2O1M3L4J6N2N2O1O1N2O1O1eMcEn0]:oNgEo0Z:nNiER1W:nNjEP1W:oNjEQ1V:oNjEQ1W:nNjEQ1V:oNjEP1V:POkEP1U:POlEo0T:QOlEo0T:QOlEo0T:QOmEn0T:QOmEn0S:ROnEm0R:SOoEk0R:UOoEj0R:UOoEj0Q:VOPFi0P:XOoEh0R:WOnEi0R:WOnEi0R:WOnEi0R:WOnEh0S:XOmEh0T:WOlEi0T:WOlEi0U:VOkEj0U:VOkEj0U:VOkEk0U:TOkEl0U:TOkEl0U:TOkEm0T:TOkEn0S:ROmEo0R:ROmEP1R:oNnES1P:nNoER1Q:nNoENF0Z:3PFJLOT:7PFI1Nm9:QFG7Ne9;TFF:Na9[IBb6a0^I_O`6d0_I\\O`6f0_IZO`6h0_IXO`6j0_IVO`6l0_ITO`6m0`ISO`6n0_IRO`6P1_IPOa6P1_IPO`6R1_InNa6S1^ImNa6U1^IkNb6U1^IkNb6V1]IjNb6X1]IhNc6Y1\\IgNc6[1\\IeNd6\\1[IdNd6]1\\IcNd6^1[IbNd6`1[I`Ne6a1ZI_Ne6b1ZI_Nf6b1YI^Ng6c1XI]Nh6d1WI\\Nh6g1VIYNj6h1UIXNj6k1TIUNl6m1QITNn6o1PIQNo6Q2PIoMo6T2oHlMQ7V2mHjMR7Y2lHgMT7[2iHfMV7\\2iHdMW7\\2iHdMV7^2iHbMW7^2iHbMV7`2iH`MU7b2kH]MU7e2iH\\MW7d2iH\\MV7f2iHZMW7g2hHYMW7h2iHXMW7i2gHXMX7i2hHWMW7k2hHTMV7o2jHQMS7S3kHnLT7T3kHlLT7U3mHjLR7X3mHhLS7X3nHgLQ7[3nHeLR7[3nHeLQ7]3oHbLP7`3oH`LP7b3PI]LP7d3RIYLm6i3UITLj6o3TIQLl6P4SIPLm6Q4RIoKm6S4SIkKn6V4SIhKm6Y4TIeKk6]4UIbKk6_4TIaKl6a4RI_Km6c4SI\\Kl6P50000O10O10000000O1000000000000000000000000000000000000000O10000KTIoJl6Q5TIoJl6Q5UInJl6P5VInJk6R5UInJk6R5UInJk6Q56O100O1OnHRKm6n46OlHTKo6k4PIWKP7P51O000APIgKP7W4QIjKo6T4QInKo6Q4oHRLR7k3oHVLQ7i3PIWLP7h3QIXLP7e3RIZLo6e3QI\\Lo6a3TI_Lm6^3UIbLk6\\3WIdLi6[3XIeLh6Z3YIfLh6Y3XIgLh6X3XIiLh6V3YIjLg6V3YIiLi6U3XIkLi6S3XImLh6Q3ZIoLi6m2XISMm6G_Hd2e0eMZ7X2fHiM[7U2fHkM\\7R2eHnM[7R2eHnM]7P2cHPN^7n1cHRN_7l1aHTN`7j1aHVNa7h1_HXNa7g1_HZNb7d1_H\\Nb7b1_H^Na7`1aH`N`7]1bHcN^7[1dHeN\\7[1dHeN\\7[1dHeN]7Y1dHgN\\7Y1dHgN]7W1dHiN\\7W1dHiN]7U1bHmN^7R1`HPOa7o0ZHWOg7h0WHXOk7g0THSOT8g0oG\\OQ8d0lG@T8>jGFU8:iGIV86iGMV82kGOU80jG2U8MkG4U8KlG6S8ImG8S8GmG:S8DnG=R8@PHb0o7^OQHb0o7]OQHd0o7\\OQHd0o7\\OoGg0P8YOoGh0Q8WOPHi0P8WOPHi0P8WOPHh0R8WOnGh0S8XOmGg0T8YOlG?YOiNm8g0jG2k8NUGLT91lFMY90gFEe9:[FEf9;ZFDh9;XFEh9;XFEh9;XFDi9=VFCk9\\F]Od9c0Q1OPE^O[:b0f0O0D]D4d;GaD7i;O1N2N2NnSm4"}}, {"image_id": 80, "category_id": 1, "bbox": [117.0, 141.0, 471.0, 249.0], "score": 0.9999897480010986, "association_id": 2, "light": [-2.55672025680542, -2.01513671875, 2.5335772037506104, 1.9119880199432373], "segmentation": {"size": [391, 640], "counts": "_P]1l0Y;5L3M2N2O1O1N10000O2O0O1O1O1O2O0O1O1O10001N1000000gLZNPLh1j3^NULb1h3bNWL^1g3eNWL\\1g3fNYLZ1f3hNXLY1g3hNYLY1e3iNYLX1g3hNYLX1f3iNYLX1g3hNYLX1f3jNXLW1h3iNXLW1h3iNaI\\O^2k1P4kN^I]Ob2h1P4TOnKm0R4TOmKl0R4UOnKk0R4VOmKj0S4VOlKk0T4VOkKj0U4WOjKi0U4XOkKh0U4YOiKh0W4^OcKb0]4A`K?_4C_K>a4C^K=b4D]KfJCY5>gJBY5?fJAY5a0fJ_OZ5b0eJ^O[5c0dJ]O[5e0dJ[O\\5g0bJYO]5i0bJWO^5j0aJVO^5l0aJTO^5n0aJRO_5o0_JRO`5P1_JPO`5Q1`JoN_5S1`JmN`5S1`JmN`5T1_JlNa5U1^JkNb5U1^JkNb5V1\\JkNd5V1[JjNe5W1ZJiNf5X1YJhNg5Y1XJgNh5Z1XJeNh5]1VJcNj5^1UJbNk5_1UJ`Nk5b1SJ^Nm5c1RJ]Nn5d1RJ[Nn5g1PJYNP6h1PJWNP6j1oIVNQ6l1nISNR6Q4000000O10000000000000VNZJSMf5n2\\JoLd5Q3]JnLc5R3^JmLb5S3^JmLb5S3_JkLb5U3^JkLb5U3_JjLa5V3_JjLb5U3^JkLb5U3_JjLa5V3_JjLa5V3`JiL`5W3`JhLa5X3`JgL`5Y3`JgL`5Y3eJbL[5^3jJ]LV5c3kJ[LW5d3jJ[LV5e3jJ[LV5e3jJ[LU5f3lJYLT5g3lJYLT5g3lJYLT5g3lJYLT5g3lJXLU5h3lJWLT5i3lJWLT5i3lJWLT5i3lJVLU5j3kJVLU5j3lJULT5k3lJTLU5l3kJTLU5l3lJRLU5n3kJRLU5n3kJRLU5n3kJQLU5P4lJoKT5Q4lJoKT5Q4lJoKT5Q4lJnKT5S4lJmKT5S4lJmKT5S4lJlKU5T4jJmKU5T4kJkKV5U4jJkKV5U4jJjKW5V4iJjKV5W4jJhKW5X4iJhKW5X4hJiKX5W4hJiKX5W4hJhKX5Y4hJgKX5Y4hJgKX5Y4hJgKX5Y4hJgKW5Z4iJfKW5Z4hJgKX5Y4hJgKX5Y4hJfKX5[4hJeKX5[4hJeKX5[4hJeKW5\\4iJdKW5\\4hJeKX5[4hJeKW5\\4iJcKX5]4hJcKW5^4iJbKW5^4iJbKV5_4iJaKW5`4iJ`KV5a4jJ_KU5b4jJ_KU5b4kJ^KS5d4lJ]KR5e4nJZKQ5h4nJYKP5i4oJXKn4k4QKVKl4m4SKTKk4n4TKSKk4n4TKRKm4n4SKRKl4o4TKQKl4o4TKQKk4P5TKQKl4o4TKQKk4P5UKPKj4Q5VKnJj4S5UKnJj4S5VKmJi4T5WKlJi4T5VKlJj4U5SKnJl4S5oJRKQ5n4mJTKR5m4mJTKS5l4lJUKT5k4lJUKS5l4lJTKU5l4kJTKU5l4jJUKU5k4lJUKT5k4kJVKT5k4lJUKT5j4lJVKT5k4lJUKT5j4lJVKT5c4SK\\Ko4_4QKdKQ5g51_N`J\\La5b3`J_L`5`3`J`L`5`3aJ`L_5`3aJ`L_5_3aJbL_5^3aJbL_5^3aJaL`5^3aJbL^5_3aJbL_5]3bJcL^5]3bJbL_5]3aJdL_5[3bJeL^5Z3cJeL^5[3aJfL_5Y3bJgL^5Y3bJgL^5X3bJiL]5X3cJgL^5X3cJhL]5X3bJiL^5W3bJiL^5W3bJiL^5V3cJjL]5V3cJjL]5V3cJiL^5W3bJiL^5W3bJiL^5W3bJiL]5X3bJhL_5X3aJhL_5X3aJhL_5X3aJhL_5X3aJgL`5Y3`JgL`5Y3`JgL`5Y3`JgL`5Y3`JgL`5X3aJhL_5X3aJhL_5X3`JiL`5W3`JhLa5X3_JhLa5X3_JhLa5X3^JiLb5W3^JiLb5W3^JiLb5V3^JkLb5U3^JkLb5U3^JkLb5U3]JlLc5T3]JlLc5T3]JlLc5T3]JlLc5S3]JnLc5R3]JmLd5S3\\JmLd5S3\\JmLd5S3[JnLe5Q3\\JoLd5Q3[JoLf5Q3ZJoLf5Q3ZJoLf5Q3YJPMg5P3YJPMg5o2YJQMi5n2WJRMi5n2WJRMi5n2WJRMi5n2VJSMj5m2VJSMj5m2VJSMj5l2WJTMi5l2WJTMi5l2VJUMj5k2VJTMk5l2UJTMk5l2UJTMk5l2UJTMk5l2TJUMl5k2TJTMm5l2SJTMm5l2SJTMm5b4100000O100000O100000001O0000000O10000000000O10000000000O100000000000001[NmITMS6l2mITMS6l2mISMT6m2lISMT6m2lISMT6m2lISMT6m2lISMT6m2lISMT6l2mISMT6m2lISMT6m2lISMT6m2lIRMU6n2kIRMU6n2kIRMU6n2kIRMU6n2kIRMU6n2kIQMV6o2jIQMV6o2jIQMV6o2jIQMV6o2kIPMU6P3kIPMU6P3kIPMU6P3kIPMU6P3kIPMU6P3kIoLV6R3iInLW6R3jImLV6S3jImLV6S3jImLV6T3iIlLW6T3jIjLW6V3iIjLW6V3iIjLW6V3iIjLW6V3jIiLV6X3iIgLX6Y3hIgLX6Y3iIfLW6Z3iIfLW6Z3jIeLV6[3lIcLT6^3oI^LP6c3SJZLm5g3SJXLm5h3VJULj5l3VJRLk5o3UJPLk5T4QJlKn5Z4mIfKS6]4jIcKV6_4iI`KW6a4hI_KW6c4hI]KX6c4hI]KX6d4hIZKY6f4gIZKX6h4hIWKY6h4hIVKY6j4iITKW6m4hISKX6m4iIRKX6n4gIQKZ6P5eIPK[6P5eIPK[6Q5eInJ[6R5eInJ\\6R5cInJ]6R5cImJ^6^50000001O0O10000O1000000O10000000000O101J\\IgJd6Y5\\IgJd6Y550001N100O2O0O2N2N1O2O1N1O1O2O0O100O2O0O1O2N1N3N3J9dMTIhNZ7k0X2eNaE1J9m:AlE1^Pd0"}}, {"image_id": 81, "category_id": 1, "bbox": [1.0, 113.0, 365.0, 331.0], "score": 0.9999992251396179, "association_id": 1, "light": [-1.9978625774383545, -2.21738862991333, 1.8542757034301758, 2.1013591289520264], "segmentation": {"size": [533, 400], "counts": "gl0:Z`02O1N2N2O1N101O1N2O001O0O2O001O001N101O1O1N2O1O00001N10001O1O001O0O101O00000O100O2O000O2O00000O0100O0100O010O1000O100O1^Oo@^OS?`0b0O1000O01000000000000000`KFeH:W74_HL]7:aHF\\7?bHA]7b0aH^O^7d0aH\\O^7g0`HYO_7j0_HVO`7Q1ZHoNe7[1RHeNm7e1jG[NU8k1fGUNX8Q2dGoM[8U2bGkM]8Z2_GfM`8^2]GbMc8a2YG`Mg8c2VG^Mh8e2VG[Mj8h2RGYMn8j2oFWMP9m2kFTMT9P3iFQMV9R3gFnLY9T3eFlL[9V3bFkL^9V3aFkL]9V3bFkL^9V3aFjL_9V3QFPLIl0U:U3oESLHj0Y:S3oE]MP:c2oE^MP:d2nE^MQ:b2oE^MQ:b2oE^MQ:b2oE^MQ:b2oE^MQ:a2PF`Mo9`2PFaMP:^2QFbMo9]2RFcMn9[2TFeMl9Z2UFfMk9X2WFhMi9W2YFiMf9V2[FjMe9U2]FjMc9U2_FkM`9S2cFlM]9R2fFnMY9o1jFQNV9l1mFTNS9i1QGWNn8d1WG\\Ni8`1[G`Ne8]1^GcNb8[1aGdN_8[1bGeN^8Y1eGfN[8Y1fGgNZ8X1hGgNX8W1jGiNV8U1mGjNS8T1oGlNQ8R1QHoNn7o0UHPOk7n0WHROi7m0XHSOh7l0YHUOf7j0\\HVOc7j0]HVOc7j0]HVOc7i0_HWO`7i0`HWO`7h0aHXO_7h0aHYO^7g0bHYO^7f0cHZO]7f0cH[O\\7e0dH[O\\7f0dHZO[7g0dHYO\\7h0cHYO\\7h0cHXO]7i0bHXO]7i0bHWO^7j0aHVO_7k0_HWO`7i0`HWO`7j0_HWO`7j0_HXO_7j0_HWO`7j0_HWO`7l0]HTOc7n0ZHTOe7o0XHQOh7R1UHnNk7T1SHmNl7U1RHkNn7V1QHjNo7X1nGjNQ8W1nGjNQ8W1nGiNR8Y1lGhNS8Z1kGfNU8\\1iGdNW8^1gGbNY8`1eG`N[8b1cG^N]8d1aG\\N_8e1`G[N`8f1_GZNa8g1^GYNb8h1]GcMZOkNY9c3\\GaM@hNT9h3[G_MHbNn8Q4XG]M^9d2aF\\M_9f2_FYMb9i2\\FWMd9k2ZFUMf9l2YFSM9cNc8[4TGQM8iN`8W4WGoL9mN^8U4XGnL:oN\\8T4YGmL;PO[8U4YGiL=ROZ8X4VGfLb0oNX8a4RG^Lc0UO[8a4oFYLb0\\O]8e5`GaJ^8]4RGgK`0O]8]4^HeKb7]4[HeKc7_4YHbKf7b4UH`Kj7e4PH^Kn7e6N2O1N2O2O0O100O1O010O001N[NWHaJh7]5cH[J]7b5jHZJV7e5oHVJR7j5QIQJQ7S6nHiIS7Y6nHbIT7_6_12NlNZFfJI?g9i4nFYKk8f4\\G\\K^8c4gG^KV8c4kG^KQ8e4oG\\Kn7f4SHZKk7g4VHYKg7j4YHVKd7l4]HTK^7Q5bHoJZ7U5fHkJW7W5kHhJT7Y5lHgJS7Y5nHgJQ7Z5PIeJo6[5RIeJn6[5RIeJn6[5RIeJn6[5RIeJn6[5RIeJn6[5SIdJl6]5TIcJl6]5TIcJl6^5SIcJl6]5TIcJl6]5TIcJl6]5TIcJl6]5TIdJk6\\5UIdJk6\\5UIdJk6\\5VIdJi6\\5WIdJi6\\5WIeJh6[5XIfJg6[5YIeJf6[5ZIfJe6Z5\\IeJd6[5\\IfJc6Z5]IfJc6Z5]IfJd6Y5]IfJc6Z5]IgJb6W1WHe1W1TMc6e0kHS2b0XMc6`0SIU2;ZMc6;[IW22_Mb67`IY2N`Mc64bI[2KaMc63dI[2JbMb61fI\\2HcMd6MfI`2GaMg6KdIc2F`Mj6HbIg2G]Mm6CaIP3FVMY9j2Y201N10000O1001O1oDlL_8U3^GnLa8S3[GQMd8P3YGSMf8o2UGUMj8l2TGVMk8l2RGVMm8l2PGVMo8l2nFVMQ9j2oFVMQ9i2PGWMP9i2PGVMQ9i2QGVMo8h2SGWMn8h2SGXMm8f2VGXMk8g2WGXMi8g2YGWMh8g2\\GWMd8h2^GVMc8i2`GTMa8l2bGoL`8P3iElLSVIWN4Y1g6=XIYN2Z1f6`IA`6?`I@a6`0`I]Ob6d0^I[Ob6f0YI]Oh6c0SIBm6?QIAP7`0nH_OT7b0iHmNLN\\7W1dHnN0J\\7_21N1N300O1O1N1O2O100O1O1N2BVHXNk7f1YHXNg7g1\\HUNf7j1?00A?L4O1O100O2N2N101N2MbZ_3"}}, {"image_id": 82, "category_id": 1, "bbox": [235.0, 223.0, 265.0, 107.0], "score": 0.9999951124191284, "association_id": 1, "light": [-2.148973226547241, -2.544511079788208, 2.0201010704040527, 2.34623122215271], "segmentation": {"size": [333, 500], "counts": "`f\\2?8Jm8Q1L3O1N2O0O101N2O0O2O000aN]NTJd1i5`NUJ`1j5cNTJ]1k5fNRJ[1n5fNQJZ1o5gNPJY1P6hNoIX1P6iNPJW1P6iNPJW1P6jNoIV1Q6jNoIV1Q6kNnIU1R6lNmIT1S6nNkIR1U6POiIP1W6PO[IZOOf1f6ROWI]OJJ2g1m6SOSI`1m6aNQI`1o6VOoH6Q7JoH6Q7JoH6Q7JoH6Q7JoH6Q7JoH6Q7JoH6Q7JoH6Q7JoH6Q7JoH6Q7JoH6Q7JoH6Q7JoH6Q7JoH6Q7c10XNoH4Q7LoH4Q7LoH4Q7LoH4Q7LoH4Q7LoH4Q7LoH4Q7MoH2Q7NoH2Q7NoH2Q7NoH2Q7NoH2Q7NoH2Q7NoH2Q7NoH2Q7NoH2Q7e10ZNoH0Q70oH0Q70oH0Q70oH0Q7f10[NoHNQ71PIOP71PIOP7mNQI`0Oc0P7lNSI`0Md0P7lNTI?Md0o6lNVI?Ke0o6lNWI>Jf0o6kNYI>Hg0o6kNYI>If0n6lNYI>If0n6lNYI>Je0m6nNXI?Ic0o6nNYI?Hb0o6oNYI`0Ga0P7oNYIa0F`0Q7oNYIa0G?P7POYIb0F>Q7POYIb0F>Q7POYIc0Fn6;^IWOD>n6:`IWOB?n69bIWO@`0n69dIUO^Ob0n68_IlND9Oc0n67_IoNC7Od0o66^IPOE5Ne0o66]IROE3Nf0P76\\ITODN0i0P75\\Ia0d6@[I`0e6BXI?h6BWI>i6CoHgN4f1m6GRI9n6GRI9n6GRI9n6FSI:m6]O\\Ic0d6[O^Ie0b6VOcIj0]6UOdIk0\\6TOeIl0[6SOeIn0[6ROfIm0Z6SOfIm0Z6ROgIn0Y6ROgIn0Y6ROgIn0Y6ROgIn0Y6QOhIo0X6QOiIn0W6ROiIn0W6ROiIn0W6QOjIo0V6QOkIn0U6ROkIn0V6QOjIo0V6QOkIn0U6ROkIn0U6ROlIm0T6SOlIm0T6SOlIm0U6ROlIm0T6SOlIm0T6SOlIm0T6SOlIm0U6SOkIl0U6TOlIk0T6UOlIk0U6TOlIk0T6UOmIj0T6VOkIj0U6VOkIj0U6VOkIj0U6VOlIi0U6UOlIk0T6UOnIi0S6VOPJg0P6YORJe0n5ZOTJe0l5[OTJe0m5ZOSJf0m5ZOTJe0l5[OTJe0l5ZOUJf0k5ZOVJe0j5[OWJd0i5[OYJd0h5[OYJd0g5[OZJe0f5[OZJe0f5[O[Jd0e5\\O[Jd0e5\\O[Jd0e5\\O\\Jc0e5\\O\\Jc0d5\\O^Jc0b5]O_Jb0a5^O`Ja0`5_O`Ja0`5_O`J`0a5@_J`0a5_OaJ`0`5_O`Ja0`5_O`Jb0_5^OaJb0_5^ObJa0^5^OdJa0\\5_OeJ`0\\5_OdJa0\\5_OdJa0\\5_OdJa0\\5_OeJ`0\\5^OeJb0[5^OeJb0[5^OeJb0\\5\\OfJc0Z5\\OhJb0b701O00001O0O2N2MXF"}}, {"image_id": 82, "category_id": 1, "bbox": [392.0, 168.0, 50.0, 47.0], "score": 0.9801158905029297, "association_id": 3, "light": [-2.095547914505005, -1.9473230838775635, 2.0290589332580566, 1.8543992042541504], "segmentation": {"size": [333, 500], "counts": "keo31\\:000000001eN0WH0i71VHOj71VH0i71VHOj71VHOj71VHOj71VHOj71WHNi72WHNi73VHMi74WHLj73VHMj73VHNi72WHNi72WHNi72WHNi73VHMj73VHMj73VHMi74WHLi74WHLi74WHLi74WHLi75VHKj75VHKj75VHKj76THKl75THKl76SHJm76SHJn75RHKn75RHKn75PHHSO2m85THKm74SHLn72THMm72SHNV90000000000000mdb0"}}, {"image_id": 83, "category_id": 1, "bbox": [85.0, 181.0, 143.0, 150.0], "score": 1.0, "association_id": 3, "light": [-1.9551489353179932, -2.146815776824951, 1.8244822025299072, 1.8338992595672607], "segmentation": {"size": [434, 650], "counts": "XWT1j0d<=F3L5I7J4N3N2M4L4L4L3N6TEgMR:Q3L3M1\\FgLm8^3jFgLU9k301N1000000O100O10000O10O10O01O1MoFjKl8k3\\GZLb8c3aG]L_8b3aG_L_8`3bG`L^8`3bG`L^8`3bG`L^8`3bG`L^8`3bG`L^8c3_G]La8g3[GYLe8l3VGTLj8o3SGQLm8P4SGoKm8Q4SGnKn8S4PGnKP9R4PGnKP9R4PGnKP9R4PGnKP9Q4PGPLP9o3PGRLQ9W40EnFULS9i3nFXLS9S4001O1N2gNVGhMk8R2ZGnMf8P2\\GPNf8n1YGSNi8k1WGTNl8j1TGVNn8h1RGXNn8h1RGXNo8g1QGXNQ9h1nFXNS9g1mFYNT9f1kFZNV9f1jFZNV9f1jFZNV9g1iFYNX9f1hFZNW9g1iFXNX9g1iFYNV9h1jFXNV9g1jFZNU9g1kFZNT9?_FG?JR9jN_OS;2RFb0jN\\OT;3QFa0kN\\OT;3PFb0lN[OT;3PFb0lN[OT;3oEc0mNZOT;3oE>lNFT;LPF=nNFR;MPFm:AoDf0n:[OkDl0U;SOiDP1V;POkDP1V;nNjDV1T;hNmDY1S;eNmD\\1U;aNlD^1T;cNlD\\1T;dNmD[1T;fNlDX1S;kNkDU1U;lNgDW1Y;iNgDW1Y;jNfDV1Y;kNfDV1Z;mNbDT1^;`00O0MdDRN\\;m14A`0H\\DlNZ;S1fDPOW;P1jDPOV;o0kDROT;m0mDSOS;m0mDSOS;m0nDROR;n0nDROR;n0nDROQ;o0oDQOQ;o0oDQOQ;o0oDQOQ;o0PEoNQ;R1mDoNS;Q1mDoNS;Q1mDoNS;Q1mDoNS;R1cDjN04\\;T1bDiN23\\;T1cDhN14\\;U1kDkNU;U1_DgN84Y;U1_DgN84Y;U1kDkNU;U1kDkNU;T1lDlNU;S1kDmNU;T1kDkNU;U1kDjNW;V1hDjNX;W1gDiNY;W1gDiNY;W1gDiNY;X1fDhNZ;Y1eDgN[;Y1eDgN[;Z1dDeN^;[1`DfN`;[1_DeNa;\\1^DdNb;l0YD@4Dd;k0YDC1Af;k0\\DCMAi;k0[DDKAj;k0[DDKAk;k0ZDCKBl;l0WDBLCn;l0UD@MDn;k0\\DZOGKo;g0^D\\OCLUFgAU1W>oNdAT1\\>mNbAT1\\>PO_AS1`>POWA<2_N5NH2i>R3`AQMHKg>g3YAYLf>h3[AWLd>k3[ATLe>m330O100O1O1O1O1O100O1O100O1O10lNcAmM\\>R2dAYMO9]>\\2fA]MN4\\>\\2hAaM1MX>^2kAfMOIV>_2mAjMMEV>_2oAnMM^OU>c2oAPN^>o1cAQN]>l1fATNZ>i1iAWNV>i1kAWNU>h1lAXNT>g1nAXNR>g1oAYNQ>e1QB[No=d1RB\\Nn=c1SB^Nl=a1UB_Nk=a1UB_Nk=`1VBaNi=_1WBaNi=^1XBbNh=^1XBcNg=]1YBcNg=]1ZBbNg=]1YBdNf=\\1[BcNe=]1[BdNd=\\1\\BcNe=^1[BaNe=_1[BXNnNJg>P2YBYNQOBg>V2XBYNk=h1PB^Nn=c1iAfNV>\\1eAgN[>Z1aAiN_>h20000000O1NVAZLf>S3]ARM1Lb>Q3_AmL33^>o2]ASM20`>l2^AVM1Na>l2^AWMONc>l2]AXMNMd>k2]AZMNKe>l2\\AdMd>\\2\\AdMd>Y3O00000000001O0001O00001O1O0M[ASLf>l33O2O0O1O1H8@m@UMY?U2TAhMX?R2]AUNn=i1SBXNm=f1SB\\Nm=c1RB^Nn=a1SB_Nn=`1RB`Nn=`1RB`No=`1PB`NP>b1]ARNL;h>]2SAcMm>`2QA_Mo>b2PA]MR?d2n@YMS?i2>1O2N2M2O1O001O1O00O010O2N1O100O1O1O4L2N1N2O1O1N6J3N1N2N3L5K5VO\\_OWOi`0`0l0M4L4KY^n3"}}, {"image_id": 84, "category_id": 1, "bbox": [131.0, 267.0, 331.0, 279.0], "score": 0.9999998211860657, "association_id": 2, "light": [-1.7467753887176514, -2.2876245975494385, 1.6389873027801514, 2.1860272884368896], "segmentation": {"size": [600, 521], "counts": "mW]23bb05N1O1O001O0O2O001O001O001O10O01O001N101O1O1O2M101O001N101N1O3N1N2O1N2O001N2N2N2O2M101N101N2N101O0O2O001O0O2O001O000O2O0O100O10000O101N100O100O1O100O010O1O100O0O2O0O_Oo_O]NR`0b1T@XNm?h1a0001N101N1O2N1010O01O1O1O1O1O001O100O101N1O101O0O10001N1000001O0O10001O001N10001O00001N1000000000000O10000000000000000000000000O01000000000000000000O1000000000O1000000000000O1O2N1N2LZMWNeDg1l:b0\\C\\Ob`MeAb2Z>n010O0010mNYATNg>n21J5O11O010000O1LQA_Ln>c33001O001O0001O001O001O001O00001O00001O001O001O0010O00100O001O0010O01O1O1O1O001O00000000001O000000000000O10001O0000O010000O100O10000O100000000O100000000O10O1000O10000O10000O100O1000O0100O1O00100O010O10O10O10000O010O1O10000O10000O100000000O1000000O10000000000000000O1001O00010O001O0010O0100O2O0O10O01O1O100O01O010O1O1O010O0O101O001N2O1O001O1N101O1O1O1O1N2O0O2O2M3N4K2O1N2O1N103L6J:F9G5jNa^Oi0ia0N2N2N2_Oo]O8Zb0N2N2O1MPe[4"}}, {"image_id": 85, "category_id": 1, "bbox": [22.0, 89.0, 144.0, 126.0], "score": 0.9999999403953552, "association_id": 1, "light": [-1.7662980556488037, -2.126965045928955, 1.5834202766418457, 1.9358689785003662], "segmentation": {"size": [358, 359], "counts": "Vj75o:4L4L4M2M5PF_OB7P9?XG0c8]1K5[Od0L4N2O1N101O002N001O0000000000000000000000000ZHdLb7`310O01O1O3M9H1N3M1O2N1O00000kNjGZOV87fHiNUO=U8i0mHWOS7h0nHXOR7h0nHYOQ7g0oHYOQ7g0oHYOQ7f0PIZOP7f0PI[OP7c0QI]OQ7?QIAQ7JbI6b6AcI?c8O000000000000001O0001O00000000000000000001O000001O000001O00000000000000000000O100000001O00000001O01O0000001O0000001O00000010O00001O0000001O000O2O1O0O101O0O101O0O2O0O2O1MkXS2"}}, {"image_id": 86, "category_id": 1, "bbox": [10.0, 0.0, 198.0, 338.0], "score": 0.9999693632125854, "association_id": 1, "light": [-1.4932551383972168, -1.7461302280426025, 1.3741525411605835, 1.7306509017944336], "segmentation": {"size": [371, 483], "counts": "bk33o92UF2`0>]OBo8m0VGROMk0k86SG7l8X100000001WK[Mb0e2aKZM_3d0c0R2mK\\M\\3j0b0k1oK`MZ3h0f0U2WOWN>k1_O\\N;f1C_N8b1GeN2\\1MfN1[1NhN0X1OkNNU12mNLT13POJP14UOIj07YOGg06I]O6b0O\\O0b05[OKd0>oM^L9T3f1b0kM^L?o2f1i0bM[Lh0m2d1]1]NbNa1`1_NaN_1`1bN_N^1a1bN`N\\1a1eN_NZ1a1fN`NY1`1hN`NW1`1iNaNV1_1kNaNT1_1mN`NS1E^N`MAMP1n2P1B_OZMAU3o0@P1`0oN_OS1a0lN^OU1c0jN]OW1c0hN]OY1b0gN^O[1`0eNA[1?dNB]1=bND^1?2`LBo2;ZN[2gN\\Mm28ZN_2jNYMk28XMmN7e3FWMj29UMb32ULh2e5YM\\Je2d5[M]Jd2c5]M]Jc2b5]M_Jb2a5_M_J`2a5`M`J_2a5`M`J`2_5aMaJ_2^5aMcJ^2]5cMdJ\\2[5kM`JS2`5mMaJS2^5nMbJQ2`5mMaJR2a5cMSIO^1\\2a5`MUI3\\1[2i5dMZJY2g5gMZJX2e5hM]JV2d5jM\\JU2c5nM\\JQ2d5QN\\Jm1d5XN[Jd1e5]N\\Ja1d5`N\\J_1d5bN\\J]1d5cN]J\\1c5eN\\J\\1c5eN\\J[1d5gNZJZ1e5lNVJT1i5nNUJS1j5oNTJQ1l5QORJP1l5ROTJm0l5TOTJk0l5VOTJi0l5YORJh0m5YOSJf0l5\\OSJd0m5]ORJc0n5]OSJb0d5TN]I[1n0a0c5XN\\IY1Q1>a5]N\\IV1S1<_54`JK`56`JI_59aJG^59bJG^5:bJE^5;bJE^5RH_Oo7?SH@m7>VHBj7HcN1j3c0XMC;IcN1i3c0[MB9JcN1h3d0\\MA9IdN2f3d0^MA8IdN2e3e0`M_O7JdN2d3f0aM^O7IeN3c3f0bM]O6JdN4d3e0cM\\O5KdN4d3e0eMZO3MdN4d3e0fMYO2MeN5c3e0gMWO3NcN5d3g0ESOhL6c3g0ESOhL6c3f0FTOgL6c3f07ZOIf07YOJg06YOJf07ZOIe08[OHd09\\OGc09^OH?:AG=:CI7HC`L6V8LhG5X8KhG4Y8LgG4Y8LgG4X8MhG3X8MhG3X8MgG4Y8LgG3Y8NgG2Y8OeG2[8NdG3\\8MdG2]8NcG2]8NbG3^8MbG3]8NcG1^8ObG1^80`G1`8O`G1`80^G0b82YG2g8<0O1000000000O100000000O1000000000000O2O001O0O101O00000O10000O2O00000000O001O1O10O0100000000O1O1000000O1000O10000000O1000000O10000000000O1000000O10000000O10O100O1O10000O10000000001O0000000000001O0O101MdW9EihF0O101O0O100O100000000O10000001N1000_GJh75WHLi73XHNg72XHOh71XHOh70YH0h7NXH3c80000000000000O1000000O100O1000000000000000O3L3NTak0"}}, {"image_id": 87, "category_id": 1, "bbox": [295.0, 0.0, 44.0, 30.0], "score": 0.9999549984931946, "association_id": 1, "light": [-1.8264102935791016, -1.6992520093917847, 1.6943771839141846, 1.5954134464263916], "segmentation": {"size": [305, 405], "counts": "alg21\\96]O1^G1^8c0O10000000H_G@a8?aG@_8=fGAZ8?gG@Y8?=00O]GBU8;nGER84UHLk72WHNf80000000000000000000O100000000000000000O100000000000Vdc0"}}, {"image_id": 87, "category_id": 1, "bbox": [210.0, 26.0, 179.0, 172.0], "score": 0.9999992847442627, "association_id": 3, "light": [-1.7391562461853027, -2.089385509490967, 1.540544033050537, 1.9263391494750977], "segmentation": {"size": [305, 405], "counts": "ocn14\\95J4oNHcH;Y7JdH8Y7McH5[7NcH3Z7OeH3Y7OfH3W7NiH2V70hH2W7OgH2Y73aHO;]OY6g1dI\\N[6h1_I\\N^6]2N2O1N1O2O2M5L3M4M7QKbL[3a3`LdL^3]3_LeLa3`3XLaLi3a3RLbLo3`3iKdLl4f32N001O001O2N2N1O001O1O2N2N1cNjJ]NX5^1QK\\NR5^1VK]Nk4a1XK]Ni4b1XK]Ni4a1YK^Ni4`1VKaNl4\\1UKdNl4[1TKWNPO7m5_1TK[NPO4P6]1QK_NQO1Q6\\1PKcNTOMl5^1QKeNSOMm5\\1PKhNROMQ6S1RKPOmNMS6m0TKUOjNNT6i0SKZOhNNX6a0TK@eNOX6>UKCcNOZ6:TKHbNN_61SK0_NO`6LTK5[NOa82_GNa82^GOb81^GOb80_GOa82^GOb81]GOd81[G0e8O\\G1d8O[G1f8OZG1e80ZG1f8OYG2g8NYG2g8NYG1g8OYG2g8NYG2g8NYG1h8NXG3g8NYG1h8OXG1h8OXG1h8OWG1j8OVG0k80UG0k80UGOl81SG0m80SG0m80SGOn81RGOm82RGOn891000O1000000O100000000000000000000O10000O100O10O10O100000000O100000000O1000O10O10000O0100000O1000000000O10O10000000000000O1000O10000001AXG2i8M\\GOd80^GOb81^GOb80_G0a80`GNa82bGK^84`00000O101O0000cc4"}}, {"image_id": 88, "category_id": 1, "bbox": [62.0, 194.0, 253.0, 419.0], "score": 0.8827324509620667, "association_id": 1, "light": [-1.6005719900131226, -2.6096689701080322, 1.461965799331665, 2.4065053462982178], "segmentation": {"size": [924, 520], "counts": "`[h1e0Wl01N2O001O1O2N1O1O1O1O2N1O1O1O2N2N1O001O1O2N2N00001O001O2N2]UOgN_i0Z1^VOkN_i0V1^VOPO^i0c2D5K`0@5K3M1O1O2N1O2N2N3M1O00O1?A4L2N1O2N2N2N1O1nIbJdD^5X;kJcDV5Y;TK`Dl4];\\K_Dd4\\;cKaD]4];hKaDe0[KP1Q`0_NbD1jKc1c?_NcDHlKl1_?_NeDYOQL^2X?]NfDmNQLn2X?ZNfD_NnK`3[?WNhES2W:SNTD]3j;mLcC]3]ZMaAi2_>YM]Ai2c>YMXAj2h>YMQAk2o>YMf@n2Y?\\5O0000001N10000O100O100O100O010O010O010O01O1O001O1N2O001O1O1O1O1O1O1O1N2O1N2N2M4L3N2M3M4L3O1O2O1O1N2O001N101O001O00001O0O10001O00001O00001N10001O1O2N2M5L4L3M2N3M3L4M4L5K4K5L3M2N2M3N3M9Gg1XN9H2N2M3N2N2O3L3M2N2N100O1O101O0O2O2N1N1001O0O2O1O1O1O0O20O\\LjIa@V6\\?oIc@P6[?TJe@j5X?ZJi@d5U?`Jj@_5T?dJl@[5R?hJn@X5P?iJPAW5o>iJSAU5n>jJTAU5k>kJ[AP5d>PKcAj4]>UKiAf4V>ZKmAc4T>\\KoAb4P>^KRBa4n=ZKWBd4l=UK\\Bh4f=QKbBk4mb0J6K5J5K3N2M3M4M2M5K4M3L3N2M3N2M4L5L3L4M2M3N2L7JJ6M3L4Dg3TBoKP>\\3ZCgKoJ5L4BXeo1"}}, {"image_id": 89, "category_id": 1, "bbox": [118.0, 339.0, 332.0, 286.0], "score": 0.9999485611915588, "association_id": 1, "light": [-2.214358329772949, -1.9751724004745483, 2.0635926723480225, 1.8014012575149536], "segmentation": {"size": [725, 525], "counts": "Umc27Zf06M4L4L3M2N2O1N1O2O1N3M3M3M2N101N2O2M3N2M2O1N2N2N2N3M3M3M2M2O2N2N3L4M3N2M2O1N2O3M4L9G9G5K1O1O2N2N3M2N2N1O100O1O2N4M2M3M2O^L]^OQ2ca0eMh^OZ2Za0`Mj^O`2Wa0\\Mm^Oe2Sa0VMR_OP3i`0kLZ_OW3e`0dL__O[3b`0bLb_O\\3^`0aLe_O_3ja0O9G10OXMc\\OX2]c0dMi\\OZ2Vc0bMP]O\\2Qc0`MX]OY2lc0G4L3M3N2NRM[Nj@d1P?bNQA]1k>gNVAX1i>iN[AS1c>oNaAm0^>UObAk0\\>WOcAj0Z>ZOeAe0Z>]OeAc0Z>_OeAa0Z>_OgAa0Y>^OgAc0X>^OgAc0Y>\\OgAf0X>YOhAi0W>VOiAk0V>VOiAk0W>TOiAm0W>SOhAm0Y>ROgAo0Y>QOfAP1Z>oNfAR1Z>nNeAS1Z>mNgAT1X>kNhAV1Y>iNeAY1[>fNeAZ1\\>fNbA[1_>dN`A^1`>aN_A`1a>aN^A_1c>`N\\Aa1d>_N\\Ab1c>^N\\Ac1d>]N[Ad1f>[NYAf1g>ZNXAg1h>ZNUAh1k>XNSAj1m>VNQAl1P?SNo@n1Q?SNm@o1S?QNl@o1T?RNj@o1W?RNf@P2Z?UN`@l1_?XN\\@j1d?WNY@k1f?VNY@k1g?VNV@k1j?WNS@k1l?WNP@k1Q`0WNk_Ok1T`0WNh_Ok1X`0XN__On1b`0VNU_Oo1j`0n100000000001O00001O001O001O001O0O2M2VM`^O9fa0E[^O>ca0A]^Of0^a0XOb^Om0Za0SOf^On0Ya0QOg^OQ1Ya0nNf^OU1Xa0kNh^OW1Wa0gNi^O`1\\`0bLU@n1_Of1U`0`LY@j1Ai1S`0`L[@e1Cl1P`0bL[@b1Dn1P`0aL\\@_5b?bJ]@_5b?bJ]@_5b?bJ^@]5b?dJ]@]5b?dJ]@\\5c?eJ]@[5b?fJ]@Z5c?fJ^@Y5b?hJ^@W5b?iJ`@U5`?lJ`@m0Ga2i?bLa@j0Hd2g?cLa@g0If2f?dLa@d0Ii2f?cLc@`0Im2e?cLc@=HQ3e?cLe@7GW3d?cLf@1I\\3a?eLh@IHc3`?eLn@]OEo3]?eLdA]3\\>eL`A]3`>fLYA^3h>W20001O000001O0^IV@Y6T`0O1O1O0001O001O100O1BdI`@]6_?gI\\@[6d?aJSA^5m>aJTA_5l>`JVA_5k>^JXAa5h>\\J[Ad5e>ZJ^Ae5b>XJaAh5_>VJdAi5]>TJeAl5\\>QJfAo5[>nIgAR6^?01O0000000O1000000000001O1N2N3M3M2N1O2N2O0O2O2N1N2O1N2M3N2M3N3M2N2N2N3L6XLi^Oi1]a0mMk^Oo1[a0iMj^OT2nb0N1N3M2M4L4L3N3M2M4L4L6I6J5L3N3M4Kkad1"}}, {"image_id": 90, "category_id": 1, "bbox": [130.0, 232.0, 377.0, 221.0], "score": 1.0, "association_id": 2, "light": [-1.7752056121826172, -2.4285738468170166, 1.603422999382019, 2.20890736579895], "segmentation": {"size": [613, 820], "counts": "US^2k0Wb09H4M3M3L=P_OeN^?l2D6K2N2N1O3L3M7J4L2N2N2M3M4K5L3N2N2O1N2N3L3N2N2N101O2N2M2O1O000O2O0O1O2N1O2O1N2O1O0O2O000000000000001O000000001O00001O0000001O001O1O001O00001O00000000000ZChI_h2PBYMR>c2PB]MP>b2PB_MQ>_2PBaMQ>]2nAeMS>Z2lAgMV>V2iAlMY>_31O1O1[NeA^N\\>^1fAcN\\>Z1eAgN]>T1dAmN^>P1cAPO^>n0bASO`>j0aAVOa>d0bA]Oa>:dAGl`01L4B>K5L4BdMo_Oa2i?a0O1O1N2O1N2M3N1O2I7O100O100O10000O100000O010000O10000O1000000000O1000O0100O100O1000000O100000000O1000000O100O10000O10000O100000000O1000000O10000O10000O100O1O100O1O100O2O0O1000O010000O100O100O100O100O100000000O100000000O10000O100O1000000O1000000O10000000000O1000000O100O100O10000O100000000O10000O100O1O10000O10000O2O00000O2O0O2O2M2O1N2O001N10001O0O2O1O0O5K`0@4M2M3N1N2O1N101O1N2N3M6J5nAKU>1kA0W>MjA3Y>HhA9\\>BeA>`>YOaAj0i>bN[Ad1g>VNn@Y2T?bMh@e2Z?VMg@l2_?jLd@W3[?kLc@V3]?kLa@V3^?900O1O100O100O10000000000000000000000000000000000000000000O1000000O100O1000O0100000000O10000000000000000000000O10000O1O010O1000000O100000O0100O100O10000O1000O010000O100O10000O2N100O2N1O2N1O10001N101N101N2J6M200O2O0O101N101N1N3N2M200O2O0O10001N100O2O0O2N2O0O101O000O2O001N101N2O0O2O0O2O1N2N7EYY3"}}, {"image_id": 91, "category_id": 1, "bbox": [512.0, 251.0, 60.0, 52.0], "score": 0.9976826310157776, "association_id": 2, "light": [-2.3705224990844727, -1.9791377782821655, 2.272822856903076, 1.8562800884246826], "segmentation": {"size": [453, 640], "counts": "`hR72o=8H:H6L1kBZOh^CAb\\g0;H5Ji0WO5M4M2N0O1iLXNU@k1f?_NT@a1l?eNn_O\\1kMjMla0R1Q@T1SNlMka0W1g_OP1_NjMha0d1a^O\\1HPMga0Y5[^OgJea0X5\\^OhJda0W5]^OiJba0W5_^OjJ`a0U5a^OkJ_a0U5a^OkJ_a0T5b^OlJ^a0U5a^OlJ^a0U5a^OkJ_a0V5`^OjJMKVa0\\5l^OiJK0Wa0X5m^OhJL1Va0X5m^OgJL2Wa0X5l^OgJL1Xa0Y5k^OfJM1Xa0Y5k^OfJM1Xa0Z5j^OeJM2Ya0Y5j^OeJM1Za0Z5i^OfJK1\\a0Y5i^OfJK1\\a0Y5i^OfJKO^a0[5g^OfJKN_a0\\5f^OfJKN_a0\\5f^OfJKN_a0\\5f^OgJJM`a0\\5f^OgJIMba0\\5e^OgJIMba0\\5e^OgJHNca0Z5f^OhJGNca0Z5f^OPKZa0P5f^OPKZa0P5f^OPKZa0P5f^OQKYa0o4g^OQKYa0o4g^ORKXa0n4h^ORKXa0n4h^ORKXa0n4h^OSKWa0n4h^ORKXa0o4g^OQKYa0P5f^OPKZa0Q5e^OoJ[a0R5d^OnJ\\a0S5c^OnJ\\a0T5b^OlJ^a0U5a^OkJ_a0l5O00001O0000001O0000001O0000O1Jh^OdIXa0^642N2N3M2N1O00001O0000000000000000O1O1O1L5L3L4H8F:L4N2O1O10000O11O001O1O001O001O010O1O001O10O001O1O2VKS^O\\3Pb0`LU^O]3ma0]LY^Oa3la0SL^^Oi3Vc0F4K5K5J7I:gM[[Oe0Qnm;"}}, {"image_id": 92, "category_id": 1, "bbox": [566.0, 375.0, 100.0, 119.0], "score": 0.8362147808074951, "association_id": 6, "light": [-1.597334623336792, -1.8804066181182861, 1.477692723274231, 1.7211627960205078], "segmentation": {"size": [768, 1024], "counts": "inX=2mg02O2N1N2O100O1O1N101O001N1dNATZO0j0`0Pd0j1Q[OUNld0P2S[OoMkd0e2M2O1O2OAZ[OdMed0]2\\[ObMcd0`2][O`M`d0c2`[O\\M_d0e2b[O[M\\d0f2d[O[MZd0`1j[OQOM_OXd0`1m[OPOJAYd0W1g[O_N7i0IBXd0n0i[OeN213k0IBYd0JJl0IDYd09T\\OWOm200O10001O0000000000001O000001O00O10000O10001O000001N101O000000O1O11N2O1OO1N2N2001O1O0O3M2O1`ZO\\Obc0e0[\\OC_c0>\\\\OHbc09[\\OIec0:X\\OFhc0I7G8G8I8I6L3M3N1N3N1N2UdN^LV[1e3hdN]LU[1e3jdN\\LR[1h3mdNZLUY17ggNe3SOULnX1V1lfNP35kKkX1n5SgNTJjX1n5UgNSJhX1P6XgNPJfX1R6YgNoIeX1S6[gNmIcX1U6\\gNlIcX1U6]gNkIaX1W6^gNjI_X1X6bgNiIWX1]6igNbIRX1d6mgN]IPX1f6PhNZImW1^7N2M]OXhNSIaW1j7L4N2N[OghNgHWW1Z7ihNgHVW1X7lhNhHRW1X7ohNiHoV1X7RiNhHjV1[7UiNgHhV1[7XiNfHeV1[7\\iNfH^V1_7`iNdHPV1j7RjNVHiU1m7XjNTHgU1k7ZjNVHeU1j7ZjNXHeU1i7YjNYHfU1g7ZjNZHeU1e7\\jN\\HdU1c7]jN]HbU1c7^jN^HbU1`7`jN`H_U1_7bjNbH^U1]7cjNcH\\U1]7ejNcHZU1]7gjNcHYU1\\7hjNdHXU1\\7hjNdHYU1Z7gjNgHYU1Y7gjNgHYU1X7hjNhHXU1X7hjNhHXU1X7hjNhHXU1W7ijNiHXU1V7hjNjHXU1V7gjNkHYU1T7hjNlHXU1T7hjNlHYU1T7fjNkH[U1V7cjNkH^U1T7bjNlH_U1T7`jNlHaU1S7^jNnHcU1Q7]jNnHfU1P7YjNQIiU1m6WjNSIjU1m6TjNTImU1k6SjNUInU1j6QjNVIQV1i6oiNWIRV1h6miNYITV1g6jiNYIXV1f6fiN[I\\V1d6diN[I^V1d6biN[IaV1Q82N2_N[iNbIgV1]6YiNaIjV1^6ViN^IoV1a6QiN]IRW1g72iNlhN_IWW1_6ihNaIYW1R2lhNo0KnL[W1m1RiNU2PW1cM[iNU1XOUM^W1a1diNT1oN[M^W1_1kiNo0fNcM`W1\\1PjNk0aNhM`W1]1RjNf0_NnM`W1Z1TjNe0]NQN`W1Y1UjNb0]NUN_W1X1WjN=\\N[N_W1V1XjN;[N_N^W1U1YjN7\\NdN\\W1T1YjN4]NhN]W1T1UjN0aNlN\\W1S1TjNJeNROZW1S1SjN@kN]OUW1Q1VjNTOlNKPW1o0ZjNmNiN4QW1l0YjNiNiN;RW1h0[jNdNfNc0VW1d0PlN\\OXT1]_1:B;E;E:ROZNXcNo1Z\\1R1J7L3M4L5M3L5L4L3L6jeNYLiW1o3hgN^LRX1i3agNbLZX1f5L4L2N3M1000000O1O2N1N2N2N2N2O2M2O2L4J6K6K5J6J6K5K5K6K5K5L3N2N:dkNjEZR1Z;blNgD]S1[;alNeD_S1\\;`lNeD_S1[;alNfD^S1Z;blNfD]S1[;clNeD]S1[;blNgD]S1Y;clNgD]S1Y;blNiD]S1W;clNiD]S1V;dlNkD[S1T;elNmD[S1Q;flNPEZS1l:ilNVEVS1d:olN]EQS1[:WmNeEiR1T:^mNlEbR1n9dmNSF[R1j9hmNVFXR1i9imNWFXR1g9hmN[FWR1e9imN[FWR1d9jmN\\FVR1d9jmN\\FVR1e9imN\\FVR1e9imN[FWR1f9hmNZFXR1f9hmNZFYR1f9fmNZF[R1g9cmNYF^R1g9amNZF`R1e9_mN[FdR1d9ZmN\\FiR1b9VmN^FnR1_9QmNaFSS1[9nlNdFUS1Z9jlNfFYS1W9glNiF]S1S9clNmFaS1o8_lNQGdS1l8\\lNTGfS1j8ZlNVGgS1i8ZlNVGhS1h8XlNXGjS1e8WlN[GlS1Q7ZkN_Il0@mS1d4SkN^Lj0PO;NjS1^4PlN[K?OK8gS1Z4WnNWKVN?dS1V4RPOjKPP1m3XPORLjo0g3[POYLho0`3\\PO`Lfo0Z3^POfLco0U3aPOkL`o0l2hPOTMYo0b2QQO]MQo0\\2TQOdMmn0V2XQOjMkn0g1aQOZNan0[1gQOeN[n0T1jQOkNZn0i0PROVOSn0>VROBRn0MWRO3kV10001O01O000001O0000001O000000000000000000001O0000000000001O0000001O000000000000001O000O2O0001O01O00001M3Ogia:"}}, {"image_id": 95, "category_id": 1, "bbox": [711.0, 769.0, 177.0, 539.0], "score": 0.9999883770942688, "association_id": 4, "light": [-1.2882165908813477, -3.7673351764678955, 1.2220697402954102, 3.730821371078491], "segmentation": {"size": [1536, 2048], "counts": "]^[Q14h_1:G:E8H6K5K5K4K6H8H9I7K5J5H8ESQO_Aln0e>QQO[Aon0f>QQOYAnn0i>QQOXAnn0h>RQOXAnn0i>QQOWAon0i>RQOVAnn0j>RQOVAnn0k>QQOUAon0k>QQOVAnn0j>RQOVAnn0j>RQOVAnn0j>RQOVAnn0j>RQOWAmn0i>SQOWAmn0i>SQOXAln0h>TQOXAln0h>SQOYAmn0g>SQOYAmn0g>RQOZAnn0f>RQOZAnn0f>RQO[Amn0e>RQO\\Ann0d>RQO\\Ann0d>QQO]Aon0c>QQO]Aon0b>QQO_Aon0a>QQO_Aon0a>QQO_Aon0a>QQO_Aon0a>QQO_Aon0`>QQOaAon0^>RQObAnn0]>SQOcAmn0\\>TQOdAln0[>UQOeAkn0Z>VQOfAjn0W>YQOiAgn0S>]QOmAcn0o=aQOQB`n0i=eQOWB[n0e=iQO[BWn0b=lQO^BTn0`=nQO`BRn0_=oQOaBQn0]=RRObBnm0\\=TROdBlm0Z=VROfBkm0W=WROiBim0U=YROkBgm0S=[ROmBfm0P=]ROoBem0m<]ROSCdm0k<]ROUCem0h<\\ROXCfm0e<\\ROZCgm0bZY1h3\\gNXLdX1f3^gNZLbX1e3_gN[LaX1e3_gN[LbX1c3_gN]LaX1b3`gN^L`X1a3agN^LaX1_3agNaL`X1\\3bgNdL_X1Y3cgNgL^X1U3egNkL]X1Q3egNoL\\X1m2ggNSM\\X1f2hgNZM[X1`2hgN`MaX1S2dgNlMdX1h1`gNXNgX1\\1^gNdNlX1k0[gNUOnX1?UgNATY1NVgNO^\\10001O001O000000002E[`N5imYV1"}}, {"image_id": 96, "category_id": 1, "bbox": [79.0, 286.0, 108.0, 72.0], "score": 1.0, "association_id": 1, "light": [-2.6792237758636475, -0.958175778388977, 2.5270631313323975, 0.7743752002716064], "segmentation": {"size": [400, 431], "counts": "PUo0o0`;3M3L6K3L3N3M2N2N3N0O2N1O2O0O2N101O00001O0O2O000O1000000000000000O100000001N100001OO2O00000000000000O10OfEnMX:T21MgEoMY:P2gEQNZ:n1fERNZ:Q21O10001O001N101O1N2O1O1N3N1EWEmNk:n0UETOm:W11O2\\OPECS;9mDIT;4lDN[;?4MO00000101N1O1O1O100O1O1O100O1O1O2N1O1O1O1O100O1O100O1O2OSPo2"}}, {"image_id": 96, "category_id": 1, "bbox": [303.0, 87.0, 46.0, 41.0], "score": 0.9999138116836548, "association_id": 8, "light": [-2.440868377685547, -1.4156724214553833, 2.3889338970184326, 1.300392508506775], "segmentation": {"size": [400, 431], "counts": "e^f35X<:H4L5K3N1N2O1N2O001N1O1O1N2O20O001O001O0O2O1O0O2O1O001N2O2N102M3M3BUD1U<00000000O10001O0O1O2NYmo0"}}, {"image_id": 96, "category_id": 1, "bbox": [267.0, 137.0, 59.0, 38.0], "score": 0.9972447156906128, "association_id": 6, "light": [-2.672443389892578, -1.0642905235290527, 2.5745749473571777, 0.7776073217391968], "segmentation": {"size": [400, 431], "counts": "P^X37U<9J3M4M3L3N3M1O2N001O1O001O0000000000000000000000000000000000000001O001O001O001O1JbDWO`;l01O1O3M>B00000O100O10000O1O101N2N]kX1"}}, {"image_id": 96, "category_id": 1, "bbox": [129.0, 161.0, 88.0, 54.0], "score": 0.9999997019767761, "association_id": 4, "light": [-2.830810070037842, -0.7733525633811951, 2.7781567573547363, 0.6347252726554871], "segmentation": {"size": [400, 431], "counts": "cbb11m;1TDe0`;:K5M2N2N2N2N1O2N2O00001O0O10000000001OO1001O0000000000000001O00000000000000000O1000000O10000O101N1OQEcNn:_1001JQEiNP;Z12O1GmDSOT;k0lDUOV;h0kDYOW;b0kD_OV;>jDDX;7eDNm;200000O100O1O10000O10001N1O100O1O100O10000O1O2O0Oo\\c2"}}, {"image_id": 96, "category_id": 1, "bbox": [8.0, 199.0, 107.0, 63.0], "score": 0.9999991655349731, "association_id": 2, "light": [-2.5032382011413574, -0.6484165787696838, 2.3141820430755615, 0.3579447865486145], "segmentation": {"size": [400, 431], "counts": "fZ3S1\\;2N3L3O1N3M2O0O2O0O2O0O101O00000O101O0O2O0000000000000O100000000M3003M1OO100000000O10000O10000000O10000O2O0001O10O0O2O0L[E]Ne:f12KYE_Nh:_1XEbNh:c10O2O1O2M3N1O2M2GkDUOV;g0lDYOW;`0lDAV;:mDGc;:N3O0100O10000O100O100O1O100O10000O100O100O100O100N200O1O1O3MhVk3"}}, {"image_id": 96, "category_id": 1, "bbox": [158.0, 113.0, 58.0, 37.0], "score": 0.9999814629554749, "association_id": 5, "light": [-2.5542402267456055, -1.4405854940414429, 2.382253646850586, 1.132584571838379], "segmentation": {"size": [400, 431], "counts": "hjm1164n;>H3M7J1O1O0O101O00000O1O1000000O1000000O100000000000000001O00001O002N2N1N2O1N3M4LUD_Ok;b09G000O1000000O100O100O101N1O3MTkc2"}}, {"image_id": 96, "category_id": 1, "bbox": [185.0, 55.0, 40.0, 27.0], "score": 0.9981728792190552, "association_id": 3, "light": [-2.1285219192504883, -1.3471519947052002, 2.0332045555114746, 1.1181325912475586], "segmentation": {"size": [400, 431], "counts": "cZX25U<:K3M2N2N1O10000O100000001O00000001O0O1010O10O1O001O1O1O1GUDKX<00O100000001N100O10c\\`2"}}, {"image_id": 96, "category_id": 1, "bbox": [352.0, 60.0, 35.0, 35.0], "score": 0.8931755423545837, "association_id": 7, "light": [-2.60404634475708, -1.2028782367706299, 2.4799039363861084, 0.9292681813240051], "segmentation": {"size": [400, 431], "counts": "`bY44Y<7J3N2M3M4K4N2L3N2O100000000000000000000000O1001O0000XOiD7W;FnD8R;E[E1f:L\\E4`;01O0O2OUSa0"}}, {"image_id": 97, "category_id": 1, "bbox": [0.0, 388.0, 688.0, 550.0], "score": 0.9999999403953552, "association_id": 2, "light": [-2.4804975986480713, -2.4740512371063232, 2.316201686859131, 2.265965223312378], "segmentation": {"size": [1617, 2048], "counts": "ba0i5X\\1Z1PO>C6L4L4M2N3M2O2XhNlGaMX1QV1l6fkNaJkS1`5QlNfJlS1\\5RlNfJmS1Z5RlNhJlS1Y5TlNgJkS1Z5UlNfJjS1[5VlNeJjS1[5VlNeJiS1\\5WlNdJhS1]5XlNdJfS1]5ZlNcJdS1_5\\lNaJcS1`5]lN`JbS1a5^lN^J_S1f5alNZJ\\S1i5dlNWJYS1m5flNSJXS1o5hlNPJVS1S6jlNmIUS1T6llNkISS1V6mlNjISS1V6mlNiISS1X6mlNhISS1X6mlNhIRS1Y6nlNgIRS1Y6nlNgIQS1Z6olNeIRS1[6nlNeIQS1\\6olNdIQS1\\6olNdIQS1\\6olNdIPS1]6QmNbIoR1^6QmNbIoR1^6QmNbInR1_6RmNaInR1_6RmNaInR1_6RmN`InR1a6RmN_InR1a6RmN_ImR1b6SmN^ImR1b6TmN]IkR1d6UmN\\IkR1d6UmN\\IkR1d6UmN\\IjR1e6VmN[IiR1f6WmNZIiR1f6WmNZIhR1g6XmNYIhR1g6XmNYIgR1h6YmNXIfR1i6ZmNWIfR1i6ZmNWIeR1j6[mNVIeR1j6[mNVIdR1k6\\mNUIdR1k6\\mNUIcR1l6]mNTIcR1l6]mNTIbR1m6^mNSIbR1m6^mNSIaR1n6_mNRIaR1n6_mNRI`R1o6`mNQI_R1P7amNoH`R1Q7`mNoH_R1R7amNnH_R1R7amNmH_R1T7amNlH_R1T7amNlH^R1U7bmNjH_R1V7amNjH^R1W7bmNiH]R1X7bmNiH^R1W7bmNiH]R1X7cmNhH]R1X7cmNgH]R1Z7cmNfH\\R1[7cmNfH]R1Z7cmNfH\\R1[7dmNeH[R1\\7emNdH[R1\\7emNdHZR1]7fmNcHZR1]7fmNcHYR1^7fmNcHYR1^7gmNbHXR1_7hmNaHWR1`7imN`HWR1`7imN`HVR1a7jmN_HUR1b7kmN^HTR1c7kmN]HUR1d7kmN\\HSR1f7mmNZHQR1h7omNXHoQ1j7PnNWHnQ1k7RnNUHmQ1l7SnNTHkQ1n7TnNRHlQ1o7TnNQHkQ1P8UnNPHjQ1Q8UnNPHjQ1Q8VnNoGiQ1R8WnNnGhQ1S8XnNlGhQ1U8WnNlGhQ1U8XnNkGgQ1V8YnNjGfQ1W8YnNiGhQ1W8XnNiGgQ1X8YnNhGfQ1Y8ZnNgGeQ1Z8ZnNgGeQ1Z8[nNfGdQ1[8[nNeGeQ1\\8ZnNeGeQ1\\8[nNdGdQ1]8[nNdGdQ1]8\\nNcGdQ1]8\\nNcGcQ1^8\\nNcGdQ1]8\\nNcGcQ1^8\\nNcGdQ1]8\\nNcGcQ1^8\\nNcGdQ1]8\\nNcGdQ1]8[nNcGeQ1^8[nNbGeQ1^8[nNbGeQ1^8ZnNcGeQ1^8[nNbGeQ1^8[nNbGeQ1^8[nNbGeQ1^8[nNbGdQ1_8[nNbGeQ1^8[nNaGfQ1_8ZnNaGfQ1_8YnNbGgQ1^8YnNbGfQ1_8YnNaGhQ1_8XnNaGhQ1_8XnN`GiQ1`8VnNaGjQ1_8VnNaGiQ1`8WnN`GiQ1`8WnN_GjQ1a8VnN_GjQ1a8UnN`GkQ1`8UnN`GjQ1a8VnN_GjQ1a8VnN_GjQ1a8VnN_GjQ1a8UnN`GkQ1`8UnN_GkQ1b8TnN_GlQ1a8TnN_GlQ1a8TnN^GmQ1b8RnN_GmQ1b8SnN]GnQ1b8SnN^GlQ1c8TnN]GlQ1c8SnN]GmQ1d8SnN\\GmQ1d8SnN\\GlQ1e8TnN[GlQ1e8TnN[GkQ1f8TnN[GlQ1e8TnN[GkQ1e8VnN[GjQ1e8VnNZGkQ1f8UnNZGjQ1g8UnNZGkQ1f8UnNZGkQ1f8UnNZGjQ1f8VnN[GjQ1e8VnNZGkQ1f8UnNZGkQ1f8TnN[GkQ1f8UnNYGlQ1g8TnNYGlQ1f8UnNZGkQ1f8UnNZGkQ1f8UnNYGlQ1g8TnNYGlQ1f8TnN[GlQ1e8TnN[GlQ1e8TnN[GkQ1e8VnNZGkQ1f8UnNZGkQ1e8VnN[GjQ1e8VnN[GjQ1d8WnN\\GiQ1c8XnN]GhQ1c8XnN\\GiQ1c8XnN]GhQ1b8YnN^GgQ1b8YnN^GgQ1a8ZnN_GfQ1`8[nN`GeQ1`8\\nN^GeQ1a8\\nN_GdQ1`8]nN`GcQ1`8]nN_GdQ1`8]nN`GcQ1`8]nN`GcQ1_8^nN`GcQ1`8^nN_GbQ1`8_nN`GaQ1_8`nN`GaQ1`8anN^G_Q1a8cnN^G]Q1a8enN^GZQ1a8inN]GXQ1`8lnN_GTQ1_8PoN_GPQ1^8VoN^GkP1_8\\oN]GdP1a8QPOkFPP1R9\\POdFeo0Z9`PObFao0[9ePObF[o0[9kPOaFVo0\\9oPObFQo0]9RQO`Fon0`9SQO]Fnn0b9ZQOUFhn0j9[QOdEgK6PS1W:bQOdEan0[:k400O10000O100O10O10O1O100O1O001O1O1O1N2O001N2O1O001O100O0010O01O010O1O010O00100O10O0100O00100O100O010O100O100O100O1O100O100O100O010O100O100O100O100O100O100O100O100O100O100O1O100O100O10000O100O10000O10000O10000O10000O10000O100O100O1O100O1N2O1O1O1O1O1O1O1O1O100O1O1O100O100O100O10000O100O100O10000O10000O10000O10000O1000000O10000O1000000O10000O100O10000O100O100O10000O100O1000000O10000O10000O1000000O1000000O100000000O10000000000O10000000000O10000000000O100000000000000O10000000000000000000000000000000000000000000000000000O10000000000000000000000O10000000000000000000000O100000000000000O1000000000000O100000000000000O1000000O10000O10000O2O0O100O100O1O1O1O1O1N2O1O1O1O1O1O1O1O1O2O0O100O100O1O100O2O0O1O100O100O2N100O1O100O2N100O1O1O101N1O1O1O1O2N1O1N2O2N1O1O1O1O2N1O100O101N100O1O2O0O1O1O2N1O1N2O1N3N1N2O1O1N3N1O1N2O1O2N1N2O1O1O2N1O1O2N1N2O2M2N3M2N3M3M2M4M3L4M3M2N3L4L3M4M3M2N3N1O2M3N2M3M3M3M5C=E;I7HQUSS2"}}, {"image_id": 97, "category_id": 1, "bbox": [160.0, 305.0, 1885.0, 1254.0], "score": 0.9999997019767761, "association_id": 1, "light": [-1.0363788604736328, -2.746638536453247, 0.9240784645080566, 2.611626386642456], "segmentation": {"size": [1617, 2048], "counts": "P]m71]b15K5K4L5K4L5K5L3L5L4K5L3M4L4N2M3M3N2M3N2M3M4M2M4M2M4M2M3N2N2M3N2M3N2M3N2N2M3N1N2O1N2O2N1N2O2M2O2M2O2M2O2N2M3N2M3N2M3N2M4M3L6K5J6K5J6K6I6K4K4L4M3L4M3L4M3L3N3L3M4M2M6K5J6K5J5K6K4K5K3M4M2M3M3M3N2M3N2M3N2M3N2N2M3N2N3L3N1N2O2N1N3N1N3N1O2M3N2M3N2N2M3N2M4M2M4M3M2M3N2M4M2M3N1N3N2M3N1O2M3N1N3N1N2O2M2O1N2O2M101N2O0O2O1N1O2O0O2O0O2O001N10001N10001O001N10001O0O2O00001O0O2O001O0O2O00001N101O001N101O001N101O001N101O0O2O1O001N101O001N2O001N101O1O0O2O1O0O2O1O0O2O1O00001O0O2O00001O001O0O101O00001O0O2O00001O001O0O101O001O00001N101O00001O001N10001O001O001O0O101O001O00001N101O00001O001O0O101O0000000000000000001N10000000000000000000000O10001O000000000000000O100000000000001O000O1000000000000000000O100000001O0000000O10000O2O0O101N10001QQOg^Ocl0Za0[SOi^Odl0Wa0ZSOl^Odl0Va0XSOn^Ofl0Sa0XSOP_Ogl0Pa0WSOS_Ogl0o`0USOU_Ojl0k`0TSOX_Ojl0j`0RSOZ_Oll0g`0QSO]_Onl0c`0PSO`_Onl0b`0PSO`_Ool0``0QSOb_Oll0_`0SSOc_Okl0_`0SSOc_Oll0]`0SSOe_Okl0]`0SSOe_Okl0\\`0USOe_Ojl0[`0USOg_Oil0[`0USOg_Oil0Z`0WSOg_Ohl0Y`0WSOi_Ogl0X`0YSOi_Ofl0X`0XSOi_Ogl0X`0YSOi_Oel0X`0ZSOi_Ofl0X`0YSOi_Oel0X`0ZSOi_Oel0X`0[SOh_Oel0Y`0YSOi_Oel0X`0[SOh_Odl0Y`0[SOh_Oel0X`0[SOh_Odl0Z`0ZSOh_Odl0Y`0\\SOg_Odl0Y`0\\SOg_Ocl0Z`0\\SOh_Obl0Z`0]SOf_Ocl0Z`0\\SOg_Ocl0Z`0]SOf_Obl0[`0^SOf_O`l0\\`0^SOe_Obl0[`0^SOe_Oal0\\`0_SOd_O`l0]`0aSOc_O^l0^`0aSOb_O^l0_`0bSOa_O]l0``0cSO`_O]l0``0cSOa_O[l0a`0dSO__O[l0b`0eSO^_OZl0c`0gSO\\_OYl0d`0gSO]_OWl0d`0iSO\\_OVl0f`0iSOZ_OWl0f`0iSOZ_OVl0g`0jSOZ_OTl0g`0mSOX_OSl0h`0mSOX_ORl0i`0nSOW_OQl0k`0nSOV_OPl0k`0PTOU_Onk0m`0RTOS_Olk0o`0TTOR_Ohk0Qa0XTOo^Oek0Ta0\\TOk^Oak0Xa0_TOi^O^k0Za0aTOf^O\\k0]a0dTOc^Oci0jM]WOfc0POa^Oai0oMWWOcc0XO^^O`i0VNoVO_c0A[^O_i0\\NiVO[c0HZ^O]i0bNbVOWc02V^O[i0kNYVOSc0;R^O[i0\\c0eVOe\\OYi0\\c0gVOd\\OXi0]c0hVOc\\OWi0^c0iVOc\\OUi0^c0kVOb\\OTi0_c0lVOb\\ORi0`c0mVO`\\ORi0ac0oVO^\\OPi0cc0PWO^\\Onh0cc0RWO]\\Olh0ec0TWO\\\\Ojh0ec0VWO[\\Oih0fc0WWO[\\OPg0dMPZOTf0oNX\\OPg0iMlYOPf0TOX\\Oof0lMhYOme0YOW\\Onf0QNcYOje0_OV\\Olf0TNaYOge0DT\\Okf0YN[YOee0JS\\Oif0\\NXYOde0NP\\Ojf0_NTYObe02P\\Ohf0bNQYO`e07n[Ogf0eNnXO_e0;m[Off0ae0ZYO`ZOdf0ae0\\YO_ZOdf0ae0\\YO`ZObf0be0]YO^ZOcf0be0]YO_ZOaf0be0_YO^ZOaf0be0`YO^ZO^f0ce0bYO]ZO^f0ce0bYO^ZO\\f0de0cYO]ZO\\f0ce0dYO]ZO\\f0ce0dYO^ZOZf0ce0fYO^ZOYf0be0gYO^ZOXf0ce0hYO^ZOWf0be0iYO_ZOVf0be0iYO_ZOUf0be0kYO^ZOUf0be0kYO_ZOTf0ae0lYO`ZORf0ae0oYO_ZOPf0ae0PZO`ZOne0be0QZO_ZOne0ae0RZO`ZOme0`e0SZOaZOke0ae0TZO`ZOke0`e0UZOaZOie0ae0VZO`ZOie0`e0WZOaZOge0`e0YZObZOee0_e0ZZObZOde0_e0\\ZObZOce0_e0\\ZObZObe0_e0^ZObZOae0^e0`ZObZO^e0`e0aZOaZO^e0_e0bZObZO\\e0`e0cZOaZO[e0`e0eZO`ZO[e0ae0dZO`ZOZe0ae0fZO`ZOXe0be0gZO_ZOXe0ae0hZO`ZOVe0be0iZO_ZOUe0be0kZO_ZOSe0ce0lZO]ZOTe0ce0mZO]ZOQe0ee0nZO\\ZOPe0fe0oZO[ZOod0fe0Q[O[ZOmd0ge0R[OYZOmd0he0S[OYZOkd0ie0T[OXZOjd0je0U[OVZOjd0ke0V[OVZOid0ji0N2N1O2O1N1O2O0O2N2O0O2O1N101N2O1N2O001N2O1N2O1O1N2O1O1N3N1O1N2O1O0O2O1N2O1O1N101O1N2O0O2O1N2O0O2O1N101N101N2O0O2N101N1O2O1N1O2N101N1O2N1O2N101N1O2N101N1O2O0O2O0O2O0O2O0O2O0O2O0O2O001N101N101O001O001N101O001O001N101O001O000O2O001O00001N10001O00001N1000001O0O101O0000001N1000001O000O101O00001O000O101O0000001N1000001O0O10001O000O101O000O10001O0O10001O0O10001N1000001N10001N10001N101N101O0O101N101O0O101N101N100O2O000O101N10001N10000O2O000O10001O000O10001O00000O101O00000000000O2O000000001O000O10001O0000001O0O10001O00001O00001N10001O001O00001O001N101O001O001O1O001O000O2O001O000010O0001O00001O00001O0000001O00001O00001O00001O00001O0010O0001O001O001O1O001O001O1O001O1O001O1O001O001O010O001O00001O00001O00001O00001O0O10000000001O000000001O00000000001O0000000O2O000000001O000000001O0000001O0000001O0000001O0O10001O0000001O00001O00001O00001O00001O001O001O00001O0010O0001O00001O0000001O00001O0000001O0000001O000000001O000000001O01O00000001O00000000001O000000001O0000001O0000001O00001O0000001O00001O001O00001O001O001O00lGPDhYOo;Xf0RDgYOn;Yf0SDgYOl;Yf0UDfYOk;Zf0WDdYOi;]f0WDcYOh;]f0YDbYOg;^f0ZDbYOe;^f0\\DaYOd;_f0]D`YOc;`f0_D_YO`;af0aD^YO_;bf0bD]YO^;df0bD\\YO];df0dD[YO\\;ef0eDZYO[;ff0fDZYOY;ff0gDZYOY;ff0hDYYOX;gf0hDYYOX;gf0iDYYOV;hf0iDXYOW;hf0jDWYOV;if0jDWYOV;if0jDWYOV;if0kDWYOT;if0lDWYOT;if0lDWYOT;if0mDVYOS;kf0lDUYOT;kf0mDTYOS;lf0mDTYOS;lf0mDTYOS;lf0nDSYOR;mf0nDSYOR;nf0nDRYOQ;nf0oDRYOQ;nf0oDRYOQ;of0oDPYOQ;Pg0oDPYOR;Pg0nDoXOR;Qg0nDoXOR;Rg0mDnXOS;Sg0mDlXOS;Tg0mDlXOT;Tg0lDkXOT;Ug0lDlXOS;Ug0mDjXOS;Wg0lDiXOU;Vg0lDiXOT;Xg0kDhXOU;Xg0lDgXOT;Zg0kDfXOU;[g0kDdXOV;[g0jDeXOV;\\g0jDcXOV;]g0jDcXOW;]g0iDcXOV;]g0jDcXOV;^g0jDaXOV;_g0jDaXOW;_g0iD`XOW;`g0iD`XOW;`g0jD_XOW;ag0iD^XOW;bg0iD^XOW;cg0iD\\XOW;dg0iD\\XOX;cg0iD]XOV;dg0jD[XOV;eg0jD[XOW;dg0jD[XOV;fg0iDZXOX;eg0iDZXOW;fg0iDZXOW;gg0iDXXOX;gg0hDYXOX;gg0hDYXOY;gg0gDXXOY;hg0gDYXOX;gg0hDYXOY;fg0hDYXOX;hg0gDXXOZ;gg0fDYXOZ;gg0fDYXO[;fg0eDZXO[;gg0eDXXO\\;gg0dDYXO\\;gg0dDYXO\\;gg0dDYXO];gg0bDZXO];fg0cDZXO^;eg0bD[XO^;eg0cDZXO];gg0bDYXO_;fg0aDZXO_;fg0aDZXO_;fg0aDZXO`;eg0`D[XO`;eg0`D[XO`;eg0aD[XO^;eg0bD[XO^;eg0bD[XO_;dg0aD\\XO_;dg0aD\\XO_;dg0aD\\XO_;dg0aD\\XO_;dg0bD[XO^;eg0bD[XO^;eg0bD[XO_;dg0aD]XO^;cg0bD]XO^;cg0bD]XO^;cg0bD]XO^;cg0bD]XO^;cg0cD\\XO^;cg0bD]XO^;cg0bD]XO^;cg0bD]XO^;cg0bD^XO];bg0cD^XO];bg0cD^XO];bg0dD]XO];bg0cD^XO];bg0cD^XO];bg0cD^XO];bg0cD^XO];bg0cD^XO];bg0cD_XO\\;ag0eD^XO[;bg0eD^XO\\;ag0dD_XO\\;ag0dD_XO\\;ag0dD_XO\\;ag0dD_XO\\;ag0dD_XO\\;ag0dD`XO[;`g0fD_XOZ;ag0fD_XO[;`g0eD`XO[;`g0eD`XO[;`g0eD`XO[;`g0dDaXO\\;_g0dDaXO\\;_g0dDaXO\\;_g0cDbXO];^g0cDbXO];^g0bDcXO_;\\g0aDdXO_;\\g0aDdXO_;\\g0`DeXO`;[g0`DeXO`;[g0_DfXOa;Zg0_DfXOa;Zg0^DgXOb;Yg0^DgXOb;Yg0]DhXOd;Wg0\\DiXOd;Wg0[DjXOe;Vg0[DjXOe;Vg0ZDkXOf;Ug0ZDjXOg;Vg0XDkXOh;Ug0WDlXOi;Tg0WDlXOi;Sg0WDnXOi;Rg0VDoXOj;Qg0UDPYOk;of0UDRYOk;nf0UDRYOl;lf0TDUYOl;kf0SDVYOm;jf0RDWYOn;hf0SDXYOm;hf0RDYYOn;ff0RD[YOn;ef0RD[YOn;df0RD]YOn;cf0RD]YOn;bf0RD_YOn;af0RD_YOn;`f0RDaYOn;_f0RDaYOn;^f0RDcYOn;\\f0SDdYOm;\\f0RDeYOn;Zf0SDfYOm;Yf0SDhYOn;Vf0SDjYOm;Vf0SDjYOm;Uf0SDlYOm;Sf0TDmYOl;Qf0UDPZOk;je0[DVZOe;ee0`D[ZO`;_e0eDbZO[;Xe0kDhZOU;Re0QEnZOo:ld0VEU[Oj:id0XEW[Oh:gd0ZEX[Og:gd0YEZ[Og:ed0ZE[[Of:cd0[E^[Oe:ad0\\E_[Od:`d0\\Ea[Oe:]d0\\Ec[Od:\\d0\\Ee[Od:Zd0]Ef[Oc:Yd0]Eh[Oc:Xd0]Eh[Oc:Wd0]Ej[Oc:Ud0^Ek[Ob:Td0^El[Oc:Sd0]En[Oc:Rd0[EP\\Oe:oc0ZES\\Of:lc0ZEU\\Of:kc0XEW\\Oh:hc0WEZ\\Oi:ec0VE]\\Oj:cc0SE`\\Om:_c0REc\\On:]c0oDf\\OQ;Yc0nDi\\OR;Wc0iDn\\OW;Qc0aDX]O_;hb0XD`]Oj;cl0000000000000000000000000000O10000000000000000000000000000QD_CnAaO000O2O001O001O0O2O00001O0O2O00001O000O101O00`Gn_OgFR`0[9o_ObFP`0a9Q@]Fn?d9R@[Fn?g9R@WFn?k9Q@TFo?m9Q@RFo?P:Q@oEn?S:Q@lEo?Xb000000001O000000000000000000000000000000000000000000UJV@UAi?m>Z@o@f?Q?^@k@b?V?`@g@`?Y?`@g@`?Z?`@e@`?[?a@d@_?]?`@c@`?]?a@b@_?_?`@a@`?_?a@`@_?`?a@`@_?a?a@^@_?b?a@^@_?b?a@^@_?b?b@^@]?b?c@^@]?c?b@]@^?c?c@\\@]?d?c@\\@]?d?c@\\@]?d?c@\\@]?d?d@[@\\?e?d@[@\\?e?d@[@\\?e?d@[@\\?e?e@Z@[?f?e@Z@[?f?e@Z@[?f?e@Z@[?f?e@Z@[?f?f@Y@Z?h?e@X@[?h?e@X@[?h?f@W@Z?i?f@W@Z?i?f@W@Z?i?g@V@Y?j?g@V@Y?j?g@V@X?k?i@T@W?l?i@T@W?l?i@T@W?l?j@S@V?m?j@S@V?m?k@R@U?n?k@R@U?n?k@R@U?n?l@Q@T?P`0k@P@U?P`0l@o_OT?Q`0l@o_OT?Q`0l@o_OT?Q`0m@n_OS?R`0m@n_OS?R`0m@n_OS?R`0n@m_OR?S`0n@m_OR?S`0n@m_OR?S`0n@m_OR?S`0o@l_OQ?T`0o@l_OQ?T`0o@l_OQ?T`0o@l_OQ?T`0o@l_OQ?T`0o@l_OR?S`0n@m_OR?S`0m@n_OS?R`0m@n_OS?R`0m@n_OS?R`0l@o_OT?Q`0l@o_OT?Q`0l@o_OT?Q`0k@P@U?P`0k@P@U?P`0k@P@V?o?i@R@W?n?i@R@W?n?h@S@X?m?h@S@X?m?g@T@Y?l?g@T@Y?l?f@U@Z?k?f@U@Z?k?f@U@Z?k?e@V@[?j?e@V@\\?i?d@W@\\?i?c@X@]?h?c@X@]?h?c@X@]?h?c@X@]?h?b@Y@^?g?b@Y@^?g?b@Y@^?g?b@Y@^?g?b@Y@^?g?a@Z@_?f?a@Z@`?e?`@[@`?e?`@[@`?e?`@[@`?e?_@\\@a?d?_@\\@a?d?_@\\@a?d?_@\\@a?d?_@\\@a?d?_@\\@a?d?^@]@b?c?^@]@b?c?^@]@b?c?^@]@b?c?]@^@c?b?]@^@c?b?]@^@c?b?]@^@c?b?\\@_@d?a?\\@_@d?a?\\@_@d?a?[@`@e?`?[@`@e?`?Z@a@f?_?Z@a@f?_?Z@a@f?_?Y@b@g?^?Y@b@g?^?X@c@h?]?W@d@i?[?X@e@h?[?W@f@i?Z?V@g@j?Y?V@g@j?Y?U@h@k?X?T@i@l?W?T@h@m?X?R@i@n?W?R@i@n?W?Q@j@o?V?Q@j@o?V?P@k@P`0U?P@k@P`0U?P@k@P`0hd01O00000000000000000000000000000000000000000O100000000000000000000000000000000O10000000000000000000000000000O1000000000000000000000000O100000000000000000000O10000000000000000O100000000000000O1000000WJi_O^AW`0b>i_O^AW`0b>i_O^AW`0b>j_O]AV`0c>j_O]AV`0c>k_O\\AU`0d>k_O[AV`0e>k_OZAU`0f>k_OZAU`0g>k_OXAU`0h>k_OXAU`0h>k_OXAU`0i>k_OVAU`0j>k_OVAU`0j>l_OUAT`0k>l_OTAU`0m>j_OSAV`0m>j_OSAV`0m>k_ORAU`0o>j_OQAV`0o>j_OQAV`0o>j_OQAV`0o>k_OPAU`0Q?j_Oo@V`0Q?j_On@W`0R?i_On@W`0R?j_Om@V`0T?i_Ol@W`0T?i_Ol@W`0T?i_Ol@W`0T?i_Ol@W`0T?i_Ol@W`0U?i_Oj@W`0V?i_Oj@W`0V?i_Oi@X`0W?h_Oi@X`0W?h_Oi@X`0X?g_Oh@Y`0X?g_Oh@Y`0X?g_Oh@Y`0X?h_Of@Y`0Z?g_Of@Y`0Z?g_Of@Y`0[?f_Od@[`0\\?e_Od@[`0\\?e_Od@[`0\\?e_Oc@\\`0]?d_Oc@\\`0]?d_Oc@\\`0^?c_Oa@^`0_?b_Oa@^`0_?b_Oa@^`0_?b_O`@_`0`?b_O_@^`0a?b_O^@_`0b?a_O^@_`0b?a_O^@_`0b?a_O]@``0c?`_O]@``0c?`_O\\@a`0d?__O\\@a`0d?__O[@b`0e?^_O[@b`0e?^_OZ@c`0f?^_OY@b`0g?^_OY@b`0g?^_OX@c`0h?]_OX@c`0h?]_OW@e`0h?[_OW@f`0i?Z_OW@f`0i?Z_OV@g`0j?Y_OV@g`0j?Y_OU@h`0k?Y_OT@g`0l?Y_OT@g`0m?X_OR@i`0n?W_OR@i`0n?W_OR@i`0n?W_OQ@j`0o?V_OQ@j`0o?V_OQ@j`0o?V_OP@k`0P`0U_OP@k`0P`0U_Oo_Ol`0Q`0T_Oo_Ol`0Q`0T_Oo_Ol`0Q`0T_On_Om`0R`0S_On_Om`0R`0S_Om_On`0S`0R_Om_On`0S`0R_Ol_Oo`0T`0Q_Ok_OPa0U`0P_Ok_OPa0U`0P_Oj_OQa0V`0o^Oi_ORa0W`0n^Oi_ORa0W`0m^Oi_OUa0V`0k^Oi_OVa0W`0j^Oh_OWa0X`0i^Og_OXa0Y`0h^Of_OYa0Z`0g^Oe_O[a0Z`0e^Oe_O\\a0[`0d^Oe_O\\a0[`0d^Od_O]a0\\`0c^Oc_O_a0\\`0a^Od_O_a0\\`0a^Oc_O`a0]`0`^Oc_Oaa0\\`0_^Od_Oaa0\\`0_^Oc_Oca0\\`0]^Od_Oca0\\`0]^Oc_Oda0]`0\\^Oc_Oea0\\`0[^Od_Oea0\\`0[^Oc_Oga0\\`0Y^Od_Oga0\\`0Y^Od_Oha0[`0X^Oe_Oia0Z`0W^Oe_Oja0[`0V^Oe_Oka0Z`0U^Of_Oka0Z`0U^Of_Ola0Y`0T^Og_Oma0X`0S^Oh_Ona0W`0R^Oh_OPb0W`0P^Oi_OPb0W`0P^Oi_OQb0V`0o]Oj_ORb0U`0n]Ok_OSb0T`0m]Ok_OTb0U`0l]Ok_OUb0T`0k]Ol_OVb0S`0j]Om_OVb0S`0j]Om_OWb0R`0i]Om_OXb0S`0h]Om_OYb0R`0g]On_OYb0R`0g]On_OZb0Q`0f]On_O[b0R`0e]On_O[b0R`0e]On_O\\b0Q`0d]On_O]b0R`0c]On_O^b0Q`0b]Oo_O^b0Q`0b]On_O_b0R`0a]On_O_b0R`0a]On_O`b0Q`0`]On_Oab0R`0_]On_Oab0R`0_]Om_Obb0S`0^]Om_Obb0S`0^]Ol_Odb0S`0\\]Om_Odb0S`0\\]Om_Odb0S`0\\]Ol_Ofb0S`0Z]Om_Ofb0S`0Z]Om_Ofb0S`0Z]Ol_Ogb0T`0Y]Ol_Ohb0S`0X]Om_Ohb0R`0Y]On_Ogb0R`0Y]Om_Oib0R`0X]Om_Ohb0S`0X]Om_Ohb0S`0X]Om_Ohb0S`0X]Om_Oib0R`0W]On_Oib0R`0W]Om_Ojb0S`0V]Om_Okb0R`0U]On_Okb0R`0U]On_Olb0Q`0T]Oo_Olb0Q`0T]Oo_Olb0Q`0T]Oo_Omb0o?T]OQ@lb0o?T]OQ@mb0n?S]OR@mb0n?S]OR@mb0n?S]OR@nb0m?R]OR@ob0n?Q]OR@Pc0m?P]OS@Pc0m?P]OS@Qc0l?o\\OT@Qc0l?o\\OT@Rc0k?n\\OU@Rc0j?o\\OV@Rc0i?n\\OW@Rc0i?n\\OW@Sc0h?m\\OX@Sc0h?m\\OX@Tc0g?l\\OY@Tc0g?l\\OY@Tc0g?l\\OY@Uc0f?k\\OZ@Uc0e?l\\OZ@Uc0f?k\\OZ@Vc0e?j\\O[@Vc0e?j\\O[@Vc0e?j\\O[@Wc0d?i\\O\\@Wc0d?i\\O\\@Wc0c?j\\O]@Wc0b?i\\O^@Wc0b?i\\O^@Wc0b?i\\O^@Xc0a?h\\O_@Xc0a?g\\O`@Yc0`?g\\O`@Zc0^?g\\Ob@Yc0^?g\\Ob@Yc0^?g\\Ob@Yc0^?g\\Ob@Zc0]?f\\Oc@Zc0\\?g\\Od@Yc0\\?f\\Oe@[c0Z?e\\Of@[c0Z?e\\Of@[c0Z?e\\Of@\\c0Y?d\\Og@\\c0X?e\\Oh@[c0X?e\\Oh@[c0X?d\\Oi@]c0V?c\\Oj@]c0U?d\\Ok@\\c0U?d\\Oj@^c0U?b\\Ok@^c0U?b\\Ok@^c0U?b\\Ok@^c0T?b\\Om@_c0R?a\\On@_c0R?a\\On@_c0R?a\\On@_c0R?a\\On@`c0P?a\\OPA_c0P?a\\OPA_c0P?a\\OPA`c0o>_\\ORAac0n>_\\ORA`c0n>a\\ORA_c0n>a\\ORA_c0n>a\\ORA_c0m>b\\OSA^c0m>b\\OSA^c0m>a\\OTA_c0l>a\\OTA_c0k>b\\OUA^c0k>b\\OUA^c0k>b\\OUA^c0k>b\\OUA^c0k>a\\OVA_c0i>b\\OWA^c0i>b\\OVA_c0j>`\\OWA`c0i>`\\OWA`c0h>a\\OXA_c0h>`\\OXA`c0i>`\\OWA`c0i>_\\OXAac0h>_\\OWAbc0h>^\\OYAbc0g>^\\OYAbc0g>]\\OYAdc0g>\\\\OYAdc0g>[\\OYAfc0g>Y\\OZAgc0e>Z\\OZAgc0f>X\\O[Ahc0e>W\\O[Aic0f>W\\OZAic0f>V\\OZAkc0f>U\\OYAlc0f>T\\O[Alc0e>T\\OZAmc0f>R\\O[Anc0e>R\\OZAoc0f>P\\O[Aoc0f>Q\\OYAPd0f>P\\O[APd0e>P\\OZAQd0f>n[O[ARd0e>n[O[ARd0e>n[OZASd0f>l[O[ASd0f>m[OZASd0f>l[O[ATd0d>m[O[ATd0e>l[O[ATd0e>k[O\\AUd0d>k[O\\AUd0d>k[O\\AUd0\\b010O100000O1000O10O1000O010000O01000O010O0010O0010O0001O001O0O2O1M2O2M\\\\OV\\Ol`0gc0W_OZ\\Oi`0ac0\\_O`\\Oc`0[c0a_Og\\O^`0Xc0b_Oi\\O]`0Xc0c_Oi\\O\\`0Wc0d_Oi\\O\\`0Wc0d_Oi\\O\\`0Wc0d_Oi\\O[`0Xc0e_Oh\\O[`0Xc0e_Oh\\O[`0Xc0e_Oh\\O[`0Xc0e_Oh\\O[`0Yc0d_Og\\O\\`0Yc0d_Og\\O\\`0Yc0d_Og\\O\\`0Zc0b_Og\\O^`0\\c0__Od\\Oa`0_c0\\_Ob\\Oc`0ac0Z_O_\\Of`0ec0V_O[\\Oj`0jc0Q_OV\\On`0_b0n\\O]^Oo1TOSa0^b0S]O_^Oe1SOXa0]b0V]Oa^O_1RO[a0\\b0Y]Oc^OY1QO^a0\\b0Y]Og^OU1mNba0[b0[]Ok^Oo0jNfa0Zb0\\]Oo^Ok0hNha0Xb0^]OT_Of0dNla0Wb0`]OV_Ob0cNna0Vb0a]OX_O`0bNoa0Ub0b]OY_O?bNoa0Ub0b]OZ_O>aNPb0Tb0c]O[_Ol]OfASb0[>j]OhATb0[>i]OfAWb0[>g]OgAXb0[>e]OfAZb0\\>d]OfA[b0\\>a]OfA^b0]>_]OeA`b0\\>^]OeAab0Tc0O0O101O0O2O1O0O2O1O1O2M2O2N3M3L5L6J1O2N1O1N3N1O2N1O1O1OO100O10000O10000O100O10000O101N100O100O100O100O100O100O1O1O1O1N2O1O1O1O100O1O100O100O0010O10001N100O2O0O100O2N1O100eLZWOPEgh0P;YWOoDhh0Q;XWOnDjh0Q;VWOnDkh0R;UWOmDlh0R;UWOmDlh0S;TWOlDmh0T;SWOkDnh0U;RWOjDoh0U;RWOjDoh0V;QWOjDoh0V;QWOiDQi0V;oVOiDRi0W;nVOiDRi0V;oVOiDRi0W;nVOiDRi0W;nVOhDSi0X;mVOgDTi0X;mVOhDSi0X;mVOhDSi0X;mVOgDTi0X;mVOhDSi0X;mVOgDTi0Y;lVOgDTi0Y;lVOfDUi0Y;lVOgDTi0Y;lVOfDUi0Z;lVOeDTi0Z;mVOfDTi0Y;lVOfDUi0Z;lVOdDUi0[;lVOeDTi0[;mVOcDTi0];lVOcDTi0\\;nVObDSi0^;mVOaDTi0^;nVO`DTi0_;lVOaDTi0^;nVO`DTi0_;mVO_DTi0`;nVO^DSi0b;oVO[DSi0c;oVOZDSi0f;nVOXDTi0f;nVOXDSi0h;oVOTDSi0k;oVORDTi0m;mVOoCVi0PL4M3M3M3N2M3N2M3N1O1N2O2M2N2O1N3M2O1N2N2N3M2N2M3O1N3N1O1O1O1O1O2N1O1O1O1O1O1O1O2O0O1O1O1O1O1O101N1O100O100O101O0O1000001N10000O101O000O101O0O102N1O3L3N2N3M2M4M3M1N101O000O2O00001N100XoNcKbk0]4\\TOfKck0[4ZTOhKdk0Y4YTOjKgk0V4WTOmKhk0T4UTOoKjk0Q4TTORLkk0n3TTOSLkk0n3TTOSLlk0m3STOULlk0k3STOVLmk0j3RTOWLmk0j3RTOXLmk0h3QTOZLok0g3nSO[LRl0e3lSO^LRl0c3mSO^LSl0b3kSOaLTl0_3kSObLUl0^3jSOcLUl0^3jSOdLUl0\\3iSOfLWl0Z3hSOhLWl0X3iSOhLVl0Y3iSOiLVl0W3iSOjLWl0V3hSOlLVl0V3hSOlLWl0T3iSOlLVl0U3iSOmLVl0S3jSOnLUl0R3jSOoLUl0R3kSOoLTl0Q3lSOPMSl0P3lSORMRl0o2nSORMQl0n2oSOSMPl0m2oSOWMmk0k2RTOWMlk0i2TTOYMjk0g2UTO\\Mhk0e2XTO]Mfk0c2YTO`Mdk0a2\\TO`Mck0`2]TObMak0^2^TOeM_k0\\2aTOfM]k0Z2bTOgM^k0Y2bTOhM\\k0Z2cTOfM]k0Z2bTOhM]k0X2cTOhM]k0X2bTOjM\\k0X2cTOhM]k0X2bTOjM]k0W2aTOjM_k0V2aTOkM^k0V2`TOlM_k0T2`TOnM_k0S2`TOmM`k0S2_TOoM`k0R2^TOPNak0P2^TORNak0o1^TORNak0n1^TOTNak0m1]TOUNbk0l1\\TOWNbk0i1\\RObJX1g3[l0h1XROfJ[1d3[l0h1UROhJ_1c3Zl0e1RROnJb1_3[l0d1nQORKe1^3Zl0Z2eSOjMWl0W2gSOnMUl0S2iSORNSl0n1mSOUNPl0l1nSOYNnk0h1PTO\\Nmk0e1RTO_Njk0a1UTOcNhk0^1VTOeNhk0\\1WTOgNfk0Y1YTOkNck0W1[TOlNck0U1\\TOmNQ2]JXf0g6eWOnNQ2\\JZf0f6dWOQOo1ZJ]f0f6cWOQOn1ZJ_f0e6bWOSOm1YJaf0e6`WOTOm1YJbf0d6`WOTOl1YJdf0c6_WOVOl1WJef0d6^WOVOk1WJgf0d6\\WOWOk1WJhf0b6]WOWOj1XJhf0c6\\WOWOj1WJjf0b6[WOYOj1UJkf0d6YWOWOl1UJkf0j6RWOROS2TJkf0o6mVOmNX2TJjf0U7hVOhN^2SJjf0c=VYO]Bjf0c=WYO\\Bif0d=WYO\\Bhf0e=XYO[Bhf0e=XYO[Bhf0e=XYO[Bhf0e=XYO[Bgf0f=YYOZBgf0f=ZYOYBff0g=ZYOYBef0h=[YOXBef0h=[YOXBef0h=[YOXBdf0i=\\YOWBdf0j=[YOVBdf0k=\\YOUBdf0k=\\YOUBdf0k=]YOTBbf0m=^YOSBbf0m=^YOSBaf0n=_YORBaf0n=_YORBaf0n=_YORBaf0n=_YORB`f0o=`YOQB`f0o=`YOQB`f0o=`YOQB`f0o=aYOPB_f0P>aYOPB_f0P>aYOPB^f0R>aYOnA_f0R>aYOnA_f0R>aYOnA_f0R>aYOnA_f0R>aYOnA_f0R>aYOnA_f0R>aYOnA^f0S>bYOmA^f0S>bYOmA^f0S>bYOmA^f0S>cYOkA^f0U>cYOjA]f0V>cYOjA]f0U>eYOjA[f0V>eYOiA\\f0W>eYOhA[f0X>fYOgAZf0X>hYOgAWf0Z>m20000O1000000O1000000O0100000O1000000O100000O010000O1000000O10000O0100000000000001O00000000001O000000001O0000000O101O000000001O000000001O000000001O000000001O0000001O000000001O000000001O000000001O000000001O0000001O00000nTO`AYj0`>dUOdA[j0]>aUOhA]j0X>aUOkA^j0U>`UOnA_j0R>`UOPB_j0P>`UOSB^j0n=`UOTB_j0l=`UOVB`j0i=_UOYB`j0\\<_UOnC0H`j0X`ZOQA`e0P?_ZOPAbe0o>^ZOQAbe0o>^ZOQAbe0o>^ZORAae0n>^ZOSAbe0m>^ZOSAbe0m>^ZOSAce0m>\\ZOSAde0m>\\ZOSAde0m>\\ZOSAde0m>\\ZOSAde0m>\\ZOSAde0m>\\ZOSAee0l>[ZOTAee0m>ZZOSAfe0m>ZZOSAfe0m>ZZOTAee0l>[ZOTAee0l>[ZOTAfe0k>ZZOUAfe0k>ZZOUAfe0k>ZZOUAfe0l>YZOTAge0l>YZOTAge0l>YZOTAhe0k>XZOUAhe0k>XZOUAhe0k>XZOUAhe0k>XZOUAie0j>WZOVAie0j>WZOVAie0k>VZOUAke0j>UZOVAke0j>UZOVAke0j>UZOVAle0i>SZOXAme0h>SZOXAme0h>SZOXAne0g>RZOYAne0g>RZOYAne0g>RZOYAne0g>RZOYAoe0g>PZOYAPf0g>PZOYAPf0g>PZOYAQf0f>oYOZAQf0f>oYOZAQf0f>oYOZARf0e>nYO[ARf0e>nYO[ARf0e>mYO\\ATf0c>lYO]ATf0c>lYO]ATf0c>lYO]ATf0d>kYO\\AVf0c>jYO]AVf0c>jYO]AVf0c>jYO]AWf0b>iYO^AWf0b>iYO^AWf0b>iYO^AWf0b>hYO_AYf0`>gYO`AYf0`>gYO`AYf0`>gYO`AZf0_>fYObAYf0^>gYObAYf0^>gYObAZf0^>dYOcA\\f0]>dYOcA\\f0]>dYOcA]f0\\>cYOdA]f0\\>cYOdA^f0[>bYOeA^f0[>bYOeA_f0Z>aYOfA_f0Z>`YOgAaf0X>_YOhAaf0X>_YOhAbf0W>^YOiAbf0W>^YOiAcf0V>]YOjAcf0V>]YOjAdf0U>\\YOkAef0T>[YOlAef0T>[YOlAff0S>ZYOmAff0S>YYOnAgf0R>YYOnAhf0Q>XYOoAhf0Q>XYOoAif0P>WYOPBif0P>WYOPBjf0o=VYOQBjf0o=VYOQBkf0n=UYORBkf0n=UYORBkf0n=UYORBlf0m=TYOSBlf0m=TYOSBmf0l=SYOTBmf0l=SYOTBmf0l=RYOUBof0k=PYOUBPg0k=PYOUBPg0k=PYOUBQg0j=oXOVBQg0j=oXOVBRg0i=nXOWBRg0i=nXOWBRg0i=nXOWBSg0h=mXOXBSg0h=mXOXBSg0h=nXOWBSg0h=mXOXBSg0h=mXOXBSg0h=mXOXBTg0g=lXOYBTg0g=lXOYBUg0f=kXOZBVg0e=jXO[BVg0e=jXO[BWg0d=iXO\\BWg0d=iXO\\BXg0c=hXO]BYg0b=gXO^BZg0a=fXO_B[g0`=eXO`B[g0`=eXO`B\\g0_=dXOaB]g0^=cXObB^g0]=bXOcB^g0]=cXObB^g0]=bXObB`g0]=`XOcBag0\\=_XOdBag0\\=_XOdBbg0[=^XOeBcg0Z=]XOfBcg0Z=]XOfBdg0Y=\\XOgBdg0Y=\\XOgBeg0X=[XOhBfg0W=ZXOiBfg0W=ZXOiBgg0V=YXOjBgg0V=ZXOiBgg0V=YXOjBhg0U=XXOkBhg0U=XXOkBig0T=WXOlBig0T=WXOlBjg0S=VXOmBjg0S=VXOmBkg0R=UXOnBkg0R=UXOnBlg0Q=TXOoBmg0P=TXOoBlg0Q=TXOoBmg0P=SXOPCmg0P=SXOPCng0o[Oe0K5mLQNRhNR2fW1YNRhNl1gW1^NRhNf1fW1fNQhN_1iW1jNQhNY1TV1e0fiN^OlU1S1niNPOkU1_1fiNhNPV1i5I8G8J6M3M3N3N1N2N2N200O2O00000O100O0100dNnjNjGRU1T8VkNfGjT1W8]kNeGcT1X8ckNeG]T1X8hkNeGXT1Z8lkNdGTT1[8PlNaGQT1^8YlNWGiS1i8g1O1O1O100O1O1O1O1O1N2O100O1O100O100O10000O1O1O2M2N2oH\\hNe5fW1WJ`hNe5aW1YJihN^5XW1_JohN]5RW1aJSiNZ5nV1dJViNZ5kV1aJ_iNX5nX1G3L3dLjeNj0WZ1SOoeNh0SZ1VORfNe0PZ1YOYfNjS1a4doNVK^P1a4ooNYKSP1`4UPO\\Koo0^4WPO_KPP1W4VPOeKWP1k3RPOoKTP1i3TPORLoo0h3WPOSLlo0k3XPOPLlo0l3V6N3L;GA7H8I6I7H>]O[nde1"}}, {"image_id": 99, "category_id": 1, "bbox": [1058.0, 419.0, 191.0, 255.0], "score": 0.9994995594024658, "association_id": 3, "light": [-1.0563969612121582, -2.1087543964385986, 0.9683046340942383, 2.053906202316284], "segmentation": {"size": [1536, 1555], "counts": "Sdca12m_12O1O1O001O0000001O000O11O01O000000001O000000000000001O0000001O0001O0000000001O00000000000000001O0001O00001O0000001O1O1O001O001O1O1O1O1N10R_1d0X`N6K2O0O100O1TaNROf^1m0[aNSOc^1o0\\aNROb^1o0_aNQO_^1Q1aaNoN]^1S1caNmN\\^1S1daNoNZ^1Q1gaNoNX^1P1jaNPOT^1Q1laNPOR^1P1PbNPOo]1o0SbNQOl]1n0VbNROi]1l0[bNSOd]1k0_bNVO_]1j0bbNVO\\]1j0gbNUOW]1k0kbNUOT]1j0nbNVOQ]1i0QcNWOn\\1i0ScNWOk\\1j0VcNVOh\\1k0YcNVOd\\1k0]cNUOa\\1l0`cNTO_\\1k0ccNUO\\\\1k0ecNUOY\\1k0icNVOT\\1k0mcNUOQ\\1l0PdNTOo[1l0SdNSOk[1n0VdNROh[1o0YdNROd[1n0^dNRO`[1n0bdNRO\\[1o0edNQOY[1Q1hdNnNU[1T1ldNlNQ[1W1odNjNnZ1W1SeNiNkZ1X1VeNhNgZ1Y1[eNgNcZ1X1`eNhN^Z1Y1ceNgN\\Z1Y1eeNgNYZ1Z1ieNeNVZ1[1keNeNRZ1\\1PfNdN`X12bfN[1o0dNWX1bW1g1hkNXNZT1\\OdgNj1[4gNcT1l0ekNPO_T1h0jkNTOWT1c0SlN[OoS1=XlNAmS13]lNIZe[>"}}, {"image_id": 99, "category_id": 1, "bbox": [882.0, 393.0, 152.0, 216.0], "score": 0.9998453855514526, "association_id": 5, "light": [-1.7061784267425537, -2.242403745651245, 1.6508846282958984, 2.1406469345092773], "segmentation": {"size": [1536, 1555], "counts": "\\b[Y15j_12O1O000O1000000O1000001N10000000000N2O2O00000000001O1O001O001O00001O001O0000001O00000000000000000000001O00000000@i`N7W_1Gm`N7T_1Dh`N06=Gi]1c0TbN_OfZ1EThNh0VMCbZ1ORhN>\\MC_Z1=kgNOfMD`Y1DPgNm0i1IgMG_Y1CofNQ1k1CgMI_Y1ClfNV1m1]OhMJ_Y1DifNY1P2WOhML^Y1GhfNX1P2ROmMOZY1IgfN1Ao0_2UOQN2WY1K`fN1NP1X2nNWN5RY1M]fN60l0Y2fN]N;lX1Y2_iNgM_V1^2^iNbMaV1`2^iN`MaV1b2^iN_M`V1c2`iN\\M`V1e2_iN[M`V1g2_iNYM`V1i2_iNWM`V1l2^iNTMaV1Q3[iNoLdV1V3XiNjLhV1[3SiNeLlV1a3PiN^LPW1g3kgNTLC5bX1i3hgN]L]OIjX1l3fgNWM[X1j2bgNXM^X1i2_gNYMaX1h2[gN[MeX1S3ifNPMXY1i430O101O001O0000O1000000O100O2N1M3M3I7G9M4M2M4M3N2M3M3J5M6K5I6J5L5K>@9I7J6K4M2M3N3M4K3M7K5K9RNnaN[1^^1O0Mb0_O4L2N2M4L6K5Jdo\\h0"}}, {"image_id": 100, "category_id": 1, "bbox": [177.0, 161.0, 84.0, 40.0], "score": 0.9999570846557617, "association_id": 3, "light": [-1.2137212753295898, -3.244729518890381, 1.0767147541046143, 3.098618507385254], "segmentation": {"size": [404, 639], "counts": "kPV21c<000000001O00000000000O1000000000000000000000000QO3WEMg:8VEHh:f0lDZOT;S10O11OO1000000HhDTOX;h0kDYOU;g0kDYOU;f0lDZOT;f0lDZOU;e0kD[OU;e0kD[OU;f0jDZOV;f0kDYOU;g0kDYOU;g0kDYOU;g0kDYOU;g0kDYOU;g0kDYOU;g0kDYOU;f0=00O10O1000001O2N1]DXOX;R101O00000000O1DkDXOU;h0PFBP:?PF@P:a0oE_OQ:b0nE^OR:c0mE]OS:g0iEYOW:i0gEWOY:j0fEVOZ:l0dETO\\:m0cESO]:m0cESO\\:o0cEQO]:o0cEQO]:P1bEPO]:R1bEnN^:R1cEmN]:T1a03nDhNb:f1O1O0000001OO010O10O10L3@a0O010O100000O100000001O0000001O001O0001O0O100000000O101N1O100O10001O00000001O1TEnNT:T1dETOY:o0cESO]:b11O0000000O100H`E[Na:e1_E[Nb:d1^E\\Nb:d1]E]Nd:b1\\E^Nf:a1YE`Nf:g12N1_N`El0a:nNkEk0V;J4K2N2LQhk1"}}, {"image_id": 100, "category_id": 1, "bbox": [2.0, 167.0, 82.0, 55.0], "score": 0.9999991059303284, "association_id": 1, "light": [-1.7245115041732788, -1.7713325023651123, 1.661803126335144, 1.6027673482894897], "segmentation": {"size": [404, 639], "counts": "SP11b<2O00000O10000000O11O000000000O1000000dN9kEGT:=iECU:h0cEWO]:o0]EQOb:W1SEjN0Lm:c111O001OO100O1CVEQOi:m0\\EoNe:o0]EQOc:n0^EROb:m0_ESOa:m0_ESOb:l0]EUOc:k0]EUOc:k0]EUOc:l0]ESOc:m0]ESOc:m0]ESOc:n0\\EROd:n0\\EROd:n0\\EROd:n0\\EROd:n0\\EROe:m0[ESOe:m0[ESOe:m0[ESOe:l0\\EUOc:k0]EUOc:k0]EUOc:j0^EVOb:j0^EVOb:j0^EVOb:k0]EUOc:l0\\ETOd:l0]ESOc:P1[EnNf:W1SEhNo:b1M1O1O0O100O10000000O1O1A?N2O1L4M3K6Mfij6"}}, {"image_id": 100, "category_id": 1, "bbox": [236.0, 161.0, 103.0, 76.0], "score": 0.9918889999389648, "association_id": 5, "light": [-1.9616875648498535, -1.9224305152893066, 1.9325679540634155, 1.7314825057983398], "segmentation": {"size": [404, 639], "counts": "eZm22b<1N2O00001N1000000000001O00000000000O1000000000000000001O0000000000001O0000000000000000000000000000000000000000000YNGSG9l8ISG7m8JRG6l8OQG0o84oFKm8?iEAg00_9o0_FQO`9R1^FnNb9U1[FkNe9X1XFhNh9Z1VFeNk9^1SFaNm9b1PF]NQ:h1kEVNW:=TFg0i9VO[Fj0f9RO]Fm0e9PO]Fo0e9kN`FT1a:O1O2XO_DN2Ma;1mDOV;O]D=e;_O^Da0a;_O_Da0l;NEBZD002N7]b0GePl5"}}, {"image_id": 101, "category_id": 1, "bbox": [694.0, 393.0, 82.0, 130.0], "score": 0.9994164705276489, "association_id": 1, "light": [-1.4566268920898438, -2.506281852722168, 1.4473121166229248, 2.3383705615997314], "segmentation": {"size": [768, 1024], "counts": "XPY`01og000001O000O10000000000000000000000O10000000000000001O0000000000000000000SO3gYOMSf0:lYOFne0`0RZO@he0h0VZOXOhe0k0WZOUOfe0o0YZOQOee0R1ZZOnNce0V1\\ZOiNed08_[OR1KfNbd0c0W[Oo04^N^d0j2^[OVM`d0o2^[OPM_d0U3`[OiL`d0Y321O2M3N2O000O1O1N2O1M4L3N200O2OO1000000O100O1M3N2J7G9C>Eg0]O9G9FSci5"}}, {"image_id": 101, "category_id": 1, "bbox": [811.0, 620.0, 79.0, 95.0], "score": 0.999973714351654, "association_id": 6, "light": [-2.4981460571289062, -1.3832125663757324, 2.419283151626587, 1.2242450714111328], "segmentation": {"size": [768, 1024], "counts": "WnPc02mg02O00000000000000001N100000000000000000000000000000000000000000000lMd0e[O[OVd0S2aZOmM\\e0]2N2O1O002OO00010000O10000O10001N1000001O000000000O10000O10O10O0100O101N1O3M3M2K6J6_Oa0iNfYOD49NFhbT3"}}, {"image_id": 101, "category_id": 1, "bbox": [370.0, 426.0, 169.0, 259.0], "score": 0.9999969601631165, "association_id": 4, "light": [-1.6728720664978027, -2.047834634780884, 1.6101090908050537, 1.9275100231170654], "segmentation": {"size": [768, 1024], "counts": "WUf82ng00O10001O00000000000000000000000O10000000000000000000001O000000000000000000000O100000000000001O00000000000000000000000000O10000000000000000000000000000000000000000000hK;U@Ec?f0Z@ZOT?Y1k@gNd>k1[AUNa>P2^APN`>T2^AlM]>Z2bAfMZ>_2eAaMY>b2gA]MV>g2iAYMU>i2SAXMnMOn`0k2PA`MkMESa0n2m@cMoM^ORa0S3]@SN]NjNTa0V3k_OeNoNUNUa0]3[_OjN_OiMUa0^6j^ObIUa0_6l^O`ITa0a6k^O_ITa0b6l^O^ITa0b6l^O^ITa0b6l^O^ISa0c6n^O\\IRa0d6n^O\\IQa0d6P_O[IPa0f6P_OZIn`0h6S_OWIl`0j64100O2N100O2M2J7G8L5K5M3O0O100O101O1OO100O100000000O10000O100000000O101N100O1N2N3K5H9C=K4H8G:J6G>mNQ1H5K6J8I9F8H7F>CPY[;"}}, {"image_id": 101, "category_id": 1, "bbox": [263.0, 625.0, 80.0, 94.0], "score": 0.9999443888664246, "association_id": 2, "light": [-2.019892930984497, -1.8540269136428833, 1.934251308441162, 1.6932622194290161], "segmentation": {"size": [768, 1024], "counts": "[nU62ng01N1000000000000000000000001O0O10000000000000000000000000000001O00lM=h[OFoc0Z2N2O0000100O1O1O1O10000O100O10000O10000000000000000000000001O001O1O0000001O0O2O1N2M4K6F>mNnYOSOejn?"}}, {"image_id": 101, "category_id": 1, "bbox": [747.0, 432.0, 139.0, 211.0], "score": 0.9999979138374329, "association_id": 3, "light": [-0.9671781659126282, -3.2174465656280518, 0.9112351536750793, 3.1319632530212402], "segmentation": {"size": [768, 1024], "counts": "mk`a02mg010001O00O1001O000000000O101O0000000000000000001O00000O10000000000000001O000000000000000000000000000000000000000000000001O00000O2OCMmXO3Qg04jXOLSg08mXOGQg0;oXOEof0>QYO@nf0b0RYO^Olf0d0TYO\\Ojf0f0VYOZOhf0h0XYOXOff0j0ZYOUOdf0m0]YOSO`f0o0aYOQO]f0P1dYOPOVf0T1lYOlNne0Y1SZOgNhe0\\1ZZOdN[e0d1hZO\\NRe0g1Q[OYNld0g1d002O1O0N3OPNgNT\\O:7m0cc05V\\OKlb0oNS]O_1IBTc0R3011N2N3M3N2N2O1O1O1N2001O1O1O1O1O103M1O2O1O0O1100O1N4N1N1N30N0O10g0ZOhMS]OXOob0=a]OZOcb0=k]O[OWb0`0o]O\\OTb0VOU]O5m0c0oa0QO_]O1j0l0Rc0iNW]OU1od0K7H5L6I8DflV3"}}, {"image_id": 101, "category_id": 1, "bbox": [896.0, 464.0, 119.0, 178.0], "score": 0.999992847442627, "association_id": 5, "light": [-2.3406729698181152, -1.076428771018982, 2.2003321647644043, 0.8449060916900635], "segmentation": {"size": [768, 1024], "counts": "mcPe03mg0000O101O000000000000000000001N1000000000000000000O100000000000000000000000000000000O10000001O000000E;N2O1N2N2N2O1O1O1O1O1LNVYOVOgf0m0ZYOQOYc06Y]OOa1n0mMmNWc0;j\\O=h1`0XNgNTc0d1Y^OIbNcNTc0j1m]OJPO\\NRc0P2e]OHYb0R3M20O1N3O0N3L4O1N3M3M2M4N2K5N2M3N2N2N2N2O1O100O1000000001O00100O010O12O1O0N2N100010N1O10XOa[OmMad0h2k\\OfLea0d2U]ObMMK<0C`0Pc0g1`]OiMEN3P1nb0Q1j]OnMWOR1dc0NoZ6"}}, {"image_id": 101, "category_id": 1, "bbox": [482.0, 623.0, 143.0, 100.0], "score": 0.9404515624046326, "association_id": 7, "light": [-2.134822368621826, -1.3726140260696411, 2.080300807952881, 1.239915132522583], "segmentation": {"size": [768, 1024], "counts": "_VZ;2mg010000O100000000000000000000O10000000000000000000000O10000000000000000O100000000000000000000O10000000001O0000000000000000001O000000000000000000000000000000000000000000000001O00eN[1N2O1N2O1NOmYOYNQf0i1PZOVNne0l1O4_Oa0M3O100N2O1O1N2O1O10000O1000000O1001OO100000000O11O000000001O1O001O003M1O4_MV[Od1ge0L2N2N2N1O2N2MnbZ9"}}, {"image_id": 102, "category_id": 1, "bbox": [161.0, 755.0, 93.0, 158.0], "score": 0.9999867081642151, "association_id": 4, "light": [-0.8379345536231995, -3.114539384841919, 0.74271559715271, 2.989703893661499], "segmentation": {"size": [1371, 2048], "counts": "X^h63hZ10O101O0O10000000000000O1000O100000000000000O1000O100000000000O10O1000000000O1000O10000000_K2TnNOkQ13TjN0b0Ok1N^S16QjNV1f0[OOXO[U1Q2]jNmN7RO[U1T2RjNUOb0gN\\U1i3bjNWL_U1h3ajNXL_U1i3`jNWL`U1i3ajNULbU1i3^jNWLdU1g3[jNZLeU1f3[jNZLeU1e3\\jN[LeU1c3\\jN]LdU1b3]jN^LdU1a3\\jN_LdU1a3\\jN_LcU1b3^jN\\LcU1e3UjNbLkU1b3kiNbLWV1Q4O2OO0100O0100O2O0O1O101N2N2M3N2M3N3M2WN`iNTObV1g0iiNPOZV1l0QjNjNSV1Q1RjNkNRV1k0ZjNoNjU1g0`jNSOfU1d0_2@fUQ[2"}}, {"image_id": 102, "category_id": 1, "bbox": [995.0, 682.0, 224.0, 455.0], "score": 1.0, "association_id": 3, "light": [-2.319035053253174, -2.2324140071868896, 2.289306879043579, 2.1254732608795166], "segmentation": {"size": [1371, 2048], "counts": "bXeY16dZ11O2N101N1O1O2M2O1K5O1M3O1O100O10000O10000O1000000O10000O10000O1000000O10000O10001N100O100O2O00001N100O101O0O100O1O1O1O2O00O10O1gIgNPSOY1jl0WOlROi0nl0@oRO`0ol0DoRO;]j0lNXROm0Y37Sj0]O]RO?_34li0J_RO5c31ki01]RO2e3Mli07ZROOh3Jki0=YROLj3Gki0a0XROKj3Dmi0f0UROGo3Bii0n0QRODU4^Ohi0T1iQOD_4XOfi0Z1bQOCh4SOei0S4ZVOlKfi0U4ZVOkKei0W4ZVOiKfi0X4YVOhKgi0Z4WVOfKii0]4TVOcKki0a4\\SOVK_O9Um0d4RSO^KENYm0e4mROdKGG[m0i4gROgKK@^m0l4]ROoK0VOcm0Z8YROfGfm0]8XROdGgm0_8VROaGjm0a8TRO_Glm0c8QRO^Gom0e8nQO\\GQn0h8kQOXGUn0l8hQOSGXn0Q9dQOoF\\n0T9cQOjF]n0k:O00001N1000001N10000O2OO1000O1000000O1O1O10QOlQOWESn0j:mQOVESn0j:mQOVERn0k:nQOUERn0k:nQOUERn0k:nQOTERn0m:nQOSERn0k;0OOTOoQOREPn0o:PROQEom0m;O2N2N1O2N1OROZROkDem0S;]ROnDam0Q;aROoD_m0o:cRORE[m0n:dROTE[m0V0000O2O0000001O00001O1O0O2O001O1N101O001N2N2O1K6J5H9XOi0G9I6E;K5L4I9E;Im^gY1"}}, {"image_id": 102, "category_id": 1, "bbox": [1855.0, 673.0, 105.0, 236.0], "score": 0.999872088432312, "association_id": 1, "light": [-2.519199848175049, -1.7358407974243164, 2.421501398086548, 1.5984529256820679], "segmentation": {"size": [1371, 2048], "counts": "i[d]23^Z1c0@:J4YiNQO\\S1S1dlNnNQS1\\1olNdNiR1d1VmN^NdR1g1\\mNYNaR1h1amNXN]R1h1emNXNYR1h1imNXNVR1f1mmN[NPR1b1UnN^NiQ1`1[nN`NcQ1`1_nN`N`Q1_1bnNaN]Q1_1cnNbN]Q1\\1enNdNZQ1\\1gnNdNYQ1[1hnNeNVQ1\\1jnNeNUQ1[1lnNeNRQ1\\1onNdNoP1^1PoNcNoP1_1PoNaNnP1e1lmN]NPNNRT1j1imN\\NRNKQT1o1jmNYNSNHoS1W2gmNVNXNCfS1g2kmNmMZN\\OdS1Q3nmNfM\\NYObS1Z3lmN`M`NVOaS1g3cmNVMkNSO`S1Q4ZmNPMVOnN^S1W4WmNnLZOkN_S1[4PmNmLAhN^S1a4clNQMN^N^S1c6blN]I^S1c6blN\\I_S1e6alNZI_S1f6alNZI_S1f6alNZI_S1f6alNZI_S1f6alNYI`S1g6alNXI_S1h6alNXI_S1h6blNWI^S1i6blNWI^S1i6blNWI^S1i6blNWI_S1i6`lNWIaS1h6`lNVIdS1h6[lNXIgS1f6YlNZIiS1d6WlN\\IkS1b6UlN^IQT1[6okNfITT1W6lkNiIZT1Q6fkNoI`T1j5akNUJbT1i5^kNWJdT1f5\\kN[JfT1a5\\kN_JfT1e3[lNdLTOGcT1e1gkNVOe1TOeR1`1VlNjN\\1F^R1]1YoNaNiP1[1ZoNeNhP1W1a4M2O1O100O2N2M3N2O1O1O2O0N2N3L4M3N5LO3M10O20N3M1N1O100O2O10O1O0O1N2O1O8FhQe3"}}, {"image_id": 102, "category_id": 1, "bbox": [1389.0, 719.0, 108.0, 179.0], "score": 0.9846436381340027, "association_id": 6, "light": [-1.3230714797973633, -1.9888036251068115, 1.2607073783874512, 1.831061840057373], "segmentation": {"size": [1371, 2048], "counts": "\\]Tj1d0QZ1=VOg0I;H4K8I>B001O000000001N1000000000001O01O0002N3M1O3M=C5K:F8iiNQLRU1n4N2N100O0010O1O011M2O2N3L6J3M3N2N2M2M3M3M4I6A?\\Oc0F;G:F9J7I6M3N3MUgNcN]X1Y1agNjNbX1Q1_gNPOcX1l0^gNUOdX1e0_gN\\ObX1a0`gN_OdX1<\\gNEjX15UgNLmX11SgN0QY1JPgN7jY10O010NDeeN<[Z1200000O10000000000000O10001O001O3M1O010O1O001O01O00000O101N2N`mPg0"}}, {"image_id": 103, "category_id": 1, "bbox": [269.0, 232.0, 83.0, 36.0], "score": 0.9999258518218994, "association_id": 1, "light": [-2.4573473930358887, -1.4590890407562256, 2.3914718627929688, 1.24228835105896], "segmentation": {"size": [480, 640], "counts": "W[n31o>000000000O2O000000000000000000001O000000000000001O0000000IO_A1V>LkA;NHS>b0lA^OR>i0N2O10NQBSOn=o00100O2O0000000000000000000000001O000000000000000000000000000000000000000001O001O1N2O1N2N3KchV4"}}, {"image_id": 103, "category_id": 1, "bbox": [412.0, 258.0, 155.0, 45.0], "score": 0.9999946355819702, "association_id": 2, "light": [-2.611506462097168, -1.389829158782959, 2.5437936782836914, 1.3070571422576904], "segmentation": {"size": [480, 640], "counts": "U]Q62n>001O000000001O00000000000000000000000001O0000000000000001O000001O0000000000000000000001O00000000000000000000000000001O00000000000000001O00000000001O0001O00000000YOKnA=7Gg=c0VB[Oh=m0TBROi=R1WBmNh=U102O0O1O101N10000000O1000000000000000000001O0000000000000000000000000000001O0000000000000000000000000000000000O100000000O10000O100O1O1O3MmnQ1"}}, {"image_id": 103, "category_id": 1, "bbox": [30.0, 266.0, 241.0, 98.0], "score": 0.9492465257644653, "association_id": 3, "light": [-2.7907330989837646, -1.3343381881713867, 2.689455509185791, 1.1997389793395996], "segmentation": {"size": [480, 640], "counts": "j\\>2m>2N2O00001O00000000000000001O000000000000000000001O0000000000001O000000000000000000000000000000000000001O000000000000000000000000000000000000000001O0000000000000001O000000000000000000000000000000000001O00000O1L^Oi0K3N1K6[Od0L5O0O1O1L4L4O101N1N2O00100O1N2O1O100O1000000O10000000000000000000001O0O2O00001O00000000000000001O00000000001O000000001O0000001O000000000O100000000000000000000O0100000000O1O100O10000O100O1O1FPDcMQ<]2PDbMP<]2RDaMo;^2:0000O100001O001O001O001O1O1O01N2N2O1N1O2O2L7I4L2O2N3M5H6L3N2M5Ine\\5"}}, {"image_id": 104, "category_id": 1, "bbox": [529.0, 508.0, 87.0, 193.0], "score": 0.999996542930603, "association_id": 2, "light": [-2.5989582538604736, -1.9863722324371338, 2.5323104858398438, 1.8452094793319702], "segmentation": {"size": [768, 892], "counts": "i]]<2mg02N100O2O000000000O100000000O1000000O10000O100000000jLHd^O7Ya02a^OO]a04b^OL]a05c^OK\\a07b^OJ\\a09b^OH\\a0;S]O_O26jb0e\\O=[OYONLQd0`0_\\Oc1ac0_NZ\\Od1ec0`NR\\Of1nc0V1O10CP\\OjLoc0V3R\\OiL\\b0Jo^O^3eNhLYb0On^OZ3kNfLTb04m^OY3oNcLSb07h^OZ3UO_LQb0;a^O\\3_OYLna0`0Z^O\\3ITLla0f0R^OY34PLja0S5W^OlJja0S5W^OmJia0R5Y^OmJga0R5Z^OnJfa0Q5[^OoJea0]4T^OgK9Lca0Y4[^OdK62`a0Y4S_OgKm`0Y4S_OgKm`0Y4S_OgKm`0Z4R_OfKn`0\\4P_OdKPa0`4k^OaKUa0d4f^O[K[a0g4b^OZK^a0k4]^OUKca0P5W^OQKia0Q5U^OoJka0S5S^OmJma0V5P^OjJQb0W5l]OjJTb0`51Hj]OfJWb0a0l]Ol3McKXb0V8TAjGj>V8XAjGe>U8]AmGR>a8oAaGl=`8XBUGC7R>e8aB[G]=c8gB\\GY=_8nB`GQ=X8QCaGUO7j=U8TCdGRO7j=R8WCgGoN7i=n7]CkGjN7i=j7aCoGfN7i=g7kCXHVi5oAcLNdM[>]5mAmLk>i2\\AUMe>g2_AWMb>g2dATM]>k2jAoLV>P3mAmLT>R3nAlLS>S3PBjLP>V3TBfLm=]3TB^Lm=S3[@oKg1j0P>k2f@[LZ1e0S>e2PAiLj0=Z>e2SAlLd0:[>h2TAoLb04]>k2RARMc0N^>P3n@SMg0G^>U3j@WM]a0i2b^OZM]a0e2b^O]M`a0_2c^O^M`a0_2c^O_M_a0_2b^O_Maa0^2a^O`Maa0^2b^O\\Mda0b2R2J6K3K6I7G;G6J7G^an:"}}, {"image_id": 104, "category_id": 1, "bbox": [794.0, 527.0, 85.0, 164.0], "score": 0.9982554912567139, "association_id": 4, "light": [-2.77700138092041, -1.7688889503479004, 2.7262258529663086, 1.590911865234375], "segmentation": {"size": [768, 892], "counts": "^Udb03mg00O10000O101O00000O100000000000000O101O0000000000000J6H8UN_O_[OY1hc0l1TOjL^\\O0M]3[c0o0J6K5K5N11N1100000000000000000000000000000000000000000000000000000000000000000000000O100O10001O1O2M4SMW^O[OVb0lNd_Og0Pd0I^S9"}}, {"image_id": 104, "category_id": 1, "bbox": [394.0, 482.0, 108.0, 228.0], "score": 0.9999985098838806, "association_id": 1, "light": [-1.7242259979248047, -2.4542157649993896, 1.6070733070373535, 2.3581559658050537], "segmentation": {"size": [768, 892], "counts": "SVX92mg0101N1O1O100O100O1000000O10000000000O1000000O1000000001O00B>M3N2N2L4J6L4YLjN^@\\1^?mNT@\\1k?gNm_O_1S`0dNP^O@e0S2\\a0Dk]Ok0Tb0a2000000O100O01F\\]OXKcb0h4^]OXKbb0g4_]OYK_b0g4c]OYK[b0g4g]OXKWb0h4l]OXKRb0f4R^OZKka0c4[^O]Kca0`4b^O`K\\a0_4g^OaKTa0]4S_ObKf`0_4a_OaKU`0e4o_O[Kd?n4`@RK_?k4e@UKZ?j4h@UKY?k4f@VKZ?i4g@WKY?i4g@VKZ?i4g@WKY?i4g@VKZ?j4f@VKZ?k4e@UK[?m4b@SK_?n4`@RK`?Q5]@oJc?S5[@mJe?U5Y@jJh?X5V@hJj?\\5R@dJn?_5o_O`JR`0b5l_O^JT`0e5j_OZJV`0i5o03M5K=C4L2N2N000001O1O2jIV_OR5n`0eJZ_OY5ja0K7eMV]OTOmb0KY^OMka0J_^O1na0YOf^ON2O000O101O00000O2O2N1N2O0O2O1O1]oNmN^n0T1]QOROan0o0]QOROcn0n0]QOSObn0n0]QOROcn0o0\\QOQOdn0o0\\QOROcn0o0\\QOQOcn0P1]QOPOcn0Q1\\QOoNdn0S1ZQOnNen0T1ZQOkNfn0]1RQOcNnn0d1kPO\\NUo0f1jPOZNUo0h1iPOXNWo0k1fPOUNZo0n1dPOQN\\o0R2bPOmM^o0V2`POiM`o0`2WPO`Mio0b2VPO]Mjo0e2UPOZMko0h2TPOWMlo0n2QPOQMno0P3QPOPMoo0Q3PPOoLPP1R3PPOmLPP1S3PPOmLPP1T3PPOkLPP1U3PPOkLPP1U3PPOkLPP1U3PPOkLPP1V3ooNjLQP1V3ooNjLQP1V3ooNjLQP1V3ooNjLQP1V3noNkLRP1U3noNkLRP1U3moNlLSP1]3000000000000000000000000000BmoNVMSP1i2noNWMRP1i2noNWMRP1h2ooNXMQP1h2ooNXMQP1h2ooNXMQP1h2ooNXMQP1h2ooNXMQP1h2ooNXMQP1h2ooNXMQP1h2ooNXMQP1h2ooNXMQP1h2ooNXMQP1h2ooNXMQP1h2ooNXMQP1g2PPOYMPP1g2ooNZMQP1f2ooNZMRP1e2noN[MRP1e2noN[MRP1e2noN[MRP1e2noN[MSP1d2moN[MTP1e2loN[MTP1e2loN[MTP1e2loN[MUP1d2koN\\MUP1c2loN]MTP1c2loN]MTP1c2loN]MTP1c2koN^MUP1b2koN^MUP1a2loN_MTP1a2loN_MTP1a2loN_MTP1b2koN^MVP1a2joN_MVP1a2joN_MWP1`2ioN`MWP1`2ioN_MYP1`2foNaMZP1_2foNaM[P1_2doNaM]P1^2coNbM^P1]2boNcM_P1\\2aoNdM`P1[2`oNeM`P1[2`oNeMaP1Z2`oNeMaP1Z2_oNeMcP1Z2]oNfMcP1Z2]oNfMdP1Y2\\oNgMdP1Y2\\oNgMeP1X2[oNhMeP1Y2ZoNgMgP1X2YoNhMgP1X2YoNhMhP1W2XoNiMiP1V2WoNjMiP1V2WoNiMkP1V2UoNjMkP1V2VoNiMkP1W2ToNiMlP1W2ToNiMlP1W2ToNiMlP1W2ToNhMnP1a2001O00001N101O1O001O001O1N101O1O0O2O1KdnNkM]Q1T26N1O001O1N101O1O001N2O1N2N4JkS_X1"}}, {"image_id": 105, "category_id": 1, "bbox": [754.0, 766.0, 345.0, 277.0], "score": 0.9999999403953552, "association_id": 1, "light": [-1.294809341430664, -2.349046468734741, 1.3053364753723145, 2.199120044708252], "segmentation": {"size": [1145, 1565], "counts": "VS\\j06bS14L1O2N101N100O100O2N1O1O1O100O1O100O2O0O1N2L4N2O1O100O10000O100O100O1O1O1O100O10000O100O1O1N2O1N2O100O1000000gLeNTTO[1ik0nNQTOR1lk0WOoSOh0ok0_OlSOa0Sl0EhSO;Vl0MdSO3Zl06_SOJ^l0c0USOgMeNf1Sn0T2mQOlMQn0o3O1N2OdNRROoLmm0P3[ROjLdm0X3]ROfLbm0\\3^ROcLam0`3^RO_Lam0e3\\RO[Lcm0i3[ROVLdm0n3YRORLem0R5O1O1O1O1O1O1O1N2I7J6M3N2N2N2N2N2N2L4L4M3O1O1O100O1O2O0O1O100O1O1O1O100O100O100O10000O100O100O1O1OTO_TObI`k0_6`TOaI`k0^6`TOcI_k0^6aTObI_k0^6aTObI^k0^6cTObI]k0^6cTObI]k0^6bTOcI]k0^6cTObI]k0]6dTOcI\\k0]6dTOcI\\k0]6dTOcI\\k0]6cTOdI\\k0]6dTOdI[k0[6fTOeIZk0[6fTOeIZk0[6fTOeIZk0[6fTOeIYk0\\6gTOdIYk0\\6gTOdIXk0]6gTOdIYk0\\6gTOdIXk0]6hTOcIWk0^6iTObIWk0^6iTObIVk0^6kTObIUk0^6kTObITk0_6lTOaITk0_6lTOaITk0_6lTOaITk0_6kTObIUk0^6kTObIUk0^6kTObITk0_6lTOaITk0_6lTOaITk0_6lTOaITk0_6lTOaITk0_6lTOaITk0_6lTOaITk0_6lTOaITk0_6lTOaITk0b7000lNlTOcITk0]6lTOcITk0]6lTOcITk0]6lTOcISk0^6mTObISk0^6mTObISk0^6mTObISk0^6mTObISk0]6nTOcIRk0]6nTOcIRk0]6nTOcISk0\\6mTOdISk0\\6lTOeITk0[6lTOeITk0[6lTOeITk0[6lTOeITk0[6lTOeITk0[6lTOeITk0Z6mTOfISk0Z6mTOfISk0Z6mTOfISk0Y6nTOgIRk0Y6mTOhISk0X6mTOhISk0W6nTOiIRk0W6nTOiIRk0W6nTOiIRk0W6nTOiIRk0V6oTOjIQk0V6oTOjIQk0V6oTOjIQk0V6oTOjIRk0U6mTOlISk0T6mTOlISk0T6mTOlISk0T6mTOlITk0R6mTOnISk0R6mTOnISk0R6mTOnISk0R6mTOnISk0R6mTOnISk0R6mTOnISk0R6lTOoITk0Q6lTOnIUk0Q6lTOoITk0Q6lTOoITk0Q6lTOoITk0Q6lTOoIUk0P6kTOPJUk0P6kTOPJUk0P6kTOPJVk0o5jTOQJVk0o5iTORJXk0m5hTOSJXk0m5hTOSJXk0m5hTOSJYk0l5gTOTJYk0l5gTOTJYk0l5gTOTJYk0l5gTOTJYk0l5gTOSJ[k0l5eTOTJ[k0l5eTOTJ[k0l5eTOTJ[k0l5eTOTJ[k0l5eTOTJ[k0l5eTOTJ[k0l5eTOTJ[k0l5dTOUJ\\k0k5dTOUJ\\k0k5dTOUJ\\k0k5dTOUJ]k0j5cTOVJ]k0j5cTOVJ]k0j5cTOVJ]k0j5cTOVJ]k0j5cTOUJ^k0k5bTOUJ^k0k5bTOUJ^k0k5bTOUJ^k0k5bTOUJ^k0k5bTOUJ^k0k5bTOUJ^k0k5bTOUJ^k0k5bTOUJ^k0k5bTOTJ_k0l5aTOTJ_k0l5aTOTJ_k0l5aTOTJ_k0l5bTOSJ_k0l5aTOTJ_k0l5aTOTJ_k0l5aTOTJ_k0l5aTOTJ_k0l5aTOSJ`k0n5_TORJak0n5_TORJbk0m5^TOSJbk0m5_TORJak0n5_TORJak0n5_TORJbk0m5^TOSJbk0m5^TOSJck0l5]TOSJdk0m5]TORJdk0m5\\TOSJdk0m5\\TOSJek0l5[TOTJfk0k5ZTOUJfk0k5[TOSJfk0m5ZTOSJgk0l5YTOTJgk0m5YTORJgk0n5YTORJhk0m5XTOSJhk0n5XTOQJhk0o5XTOQJik0o5VTOPJkk0P6UTOPJkk0Q6UTOnIlk0R6STOnImk0R6STOnInk0R6QTOnIPl0Q6PTOnIRl0Q6oSOnISl0Q6lSOoIVl0o5jSOPJXl0P6hSOoIYl0P6gSOPJZl0o5fSOQJ[l0n5fSOPJ\\l0P6cSOPJ^l0o5bSOQJ`l0n5_SORJcl0m5]SORJel0l5[SOSJhl0]63M2O2M101N2O1N3N2M5K5E]ROWJfm0g5[ROWJgm0h57N1O1O1O2N4K6K9G6I5L1N2O1N2N3N2M8H:Fb0^O7I4L4L3M3M3L6I:lNonNoNoUY`0"}}, {"image_id": 105, "category_id": 1, "bbox": [127.0, 818.0, 142.0, 176.0], "score": 0.9999558925628662, "association_id": 3, "light": [-1.9012290239334106, -1.6384541988372803, 1.942243218421936, 1.5120997428894043], "segmentation": {"size": [1145, 1565], "counts": "Vo^41gS1101O0O10000000000000001O0000000O1000000000000000000000000000000000000O1001O000000GKnlN5QS10klN0TS13jlNMTS15mlNJQS18olNHoR1;PmNEoR1\\M\\Ogo09kRO<^M[Oeo0XS14N1N2O2O0O1M3O1O1O1O100O100YmNQOcR1S100OO]mNnNcR1R1]mNnNbR1S12000O100O10000O1000000_mNkN^R1U1bmNkN^R1T1cmNlN]R1T1cmNlN]R1T1bmNmN^R1R1cmNnN]R1Q1dmNoN\\R1Q1cmNQO\\R1o0dmNQO\\R1n0emNRO[R1n0emNRO[R1m0emNTO[R1l0emNTO[R1l0emNTO[R1l0emNTO[R1l0emNTO[R1l0emNTO[R1l0emNTO[R1l0emNTO[R1k0fmNUOZR1k0fmNUOZR1k0fmNUOZR1l0emNTO[R1l0emNTO\\R1k0dmNUO\\R1k0dmNUO\\R1l0dmNSO]R1m0bmNTO]R1m0bmNSO^R1m0cmNRO]R1o0bmNQO_R1o0amNPO_R1P1amNPO_R1U11K`mNoN`R1Q1`mNoN`R1Q1`mNoN`R1Q1amNnN`R1Q1`mNoN`R1Q1_mNPOaR1P1_mNPOaR1o0`mNQOaR1n0^mNSObR1e0`mN\\ONObR1c0dmNZOK4aR1`0imN@XR1>imNBWR1=imNDWR1;jmNEVR1:kmNFVR19jmNGVR18kmNHUR17lmNIUR15lmNKTR15lmNKUR13lmNMVR10kmN0oR100O2O00001O1OPmXa1"}}, {"image_id": 106, "category_id": 1, "bbox": [89.0, 122.0, 121.0, 390.0], "score": 0.9999978542327881, "association_id": 4, "light": [-0.7210670113563538, -4.290132522583008, 0.6200842261314392, 4.18428897857666], "segmentation": {"size": [639, 735], "counts": "Yhg17_c0k0oNe0GdMA^2;dMEa25aMJd20_MNi2E\\M;g2ZObMe0l:01O1O1O001O1N10001N100O100O1O1N2L4N3N1O2L4OYTW:"}}, {"image_id": 106, "category_id": 1, "bbox": [263.0, 160.0, 159.0, 414.0], "score": 0.9999910593032837, "association_id": 3, "light": [-1.9736642837524414, -2.24381422996521, 1.8494497537612915, 2.091608762741089], "segmentation": {"size": [639, 735], "counts": "b\\T5i0cb0n0C[Nf7c9YH_F`7g9`H[FX7j9iHWFS7l9mHUFR7k9mHVFR7j9oHWFP7i9oHXFQ7h9nHZFP7f9QIZFo6f9PI[FP7d9QI]Fm6d9RI]Fn6b9SI^Fm6a9TI_Fl6X1lH_58ZIl6W1mHkMIT7=lIm6T1nHfM0W74QJn6R1oHeM0V72UJo6o0`Im4@TJP7o0aIn4\\OUJR7m0bIP5XOUJV7k0cIP5UOVJX7j0eIo4ROXJX7h0kIm4kN\\JZ7g0iIo4mNZJZ7g0hIP5nNYJZ7f0iIQ5mNYJZ7f0iIQ5lNZJ[7e0hIS5lNXJ\\7f0gIR5mNXJ]7f0dIS5oNWJ]7h0aIR5ROWJ\\7m0[Id6e6aITIa6m6`IdHm6\\7k2010bFdHW6\\7hIeHX6[7hIeH`4NTJ`7oN`Hd11Y50SJd7j8]HVGj7b6cHXID6l7Z6kHYIZO=l7V6UISIQOg0k7R6^IlHkNS1h7m5fIdHgN_1f7f5dJUJ`5a5jJ\\JX5\\5QK`JP5\\5TKdJl4X5XKgJh4V5[KkJd4n4dKRK[4d4oK\\KQ4:hG]2]4YMj37nG[2[4^Mh33RHm1FQMa4P1g3NYHm1DoL]4V1g3POfG=h0Y2CPMX4[1g3gNPH?e0Z2T4`Nj3POYH0nNh1Q5WOj3lN\\HNROl1g4ZOo3eNRIP2n2[O[6Q1VIoNo6l0RISOP7l0oHUOR7j0mHVOU7i0kHVOV7j0iHVOY7h0gHXOZ7h0eHXO\\7h0dHWO]7h0dHWO^7g0bHZO_7d0bH[Ob7a0^H_Oe7>\\HAe7>[HBg7:\\HEe77^HId7EmH:U7^ORIa0P7YOUIf0S=O001N2O2N001N101O1O001O0O100O100O2O0O1O101N101N100O2N2N2N2N2NmhR6"}}, {"image_id": 106, "category_id": 1, "bbox": [18.0, 140.0, 83.0, 290.0], "score": 0.9999992251396179, "association_id": 1, "light": [-2.751067638397217, -2.2769033908843994, 2.614375114440918, 2.0595803260803223], "segmentation": {"size": [639, 735], "counts": "Z^;c0Wc0;F8H8I5K5M4h^OVNT`0P2Y_OeN_`0c2J3L4K6K6PCXL`9k3]FVLb9P4UDWMLkNm;c6fC]IYB5oNTDeIo;U6TDkIn;P6UDPJn;j5UDVJm;g4mCPKb08d;a4VE_Kk:Z4\\EeKe:f3PFYLP:Z3^FeLc9n2jFQMX9b2TG\\Mo8CgDX1b2TO\\:a0kE^OX:=jECZ:7iEH\\:OiEOU?N1O2O1M3NUW[<"}}, {"image_id": 106, "category_id": 1, "bbox": [186.0, 114.0, 116.0, 366.0], "score": 0.9999990463256836, "association_id": 5, "light": [-1.558030605316162, -3.112318754196167, 1.5226482152938843, 2.919893980026245], "segmentation": {"size": [639, 735], "counts": "jZd3f0ob0`0C;]Oc0^Ob0_Oa0J5L5K5i_OaLe?o3L3M4L4M4J5J6K5K4K3O1O1PEdJ]7]5cHeJ[7[5eHfJX7]5gHeJU7^5kHbJS7_5nHaJR7_5mHbJR7^5oHbJQ7]5oHdJP7]5PIcJP7]5PIcJo6^5PIcJP7]5PIcJP7]5PIcJo6]5RIcJl6^5TIdJj6\\5WIdJh6]5WIdJi6\\5VIeJj6\\5TIeJm6[5`HXJfM>i9[5_HYJeM>k9\\5]HXJfM=l9^5\\HUJgM>l9`5\\HQJhM?k9b5kH^JU7c5iH^JW7d5gH]JY7e5dH[Jo5JUHP6g1VJS6LUHV6_1oI[6MUHZ6g0VImNc0V8NVHd6DUICO;;X8NUHP8BSHX8NUHo7AUHY8NUHn7BSHY80THm7CSHY80THm7CSHY81RHm7ERHY81QHo7FoGY83oGo7HnGY83oGP8GmGZ83PHY2JT2L`KZ83PHh1>b2WOdK[82PHd1d0d2QOgKZ81QHa1j0d2kNjK[81nG_1Q1c2gNmKZ83kG[1Z1b2aNPLZ85hGW1d1`2ZNTLZ85hGT1k1_2SNXL[80kGS1o1c2kMZL\\8LnGQ1Q2h2eM[L]8HQHc0`2S1\\MYOFYOd8^OnGd0f2o0fM]OROAh93bId0YN\\O^NMf93gI=dNWOPN9a96oID[LE_22fM?g9NoIDYOLRMb0o9CkIIYOOmLf0T:ZOkIMXO1iLh0hb000O10O10000O1O1000000O101N1O1O10001N100O100O2O000O1O1001O000N2BX]ODjb03f0N1M4H[\\O0]\\^8"}}, {"image_id": 106, "category_id": 1, "bbox": [523.0, 149.0, 180.0, 366.0], "score": 0.7850414514541626, "association_id": 2, "light": [-2.066526412963867, -2.8742430210113525, 2.0345473289489746, 2.73620343208313], "segmentation": {"size": [639, 735], "counts": "dfV:3jc03N2m\\OI[b09`]OM^b03a]O0]b00d]ON^b0Oe]OOaa0Oc^O0ONd`0n0]_OROYa0T1d05L4M3M3L4M3L5L3N[1dN=e_O`L_?V4I7J8F9F7J5K4L5_O`0M4K3M4H8F:M3M3O1O001O00001N1O1N2O1N2M3N210O10O0100O1M4K6K5J5J7SOYGXFm8f9VGTFP9h9h0L5K5K2M3N2N1O2M3N3M3M1O2N1O1O1N2O1O1O1O1O1O001O01O0000000O1000001O000O101M3J6TOl0J;F9I5K5J4L4I7]Oc0G9H7_Ob0L301ROSCgJn]3PCULQO>R>Y3VCgLlh0UBXOW>0TB1m`0000O10000000000000O2O00001N101O001N100O2N2Nebc0"}}, {"image_id": 106, "category_id": 1, "bbox": [377.0, 138.0, 204.0, 351.0], "score": 0.9411299228668213, "association_id": 6, "light": [-2.462404727935791, -2.0584676265716553, 2.392778158187866, 1.955246925354004], "segmentation": {"size": [639, 735], "counts": "fb[71c03bb05S]O2d>HWEl0f:VOXEm0e:TOZEo0c:SO\\En0c:SO[EP1a:TO\\EP1_:WO[El0`:_OWEc0g:ASEc0l:]OVE>m:CSE8P;IRE3P;MQE0Q;1PEKQ;6PEHQ;8QEDQ;=aCkNYOi0V=<`C]OfN:k=8^CJXN3Y>5\\CS1dL@]5m9WKeF_OB0n0Y5k8YKdF^ODNn0\\5h8ZKfFZOFOm0\\5g8]KdFXOHOm0\\5g8_KbFUOLNm0^5d8`KcFSOLNO18^5Z9bK^FTO2JN28^5Z9cKYFXO6EO27_5[9cKTF\\O:@025a5]9bKnEAT1\\O@b5^9\\LSGQN]Oe5`9[LRGPN\\Og5b9YLRGoMYOl5e9VLQGoMXOm5f9TL\\FnM241d5a9ZL[FoM254_5_9^LZFoM159[5\\9aLYFPN15>V5X9eLYFPN15d0P5R9lLWFQN14m0h4k8SMVFRN23n0g4j8UMRFVN3OQ1f4j8WMmEYN5KS1f4k8jMQF`MQ1i4n8iMnE`Mo0j4T9WNjFk1V9UNhFm1X9SNfFn1[9RNcFP2^9oM`FQ2b9PN\\Fk1k9TNTFd1V:eKWEm1c0T2a:iKTEP2:n1i;PNWDm1m;RNSDm1o;SNPDk1To1ZAQNW?\\1k@dN\\?S1f@mNb?f0c@[Od?7b@Ija00000000001O01O01O1O1O2N0010O01O001O1O1O000000001O01O0001O010O001O1O1O001O00g\\O_OUc0`0j\\OAVc0`0h\\OAYc0c01^Of\\OM1:ec0H\\\\ONfc00ado2"}}, {"image_id": 106, "category_id": 1, "bbox": [679.0, 158.0, 48.0, 228.0], "score": 0.9634349346160889, "association_id": 7, "light": [-0.7862544655799866, -3.927856922149658, 0.553732693195343, 3.791858434677124], "segmentation": {"size": [639, 735], "counts": "alW=l02[Oab0X1J8H4K6L4K4L3TBQNg9Q2PFYNiL[Ol<^2oEcNSMPOm<`2gEhNYMiNP=c2]EPOc:P2SDZNm;m1jCUNV"}}, {"image_id": 108, "category_id": 1, "bbox": [325.0, 156.0, 208.0, 282.0], "score": 0.9999990463256836, "association_id": 3, "light": [-1.7725043296813965, -1.6201351881027222, 1.6100480556488037, 1.452576994895935], "segmentation": {"size": [768, 1024], "counts": "aQd71ng02O1O2N1N4M3M4L1O0000000001O01O000000000001O00000000000010O00O1000001O000000001O000O101O0000000O2O00000000000O2O00000O2O0O2N][2NddM6K6I3N2N2M3M2N2O2N1000001O0O1O1O1M3M3O1O000O1O1O1O01N3MPMTOP_Oi0Ra0]Oj^Oa0Xa0Be^O>[a0Cc^O>^a0B`^O>aa0C^^O;ea0D[^O;fa0FY^O9ha0HW^O9ga0IW^O9ga0IU^O:ja0GT^OSb0Bj]O`0Wb0@f]Ob0[b0]Od]Oe0\\b0[Od]Oe0[b0\\Od]Oe0\\b0[Oc]Od0_b0]O]]Od0eb0\\OZ]Od0gb0]OX]Oc0hb0^OV]Od0hb0^OV]Od0gb0_OV]Oc0ib0@R]Od0lb0^OR]Oc0nb0_Oo\\Ob0Pc0Bj\\O`0Sc0W2iMnK_@U4_?TLY@n3e?XLV@i3i?ZLS@h3m?[Ln_Of3S`0]Lg_Oe3Z`0]Lc_Oc3^`0`L^_O`3d`0bLY_O^3h`0fLR_O\\3n`0hLg^O^3Za0c11N2N2N2N2O1O1O1N2N2N2O1O100O1O1O1O2O000O2O002N7iJd]O\\4Wc0I2M2O_\\O^Leb0a3Z]OdLbb0\\3^]OhL_b0`4M2O0O00001O2N2M2O0O2O3L2O1OTNU^ObMla0P2b^OPN^a0f1l^O[NSa0a1Q_OQO]`0k0g_OTOY`0i0k_OVOU`0g0m_OYOU`0b0o_O^OT`0;P@ER`05S@Jn?0Z@Mj?K^@0i?E`@6jc0K3M3M3M4L4L4L3M2N3L8H7I5Kej_;"}}, {"image_id": 108, "category_id": 1, "bbox": [434.0, 197.0, 413.0, 331.0], "score": 0.9477934837341309, "association_id": 2, "light": [-2.358762502670288, -1.9423885345458984, 2.3071320056915283, 1.8939151763916016], "segmentation": {"size": [768, 1024], "counts": "mmU:1og0001N101O1O00001O0000000000000000001O0000000000000000001O0001O0001O00001O0001O0000000001O01O000000000001O01O000001O0001O0000001O01O000001O00000000000000000000001O00000000000000000000000000nI5PDJSb0OYJMcC3U<8iCGn;Of^O8n4HVK0Ta04g^O4l4KYKLRa09d^O4P5GZKLj`0?T_OEk41b;U1f_OgNi44Y;]1WEcNg:^1ZEbNd:`1gA^N^12jnNR4\\OTOl02W2?_QLZ8Y5fGgJZ8Y5gGgJX8X5iGhJW8W5jGiJV8V5lGiJT8V5mGjJS8V5mGiJT8V5nGiJR8W5oGhJQ8X5QHeJP8[5SH`Jo7`5c1O2O1N3NRF`Jl8Z5QGmJP9n4oFWKV9a4iF`Kc9U4ZFnKh9P4TFSLn9l3lEYLU:i3eEZL]:o40O2O0O001O1N3L4M3L3N101O0O10001N3M3L4L4L3N2N4J<]M]2I6K5K6I`0XOVa[5"}}, {"image_id": 110, "category_id": 1, "bbox": [462.0, 4.0, 167.0, 94.0], "score": 0.9937086701393127, "association_id": 2, "light": [-2.3981189727783203, -1.7403916120529175, 2.258676528930664, 1.5717086791992188], "segmentation": {"size": [640, 640], "counts": "njP91oc00O1000000000000000000000000O100000000000000000000000000O1000001O000000000O10001O000000001O00000O10000000000000000000000000000\\M3UAMk>5SAKm>5SAKm>5SAKm>5SAKm>5SAKm>6RAJn>:n@FR?`0h@@W?b0h@^OX?c0S@[OXO2e`0d0m_OB[OJh`0j0e_O@AFj`0m0\\_ODI_Ok`0V2T_OjMl`0W2S_OiMm`0X2R_OhMn`0Y2Q_OgMo`0Y2Q_OgMo`0Z2P_OfMPa0Z2P_OfMPa0[2o^OeMQa0[2o^OeMQa0e2000000000000000000000000000000000000000000000O10000000000Gn^OdMRa0[2o^OeMQa0[2o^OeMQa0[2o^OeMRa0Z2n^OfMRa0Z2n^OfMRa0Z2n^OfMRa0[2m^OeMSa0[2m^OdMTa0d2000000001O0Lk^O]MUa0g20Ml^OZMTa0f2301O01O0001O0000001O001O1O1O2N2N10O000100O2N1O000O2O0O2O1N3L3M:DPk6"}}, {"image_id": 110, "category_id": 1, "bbox": [10.0, 426.0, 458.0, 209.0], "score": 0.9999998211860657, "association_id": 1, "light": [-2.568974494934082, -1.4551295042037964, 2.5061392784118652, 1.2820651531219482], "segmentation": {"size": [640, 640], "counts": "Xj6a0_c01N100O2O000000001O001N101O1O0000001O000000001O00001O001O001O00000000001O000000001O001O1O00001O0000000000001O00001O000000001O0000000000001O0000001O000000000000001O0000000000001O00000000000000000000000000001O00000000000000000000000000001O0000000001O00000000000001O00000001O000000000000001O000000001O01`KjNTFV1i9oNUFQ1j9ROTFn0j9UOUFk0k9VOTFj0k9WOVFh0i9ZOVFf0j9ZOVFf0i9\\OVFd0i9^OVFb0j9_OUFa0j9BnBAP2m0Q;DiBHR2d0T;FhBIS2`0T;IfBJU2=U;JdBJW2V3PBjLR>T3nAlLS>S3mAmLT>S3kAmLU>S3kAmLV>R3kAmLU>S3kAmLU>S3kAmLV>R3jAnLV>R3kAmLU>S3kAmLU>R3lAnLT>R3lAnLT>R3lAnLT>R3lAnLT>R3mAmLS>S3mAmLS>S3mAmLS>S3mAmLS>S3mAmLT>R3lAnLT>R3mAmLT>R3lAnLT>Q3mAoLT>P3lAPMU>o2kAQMV>n2jARMV>m2kATMU>k2kAUMU>k2kAUMV>j2jAVMV>j2kAUMU>k2kAUMU>k2kAUMU>l2jATMV>m2iASMW>m2iASMW>n2iAQMX>o2hA[LBK3:c>a3hAWLA601g>b3kAaL]OLh>d3hAlLX>U3fAkL[>V3cAkL^>U3`AlL`>U3^AlLc>U3ZAlLg>U3UAmLl>S41O001O001O001O001O001O1O1O1O001O00001O001O001O1O1_N\\AdMe>Y2cAaM^>\\2dAdM]>Z2cAgM]>X2dAhM]>V2dAjM\\>V2dAjM]>T2dAlM\\>T2dAmM\\>R2cAoM^>o1cAQN^>n1bARN^>n1bARN_>l1bATN^>l1bATN^>l1bATN_>k1aAUN_>j1bAWN^>h1cAWN]>i1cAWN]>i1cAWN^>h1bAYN^>f1cAYN^>g1aAYN`>f1`AZN`>f1`AZNa>e1_A\\N`>d1aA[N_>e1aA[N`>d1`A\\N`>d1`A\\N`>d1`A\\Na>c1_A^N`>b1`A^Na>a1_A_Nb>`1_A_Na>a1_A_Nb>`1^A`Nc>`1\\A`Ne>_1[AbNd>^1\\AbNd>^1\\AbNe>]1[AcNe>]1[AcNe>]1\\AbNe>]1[AcNe>]1[AcNf>\\1ZAdNf>\\1ZAdNg>[1YAeNh>Z1XAfNi>Y1WAgNi>Y1WAgNj>X1VAhNj>X1VAhNk>W1UAiNk>W1UAiNk>W1UAiNl>V1TAjNl>V1TAjNm>U1SAkNn>T1SAkNn>T1RAlNn>T1RAlNo>S1QAmNP?R1PAnNP?R1QAmNP?R1PAnNP?R1PAmNR?R1n@nNR?R1n@nNS?Q1n@nNT?P1l@POU?o0k@QOV?n0j@ROV?n0j@ROW?m0j@ROV?n0j@QOX?m0j@ROV?o0i@QOW?o0k@mNX?R1k101O001O1O1O001O000000010O0001O001O001O1O01O0001O01O000010O01O1O00001O0000001O01O000001O0000001O010O00100O0010O010O0001O00001O00001O001O001O1O1N2O1N2O2M2N3M2O1N2N2NYnZ3"}}, {"image_id": 110, "category_id": 1, "bbox": [73.0, 214.0, 282.0, 135.0], "score": 0.9960300922393799, "association_id": 3, "light": [-2.6936357021331787, -0.7546097040176392, 2.6039159297943115, 0.6130751371383667], "segmentation": {"size": [640, 640], "counts": "`n]12mc02O1O0O100000000000000000000000001O000000000000000000000000000000001O00000000001O00000000000000001O00000000000000000O1000001O00000000000000000000000000001O000000000000000000000001O000000000000000000000000000000000000000001O000001O0000000000000000000000000000000000001O00000000000001[M3UAMm=He@a0[1Gm=Oc@>]1Co=1b@>^1Ao=3a@>_1_OP>4_@`0_1\\OQ>e1kA[NT>i1iAWNW>j1hAVNW>l1hATNX>l1hATNX>m1hARNX>P2fAPNZ>U2aAkM_>V2`AjM`>W2_AiMa>W2_AiMb>W2]AiMc>X2\\AhMe>Y2ZAfMg>[2WAeMj>[2UAeMk>\\2TAdMm>\\2RAdMo>[2QAeMQ?Z2n@fMS?Z2l@fMU?Z2j@fMW?Z2h@fMY?Z2f@fM\\?X2e@gM`?U2_@kMd?S2[@mMg?R2m_OjMG4]`0R2i_OmMI1_`0S2f_OmMJ0``0T2d_OmMLOa`0f2^_OZMc`0e2]_O[Md`0d2\\_O\\Me`0c2[_O]Mf`0c2Y_O]Mh`0b2X_O^Mi`0b2V_O^Mk`0a2V_O^Ml`0a2S_O_Mn`0`2R_O`Mn`0i21O001O2N1O001O001O2N001O1O001Eh^OlMYa0k1o^OUNRa0g1Q_OYNPa0d1R_O\\No`0c1Q_O]No`0b1R_O^No`0`1R_O`No`0^1S_OaNn`0]1S_OcNn`0[1S_OeNn`0Z1R_OfNn`0Y1S_OgNn`0X1R_OhNo`0W1Q_OiNQa0U1o^OkNRa0T1n^OlNSa0S1m^OmNTa0R1l^OnNUa0R1j^OnNVa0R1j^OnNWa0Q1i^OoNXa0P1h^OPOYa0P1f^OPOZa0P1f^OPO[a0o0f^OPO[a0o0e^OQO]a0n0b^ORO`a0m0_^OSOba0m0]^OSOda0l0\\^OTOda0m0[^OSOfa0l0Z^OTOga0k0Y^OUOia0i0W^OWOla0f0T^OZOna0d0R^O\\Ona0e0Q^O[OPb0d0P^O\\OQb0c0o]O]ORb0b0n]O^OTb0`0l]O@Ub0?k]OAVb0>j]OBWb0>h]OBYb0=g]ODZb0:f]OF[b09e]OG]b07d]OH]b08b]OH^b08b]OH_b08`]OH`b08`]OHab08^]OHcb08\\]OHeb08Z]OHgb09W]OFjb0;U]OElb0;S]OEnb0;Q]OEQc0;m\\OETc0;k\\OEUc0h\\OAZc0>f\\OBZc0>5O10O01O001N101N101N3M3M`ia5"}}, {"image_id": 111, "category_id": 1, "bbox": [112.0, 284.0, 247.0, 316.0], "score": 0.9999499320983887, "association_id": 1, "light": [-2.1159300804138184, -1.7760145664215088, 2.085092544555664, 1.6663285493850708], "segmentation": {"size": [640, 418], "counts": "X]V27ic01N101O1O1N3Z]OOYa02e^O0Za00e^O2Za0Oe^O2Za0Ne^O4Za0Md^O5[a0Kc^OU2l@QNT?U2b@oM_?Y3?@g0YOK6eNZ1H8K6L3K4J7J5L5K4O101O0000O1O0O2O00001O2O00cMaJZF^5g9hJSFW5n9PKjEo4Y:TKcEk4^:XK^Eh4c:[KYEf4h:\\KUEd4l:]KREc4o:_KnDa4S;bKhD^4Z;eKaD\\4`;hKZDX4h;o1001O1O1O1N2O1O1O1NgCaHU<^7kCdHT<\\7kCfHTj3dAVL]>j3dASL]>m3dAPL^>Q4nA[KY>e4a00010O01O001N2O2N1O1O1O00001O01O0000000000001O001O0O101O1O1N2N1O2N2N2N1O2O1N3gL]@Q2g?cMh@U2j`0H6I3N2M2O1N2N3N3L4K5K4M2M3M4K=^Od\\T1"}}, {"image_id": 111, "category_id": 1, "bbox": [261.0, 0.0, 143.0, 166.0], "score": 0.9999996423721313, "association_id": 2, "light": [-1.456679344177246, -2.1222362518310547, 1.321978211402893, 1.9714711904525757], "segmentation": {"size": [640, 418], "counts": "TXS51nc02O1O001N10001O00001O001O00001O000000001O010O1O3M10O01O0010O0001O01O01O00001O000010O0001O001O001O010O00001O00010O1O001O0010O0000aNJT_O6_`0o0h^OnNM]OYa0c2N5K4M4L2QN_M[Bf2c=bMTB`2l=gMkA[2T>i10000000000000O1000000O1O100O100O10000O1O1O1N2O1O1N2N2N2N2I7N2N2F:M3M3J6L4N2L4J6N2G9B>L4O1O100O2O0O11000O20O1O1O10b0_O1N03K>C6I9G9G2M6Ji0TOZe8"}}, {"image_id": 112, "category_id": 1, "bbox": [280.0, 833.0, 279.0, 142.0], "score": 0.9999976754188538, "association_id": 2, "light": [-2.5709924697875977, -2.166045904159546, 2.4933228492736816, 2.04335355758667], "segmentation": {"size": [1372, 2047], "counts": "XRh;;^Z1>C6I4L5I7I6G9M2oNWNlhNm1SW1UNfhNP2YW1RNZhNH5W2aW1YN\\hNi1bW1YN\\hNh1`W1]N^hNd1`W1n0M2N2N2N3N1O100O1N2O1O1O2N1O100O100O10000O1O1O1O100O011O0O10000000000O1000000O10000O10000O1000000O1000000000000000000000000000000000000000000000000000001O000000000000000000O1000000O100000000O10000O1O100001O00L_iNmKaV1S4_iNnK`V1R4`iNnK`V1W4000001O00001O00000000000000000001O000000000O101O001O00001O00000O10001O00000000001O0O1GYiN]LhV1k3001O001O001O00000O101O00002N2_OohNSM`W1e0`hN7>TOoY10O010000000O01000000000000O100000000O10000000O10O1000000000000O1000000000000O10000000000O100000000O100000000000000O100000000O100000000000000000000000000O1000000000000000000000000O10000O100O10WhXn1"}}, {"image_id": 112, "category_id": 1, "bbox": [579.0, 152.0, 1398.0, 1217.0], "score": 0.9999426603317261, "association_id": 1, "light": [-2.7585465908050537, -1.544111967086792, 2.666482448577881, 1.3671910762786865], "segmentation": {"size": [1372, 2047], "counts": "Y`Xh0k0[Y1l0EC>A>A?B>B?QK^JmSOP6ek0iKcROb4Qm0TLZROU4\\m0`L^QO\\4Xn0Z4G9H7I8L3L5L3M3L4M3M3M3M2N3M3M5K5K5K5K5L4K4L5K5K6K3L3M3M4L3M4K5L4L4L4K5L5QWOh_OPg0^`0`XOS@Yg0S`0WXO_@bg0da0H9F:FP1QOQ1nN?B=CT1RX1S4ZgNnJc0o0SX1a4lgN_KUX1a4jgN_KWX1a4hgN_KYX1b4egN^K\\X1b4cgN^K_X1b4`gN\\KbX1e4\\gN[KfX1h4UgNXKUY1b4gfN^KfY1W4XfNiKkY1U4TfNjKoY1V4oeNjKSZ1U4leNkKVZ1W51O001N2O001O001O001O1O1O1N3N2N3M1O2N1O2N0O2O1O001O0O2O001O1O1O1O1O1N2O1O001^MedNL\\[1MmdN0S[1LTeN1mZ1LXeN1hZ1M[eN2eZ1L_eN2bZ1JbeNlNmN`0b[1b0eeNhNmNf0_[1?heNdNnNm0Z[1=leN_NnNU1W[18_fNHbY1JkfN6UY1FofN:RY1ARgN?oX1iNggNX1h[11O1O1O1O1O01000O10000000000000O1000000000000000000000000000000O1000000000000000000O1000000O100000000O100000000000000O1000000000000000000O10000000000O10000000000000000O100000001O0000000000000000000O10001O000000000O10000000001O0O100000000000001O000O100000001O00000O10001O00000000000O10000000000O1000000000000O1000000000000000000000000O10000000001O0000000O100000000000000O100000000O1000000O10000O10001N100O2N2N5IoYdm1"}}, {"image_id": 113, "category_id": 1, "bbox": [1000.0, 556.0, 1039.0, 957.0], "score": 1.0, "association_id": 3, "light": [-1.625296950340271, -2.278841733932495, 1.5809178352355957, 2.0611679553985596], "segmentation": {"size": [1553, 2048], "counts": "a]]_13]`14K5L4K6J5K6J7H8I4K4L5K4K5L4M3L4M3M3M3M3N1N3N2N1O2N1O2M2O2N1O2M2O2L3L5K4L5K5J6SMYLihNl3kV1hLehNa3XW1jLngNh3PX1^2N2N2N2N3M2N2O1N2N2O1N001O1O001O001O00001N10001O001N10001O0O2M2O2M2O2M2O2O1O0O2O1O001N2O001N2O1N101O1O1O010O1O10O01O100O010O100O1O10O0100O100O100O100O10O0100O100O100O100O1000O0100O1000000O1000000O1000000O1000000O10000O1000000O10000001O001O0010O0001O001O00001O0000001O0000001O0000001O00O101O00000000001O00000000001O000O10001O000000001O001O00100O1O1O1O2O0O2N2N3M2N3N1N3M2N2N2N2N2O1N2N1O2N2N1O1O2N2N2N2N2N3M3M3M3M5K8H=C=C6J5K5K4L4L4L3M2N1O2N100O1O1O2N1O2N1O2N2N2N2N3M2N3N4K4L5K4L3M3M3M3M3M3M3M3M3M3M3M4L3M4L;Ek0UO4M3L5K5K5K6J3M3M2N2N2N2N1oXOS\\O\\a0oc0`^OU\\O^a0lc0`^OV\\O_a0lc0]^OW\\Oba0jc0\\^OX\\Oca0ic0[^OY\\Oda0hc0Z^OZ\\Oea0gc0Y^O[\\Ofa0gc0V^O[\\Oja0fc0T^O[\\Ola0gc0Q^O[\\Ona0fc0o]O\\\\OQb0fc0l]O\\\\OSb0fc0i]O\\\\OWb0gc0d]O[\\O\\b0hc0_]O[\\O`b0gc0[]O\\\\Oeb0gc0U]O\\\\Okb0gc0o\\O]\\OPc0fc0i\\O^\\OWc0ec0b\\O_\\O^c0dc0\\\\O_\\Odc0dc0V\\O`\\Oic0cc0Q\\O`\\Ooc0cc0k[O`\\OUd0ec0d[O]\\O\\d0hc0\\[O\\\\Ocd0hc0W[OZ\\Oid0jc0Q[OX\\Ood0kc0lZOW\\OTe0lc0fZOX\\OZe0jc0WZOb\\Oie0ac0iYOj\\OWf0Wc0cYOn\\O]f0cf000000000000000000000O10000000000000000000000000000000O10000O1000000`LdZOj[O]e0Td0jZOg[OVe0Wd0P[Oe[OPe0Yd0W[Oa[Ojd0^d0\\[O][Odd0ad0c[OZ[O]d0ed0h[OV[OYd0hd0m[OT[OSd0U`0dYOQC]2fLPd0V`0iYOPC[2gLlc0V`0oYOoBX2iLic0U`0UZOnBV2iLfc0V`0YZOnBT2jLcc0V`0^ZOlBR2kLac0W`0aZOkBP2mL_c0V`0eZOkBn1lL^c0X`0fZOjBn1mL\\c0W`0jZOiBm1mLZc0X`0mZOhBk1nLYc0X`0P[OgBj1nLWc0Y`0S[OfBh1oLVc0Y`0W[OcBg1PMTc0[`0Z[OaBdh0^=aWO]B`h0a=fWOYB\\h0f=jWOPB[h0n=lWOgAZh0X>mWO\\AYh0c>UXOi@Rh0V?cXOo_Odg0P`0_4O1O00100O1O100O1O100O100O11O0000001O000000001O000000001N10000000001O00000000001O1O0O2O1O1O1O1O1O1N3N1O2N2N2N2oXO]_Oo=f`0Q]O\\_Oe08Xb0^`0o\\Of_O84hb0W`0m\\OP@K2Vc0P`0k\\OW@B0bc0j?i\\O[@_OOgc0g?g\\O_@]OMjc0f?g\\O`@[OMmc0d?f\\Ob@XONQd0a?d\\Oe@XOLSd0`?c\\Og@VOKWd0_?a\\Oi@TOKZd0\\?a\\Ol@QOJ]d0\\?_\\On@POHad0[?]\\OPAnNGed0Z?Z\\OSAlNFjd0Y?W\\OUAiNEPe0W?T\\OYAfNDUe0T?R\\OkDnc0W;m[OlDSd0V;e[OPEZd0S;[[OVEed0l:oZO^EQe0Qc001O00000O100000001O0O1000000000000000000000000000000000000000000000000000000001O0O2O0O2O0O2O0O2N1O2O0O2dM_YOeZObf0Qc0b\\OT\\O`c0Qb0f^Ob]O\\a0oa0Z_Oh]Og`0ma0j_Ok]OY`0Qb0P@h]OQ`0Vb0V@c]Om?Zb0V7N3N1O2N2N1O2N1O1O2M2O1O2M2O1N3M2M3N3I6J6J7J5J6L4N3M2N2O2M2O1O2M2O3MR1nN2N3L3N2M4L3M4L3L5F9_Ob0WOh0[Of0K5J5M^ROQEhe0j:SZO_Ene0]:PZOhEPf0U:QZOlEQf0P:PZORFQf0k9oYOVFSf0f9nYO\\FRf0b9nYO`FSf0]9lYOeFUf0X9lYOjFTf0T9lYOnFUf0o8kYOSGUf0k8kYOWGUf0f8lYO\\GUf0`8mYOaGTf0[8mYOfGTf0V8nYOlGSf0o7PZORHQf0j7PZOWHRf0c7RZO^Hoe0]7TZOcHne0W7VZOiHme0P7WZOQIke0h6YZOXIje0b6YZO^Ije0]6XZOdIje0W6WZOjIle0R6UZOoIme0l5UZOTJne0h5SZOXJQf0c5PZO^JRf0^5oYObJTf0Z5mYOgJVf0T5kYOlJWf0Q5jYOPKVf0n4kYORKVf0l4kYOUKUf0j4kYOVKVf0h4kYOYKVf0d4kYO\\KVf0b4kYO_KVf0^4kYObKWf0Z4kYOgKVf0V4kYOjKWf0R4kYOoKVf0n3kYORLXf0i3jYOWLYf0c3jYO^LXf0Z3mYOfLWf0o2PZOQMVf0c2PZO^MfK[N^d0l3Q@iM`K]Ncd0_3S@TNYK`Nfd0S3V@^NRKaNld0g2W@hNlJcNod0]2Z@QOdJeNUe0Q2\\@[O]JgN[e0d1[@FXJiNae0X1[@0QJkNge0n0[@8lIkNme0e0[@a0fIlNRf07`@n0\\IlNXf0Gf@_1PIkN^f0WOm@n1eHlNSS1U1klNlNTS1V1jlNkNVS1U1jlNkNVS1V1hlNlNWS1T1hlNmNXS1S1hlNmNYS1S1elNnN[S1R1dlNnN^S1R1`lNoN`S1R1_lNnNaS1R1^lNoNbS1R1]lNnNdS1R1ZlNoNfS1R1XlNoNhS1Q1XlNoNhS1R1WlNnNjS1R1TlNoNlS1Q1TlNoNlS1R1RlNoNnS1Q1RlNoNoS1P1QlNPOoS1Q1PlNoNPT1Q1okNPOQT1P1okNPORT1o0nkNPOST1Q1lkNoNUT1P1jkNQOVT1o0jkNQOVT1P1ikNPOXT1o0gkNROZT1m0fkNSOZT1n0ekNRO]T1l0bkNUO`T1i0`kNVOcT1i0[kNXOgT1f0YkNZOhT1f0VkN[OkT1d0UkN\\OlT1d0SkN\\OnT1c0RkN]OnT1d0QkN[OQU1e0mjN\\OSU1d0mjN\\OTU1d0kjN\\OUU1e0jjN[OVU1f0ijNZOXU1f0fjNZO[U1f0ejNZO[U1g0djNYO\\U1h0cjNXO^U1h0ajNXO_U1h0ajNXO_U1i0`jNWO`U1j0_jNUObU1l0]jNTOcU1m0egNoMb1T1hV1P1_gNVNe1i0lV1S1YgNZNi1c0nV1U1RgN^No1=oV1^2ohNbMQW1_2nhN`MSW1a2mhN^MSW1d2khN\\MUW1e2jhN[MUW1g2jhNYMVW1h2jhNWMVW1j2ihNVMWW1j2ihNVMWW1k2hhNUMWW1m2hhNRMYW1n2ghNRMXW1P3hhNoLWW1R3ihNnLVW1T3ihNlLVW1V3ihNjLVW1W3jhNiLVW1X3ihNhLVW1Z3ihNeLWW1]3hhNcLWW1_3hhNaLXW1`3ghN`LXW1a3hhN_LWW1c3hhN]LXW1c3hhN]LWW1d3ihN\\LVW1f3ihNZLWW1f3ihNYLWW1h3ihNXLVW1i3jhNWLVW1j3hhNWLWW1j3ihNVLWW1j3ihNVLVW1k3jhNULVW1k3ihNVLWW1k3hhNULWW1l3ihNTLWW1l3ihNSLXW1m3hhNSLWW1n3hhNSLXW1n3ghNRLXW1o3hhNQLXW1o3hhNQLXW1o3hhNQLWW1Q4hhNnKXW1S4hhNmKXW1S4hhNmKWW1U4hhNjKXW1W4hhNiKXW1X4ghNhKXW1Z4ghNeKYW1\\4ghNdKYW1]4fhNbK[W1_4dhNaK[W1`4ehN_K\\W1b4chN^K]W1b4chN]K]W1e4bhN[K^W1e4bhN[K^W1f4ahNZK_W1f4ahNZK_W1g4`hNXKaW1h4_hNXKaW1i4^hNWKbW1i4^hNWKbW1j4^hNUKbW1l4]hNTKcW1l4]hNTKcW1m4\\hNRKeW1o4ZhNQKfW1o4ZhNQKfW1P5YhNPKgW1Q5YhNnJgW1R5YhNnJgW1S5XhNlJiW1T5XhNkJgW1W5YhNhJgW1X5YhNgJhW1Y5YhNfJgW1[5YhNcJhW1]5XhNcJhW1]5YhNbJgW1_5YhN_JhW1a5YhN^JgW1b5YhN]JhW1d5XhN[JhW1e5YhNZJgW1f5YhNYJhW1g5YhNXJgW1i5YhNTJiW1l5^100001O00001O00001O001O001O1O002N1O1O100O2N1O1O1O1O1O001O001O00100O1O1Ob0^O5K1O100O1O00100O001O001O1O00100O1O001O1O001O001O001O001N2O001O1N2O2N1O1N2O1O001O1O1N101O1O2N1O1O1O1O2N1O1O1O1O001O1O001O0000001O0000001O00000000001O0000001O001O01O01O001O001O01O01O0001O001O1O1O001O10O01O1O001O001O001O001O001O001O1O1O1O1O00100O1O1O1O001O001O001O001O000eHShNR6nW1lI^hNi5bW1UJbhNi5_W1UJdhNi5\\W1UJhhNi5XW1VJkhNh5VW1VJlhNi5TW1VJohNh5QW1WJQiNh5oV1lI^iNS6cV1kI_iNT6aV1kIaiNT6_V1kIdiNS6]V1kIeiNT6[V1kIgiNT6YV1kIjiNS6WV1kIkiNT6UV1lImiNR6SV1mIoiNR6RV1lIQjNR6oU1nISjNP6mU1oIUjNP6kU1PJVjNo5VX101O00001O001O00001O0O101O001O00001O000O2O001O0O2O001N2O2N5J6K4J8I5J8Hi0WO;D`0\\OnX<"}}, {"image_id": 113, "category_id": 1, "bbox": [580.0, 503.0, 251.0, 175.0], "score": 0.9839528203010559, "association_id": 2, "light": [-1.2959157228469849, -2.1402437686920166, 1.2163035869598389, 2.0156610012054443], "segmentation": {"size": [1553, 2048], "counts": "cT`k0g0X_1e0K4L3O1O0O2O1O0O2O00001O001O1O00001O001O00000000001O0000001O000000000000001O0000001O00001O00001O00001O001O0TdNUNRY1l1ffN\\NYY1d1dfN`N[Y1a1bfNbNSNWOU[1X2ffNbNUNWOT[1X2efNaNWNYOS[1W2]fNhN_NROT[1W2ZfNiNbNoNU[1Z2UfNiNeNnNV[1Z2RfNjNhNlNV[1[2neNlNkNjNW[1[2keNlNnNjNW[1[2ieNTOWZ1l0heNUOXZ1l0feNVOYZ1l0deNUO\\Z1n0_eNdN^OPOS[1c2ndN_N6oNlZ1o3ZeNQLfZ1n3[eNRLeZ1m3[eNTLeZ1k3\\eNULdZ1k3\\eNULdZ1j3^eNULbZ1i3`eNWL`Z1f3ceNZL]Z1b3heN]LXZ1a3jeN_LVZ1_3leNaLTZ1^3meNbLSZ1]3neNcLRZ1\\3oeNeLPZ1Z3QfNfLoY1Y3RfNgLnY1W3UfNhLkY1W3VfNiLjY1V3WfNjLiY1U3XfNkLhY1T3ZfNkLfY1U3ZfNkLfY1U3ZfNkLfY1T3[fNlLeY1T3\\fNkLdY1U3\\fNkLdY1U3\\fNkLdY1U3\\fNkLdY1U3]fNjLcY1V3]fNjLcY1V3]fNjLcY1V3]fNjLcY1V3]fNjLcY1V3]fNjLcY1V3]fNjLcY1W3\\fNiLdY1W3]fNhLcY1X3\\fNiLdY1W3\\fNiLdY1W3\\fNiLdY1X3[fNhLeY1X3[fNhLeY1Y3ZfNgLfY1Z3YfNfLgY1[3XfNeLhY1]3VfNbLkY1a3RfN_LnY1c3PfN]LPZ1e3oeNZLQZ1g3ndNULh04ZZ1h3kdNWLj01[Z1Q4deNoK\\Z1R4deNmK\\Z1U4ndNhK<3fZ1`4XeN_KhZ1d4UeN\\KkZ1g4TeNVKmZ1l4QeNSKP[1m4:O1PO`dNmLb[1m2ldNbL][1X3Q1L4O1O1O1O1O1O1O100O1O10000O1000000001O00000000000gdNnLSY1S3lfNnLTY1R3jfNoLVY1R3ifNnLWY1R3ifNoLVY1R3ifNnLWY1R3hfNoLXY1R3gfNoLXY1Q3hfNoLXY1Q3hfNoLYY1P3gfNPMYY1P3gfNPMYY1P3gfNQMXY1o2gfNRMZY1m2ffNSMZY1n2efNRM[Y1n2efNRM[Y1n2efNRM[Y1m2ffNSM[Y1l2efNTM[Y1l2efNUMZY1k2ffNUMZY1k2ffNUMZY1k2efNVM[Y1j2efNVM[Y1j2efNVM[Y1j2efNVM[Y1j2efNVM[Y1i2ffNWMZY1i2gfNUMZY1k2ffNUMZY1k2ffNUMZY1j2gfNVMYY1j2hfNUMYY1i2hfNVMYY1k2gfNTMYY1l2gfNSMZY1n2efNRM[Y1n2ffNQMZY1o2gfNoLZY1R3Q2100010O01O001O2N1O1O2N1PcNfL22:OZ[1o3bdNTL][1m3`dNTL`[1o3YdNULh[1Y4100O010O10O02N1N2N2M3M3O1O1O1O1O1M3K6K4K5F:O1O1O2N101N1N3N1N3N1cN_bNIc]14bbNHf]1ZOPbN7?;f]1WOSbNNm0=[cfi1"}}, {"image_id": 113, "category_id": 1, "bbox": [1496.0, 471.0, 536.0, 326.0], "score": 0.9998537302017212, "association_id": 4, "light": [-0.8778482675552368, -3.032834053039551, 0.7427571415901184, 2.9284486770629883], "segmentation": {"size": [1553, 2048], "counts": "`ZmV2\\1g^1g0D6K4M3M2O1N2N101N2O0O2O001N2O1N2O001N2O1O1N101N2O1N2O1N2O1N101O2N2N1O2O0O1O1O1O1O1O001N2O001O1O001O002N1O2N1O1O1O1O001O001O001O001O001O00100O1O2N101N1O100O1O00001O0000001O00001O2N1O2N1O2N1O2N1O1O1O1O1O1O1O001O1O1O1O1O1O1O1O1O1O1O1O000010O000000000000000001O0000000000000000000001O000000000000000000000000010O01O001O001O100O0O2O00001O001O00001O00100O1O1O1O1O1O001O1O1O2N5K8G8I3M2O1N1O100O001O01O010O1O1O3M2N3M2N2N1O1O2N2N3M4L3M1O1O1O1O1O1O1O6J5K2N2N2N1O1O2N2N3MSfNlJfX1k4UgN]KkX1`4SgNcKnX1[4QgNgKoX1X4PgNiKQY1V4ofNkKQY1T4nfNmKTY1Q4lfNoK[Y1j3dfNXLbY1`3^fNaLoY1R3PfNPMRZ1m2neNSMUZ1j2jeNWMXZ1g2heNYMZZ1e2eeN]M[Z1b2eeN^M\\Z1a2ceN`M_Z1^2aeNbMaZ1\\2^eNeMdZ1Y2[eNiMfZ1U2ZeNkMhZ1R2WeNPNjZ1o1UeNRNlZ1m1ReNUNoZ1j1PeNWNR[1f1mdN\\NV[1`1jdNaNY[1g0[eN[OY[1ZO]eNf0W]10O1000000O2O000000000O2O0000000000001O0000000000000000001O0000000000000000010O0000000000000000000001O00000000000000001O00000000000000000000001O0000000000O1000000000000O1000000000000000000O10000000000000000O100000000000001O01O000000000000000010O000000010O000001O0001O01O000000010O00000010O0001O01O000001O01O000001O01O0001O01O0000000010O000001O0001O00000000000001O0000000000000000000O1000000000001O0O1000000000000000000O100000O1000000000000000001O0O10000000001O000O2O1O00001N10001O001O1O1O001O1O001O001O00001O1O2N1O1O001O4L1O001O1O2M2O1O1O1O1O001N3N2L4Fo_NM\\Pi0"}}, {"image_id": 114, "category_id": 1, "bbox": [248.0, 332.0, 467.0, 353.0], "score": 0.9999951720237732, "association_id": 1, "light": [-2.5735113620758057, -2.1470134258270264, 2.3930411338806152, 1.8519644737243652], "segmentation": {"size": [929, 1600], "counts": "cdQ79fl03O1N101O000O101N100O101N10000000000O1eGHmC8RR4oAnKQ>S4nAmKQ>T4oAkKR>V4mAjKS>W4lAiKT>W4kAjKU>W4jAiKV>W4jAiKU>Y4jAfKW>Z4iAfKW>[4hAeKX>\\4gAdKX>]4hAbKY>_4fAaKY>a4fA_KY>c4fA]KZ>d4eA\\KZ>f4eAYK[>i4dAWK[>k4dAUK\\>l4cATK\\>n4cARK]>o4bAQK^>P5aAPK^>R5aAnJ_>S5_AnJ`>T5_AlJa>T5_AlJa>U5^AkJb>V5]AjJc>W5\\AiJd>X5[AhJe>Y5ZAgJf>Z5YAfJg>\\5WAdJi>^5UAbJk>d5PA[JP?h6m_OYIR`0R7c_OnH\\`0X7__OhHa`0]7[_ObHe`0_7Z_OaHf`0`7Y_O`Hg`0a7Y_O^Hg`0c7X_O]Hh`0c7X_O]Hh`0d7X_O[Hh`0f7W_OZHi`0f7X_OYHh`0h7Y_OVHg`0k7V_OeG^N?\\b0m7Q_OiGeN7Zb0Q8k^OmGlN1Yb0T8d^OQHSOJXb0Y8]^ORH\\ODWb0_8Q^OUHH[OWb0l9i]OTFWb0m9i]ORFWb0n9j]OPFWb0P:j]OoEVb0R:<00000O10000000000000WN^]OSIab0X6_]OaH7T1Zb0Z6Z^OeIfa0Z6]^OdIca0[6_^OdIaa0[6a^OdI_a0[6c^OdI\\a0\\6e^OdI[a0\\6f^OcIZa0\\6i^ObIWa0]6k^ObIUa0^6l^OaITa0^6o^O`IQa0_6Q_O`Io`0_6T_O_Il`0`6W_O]Ij`0b6X_O]Ih`0c6Z_O[If`0d6\\_O[I^NXOda0]7o_OZI\\N\\Oca0Y7S@ZIZN^Oaa0Y7V@WIYNAaa0W7W@XIXNAaa0W7X@WIVNCba0V7X@WIVNCca0U7X@VIUNGba0T7Y@TIUNHba0T7Z@RITNKca0S7Y@QISNMda0S7Y@nHSN0da0R7\\@iHPN7da0Q7[@mHjM4la0o6Y@nHeM8Rb0l6V@cIj?^6U@bIk?`6S@`Im?a6R@_Io?a6P@_IP`0c6n_O]IR`0d6m_O\\IS`0e6l_O[IT`0f6k_OZIU`0f6k_OZIU`0g6j_OYIV`0h6i_OXIW`0i6h_OWIY`0i6f_OWIZ`0k6d_OUI\\`0m6c_ORI]`0P7a_OPI_`0T7]_OlHc`0[7V_OeHj`0_7R_OaHn`0`7P_OaHPa0`7o^O`HQa0a7n^O_HRa0b7m^O^HSa0c7l^O]HTa0c7l^O]HTa0d7k^O\\HVa0d7i^O\\HWa0e7h^O[HXa0f7h^OYHXa0h7g^OXHYa0b8m]O^GSb0c8l]O\\GUb0m5W^O[KDgNVb0k5^^OYK[OlNWb0h5f^OYLZa0e3i^OYKPOPOWb0f5l^OYLTa0e3o^OZLQa0e3Q_OZLPa0d3Q_O\\Lo`0c3S_O\\Lm`0d3T_OZLn`0d3T_O[Ll`0e3U_OZLl`0e3U_OYLm`0e3U_OZLl`0e3V_OYLk`0f3V_OYLj`0g3W_OXLj`0f3W_OYLj`0g3W_OXLj`0g3W_OXLi`0h3W_OXLj`0g3W_OXLi`0g3Y_OWLh`0i3X_OWLi`0h3X_OWLh`0i3X_OVLi`0j3W_OVLi`0j3X_OTLi`0l3X_ORLi`0n3W_ORLi`0o3W_OPLi`0P4X_OnKi`0R4Y_OlKh`0S4Y_OkKh`0V4X_OiKh`0W4Z_OfKg`0Z4Z_OeKf`0[4[_OdKe`0]4[_OaKf`0_4[_OfJhMNmb0\\5\\_OdJgM1mb0\\5\\_OaJgM4mb0[5]_O[Kd`0f4\\_OYKe`0f4\\_OYKd`0h4\\_OWKd`0j4]_OTKd`0k4]_OTJcMd0Qc0X5\\_ORJdMf0Pc0X5^_OnIcMk0Pc0W5^_OjIdMo0ob0V5c_OjJ^`0V5`_OkJa`0T5__OlJb`0S5]_OnJd`0R5[_OmJf`0S5Y_OnJh`0Q5X_OoJh`0Q5X_OoJi`0Q5V_OoJj`0Q5V_OoJj`0Q5V_OoJj`0Q5V_OoJj`0R5V_OmJk`0R5U_OnJk`0S5T_OmJl`0S5T_OmJl`0S5U_OlJk`0U5T_OkJm`0U5R_OkJn`0U5R_OkJn`0V5T_OmI`Mf0\\c0^5S_OlIbMe0\\c0_5Q_OlIcMe0\\c0_5R_OkIcMe0[c0a5Q_OiIfMe0Yc0c5P_OhIhMd0Yc0c5W_O\\Ji`0d5X_O[Ji`0d5X_O[Ji`0e5V_O[Jk`0d5U_O\\Jl`0c5T_O]Jm`0b5S_O^Jm`0b5S_O^Jn`0a5R_O_Jo`0a5P_O_JPa0a5P_O^JRa0a5n^O_JRa0a5m^O`JTa0_5l^OaJTa0_5l^OaJTa0_5k^ObJVa0^5i^ObJWa0^5i^ObJWa0^5i^ObJXa0]5h^OcJYa0\\5f^OeJZa0[5f^OeJ[a0Y5e^OhJ\\a0W5d^OiJ_a0T5`^OmJca0P5]^OPKfa0m4Y^OTKia0j4W^OVKka0h4U^OWKma0h4S^OXKna0g4R^OYKoa0f4Q^OZKoa0f4P^O[KQb0d4o]O\\KQb0d4P^O[KQb0d4o]O\\KRb0c4n]O]KRb0c4n]O]KSb0b4m]O^KTb0a4l]O_KUb0`4k]O`KWb0^4i]ObKYb0\\4g]OdK\\b0Y4d]OgK_b0U4b]OkK`b0S4`]OmKbb0Q4^]OoKcb0P4]]OPLdb0o3\\]OQLeb0n3[]ORLfb0m3[]ORLeb0n3[]ORLfb0l3[]OSLfb0m3Z]OSLgb0k3Z]OULgb0j3Z]OULgb0i3Z]OWLgb0h3Y]OXLib0e3X]O[Ljb0c3V]O]Lkb0a3V]O_Lkb0_3W]O`Ljb0_3V]OaLkb0]3V]OcLjb0]3V]OcLkb0[3W]OdLjb0[3V]OeLjb0[3W]OdLib0[3X]OeLhb0[3X]OeLhb0Z3Z]OeLfb0[3Z]OdLhb0Z3Y]OfLgb0Y3[]OeLfb0[3Z]OdLgb0[3\\]ObLeb0]3`3O1O2N1O1O1O100O2O000O10000O2O0O100O101N1O101N1O1O100O1O100O1O100O1O1O100O1O1O1O1O100O2O000O100O2O00000O2O00000O10001O001N101O001O1O1N101O1O1O1O1N2O1O001O1O1O001O2M2O2N2N2N1O1O2N1O1O001O1O1N2O1O1O1O1O1N2O2N1O1N2O1N2O1O1N3L3M4KU]Ri0"}}, {"image_id": 114, "category_id": 1, "bbox": [692.0, 247.0, 785.0, 435.0], "score": 0.9999806880950928, "association_id": 2, "light": [-2.2552762031555176, -1.5606473684310913, 2.0712199211120605, 1.376671314239502], "segmentation": {"size": [929, 1600], "counts": "g]dc03nl00O2O00001O0000001O0O101O00001O000O2O000000000000001O0O100000000000001O00001O00001oIa0^^O_OY`0n1c_ORNi?e2T@[Mg?m2V@TMe?S3X@mLe?X3Y@hLe?\\3Y@dLf?_3X@aLg?b3W@^Lh?e3U@\\Lk?e3U@[Li?h3U@XLj?j3U@VLk?l3S@TLl?o3R@QLm?R4Q@oKn?R4Q@nKn?T4Q@lKo?V4o_OkKo?W4P@iKo?Z4o_OgKP`0Z4P@eKo?^4o_OcKo?_4P@aKo?a4P@`Kn?b4Q@_Kl?e4R@[Km?g4R@YKm?i4R@XKl?j4S@VKk?m4T@SKk?P5S@PKl?R5T@mJj?V5U@jJj?X5U@hJj?_5P@aJo?g5j_OZJT`0j5i_OVJV`0k5j_OUJV`0l5i_OTJV`0n5i_ORJW`0o5h_OQJW`0P6j_OPJU`0Q6j_OoIU`0S6j_OmIV`0S6j_OmIV`0S6j_OmIU`0T6k_OmIT`0T6k_OlIT`0U6l_OkIT`0U6m_OjIS`0V6m_OkIQ`0V6o_OjIQ`0V6o_OjIP`0W6P@iIP`0W6P@iIo?Y6P@gIo?Z6Q@fIo?Z6R@eIm?\\6S@eIk?\\6U@dIj?]6V@cIi?^6W@bIi?^6W@bIh?_6X@aIg?`6Y@`Ig?`6Y@`If?b6Z@^Ie?b6[@^Id?c6\\@]Id?c6\\@^Ib?c6^@]Ib?c6^@]Ib?c6_@]I_?d6a@\\I_?c6b@]I^?b6c@^I\\?c6d@^I[?a6f@_IY?a6h@_IX?a6h@_IW?a6k@^IU?a6l@_IS?a6n@`IQ?_6PAaIo>`6QA`In>P6cAPJ\\>P6eAPJ[>o5fAQJY>o5hARJV>n5kARJT>n5nAQJQ>o5PBQJo=o5RBRJm=m5TBSJk=m5VBSJj=l5WBUJg=l5YBTJg=k5ZBVJe=i5\\BWJc=i5^BWJb=i5^BWJb=h5_BYJ_=g5bBYJ^=f5cBZJ]=f5cBZJ\\=f5fBYJZ=f5gBZJX=f5iBZJW=e5jB[JV=d5kB\\JT=d5mB\\JR=e5nB[JR=d5oB\\JP=d5QC\\Jni4mAXKS>i4kAXKU>h4jAYKV>h4hAYKX>h4fAYKZ>g4eAZK[>g4cAZK]>g4aAZK_>f4aAZK_>g4_AZK`>g4`AYK`>h4^AYKb>h4]AXKc>h4\\AYKd>h4ZAYKf>h4XAYKh>g4WAZKi>g4UAZKk>g4SAZKm>f4RA[Kn>f4PAZKQ?f4n@[KR?f4l@[KT?f4j@[KV?e4i@\\KW?e4g@\\KY?d4f@]KZ?d4d@]K\\?c4c@^K]?b4b@_K^?b4`@_K`?a4_@`Ka?a4]@_Kd?a4[@`Ke?a4Y@`Kg?`4X@aKh?_4X@aKh?^4Z@aKf?_4Z@`Kg?`4Z@_Kf?a4[@^Ke?a4\\@_Kd?a4]@]Kd?c4\\@]Kd?c4]@\\Kc?c4^@\\Kc?d4^@[Kb?e4^@ZKc?f4^@YKb?f4_@YKb?g4_@XKa?h4_@WKb?i4_@VKa?i4`@VKa?j4_@VKa?j4`@TKa?l4_@TKa?l4_@SKb?l4`@SK`?m4`@YJWORNZ`0e7_@UJ\\OUNU`0f7`@PJ@XNQ`0g7`@mID[Nl?h7`@kIG[Nj?j7`@hII]Ng?j7b@fIJ^Ne?k7c@eIJ_N@Hb?S8VAbILaN\\OLa?P8YA`INaNVO3b?j7^A^IMcNTO5a?i7`A\\IOcNPO:`?e7eAYI:TOQ>b7hAVI8YOQ>^7lASI6@m=\\7QBnH5Fj=[7UBiH3Mh=X7ZB]H9;]=W7PEiHP;U7QEmHn:S7REmHn:R7SEnHm:R7SEnHm:Q7TEoHl:Q7TEoHl:P7UEPIk:P7UEPIk:o6VEQIj:o6VEQIj:o6VEQIj:n6WESIh:m6XESIh:m6XESIh:l6YETIh:k6XEUIh:k6XEUIh:j6YEVIg:j6YEVIg:j6YEWIf:h6[EXIe:h6[EXIe:h6[EXIe:g6\\EYId:g6\\EYId:f6]EZIc:f6^EYIb:f6_EZIa:f6_E[Ia:c6`E]I`:c6`E]I`:b6aE^I_:b6aE^I_:a6bE_I^:`6cE`I]:`6cE`I]:_6dEaI\\:_6dEaI\\:^6eEbI[:^6eEbI\\:]6dEcI\\:\\6eEeIZ:[6fEeIZ:Z6gEfIY:Z6gEfIY:Z6gEfIY:Z6gEfIZ:X6gEhIY:X6gEhIY:X6gEhIZ:W6fEiIZ:W6fEjIY:U6hEkIY:T6gElIY:T6gElIZ:S6fEmIZ:S6fEmIZ:R6hEmIY:R6gEnIY:R6gEnIY:R6gEnIZ:Q6fEPJY:o5hEQJX:o5hEQJX:o5hEQJY:n5gERJY:m5hESJX:m5hESJX:m5hESJY:l5gETJY:l5gETJY:k5hEVJW:j5iEVJW:j5iEVJW:j5jEUJW:i5jEWJV:i5jEWJV:i5jEWJV:h5kEXJU:h5kEXJU:g5lEYJT:g5lEYJT:f5mEZJS:f5mEZJS:e5nE[JR:d5oE\\JQ:d5oE\\JQ:c5PF]JP:c5PF]JP:b5QF^Jo9b5QF^Jo9b5QF_Jn9`5SF`Jm9`5SF`Jm9_5TFaJl9_5TFaJl9_5TFaJl9_5TFaJl9^5UFbJl9]5TFcJl9]5TFcJl9]5TFcJl9\\5UFdJk9\\5UFdJk9\\5UFdJk9\\5UFdJk9[5VFeJj9[5VFeJj9Z5WFfJi9Z5WFfJi9Y5XFgJh9Y5XFgJh9X5YFhJg9X5YFhJg9W5ZFiJf9V5[FjJe9U5]FjJc9V5]FjJc9T5_FlJa9S5`FmJ`9S5`FlJa9S5`FmJ`9R5aFnJ_9Q5bFoJ^9Q5bFoJ_9o4bFQK^9o4bFQK^9n4cFRK]9n4cFRK]9m4dFSK\\9m4dFSK\\9m4dFSK\\9l4eFTK[9l4eFTK[9l4eFTK[9k4fFUKZ9k4fFUKZ9j4gFVKY9j4gFVKY9i4hFVKY9i4hFWKY9h4gFXKY9g4hFYKX9f4iFZKW9e4jF[KV9d4kF\\KU9c4lF]KT9c4lF]KT9b4mF]KT9b4mF^KS9b4mF^KT9`4mF`KS9_4nFaKR9_4nFaKR9^4oFbKQ9^4oFbKQ9^4oFbKQ9]4PGcKP9]4PGbKQ9]4PGcKQ9\\4oFdKQ9\\4oFdKQ9[4PGeKP9[4PGeKQ9Y4oFhKQ9X4oFgKS9W4nFiKR9W4nFiKS9U4nFkKR9T4oFlKR9S4nFmKR9R4oFnKR9P4oFPLQ9o3PGQLQ9m3PGSLP9m3PGSLQ9k3PGULP9k3PGULP9j3QGVLP9h3QGXLo8h3QGWLQ9g3PGYLP9g3PGYLP9f3QGZLo8f3QGZLP9e3PG[LP9d3QG\\Lo8d3PG]LP9b3QG^LP9a3PG_LP9a3PG_LP9`3QG`Lo8`3QG`Lo8_3RGaLn8_3RGaLo8]3RGcLn8\\3SGdLm8\\3SGdLm8[3TGdLm8[3TGeLm8Z3SGfLm8Y3TGgLl8X3UGhLk8X3UGhLl8V3UGjLk8U3VGkLj8U3VGkLk8S3VGmLj8S3VGmLj8R3WGnLi8R3WGnLj8P3WGPMi8P3WGPMj8n2XGQMh8o2XGQMh8n2YGRMh8m2XGSMh8l2YGTMh8k2XGUMh8k2XGUMi8i2XGWMh8i2XGWMi8g2XGYMh8f2YGZMg8f2YGZMh8d2YG\\Mg8d2YG\\Mg8c2ZG]Mg8b2YG^Mg8a2ZG_Mf8a2ZG_Mg8_2ZGaMf8_2ZGaMf8^2\\GaMe8^2[GbMe8]2\\GcMd8]2\\GcMd8]2\\GcMe8[2\\GeMd8[2\\GeMd8Z2^GeMb8[2^GeMb8[2^GeMc8Y2^GgMb8Y2^GgMb8Y2_GfMa8Z2_GfMa8Y2`GgMa8X2_GhMa8X2_GhMa8X2_GgMb8X2_GhMa8X2`GgM`8Y2`GgM`8X2aGhM_8X2aGhM_8X2aGhM_8W2bGiM^8W2bGiM^8W2cGhM]8W2dGiM\\8W2dGiM\\8V2eGjM[8V2fGiMZ8V2gGjMY8V2hGhMY8W2hGiMX8W2hGiMX8V2jGiMV8W2jGiMV8V2lGhMU8X2kGhMU8W2mGhMS8X2nGgMR8Y2[9O10000O10000O1000000O10000O10000O10000O10000O10000O10000O1000000O10001O000000000000000000000000000000000000000000000000001N10001O000O2O001O001O1N101O1O001O0O101O001O000O2O00001O00000O2O00000O2O00001N10001O0O101O0O2O001N3N2M3N1O2M3M2K5J7JfX_3"}}, {"image_id": 115, "category_id": 1, "bbox": [28.0, 105.0, 399.0, 470.0], "score": 0.9999502897262573, "association_id": 1, "light": [-1.5479533672332764, -2.2627956867218018, 1.504338264465332, 2.0722930431365967], "segmentation": {"size": [799, 533], "counts": "\\Qf06[h0h0_O>C8I7K5L4L3T[OYN\\b0j1^]O_N\\b0d1`]ObN[b0b1`]OeNZb0_1`]OjNYb0_1\\]OjN]b0R4J8H4L3M2N3M2O1O1N2O2N2N2N2M3N1O1O1O1N20O01O2N1O2O1N2N2N1O1O1O1O001O1O1O1O2N2N2N1O2M2O1O1O1N2O1O1N2O1N3N2M2O2M2N2M3N3M2O2M2N3N2M4M3L4M2N2N3M4L6I8I6J3M3M2N1O2M2O1O1O2M4RDXE_9k:PFjEi9Z:oEkEo9Z:iEkEV:^:]EgEb:\\hIBW6`0hI@X6`0hI@W6b0hI^OX6c0gI]OY6c0gI]OX6e0gI[OX6g0gIZOV6j0hIVOU6o0jIPOT6T1jIlNT6X1jIhNT6[1kIeNU6[1kIeNT6]1kIcNT6^1mIaNS6_1mIaNR6a1mI_NR6b1nI^No5e1QJZNl5j1TJVNf5P2ZJPNb5T2_JkM^5X2bJhM\\5Z2eJeMX5^2hJbMU5b2jJ]MS5g2mJYMP5j2QKUMm4n2RKRMl4Q3SKoLj4V3TKjLh4]3UKcLh4b3VK^Lg4g3WKYLh4i3WKWLh4k3WKVLf4m3YKSLd4R4ZKnKc4V4\\KjKa4[4]KeKb4_4[KaKe4b4XK_Kf4e4WK[Ki4j4RKVKn4n4nJRKQ5R5lJoJS5S5kJmJU5V5hJjJX5^5`JbJ`5Y6eIgI[6^6`IbI`6a6]I_Ic6e6YI[Ig6j6TIWIk6Q7mHoHS7U7iHlHU7W7iHhHX7Z7fHeH[7\\7dH`HjNBZ8Q8iHZHjNM[8o7eHoGnN;[8j7dHhGQOa0Z8j7bHdGROf0[8h7cH_GROj0[8k7_HYH`7n7XHTHh7b9O1aNlERJT:l5PFQJQ:n5RFPJn9o5VFmIk9R6ZFiIg9W6fF\\IZ9c6b1000000000001O0000000000001O000000000000O100000000O1O1iNZITFf6c9bI^F^6`9dI_F]6^9fImEC1i6n9hIRFHEa6S:mIXFd6d9aI\\F^6b9dI^F\\6a9eI_F[6_9gIbFX6Z9lIfFT6V9PJjFP6S9SJmFm5Q9UJoFl5>VIn6P1dHj5;[Im6m0hHi58]Ih6Q1oHc56`Ic6T1WI]53bIa6U1\\IZ50cIb6U1^IZ5DlIj6m0bIk6Y6ZIfIg6i5iIWJW6b5PJ^JQ6\\5TJdJn5W5UJiJm5Q5WJoJk5i4[JWKg5`4aJ_K`5\\4dJdK]5X4fJhK[5T4hJlKZ5n3jJRLX5e3oJ[LT5Y3VKfLl4U2mF_M_4j4POR4`0YGc4jNP4i0\\G?c4iNo3j0\\G`0c4fNP4^3nKcLP4`3oK_LP4f3lKZLS4n3fKRLX4Z4^KgK_4k4RKTKl4S5oJmJo4X5nJhJP5]5mJcJR5c5iJ^JU5m6aISI^6`7PI`Ho6k7hHUHU7T8dHlG[7Y8aHgG]7`8_H_G^7j8]HUG\\7[9PIPFk6Z:RIdEk6a:SI`Ek6c:TI\\Ek6e:VIZEj6g:VIXEk6g:WIVEj6j:XITEh6l:YISEg6m:YISEg6m:ZIREf6n:ZIQEg6o:ZIoDg6Q;d00000000O1O1O100O1O1fNkDhJV;l4XERKg:m4]EPKc:P5`EmJa:R5bElJ]:T5fEiJZ:W5iEfJg8OSG\\57cJg82PG\\5:`Jk80lF_5a0WJj84fFe5P;VJREj5Q;PJREo5P<0001O1O001O001O000000001O0001O00001O001O001O2M3N3L3N2M4QNoIhFU6j8[JoFo5]8jJlFg5b8e2lNT1H6K6J6J6I6J5K6K4L4K4M4XOUCTKQ=`4n0H8K5N3000O1O2N1O002N2N2O1O01O0O1N101N2nKcA^3]>[LkAc3m>L4L6J6J7I6J4L3M4L9F9G8H:E9G9D=BPX\\1"}}, {"image_id": 116, "category_id": 1, "bbox": [307.0, 93.0, 88.0, 264.0], "score": 0.9943506717681885, "association_id": 3, "light": [-1.8827636241912842, -2.520230531692505, 1.803507685661316, 2.4170329570770264], "segmentation": {"size": [608, 738], "counts": "U]f5;cb04K4j@Ag;b0QDGn;8RDHn;8RDHo;7QDHS<4oCKW"}}, {"image_id": 117, "category_id": 1, "bbox": [642.0, 388.0, 88.0, 78.0], "score": 0.9999831914901733, "association_id": 2, "light": [-1.9115309715270996, -1.618683934211731, 1.900923728942871, 1.4824225902557373], "segmentation": {"size": [768, 1024], "counts": "ZmQ?9dg08J2N2N3M1O2N2O0N3N2N1M4G8N3M3M2O2N1N2O1O1O2O0TZORNfe0n1XZOUNge0k1YZOUNfe0l1ZZOTNfe0l1ZZOUNee0S2000IZZOTNfe0l1ZZOTNfe0l1ZZOUNee0k1[ZOUNee0S20I[ZOTNde0l1\\ZOTNde0l1\\ZOTNde0l1\\ZOTNde0l1\\ZOTNde0l1\\ZOTNde0l1\\ZOUNce0k1]ZOUNce0k1]ZOUNce0k1]ZOUNce0k1]ZOUNce0k1]ZOUNce0k1]ZOUNce0k1]ZOVNbe0j1^ZOVNbe0T20G^ZOTNbe0l1^ZOTNbe0l1^ZOTNbe0l1^ZOTNbe0l1^ZOTNbe0l1^ZOTNbe0U2000000000001O0001O00001N3N1EYZO[Nhe0i0XZOG0Aje0b0]ZOHKFie0?aZOFHKhe0=bZOEHNie08T[OHnd03U[OMmd0NV[O2]f0O000O2O001N10001NfQl6"}}, {"image_id": 117, "category_id": 1, "bbox": [236.0, 382.0, 65.0, 50.0], "score": 0.9999468326568604, "association_id": 7, "light": [-2.15321683883667, -1.5541000366210938, 2.1321964263916016, 1.4092891216278076], "segmentation": {"size": [768, 1024], "counts": "^\\a5h0Ug04N3L4M1N2WYOkNff0Y1NM\\YOlNbf0V1^YOjNaf0[10L_YOiN`f0X1`YOiN_f0W1aYOiN_f0W1aYOiN_f0\\100OLbYOhN^f0]100000KbYOhN^f0X1bYOhN^f0X1bYOhN^f0X1bYOhN^f0X1cYOgN]f0Y1cYOgN]f0Z1bYOfN^f0Z1bYOfN^f0Z1bYOfN^f0Z1bYOfN^f0Z1bYOfN_f0Y1aYOhN^f0X1bYOhN^f0X1bYOhN^f0X1bYOhN_f0W1aYOiN_f0W1aYOiN`f0V1`YOjNaf0U1_YOkNaf0U1_YOkNbf0T1^YOlNbf0S1^YOnNcf0Q1]YOoNdf0P1\\YOPOef0o0[YOQOff0n0ZYOROgf0m0YYOSOhf0l0XYOTOif0k0WYOUOjf0j0VYOVOkf0h0VYOWOlf0h0TYOXOPg0NSYO?MCYg0;gXOE\\g08dXOH]g07bXOJag00bXO0fg0100O001000O103Khjm`0"}}, {"image_id": 117, "category_id": 1, "bbox": [156.0, 359.0, 66.0, 46.0], "score": 0.9997868537902832, "association_id": 8, "light": [-1.817606806755066, -1.6981611251831055, 1.7811594009399414, 1.5236561298370361], "segmentation": {"size": [768, 1024], "counts": "P\\e33bg0a0H8I2L4M2O1O1O100O10O01ZYOiNcf0W1]YOjNbf0V1]YOkNcf0U1]YOkNcf0U1]YOkNcf0U1]YOkNcf0T1^YOlNaf0U1_YOkNaf0U1_YOkNaf0U1_YOkNaf0U1_YOkNaf0U1_YOkNaf0U1_YOkNaf0U1_YOkNaf0U1_YOkNaf0U1_YOkNaf0U1_YOkNaf0U1_YOlN`f0T1`YOlN`f0T1`YOlN`f0T1_YOmNaf0S1`YOlNaf0S1_YOlNbf0T1^YOlNbf0T1^YOlNbf0T1^YOlNcf0S1]YOmNdf0R1\\YOnNdf0R1[YOoNff0P1ZYOPOgf0n0ZYOSOff0l0YYOUOjf0h0VYOXOkf0g0UYOYOlf0f0TYOZOmf0d0SYO]Onf0a0RYO@nf0`0RYO@of0>QYOCPg0lXOBWg0:iXOG[g0OkXO1bg0000000000000000001N10001OjTk;"}}, {"image_id": 118, "category_id": 1, "bbox": [951.0, 492.0, 70.0, 65.0], "score": 0.9998806715011597, "association_id": 1, "light": [-0.5989295244216919, -4.0478315353393555, 0.5641908645629883, 3.8672099113464355], "segmentation": {"size": [768, 1024], "counts": "ViYf03lg01000001O0UOLRYO<9H_f0d0^YO\\O`f0h0^YOXO`f0l0_YOTO^f0o0aYOQO_f0R1^YOnNaf0Y1OL`YOjN_f0\\1OMbYOfN]f0_1O1O100O1OMgYOaNWf0`1jYOaNUf0^1kYOcNTf0]1lYOdNTf0\\1kYOeNTf0[1mYOeNRf0Z1PZOfNPf0Z1PZOfNPf0Z1PZOfNoe0Z1RZOfNne0Z1RZOfNme0\\1RZOdNne0\\1RZOeNme0\\1RZOdNne0\\1RZOdNne0]1RZObNne0_1QZOaNne0a1QZO_Noe0b1QZO]Noe0c1RZO\\Nne0e1QZO[Noe0f1QZOYNne0h1RZOXNne0m10LRZOVNne0j1RZOVNne0n11O00000LQZOWNoe0i1QZOWNoe0h1RZOXNne0h1QZOYNoe0g1QZOYNoe0f1RZOZNne0f1RZOZNoe0d1QZO]Noe0b1RZO^Nne0a1SZO_Nme0a1RZO`Nne0_1SZOaNme0_1SZOaNme0`1RZO`Nne0`1RZO`Noe0`1QZO^NPf0a1:M3M^h1"}}, {"image_id": 118, "category_id": 1, "bbox": [319.0, 491.0, 160.0, 244.0], "score": 0.9999995827674866, "association_id": 2, "light": [-2.609635353088379, -1.5210497379302979, 2.4842567443847656, 1.4353506565093994], "segmentation": {"size": [768, 1024], "counts": "_n_74lg0001N10000000000000000000001O00000000000O100000000000O100001O0000000000001O000000001O00000000001O000000001O0000001O00001O001O00001O0QKa0]A@]>i0_AWO_>Q1[AoNc>Y1WAgNg>^1VAbNh>d1TA\\Nj>m1o@TNn>Q2o@oMP?U2m@kMR?_2e@aMX?k2_@UM_?V3X@jLg?]3S@cLl?W4[_OiKd`0\\4X_OdKf`0_4Y_OaKe`0b4Z_O^Kd`0d4\\_O\\Kc`0e4]_OZKb`0h4^_OXK_`0k4a_OUK]`0m4c_OSK[`0o4e_ORKY`0o4g_OQKW`0P5j_OPKS`0S5m_OmJo?W5R@gJk?]5U@cJi?^5X@bJf?`5Z@`Jc?c5]@[JTOC^`0S6^@YJd?h5\\@VJf?k5Y@TJg?n5X@RJh?o5X@oIi?T6T@kIm?[6m_OdIT`0d6d_O\\I\\`0l685K1O1O0000000001O0O2N2N3K5I6G:K5M4M2M2O1O2O0O10000O02N10O010O1O1O2N100O001N2`Na^O\\Laa0`3f^OZL^a0g2o]OWMec0c2P1K3M4M4M2M5K4M4K6Ja0^Ob0VOXVh<"}}, {"image_id": 118, "category_id": 1, "bbox": [458.0, 487.0, 162.0, 243.0], "score": 0.9999996423721313, "association_id": 3, "light": [-2.345736265182495, -1.6979455947875977, 2.2251012325286865, 1.5720188617706299], "segmentation": {"size": [768, 1024], "counts": "[Vh:1ng02O001O001O0O101O00001O000000001O01O000O1000000000000000000O1001O000000000000000000001O000000000000000000001O00000000000000001O00000000001O000001O^K3QAMk>`0RA@j>f0TAZOh>l0VATOg>Q1WAoNe>Y1WAhNb>d1XA\\Ne>j1XAVNf>o1WAQNf>Y2S_OUNWOJ3Gaa0V5\\^OjJca0X5\\^OiJ`a0Z5`^OfJ]a0\\5d^OdJZa0]5g^OcJXa0]5j^ObJTa0_5m^OaJPa0b5P_O_Jm`0b5T_O^Jh`0f5X_OZJb`0k5__OUJ]`0n5d_ORJZ`0P6f_OPJW`0S6j_OlIU`0V6j_OjIT`0X6m_OhIP`0]6m_ObIS`0d6i_OZIW`0k6f_OPI^`0T746K3M1O001O00000000000000000000O100N2J6K6J5ZOf0M4O2M3N1N2O0O2N2O2M3N1N3N1kNl]O[LVb0b3n]O\\LTb0`3P^O]LTb0X3X^OdLja0S3a^OhLca0P3e^OkL`a0k2P2I7K6K5K5L4M3M4L3L5L;D6J4K8H9Eo]^9"}}, {"image_id": 119, "category_id": 1, "bbox": [644.0, 564.0, 124.0, 354.0], "score": 0.9999995827674866, "association_id": 2, "light": [-1.8138419389724731, -2.108020067214966, 1.653789758682251, 1.9222205877304077], "segmentation": {"size": [1024, 768], "counts": "eiTd07co09L2\\NAeSOa0ok04fSOMSl02_1`m0N2O2M>]OYUO"}}, {"image_id": 119, "category_id": 1, "bbox": [351.0, 546.0, 275.0, 478.0], "score": 0.9892474412918091, "association_id": 3, "light": [-1.228653073310852, -3.0768086910247803, 1.1624512672424316, 2.9321439266204834], "segmentation": {"size": [1024, 768], "counts": "\\fo:3mo01N100000000000000000000000000001N10000O10Poc08aP\\O:I6L2N3L4M3L3L5L4L3M4M1O2L3O2M2O2N101N1O2N2N1N3N2RWOfMTd0[2[[ODVc0>e\\OMSc05j\\O2Pc00m\\O6nb0KP]O:lb0HQ]O>kb0BS]Oe0gb0\\OV]Ol0eb0TOV]OX1bb0iN[]Oa1^b0^Nb]Oi1Xb0TMmZOoNm2R4dN]K_a0a1T]OiNk2^4]NdKYa0U1a]OhNh2b4[NbKZa0W1_]OlNg2^4\\NaK]a0X1[]OQOe2[4_N]K_a0`2m_OY2]NZKda0c2f_O]2^NSKja0f2Z_OQ3XN]J\\b0i2Q_OX4m`0lKm^OW4Ra0mKi^OU4Va0nKg^OS4Ya0oKc^OT4\\a0oK_^OS4`a0RLY^OR4fa0U5O001O00001N100O100O100O100O1O1O1N2N2O2M2O1O1O1O1N2N2M3M3N2O1N2O1000000000000O0100000000O100O100O100O10000001O00001O0000001O00001O000000001O0000000001O0001O000001O001O001O001O1O1O2N2N2N3M2N2N3M2N4L6J6J8H8H4L3M2N1O1O2M2O2N2N2M3N2N1N3N1M4L4I8hNZ1ZOh0D;F7J4M4L3N3M2M4M3M4K4M3ZORXOUIQh0i6oWOWISh0g6lWOZIVh0d6jWO\\IXh0U72N1O2N3M2N2000000101O00O0O100N2O1O2M6K8G5L2N1N2OO01N2O1O1O1O1PN[VOcMfi0Z2_VOcMoi0m1VVOoMQj0i1UVORNoi0i1XVOPNmi0j1^VOkMfi0P2jVOaM[i0e1m2PO\\RO[Omm0?m0K5K[W]4"}}, {"image_id": 119, "category_id": 1, "bbox": [221.0, 543.0, 143.0, 436.0], "score": 0.999858021736145, "association_id": 1, "light": [-1.604217767715454, -1.2465581893920898, 1.5239500999450684, 1.1088776588439941], "segmentation": {"size": [1024, 768], "counts": "lkm68go02N1M3N3N1N1L5N010VJa0SWOZOn26je0j0mVO_On2IRf0X2gYOiMUf0`2fYO`M]MVO`h0f3nYO_Mee0n2UZOXM^e0W3ZZOlL^e0]3_ZOdL[e0c3cZO^LXe0h3eZOZLWe0k3gZOVLSe0R4jZOnKRe0Z4jZOfKSe0_4jZObKUe0`4jZOaKTe0a4jZO`KUe0b4iZO_K4[N_c0W6]\\O_KLcNdc0P6^\\O^KGkNhc0h5`\\O_KElNic0g5a\\O]KBPOkc0f5a\\O[K_OUOmc0d5b\\OWKXO^OSd0_5c\\OTKROEYd0[5c\\OhL[c0[3d\\OdL[c0_3c\\OaL\\c0a3c\\O_L]c0c3a\\O]L^c0e3b\\OZL^c0g3c\\OWL]c0l3a\\OSL^c0Q4S\\O[Lmc0l700O1O1O1N2L4M3N1N3K5_Oa0L4N20O0000001O0O1L4L3L5M202M2M4K5M2N3N3M2M4L3M3O1XNo[O`GRd0Y8U\\OgGkc0Q8]\\OnGdc0n7a\\OPH`c0n7b\\ORH`c0j7b\\OUHac0h7a\\OUHcc0h7^\\OVHec0h7]\\OiGiN@Ue0d8T\\OjGiN@Ue0d8S\\OlGSd0P8Q\\OoGjN@md0[8^\\OTHnc0h7U\\OWHoc0c7T\\O]Hoc0]7S\\OcHRd0V7Q\\OiH\\d0g6h[OXIbd0X6e[OgI]d0R6i[OmIYd0m5l[ORJVd0i5n[OVJTd0d5Q\\O[JQd0^5T\\ObJoc0T5Z\\OiJjc0n4i3K4L4K4L5L4L3O3M3N4K4L3N2N3N2bMUTOa0Qn0E4K3N7H:F5L2M10N3N2M4M4K3O0O0100O010O1O1N3L3NcXc<"}}, {"image_id": 120, "category_id": 1, "bbox": [187.0, 9.0, 88.0, 181.0], "score": 0.9999994039535522, "association_id": 2, "light": [-2.1347641944885254, -1.7876262664794922, 2.0574452877044678, 1.6994097232818604], "segmentation": {"size": [599, 506], "counts": "Va]32db02N2N10000[^OJi`06V_OMh`03V_O0i`00V_O1j`0OV_O2i`0NV_O3k`0LU_O5j`0KU_O6k`0KS_O6m`0JR_O7o`0Io^O7Ra0Il^O9Ta0Hj^O9Va0c0100O100O10000000QMROTDo0k;SOTDn0j;TOTDm0j;UOVDk0j;VOTDk0l;TOeCMQNQ1Y>SOdCNRNP1Z>QOcC2QNn0]>nNaC6oMo0`>kN`Cd1`<\\N_Cf1aPOVCb0]N>\\>SOSCa0bN;[>UOmBd0jN6Y>WOkBc0nN5W>ZOfBc0UO2^=nNmB>=b0YO2Z=VOkB8JT14\\OX=\\OfB7GT1=bNC7b=0cBP2:hMC6`=j2QCoLA5_=j2QCQMB3^=i2SCTM_O2^=i2UCTM^O2^=h2UCVM^O2]=g2VCWM]O1^=g2VCXM\\O0_=h2UCXM\\OOa=h2SCXM_OM_=l2QCWMb=i2]BWMe=i2ZBWMh=h2VBYMl=f2SBZMY>\\2eAdM]>[2aAfMa>Y2^AfMd>d1o@bN;Kh>`1PAdN7Kk>_1PAgN3Jo>\\1o@lNOIT?Y1m@SOLAZ?Z1k@XOc?f0^@\\O`?c0a@]Ob?>`@Ao?0R@OQ`0NP@1S`0Kn_O4U`0Im_O5V`0Hm_O6V`0Em_O8[a0N5J]PW4"}}, {"image_id": 120, "category_id": 1, "bbox": [271.0, 57.0, 87.0, 215.0], "score": 0.9999999403953552, "association_id": 4, "light": [-2.3803296089172363, -2.4910342693328857, 2.2698817253112793, 2.3196003437042236], "segmentation": {"size": [599, 506], "counts": "Shn45_b06K3M4[^OBk`0b0Q_OBb`0k0[_OWOc`0k0Z_OWOd`0`1O1N100O1O1O1000000O10O012M2NZO\\N]@a1a?gN\\@V1c?kN_@S1`?oN`@Q1`?mNb@R1_?mNb@R1^?nNc@R1\\?nNe@R1Y?nNi@Q1W?oNj@Q1V?nNk@Q1U?POj@P1Q=YOdCG[OP1lR3iAdL]>U3f0M3M3I8K5oMR@T1R`0jNR@R1P`0kNT@S1m?jNW@S1m?gNY@W1g`0L4L6J3N3M2N1O3M1N3M2N3L7IQ^f2"}}, {"image_id": 120, "category_id": 1, "bbox": [260.0, 332.0, 100.0, 233.0], "score": 0.9999666213989258, "association_id": 6, "light": [-1.7193775177001953, -2.626013994216919, 1.6952707767486572, 2.5421602725982666], "segmentation": {"size": [599, 506], "counts": "cch4d0Rb04L4K3N2N2_OQOS_OU1i`0>00O1O1O1N2K5^NUNUBn1j=TNPBQ2P>lMQBV2o=iMQBX2o=hMoAZ2R>cMlAa2Q?4M3N2O10000O100O1KTM^@m2m>TM`A3Bh2n>kMRAS2o>j00OO02O0oMPA>P?]OWA?j>XOo@SO:b1R>cNjAi0LQO:a1o=3hA\\N:]1o=MhAdN11:[1j=2ZBaNN[1b=9cBZNM[1`=:\\CCe;QO_C]1m0B_;_1dD_N\\;b1fD\\NZ;d1gD[NX;f1iDYNW;g1jDWNW;i1iDXNW;h1iDWNV;j1kDUNU;l1kDSNU;n1kDQNU;P2jDPNV;Q2iDnMY;S2eDnMZ;T2eDkM[;W2cD^Mg;e2WDZMk;f2SDZMm;i2QDVMo;m2oCSMQi2mBgMX=i0YB@c0FW=EiAb0b2Ig;AlA?b2O[?01O1O1O0000001O000O2N^nd2"}}, {"image_id": 120, "category_id": 1, "bbox": [333.0, 302.0, 122.0, 252.0], "score": 0.9999995827674866, "association_id": 5, "light": [-2.01057505607605, -2.8892548084259033, 1.8902469873428345, 2.786228895187378], "segmentation": {"size": [599, 506], "counts": "]XS64bb02O0O100O1O10O01e^O1n?NP@9l?GS@eMgA\\2X>dMiA\\2U>fMkAZ2T>gMlAY2ob`0m0N101NjNb_O5]`0Mc_O3\\`0Nd_O1[`0V1O2OkNg_OLX`0Z101N1O2O000O1O100O10000O1O10O1mNP@_OP`0a0P@^OQ`0b0o_O^OP`0b0R@\\Oo?c0R@]On?c0S@\\Ol?d0U@[Ol?e0U@ZOk?e0V@[Oj?d0W@[Oj?d0X@[Oh?e0Y@ZOh?d0Y@[Oh?e0Y@YOi?e0Y@ZOg?e0Z@ZOg?e0[@YOf?g0[@XOe?g0]@WOd?i0\\@VOf?h0\\@WOd?i0\\@WOe?g0^@WOb?h0`@WOa?g0a@WO`?h0b@VO`?i0c@RO_?m0V1O2N1N2N2O2M2O2N2N2N2M4LcUS4"}}, {"image_id": 120, "category_id": 1, "bbox": [312.0, 154.0, 77.0, 182.0], "score": 0.9999926090240479, "association_id": 3, "light": [-2.4010109901428223, -2.041396379470825, 2.2370071411132812, 1.9283287525177002], "segmentation": {"size": [599, 506], "counts": "hif5145Vb0`0F3M2O2N1N2O1N102M1O2O0000001O0000O100O01O0100NMoNd^OP1k>TOZCT1f"}}, {"image_id": 121, "category_id": 1, "bbox": [45.0, 341.0, 86.0, 158.0], "score": 0.9999969601631165, "association_id": 1, "light": [-2.0344443321228027, -2.28987455368042, 1.8854783773422241, 2.036294460296631], "segmentation": {"size": [768, 782], "counts": "cTR1m0mf0;D;I4K5L5J6M2M2N3L6J4M3L3L6I7J7K7H;G3N6J7I4L4L1O00001O0000000001O1O2M4MaM_@_2c?mMn_OS2T`0oMj_OP2W`0SNe_On1[`0TNc_Ol1]`0VNa_Oj1^`0XNa_Oh1_`0ZN__Oe1b`0]NZ_Oc1h`0_NU_O`1m`0aNQ_O^1Ra0cNl^O]1Sa0fNk^OZ1Sa0iNl^O`1j`0cNT_O_1i`0cNW_On0QOdMea0a1X_Oj0TOfMba0c1X_Of0WOhM_a0d1Y_Oc0YOjMZa0g1[_Oa0YOiMS>AlDZ2fMS1]=fLgD\\2iMP1_=gLbD]2mMm0a=iLXDb2UNg0c=iLhCo2bN9f=kLbCR3eN4i=mL\\CW3dNMQ>nLUCU7k_10000O10001OZNRB[Im=b6UB`Ij=^6XBcIg=[6[BfId=X6^BhIb=W6_BjI`=U6aBkI_=S6cBoI[=o5gBRJX=l5jBUJU=j5lBXJR=g5oBYJR=f5nB[JQ=f5nBZJR=f5nB[JQ=e5PC[Jol6mASIU>R7gAUH21X>Z8PBaGQ>\\8RBbGP>^8oAbGR>`8jA`GY>R1eAh51UI[>k0mAn5IVIZ>c0YBU6]OVI\\>>`BY6TOYI]>:gBY6lN[I_>8lBY6eN_I`>5PCV2^N\\12WLc>2SC9QN\\1>o1KYLe>1VDo0`Md2ab0\\Lo]Ob3\\c0K7IN2O2N100O100000000000YM_[Oo1ad0PN`[OP2ad0oM`[OP2`d0oMa[OP2ad0nMa[OQ2`d0lMb[OT2`d0hMa[OX2dd0aM_[O^2Qe00000N2O2N2M3L4ROn0M3N2N2O2N1O1O1M4M3M8F9IZVf4"}}, {"image_id": 122, "category_id": 1, "bbox": [619.0, 575.0, 205.0, 440.0], "score": 0.9999998807907104, "association_id": 2, "light": [-2.775064468383789, -1.181300401687622, 2.7195534706115723, 1.0464476346969604], "segmentation": {"size": [1200, 1129], "counts": "QRff02YU1;H4L4L4K5K4M4L2N3M3M2M4M3N1O2N2N1bnNCQOjNWm0e1SSO4el0n0SXOPOkJN<5gl0l0VXOgNoJ647hl0l0eXOhNdJ^mNB`R1e0[mN[OcR1g0\\mN[OaR1h0]mNYOaR1i0_mNXO_R1i0`mNXO_R1i0amNWO^R1k0`mNWO^R1j0bmNVO^R1j0amNXO^R1h0amN[O^R1d0bmN]O^R1b0amN_O`R1`0`mNAaR1=_mNCbR1<^mNEaR1:_mNH]R1;cmNFYR1=gmNCWR1>jmNCUR1=kmNCTR1=mmNDRR1PnNCmQ1?SnNBjQ1`0VnN@dQ1f0\\nN[O`Q1i0_nNWO_Q1k0anNUO^Q1l0bnNUO\\Q1l0dnNTO[Q1m0enNSOYQ1o0gnNROVQ1o0knNQOSQ1Q1mnNoNQQ1S1onNmNPQ1T1PoNlNoP1U1QoNlN\\P1XOVoNn1=jNTP1EYoNc1c0hNSP1R2moNmMRP1T2noNlMRP1U2moNkMRP1V2noNjMQP1X2noNhMRP1X2noNiMQP1X2noNhMRP1Y2moNgMSP1Z2loNfMTP1[2koNeMUP1\\2joNdMVP1]2ioNbMWP1a2goN_MYP1b2foN^MZP1d2eoN[MZP1h2doNYM[P1i2coNWM\\P1k2doNTM\\P1n2boNRM^P1o2boNPM^P1P3boNPM^P1Q3aoNoL_P1R3aoNmL_P1T3aoNkL_P1U3boNjL^P1W3boNhL^P1Y3boNgL]P1Z3coNeL]P1\\3boNdL^P1]3boNbL]P1`3boN`L^P1b3aoN]L_P1d3`oN\\L`P1e3`oNZL_P1\\4O1O1FPKRPOR5lo0;N100O1O100O00100OO21O0O2O001O000010O001O10O01O001N101O0O2N1O2N2M4O1N3M1O1O1UO`oNdLaP1Y3`oNhLaP1U3aoNkL`P1P3coNQM^P1i2goNWM[P1e2foN\\MZP1b2hoN^MYP1`2hoN`MYP1_2goNaMYP1^2hoNaMZP1]2goNcM[P1Z2foNfM[P1Y2eoNgM\\P1W2eoNiM\\P1V2doNjM]P1U2coNkM^P1T2boNlM_P1S2aoNmM`P1R2`oNnMbP1P2^oNPNcP1n1^oNRNbP1n1_oNQNbP1n1_oNQNbP1n1^oNRNcP1m1`oNPNbP1n1^oN^MWOa0]Q1n1[oNgMXO7^Q1Q2YoNYNhP1f1VoNTN[OC`Q1X2VoNVNQQ1i1nnNXNSQ1f1nnN[NSQ1c1lnN_NTQ1_1mnNbNSQ1]1lnNfNRQ1Y1onNhNQQ1W1onNiNQQ1V1QoNjNoP1U1QoNkNPQ1S1RoNmNnP1R1RoNoNnP1P1SoNPOmP1o0SoNSOlP1k0VoNTOkP1k0UoNUOlP1i0VoNWOkP1g0VoNXOkP1f0XoNXOjP1f0WoNYOjP1e0YoNYOgP1f0\\oNWOfP1g0^oNQOiP1j0_2PORo\\1"}}, {"image_id": 122, "category_id": 1, "bbox": [424.0, 645.0, 35.0, 109.0], "score": 0.9069292545318604, "association_id": 6, "light": [-2.5713467597961426, -1.9673274755477905, 2.533358097076416, 1.8424452543258667], "segmentation": {"size": [1200, 1129], "counts": "daa?c0gT1f0[O=E5IXNblNk1kR1e0L4`mN\\MRR1g2mmNZMPR1g2PnN[MnQ1f2RnNYMoQ1f2RnNZMoQ1e2PnN\\MoQ1d2SnN[MmQ1c2UnN]MlQ1a1XnNhNOGhQ1X1`oNhNaP1V1`oNjN_P1V1boNjN]P1V1doNkN\\P1S1eoNmNZP1T1foNlNYP1V1foNjNZP1V1foNjNYP1X1foNhNZP1X1foNhN[P1a0mmNLj1CYP1a0nmNIk1FVQ1NPmNOj13]S10000O101O0O1Od]`h0"}}, {"image_id": 123, "category_id": 1, "bbox": [539.0, 227.0, 207.0, 337.0], "score": 0.999992311000824, "association_id": 1, "light": [-2.773355007171631, -1.6094236373901367, 2.6731553077697754, 1.4593079090118408], "segmentation": {"size": [1200, 1600], "counts": "^ogc02WU1:G:J5J7J4K5J8I7eQO[N`h0j1]WOYN]h0n1`WORN[h0V2bWOjMZh0^2RWO]MkK6nl0c2iVOeMWLIll0g2fVOfM]LCjl0l2aVOhMdL\\Ohl0P3UVORNTMnNbl0W3kUOXNbMaN`l0]3gUOVNiM]N]l0b3eUOTNnMZN[l0e3aUOVNTNUNXl0i3`UOUNXNRNUl0m3`UOSN[NPNSl0Q4_UOPN_NnMok0W4^UOmMcNlMmk0[4[UOlMhNiMhk0c4YUOhMPOdM^k0P5\\UO_MVOaMVk0Z5_UOXM\\O]Mmj0e5aUORMBYMgj0n5^UOoLLRMcj0g9]UOYFcj0g9]UOYFdj0f9]UOYFdj0f9\\UOZFdj0f9]UOYFdj0f9]UOZFbj0U8fUO`HH[Obj0P8nUObH@^Ocj0k7SVOeHZO@cj0i7WVOeHWOAcj0g7ZVOfHSOCcj0h7YVOeHTOCcj0h7YVOeHTOCcj0h7ZVOdHSODcj0i7XVOdHUOCcj0i7XVOdHUOCcj0i7XVOdHSOEej0i7UVOcHVODej0l7PVObHZOCfj0_3aUO5;jL^OBfj0Z3PVOjMVOe0a0gNBAfj0T3WXOZN]MSOF_Ofj0P3dXOZNhLZON\\Ofj0n2jXOB`L`Mfj0l2mXOC]LaMfj0j2QYOCYLcMej0h2WYOCSLfMfj0e2]YOAmKjMfj0d2`YO@jKlMfj0b2dYOAeKmMgj0b2eYO@dKnMgj0b2fYO_OcKoMfj0b2iYO^OaKPNfj0b2kYO\\O_KRNgj0`2nYO[O[KTNij0^2QZO[OVKWNij0]2TZOZOSKYNij0Y2ZZO[OnJ\\Nhj0V2_ZO\\OiJ^Nij0R2eZO\\ObJbNjj0_1UUO]Ng5^1ZJfNkj0S1h[O3]IjNlj0l0Q\\O6TImNnj0f0U\\O:mHPOUk09W\\Od0dHSO`S1j0`lNVOdS1e0^lNZOeS1c0[lN]OhS1?YlNAjS1:YlNDjT100000_nj0OaQUO100N22M10C482N10000O100000O10O1000000000O10000000000000000000000000000O1000O1000000000000O1000000000O10O100000000O1000000000O01000000O10O100000000O10O1000O1000O10O10000O1000O01000000O1000000O2O0O4LZXXo0"}}, {"image_id": 123, "category_id": 1, "bbox": [773.0, 0.0, 453.0, 1019.0], "score": 0.9999985694885254, "association_id": 2, "light": [-1.0755094289779663, -2.7574503421783447, 0.8905140161514282, 2.5602004528045654], "segmentation": {"size": [1200, 1600], "counts": "ciZl02\\U16J6I7I6J7G8H9F9F:J5L4K5M2N101O0O2O001O001N101O001N101N2O0O2VGSMo^Om2W`0WN__Oj1W`0gN`_OZ1\\`0PO^_OQ1^`0XO\\_Oh0a`0@Z_O`0a`0I[_O7``04Z_OM_`0>\\_OB\\`0l0^_OTO]`0Y1[_OgNa`0d1X_O\\Ne`0l1V_OTNg`0S2U_OmMi`0X2T_OiMi`0\\2T_OdMj`0a2S_O_Mj`0g2S_OYMj`0o2R_OPMi`0Z3R_OfLi`0f3P_OZLf6[OgKe4_MoKe61YKW4nMhKe6b0mJl3[NbKe6j0iJh3aN^Kc6o0gJg3dNZKb6U1eJe3gNVKb6Z1bJd3kNQK_6c1`Ja3nNlJ_6k1[J_3SOfJ]6U2WJ]3XO^J]6`2oI\\3_OTJ^6j2gI]3FiI`6Q3bI]3KbIa6V3^I^3O[Ia6\\3ZI^33VIa6`3XI^35RIb6c3UI_37nHc6f3RI_3fMPBU2U>jMlAQ2X>PNhAl1[>UNeAe1a>[N`A^1e>bN\\AV1k>kNUAo0P?bMZ[OmMf5\\4T?hMY[OhMd5[4W?mMY[OeM`5Z4Z?RNX[ObM^5Y4\\?VNX[O^M]5Y4]?ZNX[O[M[5X4`?]NV[OZM[5U4a?bNV[OUM[5U4c?fNT[ORMZ5V4c?hNV[OnLY5W4d?kNV[OiLY5Y4b?oNX[OcLX5\\4a?ROZ[O]LW5`4_?TOfAj0[>WOfAg0Z>ZOfAe0Z>\\OfAb0\\>^OeA`0\\>@eA>\\>BeA;\\>FeA7]>JcA3_>McAN`>2aAJb>6_AEd>=]A\\Oh>d0ZAWOi>i0YAROj>n0ZAlNg>V1]AcNe>]1_A]Nb>e1bATN_>m1fAlM[>V2iAbMY>_2mAYMU>h2UBkLl=V3`B[Lc=f3fBmK\\=T4P:1OO100O1O1O1O1N2O1O1O1O010N2O1N2K4M4O1O1O00100O100O1O1O001O1O100O010000000000O10000000000O100000000000000O100000O10000000O100000O10000000O01000000O10O10O100O100O10000O10000000000O100000000000000O101N1O100N3O0O1O100O101O0O100O1O1O1O2N100O101N101O001O1N101O001O0O100O1O1O1O1O2N100O100O2O0O2N1O2N2N2N2N1O2O0O2O1N2N1O3L3N2O1N2N2O1N2N2N;@V^e="}}, {"image_id": 124, "category_id": 1, "bbox": [390.0, 73.0, 229.0, 371.0], "score": 0.9999998807907104, "association_id": 2, "light": [-1.8832952976226807, -2.0687482357025146, 1.7391412258148193, 1.937930703163147], "segmentation": {"size": [533, 651], "counts": "d\\[68\\`02N2N2M2O2N2O0N3N1O2O0O2O1N1O2O001N100O2O001O1O1N10@g@EX?;j@CV?o@CP?=QABo>>QACn>=SADk>;WADh>=XADf>>YACf>=ZADe><\\ACc>>]ABc>?\\ABc>>]ACb>>^ABa>>_AC_>>bAA^>`0bA@]>b0cA\\O]>e0cAZO]>f0dAYO\\>g0dAYO\\>h0gATOX>m0kAPOU>P1lAoNT>R1lAlNU>T1f01O00001O001O00001UJgNXLY1a3VOWLk0^3E\\L;[31bL0[34cLL[38cLH[3;dLFY3>fLBW3a0hL_OV3d0iL\\OU3g0jLZOT3h0lLXOR3j0mLVOR3l0mLTOS3m0lLTOR3o0lLQOT3P1kLPOT3T1iLlNW3W1fLjNX3b1]L^Nc3l1SLUNl3^2`KcM_4e2[KZMd4P3TKPMk4Y3lJ`KfMf0[7n3oJWKcMQ1\\7l3TKZLi4k3PKYLn4n3gJYLW5P4WJZLh5n3gI\\LX6h3aI\\L_6g3ZI]Le6h3jHeLV7]60001O0O100000000O10000O100O00100N2O1N2O1O1O10O01O01OO10000N1O1M4H8J6N2O2O2M3L3M4M3N2O1N3N2N2M2O001O000O1000000000000000cIQKT1o4jNXKQ1h4lN`KABhLn4c3iK]OEgLb4X3dLHPOlL\\4S3PMLiNmLX4U3SMJjNnLS4V3VMJkNmLo3X3XMGoNlLk3\\3ZMCPOmLg3^3^M@]4>jK[OX4c0mKYOT4e0PLXOQ4h0RLSOP4n0SLlNo3U1ULcNn3FfHIa39k3LkHG\\38k3OoHEY38i32QIEV37j33RIGU31k35UIIV3Hh3]1UAeNi>\\1XAdNf>]1^A`N`>a1`A_N_>b1aA_N^>a1bA_N^>a1bA`N]>`1cA`N]>`1dA^N\\>c1;00000000000O10000O100O1O0O2N2_JlN_KV1[4SOaKm0^4WO_Kj0`4XO^Ki0a4YO^Kf0c4[O[Ke0e4^OXKa0j4BRK=P5GjJ8X5LcJ4_5O\\J1f51VJ:`5I^J=[5EcJ>Y5FeJ;X5IfJ7Y5LeJ4Y51cJ0\\54aJL^56aJJ_58_JHa5:\\JGd5;YJFg5=UJCl5P1_IRO`6_1mHdNS7c1dH^N]7d1_H^Na7d1\\HSMVOG]8Y3ZHPMYOH\\8\\3VHmL^OH[8g3iGbLNGX8_5hGdJU8]5lGcJR8^5nGcJP8^5PHbJQ8]5PHcJo7^5oGcJR8]5nGcJQ8^5nGcJR8]5mGcJT8\\5mGdJR8]5mGdJS8o6O001O1N2M2O100000001O0O1N3N1O101O00001O1N1OWNbH_J\\7b5dH_J[7a5fH^JZ7b5gH^JY7b5fH^JZ7c5eH^J[7b5eH]J\\7c5cH]J^7b5cH^J\\7c5dH\\J]7d5cH\\J]7d5bH\\J^7e5bH[J]7e5dHZJ]7f5bHZJ^7g5bHYJ]7_7O2N11O000YNeHUJ\\7i5fHVJZ7g5iHZJW7c5lHZJV7e5kHSJ^7k5dHRJ_7l5bHTJ_7h5eHXJ[7a5lH^JU7h4eIXKZ6b4mI]KT6`4oI`KQ6^4QJaKP6]4RJbKo5^4QJbKo5]4RJcKm5^4TJaKl5^4UJbKk5^4UJbKj5^4WJaKj5_4WJ`Ki5`4WJaKf5b4YJ^Kf5e4XJ\\Kc5i4\\JXK_5m4aJRKZ5U5dJkJY5Y5fJgJX5[5hJeJV5^5iJaJW5a5hJ^JX5e5fJYJ[5j5cJUJ\\5S6^JlI`5^6ZJiI\\5]6bJdIZ5\\3eIYNR1ZNV5\\3PJWNj0[NU5\\3UJYN`0aNY5T3[J[N5gN^5k2dJi0Z5SOlJl0S5QOTKm0j4QOZKn0d4QO`Kn0_4QOcKo0\\4POfKo0Z4oNhKQ1X4mNlKQ1T4mNoKR1Q4lNRLS1n3lNULR1k3mNXLQ1h3nNZLQ1f3nN\\LQ1d3oN^Ln0c3RO^Lm0b3SO`Lk0`3UObLh0_3XObLg0^3YOdLe0\\3[OfLb0[3@dL`0[3CdL;\\3HcL7\\3NbLO^3hL^O\\3>lLZOW3c0`6M3M4L_V_5"}}, {"image_id": 124, "category_id": 1, "bbox": [303.0, 85.0, 169.0, 278.0], "score": 0.9999991059303284, "association_id": 3, "light": [-2.0004258155822754, -2.245900869369507, 1.9497029781341553, 2.0678341388702393], "segmentation": {"size": [533, 651], "counts": "mQn43a`02N101O0000001O000000000000001O0000001O01O01O0BJ\\@7Z?9`@G]?j0N2N2N200O1O001O1O1N1SLhN^HX1_;1bJbNdKU1gJPOb90eKQ1iJoN^95gKl0kJoN^97fKi0lJQO]97eKS1\\4mNcKT1]4mN^KV1c4jNZKY1e4hNYKZ1h4eNVK\\1k4dNSK]1o4bNnJa1S5^NkJT1cKkNd9OfJW1gKjNe9NbJX1kKjNc9NaJW1mKkNd9M^JW1oKlNe9LZJY1RLkNd9KYJZ1TLlNd9IVJ\\1WLjNe9IRJ^1YLjNe9GRJ^1ZLkNg9CPJ`1oKeN48Q>R1lAiN06R>Q1oA[OQ>d0PB]On=c0SB]Ol=c0UB]Oj=c0WB]Oi=c0XB]Og=b0[B]Od=d0]B\\Oa=c0bB]O\\=`0iB@V==nBCQ=WDAi;?XDAg;?ZDBc;`0^D_OV9_O[GT1@^OcNZOX:6cGR1C_O`NZOZ:6`GR1GEi8YO_GQ1JFh8XO]GQ1NFe8YO[GR11De8ZOXGS15Bd8ZOUGU19_Oc8]ORGU1;^Oc8^OPGT1?]Oa8@lFT1e0\\O_8AhFT1l0ZO]8CbFU1S1VO[8H^FS1X1UOZ8KXFS1_1QOX85hES1P2gNY8^2hGaMW8`2iG_MW8b2jG\\MU8h2jGWMU8l2iGTMV8n2iGQMW8R3hGmLX8T3hGjLX8X3gGgLZ8[3eGcLg6FjHm39]Lk6;XH`3f0TLR7?VH_3f0RLS7b0TH^3i0oKS7d0QHa3j0jKV7f0lGe3m0dKW7h0gGk3o0]KZ7j0ZGV4Z1PK\\7T6cHlI\\7V6cHjI]7X6bHgI^7[6`HeI`7]6^HcIb7^6^H`Ic7a6\\H_Id7a6]H^Ic7c6\\H]Id7c6^H[Ib7f6V1002O0O3M1OQNgFdLW9Z3QGaLn8\\3XGcLf8Y3`GhL]8U3hGmLU8VOnFi2R1QN_OdN`7`0SHg2R1TNSOmNh75WHf2Q1\\NfNnNS8MZHd2Q1ZOf6fMgHj2g0_Oj7=YHBi78\\HFg74^HKe7nNaIo0i6aNaI[1o:L3N2N3M2O2N2M2O2M3L8H8H4K5K5Jbkl2"}}, {"image_id": 125, "category_id": 1, "bbox": [259.0, 33.0, 524.0, 663.0], "score": 0.9728025197982788, "association_id": 1, "light": [-2.0413410663604736, -2.0374653339385986, 1.8488671779632568, 1.8117969036102295], "segmentation": {"size": [768, 1024], "counts": "\\mR63jg05K5M3M2O1N100O2O000O10000O100O100O00100O100O10000O10000O0100O001O00001O00000001O0010O0100O010O10O00010O00001N1O101O00001O01O0100O010O0001O000000O01O100O101O0010O010O01O010O00001O0mDTOQOn0m0ZOlMLoFo0R;\\O`Mk1^2\\N[Mf1c2aNWMa1e2eNYMZ1d2kNZMV1d2mN[MR1d2QO[Mo0d2RO[Mn0d2UO[Mk0d2WO[Mh0f2WOZMj0e2WO[Mh0e2XO\\Mg0d2YO\\Mh0c2XO^Mg0b2YO^Mg0b2YO_Mf0`2[O`Md0`2]O`Md0^2\\OcMd0\\2]OdMc0[2^OfMb0X2_OhMa0W2@jM`0T2@mMa0Q2@PN?o1ASN?j1BWN?g1A[N>d1B^N>_1BcN?[1AgN>W1DiN=U1CmNm0BTO>j0BWO>h0BYO?e0B\\O>b0B@>=CD=6BL>3CL>3BL?5@Ka04@Jb05_OIb06_OIc06^OIc05_OJa05@L`02BoIaNd1n1[4CeIUOf1W1d4EeIZOc1Q1g4FeI\\Oa1n0i4HdI]Ob1k0i4HeI_Oa1j0h4HfI@a1h0h4IfIA`1g0j4GfID_1e0j4GgIF^1d0i4FiIH\\1c0j4FhIJ]1`0j4FiIMZ1?j4EkIOZ1X1Mn4EhIb0Y1In4FhIc0X1Ho4EhIf0X1Eo4FhIg0X1Dn4FhIi0X1Bo4FhIi0Y1An4HgIi0Z1_On4IgIi0[1^Om4KeIi0^1\\Ok4NeIh0_1ZOk4OdIi0a1XOh43eIg0b1VOg46eIe0d1VOd48fId0d1UOe4:cId0g1ROd4=cIb0i1QOc4`0aIa0k1oNc4c0_I`0m1mNc4e0^I`0n1kNc4h0[I`0Q2hNd4j0XI`0S2fNd4l0WI`0T2dNd4P1nHd0\\2]Ne4R1gHh0c2VNd4g6[KZIc4h6\\KXIb4j6^KVI`4m6^KTI`4o6_KQI_4Q7`KQI^4Q7aKoH^4R7aKoH^4S7aKmH^4T7aKmH^4T7aKnH]4T7aKmH^4T7bKlH]4U7bKmH[4U7eKkHY4W7fKkHW4X7hKhHU4[7kKeHS4]7lKeHQ4]7oKbHP4a7oK_HP4b7PL^Hn3d7RL\\Hm3e7SLZHm3h7RLXHm3i7RLXHm3j7RLVHm3l7RLSHm3P8RLPHm3R8RLnGl3U8RLlGm3W8QLhGn3[8QLeGn3^8PLbGo3`8oKaGP4a8oK_GP4c8nK^GQ4c8oK]GQ4d8mK\\GS4\\2ZJMb1gMT4o1mJ4n0nMT4i1[K2a0UNT4g1cKO7[NU4d1hK03\\NU4a1lK3M]NW4]1PL5I^NV4[1UL7D^NW4W1ZL:^O`NW4U1^L;ZO_NY4T1`L=UO`NZ4S1bL=TO`NZ4R1dL>POaN[4Q1fL?nN`N\\4P1hL?lNaN[4P1jL`0jN`N\\4o0kLb0gN`N^4l0mLe0dN_N_4k0oLf0aN_N`4i0QMi0^N]Nb4h0RMk0\\N]Nb4e0UMo0XN\\Nc4`0ZMU1RNZNe4=]MZ1mMYNf4:`M^1iMWNh47cMb1eMWNh45eMe1bMUNj44gMg1^MTNl43hMi1\\MTNl42iMk1ZMRNo40iMn1XMRNQ5MhMQ2VMRNT5JgMU2UMQNU5GhMX2SMQNW5BiM]2PMPNY5@iMa2mLoM\\5YOlMh2hLoM]5SOPNn2dLnM^5mNSNU3_LmMa5gNUN\\3ZLmMc5bNVNa3WLmMd5^NWNf3ULlMg5YNVNk3SLkMj5VNUNo3QLkMk5TNUNQ4QLjMl5QNUNU4oKiMP6mMSNZ4mKiMR6hMTN_4jKhMW6bMRNf4gKgM`6mLWN\\5YKgMeW4PBiKQ>V4oAkKQ>T4oAlKR>S4oAmKQ>R4oAnKR>R4mAoKS>P4nAoKS>P4nAPLR>P4mAQLS>n3nARLR>n3nAQLS>n3mASLS>m3mASLS>l3nASLS>l3mAULS>k3mAULS>j3mAVLT>i3mAVLT>i3lAXLT>g3lAYLU>e3mAZLT>e3mAZLT>d3mA]LS>b3nA]LT>a3mA_LS>`3mAaLS>^3nAaLS>_3mAaLS>^3nAbLR>^3nAbLR>^3nAaLS>^3nAbLR>^3mAcLS>]3mAbLT>^3lAbLT>]3mAbLT>^3lAaLU>_3kAaLU>_3kA`LV>_3kA`LV>`3jA`LV>`3jA_LW>a3iA_LW>`3jA`LV>`3jA_LX>_3iAaLW>_3iAaLW>^3jAbLV>]3kAbLV>^3jAbLV>]3kAcLU>\\3kAdLV>\\3jAdLV>[3kAdLW>Z3jAfLV>Y3kAfLV>Y3kAfLV>Y3kAgLV>W3jAiLX>U3iAkLX>T3hAkLZ>S3gAmL[>P3fAoL\\>P3cAQM_>l2bATM_>k2aAUM`>i2aAVMa>i2^AXMc>f2^AZMc>e2]A[Md>c2\\A^Md>b2\\A^Me>a2[A_Me>a2ZA`Mf>_2[AaMe>_2[AaMe>_2[AaMe>_2ZAbMf>]2[AcMf>\\2ZAdMf>\\2ZAdMf>\\2ZAdMf>[2[AeMe>[2[AeMe>[2ZAeMh>Z2XAfMh>Y2YAgMg>Y2YAgMg>X2ZAhMf>X2ZAhMg>V2ZAjMf>V2ZAjMf>U2[AkMf>T2ZAlMf>S2ZAnMf>Q2[AoMf>P2ZAPNf>o1[AQNf>m1[ASNe>l1\\ATNe>k1[AUNe>k1[ATNg>j1YAWNh>h1XAXNi>g1WAYNj>f1VAZNk>e1UA[Nl>d1TA[Nn>d1RA\\Nn>d1RA\\No>c1QA\\NQ?c1PA\\NQ?c1o@\\NR?d1n@\\NS?b1n@^NR?b1n@]NT?a1m@_NU?]1m@cNT?Y1o@gNS?T1PAkNS?P1PAPOS?f0TAZOY?NRA2^c000O10000000000O1000000O1000000O10001N10000O1O100O2O0O100O101N1O100O101N100O2N101N3M2M4M3L8DfXd5"}}, {"image_id": 126, "category_id": 1, "bbox": [398.0, 534.0, 131.0, 284.0], "score": 0.9999998807907104, "association_id": 3, "light": [-2.381636142730713, -2.225397825241089, 2.2714712619781494, 2.115941286087036], "segmentation": {"size": [960, 1280], "counts": "fle;1nm02O1O1O001O001O100O1O00011N1O1O010O4L2N001O0gIIj^O7k`04T_OMe`0:Z_OFc`0>\\_OCa`0`0^_O@``0c0__O]O``0e0__O\\O^`0g0j\\OROXO7mc0i0`\\O\\OAKoc0j0Y\\OBGEnc0l0U\\ODL@nc0R1gZOfN@[1j1mNnc0^4R\\OcKmc0^4Q\\OcKmc0_4S\\OaKkc0a4U\\O_Khc0d4X\\O]Kec0e4[\\O[Kdc0f4\\\\OZKbc0i4\\\\OXKbc0j4^\\OVK_c0m4a\\OSK]c0P5b\\OPK[c0S5d\\OnJYc0V5f\\OjJYc0W5g\\OiJXc0Y5f\\OhJZc0Y5e\\OgJ[c0Z5d\\OeJ]c0[5c\\OeJ]c0\\5b\\OdJ^c0^5a\\OaJ_c0a5_\\O_Jac0d5\\\\O\\Jdc0g5Q\\OaIPOf0Pe0m5d[OfI[O=Qe0V6T[OeIK4Qe0U7oZOkHQe0V7nZOiHSe0W7lZOjHTe0V7lZOjHTe0V7lZOiHUe0X7iZOiHWe0V7jZOjHVe0V7iZOjHXe0V7hZOjHXe0o7000O100O100000001N101O2M2O2M2O1mNZZOjIhe0U5dZOXJHb0he0n4X[ORKjd0j4W[OWKjd0g4W[OXKkd0f4V[OZKkd0d4V[O[Kld0b4V[O^Kkd0`4W[O^Kmd0\\4V[OdKmd0W4U[OiKnd0T3aYOmLc1Mod0h2WZOlLl0;Qe0_2_\\OaMdc0X2a\\OfMcc0S2a\\OmMac0o1a\\OPNbc0m1_\\OSNdc0i1]\\OVNfc0h1[\\OWNgc0f1Z\\OZNhc0d1X\\O[Njc0d1V\\O\\Nlc0a1U\\O_Nmc0_1S\\OaNQd0[1P\\OcNVd0W1k[OiNYd0R1h[OnN[d0n0f[ORO]d0k0c[OUOcd0e0^[OZOgd0a0Y[O_Oid0?X[O@kd08Z[OH`i0O0O2O1O0O2O001O1N2O1N2M\\Yoe0"}}, {"image_id": 126, "category_id": 1, "bbox": [938.0, 477.0, 129.0, 380.0], "score": 0.9999999403953552, "association_id": 1, "light": [-1.2445437908172607, -2.6809186935424805, 1.169887661933899, 2.594993829727173], "segmentation": {"size": [960, 1280], "counts": "Rn_k0>\\m0b0@;D8G9G6M4L4M2L9H7J4M2L?A8lXOiLSc0a3\\\\OjL`c0]3U\\OkLic0b3eZOdMZe0b5O1O1O2QZOSHge0T8O2N2N3L3N1O002N3M1O1N3[[OWGoc0f9G4KVNQ\\OfIlc0[6U\\OfIgc0[6\\\\OeIac0Y6c\\OiI\\b0XNR^Oj7IoIRb0eNg]OS7c0XJda0lN`]Oh6S1]J[a0Z6k^OeIUa0V6P_OkIo`0j5]_OUJc`0a5g_O_JX`0\\5n_OeJQ`0W5T@hJl?R5\\@lJd?Q5_@oJa?o4b@PK^?P5c@PK\\?o4g@PKX?o4l@nJT?R5l@nJT?S5l@mJT?R5m@mJS?S5n@mJQ?T5n@lJS?V5k@jJU?b5^@^Jc?f5Y@YJi?i5T@VJn?_6[_OaIg`0c6T_O\\Im`0g6o^OYISa0i6j^OVIXa0m6e^OQI_a0P7]^ObGjN[1kb0S7\\^OlHea0U7Z^OjHfa0X7]^OcHda0]7`^O^H`a0d7^^O\\Hca0f7Z^OZHga0h7W^OWHja0k7S^OUHma0m7Q^OTHna0m7Q^OSHPb0n7o]OQHRb0o7m]OQHSb0P8m]OoGSb0Q8m]OoGSb0R8l]OnGTb0R8m]OmGSb0S8m]OmGUb0P8l]OPHVb0m7l]ORHUb0k7m]OUHUb0h7l]OXHUb0f7m]OYHTb0f7l]OZHUb0U5i\\OYLS1bNVb0m4R]O[Li0iNWb0a3`^OYM_OUOTb0Q3[_OTMgNKPb0h2i_OnL]N:ma0c2m_OcLbNi0da0_2UBaMm=[2VBdMl=X2WBgMk=T2YBkMk=k1[BUNm=]1ZBbNk=S1[BmNi=k0[BUOXf001O001O1O001O001O1O001O001O1O000O2O0O2O0O2NckV6"}}, {"image_id": 126, "category_id": 1, "bbox": [833.0, 482.0, 123.0, 365.0], "score": 0.9999840259552002, "association_id": 2, "light": [-2.4673476219177246, -1.7701802253723145, 2.4308712482452393, 1.6633667945861816], "segmentation": {"size": [960, 1280], "counts": "W`]h0k0Pm0;G7H9F:G6K5K6K6J5K3K6J8I6L3L5J7J5L3M4M5J3S[ObKS`0a4i_OdKS`0a4i_O`KT`0f4g_O]KU`0h4g_OZK`?@S]O[5\\3VKU?3P]OQ5f3nJW?R6d@nIZ?X6a@iI_?Z6^@YIhL1ib0l6Y@RIQM0eb0U7T@iHZM2ab0Y7Q@dH_M3`b0[7o_ObHbM2_b0`7k_O^HfM3^b0d7g_OYHkM3^b0g7d_OVHnM4]b0h7c_OTHPN4]b0l7^_OQHUN3]b0Q8Y_OlGZN3]b0T8W_OhG\\N4]b0W8T_OeG_N4]b0h8m]OXGGOK3`b0g9c]OVFM3`b0h9c]OTFL5ab0g9c]OUFH7eb0e9c]OeF]b0[9c]OfF\\b0Z9d]OfF\\b0Z9d]OfF\\b0Z9e]OeF[b0[9e]OeF\\b0Z9d]OfF\\b0Z9e]OeF\\b0Z9d]OfF\\b0Z9d]OfF]b0Y9d]OfF^b0X9b]OhFbb0T9^]OmFhb0l8Y]OSGQc0c8o\\O]GVc0^8k\\OaGXc0g6^\\ORJ:WOZc0Y6T]OTJBC\\c0T6X]OVJ]OF\\c0n5_]OXJUOJ^c0a5l]OaJfNN_c0X5U^OhJ]NO_c0T5Z^OkJWN1`c0l4c^OPKmM4ac0f3k_ORLdL8ac0^3U@WL[L;ac0[3X@XLXL<`c0[3Y@YLWL<`c0[3Z@WLWL>`c0Z3Y@XLWL>`c0Z3Z@VLWL`0ac0X3Y@VLWLb0cc0V3U@XLYLa0ec0V3Q@WL[Lc0ec0V3i@iLY?Y3d@fL_?Z3^@gLd?Y3Z@fLi?Y3U@gLm?Y3R@fLR`0W3m_OiLV`0U3j_OjLZ`0R3f_OnL^`0n2c_OQMa`0k2__OUMd`0h2]_OVMf`0h2Z_OXMg`0f2[_OYMg`0d2Z_O\\Mg`0a2[_O_Mh`0[2\\_OdMg`0U2]_OkMg`0i1a_OVNc`0]1g_OcN]`0S1i_OmN^`06X@IPg00O0100O01O1K5N2O10000000O10001N101O2M5KQn^9"}}, {"image_id": 127, "category_id": 1, "bbox": [339.0, 83.0, 236.0, 316.0], "score": 1.0, "association_id": 2, "light": [-2.1420860290527344, -2.4031598567962646, 1.949711561203003, 2.110860586166382], "segmentation": {"size": [520, 644], "counts": "oY\\5c0[?c0F4K4M3M3K8J5K3M3M2N2M4L8jBjMl;^3L3L3N1N4Mf0YO8I2M3M1O1O2N1O100O2O000O100O100N2O1gEYJo9X6TFhIL3S9X6kFTJS9b6O1N2N2N1M4M2N3N1O1O1N2O1O2O0O100O1O100O2N1O001O100O100O011O001N101O1O1O0O2O1O1O1N2O1O001O1N2O1O1O1N101O1O1O1N2O001O001O1O1N2O001O0000001O01O0001O1O1N101N101O00000010O0001O001O1N101O000000001O0O1000001O00YG_Ih7`6THmId7R6ZHRJe7m5YHVJf7j5YHXJf7h5YHZJg7e5XH_Je7a5ZHbJd7^5\\HcJc7]5\\HeJc7[5]HeJc7\\5[HeJY4mNbN^6TMgJR4POlNY6QMhJk3TOWOU6lLhJi3SO_OU6fLjJh3POFW6^LlJj3gN0]6ULnJQ3cN_M1^3^6PLPKn2kN\\MFj3`6jKQKk2[O\\1Y7aNiH`1W7^NkHa1W7\\NjHd1V7[NkHe1V7XNlHi1T7TNnHl1R7RNPIn1P7QNRIn1o6oMUIo1k6PNXIn1i6PNYIn1i6nM[IQ2f6dMeI[2\\6\\MlId2V6WMnIh2T6TMoIk2S6PMQJo2Q6gLWJX3^9O001O001O1O1O001O0O101O000O101N100O2O1N2O1O0O2O001O0O3M1O2N2O0O2O0O3N1N2O1N1O2O1N2O1N3N1N2O1N2N2N2N3M2O1N2N2N4J]gR1"}}, {"image_id": 127, "category_id": 1, "bbox": [189.0, 4.0, 82.0, 145.0], "score": 0.8397127389907837, "association_id": 3, "light": [-1.645167350769043, -2.6983108520507812, 1.4507813453674316, 2.4414427280426025], "segmentation": {"size": [520, 644], "counts": "UQP38h?`0F4J7H;I3kNiNPCa1jSOcAm0k>02L6TOg@>\\im5"}}, {"image_id": 127, "category_id": 1, "bbox": [5.0, 220.0, 181.0, 150.0], "score": 0.9999805092811584, "association_id": 1, "light": [-2.5550384521484375, -2.165264368057251, 2.376115322113037, 1.9579235315322876], "segmentation": {"size": [520, 644], "counts": "ni2U2S>1N2O000@iMoBW2oTCBlgCB[<;fCF[<7aCLjN2O002O0O1O2N2N1O2N2N2N4KQYX7"}}, {"image_id": 128, "category_id": 1, "bbox": [435.0, 274.0, 171.0, 107.0], "score": 0.999999463558197, "association_id": 1, "light": [-2.2595629692077637, -1.9733171463012695, 2.1358323097229004, 1.8013217449188232], "segmentation": {"size": [600, 800], "counts": "fUo74bb04M2N2N1O1^_OHd>9SA0k>1l@9S?Hj@;U?Eh@>X?Ce@`0Z?@d@b0\\?^Ob@d0^?]O`@d0`?\\O_@d0a?^O]@b0d?_OZ@a0g?@V@4C@X`0>Q@2^`0O`_O1a`01[_O1d`0Q110O10O02O1a_OZNi?j1P@\\Nm?Z2M2O00000O1000nNX@TOh?j0\\@YNMe0g?m0l@nNT?m0TAoNm>P1VAnNj>Q1WAoNi>P1\\AjNf>U1^AfNd>Y1^1O1O10000000000001O001O00001O001O1O0000001O000f_ObNZ?^1e@cN[?]1d@dN\\?\\1a@gN_?X1_@kNa?U1^@lNb?T1^@kNc?U1]@jNd?V1\\@jNd?W1Z@iNf?X1Z@fNh?Z1[@aNg?_1i01V_OPOi?R1n_O[Ol?l1M1O1O000O010000O100mN^@`NL0g?^1^@eNKHj?c1[@eNo?Z1R@gNm?Y1S@gNm?Y1R@iNm?W1S@iNm?W1S@iNm?X1R@hNn?Y1Q@gNo?\\1n_OdNR`0`1k_O_NT`0d1j_O\\NV`0e1j_OZNV`0g1k_OUNV`0n1i_OPNX`0S24mNg_OKW`02n_ONo?OV@Nl?O\\@Kd?2d@IVO^OP`0i0n@FPOEo?e0SADoNGn?e0VA@lNLn?d0[AWOfN9P`0`0]AAb>`0^A@b>`0]A@d>`0\\A@d>a0[A_Oe>a0[A_Oe>b0ZA^Of>c0YA]Of>e0YA[Oh>d0XA\\Oh>e0WA[Oi>g0UAYOk>h0TAWOm>i0SAWOn>h0RAXOo>g0QAYOR?d0n@\\OX?>h@A\\?1PA0P?2n@NR?7i@IW?9f@HZ?:d@F]?:b@F^?=^@Cd?=[@Ce?>Z@Ah?>W@Ci?=W@Bk?>S@Cm?=S@Co?;Q@DR`09o_OGT`06k_OK[`0Nf_O2^`0Ge_O9]a000000000000000O10000000O10O1000000O10000O10000000O1000000000O10001N10000O1Fd]O8`b0L[hQ<"}}, {"image_id": 128, "category_id": 1, "bbox": [267.0, 314.0, 214.0, 123.0], "score": 0.9999921321868896, "association_id": 3, "light": [-2.6084887981414795, -0.788404107093811, 2.5557103157043457, 0.6139570474624634], "segmentation": {"size": [600, 800], "counts": "]il48^b09F3M3O1O01O1O0010O0n_O@m=a0oADl=`0jAJS>9gAMU>7jAJS>9kAIT>:hAHW>;dAG]>;]AIb>:XAHj>:RAGn>b0i@^OU?m15N3O2O10O10O1000O101N2O2M8H4M1O1OfNUAhNj>R1bAhN]>X1fAgNY>X1jAgNU>X1PBcNQ>[1VB`Nj=_1[B\\Nf=c1^BYNc=g1_BWNa=i1bBRN`=m1f10000000001O01O00000000001O01O000O10000001O01O01O0O2O1O0`@UNS>l1hAYNW>h1QAQN7:g>g1o@VN35m>h1k@VN72m>[2QAeMo>R30001O\\Oo@`MR?[2VA`Ml>Y2cA^M^>S2Z1O2O1O1O100O101O0001O0V@]N_>c1`A_N`>a1_A_Nb>a1]A_Nd>c1YA]Ng>g1UAZNk>h1RAWNP?i1PAVNQ?k1m@UNT?n1h@RNY?U2`@jM`?Z2_@cMb?^2b@\\M_?d2`@\\Ma?f2]@YMd?i251O0O11N2O1N2N1O1O2N5K3M1O1N2O6I6J2N2N2O2MT1mN0Hi]O0Vb08010000O1000O10000O010O1000O010000O1O01000O1O100O010O100000000O1000O100000O01000000O1000O10000000O010000O100O010O10O10O10O0100000000O100000001N10002LQaj5"}}, {"image_id": 128, "category_id": 1, "bbox": [190.0, 296.0, 100.0, 110.0], "score": 0.9836001396179199, "association_id": 4, "light": [-2.3263683319091797, -1.707779884338379, 2.288431167602539, 1.5487867593765259], "segmentation": {"size": [600, 800], "counts": "mf_34cb0100O2O0O10000O1fM9cAFV>`1l@`NR?h1h@XNU?R2c@nM[?X2b@hM]?[2a@eM_?[2a@dM_?]2a@bM_?_2a@aM^?`2b@_M_?a2a@_M_?`2b@`M^?^2c@cM\\?c1e@aN6LU?Z1hAgNV>W1mAiNS>V1nAjNR>V1mAkNS>T1nAkNS>V1lAjNT>W1jAjNV>W1iAiNW>X1hAhNW>^1dAbN\\>e1]A[Nc>g1[AYNe>h1ZAXNf>l1VATNj>P2RAPNn>Q2QAoMo>R2PAnMP?U2m@kMS?V2l@kMT?U2k@kMU?W2i@iMW?X2h@iMW?X2h@hMX?Y2g@hMY?X1o@lNGLZ?W1RAlNCNZ?V1UAjNA0Z?U1XAiN^O2Z?U1YAiN[O4[?S1]AbN\\O;X?R1hAnNX>R1hAnNX>R1gAoNY>Q1gAPOX>P1hAPOX>Q1fAPOZ>P1fAPOZ>P1fAPOZ>P1fAPOZ>P1fAPOZ>Q1eAoN[>Q1gAmNY>S1aAaNUO9Z?[1WAcN^O1[?^2e@aM[?a2c@`M\\?`2e@_M[?b2d@^M\\?b2d@_MZ?b2e@_M[?b2d@^M\\?b2d@_M[?n21Bd@`M\\?^2e@bM\\?\\2e@eM[?Z2f@fMZ?Y2f@gM[?T2i@mMW?R2j@nMW?l1n@SNS?j1PAVNP?h1RAWNP?g1QAYNo>f1SAYNn>d1TA[Nn>b1WA[Ni>P1f@POd0Mh>P1k@mN>3h>n0oAnNU>P1l1M2N2N3L4L5Kf`Z9"}}, {"image_id": 129, "category_id": 1, "bbox": [106.0, 24.0, 404.0, 685.0], "score": 0.9999955296516418, "association_id": 1, "light": [-1.6402177810668945, -2.001624822616577, 1.4883805513381958, 1.9000749588012695], "segmentation": {"size": [800, 616], "counts": "XSc2j4Pd0V1kN;F8I7J5L3M2N3M2O1N2N101N2O001N101O1O1O2N1O2M3N2N1O2N1O1O00001O0O101O0000001O0O101O001N2O001N2O001N2O1N101N2N2N2SJ]GZKd8c4bGYK`8c4fGYK\\8c4jGYKW8e4mGYKT8d4PHYKQ8e4SHYKn7d4VHZKk7d4XHYKi7f4ZHXKg7e4\\HZKd7nKQGj7\\1WLd7mKSGi7[1YLc7mKUGf7Z1\\La7mKXGd7Y1]L`7oKXGc7Y1]L`7oKXGb7Z1^L^7oKZGb7Y1]L_7PLZGa7X1]L_7QL\\G`7V1^L^7RL`G\\7T1_L]7ULdGV7R1bL\\7WLcGV7T1_LZ7ZLeGU7S1]LZ7^LcGU7T1[L[7_LbGU7U1YLZ7bLbGT7U1WL[7eL`GT7V1TL\\7hL_GS7V1SL]7iL]GT7W1PL_7kL[GT7W1oK_7nLZGR7X1mKa7PMZGP7W1lKb7SM[Gm6U1lKd7UMYGm6V1iKd7YMWGm6Y1dKc7^MUGm6]1^Ka7eMRGl6`1YKb7jMnFm6c1iIm8YOaEm6d1`IS9CYEl6h1WIV9NQEk6c>UI^Aj6b>VI_Ai6a>XI_Ag6a>YIaAe6_>\\IdA`6\\>`IfA^6Z>cIfA\\6Z>eIfAZ6Z>fIgAY6Y>hIfAX6Z>hIfAW6[>iIfAV6Z>iIgAV6Z>jIgAU6Y>kIhAS6Y>mIhAR6Y>lIiAR6X>nIiAP6X>PJiAo5W>QJjAm5W>RJkAl5V>TJkAj5V>UJkAj5f`0O2N2N101N3M3N2M3N1N2O001O0O2O001O1O1N3N1O001O001O001O001O001O2N1O1N101O001O001O001O1O1O1O1O001O001O00gIiKjGV4R8mKoGS4n7PLSHo3k7SLVHl3i7ULXHj3f7WL\\Hh3c7YL^Hf3a7[L`Hd3_7]LaHc3^7]LdHb3[7_LeHa3Z7`LgH_3W7cLiH]3V7dLkH[3S7gLmHY3R7hLoHW3o6kLRIT3m6mLTIR3k6oLUIQ3j6PMWIo2h6RMYIm2f6TMZIl2e6UM[Ik2e6UM\\Ij2c6WM]Ii2b6XM^Ih2b6XMiDoN`2i3f8YMhDUOUNKo3f3T9ZMgDAT2U3U9ZMeDCW2R3T9[MdDEW2P3T9\\McDGY2l2T9]MbDHZ2k2T9]MaDJ[2h2T9^MaDJ\\2g2S9_M`DK]2f2S9_M_DM]2d2T9_M_D^OZNKT4W3S9`M^D]O^NLP4W3T9`M]D\\ObNLm3X3T9`M]D[OcNNk3W3U9`M\\D\\OdNMk3W3U9`MZD]OhNLh3W3V9`MXD^OkNLf3V3X9_MVD_OmNLe3V3X9_MTD@POLc3V3X9^MTD@ROLb3V3X9^MSD@TOM`3U3Y9^MRD_OWON^3U3Y9^MQD^OZOO\\3U3Z9]MPD]O\\O2Y3T3[9]MPD[O^O4W3T3[9]MoC\\O@2V3U3\\9\\MnC\\OA4T3T3]9\\MmC]OB3U3S3]9]MkC\\OD4T3S3]9]MkC\\OE4R3S3_9\\MiC]OG4Q3S3`9[MhC^OG5P3R3b9ZMgC^OH6o2R3b9ZMfC^OJ7m2Q3d9YMeC_OK7k2R3e9WMeC_OL8j2R3f9WMbC^O09h2R3f9WMbC]O1:g2R3g9VMaC\\O3G4N2N2N2N101M3N2\\XOPN_f0T2^YOnM_f0V2_YOkM_f0W2`YOiM^f0Z2aYOfM^f0[2bYOeM]f0]2aYOdM^f0]2bYOcM]f0_2bYOaM]f0`2cYOaM[f0a2dYO_M[f0c2dYO]MZf0g2dYOYMZf0l2cYOTM[f0o2dYOQMZf0R3eYOnL[f0S3dYOmL[f0T3eYOlLZf0V3eYOjL[f0V3eYOjLZf0X3dYOiL\\f0W3dYOiL[f0Y3dYOgL\\f0Z3cYOfL\\f0]3bYOcL^f0^3aYObL^f0`3aYO`L_f0a3`YO_L`f0b3_YO^L`f0c3`YO]L`f0d3`YO[L`f0e3`YO[L`f0m3000000000000000001O0000000000000000000000000000000000KaYOTL_f0l3aYOTL_f0l3aYOTL_f0l3aYOTL_f0l3aYOTL_f0l3aYOTL_f0l3aYOTL_f0k3bYOUL^f0k3bYOUL^f0k3bYOUL^f0k3bYOUL^f0k3bYOUL^f0k3aYOVL_f0i3bYOWL^f0i3bYOWL^f0i3aYOXL_f0g3bYOYL^f0g3aYOZL_f0f3aYO[L^f0d3cYO\\L]f0d3bYO]L^f0b3cYO^L]f0m31O000CaYOdL_f0i3000BaYOfL_f0Z3aYOfL_f0Z3aYOfL_f0Y3bYOgL^f0Y3bYOgL^f0Y3aYOhL_f0X3aYOhL_f0X3aYOhL_f0X3aYOhL_f0W3bYOiL^f0W3bYOiL^f0W3bYOiL^f0W3bYOiL^f0W3bYOiL^f0V3cYOjL]f0V3cYOjL]f0V3cYOjL]f0V3cYOjL]f0U3dYOkL[f0V3eYOjL[f0V3eYOjL[f0V3eYOjL[f0V3eYOjL[f0V3eYOjL[f0W3dYOiL\\f0W3dYOiL[f0X3eYOhL[f0X3dYOiL\\f0W3dYOiL\\f0W3dYOiL\\f0W3dYOiL[f0X3eYOhL[f0X3eYOiLZf0W3fYOiLYf0X3gYOhLYf0X3gYOhLXf0Y3hYOgLXf0Z3gYOfLXf0[3hYOeLXf0[3hYOeLXf0[3hYOeLWf0\\3iYOdLWf0\\3iYOdLWf0\\3iYOdLWf0\\3iYOdLVf0]3jYOcLVf0]3jYOcLVf0]3jYOcLUf0^3kYObLUf0^3kYObLUf0^3kYObLTf0_3lYOaLTf0_3lYOaLTf0P4O100000000O1000000000^OnYOaLRf0_3nYOaLRf0_3nYOaLRf0_3nYOaLQf0`3oYO`LQf0`3oYO`LQf0`3oYO`LQf0`3oYO`LQf0`3oYO`LQf0`3oYO`LQf0`3oYO`LQf0`3oYO`LQf0`3oYO`LPf0`3QZO`Loe0`3QZO`Loe0`3PZOaLPf0_3PZOaLoe0`3RZO_Lne0a3RZO_Lne0a3RZO_Lme0a3TZO_Lle0b3SZO^Lme0b3SZO^Lme0c3RZO]Lne0c3RZO]Lne0c3RZO]Lme0e3SZOZLme0f3SZOZLme0f3TZOYLle0g3UZOXLke0i3TZOWLle0i3UZOVLke0j3UZOVLle0j3SZOVLme0j3TZOULme0k3RZOULne0l3RZOSLoe0m3QZORLoe0n3RZOPLoe0Q4RZOmKne0S4RZOmKoe0S4PZOmKPf0S4PZOmKPf0S4QZOlKoe0U4PZOkKQf0T4oYOlKQf0T4PZOkKQf0U4nYOkKRf0U4nYOkKSf0U4lYOkKTf0U4lYOkKUf0T4lYOkKTf0U4lYOkKTf0V4kYOiKWf0V4iYOjKWf0V4iYOjKWf0V4jYOiKVf0W45O0000000000000000000000000ZNTZOcNle0R1dYOQNc0l0ie0P1kYOnM?Q1fe0o0fZOQOZe0l0jZOSOVe0j0oZOSOQe0m0R[OQOnd0n0Y[OlNgd0R1b[OfN^d0Z1g[O`N[d0_1i[O\\NXd0d1\\201N2O00100O1O1O1M3I7G9O1O1O100O1O1O1N2N2L4L4M3N2O10000O101N10000O10febh0"}}, {"image_id": 130, "category_id": 1, "bbox": [718.0, 492.0, 497.0, 268.0], "score": 0.9994879961013794, "association_id": 1, "light": [-3.032557964324951, -1.6773781776428223, 2.9779138565063477, 1.4535173177719116], "segmentation": {"size": [853, 1280], "counts": "dffb02;8lh0f1jNg0I7J5L3M4M2M3N2N2N3M4L4K7J6kYOhKb03mc0m4i[OTKUd0Q5g[OQKVd0T5g[OlJXd0V5f[OkJYd0X5e[OhJZd0Z5d[OgJZd0\\5e[OeJZd0[5g[OdJXd0^5g[ObJYd0^5g[ObJXd0`5g[O`JXd0a5h[O_JXd0b5h[O]JWd0e5h[O[JWd0f5i[OZJVd0h5i[OXJUd0U6O1O1N200O1O1O2O0O100O100O100O1O1N2O1O2M2N2O1O100O100O10000O10000000Gf\\OWIZc0i6f\\OWIYc0j6g\\OVIYc0j6g\\OVIYc0j6g\\OVIYc0j6g\\OVIXc0k6h\\OUIXc0k6h\\OUIXc0k6h\\OUIXc0k6h\\OUIXc0k6h\\OVIVc0k6j\\OUIVc0j6j\\OWIVc0i6j\\OWIVc0i6j\\OWIUc0j6k\\OVIUc0j6k\\OVIUc0i6l\\OWITc0i6l\\OWITc0i6l\\OWISc0j6m\\OVISc0i6n\\OWIRc0i6n\\OWIRc0i6n\\OXIPc0i6o\\OXIQc0h6o\\OXIQc0g6P]OYIPc0g6P]OYIPc0g6P]OYIob0h6P]OYIPc0g6P]OYIPc0g6P]OYIPc0g6P]OYIPc0f6Q]OZIPc0e6P]O[IPc0e6o\\O]IPc0c6P]O]IPc0c6P]O]IPc0c6P]O]IPc0c6P]O]IPc0c6P]O]IPc0c6P]O]IPc0c6o\\O^IRc0a6n\\O_IRc0a6n\\O_IRc0a6n\\O_IRc0R7000001O00000000000O100000000000001O000O1000000000000O10000000001O000O1000000000000000000O1000000000000000000O1000000O101O0O10ROZ]OmIeb0R7O100O100ORO^]OkIbb0U6^]OkIbb0U6^]OkIab0V6_]OjIab0V6_]OjIab0U700000000OQO`]OkI`b0U6`]OkI`b0U700000000000000000000O100000001O0000000000000000000000000000001O000000000000000000000000001O000000000O10000000000000mNe]OmIZb0W7000000000mNf]OkIZb0U6f]OkIZb0U6f]OkIZb0U6f]OkIZb0X700000nNf]OiIZb0W6f]OiIZb0Y700000000000000000000000000000000000001O01O00000000000000000000000000000000000000000001O0001O0TOf]O]IZb0c6f]O]IZb0c6f]O]IZb0c6f]O]IZb0c6f]O]IZb0c6g]O\\IYb0d6g]O\\IYb0e6f]O[IZb0e6f]O[IZb0e6g]OZIZb0e6f]O[IZb0e6f]O[IZb0e6f]O[IZb0e6g]OZIYb0f6g]OZIYb0f6g]OZIYb0f6g]OZIYb0g6f]OYIZb0g6f]OYIZb0g6f]OYIZb0g6g]OXIYb0h6g]OXIYb0h6g]OXIYb0h6g]OXIYb0h6g]OXIYb0i6g]OVIYb0j6g]OVIYb0j6g]OVIYb0j6g]OVIYb0j6g]OVIYb0j6g]OVIZb0j6f]OUIZb0k6f]OUIZb0k6f]OUIZb0k6f]OUIYb0m6f]OSIZb0m6f]OSIZb0m6f]OSIZb0n6e]ORI[b0n6e]ORI[b0n6e]ORI[b0n6e]ORI[b0d7000000000000000000000000000000001[Od]OoH\\b0Q7d]OoH\\b0Q7d]OoH\\b0Q7d]OoH\\b0Q7d]OoH\\b0Q7d]OoH]b0P7c]OPI]b0P7c]OPI]b0d7001O0]Ob]OoH_b0P7a]OPI`b0o6`]OQI`b0o6`]OQIab0n6_]ORIbb0m6^]OSIcb0l6]]OTIeb0j6\\]OUIeb0j6[]OVIfb0i6Z]OWIgb0h6Y]OXIhb0g6X]OYIib0f6W]OZIib0f6W]OZIjb0e6W]OZIib0f6W]OZIjb0e6V]O[Ijb0e6W]OZIib0f6W]OZIjb0e6W]OZIib0f6W]OZIjb0e6V]O[Ijb0e6W]OZIjb0e6V]O[Ijb0e6V]O[Ikb0d6U]O\\Ilb0c6T]O]Ilb0c6T]O]Imb0b6T]O]Imb0b6S]O^Imb0b6T]O]Imb0b6S]O^Imb0b6T]O]Imb0b6S]O^Imb0b6S]O^Imb0b6S]O^Imb0b6T]O]Imb0b6S]O^Imb0b6S]O^Imb0b6S]O^Imb0b6T]O]Imb0b6S]O^Imb0b6S]O^Imb0b6S]O^Imb0b6S]O^Imb0b6S]O^Inb0a6R]O^Iob0b6R]O]Inb0c6R]O]Inb0c6R]O]Iob0b6Q]O^Iob0b6Q]O^Iob0b6Q]O^IPc0a6P]O_IPc0a6P]O_IQc0`6o\\O`IQc0`6o\\O`IRc0_6o\\O`IQc0`6o\\O`IRc0_6n\\OaIRc0_6n\\OaISc0^6m\\ObISc0^6m\\ObITc0]6m\\ObISc0^6m\\ObISc0^6m\\OaIUc0^6k\\ObIUc0^6k\\ObIUc0^6l\\OaITc0_6l\\O`IVc0_6`00001O001O001O1O1O1O001O001O00001O00001O001O001O1N3N4L4L3M2N1O2N1O5K4K3N2N1N3N3aLZZOh1ne0^MQZOGjJBV5`0gJAY5a0eJ_OZ5d0dJ\\O\\5e0bJ\\O^5e0aJ[O_5f0`JZO`5g0_JYOa5nKeEY4i4Jc5kKfEZ4g4Kc5jKhE[4c4Le5gKkE\\4`4Me5fKlE]4_4Mf5cKnE`4Z4Nh5`KPFb4X4Nh5^KSF`0_Ob3d4a0]6kKREc3a4b0]6kKREd3_4b0l5^KQF=Bc3b4b0k5bKlE;Fa3c4a0k5gKgE]4]4Ml5c0UJ]Oj5d0VJ\\Oj5d0UJ]Oj5d0VJ\\Oj5c0WJ]Oi5ULeEa3a4;i5c0WJ\\Oj5e0TJ\\Ol5d0TJ[Om5e0RJ[Oo5f0PJZOP6f0oIZOR6g0mIYOS6g0mIXOT6i0jIXOV6h0jIWOW6j0hIVOW6k0iIUOW6l0hISOY6m0gISOY6m0fISO[6n0dIQO]6o0cIoN_6Q1aImNa6T1^IjNd6W1[IhNf6Y1YIgNg6Z1[FgJY1o3]8\\1RFRKZ1b3d8^1]EjKh1g2l8b3mF_LS9e3iF[LW9h3eFXL\\9i3cFVL^9k3`FVL`9l3^FSLc9n3\\FQLe9Q4XFoKi9T4TFkKm9[4lEfKT:`4fE_K[:d4bE\\K^:e4aE[K_:f4`EYKa:h4^EXKb:i4]EWKc:j4\\EUKe:m4XETKh:n4VEQKk:R5REmJo:U5oDjJR;W5mDiJS;X5lDgJU;Z5jDfJV;Z5jDfJV;[5iDdJX;^5gDaJY;c9000000000O100000000O100O100O10000O100000000O10000000000000000000000O100000001N100O1O101N2O1N2O3M4L4YCRDT<^9k@Go>i0g@WOP?W1j@iNg>i1WAWNb>R2[AoM\\>[2cAeMU>e2iA[Mo=n2PBRMj=U3TBlLj=X3TBhLj=[3UBeLi=^3UBcLj=_3UBaLi=c3UB]Lj=e3UB[L_:H[EQ44WL`:KXER46TL`:MVER48RLa:ORET4;mKb:3mDT4`0iKb:6jDT4c0fKc:9eDT4g0cKc:=aDS4j0aKd:`0]DR4n0^Ke:b0ZDR4P1\\Ke:d0YDQ4R1[Ke:f0VDQ4T1YKf:g0TDQ4U1YKg:h0QDP4X1XKg:i0oCQ4Y1VKg:l0mCo3\\1UKg:n0jCo3^1SKh:P1dCQ4d1oJh:Q1]CW4i1iJi:T1SC[4T2aJi:h7VEXHj:i7TEXHl:h7TEXHl:i7SEWHn:h7REXHn:i7QEWHo:i7PEXHP;i7oDWHQ;j7nDWHR;h7nDXHR;i7lDXHT;h7lDXHT;i7kDWHU;j7jDVHV;k7hDVHX;k7gDUHY;m7eDSH[;n7cDSH];o7aDQH_;P8`DPH`;R8^DnGb;T8\\DlGd;V8YDkGf;X8XDhGh;[8UDeGk;_8QDaGo;c8lC]GUM3NM3N2M3M4L5K4K6K7I3M2N2M2O1O1N102N2N101N2O1N2O0O1O0O1O1O1O1O1O1O1O1O001O1O1O1N2N2O1N2N3M2M3N2N2N1O2M2N3N1M3M4L3[Oe0M3M4M2N2N3M2M3M3L4L5K4K5L5K4M3M3N2N2M3N2N2O1N2O1O1N2O1O1O2M2N2N2N2O2N1OSFlGP3S8gLYHW3f7gL^HY3a7fLaHY3_7gLbHX3]7hLeHV3\\7jLeHU3[7jLgHU3Y7kLhHT3X7kLjHT3V7lLkHR3V7nLkHQ3U7nLnHP3Q7QMPIn2P7QMRIn2n6RMSIm2m6SMTIk2m6UMSIk2m6UMTIj2l6UMUIk2l6TMUIk2k6UMUIk2k6UMVIi2k6WMUIi2k6VMVIj2j6VMWIi2i6WMWIi2i6WMWIh2j6XMUIi2k6WMUIi2k6WMUIi2k6XMTIh2l6XMSIh2n6XMRIh2o6WMQIi2o6WMQIi2o6WMPIj2P7VMPIi2Q7WMoHi2R7fIcGi0Z1b5S7bIjGi0R1e5T7^IPHk0l0f5V7[ISHm0f0i5W7^HcGXOd0_2b0k5X7XHQHQO9l2fI_O]6>fI_O]6?eI]O_6a0dIZO`6c0dIXO`6f0cIUOb6h0aIROe6k0]IROg6SMTDR3X5G^76dHGa75aHHe71_HKj7L[HOm7IYH1Q8CYH4j8bNgGd0We\\3"}}, {"image_id": 132, "category_id": 1, "bbox": [77.0, 136.0, 190.0, 96.0], "score": 0.9999998807907104, "association_id": 1, "light": [-1.73689866065979, -2.01503324508667, 1.672275424003601, 1.9128930568695068], "segmentation": {"size": [428, 535], "counts": "h\\P13X=1O2O0O2N1O2O000O101N10000O101O00000O1000001O0000000O10001O00000000001N100000001O0000000RO4\\DL`;9_DG`;;`DD_;>`DB`;U1O1M3O100O1O1N2N2O1O1N2N200O10[ORElNn:i10ZOREnNn:R1REnNn:R1REnNm:i1000ZOSEmNl:T1TElNk:U1UEkNi:X1WEgNc:S20100O10_O`EVN`:k1aESN^:Q2`EnM`:_20000O10G`EfM`:Z2aEeM_:\\2`EdM`:\\2`EdM`:\\2`EcMa:]2_EcMa:]2_EcM`:^2`EbM`:^2aEaM_:^2bEbM^:^2aEcM_:]2aEcM_:]2aEcM^:^2bEbM^:^2aEcM_:\\2bEdM^:\\2bEdM]:]2cEcM]:\\2cEeM]:[2cEeM]:[2bEfM^:Y2cEgM]:X2cEiM]:W2bEjM^:U2cEkM]:U2bElM^:S2cEmM]:S2bEnM^:Q2cEnM^:R2bEnM^:Q2cEoM]:Q2bEPN]:Q2cEoM]:P2dEPN\\:P2dEPN\\:P2dEPN\\:P2cEQN]:n1dERN\\:n1dERN\\:n1dERN\\:n1dERN\\:m1eESN[:m1eESN[:m1eESN[:m1eESN[:m1eESN[:m1eESN[:m1eESN[:l1gESNY:m1gESNY:m1gESNY:m1gESNY:m1gESNY:m1hERNX:n1hERNX:n1hERNX:m1jERNV:n1jERNW:l1jETNV:l1jETNV:l1kESNU:m1kESNU:m1kESNU:m1kESNV:l1jETNV:l1jETNW:l1iESNW:m1iESNW:n1hERNY:m1gESNY:m1gESNY:n1fERN[:m1eESN]:n1aEQN`:R2\\EnMe:R2ZEnMf:S2YEmMh:Z23N2HTEkMn:T2501O2N1O100N2O1O1N2N101N2M3I6O2N101N2N1O101N1OYk_3"}}, {"image_id": 132, "category_id": 1, "bbox": [39.0, 138.0, 115.0, 65.0], "score": 0.9999991655349731, "association_id": 4, "light": [-0.6496228575706482, -3.9315378665924072, 0.591788113117218, 3.7057511806488037], "segmentation": {"size": [428, 535], "counts": "i_`02Z=0O2O001N10001O0O100000000O1000001O0000000000000000000000000O100000000@KiC5S<0lC0R<4lCLS<7lCHR<ADn;NaD>ADn;N_D`0CBn;N_D`0DAm;0RDM9b0HAm;4YDIAV<0QDe0o;ZOSD?HBUS3m@oLQ?^3b@fLZ?a3_@aL_?c3\\@_Lc?d3Z@^Le?e3X@[Lg?i3U@XLj?k3S@WLl?k3R@ULm?o3o_OSLP`0d401O0O10001O0000001O001OVOR@WLn?h3S@YLk?g3V@YLj?f3V@[Lj?e3V@\\Li?c3X@]Lg?d3Y@\\Lg?d3Y@]Le?d3[@]Ld?b3]@^Lb?c3^@]Lb?c3^@]La?d3_@]L`?c3`@]L`?c3a@]L^?c3b@^L\\?b3e@^L[?b3e@_LZ?a3f@_LZ?a3f@_LZ?a3f@`LY?`3g@`LY?`3g@aLX?`3g@`LY?`3g@aLX?_3h@aLX?_3i@`LV?a3j@`LU?a3j@`LU?a3j@`LU?a3j@_LV?c3h@^LW?d3h@[LX?l40001OnNUAdKk>^4WA_Kh>d4UA\\Kk>k4o@UKP?o4l@QKT?Q5k@nJU?S5k@lJU?T5m@kJR?U5o@jJQ?V5PAiJP?W5PAjJo>W5PAiJP?W5PAiJP?W5QAiJn>W5RAiJn>W5RAiJn>W5RAjJm>V5TAiJl>W5TAiJl>W5SAkJl>U5TAkJl>U5TAkJl>T5TAnJk>R5UAnJk>Q5UAPKk>o4VARKi>m4XASKh>l4XAUKh>j4XAXKg>g4TA_Kl>`50nNSAgKl>V4WAjKi>S4YAnKg>P4[AQLd>n3\\ASLd>l3ZAWLf>i3WAZLi>e3XA\\Lg>d3XA]Lh>b3YA^Lg>a3ZA_Lf>`3ZAaLf>^3[AbLe>^3[AcLd>]3[AdLe>\\3[AdLe>\\3[AdLe>[3\\AeLd>[3\\AeLd>[3\\AeLd>[3\\AeLd>[3\\AeLe>Z3[AfLe>Z3[AfLe>Z3[AfLe>Z3[AfLe>Z3[AfLe>Z3[AfLe>Z3\\AeLd>[3\\AeLd>[3\\AeLd>[3\\AeLd>[3\\AeLd>[3\\AeLd>[3\\AeLd>[3]AdLc>\\3]AdLc>\\3]AcLe>\\3[AdLe>\\3\\AcLd>]3\\AcLd>]3]AbLc>^3]AaLe>^3\\AaLd>_3\\AaLd>`3[A`Le>`3[A`Le>`3\\A_Ld>a3\\A_Ld>b3[A]Lg>b3YA^Lg>c3YA\\Lg>e3XA[Lh>f3WAZLj>e3VA[Lj>f3VAXLk>i3TAWLl>j3TAULl>k3TAULl>l3SATLn>l3RASLn>n3QAQLP?P4PAoKP?R4o@nKQ?S4o@lKQ?U4n@kKR?U4o@jKQ?W4n@iKR?W4n@hKT?X4k@hKU?X4k@hKU?Y4k@fKU?Z4k@eKV?\\4i@dKW?\\4i@dKW?\\4i@dKW?\\4i@dKW?W510001N1UOf@eKZ?Z4g@fKZ?W4h@iKX?U4j@jKX?S4j@mKW?n3m@RLT?j3o@ULS?h3o@XLR?e3PA[LQ?a3SA^Lo>\\3UAdLT?AW@o2k0_Me?V2]@jMf?Q2\\@oMf?l1^@SNd?h1_@WNd?d1_@\\Ne?]1_@bNe?Q1e@nN_??QA_OU?0WA0n>GWA8na000O4L6Ho`U2"}}, {"image_id": 133, "category_id": 1, "bbox": [155.0, 348.0, 143.0, 101.0], "score": 1.0, "association_id": 1, "light": [-0.9243478178977966, -3.9269468784332275, 0.8137478232383728, 3.7648026943206787], "segmentation": {"size": [683, 782], "counts": "eiW32Td00n\\O2ob08i\\OIQc0b0i\\O^OTc0j0g\\OVOXc0U1^\\OlN_c0X1_\\OiN\\c0\\1c\\OdN\\c0^1c\\OcN[c0g1N2N3N1O2O0O101N1O2L3O101NBX]O[Nhb0e1X]O\\Nfb0e1Z]O[Nfb0e1Z]O\\Ndb0e1\\]O[Ndb0e1\\]O\\Nbb0e1^]O[Nab0f1_]OZNab0f1_]O[N_b0f1a]O[N^b0e1b]O[N^b0Y201O0O2O000000^Oe]OUNYb0m1g]ORNYb0`200O10Cm]ObMSb0`2l]O_MSb0d2k]O]MTb0d2l]O[MTb0f2l]OYMTb0h2l]OWMTb0i2m]OVMSb0j2m]OVMSb0j2m]OVMSb0k2l]OUMTb0k2m]OTMSb0l2m]OTMRb0m2n]OSMRb0m2n]OSMRb0m2n]OSMRb0m2n]OSMRb0m2m]OTMSb0l2m]OTMSb0l2m]OTMTb0j2l]OWMTb0i2l]OWMTb0i2k]OXMUb0h2k]OXMTb0h2m]OXMSb0g2m]OZMSb0e2n]O[MRb0d2n]O]MRb0b2o]O^MQb0`2P^OaMPb0]2P^OeMPb0Z2l]OkMTb0U2k]OlMUb0S2l]OmMTb0R2l]OoMTb0d20\\Ok]ORNUb0n1k]ORNUb0m1k]OTNUb0l1k]OTNUb0l1k]OSNVb0l1j]OUNVb0k1j]OUNVb0j1k]OVNUb0j1k]OVNUb0j1k]OVNUb0j1k]OVNUb0j1l]OUNTb0j1m]OUNTb0k1l]OUNTb0k1l]OUNTb0k1m]OTNSb0l1m]OTNSb0l1m]OTNSb0l1m]OSNTb0m1m]ORNSb0n1m]ORNSb0n1m]ORNSb0n1m]ORNTb0m1l]OSNTb0m1l]OSNTb0m1l]OSNTb0m1m]ORNSb0n1m]ORNTb0m1l]ORNUb0o1j]OQNVb0o1k]OPNUb0P2k]OPNVb0o1j]OQNVb0P2i]OPNWb0P2j]OoMVb0R2i]OnMWb0R2i]OmMYb0S2g]OlMYb0T2g]OlMYb0U2f]OkMZb0U2g]OjMZb0W2d]OhM^b0Y2`]OgMab0Y2^]OgMcb0Y2]]OfMdb0Y2\\]OgMfb0W2Z]OiMhb0V2X]OhMlb0U2T]OkMnb0W22LP]OjMRc0U24N2N2M3N002L4L5]Ob0Ah[OB^d07`0K[^R:"}}, {"image_id": 133, "category_id": 1, "bbox": [2.0, 332.0, 131.0, 142.0], "score": 1.0, "association_id": 2, "light": [-1.6280016899108887, -2.5779125690460205, 1.5333406925201416, 2.4936516284942627], "segmentation": {"size": [683, 782], "counts": "lh1=nd01N3N1O1N2O0000001N10000N2000000O010jL;f@EY?=f@CY?a0d@_O[?i0V_O_Nh0h0P`0c1g_O^NX`0e1g_OZNY`0g1f_OYNY`0j1e_OVNZ`0Q2a_OnM^`0U2a_OjM^`0X2h_OaMX`0`2h_O_MW`0U3W_OjLi`0Y3T_OgLk`0[3T_OeLl`0\\3T_OcLl`0]3T_OcLl`0^3S_ObLm`0^3S_OaLn`0_3R_OaLn`0_3R_OaLm`0_3S_ObLm`0^3S_ObLm`0]3T_OcLl`0]3T_OcLl`0]3T_OcLl`0]3S_OdLm`0\\3S_OdLm`0[3S_OfLl`0[3T_OdLm`0[3S_OfLm`0Z3S_OfLm`0Y3S_OhLm`0X3R_OiLn`0V3R_OkLn`0T3R_OmLn`0S3Q_OnLo`0g300000O1000000000001O0000O010000000000O1000000YOn^OUMRa0k2n^OUMRa0k2o^OTMQa0l2o^OTMQa0l2o^OTMQa0l2o^OSMRa0m2n^OSMSa0k2n^OUMRa0k2n^OUMRa0k2n^OUMRa0k2n^OUMRa0j2o^OVMQa0j2P_OTMQa0l2o^OTMQa0k2P_OUMPa0k2P_OUMPa0k2P_OUMPa0k2P_OUMPa0k2Q_OTMPa0k2P_OTMQa0l2o^OTMQa0l2P_OSMPa0m2P_OSMPa0m2P_ORMQa0n2o^ORMQa0o2o^OPMRa0o2n^OQMRa0P3m^OoLTa0Q3l^OoLTa0R3k^OnLVa0Q3k^OmLVa0T3i^OlLWa0U3h^OkLXa0W3f^OhL\\a0X3d^OgL\\a0[3c^OdL]a0]3b^OcL_a0c3101N2L4O2O2M6J2L3M4B`0H6L6lNT]O\\O\\c0Cja`="}}, {"image_id": 133, "category_id": 1, "bbox": [673.0, 373.0, 95.0, 131.0], "score": 0.9999997615814209, "association_id": 3, "light": [-1.847043752670288, -2.0924441814422607, 1.7637934684753418, 1.9100244045257568], "segmentation": {"size": [683, 782], "counts": "e[Q>2Xe02O0\\MNa_O1WN1Vb00a_O2XNNUb04__O0\\NLTb07[_O1_NIVb06Y_O4`NFWb06R^OHb0`0SOB\\b03f]O;=8@ZO_b0o0k]OIFYOja01_^OW2HhMga04a^OS2GjMga08Z^OR2OfMea0P3[^OPM`a0U3_^OlLaa0T3_^OlLaa0U3^^OkLba0U3]^OmLba0S3^^OmLaa0S3`^OmL`a0S3_^OnL`a0S3`^OmL`a0S3`^OnL_a0_30001O00001O000000Ac^OPM]a0P3c^OQM\\a0o2d^OQM\\a0o2d^OQM\\a0o2d^OQM\\a0o2d^OQM\\a0o2d^OQM\\a0o2d^OQM\\a0o2d^OQM\\a0o2d^OQM\\a0o2d^ORM[a0o2e^OPM[a0P3e^OPM[a0P3f^OPMYa0Q3g^OnLYa0S3g^OmLXa0U3g^OjLYa0Y3g^OeLXa0h3O00000001O1O1O001O001O2N1O1O001O1C^^OnLda0o2\\^OSMda0Z31O1[O]^O`Mia0W2Z^OiMha0S2Z^OmMga0V1^^OcN16ha0o0P_OQOQa0Gi]Oo0W1ZOQa0Ej]Oo0W1[Oo`0El]Oo0U1\\Oo`0El]Oo0V1[On`0Gj]Oo0X1YOo`0m0R_OSOo`0l0R_OSOSa08c]OI\\1NTa0Hd]OO39V10ja0KY^O4`c0O001N1000001O1M[k8"}}, {"image_id": 133, "category_id": 1, "bbox": [309.0, 350.0, 52.0, 94.0], "score": 0.9999170899391174, "association_id": 5, "light": [-1.4819872379302979, -2.1245267391204834, 1.4484663009643555, 2.000270128250122], "segmentation": {"size": [683, 782], "counts": "o^^64Re0:J2N100j\\O@`a0b0^^O_Oaa0d0]^O]Oaa0e0^^O[Oaa0i0\\^OXOba0l0[^OTOea0R1T^OPOja0R1U^OnNka0T1S^OlNla0c1f]O]NZb0P2Z]OPNdb0S2Z]OmMeb0T2[]OlMeb0l0\\]O3NQOeb0l0b]OOHVOeb0k0d]OOGWOcb0i0`]O8MoNbb0g0c]O;LmN`b0i0b]OEib0Nj\\OS1;POib0Y1V]OgNjb0:m\\O:8]Ojb04[]O8KDjb03_]O6GGib00n\\OIc0`0EGjb00e]O:@Fkb0Of]O<^OFlb0Kh]O?\\OFlb0Ji]Oa0ZOEob0Gh]Oe0XODoc0=P\\OCPd0?n[OAgc0H^\\Oh0K@gc0I]\\Oh0K_Ohc0NX\\Oc00@fc0OY\\Oa01Aac0E`\\OU1OVO`c0P1_\\OQO`c0o0`\\OQO_c0_1O1O010O000000VNd\\Of1\\c0XNe\\OY1OSO`c0n0_\\ORObc0n0_\\OPOac0Q1_\\OnNac0S1_\\OlNbc0S1^\\OmNbc0U1^\\OiNcc0Y1\\\\OeNdc0]1]\\O_Ndc0c121N10O10O01O001O1O1O1O1O1O001O00000000000000O100O010O10000N2N1010O01N2O1O010O10000O2L3O1O1L4O100000^Ok\\OnNUc0P1P]OmNQc0R1Q]OlNob0S1U]OiNmb0e0i\\O]OQd0a0>K5M3L3N3M6JXh[6"}}, {"image_id": 133, "category_id": 1, "bbox": [121.0, 326.0, 57.0, 83.0], "score": 0.9475347995758057, "association_id": 7, "light": [-2.0679564476013184, -2.3939075469970703, 1.935437798500061, 2.1635429859161377], "segmentation": {"size": [683, 782], "counts": "QQa2b0hd04L2N3M2O2M3N2h[OnNSd0V1N2O4i\\OiNRb0X1l]OjNSb0Z1i]OfNWb0Z1i]OfNVb0\\1i]OdNWb0]1h]OdNWb0]1h]OcNXb0]1h]OcNXb0]1h]OcNXb0]1h]ObNYb0_1f]OaNZb0_1f]OaNZb0_1f]OaNZb0_1f]OaNZb0_1f]OaNZb0_1f]OaNZb0^1g]ObNYb0^1g]ObNXb0_1h]OaNXb0^1i]ObNWb0^1i]ObNWb0]1j]OcNVb0]1j]OcNVb0\\1k]OdNVb0[1j]OeNVb0[1j]OeNVb0Z1k]OfNUb0Z1k]OfNVb0Z1j]OdNWb0]1j]O`NWb0_1k0N20010M2M4O1N10002N1N2O1L5L3K9@Z[OJiUc<"}}, {"image_id": 134, "category_id": 1, "bbox": [445.0, 626.0, 266.0, 269.0], "score": 0.9943937063217163, "association_id": 2, "light": [-1.7264671325683594, -2.5995209217071533, 1.4819421768188477, 2.4385006427764893], "segmentation": {"size": [1033, 1198], "counts": "_gQ>1TP1?SPONin06UQO3cn0M\\QO8`n0FbQO=Zn0DfQO?Rn0GmQO;nm0HQRO;gm0LVRO7im0V1M2O2N1O2N1N2NQNeROT1Zm0n000O1`NiMlTOZ2oj0PNcTOX2[k0\\1N200O1O1N2N2N2N2N2O1O1O100N2M3L4M3N2O1O1O1O1O0O2M3K5M3O1O1O1O1O1O001L3K6N1O10001O001O1M3H8L3O2M3O1O1N2N1N3M3N2N2O1N2O1O100O1O100O01000O1000000000000000000000001O00000000000000000000000000000000000000000000000000000000000000000000O1000000000000000000000000000000O10000000000O1000000O10000O10000001O0000000000001O00001O0000001O00001O1O001O1O2N001O1O0001O01O00000000000001O000O2O00001N10000O2O000O100O10000O1000O1000O1000O11O001N2O1O001O1O001O001O2N1O8Hd0UIjWO[4[j0G4L3M3M2M5L7IR1mNb0_O4K2O1N2N2N3L3M:ET_Z?"}}, {"image_id": 134, "category_id": 1, "bbox": [1.0, 357.0, 273.0, 373.0], "score": 0.9399762153625488, "association_id": 4, "light": [-2.927389621734619, -1.8122938871383667, 2.83038067817688, 1.6247167587280273], "segmentation": {"size": [1033, 1198], "counts": "Sc1[1gn0h0\\O7J5K4L2N3L3L4L4N3M2aSOjLC10Nik0X3[TOQNJgNUk0Y3mTOYNQk0h1nTOYNQk0h1nTOYNQk0f1QUOZNnj0f1RUO[Nmj0e1TUO[Nkj0e1TUO]Njj0d1VUO]Nij0c1WUO^Nij0a1WUO`Nhj0`1YUO`Nfj0`1[UO`Nej0_1[UOcNdj0\\1]UOdNbj0\\1_UOdNaj0[1_UOfNaj0Y1`UOgN`j0W1bUOiN^j0V1cUOjN]j0U1cUOlN]j0S1dUOmN[j0S1fUOmNZj0S1eUOmN\\j0R1eUOnN[j0R1eUOnN[j0Q1eUOPO[j0P1eUOPO[j0o0fUOQOZj0n0fUOSOZj0m0fUOSOZj0l0gUOSOZj0l0fUOUOZj0k0fUOUOZj0j0fUOVO[j0j0eUOVOZj0j0fUOWOZj0h0gUOXOYj0h0fUOXO[j0g0fUOYOZj0g0fUOYOYj0h0gUOWOZj0h0fUOYOZj0g0fUOYOZj0f0gUOYOYj0h0fUOYOYj0h0gUOXOXj0i0hUOWOWj0j0iUOUOWj0l0hUOUOVj0m0jUOSOUj0n0jUOROWj0n0iUOROVj0o0iUOQOWj0P1iUOoNXj0Q1hUOnNXj0S1gUOlNZj0U1fUOkNYj0V1gUOjNXj0V1iUOjNVj0W1jUOhNVj0Y1jUOgNTj0[1lUOeNSj0[1nUOeNQj0\\1oUOcNQj0^1oUOaNRj0_1nUO`NRj0`1oUO_NQj0b1nUO\\NTj0e1lUOYNTj0i1lUOVNTj0k1kUOVNSj0k1nUOTNQj0n1oUORNPj0o1oUOQNQj0P2oUOPNPj0P2QVOPNni0Q2RVOnMni0R2SVOnMli0R2UVOnMii0S2XVOlMhi0T2XVOmMfi0U2ZVOjMfi0V2[VOjMci0X2\\VOhMei0W2\\VOhMdi0Y2[VOhMdi0Y2\\VOfMei0Z2ZVOgMei0Z2[VOfMdi0[2\\VOdMei0\\2[VOdMdi0]2\\VOcMci0^2]VOaMci0`2]VO`Mbi0a2^VO^Mbi0c2^VO]Mai0c2_VO]Mai0d2_VO\\Mai0c2`VO\\M`i0d2`VO]M`i0b2aVO]M_i0d2`VO]M`i0b2`VO^M`i0b2`VO_M`i0`2`VOaM`i0^2aVObM^i0^2cVOaM^i0^2bVOcM^i0\\2cVOdM\\i0]2cVOdM]i0[2dVOdM\\i0]2cVOdM]i0[2cVOeM]i0\\2bVOeM^i0Z2aVOgM_i0Z2`VOgM_i0Y2bVOgM]i0Z2bVOfM^i0Z2cVOfM\\i0[2cVOeM]i0[2dVOeM[i0[2eVOeM\\i0[2dVOdM\\i0\\2eVOdMZi0\\2gVOcMYi0]2hVOcMXi0\\2hVOdMXi0\\2iVOdMVi0\\2kVOdMTi0]2lVObMTi0_2lVOaMSi0_2nVOaMQi0`2oVO`Moh0b2QWO]Mnh0d2SWO\\Mkh0f2UWOZMih0h2WWOXMhh0h2YWOWMfh0k2ZWOUMdh0m2\\WORMch0P3]WOPM`h0S3`WOmL\\h0V3eWOiLXh0[3hWOeLSh0`3mWO`Lng0e3RXO[Leg0n3[XORL_g0T4aXOlKce0eNT[Od5YOgKbe0jNmZOc5AbKce0oNfYOa6g0`Jbe0S6^ZOmIbe0S6^ZOmIae0U6^ZOjIce0V6^ZOiIbe0W6^ZOhIbe0Y6^ZOgIbe0Y6^ZOgIbe0Y6^ZOfIce0[6\\ZOeIde0[6\\ZOeIde0[6\\ZOdIde0]6]ZObIce0^6]ZObIce0^6]ZObIce0^6]ZOaIde0_6]ZO`Ice0`6^ZO_Ibe0a6^ZO^Ice0b6^ZO]Ibe0c6^ZO]Ibe0c6_ZO\\Iae0d6_ZO\\Iae0d6`ZO[I`e0e6`ZOZIae0g6_ZOXIae0h6_ZOXIae0h6`ZOWI`e0i6aZOUI`e0k6`ZOUI`e0k6aZOTI_e0m6`ZORIae0n6`ZOQIae0o6^ZOQIbe0Q7]ZOnHce0T7\\ZOkHde0Y7YZOeHhe0_7gYOoGMb0\\f0S8aYOlG_f0W8_YOhGaf0\\8\\YOcGef0]8[YOaGgf0_8YYO`Ghf0_8ZYO_Ggf0a8ZYO]Gif0a8WYO]GQg0]8PYO`GUg0\\8lXOcGWg0[8jXOaGZg0^8;ZMZXOdLgg0X3_XOdLdg0V3aXOiL`g0R3eXOmL]g0n2fXOSM\\g0g2gXOYM\\g0a2fXO`M]g0[2eXOeM]g0V2fXOjM\\g0XOPXOi0e00^g0PORXOm0b02_g0lNRXOP1`05ag0eNSXOR1?8bg0_NTXOV1;;eg0VNXXO[15?gg0hM^XOg1La0[i0^OfVOa0[i0]OfVOc0[i0[OgVOd0Yi0\\OgVOd0Zi0ZOhVOe0Yi0ZOgVOf0Yi0ZOgVOg0Xi0XOjVOf0Wi0ZOjVOe0Wi0YOkVOf0Ui0YOmVOf0Si0YOoVOf0Ri0YOoVOf0Qi0YOQWOf0oh0XOSWOh0nh0VOTWOi0lh0WOTWOi0mh0UOUWOj0kh0UOWWOi0jh0WOXWOg0ih0XOXWOf0ih0YOZWOe0gh0ZO\\WOb0eh0]O^WO`0ch0@_WO>bh0A`WO]j0BdUO?Zj0AfUOa0Xj0_OiUOa0Vj0_OjUOb0Uj0^OlUOb0Sj0^OmUOb0Sj0^OmUOc0Rj0]OnUOe0Pj0[OPVOf0oi0ZOQVOi0li0XOSVOj0ki0VOUVOl0ii0UOVVOl0ii0UOVVOl0ii0UOVVOl0ii0UOWVOj0hi0YOVVOh0ii0YOWVOf0ii0[OWVOe0hi0\\OXVOd0gi0\\OYVOd0gi0]OYVOc0fi0^OYVOc0fi0^OZVOb0ei0@YVOa0fi0@ZVO?ei0EYVO;fi0V3N1O3M4SWO\\Img0b7M2O2N1O1O1N2O1O1N2O1O1O0O2O0000000O10000000001O00O10O1000O100O10000O10000[MRXOnLog0S3RXOkLng0U3TXOUKOf0mg0W4UXOkJgROBWm0`0iRO@Um0c0jRO^OSm0f0kROZORm0j0mROVOol0o0QSOPOil0Y1TSOgNgl0a1WSO^Ncl0i1\\SOWNZl0T2eSOlMPl0`2oSO`Mhk0h2YTOXM]k0Q3dTOoLWk0U3jTOjLQk0[3PUOeLfj0c3\\UO]L_j0f3cUOZLXj0j3iUOVLPj0P4PVOQLli0R4UVOnKii0S4XVOmKfi0U4ZVOjKei0W4\\VOiK_i0[4bVOeKYi0`4gVO`KVi0c4jVO]KRi0f4oVOZKlh0k4TWOUKih0n4WWORKgh0Q5XWOoJfh0S5ZWOmJeh0U5ZWOkJeh0W5ZWOhJfh0Y5ZWOgJeh0Z5[WOfJdh0[5\\WOfJch0[5\\WOeJdh0\\5[WOdJeh0\\5[WOdJdh0]5\\WOcJdh0^5[WObJeh0^5[WObJfh0^5ZWOaJfh0`5YWO`Jgh0e5UWOZJlh0a61O2M3N1O1N3N2oNYVOYKNYOji0Y5cVOZK^i0a4iVO]KVi0a4RWOYKPi0d4VWOWKlh0f4SWO]Koh0^4SWObKQi0MmUOf1k0_NG3>LYj00]WO1XN0am0O^RO1cm0M]RO4em0J[RO6gm0HYRO8ln0000000000000000000O10000000001O00001O000000001O0000000000000000000000O1000001O00000XPOEbo0;]POFco0:]POFco0:\\POGdo09\\POGeo08ZPOIfo0=00001O0IYPOLho03ZPOKgo03ZPOMgo01ZPOOgo0OZPO1PP1OYb7"}}, {"image_id": 135, "category_id": 1, "bbox": [42.0, 209.0, 671.0, 296.0], "score": 0.9999983906745911, "association_id": 1, "light": [-2.232517957687378, -1.7441082000732422, 2.1041007041931152, 1.6961593627929688], "segmentation": {"size": [544, 800], "counts": "\\gf095H?9n>2_@H`0:o>4k@2S?0d@^O3c0X?6e@LZ?n0N100O101O0O1000000O100000001O0O1000000000000O2O000000000000POPA0P?0RANn>2SAMm>2TANm>1TANl>2UAMk>3VAMi>3WAMi>2XANh>2YAMg>3YAMg>3YAMg>3YAMg>3YAMg>3YAMg>3ZALf>3[AMe>3[AMe>3[AMf>2ZANf>2ZANf>2ZANg>0ZA1e>O[A1f>NZA2f>M[A3f>L[A3f>K[A5f>JZA7f>G[A9g>DZABZA>h>[O]Af0^?00001O01O000001O0O1000001O0000001N10001O00001O001O001N1010O01O001O0010O01O011O000O010O00001O00001O01O000000001O0000001O001O1O1O1O0000001O0000000000001N100000000O10001N100O1O2N1O101O0O100O1000000O010O1O100O10OO2N200O1000O100000O010000O101N10000O10000O101N100M3O10001N1000000O1000000O2O000O100O101N100O10001O0O100000001N10000O2O0O100O2O0O2N100O1O2O0O10000O101O0O1000000O100O2O000O100O101N100O10000O100O2O00000O0100000O10000000000O10000000000000O010000000000000O10O10000000O100000000000000000000O10O1000000000000000O1000000000000O1000O10000000000O1000000O10000O1000000O100000001N0100000000000000000000000O10000000000000O10000000000000O10000000O10000000000O10000000000000000O10000000000000000000000O2O0000000000000000000O1000000000000O1TOSAEm>9WAEj>9WAGi>9WAGi>8XAHh>8XAHh>8YAGg>8ZAGg>9YAGg>9YAGg>9YAGg>8ZAHf>8[AGe>9[AGf>8ZAHf>7[AIe>7\\AHd>8\\AHm8KmK=VKHb8>PLJ_KG_8d0oKEbKF^8i0oK_OdKH\\8l0nK\\OfKHZ8o0THaNk2h0hLGX8R1RHbNm2e0iLGX8T1mGdNQ3a0jLGW8W1hGfNV3T8h2dJhLUMd0V8Q3ZJYL^Mj0V8P3\\JTL[Mo0X8o2^J\\Mb5e2[J]Md5e2ZJ\\Mf5e2XJ\\Mh5e2VJ\\Mj5d2UJ]Mk5d2RJ^Mn5d2nI]MS6h2cI]M]6[3gGhMZ8_50O100O1O1O1O1O1N2N2N2YOg0K5H7L5M3N3M2L5E;L4I7E;N2M3N101N1000001O01O0001O01O01O0010O1001OO5LU1_EkIl7b6\\GiIc8[700O010O000001O00001O00001O001O000O100O1O1TLZJYLj5`3o3O1O1O1O1O2O0O2N1O1N3N1N2O2O0O1O10001O0000000000000O1001O010O1O2N1O3M3M2N2N2N1O1O1O2N2N5K:F=ZDgKk9b4jEbKT:f4bE]K]:g4]E\\Kb:b5O1N2O1O001N_NTFQLk93RFE6R12UOe92[FVOd0U1@D`9NbH_O]Nc0P9M]J4a5M_J3a5L`J4_5LcJ3]5MdJ2[5OgJNZ51hJNX52jJKV56mJFT5:nJDR5;PKBQ5?QK^OP5b0QK[OQ5e0PKYOQ5g0oJXOR5h0oJUOS5k0a50000000000O100000000000000000000000O100000O100000000000000000001N2N1O2M4Jko]1"}}, {"image_id": 136, "category_id": 1, "bbox": [615.0, 558.0, 255.0, 222.0], "score": 0.9984943866729736, "association_id": 3, "light": [-1.9655581712722778, -2.3183467388153076, 1.8028098344802856, 2.1377885341644287], "segmentation": {"size": [1200, 1600], "counts": "[[af0i0]T1?I4L3L4I8G9G8I7L3N3M3N1O1O1O1O1N2O1O2N1O100O1O1O2YoNlLon0U3oPORMkn0o2RQOWMjn0j2UQOZMgn0h2WQOZMgn0g2XQO[Mgn0f2XQOZMgn0g2XQOZMgn0h2WQOYMgn0j2WQOXMgn0i2WQOYMhn0i2UQOYMjn0h2UQOYMjn0i2SQOYMmn0g2RQO[Mln0f2SQO[Mmn0f2PQO\\Mon0f2oPOZMRo0g2jPO\\MUo0`4O1O100O100O100000000O10000000O1000000O010O1O1O100IcPOZJ^o0_5iPO`JWo0_5kPOaJUo0]5nPOaJSo0\\5b0O0O2O1O0OnoNlJlo0_5L_OWPO_Kgo0Y4^POkK`o0Q4cPORL\\o0k3`PO\\L`o0b3_POaL`o0_3`PObL`o0]3`POdL`o0Z3aPOgL_o0X3bPOgL_o0W3bPOjL^o0Q3gPOoLYo0l2kPOUMUo0j2lPOUMUo0j2kPOWMUo0h2kPOXMVo0g2kPOYMTo0g2mPOXMTo0g2lPOZMTo0d2nPO[MSo0c2nPO^MQo0b2PQO]MQo0b2oPO^MRo0a2oPO^MRo0a2nPO_MSo0`2nPO`MQo0`2oPO`MRo0_2oPOaMQo0^2oPObMRo0]2oPOcMQo0[2QQOdMon0\\2RQOdMnn0[2SQOeMmn0Z2SQOfMnn0Z2RQOfMmn0Z2TQOfMln0Y2UQOgMjn0Z2VQOeMkn0Z2UQOgMkn0Y2UQOgMjn0Z2VQOeMkn0Z2UQOgMkn0Y2UQOfMkn0Z2VQOfMjn0Z2VQOfMjn0Y2WQOgMin0X2WQOiMin0V2XQOiMin0V2XQOjMhn0U2YQOkMgn0U2YQOkMgn0U2YQOkMgn0T2ZQOlMfn0T2ZQOlMfn0T2ZQOlMfn0T2ZQOkMgn0U2XQOlMhn0T2XQOlMhn0T2XQOlMhn0T2XQOlMhn0T2XQOlMin0S2WQOmMin0S2WQOmMin0S2WQOmMin0S2WQOmMjn0R2VQOnMjn0R2UQOoMkn0Q2UQOoMln0P2TQOPNln0P2TQOPNmn0o1RQORNnn0o1QQOQNnn0P2RQOPNnn0P2RQOQNmn0P2RQOPNnn0Q2QQOoMnn0S2QQOmMon0T2PQOlMPo0U2oPOjMRo0V2mPOkMSo0V2kPOkMTo0V2lPOjMTo0W2jPOjMVo0W2iPOiMVo0Z2iPOeMWo0^2fPObMZo0n2WPOPMjo0T3SPOXL1Nlo0m3QPOSL5Oio0P4QPOQL6Oio0P4RPOPL50io0Q4QPOPL4Olo0Q4QPOaLoo0_3SPO_Llo0b3TPO^Llo0b3UPO\\Llo0d3TPO\\Llo0d3TPOZLno0f3SPOXLmo0h3TPOVLmo0i3UPOVLlo0i3VPOVLio0j3XPOULho0k3YPOTLgo0l3ZPOTLfo0k3\\POSLdo0n3\\PORLdo0m3]POSLco0m3]POSLco0m3]PORLdo0n3]POQLco0n3^PORLbo0n3^PORLbo0n3^POQLco0n3_POQL`o0o3aPOPL`o0P4aPOoK_o0T4_POkKao0Y4[PObKjo0c4?5Kd0\\O7I3M2N3M000000000000000000O1O1O1G9L4M3N2O1O2N1O1N2N2M4L3N2O1O2N1O2N2L4K5I7K5M3N2N2N2M3L4J7F9L4M3N2N3M2N3K8Hflfj0"}}, {"image_id": 136, "category_id": 1, "bbox": [974.0, 464.0, 280.0, 414.0], "score": 0.9999993443489075, "association_id": 1, "light": [-1.8049678802490234, -2.3056108951568604, 1.6979045867919922, 2.17033314704895], "segmentation": {"size": [1200, 1600], "counts": "UTfS14ZU15H7L5L2N2N101N100O2N101O000O2O0000001O00000000001O0000001O001O1O001O001O001O1O1O001O001O001O010O1O010O01O010O0010O00100O01O2O0O1O2OO010O100O5K100O100O101N2O0O1O100O1O1O1O2N2OO010O1000O2O0O1O100O1O100O010O10O0100O1O00100O100O100O010O6K2M2VmN^MbR1i2gIhMYYOW2ff0kMYYOV2ef0lMZYOU2df0mM\\YOR2cf0PN\\YOQ2bf0QN^YOo1`f0RN`YOn1`f0RNaYOm1_f0TN`YOm1^f0TNcYOk1]f0UNcYOk1]f0UNcYOk1\\f0VNdYOj1[f0WNfYOh1Yf0YNgYOb0]J^Ojk02iYO?bJ[Ock08lYO:dJ]O]k0iT1a0E7J3N2N2O0O100O1O1O1N2N2M2O2O1O1O1O10O01O01O0000001O00001O00100O01000O010O01O010O0TnN_Nko0`1RPOiNho0X1WPOlNfo0S1ZPOQObo0o0^PORObo0m0^POUOao0k0^POVOao0k0_POUO`o0k0`POVO`o0i0_POZO_o0f0`PO\\O^o0e0`PO^O\\o0d0UPOMfo04WPO3eo0NYPO7bo0K^PO8[o0MePO5Wo0MiPO6To0KmPO5Ro0KnPO6Qo0KnPO5Ro0KoPO5on0MPQO4on0MPQO3on0NQQO3ln00SQO0ln02SQOOkn02TQONmn03QQONon02PQONRo02mPONSo02nPOMSo03lPOD^o0Qe04cZOLfd0o0U[OQOjd0Z1lZOgNSe0_1hZOaNVe0b1hZO_NUe0d1kZO\\NSe0h210O001NPOoZOUNmd0n1T[OSNjd0d1a[O\\N_d0`1e[O`NZd0]1j[ObNUd0Z1Q\\OfNnc0U1W\\OlNhc0S1Z\\OlNfc0T1[\\OlNdc0R1_\\OnN`c0P1c\\OoN]c0Q1c\\OPO]c0P1c\\OPO]c0P1c\\OPO]c0P1m[OTNOl0Td0P1j[O[NNd0Yd0R1g[O]NNa0Zd0S1f[O`NN<]d0X1_[OaN08ad0Y2Z[OgMfd0X3010000O010000O0mN`[OiM`d0U2b[OjM_d0Q2f[OnM[d0m1j[OSNVd0k1k[OUNVd0j1k[OVNUd0i1l[OWNTd0h1l[OXNUd0f1l[O[NUd0c1l[O\\NUd0c1k[O]NVd0a1l[O_NTd0_1n[OaNRd0^1o[OaNRd0^1n[ObNTd0\\1m[OdNSd0Z1o[OeNRd0Z1o[OfNQd0Z1n[OgNRd0Y1n[OfNSd0Z1m[OfNTd0Y1l[OfNUd0[1j[OeNUd0^1i[OaNXd0g1`[OYN`d0k1\\[OTNed0m1Z[ORNgd0n1X[OoMld0R2S[OmMnd0T2Q[OkMPe0U2P[OkMPe0W2nZOhMTe0X2lZOgMTe0\\2iZOcMXe0b2cZO^M]e0c2bZO]M]e0e2cZOYM^e0g2bZOYM]e0h2cZOWM^e0i2cZOTM_e0l2cZOPM_e0o281000O1O1O1O01O0000O101O1]Oc0N2N2O1K5L4O1O1N2J6M3O1M3I7O1O1O1N2O2M3N9_Ogbd1"}}, {"image_id": 137, "category_id": 1, "bbox": [1.0, 263.0, 394.0, 469.0], "score": 0.9999998211860657, "association_id": 2, "light": [-1.2159044742584229, -2.119736671447754, 0.9930304884910583, 2.0351266860961914], "segmentation": {"size": [799, 547], "counts": "P^1c1Zg04M3M2N2N2O0O100O100O100O101N100O10000O01000O100000000O1000000O10O01O100O010O1000O10O01000O1O010O1O100O01000O100O100O001O100O1000O01000O01O010O1O010O100O10O10O100O100O1O10O010000O10O100O010O010O0100O0100000O0100O100O00100O10000O0100O10O01O100O0100O010O10000O1000O10O100000O100O010O0100O00100O1000O01000000O10000O01000O100O010O01O10O10O10O01000O10O0100O1O0O2N2O010O10O010000O100O10O01O1O100O10000O100O100O1N2O1O100O100O100O1O1O1N2N2O100O100O01000O100O1O1M3N101O100O10O10O01O010O01O001O1O010O0010O01O0O2O001O00100O1000O0100O1O001O10O0100O011O0O100O1O2N1O101N10001N2O^OBdXO=Vg0JjXO4Rg02nXOL``0LREb0_J_OZ`0;iD>nJTOX`0e0cD;UKnNV`0l0bD7ZKjNQ`0V1_D3dKbNh?d1]DNbM^NW\\1bAeN\\>_1aAbN]>b1`A_N_>e1]A\\Nb>g1[AZNe>h1XAYNg>j1UAWNl>l1k@YNV?l4d@UH[?i7n@PHS?o7PAoGo>o7SARHl>l7WATHh>k7ZAVHc>j7_AVH`>j7aAVH^>i7eAUH\\>i7gAVHX>g7mAWHT>h7a1O20O0_@XHm=f7TB[Hl=d7UB]Hi=b7XB_Hh=_7[B`Hd=`7n1O0010N1O2O1O001000001O00001O0O10001O001O1O1O1e@VH_=l7[BYHd=g7ZB[Hf=f7VB]Hj=d7iAiHV>Q5_AgKODb>a4gAhKCJf>[4mAjKYOMj>U4TBmKnN0n>P4\\B_Md=_2eB[MZ=d2kBXMU=g2nBVMT=i2mBUMT=k2nBQMT=n2nB_Ld=a3]BTLm=^Oo_Oa3U2hLU>DP@[3k1oLY>CR@Y3f1RM\\>@R@\\3b1TMa>ZOQ@_3_1VMf?h2[@XMf?e2\\@XMj?b2Y@SMW`0f2l_OUM\\`0S1f]O^OQ2]O^`0k0n]O_Og1Db`0a0S^OAa1Mje0O101O0O3M^Sf3"}}, {"image_id": 138, "category_id": 1, "bbox": [1357.0, 167.0, 239.0, 276.0], "score": 0.9999998211860657, "association_id": 3, "light": [-1.4332890510559082, -2.7177517414093018, 1.2918751239776611, 2.6192691326141357], "segmentation": {"size": [1067, 1600], "counts": "n\\V\\12WQ13N2O0O101O0O10000O1O1O10000O10000O100O1O1O10000O100O1O1O100O1000O010000O10O01000000O10000O10O1000O10000O1000000O10O100000O2O000000000O100000001O0000000O100000001O000O10001O00001O00001N1000001^ISOd\\Om0Xc0ZObXOHi1n0ce0_OlWO_OQOa0X3c0ie0I\\WOB?A?Cj0VO7F9G:C>[Ol0ZO`hYY1"}}, {"image_id": 138, "category_id": 1, "bbox": [499.0, 434.0, 631.0, 618.0], "score": 0.9999998807907104, "association_id": 6, "light": [-0.7879221439361572, -3.3869388103485107, 0.6691544651985168, 3.305858850479126], "segmentation": {"size": [1067, 1600], "counts": "UnX`07RQ14M2O1N2O1O1N101O001N10001O00001O01O01O00001O0000001O000000001O000000000000001O0000000O100000000000000O101O0000000O100000000O1000000O10000O101O000O10000O10000O10000O1000001N10000O100O101N1O1O1O1N2O1O2N100O1O100O10000O2O0O10000O2O0O1O101N1O2N1O101N1O100O2O0O1000001O0O100000001N1000001O0O10001O000O10001O0O1000000O100000001N10000000000O10000000000O10000000000O1000000000000O1000000O1000000O1000000O100000000O1000000000O10O10000000O1000O10O1000000O10O1000O1000000O10f@UM4k2KXM2h2M\\M1d2M`M1`2MdM1[2NiM0W2OlMOS20PNOo10UNNk11WNCoNoAi2]>\\N\\GoNl1OZHf2]>^NUGVOP2I\\Hc2_>`NmF]OT2C_H`2_>bNjF@U2_ObH_2_>cNgFCV2[OdH^2_>eNdFHU2VOhH]2_>fN`FMT2ROmH[2^>hN\\F3T2kNRIZ2^>iNVF>P2bN\\IV2^>kNhET1R2nMhIS2^>lNZEi1U2YMSJS2^>lNQEV2W2lLZJR2]>mNlD`2W2bL`JQ2]>nNiDe2U2]LeJo1^>POfDg2T2[LhJn1]>QOeDi2U2XLhJn1_>RObDk2T2VLkJm1_>ROaDm2T2ULkJl1`>SO_Dn2T2TLlJk1a>UO]Dn2U2RLmJk1a>VO[Do2V2PLnJk1a>WOXDR3V2mKQKi1b>YOTDU3W2iKRKj1c>ZOPDW3X2_Ni9[NkC\\3Y2YNl9]N\\Cj3d2jMP:^NQCT4l2]MT:`NmBW4l2ZMV:bNjBW4o2WMW:cNgBZ4o2SM[:dNdB[4P3QM\\:eNbB\\4P3PM^:eN`B]4Q3nL_:fN^B^4Q3lLb:hNYB_4S3jLd:hNWB`4S3iLf:iNSBb4T3fLi:kNnAb4W3dLk:l6RETIo:o6mDRIS;P7iDRIW;P7fDQIZ;P7dDQI\\;Q7aDoH`;R7^DoHb;R7\\DoHd;R7ZDoHf;R7XDXFPMT1i>e8TDoHl;R7RDoHn;R7PDoHPcbbaba?1O001O001O0`LQAdDP?W;TAiDm>S;UAmDl>P;WAPEj>m:XASEi>j:YAVEh>h:YAXEh>e:ZA[Eh>b:YA^Eh>a:XA_Ei>_:WAbEj>]:VAcEk>[:VAeEk>Y:WAeEk>Z:UAfEl>X:UAhEk>W:VAiEk>V:UAjEl>T:VAjEl>U:TAkEm>S:TA\\CXOd1e?o:YAUCVOi1b?Q;ZASCYOi1^?R;ZATC[Oh1\\?S;YASC@f1Y?W;WAQCCf1X?W;UARCHb1U?[;SARCJb1W?X;o@VCKa1[?U;j@XCMa1`?Q;c@^CMa1h?i:[@eCOa1n?c:R@lC1`1T`0]:k_OSD1_1Y`0Z:g_OVD1_1[`0X:d_OXDE9YOV1`a0X:a_OYD[OX2Va0]9__OZDXO\\2[a0Y9^_OZDSOa2aa0T9[_OZDROe2da0Q9Z_ORGi`0n8Q_OVGRa0h8h^O\\G\\a0c8]^ObGia0Z8P^OjGXb0`;8I3L3M4L2O2M2O1N2O1O1N3N3M4L4K6K5K2M3N1O1N2O1O1N2O1O1N3N1O3L4M4L3L4M2jL_[O^Icd0_6^[O`Ied0\\6\\[OeIfd0X6[[OhIfd0V6Z[OkIhd0Q6Z[OnIhd0P6X[OQJjd0k5X[OUJkd0f5W[OYJmd0a5U[O`Jnd0Z5U[OfJod0T5S[OkJQe0P5P[OQKSe0k4nZOTKUe0h4mZOXKTe0f4mZOYKUe0e4kZO\\KWe0a4jZO^KXe0a4hZO_KXe0`4iZO`KXe0_4gZOaK[e0]4fZOcK\\e0Z4eZOfK\\e0Y4dZOgK^e0V4cZOiK`e0T4aZOlKae0Q4`ZOoKae0o3_ZORLce0k3^ZOULce0h3_ZOXLbe0f3_ZOZLbe0d3_ZO[Lbe0d3_ZO\\Lbe0b3^ZO_Lce0_3^ZOaLce0_3\\ZO`Lee0`3[ZO`Lfe0`3YZO`Lie0^3WZOaLke0^3UZOaLne0^3QZObLQf0\\3nYOeLTf0Z3kYOeLXf0Y3hYOgLYf0Y3fYOfL\\f0Y3dYOgL]f0Y3bYOgL_f0X3aYOhL`f0X3_YOgLcf0X3]YOhLdf0W3\\YOiLef0U3[YOlLff0S3ZYOlLhf0S3XYOmLif0R3WYOnLkf0o2VYOQMlf0m2SYOSMPg0k2PYOUMRg0h2oXOWMTg0g2kXOZMVg0e2jXOZMYg0c2gXO^MZg0a2fXO^M[g0b2dXO^M^g0a2aXO`M`g0^2aXOaMag0^2_XOaMcg0^2\\XOcMfg0Z2[XOfMfg0Y2YXOgMjg0W2VXOiMlg0U2TXOkMog0Q2QXOPNPh0o1oWOQNTh0m1lWOSNUh0l1jWOUNWh0i1jWOWNWh0h1hWOYNYh0f1gWOZNZh0e1eWO[N]h0d1cWO\\N^h0c1aWO^N`h0a1`WO_Nah0`1_WO_Ndh0_1[WObNgh0\\1YWOdNih0Z1WWOeNkh0Z1UWOfNmh0X1SWOgNoh0X1QWOhNPi0W1PWOiNQi0V1oVOiNSi0V1lVOkNTi0U1lVOkNUi0T1kVOlNVi0R1kVOmNVi0S1jVOmNWi0R1iVOnNWi0R1iVOnNXi0Q1hVOoNYi0P1gVOoN[i0P1eVOPO[i0o0fVOQO\\i0m0dVOSO]i0l0cVOSO_i0l0aVOTOai0j0_VOVObi0i0^VOWOci0h0]VOWOfi0f0[VOZOei0g0ZVOYOgi0f0YVOYOii0f0WVOZOii0g0UVOZOli0e0TVO[Oli0e0TVO[Omi0d0SVO[Oni0f0QVOZOPj0e0PVO[OQj0e0nUO[ORj0e0nUO[OSj0d0mUO\\OSj0e0lUOZOVj0e0jUO[OVj0f0iUOZOXj0e0hUO[OYj0d0gUO\\OZj0c0fUO]O[j0b0eUO]O^j0a0bUO_O`j0?`UOAbj0=^UOCcj0<]UODej0:[UOEgj0:YUOFhj08YUOHhj07XUOIij06WUOJij06WUOIkj06UUOJkj07TUOImj07RUOInj08QUOHPk09nTOGRk0:mTOEUk0eTOB\\k0=dTOC]k0=bTOC_k0=aTOB`k0>_TOBbk0=^TOBdk0>[TOBfk0=ZTOCgk0gl0_OZSOa0ml0WOUSOg0Tm0POmROP1gn0O100O10001N10000O101O001N101N2O001N2O0O101N101N2N1O2M3N3L4KjjX?"}}, {"image_id": 138, "category_id": 1, "bbox": [953.0, 239.0, 284.0, 460.0], "score": 1.0, "association_id": 5, "light": [-2.1225857734680176, -2.3643245697021484, 2.0363521575927734, 2.269460916519165], "segmentation": {"size": [1067, 1600], "counts": "ScQo03VQ13N2O1O001O001N2O001O1O0000001O001O001O1O01O01O00001O010O1O00010O1O100O1O10O01O1O1joN]Obo0Y1N0O1O0010O01O1O2N2N1O1O001gQOVNol0k1PSOUNPm0l1oROUNPm0l1oROTNQm0n1lROSNTm0P2iROPNWm0Q2gROPNYm0Q2dROQN\\m0P2cROQN\\m0o1cRORN]m0o1bROQN^m0Q2_ROPNam0S2[ROnMem0l200000O11O00001O0O10001O00O100O1000000O10000000O10001O000000000000O1000000000000000000000^KXNaYOi1Yf0`NcYO`1Yf0eNfYO[1Wf0jNgYOV1Wf0mNhYOR1Vf0ROoXOlMfNQ3Vh0ZOnXOnMgNh2Rh0EQYOjMjNa2lg00RYOhMoNX2mg05nXOgMTOT2lg0:jXOfMYOP2kg0>gXOeM_Ol1hg0c0dXOdMDi1eg0j0XXOhM3^1ag0l2_XOTM^g0o2bXOQM\\g0R3cXOnL\\g0S3dXOmL[g0T3eXOlLZg0U3fXOjLYg0X3hXOgLVg0[3jXOeLSg0^3mXObLPg0a3PYO_Lof0b3QYO]Lnf0e3RYO[Lmf0f3TYOYL\\c0aMV_OW6^MWLYc0gMW_OR6aMWLRc0oMY_Ol5eMULnb0TNZ_Oi5hMRLnb0WNV_Oi5mMPLkb0ZNV_Og5oMnKkb0\\NT_Og5RNmKjb0]NR_Of5UNmKib0^No^Of5YNkKib0_Nl^Og5\\NiKib0aNg^Oh5bNfKfb0dNd^Oh5gNbKgb0gN_^Oi5jN^Kib0jNZ^Oi5nN[Kjb0nNU^Oi5POWKmb0SOn]Oh5UOSKob0XOf]Oi5ZOnJQc0]OX]On5HcJQc0D\\\\O`6b0kISc0Y8l\\OfGUc0[8j\\ObGYc0^8h\\O_GZc0a8f\\O^G[c0b8e\\O^G[c0b8e\\O]G\\c0c8d\\O]G\\c0c8d\\O\\G]c0d8d\\O[G\\c0e8d\\OZG]c0h8a\\OVGac0k8^\\OSGdc0o8Z\\OQGfc0P9Y\\OoFhc0Q9X\\OoFhc0R9W\\OmFjc0T9U\\OlFkc0T9U\\OkFlc0U9T\\OkFlc0U9T\\OjFmc0V9S\\OiFnc0W9R\\OiFnc0W9R\\OhFoc0X9Q\\OhFoc0X9Q\\OhFoc0Y9P\\OfFQd0Z9o[OeFRd0\\9m[OcFTd0]9l[ObFUd0_9j[O`FWd0`9i[O`FWd0a9h[O^FYd0c9f[O]FZd0d9e[O[F\\d0g9c[OVF_d0l9_[OSFbd0n9^[OoEdd0R:\\[OkEfd0V:Y[OiEid0W:W[OhEjd0[;2lNT[OgEmd0Z;3L4L4M2N3N2M4M5J:F7H4^OcYOPFaf0n9bYOmEcf0o9`YOmEff0o9a0I6K5J3N2M3N1N3N3L3N3L3N1O1N3N2M3cNbWOiI`h0n5kWOmIYh0n5lWOnIVh0o5oWOmISh0o5YXOgIig0U6i1K4M4N1N3N2N2N3M3M4K4K4N2N1O1O100O2O0O100N2O1N2L4N2O1N3N2N3M3L5K4K5L3N1N3M3L4I7J6K6K5K7H9E`0WOjki;"}}, {"image_id": 138, "category_id": 1, "bbox": [1202.0, 23.0, 187.0, 210.0], "score": 0.999999463558197, "association_id": 2, "light": [-1.778946042060852, -2.0994668006896973, 1.6644614934921265, 1.9908783435821533], "segmentation": {"size": [1067, 1600], "counts": "XfTW15UQ1101N100O100O2O0O100N2J6O1O100O10O0100O10000O10O10O100000000O0100000O1000000O100000000O10000O10000O10000000000O1000000XMCbTO=Wk00cTOO[k06bTOK]k07bTOI\\k0;bTOE[k0a0bTO_O[k0g0bTOYO\\k0k0bTOUO^k0l0`TOUO^k0n0aTORO]k0Q1bTOoN\\k0T1cTOlN[k0X1bTOiN]k0Y1bTOgN\\k0\\1cTOdNYk0a1gTO^NTk0h1kTOXNSk0k1mTOTNQk0o1nTORNoj0R2PUOmMmj0W2UUOeMej0c2bUOUMYj0Q3iUOlLTj0X3lUOgLQj0]3_UOYLZO:Tk0d3QUOcLHHoj0S5PUOmJnj0U5SUOjJlj0X5SUOiJkj0X5VUOgJhj0[5XUOdJhj0^5WUObJhj0_5YUO`Jfj0a5ZUO_Jfj0a5ZUO_Jfj0a5ZUO_Jfj0a5ZUO_Jfj0a5ZUO_Jfj0a5ZUO_Jfj0a5[UO^Jej0b5[UO^Jej0b5[UO^Jej0b5[UO^Jej0b5[UO^Jej0b5[UO]Jfj0c5ZUO]Jfj0c5ZUO]Jfj0c5ZUO]Jfj0c5ZUO]Jfj0c5ZUO]Jfj0c5ZUO]Jfj0c5ZUO]Jfj0c5ZUO]Jfj0c5ZUO\\Jgj0d5YUO\\Jgj0d5YUO\\Jgj0d5YUO\\Jgj0d5YUO\\Jgj0d5YUO\\Jgj0d5YUO\\Jgj0d5YUO\\Jgj0d5YUO[Jhj0e5XUO[Jhj0e5WUO\\Jij0d5WUO\\Jjj0c5VUO]Jjj0c5VUO]Jkj0b5UUO^Jlj0a5TUO_Jmj0`5SUO`Joj0^5QUObJQk0\\5oTOcJjk0e4UTO\\Klk0c4TTO]Kmk0b4RTO_Kok0`4PTO`KTl0]4lSOcKUl0\\4jSOdKXl0Z4iSOeKYl0Z4gSOdK]l0Z4cSOdK`l0[4`SOcKdl0Z4\\SOgKel0W49O1N3M2N2N2N1O2O0O2N2N2O1N2N101N101N2SO[RORNgm0i1_ROSNcm0j1aROSN`m0k1dRORN^m0l1eROPN]m0n1R1N1N3N2N3N1N2O001N2O2N2N1N3M5K4L4L3L8Hggk6"}}, {"image_id": 138, "category_id": 1, "bbox": [291.0, 239.0, 418.0, 408.0], "score": 0.9999731779098511, "association_id": 4, "light": [-2.2082462310791016, -1.8722572326660156, 2.0493288040161133, 1.6500864028930664], "segmentation": {"size": [1067, 1600], "counts": "o^_97PQ16K5L3N3N1O2N1N2O1O1O0O0100000000O1000O10O100000000001O1O001UTOQOXg0P1eXOTOR12``0k0\\^OWOj0HnJ9ke0i0Z^O\\Ob0A[Ka0he0b0Y^OB?]O^K`0ie0c0U]OjNRNj0^3[OaK>je0c0S]OROlMf0_3SOiKk0he0;Q]OVOjMf0X3POVLo0ge06n\\OZOdMi0[33Rb0Jn\\OU1l0SOVb0Ik\\Oh1=_Nhb0Ii\\Ok1=]Nkb0Gh\\Ol1<_Nkb0Ei\\Ol1<_Nkb0Dj\\OAlMT1^2Hlb0Cj\\O@oMS1[2Jmb0Aj\\OAQNR1X2Lmb0Ak\\O^OTNS1T2Nmb0Ak\\O\\OWNT1Q2Onb0_Ok\\O]OXNT1n11ob0^Ol\\OZOZNV1k12Pc0\\OlZOoNX1:TOW1i14ob0\\OkZOQO\\12TOZ1h17nb0ZOkZOUOf2W1kL[Oh1o0mc0XOjZOYO>0k07SN:42h1l0oc0VOiZO^O87l0G_N=M6h1k0Pd0UOhZO@3ZUOBWn0O10000000000000000000001O0000000000000000001O00000O10000000001N10000000000O100000000O10000000000000000O1000000O10000O1000000O100O1O10001N100O1O1O101N100O101O0O101N10001O1N2Na[PY1"}}, {"image_id": 139, "category_id": 1, "bbox": [291.0, 233.0, 325.0, 290.0], "score": 0.9999999403953552, "association_id": 2, "light": [-2.215163469314575, -2.0218045711517334, 2.0543665885925293, 1.8741037845611572], "segmentation": {"size": [1066, 1600], "counts": "R]_9S1TP14L5L3N1O1O1O001O1O1O1O1N2O1N101N2N101O1O0O2O000O2N1O2O001O1O0O2N2N1O2O2O1N1O1O1N2N2O1N200O1O1O1N2N2N2O1O1O1O1O1N2N2N2N2O1O1O1O1N2N2O1N2O001O1O1N101O1O1O100O1O1O1O1N1O2O1O1O1O1O1O1NB]SOYL`l0i3aSOWL\\l0k3dSOVLYl0l3gSOTLYl0m3gSOSLWl0n3iSOSLVl0n3jSORLVl0n3jSORLUl0o3jSORLUl0o3kSOPLTl0R4lSOnKSl0R4mSOoKRl0R4nSOnKPl0g4O010O1O1O100O[OTTOmKlk0S4UTOmKkk0R4UTOoKjk0R4VTOnKik0S4VTOnKhk0T4XTOlKgk0l4NZO[TOjKfk0V4ZTOjKek0n4O100O1O1O0O2N2O1O1O001O1O1N2N2N2O1O100O1N2O1YOg0F:L4M3M3O1M3M3L4L4N2N2N2O10O0nNTWOhIlh0W6UWOiIjh0V6WWOkIih0R6ZWOnIeh0R6\\WOnIdh0Q6\\WOPJdh0n5]WOSJch0l5^WOSJch0l5]WOUJch0i5^WOXJbh0f5`WOZJ`h0d5aWO]J_h0b5aWO_J_h0`5bWO`J^h0_5cWOaJ]h0^5cWObJ^h0]5cWOcJ]h0[5eWOeJ[h0Z5eWOgJ[h0X5fWOhJZh0X5eWOhJ\\h0W5eWOiJ[h0V5fWOjJZh0V5fWOjJZh0U5fWOkJ[h0T5fWOlJZh0S5gWOmJYh0Q5iWOoJWh0o4kWOQKUh0n4lWORKTh0m4mWOSKSh0m4mWORKTh0m4lWOTKTh0k4mWOUKSh0j4nWOVKRh0i4oWOVKRh0i4oWOWKQh0g4QXOYKog0f4QXO[Kog0d4RXO\\Kng0c4SXO]Kmg0b4TXO]Kmg0b4SXO_Kmg0`4TXO`Kmg0JcWOj2b0\\Mkg0GhWOi2?`Mig0ElWOh2jUOAYj0bWOBah09aWOGhh0M[WO3Ri0\\ORWOd0il01000000000000000000000O10000000O10O10000000000O1000000O10000O1000000O10001O0000000O101O000O10001O0O10000000001N100O10000O101O000O1000001O0O100O1O1O100O100O2O0000000O10000O100O101N100O100000001N100000000O10001N100O10000O100000001N100O101O0O100O2O000O10001O000O2O1O1LZoXa0"}}, {"image_id": 140, "category_id": 1, "bbox": [360.0, 154.0, 317.0, 542.0], "score": 1.0, "association_id": 1, "light": [-1.9259461164474487, -2.563504457473755, 1.725642204284668, 2.3708579540252686], "segmentation": {"size": [768, 1024], "counts": "bY^82mg03L2O2N1O2N1N2M3M4K4M3M3O2N1O1O1O2N1O1N3M3WDkNb0X1[OlNa0X1\\OkNb0W1\\OkNa0X1]OiNb0X1]OjNa0X1]OiNb0Z1[OgNc0\\1[OfNa0_1\\ObNa0d1[O^N`0T3PNnLn1[3jMgLS2\\3kMeLS2^3kMcLT2_3jMbLV2_3hMbLW2`3fMbLY2`3bMdL]2]3^MhL`2\\3WMlLd2Y3YMiLa2_3[McLa2c3\\M^Lc2d3ZM^Le2d3YM]Lf2e3XM\\Lg2f3WM[Lh2f3VM\\Lj2e3oLbLo2`3RL^Mm3d2mJaNQ5b1jJbNT5b1hJ`NV5c1hJ^NW5e1fJ\\NY5f1eJ\\NY5f1eJ[NZ5g1dJZN\\5f1bJ]N\\5e1aJ^N]5d1aJ]N^5e1_J^N_5d1_J^N^5f1`J[N]5k1^JVNa5n1[JTNc5o1[JQNd5R2YJoMf5T2WJnMh5S2VJnMi5U2SJnMl5T2QJmMn5W2mIkMS6X2iIjMU6b2_I_M`6f2\\I[Mb6g2\\IZMc6i2ZIYMd6i2ZIXMe6j2YIXMe6i2ZIXMf6i2XIYMf6i2XIXMh6j2UIWMj6l2SIUMm6m2PIUMo6m2oHSMQ7n2mHSMR7o2mHQMS7P3lHPMT7Q3jHPMV7Q3iHoLW7Q3hHPMW7R3hHnLX7R3gHoLY7Q3gHoLY7R3fHnLZ7S3eHmL[7S3eHlL\\7U3cHkL]7U3cHkL]7U3cHkL\\7V3dHjL\\7U3fHjLY7V3hHjLX7V3hHjLW7V3jHjLV7U3kHkLT7V3lHjLS7V3nHjLQ7W3oHiLP7W3QIiLn6X3RIhLn6X3RIgLo6Y3QIgLn6Y3SIgLm6Y3SIgLl6Z3TIfLl6Z3TIeLm6[3SIeLm6[3TIdLk6P2aHUId0k4k6n1dHUIb0m4j6m1fHUI`0n4j6l1hHUI>o4j6k1iHVI=n4k6k1jHVI;o4k6j1kHXI9n4l6i1mHXI7o4l6g1oHZI5o4k6g1QIZI4n4l6g1RIZI2o4l6g1RIZI2o4l6f1SI[I1n4m6g1SIZI0o4m6g1RI[I1n4m6g1RI\\I0m4n6g1RI\\I0l4n6i1QI]I0j4o6i1QI^IOi4P7j1PI]I0i4P7j1oH_IOh4Q7j1PI_INf4S7k1oH`IMe4S7l1PI`ILd4T7m1nHaIMa4U7o1nHaIL`4U7R2lH_IO^4U7V2jH]IO^4V7W2iH\\I1\\4V7[2fH[I3Y4X7_2aHYI7X4W7Z4hHeKX7\\4gHeKY7\\4fHdKY7]4gHbKZ7_4eHaK[7_4dHbK\\7^4dHbK\\7^4cHbK^7^4bHbK^7^4bHbK^7d2_HWI3U4^7b2aHYI1U4^7a2cHYI0U4]7a2dHZIOU4]7_2gH[ILV4\\7_2iH[ILT4\\7_2kH\\IIU4\\7\\2nH_IFU4\\7Z2QI`ICV4\\7Y2RIaICU4[7Y2TI`IBW4Z7W2VIbI@V4[7W2WIbI_OV4Z7W2XIcI^OU4[7W2YIcI\\OV4[7V2ZIdI\\OT4[7W2ZIdI\\OU4Z7V2\\IdI[OU4Y7U2_IeIXOU4Z7U2_IfIXOT4Y7T2bIgIVOT4X7S2eIgITOV4W7Q2hIhIROV4V7o1lIjIoNV4U7o1nIjInNV4T7n1QJjImNX4Q7m1TJjIlNX4P7n1TJjIlNX4P7m1UJkIlNW4o6n1UJjInNW4m6n1VJkInNW4k6n1VJkIPOV4k6o1UJkIQOU4j6o1VJkIQOV4i6o1VJjISOV4g6P2VJiITOW4g6n1UJkIVOV4e6o1UJkIVOV4e6n1VJkIVOV4e6n1VJkIWOV4c6n1XJkIUOW4c6m1YJkIVOW4a6m1[JkITOX4a6l1]JjITOY4_6l1^JkISOX4a6k1^JkISOY4_6k1_JlISOX4^6k1aJkIROZ4]6k1aJkISOY4\\6k1cJjIROZ4]6k1bJiISO[4\\6j1cJiIRO]4\\6h1dJiIQO_4]6e1cL[N^3c1cL]N^3a1cL_N^3^1dLaN^3]1cLcN]3\\1dLdN]3Z1eLeN[3Z1fLfN[3Y1eLgN\\3W1eLhN\\3X1dLhN]3W1dLgN^3W1cLhN`3V1aLhNb3V1_LhNc3V1_LhNc3W1^LhNc3V1^LiNd3U1^LiNc3V1^LjNc3T1^LkNd3R1_LmNb3o0aLPOa3l0bLSO`3h0dLWO_3e0cL[O^3b0eL\\O]3b0dL]O^3a0cL_O^3`0bL@_3>cL@_3>bLB_3m2@TM`0m2^OTMa0n2\\OUMd0k2YOWMg0k2TOXMm0i2mN\\MS1ijIjSOY5gl0NlNkJQUOT5hj0XKTUOf4ej0hKVUOW4aj0WLZUOh3\\j0gL`UOY3Wj0VMcUOi2Xj0i2L5K4M3L4N2O2N1N2O1O1O1N2NkKfVOZOYi0j0kVOPOQi0U1RWOfNlh0_1RWO`Nkh0e1TWOZNkh0i1TWOVNjh0m1VWORNih0Q2VWOnMih0T2WWOkMhh0W2WWOiMhh0Y2XWOfMgh0\\2XWOdMgh0_2XWOaMfh0a2ZWO^Meh0e2YWO[Meh0X6O1N2O1N2N2O1O1O1OnLgWOQLXh0Q4iWOmKWh0T4iWOkKVh0X4iWOgKWh0X7O100O100O10000000001N100000000000001O000O100000001N1000000O2O000O2O0O101N10VN[XOlHcg0W7`XOeH^g0^7eXO^HYg0f7iXOVHUg0n7jXOQHTg0R8lXOnGQg0V8mXOjGRg0W8nXOiGPg0Z8nXOhGof0Z8QYOfGnf0[8RYOfGkf0]8SYObGnf0`8QYO^Gof0e8PYOXGRg0P:1O2M2M4J60O3N2N1O1N2O2N1O1O2M2O2N2N2N2N1N3N1N1i[OWDha0k;T^O[Dga0g;U^OaDfa0a;U^OfDea0];V^OkDda0Y;V^OPEca0T;Y^OSEaa0o:\\^OUE`a0o:\\^OVEaa0l:[^OXEba0k:[^OXEca0i:[^OZEba0i:[^OZEca0g:[^O[Eda0f:Y^O]Eea0e:Y^O]Eda0f:Z^O]Eaa0g:]^O[E^a0j:`^OXE[a0m:d^OTEWa0Q;h^OPEUa0S;j^OoDSa0T;l^OlDSa0U;l^OlDRa0V;m^OkDRa0V;n^OjDQa0W;n^OjDQa0Y;k^OiDTa0[;h^OfDWa0Y>O2M2N2N2N2N2N2O1O1O1O100O100O1O100O1O1O1O1O1O001O1N2O1N2O1O1O100O1O100O100000000000000000001O000000000000000OmL[@_Ce?X]^^__`Wg0TOQZO?hN>Zk0CdTO?Zk0BfTO>Zk0BeTO`0Zk0AeTO`0Yk0AgTO?Yk0BeTO`0Zk0@fTOa0Yk0_OfTOc0Xk0_OgTOb0Xk0^OgTOd0Xk0]OgTOc0Xk0^OhTOc0Wk0^OgTOd0Xk0]OgTOe0Wk0[OhTOg0Vk0[OiTOf0Vk0[OhTOg0Wk0YOiTOh0Vk0YOiTOg0Wk0ZOhTOf0Xk0[OhTOd0Xk0]OhTOb0Yk0^OgTOa0Yk0@fTO`0Zk0AfTO>Zk0CfTO[TO^Ohk0b0ZTO[Ogk0f0YTOXOhk0h0ZTOUOgk0k0ZTOROhk0n0ZTOoNgk0Q1[TOlNfk0U1\\TOfNfk0Z1^TOaNck0_1bTOZN`k0f1eTOTN\\k0m1b20000001O0001O00000O101O00000O101O0000001N10001O0O2O0N3N2M4M2M4L4K5I8GnXd0Bcg[O7J6J5K4L3N2N1O2N101N10001N10000O2O00000O2O00001N1000001O0O101O10O01O1O1O1O2N1O1O2fQOPORk0Q1dTOYO[k0h0^TO@`k0a0ZTOEek0R`0XAl_Oh>S`0\\Aj_Od>U`0_Ai_Oa>V`0cAf_O^>Y`0fAd_OZ>[`0iAc_OW>\\`0lAb_OT>]`0oAa_OQ>]`0RBa_Oo=_`0SB__Om=``0UB^_Ol=a`0WB]_Oi=b`0ZB[_Og=e`0ZBY_Og=f`0Q2O1O100O1O100O100O11O0001O00000000000000Y@__Ob=Y2QAU;[1eBc=S2VAW;V1gBd=o1[AX;P1kBe=j1^A[;j0mBi=d1bA];d0QCj=]1hAa;;TCn=V1mAe;2WCS>m0SBk;F[CX>a0]BQJ\\BcV1EhNVg0EfXO=Yg0f0O1O10000O02N101N6K1O1N5K1O2O1OO10O001000O001O00001O10O0100O10O0003N0O10O010O01O0000000001O1O1O00001O0AXXOFgg09ZXOHfg06[XOJfg04[XOMfg0N]XO2dg0L^XO4bg0IaXO7^g0HdXO8\\g0HdXO7]g0HeXO7[g0GgXO8Yg0HhXO7Zg0FiXO9og000O100O101N1Nfeg3"}}, {"image_id": 143, "category_id": 1, "bbox": [97.0, 629.0, 119.0, 104.0], "score": 0.9992645382881165, "association_id": 4, "light": [-3.1765072345733643, -0.7809914946556091, 3.043736457824707, 0.6318193078041077], "segmentation": {"size": [800, 691], "counts": "U^\\26ih05K3M2N2M3N3M4L2N2O2M5K3M2N8I:D4L4L3M2ZOf0N2N2000O1O1O100O10000O105QMPZO3NZ2gf0G3O3N02NO1N002O0O1O0O101N3M1O2N1O1O1N23M01O1O1O1O002N2N2N4[OWXOKmg0NVXO2og0FSXO;Yh000O10O10O100O100O1000000O10000O010000O010000000O10000000O10000O10000O100O10000O0100O0100O10O0100O1O1O1O1MT]b;"}}, {"image_id": 143, "category_id": 1, "bbox": [204.0, 605.0, 118.0, 100.0], "score": 0.9999749660491943, "association_id": 1, "light": [-2.3901190757751465, -1.2968560457229614, 2.2506964206695557, 1.1526201963424683], "segmentation": {"size": [800, 691], "counts": "noo4:bh0;G6K6SOPO^YOX1[f0nN_YOV1^f0mN^YOX1^f0iNZYOa1bf0`0O001O00001O1O001O0010O02N10O9H2M10010O0O100000O101O1N1000O10O01O001O1O1O1N3N2N1O1O2N2N001O2N1O001O2N001O0O2O1N101N1O1011N001O0001O000O2]OZXOJhg00[XO1fg0I^XO8ig0^OZXOb0Qh0010O1000O010000O001O0010O1O0010000O100O10001N103L2O1N2O001O00001N10001N101Ncco8"}}, {"image_id": 143, "category_id": 1, "bbox": [317.0, 604.0, 100.0, 79.0], "score": 0.9999210834503174, "association_id": 3, "light": [-2.389671564102173, -0.9714224338531494, 2.3094735145568848, 0.8657548427581787], "segmentation": {"size": [800, 691], "counts": "SXh78gh02N2N100O100O2O0XXOEkf0;SYOHkf0:SYOHlf09gXO4Wg0l0O1O2N1O1O1O1O1O00001O01O10000O3M8I1N5L000O2OO2aXOgNTg0Y1fXOlN[g0\\101O0001O001O0O2O000O2O0O101N101N1O1O2O101N1O2N2N2N000O10001O1[OkWO=\\h001O0O100000O10OO2O100O01000O10O1000000O101O0AeWO8bh0O2O0O100O1O2O1NZ]e6"}}, {"image_id": 143, "category_id": 1, "bbox": [607.0, 542.0, 45.0, 48.0], "score": 0.9871140718460083, "association_id": 6, "light": [-2.237987995147705, -1.493157148361206, 2.2250967025756836, 1.3761271238327026], "segmentation": {"size": [800, 691], "counts": "ahj>;ch03M4L3C=O2M2O2N1O000001O9G1O2N1000O10O01O100O01O1O1O1O1N201N2O0O2N1O1O1O001N101O1O6J001Nhlm0"}}, {"image_id": 143, "category_id": 1, "bbox": [50.0, 617.0, 57.0, 96.0], "score": 0.9233735799789429, "association_id": 7, "light": [-0.8981645703315735, -2.736140727996826, 0.7474883198738098, 2.5643885135650635], "segmentation": {"size": [800, 691], "counts": "jfW1f0Vh07K6J:F4M2M4lN^NdZOd1[e0aNRZOK0g1me0n002O1O000000000000O2N1O7I7I4L3M3SNUYO`1\\g0J1N101N3N001N2M[XOoN`g0n0^XOWOag0U100O1O2OYObXOJ_g04bXOZOO>`g06gXOJYg0GbXO169eg0A^XOa0Ph0000O100001O1O1O1N3N2M3M3NPbW>"}}, {"image_id": 143, "category_id": 1, "bbox": [147.0, 566.0, 56.0, 81.0], "score": 0.9625920057296753, "association_id": 8, "light": [-1.8569309711456299, -2.4333815574645996, 1.7440204620361328, 2.257822036743164], "segmentation": {"size": [800, 691], "counts": "n]c37fh09H6J4nN^O`YOf0^f0]O\\YOh0af0[OZYOj0df0j0O2N1O0010O011O2N;E3M1N20OO1O2N100O1O1O2N1O2M2O3L3M4M4K5K4K4LcWOKdh000000O100O10000O10000000000000O100OPdl;"}}, {"image_id": 143, "category_id": 1, "bbox": [552.0, 564.0, 113.0, 108.0], "score": 0.8715171813964844, "association_id": 5, "light": [-2.511714458465576, -1.398634672164917, 2.4384844303131104, 1.2144262790679932], "segmentation": {"size": [800, 691], "counts": "ei_=5jh02O2N2N1WYOKed08U[O2dd00PZOFh0=Ve0OoYOFg0>Ze0Z1kd0iNgZOL`0[1hd0jNgZOJd0Z1ed0oNdZOGh0Y1dd0YOZZO_OR1X1dd0^O][Ob0bd0^O^[Ob0bd0_O^[O`0dd0^O][Ob0dd0]O[[Oc0gd0[OZ[Oe0fd0[OZ[Od0gd0[OZ[Od0hd0[OW[Oe0kd0ZOU[Oe0nd0YOR[Of0od0ZOQ[Oe0od0\\OQ[Od0od0[OR[Od0nd0]OQ[Oc0Pe0\\OQ[Oc0od0^OP[Ob0Pe0O`ZO0`e02^ZONae0:oYOgN0Q1Qf0g1001O00001O001O1YNTZO8oe0CVZO:ne0^OXZO?Rf0XORZOd0Qf0XOQZOf0Rf0XOoYOe0Xg0HXOC\\YO;ff0D[YO:gf0E[YO8hg0NoNJZYO5VOMVg06WYOGB510Ug06UYOGD222Ug05UYOHB143Ug04UYOLH1Sg0LgXO0n04gg0O2O0O1O1O1O1N]Re01fcN"}}, {"image_id": 144, "category_id": 1, "bbox": [361.0, 230.0, 34.0, 68.0], "score": 0.999999463558197, "association_id": 1, "light": [-2.1378774642944336, -1.8573137521743774, 2.0801100730895996, 1.7097216844558716], "segmentation": {"size": [535, 800], "counts": "lkl55a`02M2T@KU?6i@LS?7n@Jm>9RAIk>:TAGj>;VAEi>=UADj>=PA[OL8S??m@^ON3U??l@_OO1T?a0n@^ON1S?`0RA^OK2P?b0WAZOJ4l>d0\\AVOI5f>k0bAnNH8e>k0hAUOW>k0jAUOU>l0lASOT>l0mASOT>m0lASOT>m0lASOT>n0kAQOV>o0jAQOV>o0jAPOX>n0iAROW>l0kASOV>k0_ATOO1e>MSAf0:^OMNn>?WABLMQ?2SANl>3SANl>4SALk>6TAKk>6TAKj>7VAIh>8XAHh>9WAHh>:WAFh>;PA_OK7T?i@C0NW?V100OXOo@LP?4RAKn>4UA^OF6V?>]AB_>b0aA^O]>d0cA\\O\\>e0dA[O[>f0eAZOZ>g0fAXO[>h0eAXO[>h0eAXO[>f0gAZOY>e0hA[OX>d0iA\\OW>c0jA\\OX>a0jA_OV>?lA@V>=mABT>:oAEc?NPnk4"}}, {"image_id": 144, "category_id": 1, "bbox": [486.0, 193.0, 65.0, 70.0], "score": 0.9999785423278809, "association_id": 6, "light": [-1.8655273914337158, -2.1290829181671143, 1.824589490890503, 1.9313509464263916], "segmentation": {"size": [535, 800], "counts": "eTn73d`00O2O000__OM]`0700000M4N2Ncc2O^\\M2O1O0S@OT?2k@OS?2m@NS?2l@NT?3l@MS?4m@LS?4m@LR?5m@LR?5n@KQ?6o@JQ?7n@IQ?8o@HZ>OfA:OHT>8jA11GS>:kA0MAI5^>=iAONAJ3_>>hANOAJ3_>>hAN0_OJ5^>?fAN7CS>?fAM8DR>`0dAM:CR>a0`AO>@R>X1oAhNR>W1nAiNR>W1nAiNU>T1kAlNV>S1jAmNW>R1iAnNY>Q1fAoN[>P1eAPO]>Q1`AoNa>S1\\AmNd>T1[AlNf>e0XA^O0Mh>d0[A^OLNi>d0^A\\OH0k>a0`A_OD0l>`0cA^OA1m>?dA_O@2m>=lACT>1YBMh=2_10001N10^lQ4"}}, {"image_id": 144, "category_id": 1, "bbox": [176.0, 194.0, 27.0, 48.0], "score": 0.9999963045120239, "association_id": 3, "light": [-1.4499049186706543, -1.889064073562622, 1.4373273849487305, 1.752039909362793], "segmentation": {"size": [535, 800], "counts": "oUl21Z`02n_O0o?2Q@Ob?=]@D`?>a@B^?>c@B[??f@AY?`0g@@W?b0h@_OT?e0l@[OQ?h0o@XOP?j0o@VOo>l0QASOP?P1n@oNR?T1k@lNU?U1k@jNU?V1k@jNU?m0j@VO2MT?l0m@UOOOT?k0VATOk>l0VASOj>l0b0O0[OX@:i?DZ@:h?D[@9S`0Lefg9"}}, {"image_id": 144, "category_id": 1, "bbox": [263.0, 228.0, 40.0, 60.0], "score": 0.9999992847442627, "association_id": 2, "light": [-2.1260902881622314, -1.549189805984497, 2.0489120483398438, 1.404950737953186], "segmentation": {"size": [535, 800], "counts": "keY42d`02nN3WAOe>5YALd>;XAEf>?WACf>a0XA_Og>d0WA\\Og>h0WAYOg>j0WAVOh>k0WAVOf>m0ZASOe>o0ZAQOe>Q1ZAoNf>S1XAmNh>S1XAmNh>S1XAlNi>U1VAkNj>U1VAjNk>V1UAjNl>U1TAkNl>V1SAjNm>W1SAgNo>`12Go@gNR?Y1n@fNS?V1o@gNV?n0>N2O3M2M5L101O2N1O1O3K7Jj]S8"}}, {"image_id": 144, "category_id": 1, "bbox": [560.0, 230.0, 41.0, 69.0], "score": 0.9999927282333374, "association_id": 4, "light": [-1.4369996786117554, -2.2259209156036377, 1.4555164575576782, 2.1638052463531494], "segmentation": {"size": [535, 800], "counts": "fjT91f`01N1O100^@M`>4^AMb>3]AOa>3]ANc>2[A0c>3[ANd>3[ANd>5k@H14T?5i@J12U?c0j@]OS?h0k@WOU?j0j@WOU?h0m@XOS?;SA[OM:_>GjAc01FW>FfAf03DV>GfAg03BV>IfAe04BV>KaAg08^OW>M^Ag0:\\OX>M^AQ10QOc>[1\\AeNd>[1\\AeNd>\\1[AdNe>H[Aa10gNi>X1WAgNj>i0ZAYOLNk>g0]AXOH1k>e0aAWOE4j>d0cAUOE6j>c0hA]OY>`0iA@W>=lACU>;lADU>MYANf03b?00NUfW3"}}, {"image_id": 145, "category_id": 1, "bbox": [1428.0, 121.0, 158.0, 148.0], "score": 0.9999960064888, "association_id": 2, "light": [-2.6212897300720215, -1.615939974784851, 2.4120004177093506, 1.4463982582092285], "segmentation": {"size": [1060, 1600], "counts": "i[V^19iP13L5J6H;E8VOoN[QOT1cn0POXQOS1gn0oNTQOU1jn0e0N1O1N2O1O1O2N3M1O1RRO[Mh00Yk0f2cSO_MMNW1MYk0g2`SOfMW1CYk0W3gTOiLYk0V3hTOjLXk0V3hTOjLXk0V3hTOkLWk0T3jTOlLVk0S3kTOmLUk0Q3lTOPMUk0n2lTORMTk0n2lTORMTk0m2mTOSMSk0m2mTOSMTk0l2lTOTMUk0k2kTOUMVk0j2jTOVMWk0i2iTOWMWk0i2iTOWMXk0h2hTOXMXk0i2gTOWM[k0h2dTOXM]k0g2cTOYM^k0g2aTOYM`k0f2`TO[M`k0e2_TO[Mak0e2_TO[Mck0d2\\TO\\Mek0c2ZTO^Mgk0a2YTO_Mhk0a2WTO_Mik0b2VTO^Mkk0b2TTO^Mmk0b2RTO^Mok0a2QTO_MPl0a2oSO_MRl0a2mSO_MSl0a2mSO_MTl0a2kSO_MVl0a2iSO_MYl0a2eSO_M[l0b2dSO^M]l0a2cSO_M]l0b2bSO^M_l0c2_SO]Mbl0d2\\SO\\Mfl0d2XSO\\Mhl0g2USOYMll0g2SSOYMnl0h2PSOXMPm0j2nROVMTm0j2kROUMVm0V3^ROjLcm0V3\\ROiLem0[31O0LZROjLgm0U3YROkLim0S3WROmLjm0Q3WROoLim0Q3VROPMkm0o2UROQMkm0o2UROQMlm0n2TRORMlm0m2UROSMlm0k2UROUMlm0j2TROVMmm0i2SROWMmm0i2SROVMnm0j2RROVMom0i2QROWMom0i2QROWMom0i2QROWMom0h2SROWMmm0i2SROVMom0i26000001L4N2N101N1O1O2N2MgQOhMjm0W2VROjMkm0T2UROmMlm0Q2UROPNkm0n1VROQNlm0n1TRORNlm0m1TROTNmm0k1SROUNnm0i1SROWNnm0h1RROXNom0g1QROYNom0f1RROZNom0e1QRO[NPn0c1QRO]Nom0c1QRO]NPn0a1QRO_NPn0`1PRO`NQn0`1nQO`NSn0_1mQO`NUn0_1kQOaNVn0_1iQOaNWn0_1iQOaNXn0^1hQObNYn0^1fQOaN\\n0_1cQOaN^n0^1bQObN^n0_1aQOaN`n0^1`QOaNbn0_1]QOaNdn0_1[QOaNin0\\1VQOdNln0Z1TQOfNln0[1SQOeNnn0Z1RQOfNon0Z1PQOfNQo0Y1oPOgNRo0Y1>N10O0100O101N1O002N3M3L3N1N2M9G]X>"}}, {"image_id": 145, "category_id": 1, "bbox": [0.0, 256.0, 104.0, 261.0], "score": 0.9999948143959045, "association_id": 6, "light": [-0.5188145041465759, -2.9462780952453613, 0.4293510317802429, 2.7995474338531494], "segmentation": {"size": [1060, 1600], "counts": "T8;i0l3nj0cL^TOQ4>cKei0b6L2N:F1O2M2O1O001O001O001O001O00001O1OYOfVOdIZi0\\6fVOeIYi0\\6fVOeIYi0[6gVOfIXi0Z6iVOfIVi0Z6jVOgIUi0Y6lVOgISi0Z6lVOgISi0Y6mVOhIRi0X6nVOiIQi0X6nVOiIQi0X6oVOgIQi0V701O000010O1O2N3M1O2N3M3M102M3M3M1N2O1O1O2N2N1O1O1O2N3M2N001O000O11O0000O2O1N2O2M3N0O2O1N100O1YOUUOTKmj0j4TUOnJ3Dkj0]5SUOnJVk0Q5iTOmJ\\k0P5dTOoJ_k0o4aTOQK_k0n4cTOPK_k0n4cTOoJ_k0g3eTOTMNSO^k0d3QUOPM[k0m2jTOnLYk0n2mTOmLVk0n2e1K3M3L3N3M3N3K7G7J5L5IaX\\`1"}}, {"image_id": 145, "category_id": 1, "bbox": [685.0, 257.0, 167.0, 214.0], "score": 0.9247750043869019, "association_id": 7, "light": [-2.2640485763549805, -1.553755283355713, 2.196465492248535, 1.3296620845794678], "segmentation": {"size": [1060, 1600], "counts": "YaUf01QQ13N1O100O1SNLhRO6Pm0h0XROZOam0R1YROoNcm0W1[ROiNam0\\1_ROcN^m0a1aRO_N]m0c1cRO]NTm0m1kROSNSm0P2lROoMSm0S2mROmMhl0HkRO]2>iMgl0a2YSO_Mfl0c2YSO\\Mhl0d2WSO]Mhl0d2WSO]Mil0d2VSO\\Mil0e2WSO[Mil0e2WSOZMil0g2WSOYMhl0h2XSOXMhl0g2YSOYMfl0h2YSOXMgl0i2YSOWMfl0j2ZSOVMel0k2[SOUMdl0m2[SORMdl0Q3\\SOnLcl0U3[SOkLcl0X3\\SOhLcl0Y3]SOgLbl0[3]SOdLdl0^3ZSObLel0`3ZSO`Lfl0a3YSO_Lfl0c3YSO]Lgl0c3YSO]Lfl0e3YSOZLhl0f3XSOZLgl0g3YSOYLel0j3ZSOVLdl0l3\\SOTLal0o3_SOQL`l0P4_SOPL`l0R4`SOnK_l0S4aSOmK^l0T4bSOlK^l0T4bSOlK]l0U4cSOkK]l0U4cSOkK\\l0V4dSOjK[l0W4dSOiK]l0W4cSOiK\\l0X4dSOhKYl0[4fSOfKXl0[4iSOeKVl0\\4jSOdKTl0^4kSOcKTl0]4lSOdKTl0\\4kSOeKTl0\\4kSOeKTl0e410O^OmSOULSl0a3VTO`Ljk0]3YTOcLfk0\\3\\TOdLck0\\3]TOdLck0\\3^TOdLak0]3_TOcL`k0^3`TObL_k0^3bTObL^k0^3aTOcL^k0^3bTObL^k0^3bTObL^k0^3bTObL^k0^3bTObL^k0]3cTOcL]k0]3cTOcL]k0]3cTOcL]k0]3cTOcL]k0]3cTOcL]k0]3cTOcL]k0]3cTOcL\\k0^3dTObL\\k0^3dTObL\\k0^3dTOaL]k0_3cTOaL]k0_3cTOaL]k0_3cTOaL\\k0`3dTO`L\\k0`3dTO`L[k0a3eTO_L[k0a3eTO_LZk0b3gTO]LXk0e3gTO[LXk0f3hTOYLXk0h3hTOXLXk0i3gTOWLXk0j3hTOVLXk0k3hTOSLXk0o3gTOQLXk0U4dTOcKE0fk0i4ZTOSK61_k0P5bTOPK]k0S5bTOkJ^k0W562N2M2L5J5N3N1O1O1N2O2NVOQUOaKnj0]4VUObKjj0[4ZUOdKfj0Z4]UOeKcj0Y4aUOeK_j0X4fUOeK[j0V4lUOhKTj0U4QVOiKoi0U4TVOiKmi0V4UVOiKki0W4VVOhKji0W4XVOhKhi0V4_VOdKbi0[4d1N2O1O1O1O1O1N2O1O1O1O1O1O1N2N200O2N2N2mLoROo1Xm0cMXSOQ2Rn0K5M2N3L4L6G;@?B=F^oUh0"}}, {"image_id": 145, "category_id": 1, "bbox": [472.0, 277.0, 238.0, 321.0], "score": 0.9591736793518066, "association_id": 5, "light": [-2.5999646186828613, -1.6164987087249756, 2.4838201999664307, 1.4737331867218018], "segmentation": {"size": [1060, 1600], "counts": "ikX?5nP16RXO3Z>1bA2[>1bA0^>1`A1_>1]A1c>0[A1d>2XA0h>2SA1m>1n@3Q?Ok@3U?Nh@4X?Mf@4Z?Ke@7[?Ib@:^?E_@?a?@X@h0h?WOm_OU1S`0jNi_O[1W`0eNf_O_1Y`0`Nf_Ob1Z`0_Nd_Ob1\\`0_Nb_Ob1^`0_N__Oc1a`0_N[_Oc1e`0^NV_Of1j`0[NR_Oh1n`0YNo^Oi1Qa0XNlYOTOj3e2Zb0XNaYO^OS4[2\\b0WNeYOZOe1DIl2md0TNPZOROZ12Dj2Re0PNd\\OWOWNk2Ue0lMe\\OZORNn2Ye0eMh\\O]OjMS3^e0_Mi\\O^OeMW3be0ZMj\\O_OaMZ3ee0VMk\\O@_M[3fe0TMl\\OA\\M]3he0QMm\\OBZM^3ie0PMm\\OBXM`3le0mLl\\OCUMc3oe0iLm\\ODQMe3Sf0gLl\\ODlLj3Xf0bLl\\ODjLl3Zf0_Lm\\ODhLo3\\f0\\LT[O@\\O3TOR4\\f0[LS[OB\\OOVOU4[f0YLS[OE\\OJWOY4[f0VLS[OH6S4hd0SLR[OL3S4ld0oKR[OONU4gg0lKnWO^4Qh0dKlWO^4Th0dKiWO]4Wh0eKeWO]4Zh0eKdWO\\4\\h0eKbWO\\4_h0dK_WO]4ah0dK]WO]4ch0dKZWO^4fh0cKWWO_4ih0cKRWO`4nh0bKnVO_4Si0cKiVO_4Wi0bKfVO`4Zi0aKdVO_4]i0bK`VO_4ai0bK\\VO_4ei0aKYVO_4ii0cKSVO]4oi0eKmUO[4Uj0Y10O2O1O1O0O2N1O2N1OcUOdIUj0[6lUOfIRj0Z6oUOhIoi0Y6PVOhIQj0V6oUOkIQj0U6nUOlIRj0S6nUOnISj05PVOT5LhJTj0F_VO`5]OkJnj0T5QUOmJPk0R5oTOoJ\\i0LmWOT5fNQK\\i0NmWOo4hNSK[i00jWOn4jNSK[i0=^WO`4WOSKZi0>_WO_4VOTKZi0>`WO^4VOTKYi0?aWOo4\\h0UKcWOk4\\h0VKdWOW4WOVKTi0d0eWOV4WOVKSi0e0eWOi4Zh0XKeWOi4Zh0XKeWOi4Xh0ZKfWOh4Wh0ZKgWOi4Xh0kJ\\WOTO:S6Yh0hJcWOQO3X6Yh0gJfWOPO0Z6Yh0fJhWOPOOZ6Zh0fJeWOROOX6]h0fJcWOTONW6`h0fJ]WOZONQ6fh0eJWWOQ6ih0U16I8I2N2MM4G9LASWOnHlh0f7O1N2N_OYWOhHfh0Z7ZWOfHdh0[7]WOeHch0[7]WOeHbh0\\7^WOdHbh0\\7^WOcHch0\\7^WOdHah0]7_WOcHah0]7_WOcHah0]7_WObHah0_7_WOaHah0_7_WOaHah0_7_WO`Hah0b7^WO^Hah0c7_WO\\H`h0g7_WOYH_h0i7aWOVH]h0Z8NnJgWOQ1NfKXh0[3lWOY1Th0gNoWOW1Ph0iNQXOW1ng0jNSXOU1kg0lNVXOS1jg0nNWXOgLEi3Th0_OXXOfLFc3OULRh0c3ZXOcLGd3NTLRh0d3ZXObLHg3LRLQh0f3[XO`LJg3KQLQh0g3\\XO_LIi3Ph0HXXO\\LKk3mg0JiXO5Xg0JhXO7Wg0IjXO6Vg0JkXO5Ug0KlXO4Tg0MlXO2Ug0MlXO2Tg0NmXO2Rg0NnXO2Rg0MoXO3Qg0MPYO2Pg0NPYO2Pg0NPYOQNVOJig0T2SYOoM_OD^g0]2SYOmMCDZg0_2TYOkMDFWg0_2UYOjMFFUg0b2TYOfMIGUg0c2QYOcMNHRg0g2nXO_M3HPg0j2kXO\\M9Hnf0k2iXOZM=Jjf0m2gXOXMb0Ihf0o2eXOXMd0Hhf0o2eXOWMe0Igf0AbWOQ3Q1dMh0Iff0@bWOS3P1dMh0ISg0c2UXOcMj0Jof0c2YXOaMi0Lnf0c2YXO`Mk0Llf0d2YXO_Mm0Lif0e2\\XO\\Mn0Oef0e2]XOZMQ10bf0f2]XOXMT11_f0g2^XOUMV13`f0e2YXOXMW13cf0d2SXOYM\\11df0e2oWOYM_10ef0g2jWOXMc1Off0R3\\WOnLP2Mhf0W3TWOkLV2Lif0Y3nVOjL\\2Khf0[3kVOhL`2Kgf0]3hVOgLc2Ihf0_3fVOfLc2Jif0_3eVOdLbl0Z3^SOeLel0Y3e0N2N2N2nMSROi0om0SOUROk0nm0RORROn0Qn0oNoQOQ1Tn0lNlQOT1Vn0iNkQOX1Xn0bNjQO^1Qo0MH[NVQOa1hn0`NYQO_1gn0aNZQO_1Uo0O2O1O001O001N101O0O2O0O2N2N2M4H8F;I6Kelhl0"}}, {"image_id": 145, "category_id": 1, "bbox": [1027.0, 145.0, 152.0, 87.0], "score": 0.9997992515563965, "association_id": 3, "light": [-2.921715021133423, -1.2826802730560303, 2.8650829792022705, 1.1184723377227783], "segmentation": {"size": [1060, 1600], "counts": "SXWQ18iP14M4N2M2O1O1O1O1_QOYOcl0j0YSOWOgl0k0WSOVOhl0k0WSOUOil0m0TSOTOll0n0RSOROnl0Q1oROoNQm0T1lROlNTm0U1kROkNUm0V1jROjNVm0W1iROiNWm0X1hROhNXm0[1dROfN\\m0]1aROcN_m0^1`RObN`m0_1_ROaNam0`1^ROaNam0`1^RO`Nbm0a1]RO_Ncm0c1[RO]Nem0d1ZRO\\Nfm0e1YRO[Ngm0f1XROZNim0f1VROZNkm0e1URO[Nkm0f1SRO[Nnm0e1QRO[Nom0e1QRO[Nom0f1PROZNQn0e1oQO[NQn0e1oQO[NQn0f1nQOZNSn0e1mQO[NSn0f1mQOYNSn0g1mQOYNSn0h1lQOXNTn0h1lQOXNTn0i1kQOWNVn0h1kQOVNVn0k1iQOUNWn0l1hQOTNXn0m1gQOSNYn0P2^QOnM22`n0V2_QOiMan0X2^QOgMcn0Z2\\QOfMcn0[231O1O00000000000000O100O100N2O1O[QOiM_n0U2cQOlM]n0Q2dQOPN\\n0o1eQOQN[n0n1fQORNZn0m1fQOTNZn0l1fQOTNZn0k1gQOUNYn0j1hQOVNXn0j1hQOVNYn0h1hQOXNXn0g1iQOYNWn0g1iQOYNXn0f1hQOZNXn0e1hQO\\NXn0c1iQO]NWn0c1jQO[NXn0c1iQO]NWn0c1iQO]NWn0c1iQO]NXn0a1iQO_NXn0_1iQOaNWn0_1iQOaNWn0^1jQOaNXn0]1iQOcNWn0]1iQOcNXn0Z1jQOfNWn0X1jQOhNVn0W1kQOiNVn0V1jQOiNWn0V1jQOiNXn0U1m0N2N2O001N2O2N001N101O1ObPOYO`n0f0`QOZOan0e0_QO[Oan0e0_QO[Oan0e0P1O1O001O0000O1000O1000001O001O1O001O1002NO010O001O00001O0O100FZoN6jP1M3O2Ofcc="}}, {"image_id": 145, "category_id": 1, "bbox": [118.0, 211.0, 235.0, 352.0], "score": 0.9999803304672241, "association_id": 4, "light": [-1.6735546588897705, -3.0585663318634033, 1.5067448616027832, 2.911862373352051], "segmentation": {"size": [1060, 1600], "counts": "Ufj31SQ12M101N1O101N100000000O2O0^MGYTO9fk0JXTO6fk0LYTO5fk0MYTO3ek0O[TO1bk02^TON^k07`TOJ^k08bTOH\\k0:dTOF[k0fTOBXk0`0gTOAWk0a0iTO_OVk0b0jTO^OUk0c0jTO^OUk0c0kTO]OTk0d0lTO\\OSk0e0mTO[ORk0f0nTOZOQk0f0PUOZOoj0g0RUOXOkj0k0TUOVOjj0l0VUOSOjj0n0VUOROhj0o0YUOQOgj0o0YUOQOfj0P1ZUOPOfj0P1ZUOPOej0Q1ZUOPOej0P1\\UOPOdj0P1\\UOPOcj0Q1]UOoNbj0Q1_UOoN`j0R1`UOnN^j0S1cUOmN[j0U1eUOkNXj0W1iUOhNUj0[1kUOeNQj0^1PVObNni0`1RVO`Nli0a1UVO_Nji0b1VVO]Nji0d1VVO\\Nii0e1WVO[Nhi0f1XVOZNgi0g1YVOXNfi0j1hUOkMeN;`k0m1jUOiMeN;_k0n1kUOiMeN8`k0P2jUOiMfN7_k0Q2kUOhMfN7^k0S2kUOgMeN6`k0U2iUOfMfN6_k0W2iUOeMgN3_k0[2iUObMgN4^k0]2iUOaMgN3^k0^2jUOdMcNNbk0a2jUORNUj0P2iUOQNVj0P2iUOPNWj0Q2iUOoMUj0S2kUOmMSj0V2kUOkMRj0X2nUOgMQj0[2oUOeMPj0\\2PVOdMoi0^2PVOaMPj0`2oUOaMPj0`2PVO`Moi0b2PVO^Moi0c2QVO]Mmi0f2RVOZMki0i2TVOXMki0j2TVOUMli0m2SVOSMli0o2SVOQMmi0P3RVOoLni0S3QVOmLoi0T3PVOlLPj0U3nUOlLRj0T3nUOlLRj0U3mUOjLTj0W3kUOiLUj0W3kUOiLTj0X3lUOhLTj0X3lUOgLTj0[3kUOeLUj0[3jUOfLUj0[3kUOeLTj0\\3lUOdLSj0]3mUOcLRj0^3nUOaLQj0a3oUO_LPj0c3oUO]LPj0e3nUO[LSj0e3mUO[LRj0g3mUOYLRj0i3nUOVLRj0k3mUOTLSj0o3kUOQLUj0Q4iUOnKXj0T4fUOkKZj0X4eUOfK\\j0^4`UOVKkj0g5SNjIbXOX6Wg0oIfXOS6Vg0RJgXOP6Ug0TJiXOn5Tg0UJjXOl5Ug0WJgXOk5Wg0YJeXOi5ke0`IZZOk0Fi5ne0aIWZOl0Bg5Vf0bIRZOm0^Og5_f0`InYOo0WOi5jf0[IkYOY8Uf0hGhYOZ8Xf0hGdYO[8[f0gG`YO\\8_f0hG[YO[8ef0R1000001O0000O10000`N\\YO`Hdf0^7`YO_Haf0_7cYO_H]f0`7fYO^HZf0a7hYO^HXf0`7lYO]HUf0a7oYO]HQf0a7RZO]Hoe0a7UZO\\Hle0c7VZO[Hke0d7WZOZHje0e7XZOYHie0g7WZOWHke0h7WZOUHke0j7WZOSHke0l7WZOQHke0n7XZOmGle0Q8d1N2O1O1O100O2O0O10001N100O2M3M2N3M3N2N2N1O00000O2N1O2N102N1O2N4K5K4L3M4M2N4L4K6J=B:F6oMmSOhNXl0m0VTOlNnk0o0YTOlNhk0S1aTOcNbk0[1kTOQN^k0n1m1N2O1aNSQOd0on0[OQQOe0Po0YORQOf0Po0WORQOg0Qo0UORQOj0Po0POVQOo0`o0O1O2N1O2N2O11OCloNIRP14SPOImo05UPOLko02VPONjo01XPOOho00XPO0ho0NZPO2`P1JY`ZX1"}}, {"image_id": 145, "category_id": 1, "bbox": [1017.0, 245.0, 385.0, 495.0], "score": 0.9999890923500061, "association_id": 1, "light": [-2.5755200386047363, -1.70855712890625, 2.5746359825134277, 1.5678291320800781], "segmentation": {"size": [1060, 1600], "counts": "h^mP19iP14M2N2O001N100O10000O2O00000O10000O1000000O2O0WMXOVUOh0ij0@PUO`0oj0GkTO9Tk0KhTO6Wk0LhTO4Wk0NgTO3Xk0OgTO1Xk00hTO0Wk02gTOOXk03gTOLYk05gTOKXk07fTOJZk06fTOJYk07gTOIXk09fTOHYk09gTOGWk0;iTOEVk05K5\\\\OoBkb0f=O1O1O1O1O1O0O0100000000O1000O1000O1000000000000000000000000O10000000000000000000000000000O100O10000O1]No\\ORERc0l:Y]OjDib0S;_]OfDbb0Y;b]OcD_b0\\;d]OaD]b0^;f]O_D[b0`;h]O]DYb0b;i]O\\DXb0c;j]OZDYb0d;i]OYDYb0g;h]OWDYb0h;j]OTDYb0j;a1O1O2M2O2O0O2N101O1O1O1O1O1O001O1O1O010O001O01O010O10O010O10O0100O10O01O1O010O1O10O01O1O1O100O1O000O1000000bMbZOVI^e0f6iZOWIWe0e6oZOXISe0d6R[OZInd0d6U[O[Ikd0c6X[O\\Ihd0c6Z[O\\Ifd0b6][O\\Ied0a6_[O\\Ibd0b6a[O\\Iad0a6c[O\\I^d0a6j[OYIXd0a6R\\OTIUd0X6c\\O[Iec0\\6g3J6M2O2M3N1O2N1N3N1N3M2N3M3M2N3M2O2N1N3N2M3M2N3M3L4M3M3M4L3L5M4K7I7I6I8H;^O_d\\6"}}, {"image_id": 145, "category_id": 1, "bbox": [456.0, 259.0, 225.0, 182.0], "score": 0.7531275153160095, "association_id": 8, "light": [-2.667372226715088, -1.4650075435638428, 2.5827362537384033, 1.3094818592071533], "segmentation": {"size": [1060, 1600], "counts": "^^h>1RQ110001O0O100YKM]XO3Ug0c0cXO]O\\g0f0bXOZO]g0h0bXOXO]g0j0bXOVO^g0k0aXOUO_g0l0`XOTO`g0m0`XORO`g0o0^XORObg0o0]XOQOcg0o0]XOQOcg0P1\\XOPOdg0P1\\XOQOcg0P1\\XOPOdg0P1\\XOPOdg0Q1[XOoNeg0R1ZXOnNfg0T1XXOlNhg0X1TXOiNkg0Y1SXOgNmg0[1QXOeNng0^1PXObNPh0`1^TOcNT3M^h0V2XWOkMgh0[2SWOeMmh0^2PWObMPi0`2nVOaMQi0`2nVO`MRi0a2lVO`MUi0`2jVO`MVi0b2hVO_MWi0c2gVO]MYi0f2dVOZM\\i0h2bVOXM^i0i2aVOXM^i0i2aVOWM_i0j2`VOVM`i0k2_VOUMai0l2^VOTMbi0n2\\VOSMci0o2[VOQMei0R3WVOoLii0R3VVOnLji0S3UVOmLli0S3SVOnLli0S3SVOmLmi0T3RVOlLoi0T3PVOlLPj0U3oUOkLRj0U3mUOkLTj0U3kUOkLUj0V3jUOjLWj0V3hUOjLYj0V3fUOjL[j0V3dUOjL]j0U3cUOkL^j0U3aUOkL`j0U3_UOlLaj0T3^UOkLdj0T3\\UOlLej0T3ZUOkLhj0T3XUOlLjj0S3VUOkLoj0Q3QUOnLSk0P3nTOkLXk0T1dSOb0T1WN[k0T1dSOSOLW1im0E\\ROROLZ1hm0B]ROTOK[1im0_O]ROTOK]1jm0\\O]ROTOL`1gm0YOiROg0Xm0XOhROi0Xm0UOkROi0Vm0VOnROg0Qm0YOPSOf0Pm0ZOPSOf0Pm0ZOQSOe0Pm0ZOPSOf0Pm0[OPSOd0Pm0\\OPSOe0ol0[O^RO[O4Z1]m0[O_RO[O4]1Zm0XObRO[O4]1Zm0YOaROZO5]1Zm0ZOTSOf0ll0[ORSOf0ol0ZOPSOf0Pm0\\OmRO5XO]Okm0a0jRO1\\O_Oim0a0_RORONn0K^Ogm0d0kROL@^Ofm0f0kROIC_Obm0i0lRODjm0<\\ROQOPn0P1R1000000001O00001O1O3MO1M3O2ORROnNjk0Q1UTOQOlk0n0STOTOlk0l0STOUOnk0j0RTOVOok0i0PTOYOPl0e0QTO[OPl0d0PTO\\ORl0a0nSO@Sl0?mSOAUl03mQOKn13Vl00oQOKj16Xl0MRROIf1;Yl0JPTO8Pl0FQTO;Pl0CoSO?[n0000O1000000O1000000O100O10000O10O10O10000O100O100aMXObTOh0]k0ZObTOf0^k0ZObTOf0]k0[OcTO4eM7hm0EcTO1jM7cm0IdTOMmM8^m0LTUOLnj07h28N2N2O1N2N3N1N2O1O1O2O00O1000iROROXj0n0gUOTOXj0l0^TOPO[O1^O6fl0i0aTOROYO1^O6gl0f0cTOTOiNN04K6hl0d0dTOTOiNN04K6hl0e0cTOSOjNN04K5hl0g0cTOROjNN13I7il0g0bTOQOkNN13I7il0g0bTOPOlNO04H6jl0g0bTOPOlNO13F8jl0g0cTOoNlN00b0al0`0aTOPOlNO1c0al0`0_TOPOmN1Mc0fl0>]TOQOlNQ1gl0:oSO6Pl09_SOIal0^2O1O1O1O0001gMZSO2fl0M`SOO_l01cSOM]l02eSON[l01fSONZl03dSO0Zl0_2O1O2M3O1O1O00O0O1QNoSOiNRl0R1VTOjNlk0Q1YTOmNik0o0[TOoNfk0m0`TOPOak09eSOiNP1l0_k0oN`SOf0l16Tn0I^mfm0"}}, {"image_id": 146, "category_id": 1, "bbox": [406.0, 105.0, 232.0, 312.0], "score": 0.9999993443489075, "association_id": 3, "light": [-2.4242806434631348, -1.6759445667266846, 2.3244755268096924, 1.5371718406677246], "segmentation": {"size": [422, 656], "counts": "XfW54R=1O0O2O001O000000001O0000001O000000001O00000O101O00000000000001O00000O10000000000O100000000000000001O0000000000001O00000000001O0000000000001O000000000000001O0000000000001O00001O00001O001O00001O001O1O00001O001O1O00010O0eI;j4a5eJVJd01n4h5YJ\\Ji6Q60002N\\OXIlJe6Q5_IoJ`6n4cIRK^6j4dIWK_6d4cI\\Kd6\\4\\IdKg6X4[IgKg6V4ZIkKg6S4YImKj6Q4UIoKn6n3RIRLo6m3PITLQ7j3QITLP7l3QIRLQ7l3RIPLP7P4QImKR7S4S10gGdKd7]4WHfKj7[4PHiKP8f41O010O1O2N3L4K5D2M3M3M4L4M3M3N2M2O1O1O0O101TJSI]5m6`JXI^5h6aJZI^5g6`J^I\\5b6dJ^I\\5b6cJ`I\\5`6cJbI[5`6cJbI\\5^6dJcI[5]6dJdI\\5\\6dJdI\\5\\6dJeI[5[6dJfI\\5Z6dJfI\\5Y6dJhI\\5Q700000001O00000000000000000000000000000000000000000000000000000000001O000000000000QOfJRJZ5n5fJRJZ5n5fJRJZ5n5fJRJZ5m60000000000001O00000QOeJSJ[5m5eJSJ[5m5eJSJ[5m5eJSJ[5m5eJSJ\\5k5eJUJ[5k5eJUJ[5k5eJUJ[5k5eJUJ[5j5fJVJ[5i5eJWJ[5i5eJWJ[5i5dJXJ]5g5cJYJ]5g5cJYJ]5g5cJYJ^5f5aJ[J_5d5bJ\\J_5c5aJ]J_5c5aJ]J`5b5`J^J`5b5`J^Ja5a5_J_Ja5a5^J`Jc5_5]JaJc5_5]JaJd5]5]JcJc5]5]JcJc5]5]JcJd5\\5[JeJe5[5[JeJe5[5[JeJf5Z5ZJfJf5Z5ZJfJf5Y5[JgJe5Z5ZJfJg5Y5YJgJg5Y5YJgJg5Y5YJgJg5\\61O0000001O00000000001O00000000001O00000nNUJiJk5W5UJiJk5Y6000000000000000000000000001O000oNTJhJl5X5TJhJm5W5SJiJm5W5SJiJm5V5TJjJl5V5TJjJl5V5TJjJl5V5TJjJl5V5TJjJm5V5RJjJn5V5RJjJn5V5RJiJo5W5QJiJo5W5QJiJo5W5QJiJo5W5QJiJo5W5QJiJo5W5QJiJP6V5PJjJP6U5QJkJP6T5PJlJP6T5PJlJQ6S5oImJQ6R5PJnJP6R5PJnJQ6Q5oIoJQ6Q5oIoJQ6Q5oIoJR6P5nIPKR6P5nIPKR6P5nIPKS6o4mIQKT6n4lIRKU6m4kISKV6l4jITKW6l4hITKY6k4gIUKZ6j4gIUKY6k4gIUKZ6j4fIVKZ6k4eIUK\\6j4dIVK\\6j4eIUK[6k4eITK]6l4bITK^6l4bITK_6k4aIUK`6k4_IUKa6k4_IUKb6j4_IUKb6k4]IUKd6j4\\IVKe6i4[IWKf6h4[IWKf6i4YIWKi6g4WIYKj6f4VIZKm6d4SI[KP7b4PI^KS7`4mH_KU7_4kHaKV7^4jHbKW7^4iHaKX7^4hHbKY7U5001O1O2N2N2N2N2\\O[HcKf7m42_OXHbKi7m40AWHaKj7^4VHbKk7l40BUHaKl7l42ARHaKP8_4PH`KR8^4nGbKS8^4mGaKU8]4kGcKV8]4jGbKW8]4iGcKX8\\4hGdKX8\\4iGbKY8]4gGcKZ8[4gGeKZ8Z4gGeKZ8Y4kGcKV8\\4;O1N2mKUGi3k8QL]Gl3Q9N1N2N2N3M3M5J6E9F;F9I>B8_O`0EVo00O1000000O010O1O100O010O1O1O000N2N2M3K5XNg102O0O2O1O010O10O010000O0100000O10O1000O100000O1000O10000000O1000O1000O1000000O10O100000O100000000O1000O100000O100000000O1000000000O010000000000O10000000000000000O10O100000000000000000O1000000000O100000000000000000O100000O100000000000000000000O100000O1000000000O1000000000O1000000000O1000O10000000000O100000000000O0100000000000000000000O100000000000000000000000000000000000000000000000000000000000O10000000000000000000000000O100000000000000000000000000000001O0000000000000000000000000000000000000000000000000000000O100000000000000000000000000O1000000000001O0O10000000000O10000000000O100000000000000O101O0000000000000000000000000000000O10000000000000000000000000000000000000000000000000000000000000001O00000000O100000000000000000000000O1000000000000000000000O100000000000000000000000000000000000000000000000000000O10000000000000000O1000000000000O100000000O100000000000000O1000000000000000000O10001O000000000000000000001O0000000000000000001O0000000000000000000000001O00000000000O100000000000000000000000001O000O1000000000000O100000000O10000O100000000O100000001O000O10000000000000000O10000000000000000000000O1000000000000O100000001O0O1000000O1000000O1000000000000O1000000000000000000O1000001O0000000000000000000000000000001O00000000000000000000001O0O10000000000000000000000000001O000000000000000O10000000000000000000000O10000000000000001N100000000000000O10000000000000000000000000000000000O100000000000000000000000000000000000001O000000000000000000000000000000000000000O1000000000000000000000000000000000O100000000000000000000000000000000000000000000000000000O101O00000000000000001O0000000000001O0000000O2O0000001O000000001O00000000001N10000000000000001O00000O100000001O000000001N1000001O00001O1O1O1O2M2O1O001O001O001O00001O000O2O0000001O0000001O00000O2O0000001O00001O0O101O001O001O0O2O001O1O1N2O1O1O1O1N2O000O2O001N101O0O101O000O101O0O10001O0O2O1O1N1O2M4M2MfWT2"}}, {"image_id": 148, "category_id": 1, "bbox": [77.0, 674.0, 482.0, 165.0], "score": 0.999992311000824, "association_id": 1, "light": [-0.9172410368919373, -2.875523805618286, 0.8390883803367615, 2.791348695755005], "segmentation": {"size": [1728, 2304], "counts": "QhR42le14M101O0N2000001O0000000000O1000000000O10000nLi1[^NWNca1n1Z^NRNda1R2Z^NnMea1T2Z^NlMea1V2Z^NjMfa1W2Y^NiMfa1Y2Y^NgMga1Y2Y^NgMfa1[2Y^NeMga1[2Y^NeMga1\\2X^NdMga1]2Y^NcMga1^2X^NbMga1`2X^N`Mga1a2Y^N_Mga1c2W^N]Mha1e2W^N[Mia1f2V^NZMia1h2V^NXMja1i2U^NWMja1j2V^NVMja1k2U^NUMka1l2U^NSMja1o2U^NQMka1P3T^NPMka1R3U^NmLka1S3U^NmLja1U3U^NkLka1V3U^NiLka1X3T^NhLka1Y3U^NgLka1Z3T^NfLka1\\3T^NdLla1]3T^NbLka1`3T^N`Lla1`3T^N`Lka1b3T^N^Lka1c3U^N]Lka1c3V^N\\Lja1d3V^N\\Lia1f3V^NZLja1f3W^NYLia1g3Y^NWLfa1j3[^NTLfa1l3Z^NTLea1m370O100O100O10000O1000000O10000O100O100O100O100O10000O1000000O0\\^NkK_a1U4`^NmK_a1Z401N10000OGd^NPL\\a1o3d^NRL\\a1n3d^NRL[a1n3f^NRLZa1n3f^NRLZa1m3f^NTLZa1l3f^NTLZa1k3g^NULXa1k3h^NVLXa1j3h^NULYa1j3g^NWLYa1i3f^NXLYa1h3h^NXLXa1g3i^NYLWa1f3j^NZLUa1f3l^NZLTa1d3n^N\\LRa1c3n^N^LQa1b3P_N^LPa1b3P_N^Lo`1b3R_N^Ln`1a3S_N_Lm`1a3S_N_Lm`1`3T_N`Lk`1a3U_N_Lk`1a3U_N_Lk`1b3T_N^Ll`1b3S_N_Lm`1a3S_N_Lm`1a3S_N_Ll`1b3T_N^Ll`1b3T_N^Ll`1b3T_N^Ll`1b3T_N^Ll`1b3T_N^Ll`1b3T_N^Ll`1b3T_N^Ll`1b3T_N^Lk`1d3T_N\\Ll`1d3T_N\\Ll`1d3T_N\\Ll`1d3T_N\\Ll`1d3T_N\\Lk`1f3T_NZLl`1f3T_NZLl`1f3T_NZLk`1h3T_NXLl`1h3T_NXLl`1h3T_NXLk`1i3U_NWLk`1j3T_NULm`1k3S_NULm`1k3S_NULl`1m3S_NSLm`1m3S_NSLm`1m3S_NSLm`1m3S_NSLm`1n3R_NRLn`1n3R_NRLn`1n3R_NRLn`1n3R_NRLn`1n3R_NRLn`1n3R_NRLm`1o3S_NQLm`1P4R_NPLn`1P4R_NPLn`1P4R_NPLn`1P4R_NPLn`1P4R_NPLn`1P4R_NPLn`1P4R_NPLn`1P4R_NPLn`1P4R_NoKo`1Q4Q_NoKo`1Q4Q_NoKo`1Q4Q_NoKn`1R4R_NnKn`1Q4S_NoKm`1Q4S_NoKm`1Q4S_NoKm`1P4T_NPLl`1P4T_NPLl`1P4T_NPLl`1P4T_NPLl`1o3U_NQLk`1o3U_NQLk`1o3U_NQLk`1o3U_NQLj`1o3W_NQLi`1o3W_NPLj`1P4V_NPLj`1P4V_NPLj`1P4V_NPLj`1P4V_NPLj`1o3W_NQLi`1o3W_NQLi`1o3W_NQLi`1o3V_NRLj`1n3V_NRLj`1n3V_NRLj`1m3W_NSLi`1m3W_NSLi`1m3W_NSLi`1m3W_NSLi`1m3W_NSLi`1m3W_NSLi`1l3X_NTLh`1l3X_NTLh`1l3X_NTLh`1l3Y_NSLh`1l3X_NTLh`1l3X_NTLh`1l3X_NTLh`1l3X_NTLh`1k3Y_NULg`1k3Y_NULg`1k3Y_NULg`1k3Y_NULg`1k3Y_NULg`1k3X_NULi`1k3W_NULi`1k3W_NULi`1k3W_NULj`1j3V_NVLj`1j3V_NVLj`1j3V_NVLj`1j3V_NVLj`1i3W_NWLi`1i3W_NWLi`1i3W_NWLi`1i3W_NWLi`1i3W_NWLi`1i3W_NWLi`1i3W_NWLi`1i3W_NWLi`1i3W_NWLi`1i3W_NWLi`1i3W_NWLi`1i3W_NWLi`1i3W_NWLi`1i3W_NVLj`1j3V_NVLj`1j3V_NVLj`1j3V_NVLk`1i3U_NWLk`1i3U_NWLk`1h3V_NXLj`1h3V_NXLj`1h3V_NXLj`1h3V_NXLj`1h3V_NXLj`1h3V_NXLj`1h3V_NXLj`1h3V_NXLj`1h3V_NXLj`1h3V_NXLj`1h3V_NXLk`1g3U_NYLk`1g3U_NYLk`1g3U_NYLk`1g3U_NYLk`1f3V_NZLj`1f3V_NZLk`1e3U_N[Lk`1e3U_N[Lk`1e3U_N[Lk`1e3U_N[Lk`1e3U_N[Ll`1d3T_N\\Ll`1d3T_N\\Ll`1d3T_N\\Ll`1d3T_N\\Lm`1c3S_N]Lm`1c3S_N]Lm`1c3S_N]Lm`1d3R_N\\Ln`1d3S_N[Lm`1e3S_N[Ln`1d3R_N\\Ln`1e3Q_N[Lo`1e3Q_N[Lo`1e3Q_N[Lo`1e3Q_N[Lo`1f3P_NZLQa1e3o^N[LQa1e3o^N[LQa1f3n^NZLRa1f3n^NZLRa1f3n^NZLRa1g3m^NYLTa1f3l^NZLTa1g3k^NYLUa1g3k^NYLUa1h3j^NXLWa1g3i^NYLWa1h3h^NXLXa1i3g^NWLZa1i3e^NWL[a1i3f^NVLZa1k3e^NUL\\a1j3d^NVL\\a1k3c^NUL]a1k3c^NTL^a1m3a^NSL`a1l3a^NSL_a1m3a^NSL_a1n3a^NQL_a1o3a^NQL`a1o3_^NQLaa1o3`^NPL`a1Q4`^NnK`a1R4`^NnKaa1R4^^NnKba1R4_^NmKaa1T4^^NjKea1U4[^NkKea1U4310O0000001O01O000001O000000001O0001O0001O00001O1O001O1O1O1O1O001O00001O0Ol]NWLSb1i3m]NXLRb1k300001O000000010O00000O2O00001O00001O001O00001O0Eg]NoLYb1Q3g]NoLZb1o2g]NQMYb1o2f]NRMZb1n2f]NRM[b1l2f]NTMZb1l2f]NTMZb1l2f]NTM[b1k2e]NUM[b1j2f]NVMZb1j2f]NVM[b1i2e]NWM[b1i2e]NWM[b1i2e]NWM[b1i2e]NWM\\b1h2d]NXM\\b1h2c]NYM]b1g2c]NYM]b1g2c]NYM^b1f2b]NZM^b1f2b]NZM^b1f2b]NZM^b1f2b]NZM_b1e2a]N[M_b1e2a]N[M_b1e2a]NZMab1e2_]N[Mab1e2_]N[Mbb1c2_]N]Mab1c2_]N]Mbb1b2^]N^Mbb1b2^]N^Mbb1b2^]N^Mcb1a2]]N_Mcb1a2]]N_Mcb1a2]]N_Mdb1`2\\]N`Mdb1`2\\]N`Mdb1`2\\]N`Meb1_2[]NaMeb1_2[]NaMeb1_2[]NaMfb1^2Z]NbMfb1^2Z]NbMfb1^2Z]NaMgb1_2Y]NaMhb1^2X]NbMhb1^2X]NbMhb1^2X]NbMhb1^2Y]NaMhb1^2X]NbMhb1^2X]NbMhb1^2X]NbMhb1^2X]NbMhb1_2W]NaMib1_2W]N`Mkb1_2U]NaMkb1^2V]NbMjb1^2V]NbMjb1^2V]NbMkb1]2U]NcMkb1]2U]NcMlb1\\2T]NdMlb1\\2U]NbMmb1\\2T]NdMlb1\\2T]NdMmb1[2S]NeMmb1[2T]NdMlb1\\2U]NcMlb1\\2T]NcMmb1]2S]NcMmb1]2;O2O00001O0O101O1O0O2O0O2O001N10001O0O101N2O1N2N3Jhnok2"}}, {"image_id": 148, "category_id": 1, "bbox": [647.0, 396.0, 695.0, 851.0], "score": 0.999998927116394, "association_id": 3, "light": [-2.0654690265655518, -2.033362627029419, 2.030055046081543, 1.8442049026489258], "segmentation": {"size": [1728, 2304], "counts": "noTR12ie17L3N3N000O101O0000000O2O00000O2O001O0O2O00001O0O10001O000000001N1000001O0O2O00001N10001O00000O1000001O00000O101O00001O000O101O00000000001N10000000000O2O00000O100000001N100000000000001O000000000O10001O000000000O100000001O000000000000000000000O100000000000000000000000001O0000000000000000000000000000001O0000000O100000000000001O0000000000000000000000000000001O0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000O0100000000000000000000O10000000000000000000000000000O10000000000000000000000O100000000000000O100000000000000O10000000001O00000000000000001O0000000O2O0000001O1O3M2dN^[NU1id1N2N001O0000000O2O000000001O000000001O0O100000001O0000000000000000000O101O000000000000000000001O00000000001N100000001O000O2O00001O0O101O00001N101O0O2O1K9Jn[[2S1dbdMh0A6J6K4L3M3M3L4K6J5J6hkNjLae0Z3\\ZOjL_e0[3]ZOiL_e0Z3^ZOjLUCAoP1h3i[OiLRCDSQ1g3h[OfLPCIVQ1d3g[OdLRCIUQ1g3f[ObLSCITQ1j3e[O^LUCJSQ1l3f[O\\LVCHQQ1Q4f[OXLXCImP1T4h[OUL[CGjP1Y4h[ORL]CEiP1\\4g[OQL`CCgP1^4g[OQLbCAgP1_4c[OSLfC^OfP1`4_[OXLiCYOgP1`4\\[O[LmCUOfP1a4X[O_LRDPOeP1c4S[ObLXDkNeP1c4dROiK\\3o0ZIeNeP1d4aROPLW3l0cI`NeP1e4]ROUL\\1dNbLX2POZNdP1f4[ROZLW1hNaLR2YOVNdP1g4XRO]LT1lN^Lo1BQNcP1i4VRO_LP1SOZLi1MlMbP1l4QROcLm0YOVLb1:fMaP1o4lQOhLg0a2lLhK`P1S5`QOTMc0\\2]M]K_P1X5jPOnMc0h1TNRK^P1a5XPO[Na0\\1iNhJ\\P1k5joNbNb0Q1XObJ[P1R6`oNfNb0k0C]JYP1Y6XoNiNd0d0KZJWP1[e[OBZd0?f[OAYd0a0f[O@Yd0a0g[O^OXd0d0g[O]OWd0e0h[O\\OVd0f0i[OZOWd0f0i[O[OUd0g0j[OYOVd0h0i[OYOUd0i0k[OVOUd0j0k[OWOSd0k0l[OUOTd0k0l[OUOSd0m0l[OTOSd0m0l[OSOSd0o0l[OQOTd0o0l[OQOTd0P1k[OPOTd0R1l[OmNTd0T1k[OmNTd0T1k[OlNTd0V1k[OjNUd0W1j[OiNVd0X1j[OgNUd0[1j[OfNUd0[1j[OeNVd0\\1j[OcNVd0^1i[ObNVd0a1h[O`NWd0a1h[O_NXd0b1g[O^NYd0d1f[O\\NXd0f1g[OZNYd0g1f[OYNZd0g1f[OYNZd0h1e[OYNZd0g1f[OYNYd0h1g[OXNYd0h1g[OXNYd0h1h[OWNWd0j1i[OVNWd0j1i[OVNWd0j1i[OVNVd0l1i[OTNWd0l1j[OSNUd0n1k[ORNUd0n1k[ORNUd0n1k[OSNSd0n1n[OQNRd0o1n[OQNQd0P2o[OPNQd0P2P\\OoMoc0R2Q\\OnMnc0S2R\\OmMnc0S2R\\OmMmc0T2S\\OlMlc0U2T\\OkMkc0V2V\\OiMic0Y2V\\OgMic0Z2W\\OfMic0Z2W\\OfMhc0[2X\\OeMgc0\\2Y\\OdMfc0]2Z\\OcMfc0]2Z\\OcMec0^2\\\\OaMcc0`2]\\O`Mcc0`2]\\O`Mbc0a2^\\O_Mbc0a2^\\O_Mbc0a2_\\O^M`c0c2`\\O]M`c0c2`\\O]M_c0d2a\\O\\M_c0d2b\\O[M^c0e2b\\O\\M]c0c2d\\O]M[c0d2e\\O\\M[c0d2e\\O\\M[c0c2f\\O]MZc0c2g\\O\\MXc0e2h\\O[MXc0d2i\\O[MXc0e2h\\O[MXc0d2i\\O\\MVc0e2k\\OZMUc0e2l\\O[MTc0d2m\\O\\MSc0c2n\\O]MQc0d2P]O[MPc0d2Q]O\\Mob0d2Q]O\\Mnb0d2T]O[Mlb0d2U]O\\Mkb0d2U]O\\Mjb0e2W]OZMib0e2X]O[Mhb0e2X]O[Mgb0e2Z]O[Mfb0e2Z]O[Mfb0e2Z]OZMfb0f2\\]OYMdb0g2\\]OYMdb0g2\\]OYMcb0g2^]OYMbb0g2^]OYMab0h2_]OXMab0h2_]OXMab0g2`]OYM_b0h2a]OXM_b0h2a]OXM^b0i2b]OWM^b0i2c]OVM\\b0j2e]OVM[b0j2e]OVMZb0k2f]OUMYb0l2g]OSMYb0n2g]ORMXb0o2h]OQMWb0P3i]OPMVb0Q3j]OoLUb0R3k]OnLTb0S3m]OlLQb0V3o]OiLQb0W3P^OiLoa0X3Q^OhLma0Z3T^OdLka0^3U^ObLja0_3V^O`Lia0b3X^O]Lfa0e3Z^O[Lda0g3\\^OXLca0j3^^OTLba0m3^^OSLaa0n3_^OQLaa0o3a^OPL^a0Q4b^OoK]a0R4c^OmK^a0S4c^OlK\\a0U4d^OkK[a0V4e^OiK\\a0W4d^OiK[a0X4f^OgKZa0Y4f^OfKZa0[4f^OeKZa0[4f^OeKYa0\\4h^OcKXa0]4h^ObKXa0^4i^ObKWa0^4j^O`KWa0`4i^O`KVa0a4j^O^KWa0b4j^O]KUa0d4l^OZKUa0f4l^OYKSa0h4o^OUKRa0k4o^OTKPa0l4R_ORKo`0n4Q_ORKn`0o4R_OQKm`0P5S_OoJm`0R5T_OmJl`0S5T_OmJk`0T5U_OlJj`0U5V_OkJi`0U5X_OjJg`0X5Y_OhJb`0]5__ObJ\\`0c5d_O]JW`0h5i_OXJS`0l5m_OTJo?P6R@nIn?S6R@mIm?T6S@lIm?T6T@kIk?U6V@kIi?V6X@hIh?Y6Y@fIg?Z6Y@fIf?[6[@dIe?\\6[@dId?]6]@aId?_6\\@aIc?`6^@_Ib?a6^@_Ia?b6_@^Ia?a6`@_I`?a6a@^I^?c6b@\\I_?d6a@\\I_?d6a@\\I^?e6c@ZI]?f6c@ZI\\?g6e@XI[?h6e@XIZ?i6g@VIY?j6j@SIU?n6m@PIR?Q7PAmHP?S7QAlHn>U7SAiHm>X7TAgHk>Z7UAfHj>[7VAeHi>\\7WAdHh>]7YAbHf>_7ZAaHe>`7[A`Hd>a7\\A_Hc>b7]A^Hb>c7_A\\H`>e7`A[H`>e7`AZH`>g7aAXH^>i7bAWH^>i7bAWH]>j7dAUH\\>k7dAUH[>l7fASHZ>m7fASHY>n7hAQHX>o7hAQHX>o7hAQHW>P8jAoGV>Q8jAnGW>R8iAnGW>S8hAmGW>T8iAlGW>T8jAkGV>V8iAjGW>V8iAjGW>V8iAiGX>W8hAiGX>X8gAhGX>Y8iAfGW>Z8iAfGW>[8iAdGW>\\8iAdGW>\\8iAcGX>]8iAbGW>_8hAaGW>`8iA`GW>`8jA_GV>a8jA^GW>c8hA]GX>c8hA]GX>c8hA]GW>d8jA[GV>f8Z50000001N1000001O0O10001O0O10001N101N1][ORGc`0o8[_ORGd`0P9[_OPGe`0P9U_OmF`L4Zd0Q9Z_OoFe`0S9[_OlFe`0T9\\_OkFc`0W9]_OgFc`0[9i31N5L4K5L4K5L6I:G9F9H8H8G8I7I6I6K4L4L3Y\\OVC`b0nU_OhAl`0W>Y_OdAh`0[>^_O_Ad`0_>b_OZA``0e>f_OUA[`0i>W1RO]]OmBeb0Q=j]OaBWb0\\=P1N1N3M2N3^Oa0K5N2O1N3M2N2N3K4M4L4L400O0100001O000000001O00001O1O001O001O1O001N2N2N1O2N2N1O2M3N2M2N3O1O1O1O001O1O1O010O1O100O10O0100O100O10001N10001N100O2O0O101N101N101N1O2O0O2O0O2N2O0O2O1O0O2O0O2O1O0O101O0O2O00001O001O001O001O001O001O1O001O1O1O1O1O1O1O1N2O1O1O1O1O001O1O001O1O001O00001O010O00010O00010O010O010O10O010O010000000O1000O1000000O01000O0100O010O0010O01O001O010O1O001O1O001O1O1O1O100O2N2N1O2N1O2N1O1O2N1O2N1O1dXOhF^f0Y9UYOXGef0o9K5Kj0VO1O2N1O1O2N1O1O1O1O1O1O1O1O1O2N1O1O1O1O1O001O001O001O1O001O001O001O1O001O001O001O1N101O001O1N101O1N2O001N2O1N2O1N2O1NYLW\\OiIhc0U6\\\\OjIbc0T6d\\OjIZc0U6j\\OjITc0T6Q]OjIob0R6W]OmIgb0Q6^]OnI`b0o5f]OPJXb0P6j]OPJTb0P6o]OoIoa0R6S^OnIka0Q6W^OoIga0Q6\\^OnIca0R6^^OnI`a0R6b^OnI\\a0R6f^OnIYa0R6h^OnIVa0R6l^OnISa0R6n^OnIQa0Q6Q_OoIm`0R6S_OoIl`0P6V_OPJh`0Q6Y_OnIg`0R6Z_OmIf`0R6\\_OmId`0S6]_OlIb`0T6`_OjIa`0V6`_OiI``0V6c_OhI\\`0X6f_OgIZ`0Y6g_OeIZ`0Z6i_OdIV`0\\6l_ObIU`0^6l_OaIT`0^6n_O`IR`0`6P@^IQ`0a6Q@^Io?a6S@]Im?c6U@\\Ik?c6W@[Ii?e6Y@ZIg?d6\\@[Ic?e6^@ZIc?e6_@ZI`?g6a@WI`?h6b@WI]?i6d@VI\\?j6f@UIZ?k6g@TIX?l6i@SIW?m6k@RIU?n6l@PIT?P7m@PIR?Q7o@nHP?R7RAlHn>U7RAkHn>U7SAjHl>V7UAiHk>X7VAgHj>Y7VAgHi>Y7YAeHg>\\7ZAcHf>]7ZAbHf>^7\\A`He>`7bAXH^>h7kAoGU>R8SBeGn=[8WB_Gi=a8]BYGc=h8bBRG^=n8hBlFX=U9a5000O2O000O1O2E:G9M3O1N2O100O2N101N10001N2O0010O0100O010O10O10O10O1000O0100O01000O1O10O0100O1O10O01O1O1O1O010O1O100O1O10O0100O10000O100O100O2O0O100O1O1O101N1O1O1O1O1O2M2O1N2N2O2N1O1O1O1O2N1O1O101N1O101N1O101N101N101N1O2O1N2M3N2M3M3M3M3M3L5K4L4L4K5L5K4L4L5L3L4N2M3N2M3N2N2N2N1O2N2N1O2O1N1O2N2N2N2N2M3N2K5J7I6J:D=@`0@d0hNP2aNZdP?"}}, {"image_id": 150, "category_id": 1, "bbox": [14.0, 119.0, 774.0, 460.0], "score": 0.9999993443489075, "association_id": 1, "light": [-1.6378623247146606, -2.0875508785247803, 1.47434663772583, 1.928685188293457], "segmentation": {"size": [768, 1024], "counts": "nn:^1`f05L2N2N1O2O0O10001N10000O100000000O1000000O10000O1000000O101O0000000O10000000000O100000000O10001N100O10000O10001N100000001O0O1000000000000O10001O0O10000O1O100O100O10000O10000O1000000O10000O10000O100O100O1O2O0O1O1000000O1000000O1000000000000O10000000000O100000000O10000O1000000O100000000000000O1000000000000000000000000O101O000000000000000000000O100000001O00000O10001O000O10001O00000O2O00000000001O0O100000001O000000001O0O101O0000001O00001O0O10O100000O10O1000O100O0100000O10O1000O10000000O1000O1000O10000O1000O01000000O010000000O010000000000O0100000001O0000000000000000000O100000000000000000001O00000000001O0000000000001O00000001O000001O0000000000000]Mf[O`1[d0^Nf[Ob1Zd0]Ng[Oc1Yd0]Nh[Ob1Xd0]Ni[Oc1Xd0[Nj[Od1Vd0[Nk[Of1Td0YNn[Of1Sd0XNo[Og1Qd0XNQ\\Og1Pd0VNS\\Oi1oc0TNU\\Oi1lc0SNZ\\Oj1gc0QN]\\Oo1kd0O010O00001O000001O01O0000010O0000010O001O10O01O001O010O001O01O01O0001O01O000001O01O000001O0001O0000010O0000001O00010O00000000001O01OXOQZO_Ooe0P1UDnNlL2n>R1UDlNmL3k>S1XDjNmL3i>V1YDgNnL3e>Z1]DcNnL4`>^1aD^NoL4]>a1dD[NoL5X>d1iDWNoL5V>g1jDTNPM6S>h1mDRNPM6R>i1nDQNPM6Q>k1oDnMPM7P>l1PEmMPM8n=m1QEkMQM8m=o1QEiMRM8l=P2REhMRM8k=S2QEfMSM7j=V2REcMTM8g=X2TE`MUM8e=\\2TE\\MXM7^;_O]ER3l1WMYM8];B[ER3m1TM[M8\\;DYES3o1QM\\M9Z;FXER3Q2oL]M9Y;HWER3R2mL^M9X;IXER3R2kL^M:W;JXES3R2iL`M:T;KZET3P2hLaM9S;N[ER3Q2fLaM:R;O\\ES3o1dLcM;o:0^ET3o1`LdMb:;iEV3f1QLPN>`:_:=hEX3h1mKPN>_:>iEX3g1lKQN>^:?iEZ3f1iKTN=[:b0iE\\3g1cKVN?Y:c0iE`3d1^KZN?W:f0hEd3c1VK_N?T:i0gEk3a1lJdN`0R:k0gEo3_1fJiN?P:m0fES4_1`JkN`0o9n0eEV4_1\\JnN?m9Q1dEW4`1XJoN`0l9R1cEY4a1TJRO`0i9T1cE[4a1PJSOa0h9U1cE\\4a1nIUO`0g9W1aE^4P3[J]7Z1^Ea4S3UJ^7\\1YEg4W3lI_7_1TEo4X3bIa7c1SES58]IT2L_8U:UGkEi8_:oFaEo8g:YFZERONd:m:PF]EZOFe:Q;kE]E@Ad:V;fE]EF\\Oc:Z;bEjE]:Y:_E]EOUOa:g<_EYC`:hZOe0J5J6L4N1N2XOgMh[OZ2Xd0gM\\[ONO]2dd0fM\\[O1K[2hd0fMZ[Od2fd0^MW[Oc2hd0;O001J6O1O100O000I8N1O2N1O2N2O001O1O1O001000O010O00100O010O010O\\\\OQLYc0o3f\\OSLXc0n3h\\OSLWc0m3h\\OTLXc0m3g\\OSLYc0m3g\\OTLXc0l3h\\OTLWc0m3h\\OTLXc0l3h\\OTLXc0m3g\\OSLYc0m3g\\OSLYc0m3g\\OSLYc0m3g\\OSLYc0m3g\\OSLYc0m3g\\OSLXc0o3g\\OQLYc0o3g\\OQLYc0o3g\\OQLYc0P4f\\OPLZc0P4f\\OPLZc0Q4e\\OPLZc0P4f\\OPLZc0Q4e\\OoK[c0Q4e\\OoK[c0Q4e\\OoK[c0[40000000000000000000000000000000000000000000000000He\\OkK[c0U4e\\OkK[c0U4e\\OkKZc0V4f\\OjKZc0V4f\\OjK[c0U4e\\OkK[c0]40Ge\\OmK[c0\\4000Fe\\OoK[c0[40000000O1Ed\\ORL\\c0n3d\\ORL\\c0n3d\\ORL\\c0m3e\\OSL[c0m3d\\OTL\\c0l3d\\OTL\\c0l3d\\OTL\\c0k3e\\OUL[c0k3e\\OUL[c0k3e\\OUL[c0k3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0i3e\\OWL[c0i3e\\OWL[c0i3e\\OWL[c0i3e\\OWL[c0i3e\\OWL[c0i3e\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3e\\OUL[c0k3e\\OUL[c0k3e\\OUL[c0k3e\\OUL[c0k3e\\OUL[c0k3e\\OUL[c0k3e\\OUL[c0k3e\\OUL[c0k3e\\OUL[c0k3e\\OUL[c0k3e\\OUL[c0k3e\\OUL[c0k3e\\OUL[c0k3e\\OUL[c0k3e\\OUL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OWL[c0i3e\\OWL[c0i3e\\OWL[c0i3f\\OVLZc0j3f\\OVLZc0j3f\\OVLZc0j3f\\OVLZc0j3f\\OVLZc0j3f\\OVLZc0j3f\\OVLZc0j3f\\OVLZc0j3f\\OVLZc0j3f\\OVLZc0j3f\\OVLZc0j3f\\OVLZc0j3f\\OVLZc0j3f\\OUL[c0k3e\\OUL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL\\c0j3d\\OVL[c0k3e\\OUL[c0k3e\\OUL[c0k3e\\OUL[c0k3e\\OUL[c0k3e\\OUL[c0k3e\\OUL[c0k3d\\OWL[c0i3e\\OWL[c0i3e\\OWL[c0i3e\\OWL[c0i3e\\OWL[c0i3e\\OWL[c0i3e\\OWL[c0i3e\\OWL[c0i3e\\OWL[c0h3f\\OXLZc0h3f\\OXLZc0h3f\\OXLZc0h3f\\OXLZc0h3f\\OXLZc0h3f\\OXLZc0h3f\\OXLZc0h3f\\OXLZc0h3f\\OYLZc0f3e\\O[L[c0e3e\\O[L[c0e3e\\O[LZc0f3f\\OZLZc0f3f\\OZLZc0g3e\\OYL[c0g3e\\OYL[c0g3e\\OYL[c0g3e\\OYL[c0g3e\\OYL[c0g3f\\OXLZc0h3f\\OXLZc0h3f\\OXLZc0h3f\\OXLZc0i3f\\OWLYc0i3g\\OWLZc0h3g\\OWLYc0j3f\\OVLZc0j3f\\OVLZc0k3e\\OUL[c0k3f\\OTL[c0l3d\\OTL\\c0m3c\\OSL]c0m3c\\OSL]c0X40Fc\\OQL]c0o3c\\OQL]c0P4c\\OoK^c0P4c\\OoK]c0Q4c\\OoK]c0R4c\\OmK]c0S4c\\OmK]c0T4b\\OlK^c0T4b\\OlK^c0[40000001O0000000000001O000000001O00001O00001O001O0000001O0H[\\OULec0k3[\\OULfc0i3[\\OWLec0i3Z\\OXLfc0h3Z\\OXLfc0g3[\\OYLfc0f3Y\\O[Lgc0o31DX\\O^Lic0l31CV\\ObLjc0]3W\\OcLjc0\\3U\\OeLlc0Y3U\\OgLlc0X3T\\OhLlc0W3U\\OiLlc0V3T\\OjLlc0V3T\\OjLmc0T3T\\OlLlc0T3T\\OlLmc0S3S\\OmLmc0S3S\\OmLnc0R3R\\OnLoc0Q3Q\\OoLoc0P3R\\OPMoc0o2P\\ORMQd0m2o[OSMRd0l2n[OTMSd0j2n[OVMRd0j2n[OVMSd0i2m[OWMSd0i2m[OWMTd0h2l[OXMUd0f2l[OZMUd0e2k[O[MVd0d2j[O\\MWd0c2i[O]MXd0a2i[O_MZd0^2f[ObM^d0Z2b[OfM_d0Y2a[OgM`d0X2`[OhM`d0X2`[OhMad0W2_[OiMbd0U2_[OkMad0U2_[OkMbd0T2^[OlMed0Q2\\[OnMhd0n1X[ORNkd0j1V[OVNSe0a1mZO_N^e0V1bZOjNhe0l0XZOTOke0h0VZOXOQf0a0oYO_OSf0?mYOATf0=mYOCTf0E7I4K4N3M2O2N1N2O1O001O001O001O001O1O1O1O0010gMY_OWMg`0j2W_OXMi`0i2U_OWMl`0h2S_OYMn`0l42N2N1O2N4L5K3M2N2M4M2N001O1O1O2O0O1O10000Fn]OdJRb0d4R^OdKNIRb0P4U^OiK52J6Rb0T3a_OmLd`0b2h_O^MZ`0^2g_OcM[`0n0_]OK[2WOZ`0?XABl>4ZALi>OYA1\\c0O0000000000001O0000000000001O00000001O000000001O0O100LDdXO=Zg0DfXOTg0BlXO>Tg0BlXO>Tg0BlXO=\\g0000O100O100O100O100O1000000001O00000O101O00000000000000001N10001O0O3MVYj5"}}, {"image_id": 152, "category_id": 1, "bbox": [1234.0, 711.0, 366.0, 676.0], "score": 0.9923186302185059, "association_id": 1, "light": [-1.6317684650421143, -2.300842761993408, 1.540075421333313, 2.141437292098999], "segmentation": {"size": [1536, 2048], "counts": "kjki1>\\_1=E:F8I5M1N2N2O1N3N1N2O1O1O1O1O101O000000001O0000001O000O10000O101O0O100O10000O2N1O1O2M2O1N2O2N1O1O2N100O2O000O2O001N2O0O2O001O1N2O2M3N3L4M3L4M3L4L3N3Lm0SO5L3L6J6J7I4L3M3M3M3M3N1N2WlN]ISn0e6hQOaITn0b6gQOdIVn0_6dQOhIWn0^6`QOlIZn0Y6\\QOSJ]n0R6ZQO[JWNdN[m0W7VTOaJ^MSOYn0`6RTOVMkk0P3nSOTMPl0P3jSOTMSl0Q3gSOSMVl0R3dSOQMZl0T3_SOPM_l0W3WSOnLfl0_3iROiLTm0f3RROgLkm0j:L3M4K4L4L4M3L4L3M4K4M3N2N3M2N2O2M2O1O1O2N1O1O1N2N2O1N3N1O1N20000O10000O10000O10O1000000O1N2O1O1N2N2M4L3N2N2N2N2N2N2M3L4E;D4K3N2M200O000000000O1O2N1iNoPO^ARo0e>mPOWAUo0l>iPORAXo0o>hPOn@Yo0T?ePOl@\\o0U?cPOi@^o0Y?`POe@bo0\\?`PO^@co0c?=2M3N3L4M3L4M2M2O0O2N1O101N1O2N3M3M3M3N1N2N2N1000000001O00100O1000O1O000O100O10O0100O010O0010O1O1O1O1O1O1O2N2N2N2N2N2N2N2N2N3M4L4L6J4L3N2]FmoNS3VP1hLmoNW3UP1fLnoNX3TP1eLmoNZ3XP1bLhoN^3\\P1]LeoNc3aP1WL`oNh3gP1PLZoNP4nP1gKSoNY4RQ1bKnnN]4XQ1]KinNc4[Q1XKgnNg4\\Q1UKenNk4^Q1QKcnNo4_Q1mJdnNQ5`Q1jJcnNT5`Q1iJbnNU5cQ1eJ`nNW2[OmLYR1g0_nN[2F_LQR1P1[nNa2LULoQ1S1XnNg22kKmQ1X1SnNk2`0\\KbQ1e1PnNn2nT1PMSkNn2QU1nLPkNR3QU1lLQkNR3RU1kLPkNT3QU1jLSkNR3PU1jLTkNT3oT1gLUkNV3nT1eLWkNY3nT1`LVkN]3SU1XLQkNg3VU1PLnjNn3ZU1gKjjNW4aX1O1N2O1N3M3M3QNfdNSO^[1e0gdNYOP\\1B`dN=b]100O10000O100O1O100O100O1O1O0O200O002O0O2N1N3M2O2M2O2N3L4K5I9Ghind0"}}, {"image_id": 152, "category_id": 1, "bbox": [0.0, 763.0, 175.0, 79.0], "score": 0.9999683499336243, "association_id": 2, "light": [-0.6331258416175842, -3.422492504119873, 0.5822228193283081, 3.2642765045166016], "segmentation": {"size": [1536, 2048], "counts": "Yh0321O0[_1f0maNYO_\\1l0^cNUO^\\1o0`cNRO_\\1P1`cNPO`\\1T1\\cNlNc\\1P2bbNPN^]1Q2abNoM_]1R2`bNnM`]1R2`bNnM`]1S2_bNmMa]1Y2O100000000000000000000000000000000000000000000000000000000000000000000000000000G`bNQNa]1o1_bNQNa]1o1_bNQNa]1o1_bNQNa]1o1_bNQNa]1n1`bNRN`]1n1`bNRN`]1n1`bNRN`]1n1`bNRN`]1n1_bNSNa]1m1_bNSNa]1V20000000O1H^bNRNb]1n1^bNRNb]1n1^bNRNb]1n1^bNRNb]1n1^bNRNb]1V20G^bNTNb]1l1^bNTNb]1l1^bNSNc]1l1^bNTNb]1l1]bNUNc]1k1]bNUNc]1j1^bNVNb]1j1^bNVNb]1j1^bNVNb]1j1]bNWNc]1i1]bNVNd]1i1]bNWNc]1i1]bNWNc]1i1]bNWNc]1i1]bNWNc]1h1^bNXNc]1g1\\bNZNd]1f1\\bNZNd]1g1[bNYNe]1g1[bNYNf]1f1ZbNZNg]1e1YbN[Ng]1e1YbN[Ng]1e1YbN[Nh]1d1XbN\\Nh]1c1YbN]Nh]1b1WbN_Ni]1a1WbN^Nj]1b1VbN^Nk]1a1UbN_Nk]1a1UbN_Nl]1_1UbNaNk]1_1UbNaNk]1_1UbNaNl]1^1TbNbNl]1^1TbNbNm]1]1SbNcNm]1]1SbNbNn]1^1RbNbNo]1]1QbNcNo]1^1PbNbNP^1^1QbNaNo]1`1PbN`NQ^1_1oaNaNQ^1g10IoaN_NR^1`1naN`NR^1`1naN_NS^1a1maN_NS^1b1maN]NT^1b1laN^NT^1b1laN^NU^1f1001KjaN^NV^1b1jaN^NV^1b1jaN^NW^1e11LhaN^NX^1b1haN]N[^1a1eaN_N]^1_1caNaN^^1^1201O1O001O0011N0001O001O001O1O001O1N2HVaNXOm^1d0TaN\\Om^1?WaNAl^17YaNIi^13YaNMj^1LZaN4Y_100000O101O0001N10000000001N2NTfhg2"}}, {"image_id": 152, "category_id": 1, "bbox": [898.0, 734.0, 146.0, 325.0], "score": 0.9999998211860657, "association_id": 4, "light": [-1.9046989679336548, -1.7631895542144775, 1.8454663753509521, 1.6553306579589844], "segmentation": {"size": [1536, 2048], "counts": "WiSZ1;b_17J4L5J8IlT1_OUkNa0lT1^OSkNb0oT1[OSkNe0oT1XORkNg0RU1TOPkNk0TU1QOljNP1VU1nNjjNQ1XU1nNhjNR1YU1mNfjNS1SZ110O0010O01O1O001N2O1O1N1O2O1O100O100O100O100O2O001N102N1N2O000O2O1O001N2O001N100000001O0O3N2McPQ_1"}}, {"image_id": 152, "category_id": 1, "bbox": [530.0, 714.0, 114.0, 81.0], "score": 0.9999345541000366, "association_id": 3, "light": [-2.2412805557250977, -1.8668357133865356, 2.1961958408355713, 1.8025784492492676], "segmentation": {"size": [1536, 2048], "counts": "\\gkh0n0P_15L10000000000000000000001O0O1O1N2O100O2N1O2N1N2gaN_NR^1b1naN_No]1c1QbN]No]1c1PbN_Nn]1b1RbN^Nm]1c1SbN^Nk]1b1VbN^Ni]1c1VbN^Ni]1c1WbN]Ng]1d1ZbN]Nc]1d1]bN]Nc]1c1]bN]Nb]1d1]bN]Nb]1d1\\bN^Nd]1b1\\bN^Nd]1b1\\bN_Nc]1a1^bN^Na]1c1_bN]Na]1c1_bN]Na]1d1^bN\\Nb]1d1_bN[N`]1f1`bNZN`]1f1`bNZN`]1f1abNYN_]1g1abNYN\\]1k1dbNTN\\]1l1dbNTN\\]1l1dbNTN\\]1m1cbNSN]]1m1dbNRN[]1o1ebNQN[]1o1ebNQN[]1o1ebNQN[]1o1ebNQN[]1P2dbNPN\\]1P2dbNPN\\]1P2dbNPN\\]1P2dbNPN\\]1P2dbNPN\\]1P2dbNPN\\]1P2dbNPN\\]1P2dbNPN\\]1P2dbNPN\\]1Q2dbNnM\\]1R2dbNnM\\]1R2dbNnM\\]1R2dbNnM]]1Q2cbNoM]]1Q2cbNoM^]1P2bbNPN^]1P2bbNPN^]1Q2abNoM_]1Q2abNoM_]1Q2bbNnM^]1S2abNmM`]1R2`bNnM`]1R2`bNnMa]1Q2_bNoMa]1Q2_bNoMb]1P2^bNPNb]1P2^bNPNc]1o1]bNQNd]1o1[bNQNe]1n1[bNRNg]1m1YbNSNh]1l1XbNTNi]1j1XbNVNh]1j1XbNVNi]1i1WbNWNj]1h1VbNXNk]1g1UbNYNk]1g1TbNZNm]1e1SbN[Nn]1c1SbN\\NP^1b1PbN^NQ^1a1oaN_NR^1_1naNbNT^1\\1laNdNW^1Y1iaNfNZ^1X1eaNiN\\^1U1eaNkN\\^1S1eaNlN^^1Q1caNoN^^1n0daNQO^^1m0daNRO]^1l0daNSO`^1g0?M3M]D\\1fNZNl<:]D[1gN^Nk<7]D[1gN`Nl<6[D[1iN`Nl<4ZD\\1jNaNl<3YD[1mNbNj<3XDZ1POcNh<3VDY1VOcNd<4SDU1@gN]<4oCU1HgNY<3mCW1LgNV<2lCW10gNT<2kCW12gNS<2jCW14gNQ<4iCU18fNn;7hCS1;gNl;7gCQ1`0gNh;;eCk0h0iN]8FYIi0_Me0P1lNR80ZI_2gN`Mm75YIZ2lNaMj78WIW2PObMg7:WIT2RObMf7>QBBo==QBBP>>PBBQ>>nAAS>?mAAS>`0lA@U>`0jA_OW>b0hA^OX>c0hA\\OY>d0fA\\OZ>e0eA[O[>f0dAZO]>e0cA[O^>d0cA[O_>d0`A]O`>b0`A^Oa>a0_A_Ob>`0^A@c>?]ABb>?]ABc>=]ACc>=]ADc>;]AEd>:\\AGc>9]AGd>9[AHf>6ZAJg>5YAKi>3WANi>2VAOj>0VA0j>0VA1i>0VA0j>2UAMk>6RAJo>;k@EU?j0\\@VOd?m0Z@ROf?P1X@POh?R1V@nNj?S1V@mNj?^1101ET@iNm?W1V@eNk?\\18O10O01O1O1O001O00001O001O000O2N3M2J\\PT8"}}, {"image_id": 154, "category_id": 1, "bbox": [410.0, 114.0, 337.0, 424.0], "score": 0.9999995231628418, "association_id": 2, "light": [-2.3681139945983887, -1.9703972339630127, 2.1546292304992676, 1.7635548114776611], "segmentation": {"size": [566, 849], "counts": "lRS74b?5TB0g=2XB0e=3YBNe=4YBMf=7VBJi=9UBHj=:SBGm=9RBHn=9QBGn=;QBEo=>nABR>c0iA]OW>h0cAYO]>i0aAWO_>k0_AUOa>l0^ATOb>n0[ASOe>o0YAQOg>R1UAnNl>n1000O100O100O10000O1Dl@VNT?V2000RNi@]1W?bNRAV1n>jNSAU1m>jNUAU1k>kNUAU1k>kNUAU1k>kNVAT1j>lNVAT1j>lNVAT1j>lNWAS1i>nNVAS1i>mNXAR1h>nNXAR1h>nNXAS1g>mNZAR1f>nNZAS1e>mN[AT1d>lN\\AT1d>lN\\AU1c>lN\\AT1d>lN\\AT1d>lN\\AT1d>mN[AS1e>mN[AT1d>lN\\AT1d>lN\\AT1d>mN[AS1e>mN[AS1e>mN[AS1e>mN[AT1d>lN\\AT1d>lN\\AT1d>lN\\AT1d>lN[AU1d>lN\\AU1c>kN]AT1d>lN\\AT1d>mN[AR1f>nN[AQ1e>oN[AP1f>POZAP1f>POZAP1f>POZAP1f>POZAo0g>QOYAo0g>QOYAn0h>ROYAl0h>TOXAk0i>UOWAk0i>UOWAj0k>UOUAk0k>UOVAj0j>VOVAj0j>VOVAi0k>WOUAi0k>WOVAh0j>XOVAh0j>XOVAh0j>XOWAg0i>YOWAg0i>YOXAg0g>YOYAg0g>YOZAf0f>ZOZAf0f>ZOZAg0e>YO[Ag0e>YO\\Ag0c>YO]Ah0b>XO^Ah0b>XO_Ah0a>WO_Ai0a>WO_Aj0`>VOaAi0_>VObAk0^>SOcAn0]>QOdAo0\\>nNfAU1W>jNkAV1U>iNkAX1U>fNlAZ1Y?000O002OO01O010O00100O10O010O01O010O1O1O010O0010O02O0O100O10001O2N1N100O10O010O100O010O010O1O1O100lN\\@4e?J]@5c?J`@4a?Ja@5`?Ge@7\\?E^@HKa0h?D]@NK=i?B]@4I9[`0Je_O5Z`0Lf_O4Y`0Nf_O2Y`0Oh_O0W`01i_OOU`03l_OLR`06n_OJZ;HmH`0jKGW;MkH?mKDW;OkH=nKDT;3lH:QLBo:8PI6QLBR9l0iFMR4FSLAf8b2WKmMTL@_8i2\\KhMVL^OZ8n2`KdMVL^OX8P3bKbMVL^OV8S3bK`MYL[OR8Y3dK]MZLZOm7_3gKXM\\LYOe7h3fIeLJ;lNWO\\7Q4cInLMLTOUOU7Y4fInLJF\\OROP7^4hIoLFDBnNo6c4fIPMBBIkNm6g4dIRM_O_O1dNl6R5^IRM[O]Od7j3dHhNU7P6K5L4M3O1N2O1O1O1O1O1O1O1N2M3N2N2O1O1O0010^FcIj7]6mG\\Jc7e5VHoJ]7P5bHUKY7l4fHXKW7h4hH[KU7e4lH]KQ7c4PI^Km6c4SI`Kh6b4WIaKb6d4]I`K`5`5_JcJ[5a5fJ`JV5b5kJ`JQ5b5nJaJo4`5QKbJk4`5TKcJg4`5WKeJY4i5eK[Jg3V6YLmIb3V6\\LmIa3T6_LnI^3T6bLlI]3U6cLkI[3W6dLkIX3X6hLhIT3\\6lLeIP3^6oLcIn2`6RM`Im2a6RMaIk2b6SM`Ik2b6SMaIi2b6TMbIg2b6kLYJe2g:E7I4L3M3M4L6J7H7I6G:H7I9Ghc=2W\\B5M4K4L3N1N2O1O0O2O001O0O101O0000001N100O100O100O1O1O2N2N2N2N3M3M3N2M100000001O000002L5K8E\\Xh1"}}, {"image_id": 154, "category_id": 1, "bbox": [125.0, 348.0, 66.0, 39.0], "score": 0.9973659515380859, "association_id": 3, "light": [-1.9077346324920654, -1.1637778282165527, 1.9257543087005615, 0.9777621626853943], "segmentation": {"size": [566, 849], "counts": "g^U21da02O001O001O001O0O2O001O0ZO0f_O0Y`02f_OOX`03g_OMX`05g_OKY`06f_OJZ`07e_OJY`08f_OHZ`09f_OFZ`0;e_OEZ`0=e_OC[`0>e_OBZ`0?e_OA[`0`0d_O@\\`0a0d_O^O\\`0c0c_O]O]`0d0c_O[O]`0f0b_OZO^`0g0b_OXO^`0h0b_OXO^`0i0b_OVO^`0j0b_OVO^`0j0b_OVO_`0j0a_OUO_`0k0a_OUO_`0Q11J`_OTO``0Q1001K40000010O0001O010O0000002N2N001O0O101O001N1O4K:DlZ[;"}}, {"image_id": 155, "category_id": 1, "bbox": [1347.0, 710.0, 217.0, 153.0], "score": 0.9999996423721313, "association_id": 2, "light": [-1.7202324867248535, -2.0604653358459473, 1.7093052864074707, 1.87179696559906], "segmentation": {"size": [1536, 1883], "counts": "^XUo1?V_1b1gN5K3N1O1O1N2N2O2N1O1O1M3J6G9M3L4M3L4M201O1O100O1O001O1O100O10001O1O1N2O1O1O1O001O00001O0]dNiK][1X4bdNiK][1W4bdNkK][1U4cdNkK^[1T4adNmK_[1S4adNnK^[1Z4000GbdNQL^[1m3bdNTL^[1k3cdNUL][1j3cdNWL][1h3bdN[L][1d3cdN]L][1b3cdN_L][1a3cdN_L^[1Q40000000]ObdNdL_[1n301O00000001O000000000010O0000000O100O10001O0000000O10000000000O100000001O0000000000O10O10001O0O10000O100000000000000000000000000000O100000000000000AidNULW[1Z41AhdNTLX[1l3hdNTLX[1l3hdNTLX[1m3hdNQLY[1o3gdNQLY[1o3gdNQLY[1o3gdNQLY[1o3gdNPL[[1o3fdNPLZ[1Q4edNoK[[1Q4edNoK[[1[41O001O001O0O2O001O1O1O1N101O1O2N1O1O1O3M4L4L2N2N2N1O2N1O2N7H5BQcNcMQ]1Z2obNgMS]1V2nbNjMS]1n1nbNkMO8T]1a1lbNXN;7k\\1]1]cNcNd\\1Z1^cNeNd\\1Y1\\cNhNe\\1T1^cNlNh\\1l0ZcNTOi\\1g0YcNYOQ]19ScNGc^1000000000000000000000000O2O00000O10001N2Lcem>"}}, {"image_id": 155, "category_id": 1, "bbox": [1508.0, 701.0, 255.0, 130.0], "score": 0.9999968409538269, "association_id": 1, "light": [-2.030099391937256, -1.8929362297058105, 2.0543551445007324, 1.702538251876831], "segmentation": {"size": [1536, 1883], "counts": "effV2;__1;H8J5L3M1O1O001O00001N1O2N1O6J2N1O100O2O001O001O001N2O1O2N2N001N2O1O2N3M3M001N101O0000001O001ZcNdMe[1^2YdNdMf[1]2YdNcMg[1^2XdNcMg[1]2YdNcMf[1_2YdNaMg[1_2YdNaMg[1`2XdN`Mh[1`2XdN`Mh[1a2WdN_Mi[1b2VdN_Mi[1a2WdN_Mi[1b2VdN^Mj[1c2UdN]Mk[1d2TdN\\Ml[1e2TdNZMl[1g2SdNYMm[1i2QdNXMn[1i2QdNWMo[1k2ocNUMQ\\1n2mcNQMS\\1^301O0O1001O01O00000000001O00000000001O0000000000IocN_LR\\1`3ncNaLQ\\1_3ocNaLQ\\1_3ocNaLQ\\1_3ocNaLQ\\1g3000GocNdLP\\1\\3PdNdLP\\1\\3PdNdLP\\1\\3PdNdLP\\1\\3PdNdLP\\1f30EPdNfLP\\1Z3PdNfLP\\1Z3PdNfLP\\1Z3PdNfLP\\1Z3PdNfLP\\1Z3PdNfLP\\1Z3PdNfLP\\1Z3PdNfLQ\\1Y3ocNgLQ\\1Y3ocNgLQ\\1X3PdNiLn[1X3RdNhLn[1X3RdNhLn[1X3QdNiLn[1X3RdNhLn[1X3RdNhLn[1X3RdNhLn[1X3RdNhLn[1X3RdNhLn[1X3RdNhLn[1X3RdNhLn[1W3SdNiLm[1W3SdNiLm[1W3SdNiLm[1W3RdNjLn[1V3RdNjLn[1V3RdNjLn[1U3SdNkLm[1U3SdNkLm[1U3SdNkLm[1U3RdNlLn[1S3SdNmLm[1S3RdNnLn[1R3RdNnLo[1Q3QdNoLo[1a3000_OQdNQMo[1o2QdNQMo[1o2QdNQMo[1`3001O0^OPdNTMP\\1l2PdNTMP\\1l2PdNTMQ\\1k2ocNUMQ\\1k2ocNUMR\\1j2ncNVMR\\1j2ncNVMR\\1j2ncNVMS\\1i2mcNWMS\\1i2mcNWMT\\1h2lcNXMT\\1h2lcNXMU\\1g2kcNYMV\\1f2jcNYMW\\1g2icNYMX\\1f2hcNZMY\\1e2gcN[MZ\\1d2fcN\\MZ\\1d2fcN\\M[\\1c2ecN]M[\\1c2ecN]M\\\\1b2ecN]M[\\1c2ecN]M[\\1d2dcN\\M]\\1c2ccN]M]\\1c2ccN]M^\\1b2bcN^M^\\1b2ccN]M]\\1c2ccN]M]\\1c2ccN]M]\\1c2ccN]M]\\1d2bcN\\M^\\1d2ccNZM_\\1e2acN[M_\\1e2acN[M_\\1e2acN[M_\\1e2bcNZM^\\1f2bcNZM_\\1f2`cNZM`\\1f2acNYM`\\1f2`cNZM`\\1g2_cNYMb\\1f2^cNZMb\\1g2^cNXMb\\1h2^cNXMb\\1i2]cNWMd\\1h2\\cNXMd\\1h2]cNWMc\\1j2\\cNVMd\\1j2\\cNVMe\\1i2[cNWMe\\1i2\\cNVMe\\1i2[cNWMe\\1j2ZcNVMf\\1j2ZcNVMg\\1i2ZcNVMf\\1j2ZcNVMg\\1j2XcNVMi\\1i2WcNWMj\\1h2VcNWMl\\1n2001O1O2N1O3GlbN`MV]1^2jbNbMW]1c21O001O002N2N3M1O1N1H]bNSNd]1l1\\bNTNe]1k1[bNUNf]1i1ZbNXNh]1d1ZbN\\Ni]1^1ZbNbNi]1Z1XbNfNj]1V1XbNjNi]1U1WbNkNj]1S1VbNnNk]1P1VbNPOk]1l0XbNTOl]1d0XbN\\OV_10000000000000000000000O101O1O0N^Vc5"}}, {"image_id": 155, "category_id": 1, "bbox": [907.0, 758.0, 163.0, 327.0], "score": 0.9999999403953552, "association_id": 4, "light": [-2.181001901626587, -1.8758783340454102, 2.00559663772583, 1.7465589046478271], "segmentation": {"size": [1536, 1883], "counts": "T^aZ1W1_^1`0D:FA;VnNdG^k0a8\\TOdG`k0`8]TObGak0a8\\TOaGbk0b8\\TO^Gdk0f8WTO[Ghk0k8STOVGkk0n8RTORGnk0Q9nSOPGQl0S9mSOmFRl0U9mSOkFRl0X9lSOhFRl0]9kSOdFRl0d9hSO\\FTl0n9eSOSFXl0V:bSOjE[l0]:aSOcE]l0a:aSO_E]l0f:`SOZE]l0m:_SOSE\\l0W;_SOiD^l0a;[SO_Dbl0i;YSOWDel0PUROmAkm0U>SROkAmm0X>PROhAPn0\\>lQOeASn0]>lQObASn0b>jQO^AVn0c>iQO]AWn0e>gQO[AYn0g>eQOYA[n0j>bQOVA^n0l>`QOTA`n0n>^QORAbn0P?\\QOQAcn0P?\\QOPAdn0Q?[QOo@en0Q?[QOo@en0Q?[QOo@en0Q?[QOo@en0R?YQOPAfn0P?ZQOPAfn0P?ZQOPAfn0T?UQOn@jn0S?UQOm@ln0R?TQOn@ln0S?RQOn@nn0R?RQOn@nn0S?PQOo@on0V?kPOk@Vo0o?001O1O2N102M3M2N2N2O2M4L6J6J4M2M2QLdoNVH]P1d7PPOTHRP1b7bPOZFiN=fP1S9UQOiE\\NU1`P1n8QROSGPn0j8RROVGom0g8QRO[GPn0b8QRO`Gnm0^8PROfGQn0V8iQOSHWn0e7PRO\\HQn0\\7UROeHkm0U7ZROlHgm0o6]ROQIdm0k6_ROUIcm0e6aRO[Iam0]6eROcI]m0R6lROnIUm0i5TSOVJnl0e5USO\\Jkl0a5WSO_Jil0_5YSOaJhl0\\5ZSOdJfl0Z5\\SOfJel0W5]SOiJcl0S5aSOlJ`l0P5dSOPK]l0l4fSOTKZl0j4iSOUKXl0i4iSOWKWl0f4lSOZKUl0b4nSO^KSl0U4YTOkKhk0a3lTO^LVk0e1eVO[N\\i0\\1mVOcNUi0V1PWOjNQi0S1QWOmNQi0o0QWOQOPi0m0QWOSOPi0k0RWOTOnh0k0SWOUOnh0j0RWOVOoh0h0RWOXOoh0f0RWOZOoh0d0RWO\\Ooh0b0SWO]Onh0a0SWO^Ooh0`0RWO@oh0>SWOAoh0=QWOCQi09QWOGSi03oVOMWi0JlVO6ci0kNnVOT1oS10000000001O00001O0O101O00001O0O2O1O000O101O00001O00001O000O2O000O101O0O10001O001O1O001O001O000O2O001O001O0O1000TOiNobNW1n\\1POnbNo0R]1VOjbNj0U]1YOjbNf0U]1]OibNc0W]1^OhbNb0W]1@hbN?Y]1AgbN?Y]1BebN?[]1BdbN>\\]1CbbN>^]1Q1100O10001N101O000O2O000O2O001N2O1N3M2N2O1N10001N2N4K3N2N2N1O2O1N3M3L4K7I4M2O2JiXm_1"}}, {"image_id": 155, "category_id": 1, "bbox": [1075.0, 697.0, 242.0, 190.0], "score": 0.9998059272766113, "association_id": 5, "light": [-1.1549427509307861, -1.6003389358520508, 1.1383495330810547, 1.510650634765625], "segmentation": {"size": [1536, 1883], "counts": "UY]b11l_1301N10001O001N101O000UbNJl[16TdNJl[16TdNJk[17UdNIk[17TdNJl[16TdNJl[16TdNKj[16VdNJj[16VdNJj[16UdNKk[15UdNKk[15UdNKk[14VdNMi[13WdNMi[13WdNMi[12XdNNh[12XdNOg[10YdN1g[1OYdN1f[10ZdN0f[10ZdN1e[1OZdN3e[1M[dN4d[1L\\dN4d[1L\\dN8_[1IadN8^[1HbdN8^[1HadN:^[1FbdN:^[1EcdN;][1EcdN;][1EcdN;][1EcdN;][1EcdN<][1@fdN`0Z[1_OgdNa0Y[1^OhdNb0X[1^OgdNd0X[1\\OhdNd0W[1]OidNc0W[1]OidNc0W[1]OhdNd0gX1YOjgN4_Oc0eX14SgNYO8c0cX1>mfNPO?b0cX1e0hfNiNe0b0bX1k0dfNcNi0c0cX1o0_fN^Nn0c0bX1Q1_fN\\No0c0bX1R1^fN[NP1c0bX1R1^fN[No0d0cX1R1]fN[No0c0cX1S1^fNZNo0c0cX1S1^fNZNn0d0cX1S1_fNYNn0d0cX1S1_fNZNl0d0dX1S1`fNYNk0e0dX1S1afNYNe0HdNl0VZ1T1`fNYNd0i0kX1o0afNXNc0j0lX1m0bfNZN`0j0mX1m0cfNYN?k0nX1k0dfN[N1N1N2O2N2O00100O1RNYEmMh:P2bEiM^:V2hEdMY:[2mE_MU:_2nE^MS:b2nE\\MS:c2PFZMk9PO\\Ef3k0VMk9TOZEe3m0UMi9WO[Ec3n0PMj9^OXEb3o0kLl9DVE`3Q1eLk9MTE^3S1]Ln96oD]3ZX9ChF=W9DjF;U9EmF:Q9HoF8o8ISG6l8IWGXM]O^2Z9:]GPME`2m8`0TH_Ol7?WH@i7?[H^Oe7`0^H_Ob7`0_H@a7?aH@_7?cH@^7?dH_O]7`0dH_O^7?bHAb7;_HDe78]HFg76YHJl71UHNo7NQH3Q8JPH5T8GmG8X8CiGE^C4^N5i<2PDNf06R;_1lDaNm:g1REYNm:i1REWNl:k1UETNk:l1UETNj:l1WETNi:l1XESNh:l1YEUNe:l1[ETNe:l1\\ESNd:l1]ETNb:m1^ESNb:l1`ESN`:l1aETN_:k1bEVN]:i1eEVNZ:i1hEXNW:f1lEYNT:e1nE[NR:b1QF_No9\\1VFcNj9W1\\FiNd9i0jFXOU9f0nFYOR9e0PG[OQ9c0PG^Oo8b0RG]On8b0SG_Ol8a0TG_Ol8`0VG@i8?XGAh8>YGBg8=ZGDe8<[GEd8<[GDe8<\\GCh4K_Kb0IDd42^K:NDb46^K61C`49^K51Ba4:]K42Ca49\\K43Ca4:[K35Ba4TK0:Ad4?QK0<@c4a0PKO=^Og4b0kJ0>^Oi4a0hJ1`0\\Ol4b0bJ3b0XOQ5e0ZJ3f0WOR5e0WJ4h0TOT5i0RJ3a9M^F4b9K^F5d9JZF8f9HXF;>QOU6e0ZI<2E]60]Ia0B0Q7AYIc0_O1X7]OUIf0^O1\\7[OSIT1POCm7]OmHU1fNK]8XOZG\\O:i1BKj8]500000000O10O10O0100O000O0O1N3K5L5M2O2N2M3G9kNU1N2O002N1N2M3M3M3N2N3N2M4L5J:C:H7J4M4K5F:mNS1E:K5L4M2N2N2L4M3N2O1O0O2O0N200O100000000O1O2O0010O00100N101N2O010OO2N2O001O1O100O001O1N2N1O2O0000N20O1N2010O1O100O1O001N200000000O100001N4L6Ijaa0"}}, {"image_id": 156, "category_id": 1, "bbox": [286.0, 150.0, 90.0, 231.0], "score": 0.9957440495491028, "association_id": 3, "light": [-2.545126438140869, -1.9506754875183105, 2.386688709259033, 1.7967815399169922], "segmentation": {"size": [533, 665], "counts": "XWe41c`02O2M5L1O1O00001O0000000000000001OO10000000000^IIfL7W3NgL2W32gLNX38cLH\\3`0]L@b3d0[L\\Oe3g0aJSOaM6n7S1oIUOkMHV8_1`GYNk0k0YO\\O]8g1kFbNa0_OHS1=SO`8P3mFoN>PNf8j5Q14Lj0VO1O1O00000000000002N2N2N3Me0]MfEaM[:^2kE\\MV:b2RFWMn9i2VFSMj9n2YFnLh9Q3[FlLe9T3_FhLa9Z3eF]L]9d3jFSLW9m3lFnKW9Q4h1OoDnK]9U4`FlK`9T4_FmK`9U4^FkKc9T4]FlKd9T4[FlKg9T4WFlKk9U4RFkKP:U4nEkKS:n2oDQNl0QOV:g2YEVN>SO\\:a2^EZN3UOa:\\2dEZNKZOc:W2hE]ND\\Oe:R2lEbN^O\\Ok:j1lEiNXO]OS;^1mETOnN^OX;f0_D\\O^1a0iN]O_;`0\\F4TN\\Od;;ZF9QN\\Ok;2WFd0lMZOh>g0VAYOj>j0SAVOn>i0RAWOo>h0QAXOR?d0o@\\OU`001NSRf4"}}, {"image_id": 157, "category_id": 1, "bbox": [2031.0, 756.0, 264.0, 111.0], "score": 0.9999402761459351, "association_id": 1, "light": [-0.5085515975952148, -3.3686821460723877, 0.458385169506073, 3.2801592350006104], "segmentation": {"size": [1728, 2304], "counts": "gTT[35mc1Nm]N4na12\\\\NH_16Rb1=k]NDQb1e0i]N[OVb1i0f]NXOYb1l0d]NTO[b1o0c]NQO\\b1Q1c]NoN]b1R1a]NoNZb1W1e]NiN[b1X1d]NhN[b1[1c]NfN[b1]1c]NcN\\b1`1b]N`N^b1a1a]N_N^b1c1a]N]N^b1e1a]N[N_b1e1a]N[N^b1f1b]NZN^b1g1a]NYN^b1h1b]NXN^b1i1a]NWN^b1k1a]NUN_b1m1_]NSN`b1o1_]NQNab1P2^]NPNab1Q2`]NnM`b1S2_]NmMab1S2_]NmMab1T2^]NlMab1V2^]NjMbb1W2]]NjMab1Y2]]NgMcb1[2\\]NdMcb1^2\\]NbMdb1_2[]NaMeb1_2[]NaMeb1`2Z]N`Mfb1`2Z]N`Meb1a2\\]N^Mdb1c2[]N]Meb1c2[]N]Meb1d2Z]N\\Mfb1d2Z]N\\Mfb1e2Y]N[Mgb1e2Y]N[Mgb1e2Z]NZMeb1g2[]NYMeb1g2[]NYMeb1g2[]NYMdb1h2\\]NXMdb1g2]]NYMcb1g2\\]NZMcb1g2]]NYMcb1g2]]NYMcb1f2^]NZMbb1f2^]NZMbb1f2]]N\\Mab1e2_]N[Mab1e2_]N[Mab1d2`]N\\M`b1d2`]N\\M`b1d2`]N[Mab1e2^]N\\Mbb1d2^]N\\Mbb1c2_]N]Mab1c2_]N]Mab1c2_]N]Mab1b2`]N^M`b1a2a]N_M_b1a2`]NaM_b1^2b]NbM^b1^2b]NbM^b1]2c]NcM]b1]2c]NcM]b1]2c]NcM]b1]2c]NcM]b1]2c]NcM]b1\\2d]NdM\\b1\\2d]NdM\\b1\\2d]NdM\\b1\\2d]NdM\\b1\\2d]NdM\\b1[2e]NeM[b1[2e]NeM[b1[2e]NeM[b1[2d]NfM\\b1Z2d]NfM\\b1Z2d]NfM\\b1[2c]NeM]b1[2c]NeM]b1[2c]NeM]b1[2c]NeM]b1[2c]NeM]b1[2c]NfM\\b1Z2e]NeM[b1[2e]NeM[b1\\2d]NdM\\b1\\2d]NdM\\b1\\2d]NdM\\b1\\2d]NdM\\b1\\2d]NdM\\b1\\2d]NdM\\b1\\2d]NdM\\b1\\2d]NdM\\b1\\2c]NeM]b1[2c]NeM]b1[2d]NdM\\b1\\2d]NdM\\b1]2c]NcM]b1]2c]NcM]b1]2c]NcM]b1]2c]NcM]b1]2c]NcM]b1]2c]NcM]b1]2c]NcM^b1]2b]NbM^b1^2b]NbM^b1^2b]NbM^b1_2a]NaM_b1`2`]N`M`b1`2a]N_M_b1a2a]N_M`b1a2_]N_Mab1a2`]N^M`b1b2`]N_M_b1b2`]N^M`b1c2_]N]Mab1d2_]NZMbb1f2^]NZMbb1g2]]NYMcb1h2]]NWMcb1i2^]NVMbb1j2_]NUMbb1k2]]NUMcb1k2^]NTMbb1m2]]NSMcb1m2]]NSMcb1n2]]NQMcb1o2]]NQMcb1P3]]NoLcb1Q3]]NoLdb1Q3[]NoLeb1Q3\\]NoLcb1Q3]]NoLcb1Q3]]NoLcb1Q3]]NoLcb1R3\\]NnLdb1R3\\]NnLdb1R3\\]NnLdb1R3\\]NnLdb1R3\\]NnLcb1S3]]NmLcb1S3]]NmLcb1S3]]NmLcb1S3]]NmLcb1S3]]NmLcb1S3]]NmLcb1R3^]NnLbb1R3^]NnLbb1R3^]NnLbb1R3]]NoLcb1Q3]]NoLcb1P3^]NPMbb1P3^]NPMbb1P3^]NPMbb1o2_]NQMab1o2_]NQMab1o2^]NRMbb1m2_]NSMab1m2_]NSMab1m2^]NTMbb1l2^]NTMbb1k2_]NUMab1k2_]NUMab1k2^]NVMbb1j2^]NVMbb1i2_]NWMab1i2_]NWMab1i2_]NWMab1i2^]NXMbb1h2^]NXMcb1g2]]NYMcb1f2^]NZMbb1f2^]NZMbb1f2^]NZMbb1f2^]NZMbb1f2^]NZMbb1f2^]NZMcb1e2]]N[Mcb1d2^]N\\Mbb1d2^]N\\Mbb1d2^]N\\Mbb1d2^]N\\Mbb1e2]]N[Mdb1d2\\]N\\Mdb1d2\\]N\\Mdb1d2]]N[Mcb1e2]]N[Mdb1d2\\]N\\Mdb1d2\\]N\\Mdb1d2\\]N\\Mcb1e2]]N[Mcb1e2]]N[Mcb1e2]]N[Mcb1e2]]N[Mcb1e2]]N[Mcb1e2]]N[Mbb1f2^]NZMbb1f2^]NZMbb1g2]]NYMcb1g2]]NYMdb1f2]]NYMcb1h2\\]NXMdb1h2\\]NXMeb1g2[]NYMeb1h2Z]NXMfb1h2[]NWMeb1i2[]NWMeb1i2[]NWMfb1i2Y]NWMgb1i2Z]NVMfb1j2Z]NVMfb1k2Y]NUMgb1l2X]NTMhb1l2X]NTMhb1m2X]NRMhb1n2X]NRMhb1S30000000LX]NPMib1o2W]NQMib1o2W]NQMjb1n2V]NRMjb1n2V]NRMjb1n2V]NRMkb1m2U]NSMkb1m2U]NSMkb1m2V]NRMjb1n2V]NRMjb1n2V]NRMjb1n2V]NRMkb1m2U]NRMlb1n2T]NRMlb1n2T]NRMlb1n2T]NRMmb1m2S]NSMnb1l2R]NTMob1k24O1N4M4L1O1N2O1O2M3M3M:ES]>"}}, {"image_id": 157, "category_id": 1, "bbox": [539.0, 1054.0, 524.0, 463.0], "score": 1.0, "association_id": 3, "light": [-1.075624704360962, -2.8214423656463623, 0.950005054473877, 2.5341622829437256], "segmentation": {"size": [1728, 2304], "counts": "^h^l0_1_d17J4L5J5L4K5K6I6U`N[MR\\1i2kcNYMS\\1j2kcNXMR\\1k2lcNVMR\\1m2lcNTMS\\1n2lcNSMQ\\1P3mcNQMR\\1P3QdNlLo[1V3UdNdLk[1]3[32N2N2O1N2N2O1N2O1N2N1N3N2M2N3N1N3N1O2O0O2N2M4M2M6I:G=C?A9G6K4K5L3M4K4L4M2M4K4M3M4M2N2N101N2N1O2O2M2N2N2M3N2dcN`GU[1b8ddNeGZ[1\\8idN`GW[1`8QeNXGoZ1h8U1O010O0010O01O12M2O1N2O0O1O100O2N1N2OCYcNcGf\\1^8ZcNbGe\\1m80A[cNcGd\\1^8\\cNcGb\\1^8^cNbGb\\1^8^cNbGa\\1o800O10001N_ObcNbG^\\1^8bcNbG]\\1_8ccNaG\\\\1`8dcNaGZ\\1`8fcN`GX\\1b8hcN^GV\\1W9[fN[FlV1h9ohN^FmV1e9QiN^FlV1d9SiN^FjV1e9UiN\\FhV1f9XiNZFgV1g9XiN[FeV1g9[iNYFdV1h9\\iNWFdV1j9\\iNVFbV1X9WgNjFX2L`V1\\9XgNiFW2K_V1^9ZgNgFW2J^V1a9[gNeFW2I\\V1e9]gNbFW2I[V1f9^gNbFV2G[V1i9_gN`FV2F[V1j9`gN`Fe0]Og08TW1l9`gN_Fd0@f04VW1n9`gN^Fc0De0NYW1P:_gN_Fb0Ed0K[W1Q:`gN_F`0Gd0H]W1R:_gN_F?Id0E^W1S:`gN_F>I\\Y1h9VfN`FoMgW1X:kgNlG;lMiW1X:mgNnG8jMjW1Y:ngNoG5iMlW1Y:ogNoGKgM11UX1X:PhNQHGiM3NUX1Y:QhNYHH_MWX1X:RhNYHE`MXX1W:ThN`HlW1`7ThNaHkW1_7UhNaHkW1_7UhNbHjW1^7VhNbHkW1]7UhNdHjW1\\7VhNdHjW1\\7VhNdHjW1\\7VhNeHiW1[7WhNeHiW1[7WhNeHiW1[7WhNfHhW1Z7XhNfHhW1Z7XhNfHhW1Z7XhNfHhW1Z7XhNgHgW1Y7YhNgHgW1X7ZhNhHfW1X7ZhNiHeW1W7[hNiHeW1W7[hNjHdW1U7]hNkHcW1U7]hNlHbW1T7^hNlHbW1T7]hNnHcW1P7^hNPIcW1o6]hNRIcW1l6^hNTIbW1l6^hNUIcW1h6^hNXIcW1f6^hNZIcW1d6^hN\\IcW1b6^hN_IaW1`6`hN`IaW1^6`hNbI`W1]6ahNcI`W1\\6`hNeI`W1Y6ahNgI_W1Y6ahNhI_W1W6ahNiI`W1U6ahNlI_W1S6ahNmI`W1R6`hNnIaW1Q6_hNPJaW1n5`hNRJbW1l5^hNTJcW1k5]hNUJeW1i5[hNWJfW1h5ZhNYJgW1e5YhN[JiW1c5WhN]JkW1a5ThN`JPX1QMjgNV76iK]Y1n3dfNRL^Y1l3bfNTL`Y1j3`fNVLaY1i3_fNWLbY1h3^fNXLcY1g3]fNYLcY1g3]fNYLdY1f3\\fNZLeY1e3[fN\\LeY1c3[fN]LfY1a3[fN_LgY1_3YfNaLhY1^3WfNcLkY1[3VfNdLkY1[3UfNeLkY1Z3VfNfLkY1Y3UfNgLlY1X3TfNhLlY1X3TfNhLlY1X3TfNiLkY1W3UfNiLkY1V3VfNjLjY1V3VfNjLjY1V3VfNjLkY1U3UfNkLkY1U3UfNkLkY1U3UfNkLkY1U3UfNkLkY1U3UfNkLkY1U3UfNkLkY1U3UfNkLkY1T3VfNlLjY1T3VfNmLiY1S3WfNmLiY1S3WfNmLiY1R3XfNnLhY1R3XfNnLhY1R3XfNnLhY1Q3YfNoLgY1Q3YfNoLgY1P3ZfNPMfY1Q3YfNoLgY1Q3YfNoLhY1P3XfNPMhY1Q3WfNoLiY1Q3WfNoLiY1R3VfNnLjY1R3WfNmLiY1T3VfNlLjY1T3VfNlLkY1S3VfNlLjY1U3UfNkLkY1U3VfNjLkY1V3TfNjLmY1U3TfNkLlY1V3RfNjLoY1W3PfNhLQZ1\\3keNcLVZ1`3feN`L\\Z1d3_eN[LbZ1m3UeNSLkZ1T2[eN_OfZ18geNCZZ1:jeNDWZ19meNESZ19QfNEPZ18TfNFnY14XfNXMaNb0X[1Q2]fNYM_Nd0V[1l1bfNYMbNf0nZ1j1gfN_M^Nc0mZ1i1jfNdMYNa0nZ1h1lfNhMUN?P[1g1nfNjMQN>R[1f1ofNmMnMe[1b1ZiNjMPKf0g[1\\1_iNgMmJn0e[1X1TjNkNkU1S1VjNnNkU1o0VjNROkU1l0UjNUOkU1h0XjNXOiU1d0YjN]OhU1>VjNHkU13UjN1mU1JRjN:PV1_OUjNa0PV1jN_jNW1U]10O2O00000O100000000000000001O0000000000000010O000001O000000001O00000000001O0000000000001O000000001O00001O0000001O0000000O101O00001O00000000000O2O000000000000001O0000001N100000001O00000000001O000O101O000000001O0000000O101O000000000000001O000O100000001O000000001O0000001O00001O00000000001O0000001O00000O2O0000001O0O10001O00001N101O001O0O2O1N2N2N6E]ZNNmdbi0"}}, {"image_id": 157, "category_id": 1, "bbox": [0.0, 1230.0, 318.0, 169.0], "score": 1.0, "association_id": 2, "light": [-2.1947858333587646, -1.7275543212890625, 1.998911738395691, 1.5341136455535889], "segmentation": {"size": [1728, 2304], "counts": "UY1f0Pe1?G7I5M3M3L3X\\NTO[b1n0_]NYO]b1j0`]NYO^b1i0a]NXO\\b1j0c]NWO[b1l0d]NTO[b1m0d]NUOZb1l0f]NTOZb1l0f]NTOXb1n0h]NROXb1[2O10bNi]NSOVb1n0j]NROVb1m0k]NSOUb1m0j]NTOUb1m0k]NSOUb1l0l]NTOTb1l0l]NTOTb1l0l]NTOSb1l0m]NUOSb1k0m]NUORb1l0m]NUOSb1k0m]NUOSb1k0m]NUOSb1\\2O_Nn]NVORb1j0n]NVORb1j0n]NVORb1j0n]NVOQb1j0o]NWOQb1i0o]NWOQb1i0o]NWOQb1h0P^NXOPb1h0P^NXOoa1i0Q^NWOoa1h0Q^NYOoa1g0Q^NYOoa1g0Q^NYOoa1h0P^NXOPb1h0P^NXOPb1\\2O1000000000000000000001O000ZNP^N\\OPb1d0P^N[OQb1e0o]N[OQb1Z20000000ZNo]N]OQb1Y20000O100O100OYNR^N^Ona1b0R^N^Oma1b0T^N^Ola1b0S^N_Oma1`0T^N@ka1`0V^N@ja1`0V^N@ia1a0V^N@ja1`0V^NAha1?X^NBga1?Y^NAga1?X^NBga1>Z^NBfa1>Y^NCga1=Y^NCfa1=[^NCea1=Z^NDea1=[^NCda1=]^NCba1>^^NBaa1>_^NC`a1>`^NB_a1>b^NB]a1?c^NA]a1?b^NB]a1>d^NA\\a1`0d^N@\\a1?e^NBYa1?f^NBZa1=g^NCXa1=i^NCVa1=j^NDVa1l_1@V`N`0j_1_OV`Nb0j_1]OW`Nc0i_1\\OY`Nc0g_1]OY`Nc0g_1]OY`Nc0g_1]OY`Nc0g_1]OY`Nb0g_1^OZ`Nb0f_1^OZ`Nb0f_1^OZ`Nb0f_1^OZ`Nb0f_1^OZ`Nb0f_1^O[`Na0e_1_O[`Na0e_1_O[`Na0e_1@Y`Na0g_1_OY`Na0g_1@X`N?i_1AW`N?i_1BV`N>j_1CU`N=k_1CU`N=k_1DT`NlZOCRe0?mZOAQe0a0oZO_OPe0d0nZO\\OSd08[[Oa0a0WOPd0i1o[OWNnc0l1R\\OVNjc0m1U\\OSNjc0n1V\\ORNic0P2V\\OPNjc0P2V\\OPNic0R2V\\OnMjc0S2U\\OmMjc0U2U\\OkMkc0V2T\\OjMlc0V2T\\OjMkc0X2T\\OhMlc0X2T\\OhMlc0Y2S\\OgMlc0[2S\\OeMmc0\\2R\\OdMnc0^2P\\ObMoc0a2o[O_MQd0b2n[O^MRd0c2m[O]MRd0e2m[O[MSd0f2l[OZMTd0f2m[OYMSd0h2l[OXMSd0i2m[OWMSd0j2l[OVMTd0j2l[OVMTd0j2l[OVMSd0k2m[OUMSd0k2m[OUMSd0k2m[OUMSd0k2m[OUMRd0l2n[OTMRd0l2n[OTMRd0l2n[OTMRd0l2n[OTMQd0m2o[OSMRd0l2n[OTMRd0l2n[OTMSd0k2m[OUMSd0k2m[OUMSd0k2n[OTMSd0k2m[OUMSd0k2b[ORM83Wd0j2a[OSM83Wd0j2a[OTM72Xd0i2b[OUM62Yd0g2a[OXM61Zd0d2b[O[M41Zd0`2f[O_M01[d0]2f[OcM0N[d0^2f[OeMNM\\d0]2g[OfMMM]d0\\2e[OhMNL]d0\\2d[OiMOK]d0[2e[OjMOJ\\d0\\2d[OkMgd0U2Y[OkMgd0U2X[OlMhd0S2Y[OmMgd0S2Y[OmMgd0S2Y[OnMfd0R2Z[OnMfd0S2Y[OmMgd0S2X[OnMhd0R2X[OnMhd0R2X[OnMgd0S2Y[OmMgd0S2Y[OmMgd0T2X[OlMgd0U2Y[OkMgd0U2Y[OkMfd0W2Y[OiMfd0X2Z[OhMfd0X2Z[OhMed0Z2Z[OfMfd0[2Y[OeMgd0[2Y[OeMfd0]2Y[OcMgd0]2Y[OcMgd0^2X[ObMhd0^2X[ObMgd0_2Y[OaMgd0`2X[O`Mhd0`2X[O`Mgd0a2Y[O_Mgd0a2Y[O_Mfd0b2Z[O^Mcd0e2][O[M`d0h2`[OXM^d0j2b[OVM\\d0l2d[OTM[d0m2e[OSMZd0m2g[OSMWd0o2i[OQMUd0Q3k[OoLRd0S3o[OmLmc0W3S\\OiLjc0Y3W\\OgL_b0J`^Oa3QOeL[b00`^O\\3VOdLYb02_^O[3XOcLYb03\\^O[3\\ObLWb06Y^OY3AaLUb09V^OX3E_LSb0=P^OY3NZLQb0h4P^OXKPb0f4R^OZKma0g4S^OXKna0g4S^OYKma0f4T^OZKma0e4S^O[Kma0d4T^O\\Kma0b4T^O^Kma0`4T^O`Kma0^4T^ObKla0]4U^OcKla0\\4T^OdKma0[4S^OeKna0Z4R^OfKVb0S4i]OmK_b0k3a]OUL`b0k3_]OULbb0j3^]OVLcb0i3]]OWLdb0i3[]OWLfb0h3Z]OXLhb0g3W]OYLjb0g3U]OYLnb0e3Q]O[LQc0d3n\\O\\LTc0c3l\\O\\LUc0e3i\\O[LYc0c3g\\O]LZc0c3e\\O]L\\c0c3c\\O]L^c0c3a\\O]Lac0b3^\\O^Ldc0b3Z\\O^Lhc0a3W\\O_Ljc0a3U\\O_Llc0`3U\\O_Llc0a3S\\O^Loc0i32GS\\O[Loc0d38N1gMe[Ol0[d0QOi[Om0Xd0QOk[Om0Vd0ROk[On0Td0QOn[On0Td0nNo[OQ1Sd0jNQ\\OU1Qd0fNS\\OY1oc0cNU\\O[1mc0aNV\\O^1lc0_NV\\O`1lc0\\NV\\Od1Se001O00000000001O00000000000000000000001O01O000001N2O1O001O001O001O001N2OeYObNUf0]1jYOeNWf0X1eYOmN\\f0Q1eYOoN\\f0m0fYOTO[f0i0gYOWOZf0d0jYO\\OXf0kLTROm1Pn0iM^ROn1Qo0Gd1gM]f1"}}, {"image_id": 160, "category_id": 1, "bbox": [273.0, 504.0, 225.0, 207.0], "score": 0.9999999403953552, "association_id": 3, "light": [-2.6989798545837402, -1.2823944091796875, 2.642576217651367, 1.1492383480072021], "segmentation": {"size": [853, 1280], "counts": "kRT71cj02M3O0O2O00001O00000O2O000000001O0ZLER]O;mb0FS]O:lb0GT]O9ib0JX]O6^b03g\\OCnM:Ze04g\\OFlM6\\e05g\\OIjM3]e06\\\\O^OnM;81\\e08^\\O^OkM<9O\\e09^\\O_OjM<:L\\e0<_\\O4SNA]e0<^\\O5TN_O]e0=^\\O6TN]O]e0?^\\O5TN\\O^e0`0\\\\O5VN\\O\\e0a0\\\\O5WNZO\\e0c0[\\O5XNXO\\e0e0S\\O<`NoN\\e0g0R\\OVOfMUe0m1d[O?_d0C_[O>ad0C^[O>`d0C_[O>`d0D][O>cd0BZ[Oa0ed0AX[Oa0gd0@nZOl0od0^2O1N2N2O1O1O100O1O1O1O1O1O100O10000O10000O10Oc[OQJUd0P6j[ORJUd0n5k[ORJTd0o5l[OQJTd0o5k[ORJTd0o5l[OQJTd0n5l[OSJSd0n5l[OSJTd0m5k[OTJUd0l5k[OTJUd0k5k[OVJUd0i5k[OXJUd0T60000O[Ol[OkJTd0S5n[OmJRd0R5n[OoJRd0P5o[OPKQd0o4o[ORKQd0m4P\\OSKPd0l4Q\\OTKoc0l4Q\\OTKoc0k4R\\OUKnc0j4S\\OVKmc0j4S\\OVKmc0i4T\\OWKlc0i4T\\OWKlc0h4U\\OXKkc0h4U\\OXKkc0h4U\\OWKlc0i4T\\OWKlc0h4U\\OXKkc0h4U\\OXKkc0h4U\\OXKkc0h4U\\OXKkc0h4U\\OXKkc0h4U\\OXKkc0h4U\\OXKkc0h4U\\OXKkc0h4U\\OXKkc0h4U\\OXKkc0h4U\\OXKkc0h4U\\OXKkc0h4U\\OXKkc0h4U\\OXKkc0h4U\\OXKkc0i4T\\OWKlc0i4T\\OWKlc0i4T\\OWKlc0j4S\\OVKmc0j4S\\OVKmc0j4S\\OVKmc0j4S\\OVKmc0j4S\\OVKmc0j4S\\OVKmc0j4S\\OVKmc0k4R\\OUKnc0k4R\\OUKnc0k4R\\OUKnc0k4R\\OUKnc0k4R\\OUKnc0k4R\\OUKnc0k4R\\OUKnc0k4R\\OUKnc0k4R\\OUKnc0k4R\\OUKnc0l4Q\\OTKoc0l4Q\\OTKoc0l4Q\\OTKoc0l4Q\\OTKoc0l4Q\\OTKoc0k4R\\OUKnc0k4R\\OUKnc0k4R\\OUKnc0k4S\\OTKmc0k4T\\OUKlc0k4T\\OUKlc0j4U\\OVKkc0i4V\\OWKjc0g4Y\\OXKgc0e4\\\\O[Kdc0Y4h\\OgKXc0l3V]ORLkb0j3[]OSLfb0e3Y2N2N2N2C=F:_Oa0K5M3N2O1O1O100O1O1O1O1O100O1O1O100O1O100O1O100O1O100O10000O100O100O1O1O1O1O100O100O1O1O1O101N100O100O100O1O1O2N2M4K;YO`mZd0"}}, {"image_id": 160, "category_id": 1, "bbox": [408.0, 493.0, 821.0, 303.0], "score": 0.9999872446060181, "association_id": 1, "light": [-1.9895079135894775, -2.75858473777771, 1.9314422607421875, 2.6240756511688232], "segmentation": {"size": [853, 1280], "counts": "V\\d:1dj00O2N2O0O2O0O2O00000\\YO6ZLLfe0Nh]Om0Wb0ROg\\OOYNU1nd0lNe\\O7SNV1Ue0cNd\\O`2Yc0`Mc\\Oi2Yc0VMc\\OS3Xc0mLe\\OX3Yc0hLd\\O\\3\\c0cLb\\Oa3\\c0^Lc\\Oe3]c0ZLa\\Oj3]c0TLd\\Oo3od04aNmKV\\OU4fc0nKX\\OV4ec0jK[\\OY4ac0hK^\\O[4`c0eK`\\O]4^c0dK`\\O^4_c0bKa\\O`4]c0`Kb\\Ob4]c0_Kb\\Oc4\\c0]Kd\\Od4[c0]Kc\\Oe4\\c0[Kd\\Of4[c0ZKe\\Of4[c0[Kc\\Og4\\c0YKd\\Og4\\c0ZKc\\Og4\\c0YKc\\Oh4]c0XKc\\Oh4^c0WKb\\Oj4]c0UKc\\Ol4^c0SKb\\Om4_c0RK`\\Oo4`c0PKa\\OQ5_c0nJ^\\OU5bc0jJ\\\\OY5dc0fJY\\O^5hc0`JW\\Ob5ic0^JU\\Oe5\\d01O100O2O0O10001O0O10001O0000001O000O101O0000O010O10O1O00100a[OoIYd0Q6e[OTJXd0m5h[OTJWd0l5h[OUJXd0j5i[OVJVd0k5i[OVJWd0i5j[OXJUd0h5k[OXJTd0i5k[OXJUd0g5l[OYJTd0g5l[OYJTd0g5l[OYJTd0f5l[O[JSd0f5m[OZJSd0f5m[OZJSd0e5m[O]JRd0c5n[O]JRd0c5m[O^JSd0b5m[O^JSd0a5m[O`JSd0`5m[O`JRd0R600000000000001N1000000000000O1000001O00000O10000000001O000O100000000000001O000O10000000000000001N100000000000000O10001O0000000O1000000O101O0O100O101N100O100N3L3N2M4M2O1O1O1O1O1O2N1O1N200O100O2O000O101O001O1N2O001O001O0O10001O00000O2O000000000O1000000000000O^Om]OdHSb0]7o]O`HQb0`7P^O_HPb0b7R^O[Hna0e7S^OZHma0f7T^OYHla0h7S^OXHma0j7Q^OVHna0l7R^OSHna0o7P^OlGN2Qb0S8T^OmGla0U8S^OjGma0X8Q^OgGPb0Z8P^OeGPb0[8P^OdGQb0]831N101O1O001O001N101O1O001O001O0O101O00010O0000001O00000010O000001O0000000010O000001O0000001O0001O01O0000O100000000O10001O000O1000000O100000000O101O00000O1000000O1000000O10Q^OeGda0g80O01O1O00001O000000WO_^O_Haa0_7_^ObHaa0]7`^OcH`a0[7b^OeH^a0Z7b^OgH^a0W7c^OjH]a0U7c^OlH]a0S7c^OnH^a0P7b^OQI^a0n6b^OSI^a0l6a^OVI_a0i6`^OYI`a0n700001O000000001O00000000001O0001O0001O00000000001O0]NZ^OWJfa0i5Z^OWJfa0i5Z^OWJfa0h5[^OYJda0g5\\^OYJda0g5\\^OYJea0e5\\^O[Jda0e5\\^O[Jda0e5\\^O[Jda0e5\\^O[Jda0e5\\^O[Jda0d5]^O\\Jca0d5]^O\\Jca0d5]^O\\Jca0d5]^O\\Jca0d5]^O\\Jca0d5]^O\\Jca0d5^^O[Jba0e5^^O[Jca0d5]^O\\Jca0d5]^O\\Jca0d5]^O\\Jca0d5]^O\\Jca0d5]^O\\Jca0d5^^O[Jba0e5^^O[Jba0e5^^O[Jba0e5^^O[Jba0e5^^O\\Jaa0d5`^O[J`a0e5`^O[J`a0e5`^O[J`a0e5`^O[J`a0e5`^O[J`a0e5`^O[J`a0e5`^O[J`a0e5`^O[J`a0e5`^O[J`a0e5`^O[J`a0e5a^OZJ_a0f5a^OZJ_a0f5a^OZJ_a0f5a^OZJ_a0f5a^OZJ_a0e5b^O[J^a0e5b^O[J^a0e5b^O[J_a0d5b^O[J^a0e5b^O[J^a0e5b^O[J^a0e5b^O[J^a0e5b^O[J_a0d5a^O\\J_a0d5a^O\\J_a0d5b^O[J^a0e5b^O[J^a0e5b^O\\J^a0c5b^O]J^a0c5b^O]J^a0c5b^O]J^a0c5b^O]J_a0b5a^O^J_a0b5a^O^J_a0b5a^O^J`a0a5`^O_J`a0a5`^O_J`a0a5`^O_Jaa0`5_^O`Jaa0`5_^O_Jba0a5^^O_Jca0`5]^O`Jca0`5]^O`Jca0`5]^O`Jca0`5]^O`Jda0_5\\^OaJda0_5\\^OaJda0_5\\^OaJea0^5[^ObJea0^5[^ObJea0^5[^ObJea0^5[^ObJfa0]5Z^OcJfa0\\5[^OdJea0\\5[^OcJfa0]5Z^OcJga0\\5Y^OdJga0\\5Y^OdJga0\\5X^OeJia0Z5W^OfJia0Z5W^OfJia0Z5W^OfJia0Z5W^OfJja0Y5V^OgJja0Y5V^OgJja0Y5V^OgJka0X5U^OhJka0X5U^OhJka0X5U^OhJla0W5T^OiJla0W5T^OiJla0W5T^OhJma0X5S^OhJna0W5R^OiJna0W5R^OiJna0W5R^OiJoa0V5Q^OjJoa0V5Q^OjJoa0V5Q^OjJPb0T5Q^OlJoa0T5Q^OlJoa0T5Q^OkJPb0U5P^OkJPb0U5P^OkJQb0T5o]OlJQb0T5o]OlJQb0T5o]OlJQb0T5o]OlJQb0T5o]OlJQb0T5o]OlJQb0T5P^OkJPb0U5P^OkJQb0T5o]OlJQb0T5o]OkJRb0T5o]OlJQb0T5o]OlJQb0T5o]OlJQb0T5o]OlJQb0T5o]OlJQb0T5o]OlJQb0T5o]OlJRb0S5n]OmJRb0S5o]OlJQb0T5o]OkJRb0U5n]OkJRb0T5o]OlJQb0T5o]OlJQb0T5o]OlJQb0T5o]OlJQb0T5o]OlJQb0T5o]OlJRb0S5n]OmJRb0S5n]OlJRb0U5n]OkJRb0U5n]OkJRb0U5o]OjJQb0V5o]OjJQb0V5o]OjJQb0W5n]OiJRb0W5n]OiJRb0W5n]OiJRb0W5n]OhJSb0X5m]OhJSb0X5m]OhJSb0X5m]OhJRb0Y5o]OfJQb0[5n]OeJRb0[5n]OeJRb0[5n]OeJRb0[5n]OeJRb0[5n]OdJSb0\\5m]OdJSb0\\5m]OdJSb0\\5m]OdJSb0\\5m]OdJRb0]5n]OcJRb0^5m]ObJSb0^5m]ObJSb0^5m]ObJSb0^5m]OaJTb0_5l]OaJTb0_5l]OaJTb0_5l]OaJTb0_5l]OaJTb0_5l]OaJSb0`5m]O`JSb0a5l]O_JTb0a5l]O^JTb0c5l]O]JTb0c5l]O]JTb0c5l]O]JSb0e5l]O[JTb0e5l]O[JTb0e5l]O[JTb0e5l]O[JTb0f5k]OZJTb0g5l]OYJTb0g5l]OYJTb0h5k]OXJUb0h5k]OWJUb0j5k]OVJUb0k5j]OUJVb0k5j]OUJVb0l5j]OSJVb0m5j]OSJVb0n5i]ORJWb0n5i]ORJVb0o5j]OQJVb0P6i]OPJWb0P6j]OoIVb0R6j]OmIVb0S6j]OmIVb0S6k]OlIUb0U6j]OkIVb0U6k]OjITb0W6l]OiITb0X6k]OhIUb0X6l]OgITb0Y6l]OgITb0Z6k]OfIUb0Z6k]OfIUb0Z6k]OfIUb0[6k]OdIUb0\\6k]OdIUb0]6j]OcIVb0]6j]OcIVb0^6i]ObIWb0_6i]O`IVb0a6j]O_IVb0c6h]O]IXb0d6h]O[IXb0g6f]OXI[b0j6d]OUI\\b0b70O100@d]OfH]b0Z7i]O`HWb0a7j]O[HWb0g7;001O001O001O000O2O00000000001O00000000001O000000001O0000001O000000001O000000001O00O10000O10000O100O10000O100O100O10000O100O10000O100O10000O2O000O100O100O1O100O1O2N1O1O1O1O1O1O1O100O2N100O100O100O100O10001N1000000O10000O101N100O10000O2O000O10001N10000O101O000O2O00001N1000001O000O101O00001N10001O000O2O001N101O1O0O2O001O0O2O00001N10001O000O101O000O101N10000O2O0O101N1O2O0O1O2N1O2O1N3M3M3N2M3N1N1O2O1N1N3L3]MnYO`0Vf0]ORZO:Rf0C_ZOMbe01dZOI_e03gZOH\\e0KX[OKkd02^[OEed07d[O^OSe0MPPZ1"}}, {"image_id": 160, "category_id": 1, "bbox": [130.0, 549.0, 156.0, 135.0], "score": 0.9998465776443481, "association_id": 2, "light": [-2.316253423690796, -2.007338762283325, 2.2278404235839844, 1.8874077796936035], "segmentation": {"size": [853, 1280], "counts": "Tn\\35jh00gXO1Ug05gXOMWg06fXOKYg07fXOJYg07eXOKYg06gXOJYg05hXOKWg06iXOJVg07jXOIUg07lXOIRg09oXOFQg0;nXOEQg0=oXOBPg0a0nXO^ORg0e0mXOYOSg0m0hXOPOYg0U1eXOhN\\g0`1\\XOfN]g0`1]XOgN[g0c1\\XO`Nbg0b1\\XO_Nbg0d1\\XO^Ncg0c1ZXO_Neg0Y2O2N1N2O1O1O1O100O1O102MNiXOhLVg0Y3jXOgLUg0]3OMlXOgLSg0Z3mXOfLRg0Z3oXOfLQg0Z3oXOfLPg0Z3PYOgLPg0X3QYOhLnf0Y3RYOgLnf0X3RYOiLnf0W3RYOiLmf0X3SYOiLkf0X3TYOiLlf0V3UYOjLjf0W3VYOiLjf0W3UYOjLjf0W3VYOhLkf0X3UYOhLjf0Y3UYOhLkf0X3UYOhLkf0X3UYOiLif0b300O100O100O100O100000000O10000000000O100O100000F^YOaLbf0_3^YOaLbf0_3^YOaLbf0^3_YObLaf0^3_YObLaf0]3_YOdLaf0\\3_YOdLaf0[3aYOdL_f0[3bYOeL]f0\\3cYOdL]f0\\3cYOdL]f0[3dYOeL\\f0[3dYOeL\\f0[3dYOeL\\f0[3dYOeL\\f0[3dYOeL\\f0Z3eYOfL[f0Z3eYOfLZf0Z3gYOfLYf0Y3hYOgLXf0X3iYOhLWf0X3iYOhLWf0X3iYOhLVf0X3lYOgLTf0X3mYOhLSf0W3oYOgLRf0[2aYOYNa0YOne0Q2hYOnMO1cg0]1Z1N2IjVOmNWi0T15O10000O1000000O10000000000000000000000O100000000000001O000000000O2O001O1O1O1O1O1K6Kn^ki0"}}] ================================================ FILE: projects/LISA/output_light/inference/soba_instances_results.json ================================================ [{"image_id": 1, "category_id": 1, "bbox": [245.02700805664062, 129.4477081298828, 150.12026977539062, 259.74237060546875], "score": 0.9999997615814209, "association_id": 1, "segmentation": {"size": [768, 1024], "counts": "min56fg06J5M3N2ON101O1O1O1OXKKgA3V>j0QAVOl>[1g@cNZ?a1c@^N]?d1b@[N^?i1^@XNa?P2W@PNj?b2b_O_M^`0k2X_OUMh`0Q3R_OPMn`0T3m^OiLWa0\\3_^OfLda0j41O1O10O10000O1001N2O0O2O000O100000001O01O1O100O1O001O10O0001O001O1O001O1O1N2O1O001O00010O000O100000001O001O1O1O2N001O1O001O0000010O01O1O2O0O1O1O1O2O1N3N0O2O014K6I3N1O1O6Ke0B^\\OoKob0^43K2M5Ll0SO:F3N1N3L7J7I6I9HS1lN:E9H5JelQ?"}}, {"image_id": 1, "category_id": 1, "bbox": [360.1565246582031, 136.72373962402344, 408.9678039550781, 556.4942016601562], "score": 0.9999997615814209, "association_id": 2, "segmentation": {"size": [768, 1024], "counts": "_Q`99cg0:G9H5J5K4M4G8G:G9H8F:DH8J6K5L3L6J5K5M3M2N3M2O1N1O2O1N101O00001O000000001O00000000001O0000001N101O00001O001O0O101O001O1O1O001O1O001O001O001O00001O1O001O1O1O1O1O1O001O1O1O001O001O001O001O001O001O1O001O1O001O1O001O001O1O001O1O010O001O001O1O1O001O001O1O00001O001O000010O0001O010O0010O01O010O1O001N10001O0O2O001N101O001N100010O01O10O01O010O010O000100O01O001O0O2O1O1O1O1N2O1O2N1O1O1O000100O1O1O1O100O001O10O01O0010N10001O001O00001O001O001O001O01O000010O0001O00010O000010O00000001O000000001O0000001O001N2M^FWFR5f9PK]Fn4a9RKcFl4Z9VKhFi4V9WKmFi4o8YKSGf4k8ZKXGe4e8\\K]Gc4b8^K_Gb4^8_KeG`4W8cKiG]4T8eKnG[4m7hKTHX4n6hFPIR52W4l6mFkHn45Y4P7oFcHi4;[4Q7RG]He4?\\4S7]LkHe3T7[LjHi3U7WLjHj3U7ULkHm3T7lKRIV4m6iKTIY4j6gKTI\\4k6dKTI^4k6bKUI_4i6bKXI^4g6bKZI_4e6aKZIa4f6]K[Id4e6[K[If4f6WKZIk4f6TKZIm4g6PKZIQ5g6mJYIU5g6QFkHl3?U6n7[IRHg6n7XIRHi6m7VITHk6l7SIUHn6j7QIWHP7i7nHXHS7g7lHYHV7h7gHYHZ7g7eHXH]7h7bHXH_7h7_HYHb7g7]HXHf7g7YHYHh7g7VHZHl7e7SHZHP8f7mG[HU8d7jG\\HW8d7gG]H[8b7dG^H]8b7aG^Ha8b7^G^Hc8b7\\G^He8`7^G^Hc8a7^G]Hd8a7^G^Hc8a7^G^Hd8_7^G`Hd8^7^G_He8^7]GaHe8]7\\GbHf8\\7[GbHh8[7ZGdHg8[7ZGdHh8Z7ZGdHg8Z7[GdHg8[7ZGdHg8Z7]GbHe8\\7Q4N3N2M3M5K8H6K6I5K4L4M2M3M4L3M5J6K5K6Ij0WO;E:FZOUTQ6"}}, {"image_id": 1, "category_id": 2, "bbox": [206.81016540527344, 322.2153015136719, 227.25270080566406, 117.76214599609375], "score": 0.9999979734420776, "association_id": 1, "segmentation": {"size": [768, 1024], "counts": "jZl4=ag04M2N101N2N2O1O1N2O0O101N2O0O4M2M2O1O001O1N3N2N2N1O1O1O1O001O001O3M2N1O0O2O2N8G4I6N0O2O0O2O0O2O1N2O1OkNQ[OZOmd0g0S[OYOmd0g0T[OYOkd0f0V[O[Oid0e0W[O\\Ohd0c0Z[O\\Ofd0d0Z[O]Oed0b0\\[O_Ocd0a0^[O^Obd0b0][O@bd0`0^[O@bd0`0][OAcd0?][OBbd0?][OAcd0?\\[OBdd0?[[OAed0m100000001O\\O[[OmMed0R2][OmMcd0S2_[OkMbd0S2_[OmMad0S2_[OmMad0S2_[OmMad0S2_[OmMcd0Q2\\[OPNid0k1W[OUNld0h1T[OXNmd0g1R[OZNod0e1Q[O[NPe0d1P[O\\NPe0d1P[O\\NQe0b1P[O^NQe0a1oZO_NQe0`1P[O`NQe0^1P[OaNRe0^1nZObNSe0\\1nZOdNRe0l0gZORO72Se0j0gZOTO62Ue0g0gZOUO54Ve0e0fZOUO55Ze0a0cZOWO58Ze0?T[OBmd0=S[OBod0=Q[OBPe0>P[OBQe0=oZOCQe02O000O101N100O1000000O1000O010000O100YOVYO8jf0FYYO:ff0E\\YO:df0F]YO9cf0F^YO:cf0E]YO;df0D\\YO"}}, {"image_id": 1, "category_id": 2, "bbox": [312.2872009277344, 426.74517822265625, 430.4860534667969, 333.1461181640625], "score": 0.999996542930603, "association_id": 2, "segmentation": {"size": [768, 1024], "counts": "Q`^85hg06K4M4K4M2O11N2O1N3M3N2M100O10O0010O01O1O10O0010O10003L7MM10O000O1O1O10O01O001O001O1O1O3L4M5K3M2N2N1O2O000000001O00110101ON1O1OO0O01000O10000O1001O001O2M3N1O1O1O0000O100O01000O0100O1O0_MWNl^Oi1Pa0[No^Of1k`0`NU_O`1g`0dNX_O]1d`0gN[_OZ1b`0iN]_OX1c`0gN]_OY1d`0gNZ_O[1f`0dNY_O^1f`0bNY_O`1g`0_NX_Oc1g`0]NX_Oe1g`0[NW_Oi1h`0VNV_On1h`0SNU_O5_Ne0Zb0VOV_O4eNd0Tb0XOV_O3jNd0oa0YOV_O4lNc0ma0YOV_O4POa0ja0[OU_O4SOa0ha0ZOU_O5UO`0ea0[OU_O6WO>ea0\\OS_O5[O>ba0\\OR_O7^O;aa0]OQ_O8@:_a0^Oo^O9D8]a0^Oo^O9H7Xa0An^O9K6Wa0@m^O;M7Ta0^Om^O<07Qa0^Om^O;39o`0[Om^O=59l`0[Om^O=79k`0[Ol^O<;:h`0YOl^O><:g`0YOk^O>>:g`0WOk^O??9f`0XOk^O>`0;e`0VOk^O>a0=d`0TOj^O?d0f0>e`0POe^O`0h0a0d`0mNc^Ob0k0a0c`0kNb^Oc0l0d0a`0iN`^Od0Q1c0^`0iN`^Oc0T1f0[`0gN_^Oc0X1f0X`0hN^^Ob0[1g0W`0jNX^O2ALQ2X1U`0lNV^OOMEj1`1R`0oNR^OM^2T1_?SOm]OKd2S1`?H_@7d?G\\@9d?IY@7g?JY@6g?JY@6f?KY@6f?KZ@5e?K[@6e?I\\@7c?I^@7a?J^@7a?I`@6`?Ja@6^?Jb@6^?Jc@6\\?Jd@6]?Ic@8]?Gd@8\\?Hd@9\\?Ee@;]?Ce@<[?Cj@9W?E[AKd>4_AN]>1n_O_OROf0j`0JR@DTOb0i`0IQ@HVO?h`0IQ@IXO>g`0GQ@LYO=e`0GP@O[O9f`0Gn_O0_O8b`0Im_O0B6b`0Ik_O1F4``0Ji_O3I2^`0Ji_O3K2]`0Jg_O4O1Z`0Ke_O53NY`0Ld_O64NW`0Ld_O67NU`0Kd_O78MT`0Mb_O6;NS`0Kb_O7^@Bb??]@@e??Z@Bg?=Y@Ch?U@Cl?ec0C[\\O>dc0B]\\O>ac0C_\\O=ac0C`\\O>]c0Cd\\O=[c0Cf\\O?Vc0Bl\\O>Rc0BP]O?lb0BV]O>hb0BY]O?eb0B\\]O=bb0D^]O=ab0C`]O<`b0Da]O<^b0Cc]O>\\b0Be]O>Zb0Bg]O>Xb0Bh]O?Wb0@k]Oa0Sb0_Oo]Oa0oa0^OS^Od0ja0\\OW^Oe0ga0ZOZ^Of0fa0ZO[^Of0da0YO^^Og0aa0XO`^Oh0`a0WOa^Oj0^a0VOb^Oj0_a0TOb^Om0]a0QOd^OP1]a0nNd^OS1]a0eNi^O]1f`0bNi_Oa1S`0bNl_O`1Q`0bNm_O`1o?cNP@`1m?bNQ@`1n?`NR@`1n?`NR@a1l?aNS@_1m?aNS@`1l?aNS@`1l?`NS@a1m?`NR@a1m?_NS@MlMd0oa0@T@KSNa0ha0DU@JUNb0da0EW@HWNc0aa0FW@FYNd0`a0FV@G[Nc0^a0FW@G[Nc0^a0GU@F^Nd0\\a0FT@HaNa0[a0HP@IfN?Za0Hm_OKkN=Wa0Ii_ONPO:Va0Ig_OOTO7Ua0Jc_O3YO4Ra0Ja_O4B5f`0He_O5G2c`0Id_O7KO``0Jc_O9NM^`0Kb_O90L^`0Kb_O91K]`0La_O:2K\\`0La_O94J\\`0L`_O:5JZ`0L`_O:7JY`0M__O99JW`0M`_O9:JV`0M__O9IR`0N__O9`0IQ`0N^_O9b0HP`0O^_O9c0Ho?O]_O8e0In?0[_O8h0Hm?O[_O9h0Hn?OZ_O8h0Io?NY_O8j0Jm?NX_O7m0Jl?OV_O6P1Kj?OU_O4S1Nh?NT_O1X10f?NQ_O0\\12c?NP_ON_14b?No^OKb17_?Nn^OJd18_?Mm^OJf19]?Ml^OIh1:\\?Ml^OHi1;]?Li^OHl1;\\?Lh^OGn1=[?Lf^OFP2>[?Lc^OEU2>Z?L_^ODZ2`0X?1V^O_Oe2?V?5o]O\\On2>S?8k]O[OT3i0QAWOP?h0QAWOo>i0QAWOP?g0QAYOo>g0QAYOP?f0PAZOQ?e0o@[OR?d0n@\\OS?c0m@]OT?b0l@^OU?a0k@_OV?`0j@@W??i@AW??i@AX?>h@BX?>h@BY?=g@CZ?Sb0Al]O`0Ub0_Oi]Oa0Zb0]Of]Oc0\\b0\\Ob]Oe0`b0ZO_]Od0eb0ZO[]Of0gb0YOX]Of0kb0YOa\\O1oNf0Sf0^OiYOb0Vf0BhYO>Wf0e0010OI8O0001O0O1O2O001O001O010O01O000000N2N2O1O2O010O1O100O1O1O2O0O1O101N10001N10000O1O010N2N2M3N2O100O1O010O010O00000O10O1001O010O0010O01O010O1O010O010O0100O0100O010O10O10O1000O0100000O0100O001N2N1O2N100001O010001N101O0O101N101NbdW6"}}, {"image_id": 2, "category_id": 1, "bbox": [294.4266662597656, 374.8473205566406, 393.2955017089844, 734.00537109375], "score": 1.0, "association_id": 1, "segmentation": {"size": [1280, 1024], "counts": "`le<1jW1e0ohNGXU1e1J6J6K4K5L5J6G:Cb0[Oi0gNT1C8I7J5L5J4M4M2M4L3M3K6I7H8H8H7L5K4N2M3N2N1N2O1O1N2N2M3M3L4M3M3N2N2O1N2O000O2N1N2M3L4M3N1N3N1O2O00101O1N2O001O1O1O1O1O0O2O1O100N2O2M3L4L4L4L5L3M4K4M3M3M3N2M3M2M4L4L3M4K5J5K6M3M2N3M3N1O3L3N3L4L5J6J6I7J5L4L4L4M3M2N2N2M3N2M3L4L4I7J6K5K5L3M4M3L3M3L5gM`^Ok]Oea0oa0j^Oc]O[a0Vb0W_Of\\Oba0Qc0l1K4M3N2N3M2O1N2O1O1O0O2N1N3M2O2N1O101O00000001O1N2N2O0O2O1O1N2O001O1O1O010O01O1O001O0O2O1N1O2O1N101O100O100O2O0O101N10000O101O0O1000000000000000000000000000000000O100000000O1000000O10000O100O1O100^Mj]OY_OWb0U`0a^Od_O`a0S`0m^Oi_OSa0T`0T_Og_Om`0W`0X_Oe_Oi`0Z`0[_Ob_Of`0\\`0__O`_Ob`0_`0a_O^_O``0a`0c_O]_O]`0b`0d_O]_O^`0a`0c_O^_O^`0a`0c_O^_O_`0``0b_O__O_`0_`0d_O`_O]`0^`0d_Oa_O]`0]`0e_Ob_O]`0[`0e_Oe_O\\`0X`0f_Og_O[`0W`0h_Oh_OY`0U`0i_Oj_OY`0S`0i_Om_OX`0P`0j_Oo_OX`0o?j_OP@W`0o?j_OP@W`0n?k_OP@X`0n?i_OQ@X`0m?i_OS@Y`0k?h_OT@Y`0j?i_OU@X`0j?i_OT@Y`0k?g_OU@Z`0i?h_OV@Y`0i?h_OV@Y`0i?g_OW@Z`0g?h_OW@Y`0i?g_OW@Z`0h?g_OW@Y`0i?g_OV@Z`0j?g_OU@Z`0j?g_OT@Z`0l?g_OR@Z`0n?g_OP@Z`0P`0g_On_O[`0P`0h_Om_OY`0S`0h_Ok_OY`0U`0i_Oh_OX`0X`0j_Oe_OW`0[`0h3O0000001_BVYOj9jf0TFZYOi9gf0UF^YOh9cf0UFbYOh9^f0WFfYOe9[f0ZFjYOb9Wf0\\FnYO_9Sf0`FRZO\\9oe0bFUZO[9ke0dFXZOY9je0fFXZOX9he0gF[ZOV9ge0hF[ZOW9ee0iF\\ZOT9fe0lF\\ZOQ9ee0oF]ZOn8ee0QG]ZOk8ee0UG]ZOf8fe0ZG]ZO^8he0bG]ZOS8je0lG\\ZOh7je0XH[ZO[7me0eHWZOP7Pf0PITZOf6Sf0YIPZO^6Vf0bIlYOX6Xf0hIkYOo5\\f0PJfYOV5Sg0hJPYO`3aLZKnj0U1dXO[3hh0dL\\WOS3jh0lLZWOk2lh0TMZWO_2nh0`M_WOk1jh0TNkWOP1\\h0POiWOe0^h0ZOfWON2N2O1O1O1O2M2N3N2N2Dg[OD[d08>J^Wcb0"}}, {"image_id": 3, "category_id": 1, "bbox": [52.96216583251953, 218.1842041015625, 971.037841796875, 340.15740966796875], "score": 0.9999912977218628, "association_id": 1, "segmentation": {"size": [682, 1024], "counts": "Yol16Qe05J6L5J4La0@3M3M2O2O1N2O0O2O1N101N2O1N1O2O1N3M3N1N3M3M4L4L4L4L5K4M3L3M4M1N2O1N1O2O1N101O0O2O0O2O001O0O2O001O0O2O1O001O1O1N2O2N1O1O2N1N2O1O1O1O1O001O1N101O001O00001O000O2O00001O001O001O1O1O001O1O1O2N1O1O2N001O1O001O00001O000O2O00001O000000001O000O10001O00000O2O00001N10001O0O2O001N101O000O2O000O101O00000O101O00000000000O1000000000000000000O1000000000000000000000000O10000000000000000000000000001O00000O1000000000000000000000000000000O10000000001O000000001O000000001O000O2O00001O001O001O00001O00001O00001O000O101O00000000000000000O10000000000000000O1000001O0000000O10000000000000000O1000000O100000000O101O000O1000000O10000O1000000O1000000O2O00000O10000O10001N100O101N1O101N1O1O2N1O2N1O2N1N2M4M2N2N3M2O1O2N1O100O2N100O100O2O0O100O2N100O2N1O2N101M2O2N1O2M2O2M2O2M2O1O2N1O1O1O2N100O1O101O0O100O1000000O1000000O100000000O1000000O1000000O1000000O100000000O1000000O10000000000O100000000O100000000O10000000000O1000000000000O01000000000000000000O10O1000O10000O10000O100O1M3M3N2M3O1O100O10O010000O10000O1000000O1000000O10000O100O100O100O100O1L4M3M3N2O100O100O10000O10000O1000000O1000000000000000000O100000000000000O1000000000000O10000000000O100000000O10000O10000O100O10000O1000000O1000000O100000000O1000000000000O1000000000000O1000000000000O1000000O1000000O1000000O100O101O0O10000O100000000O1000000000000O100000000000001N10000000000000000O1000000000001O00000000000O10001O000000000000001O000000001O0000000O101O0000000000001O00000000001O000000001O000000001O000000001O000000001N100000001O000000001O00010O001O00001O1O001O0010O01O1O001O001O001O1O001O001O010O1O001O001O001O1O001O1O001O1O1O1O1O2N2N2N3M3M9F6K2N3M2N2N1O1O001O001O00001O00001O00000O2O00001O0O101O001N101O0O2O0O2O1N101O0O2O0O2O00001N10001N1000001O0O1000000O101N10000O101N100O1O1M4L3M3M4M2O1N3N1O1O2N1O1O2N1O2O0O100O2O0O100O2O0O1O101N1O1O2O0O1O1O2N1O1N3N1O1O2N1O1O2N100O2N101N100O2O001N100O2O001N101N2N101N2N2N2O1K7I;E[:"}}, {"image_id": 3, "category_id": 2, "bbox": [21.455141067504883, 405.8929443359375, 1002.5448608398438, 202.2763671875], "score": 0.9992203712463379, "association_id": 1, "segmentation": {"size": [682, 1024], "counts": "Qkc11Ye01N2O1N2O2M2N4M4K2N2O1N2N2N1N3N2N2N2O0O2O1O001N101O001O0O101O0000000O10001O0O1000000O100O100O101N1O100O100O1O100O100O10000O10001O0O100000000O1000000O1000000O10000O100O100O100O100O100O100O10000O10000O10000O1000000O1000000O10000O10000O100O100O1O1O1O1O100O1O1O100O1000000O100000000O1000000000000000000000000000000000000000000000O100000000000000000000000000000001O000000000O10001O00000000001N100000001O0O1000000O2O0000000O1000001O000O1000000O10001O0O10000O10001N1O1O1O1O1O1O2N100O10001O000O10001O000000000O101O00000000000000001O0000000O10000000001O0000000000000000000O2O000000000000000000000000001O0000000000000000000000001O00000000000000001O00000000001O0000001O0000001O00001O00001O001O000010O01O0000001O0000001O0000001O0000001O00010O00001O1O1O1O1O1O101N1O1O1O1O1O1O10O0001O001O00010O0000001O000O2O00001O00001N2O1O001O1O1N2O001O1O001N101O00001O0O101O0000000O2O000000000000000000000000000000000000000000000000000000000000000000000000O2N1O2N1O2N2N101N1O2O1N3M5L1N1O1O2M2M3M4N1N2O1O2N1O101O0O1000001N1000000O2O00000O10000O10000O100N2O2M2N2K5I7M3N2O1O1O1O1O100O100O10000O100000001N10000O10000O10000O100O1O1O2O0O1O100O1O1O10000O10000O100000000O1000000000001N10000000000O100000000O10000O1000000O100000000O100000000000000O10000000000000000000000000000000000000000000000O100000000000000000000000000000000O1000000000000O100000000O10000O1000000O100000000O100000000000000O100000000000000000000O100000000000000O0100000000000O10000000000O1000000000000000O10000000000O1000000O10000O10000O1000001N1000000O100000000O100000000O1000000O01000O10000O100O100O100O100O1O10000O1000000O10000000000O1000O100000O1000000O1000000O100O100O100O100O10000O1000O010000O100000000O1000000O1000000O1000000O0100000O1000000O10000O1000O10O10000O100000000O01000000000O010000000O010000O010O10O10O10O0100O010O010O100O01000O10O1000O11O0O1000001O000O101O00001N10001N100O2O0O1O2N1O1O2O0O1O101O0O100O2O00000O2O1O1N2O1O1N2O1N2O1N2M3N2M3N8E;Eh5"}}, {"image_id": 3, "category_id": 2, "bbox": [11.023405075073242, 288.8938293457031, 74.15486145019531, 13.562896728515625], "score": 0.9881167411804199, "association_id": 2, "segmentation": {"size": [682, 1024], "counts": "Un<2Xe000000O101O0000000O101O00000O10000O1000001O00000000000000O01000000000001O00000000001O0000000O10000000000000000001O0000001O1O2Mm]bc0"}}, {"image_id": 3, "category_id": 2, "bbox": [158.42404174804688, 247.06251525878906, 142.78350830078125, 24.396041870117188], "score": 0.8951332569122314, "association_id": 0, "segmentation": {"size": [682, 1024], "counts": "ii^31Xe02N2O0R[OMdd05[[OKed05[[OLdd04\\[OLdd04\\[OLdd05[[OKed05[[OKed05[[OLdd04\\[OLdd05Z[OLfd04Z[OLed05[[OKed05[[OKed06Y[OKgd0<01O00000O10000000001O00000000001O0000000000000000000000001O00000000000000000001O000000000000000000000000000000000000001O000000000000001O0000001O00000000001O000000O1000000O1000000000000000000000000000O10001O00000000000O10001N1IV[ONld0NW[O1id0L[[O1IO_XS?"}}, {"image_id": 3, "category_id": 2, "bbox": [74.09242248535156, 453.51470947265625, 378.80059814453125, 211.44049072265625], "score": 0.39758387207984924, "association_id": 0, "segmentation": {"size": [682, 1024], "counts": "Qka1>gd0"}}, {"image_id": 4, "category_id": 1, "bbox": [70.9486083984375, 262.59857177734375, 154.2806854248047, 91.00079345703125], "score": 1.0, "association_id": 1, "segmentation": {"size": [480, 640], "counts": "bcQ18V>e0L3M1O1M3N2O100O1O0N3O10O010ON10011O0000ONO4N2N3O000M300010O001N1O20O02N1O3L4M2O1N2N3M3N1ZCTNU4L4N1O10000O10000000O1000001O0O101N10O1O100O10O1000O10O100O10000O2O000O2O00000O10000O1000O1000O100O010000000O2Oen`8"}}, {"image_id": 4, "category_id": 1, "bbox": [226.0249481201172, 261.73388671875, 288.51849365234375, 192.52554321289062], "score": 0.9999998807907104, "association_id": 2, "segmentation": {"size": [480, 640], "counts": "Vl_37f>8I5J4J5O2M4lDPOR8S1kGTOi7W1PHQOc7g1UFhM03o0b0i8d2lF_MR9f2hF\\MW9g2fF[MY9g2cF[M\\9f2eFYM[9h2eFWMZ9j2hFTMW9m2kFPMU9R3lFlLS9U3PGgLP9Z3SGXLW9j3n0100O100O1O00100O1O10000O011O001N101N101N101N101N101O1O1N:G2N1O2RFTKd9U5O1O1O1O1O5K3M1O1O001O00000000\\NSGUMm8d2`GVM`8f2iGUMW8i2mGUMS8j2oGUMQ8j2PHVMP8i2RHVMn7j2SHTMn7l2RHTMn7k2THTMl7l2VHQMk7n2[HmLe7R3cHfL^7Z3T2O1O1O100000000O10000000000000001O0001O01O00010O010O01O0010O01O000001O0000000001O00000000000000000000000000000QFgLW8Y3hGjLV8V3iGlLV8T3hGoLW8Q3gGQMY8o2dGUM[8k2aGYM_8g2_G\\M`8d2^G^Mb8b2\\GaMc8_2\\GbMd8^2\\GaMe8`2ZG_Mg8a2YG^Mg8d2XGZMj8g2UGTMP9m2nFoLW9R3hFjL\\9W3cFdLa9^3^F^Lf9c3YF\\Lh9d3XF[Li9f3VFYLj9j3TFULm9o3`05J6K2N000O101O001O2N6J2M2O1O2N1O1O00000000O10000O1O2A>L4O1N2O1O1N2O2N1O1O1O2N2N1N2N3K4J7L3N2O1N2N3L3N2M4K4J6O2O0O2N200O1O10002N1O1N100O10O0101O0016J4TCSNZ1M2O1L4O100O010O1000000O10000000O10O100000000O10000O01001N1000O0L5O1O2L4L[h35aWL2001N2NRd5Mn[J5N1O1N2N110O2M2O1O1000000O101O0000000000O100000000000000O1BbA:YUk5"}}, {"image_id": 4, "category_id": 2, "bbox": [253.73519897460938, 361.9300537109375, 233.35946655273438, 91.43014526367188], "score": 0.9999911785125732, "association_id": 2, "segmentation": {"size": [480, 640], "counts": "`[i31n>3SAOf>7J501N10001N10O1O001O1O001O10O01000O1O010O100001N2O1N2I[A0m>N^a62X^I>H3K401N2O1N2N3M2M5L2O1N100O2O0N2O1O100O2OO1O1O0O2N2O1O0010000O1O2N1O100O100O2N1O2N1O2O0O10000O101N1O1O100O100000O01000000000O1000000O100000000000000000000001O001N2N2M3M3N3M2O1MQ^12maN4L200O100O1O1O1O100O01000L^OjAb0V>^OjAa0W>_OiAa0W>@hA`0X>@iA>W>CiA=W>CiA=W>CjA;W>DoA4T>L>2L301N200O2N2N2O1N100O101N100O010O1O1O10000O10O00K4H8011O010O1O001L3O2O001000000O10000O10001N101O1N2M4M2J6H\\A1e>Nbo\\2"}}, {"image_id": 5, "category_id": 2, "bbox": [7.284016132354736, 606.6954345703125, 85.05577850341797, 44.7432861328125], "score": 0.9999997615814209, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "[Y54jd0c0I2N1O1O100O100O1O101N1O1O1O100O1000000010O00001N100010O00000001O00001O0000001O00001O00001O00001O0000001O00001O00001O00001O00001O000O101O0000001O1O001N2O0O2N2N1OdP_c0"}}, {"image_id": 5, "category_id": 1, "bbox": [638.736572265625, 476.1139221191406, 38.93402099609375, 26.433746337890625], "score": 0.9999932050704956, "association_id": 2, "segmentation": {"size": [683, 1024], "counts": "][[=4Ue03M2H8O1O2N100O1001OO100000001N101O1O0000000000O10000O1O1O2N1O2N1O2N2O2M4KkYV7"}}, {"image_id": 5, "category_id": 1, "bbox": [0.0, 150.54296875, 289.14312744140625, 180.69741821289062], "score": 0.9999862909317017, "association_id": 1, "segmentation": {"size": [683, 1024], "counts": "_6X2mb0Y80dG3X81RD^OX1d0c:0RD_OY1d0c:NQDA[1c0b:MQDA]1c0a:M[C]OTO6n2a0b:NYC@RO4R3?b:NXCDnN2W3=b:NVC;W2Hb:NTC=Y2Ec:5kB9`2Ce:Y2ZEgMf:Z2YEgMf:Z2YEfMg:\\2WEdMh:a2SE`Mm:d2oD\\MQ;h2kDXMU;i2jDWMV;k2hDVMW;k2gDVMY;k2fDUMZ;l2eDTM[;m2dDSM\\;m2dDSM\\;n2bDSM^;n2aDRM_;o2`DQM`;o2`DRM_;o2`DPMb;P3^DoLb;R3]DnLd;R3\\DmLd;U3ZDkLg;V3XDhLi;Z3VDeLk;\\3SDdLn;VOlBV3U1cMo;ROXCU3i0gM\\=W2bBiMa=U2_BiMe=U2[BiMi=U2WBiMk=V2VBhMl=X2UBeMl=\\2UBaMm=^2TB`Mn=`2SB]Mn=d2RBZMP>e2QBYMQ>g2oAWMR>i2PBTMQ>m2W2O0010O0100O10O0101O2M3N2M3N1N100O100O100O10O01O10O01O010O10O010000O0101O1O0O2O001N10001N1000O0100O100O00100O1O1O10O02N2N101N2N1O2dIRMXJo2c5XMYJi2d5]MnEOU2d2l7aMjENY2b2j7dMiEM]2_2h7fMiEL_2^2f7jMgEKb2\\2e7kMgEKc2[2d7lMgEKd2Y2c7oMgEIg2X2`7QNVEWOEb0d3V2`7SNSE;]3b1_7UNPE=`3_1_7UNmD?d3\\1_73`HN_72bHN^72aHN_73`HN_73`HN_73`HM`73`HN_73`HN_73`HO^72aHO^72aHO^71cHO\\72cHN]73bHN]72cHO\\72cHN]72cHO\\72cHN]72cHO\\72dHM\\73dHM]73bHN]72cHN]73bHM^73bHM^73bHN^72aHN_72aHN`72_HOa71^HOb71^HOc71]HOd70[H0f70YH0i7NWH3j7LUH4m7KRH5P8JoG6S8IlG7U8HkG9V8FiG:X8FgG:Z8FeG:\\8FcG:^8FaG:_8FaG;_8E`G;a8E^G;b8E^G;c8E\\G;d8E\\G;e8EYGo8AoF`0R9@lFa0U9_OjFa0X9^OfFc0\\9\\ObFe0`9[O^Fe0d9[OYFf0i9YOUFh0m9WOQFj0Q:VOlEk0U:UOiEl0Y:SOeEn0\\:QOdEo0]:QOaEP1`:PO_EP1b:oN]ER1d:nN[ER1e:nN[ER1f:nNXES1h:mNXES1i:mNVES1j:nNVEQ1k:oNTEQ1m:nNSER1n:nNQER1o:oNQEP1P;oNPEQ1Q;oNnDQ1T;nNlDQ1U;nNkDR1V;nNiDR1Z;lNgDR1_;hNbDV1e;eN\\DY1e;fN]DX1d;hN]DV1c;jN_DT1b;lN_DR1b;mN_DR1a;oN_DP1b;PO^Do0b;QO^Do0c;RO\\Dm0d;UO[Dj0f;WOYDh0g;YOYDf0g;\\OXDc0i;]OWDb0i;@WD>j;BVD=j;DVD;k;DVD;k;EVD9k;FVD9j;GWD8k;GUD8l;GUD8l;GUD8k;HVD7k;IUD6l;ITD7m;HTD7l;IUD6l;JTD5l;KUD4l;KTD5l;KUD4l;KTD5l;KUD4l;LSD4m;LTD3l;MTD3m;LTD3l;MUD2l;MTD3l;MUD2k;OTD1m;NTD1l;OUD0l;OTD1l;OUD0l;OUD0k;0UD0k;0VDOk;1UDNk;2UDNk;2VDMk;2VDMj;3VDMj;3WDLi;4WDLi;4XDKi;5VDKj;5WDJi;6WDJi;6WDJi;6WDJi;6XDIh;8WDHi;8WDHj;7VDIj;8UDIj;7VDIj;7VDIj;8UDHk;8UDHk;8UDHk;9TDHk;8UDHk;9TDGl;:SDFm;:SDFm;:SDFm;;RDEn;;RDEn;SCBm<>TCAm<>SCBm<>SCBm<>TCAl"}}, {"image_id": 5, "category_id": 2, "bbox": [400.7513122558594, 232.8164825439453, 608.8956298828125, 123.11973571777344], "score": 0.9962999224662781, "association_id": 3, "segmentation": {"size": [683, 1024], "counts": "Rl_?1Ye0101N101N2O0O2O1O00001O0O10001O00000000000010O00000001O00000000001O0000000000001O01O00000001O01O000001O00000000001O0001O00000000001O00000010O0001O00001O00000000001O0001O0001O000010O0001O01O000000010O000000000001O0000010O001O00001O0000001O00000000001O0000001O001O000O2O00001N10]fR10bYmN1I70000O1000000O10001N1000000O1KC\\[O=dd050000O100000000O1000000O2O00000O100O1000000O100000000000000O1000O10000000000000O1000000000O1000001N100O2N101N1M;Doe9"}}, {"image_id": 5, "category_id": 2, "bbox": [188.09559631347656, 338.4259338378906, 663.8469848632812, 154.83624267578125], "score": 0.9932865500450134, "association_id": 5, "segmentation": {"size": [683, 1024], "counts": "el_83Xe02N1N2O00001OO100000001N100N3MgPV23UoiM4O1O1O001O000000001O00000000000000001O00000001O000001O0001O00001O0000001O00001O00001O000010O01O00000000001O000000000001O01O0001O00000010O0001O0001O010O01O1O001O00001O01O0001O0000001O000000001O000000000010O000000000010O0000000000010O0000000001O01O00010O00001O010O001O0010O01O000010O000001O0001O001O0O2O001O1O0O2O1O1O1N101N101NZQb11fn]N001N101N101N101N1O1O2N1O1N200O2O000O1000001O000O1000000000000O101O00000O10000O100O10000O100O1000000000000000000000000000000001O000O100000000000001N101N2O0O2N2M3N2Fecc3"}}, {"image_id": 5, "category_id": 1, "bbox": [68.48746490478516, 167.83831787109375, 842.2171630859375, 468.9998779296875], "score": 0.9914278388023376, "association_id": 4, "segmentation": {"size": [683, 1024], "counts": "h^l23We02N2N2N2ROGg\\O;Xc0Eh\\OWc0Cg\\O?Xc0Ah\\O`0Wc0Ag\\Oa0Wc0Ah\\O`0Wc0@h\\Ob0Wc0_Oh\\Ob0Wc0_Og\\Oc0Xc0^Og\\Ob0Xc0@f\\Ob0Yc0_Of\\Oa0Zc0@d\\Ob0[c0_Oc\\Ob0]c0_Ob\\Ob0]c0@`\\Oa0_c0g0O00001O000O2O00001O000100O010O100O2O8H4L1O00O1O2O1N2N2O1N2N101N2N00100O001O0010O01O01O010O0010O010O010O0100O010O10O0100000O01000O10O10O1O010O010O0010O010O01O10O01O100O100O100O101N1O2O0O100O100O100O10O01O1O1O1O2N2N2N2N1O2N2N1O2N001O1O1O001O1O001O001O001O00001O001O0O101O0000001O00001O0000001O00000O2O0000001O0000001O000000001O01O00010O00ZN]LdAc3\\>]LeAc3Z>^LeAb3Z>_LfAa3Z>`LfA_3Y>bLgA^3Y>bLgA_3W>cLiA\\3a:bL[G2TN\\3V:oLcGGVNZ3Q:WMgG_OYNY3j9`MjGYO[NX3e9fMmGSO^NW3b9kMnGoN`NU3`9PNmGlNcNT3^9SNnGjNcNS3]9WNmGgNgNQ3Z9[NmGeNiNQ3W9]NnGdNjNo2W9_NnGbNlNn2T9cNnGaNmNl2T9dNnGaNnNk2S9fNnG_NPOj2T9eNmG_NPOl2T9eNlG]NROn2R9eNmGZNSOP3Q9eNmGYNTOQ3P9fNmGVNTOT3P9fNlGTNVOU3n8hNmGoMXOX3l8iNmGlMYO[3j8iNPJW1Q6iNoIV1R6jNmIV1S6kNmIU1S6lNkIT1U6mNjIS1W6nNhIQ1Y6oNfIQ1Z6POeIQ1[6oNeIP1[6QOdIo0]6QObIP1]6QOcIn0^6ROaIn0_6SO`Im0a6SO^In0a6SO_Il0a6UO^Ik0c6TO]Im0b6TO]Il0c6UO]Ik0c6TO]Il0c6UO\\Ik0e6UOZIk0g6TOYIm0g6SOXIm0i6ROWIn0i6SOWIm0i6ROWIn0j6ROUIn0l6QOTIo0n6POQIQ1o6nNQIR1P7nNoHR1S7lNmHU1S7kNmHT1T7kNlHU1U7jNkHV1V7jNiHV1X7iNhHX1X7hNgHX1Z7gNfHY1[7fNfHY1[7gNdHY1\\7gNdHZ1\\7eNdH[1\\7fNcHZ1^7eNbH[1^7eNbH[1_7dNaH]1^7dNbH[1_7dNaH\\1_7dNaH\\1_7eN`H[1`7eN`H[1`7fN_HZ1b7fN]HZ1c7fN]HZ1c7gN]HX1c7iN\\HW1e7iNZHW1f7kNXHU1h7mNVHS1j7oNTHQ1m7POQHP1o7ROPHm0P8UOnGk0S8VOkGj0U8XOiGh0W8ZOgGf0Y8[OfGe0[8[OeGd0[8^OcGb0^8^OaGb0_8_O`Ga0`8@_G`0b8@^G?b8B]G>c8C\\G=d8C\\G=e8C[GSFBm9>SFBm9?RFBm9>SFBm9?SF@l9a0TF_Ol9b0SF^Om9b0SF^Om9c0RF]On9c0RF]Om9e0RF[On9f0QFZOo9f0QFZOo9g0PFYOP:g0PFYOo9i0PFWOP:i0QFVOo9k0PFUOP:k0PFUOP:l0oETOP:m0PFSOP:n0oEROQ:n0oEROQ:n0oEROQ:o0nEQOQ:P1oEQOf6hLfJW4dNQOf6hLfJX4cNPOf6jLfJV4dNPOf6jLfJV4eNoNe6kLfJV4eNoNe6lLeJU4fNoNe6lLeJU4fNoNe6lLeJU4fNoNe6lLeJU4gNnNd6nLeJS4gNoNc6oLfJR4gNoNc6PMeJQ4hNoNc6PMeJQ4iNnNb6QMeJQ4iNnNb6RMdJP4jNoNa6QMfJo3iNPOa6RMeJn3jNPOa6RMeJn3jNPOa6SMdJm3lNoN`6UMcJl3mNoN_6WMcJj3nNoN_6WMdJi3mNPO_6XMcJi3mNoN`6YMbJh3oNnN_6\\M`Jf3QOnN_6]M`Jd3QOoN_6^M_Jc3ROoN_6`M]Ja3TOoN_6bM[J_3VOoN_6dMZJ\\3XOoN^6gMXJZ3ZOPO]6hMWJX3\\OPO]6jMUJV3^OPO]6lMPHVO_1m34QO]6oMeG\\Oj1c35QO\\6dN^I[26QO]6dN]IY27SO\\6dN^IX26TO]6dN\\IX28SO\\6fN\\IV28TO]6fN[IU28UO]6gN\\IR28UOe6bNTIW27WOk6]NPIY25ZOn6[NoHX24\\On6\\NPIU22_On6]NSIP2OCo6\\NSIP2OCn6^NSIn1ODn6_NSIl1OEn6`NSIj10En6aNRIi10Fn6bNQIh11Fn6cNQIf12Fm6eNQId12Gm6fNPIc13Gm6fNQIa14Hk6hNQI_14Il6gNPI`14Il6gNQI_14Ik6iNPI^15Ik6iNQI]14Jk6iNQI]15Ij6kNQI[15Jj6kNQI[16Ii6mNQIY16Ji6mNQIY16Kh6lNSIX16Kg6nNRIW17Kg6nNSIV16Lh6nNQIV18Lf6nNSIU17Mf6oNSIS17Nf6oNSIS18Me6QOSIQ18Ne6QOSIQ18Od6QOTIo09Oc6SOSIn0:Oc6SOTIm090c6TOSIl0:1b6SOUIk0:1a6UOTIj0;1a6VOSIi0<2`6UOUIh0;3a6UOSIh0=2`6VOSIh0=2`6WOSIf0=4_6VOTIf0=4_6WOSIe0>4_6WOSIf0>3^6XOTId0>4^6XOTId0>4^6XOTId0>5]6WOUId0>5]6XOTIc0?5]6XOTIc0?5^6WOSId0?6]6VOTIe0>5^6VOTIe0>5^6VOTIe0>6]6VOTId0?6]6VOTIe0>5^6VOTIe0>6^6TOTIf0=7_6SOTIf0=7_6SOTIg0<7_6ROUIg0<7_6SOTIf0=7_6SOTIg0<7_6ROUIg0<7`6QOTIh0<7`6QOTIi0;7`6POUIi0;7`6POUIi0;7`6QOTIh0<8_6POUIi0;7`6POUIi0;7`6POUIi0;8`6nNUIk0:7a6nNUIk0:7a6nNUIl097a6mNUIm097b6mNTIl0:7b6mNTIm097b6lNUIm0:6a6mNUIn096a6lNVIn096b6lNTIn0:6b6lNTIo096b6kNUIo096b6kNUIo097a6jNVIP195a6lNUIo0:6`6kNVIo0:6`6kNVIP196`6jNWIP196`6kNVIo0:7_6jNWIP1:6^6jNXIP1:6^6jNXIP1:7]6jNXIo0;8\\6iNYIP1:7^6hNXIQ1:8]6hNXIP1<7\\6iNXIP1<7\\6iNXIQ1;7\\6iNXIP1<7\\6iNXIP1<7\\6iNXIP1<8[6hNYIP1=7Z6jNXIP1=6[6jNXIP1=7Z6jNXIo0>7Z6jNXIo0>7[6iNWIP1?6Z6kNVIP1?5\\6jNUIQ1`05Z6kNUIP1a05[6jNTIQ1b04Z6lNSIQ1b03\\6kNRIR1c02[6lNRIR1d01[6mNPIR1e01\\6lNoHT1e0O\\6mNoHT1f0N\\6nNmHT1h0NZ6nNnHU1h0L[6nNmHV1i0KZ6POlHV1i0J\\6oNjHX1k0H[6POjHX1l0G[6POiHZ1k0F\\6QOhHY1m0E[6ROhHZ1m0C\\6ROgH\\1l0C\\6QOhH\\1m0B\\6ROfH]1m0A]6ROfH]1n0@\\6SOfH^1m0_O]6SOfH^1n0^O]6SOeH`1m0]O^6TOdH_1n0]O^6TOdH_1o0\\O]6UOdH`1n0[O^6UOdH`1o0ZO^6UOcHa1o0ZO^6UOcHa1P1YO]6VOcHb1o0WO_6WObHb1P1VO^6YObH`1Q1VO]6ZObH`1R1UO\\6[ObHa1S1QO\\6^OaHa1U1oNZ6@aHa1W1mNX6BaHb1X1jNX6C`Hc1Y1hNX6E`Hb1Z1gNV6G`Hb1\\1eNT6I`Hc1]1aNT6M^Hb1`1_NR6O^Hb1a1^NQ60^Hb1b1\\NQ62^Hb1a1[NR62]Hc1b1YNR64\\Hc1b1YNR64\\Hc1c1WNR66[Hd1c1UNR67\\Hc1c1TNR6:ZHb1d1SNS6;YHb1e1PNU6=VHd1e1mMV6?VHc1d1mMW6`0UHc1e1kMW6b0THc1e1jMX6c0THc1d1gM[6e0QHd1e1eM[6g0QHd1c1cM_6h0oGd1c1bM_6j0nGe1c1^Ma6m0mGd1c1\\Mc6o0kGe1b1YMe6R1jGd1c1WMe6T1iGe1c1SMf6X1gGe1e1oLg6[1eGf1f1iLi6`1bGg1g1cLj6f1_Gg1Yo:BUE:k:GYE3h:M]EMd:3bEF_::gE_OZ:a0kEWOX:j0oEhNW:X1SFWNT:i1g400001O00000000001O00000000001O0000000000001O000000000000001O00000001O0000000001O000000000000010O000000000010O00000001O0001O01O0000010O00001O01O01O00001O010O001O001O01O01O00010O01O010O0010O01O0010O01O2N1N3M3N2M3YO_\\O_Occ0?c\\O[O`c0a0h\\OXO[c0e0h0L4K5L5JQ^\\2"}}, {"image_id": 5, "category_id": 2, "bbox": [661.0241088867188, 492.22418212890625, 30.83856201171875, 8.81951904296875], "score": 0.9466493129730225, "association_id": 2, "segmentation": {"size": [683, 1024], "counts": "`fn=3Xe00O1O100O1O1O0100000000O10000O10000O1O1O_Yn6"}}, {"image_id": 5, "category_id": 1, "bbox": [187.6157684326172, 258.40252685546875, 670.5450439453125, 211.673095703125], "score": 0.9218573570251465, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "[jo63We03M4L2N1O2O0O101O00010O00001O001O010O009G1O1O1O1m[OROgc0o0V\\OTOic0m0T\\OVOkc0j0T\\OWOlc0U1O010O001OO10000O1DT\\OYOlc0f0W\\OWOjc0i0W\\OVOic0i0Y\\OUOhc0k0Y\\OSOhc0l0SOo2T;fLgE:VOP3S;hLeE8YOo2Q;lLdE4\\OP3P;mLcE3]OP3P;oLaE0@Q3n:RM`EMBR3m:RMaEJCT3l:TM_EHET3l:UM^EGFT3k:WM^EDIT3i:ZM\\EBKT3i:[M[EALT3i:\\MZE_ONU3h:]MYE^OOU3h:^MYEZO1Y3d:^M[EWO3[3b:_M[ESO6]3_:aM[EoN8`3]:aM\\EjN;e3Y:bMaG^2_8bMaG^2_8cMaG\\2_8dMaG\\2_8eM`G[2`8fM_GZ2a8fM_GZ2a8gM_GX2`8iM`GW2`8jM_GV2a8kM^GU2b8kM^GU2b8lM^GS2b8mM^GS2b8mM^GS2b8mM_GR2a8nM_GR2b8mM^GS2b8nM^GQ2b8oM^GQ2b8oM_Go1b8QN^Go1b8QN_Gn1a8RN_Gn1a8RN`Gm1a8RN_Gn1a8RN_Gn1a8RN`Gl1a8UN^Gk1b8UN^Gk1b8UN_Gj1a8VN_Gj1a8WN^Gi1b8XN]Gh1c8YN]Gf1c8[N\\Ge1d8\\N[Gd1e8^NYGb1g8`NXG_1h8bNWG^1i8dNUG\\1k8fNTGY1l8hNSGX1m8jNQGV1o8lNPGS1P9nNoFR1Q9QOmFn0S9TOkFl0U9VOjFi0V9YOhFg0X9[OfFe0[9ZOeFf0[9[OdFe0\\9[OdFe0]9[OaFf0_9ZOaFf0_9ZOaFf0`9ZO_Ff0a9ZO_Ff0b9ZO]Fg0b9YO^Fg0c9YO\\Fg0d9YO\\Fg0e9XO[Fh0e9YOYFh0g9XOYFh0h9XOWFh0i9XOWFh0j9WOVFi0j9XOVFg0j9ZOUFf0k9ZOUFf0l9ZOSFf0m9[OSFd0m9]ORFc0n9^OQFb0P:]OQFb0o9@oE`0Q:AnE?R:BnE=R:DmEiDBV;?iDBV;?jDBU;>kDBT;?kDBU;>kDBU;>lDAT;`0kD@U;`0kD@U;`0lD^OU;b0kD^OU;b0kD^OU;c0kD\\OU;d0kD\\OU;d0lD[OT;e0lD[OT;f0kDZOU;f0kDZOU;f0lDYOT;h0kDXOU;h0kDXOU;i0jDWOV;j0iDVOW;i0kDVOU;i0mDVOT;g0nDXOT;e0oDYOS;TNdCl0]1n0S;nMgCo0Y1P1W;gMhCR1V1T1h_LbAa3^>_LbAb3\\>_LeA`3[>`LeAa3Y>`LgA`3X>aLhA`3W>`LiAa3U>`LkA`3T>aLlA`3S>`LmAa3Q>`LoAa3P>_LPBb3n=`LQBa3n=_LRBa3n=_LSBa3l=_LTBb3k=^LUBb3k=^LUBc3j=]LVBd3i=\\LWBd3i=\\LWBe3h=[LXBe3i=YLXBg3m=TLSBl3g?O0001O0001O0000000010O00000001O0000010O00001O00001N10001O0000001O0000001O0000001N10000000001O0000001O0O10001O00001N10001O000O10001O0000000O10000000000000000O1000001O00000000000000000O10000000000000000000000001O00000000000^MjLnBW3Q=kLnBU3R=mLlBS3S=oLlBQ3S=RMkBn2U=SMjBm2V=SMjBm2U=UMjBk2V=UMjBk2V=UMjBk2W=TMiBl2W=TMiBl2W=TMiBl2W=TMiBl2W=TMiBm2W=QMjBo2V=QMjBo2V=QMjBo2V=QMjBo2W=PMiBP3W=oLjBQ3V=oLjBQ3V=nLkBR3V=lLkBU3T=jLmBV3S=jLmBV3S=hLoBX3R=fLoBZ3a?001O00000001O0001O00000001O000001O0000000001O00000001O000001O001O00001O001O001O00001O00001O0000001O000001O01O000000001O0000010O00001O000010O000001O01O000000001O00001O00001O01O01O0000001O000\\MlLQCT3na;C_D^D@c;`0^D]Od;c0]D[Od;e0]DYOd;h0\\DUOf;k0[DSOf;m0\\DoNf;Q1[DlNg;T1ZDjNg;W1YDfNi;Z1YDcNh;]1YDaNh;_1ZD]Nh;c1YD[Nh;f1YDWNh;i1YDUNg;l1ZDPNi;P2XDmMk;R2VDkMl;U2UDgMn;Y2TDcMn;]2SD_MPid0?C3N1N3N2N1O101N1000010O00000001O00000010O00000001O01O00002N2O0O1O1OM4L3O1O2O0O2N101N2O0O2N2O0O2I6M4N2N1O2N2O3LWma0NlR^O001O0O2O001N101O1N101N100O2N100O100O101N10000O10001N100O101N100N3M2N2O2N101N101O0O2O001O00001N10001O00001O001O1O1O1O1O1O2N1O1O1O001O001O001O00001O00001O001O1O1O1O1g^OQNT?Q2i@PNW?Q2h@oMX?R2f@PNY?P2g@PNY?Q2f@oMZ?R2e@oMZ?Q2f@oMZ?R2d@oM\\?Q2d@PN[?Q2d@oM\\?Q2d@oM\\?Q2d@PN[?Q2U_OgMW18d?Q2T_OhMX17d?Q2R_OkMY15d?Y2\\@gMe?Y2Z@gMf?Y2Z@gMf?Z2Y@gMf?Y2Z@gMg?Y2X@gMh?Z2X@fMg?Z2Y@fMh?Z2W@fMj?Z2U@fMl?Z2S@gMn?X2Q@hMP`0W2P@iMR`0V2m_OkMS`0U2l_OkMU`0T2k_OlMV`0T2i_OmMV`0T2i_OlMX`0S2h_OmMY`0S2f_OmMZ`0S2f_OnMZ`0Q2f_OoMZ`0R2e_OnM\\`0Q2d_OPN[`0P2f_OnM\\`0Q2d_OoM\\`0R2c_OmM_`0R2a_OnM_`0R2a_OnM``0R2__OmMb`0S2^_OmMc`0R2^_OlMd`0T2[_OlMf`0S2Z_OlMh`0T2W_OlMj`0S2W_OkMk`0T2U_OjMn`0V2Q_OhMQa0X2P_OeMSa0[2o0O010O01O010O010O00010O00100O0`]OgMoa0Z2n]OiMPb0Y2l]OjMTb0W2h]OlMWb0e20O1O1O0010O01O0000001O000001O01O0000000010O00000001O00010O001O000010O000001O01O00001O000010O0001O00001O01O01O00001O000010O000001O01O01O00010O00010O001O00010O00001O0010O0001O000000O1000001O0O100000000O101O000000000O2O000000001O0000001O0000001O000000001O000000000000001O000000000000001O000000001O00001O00001O0000001O00000000010O000001O00001O00001O00001O000000001O000000000000001O0000000000000O1000001O0000000O100000001O0O1000001N10001N10001N10000O2O000O10001N100O10000O110O0001O01O01O0001O01O01O010O001O01O01O0001O01O0001O00010O1O010O10O01O10O01O10O00010O0001O0000010O0000001O00001O00010O001O1O1O001O1O010O001O001O01O01O001O010O001O1O010O001O10O0001O01O0001O01O000001O000000001O00001O00001O001O1O001O001O001O00001O00001N101O001N2O1O1O1N3N5K3L2O1O1N2O0O2N2O0O2O000O2O0O2O0O2N2O0O2M3N5J8Do\\P1"}}, {"image_id": 5, "category_id": 2, "bbox": [334.4683532714844, 659.0872802734375, 35.39794921875, 14.14544677734375], "score": 0.23537054657936096, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "[hR74Qe0600O10000000000000O100000000000000000000O1000000O2O0O4Kkld="}}, {"image_id": 5, "category_id": 2, "bbox": [52.922122955322266, 456.42474365234375, 816.8065795898438, 180.70361328125], "score": 0.12839113175868988, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "Z\\]81Ze000001O000O10001O000O101O000000000000000O100000000000000O100000000O1000000O1000000000O010000000000000000000000000000000000000000000000000000000000O2O0000000O100000001N10000000000O1000001O00000O1000000000001O00000001O000000000001O000001O0000000000000000000001O000001O000000000000000000000001O000001O0000000000000000000000001O000001O0001O0000001O001O001O1O001O10O01O001O00010O0000001O00000O2O00000O2O0O101N1OlfX20UYgM1O0000000000000O10000000000O101O0000000O100001O0O101O00001O0O10Ujf5"}}, {"image_id": 5, "category_id": 2, "bbox": [207.57843017578125, 230.80824279785156, 811.5284423828125, 199.32884216308594], "score": 0.10859136283397675, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "`a`?1Ze0000O2O0O100O2O0O10000O2O0O10000O101N10000O10001N1000000000010O000001OZ[OC^d0>_[ODad0c01O0001O01O000000001O00000000001O000001O000001O0O10000000001O00000000001O00000000001O0000000000001O1O1N2O1O1O1O00ogk3"}}, {"image_id": 5, "category_id": 2, "bbox": [601.9927978515625, 267.8998107910156, 422.002197265625, 94.41680908203125], "score": 0.09623737633228302, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "fV_?3Ue05L3O1O00001O001O00001N10000000001O000001O000000000000001O00000001O00000000001O0000000000001O0001O00000000001O0000001O00001O0001O000001O01O0000000000000001O01O0001O00010O0000010O00010O00000010O00000010O00010O000000010O0000001O00001O010O0000001O0001O00000001O0001O0001O0000001O0000001O00001O1O001O1O0O3N1O00cPj02YoUO3N2O3L2O0O100O100O100O1O1O1O1O101N100O100000O10O1000000O10000000000O1000000O10000O2N100O1O1O101O0O1000001O000000001O0000000010O0000000000000000000000001O0000001O2M2O0O2De[O_O30Yd09b[OJRe0MX;"}}, {"image_id": 5, "category_id": 1, "bbox": [0.0, 582.7400512695312, 24.798568725585938, 39.28240966796875], "score": 0.07599805295467377, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "[b0767Wd0e0K0O2O00000001O0O2O2N1N2O1N1O2N3N2M3M3M2N2N[Rkd0"}}, {"image_id": 5, "category_id": 2, "bbox": [665.31103515625, 489.6892395019531, 24.64398193359375, 8.993255615234375], "score": 0.07086199522018433, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "afn=1Ye01O100O1N2O1O1O100000O1000000O10000O2Nknn6"}}, {"image_id": 5, "category_id": 2, "bbox": [656.1738891601562, 482.9328308105469, 33.0264892578125, 18.4420166015625], "score": 0.06851599365472794, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "afn=2Xe01O1O100O1O1O0O2N200000O1000001N1O101Nlnn6"}}, {"image_id": 6, "category_id": 1, "bbox": [177.52284240722656, 15.191585540771484, 254.07057189941406, 373.7381896972656], "score": 1.0, "association_id": 1, "segmentation": {"size": [1024, 768], "counts": "lQQ64jo06J5K7I3M4M2M3N1O100O2N100O2O0O101N2N3M3M2M4M2M3N101WYOaNo>_1n@hNn>X1n@POm>Q1n@YOm>g0o@Am>?PAFn>;o@In>8PALn>4QAOm>2PA1o>OPA3o>No@4P?Mn@5Q?Lm@6R?Lk@6T?Kk@6S?Lk@5U?Lj@5U?Li@5W?Kh@7W?Jf@8Z?He@:Z?Fc@=]?Da@>^?Ba@?_?A`@a0_?@_@b0`?^O_@d0`?]O^@e0a?\\O\\@g0c?ZOZ@h0f?ZOT@k0k?WOn_Oo0Q`0SOi_OQ1W`0POe_OS1[`0nNb_OU1]`0lNa_OU1_`0lN^_OV1b`0lNY_OW1g`0kNS_OY1m`0iNZ\\On3fc0V400O10000001O01O0000000000000O1000000000000000000O1000000O100000000O10000000000O10000O10000O1000000000000O100000000000000000000000000001O0000001]G\\\\Oh4dc0UKe\\Oe4[c0ZKj\\Ob4Vc0]Kn\\O_4Tc0_Kn\\O`4Rc0_KQ]O_4Pc0`KR]O^4ob0`KV]O\\4jb0cKh]Ol3Yb0RLP_Of2Pa0YM]_O[2d`0cM`_OZ2``0eMd_OX2\\`0fMh_OX2X`0hMj_OV2W`0hMl_OPNgKd3]d0[Nb@b1^?^Nf@^1Z?aNk@Z1V?fNm@W1S?hNPAV1P?jNRAT1n>kNTAS1m>mNTAS1k>mNVAR1k>mNVAR1j>nNXAP1h>POYAo0g>QO[Am0e>RO\\An0d>RO]Am0c>SO^Al0b>TO^Al0c>RO_Am0a>RO`Am0a>RO`An0`>QOaAn0a>oNbAP1^>oNcAP1^>oNcAQ1^>mNcAR1_>lNcAS1^>lNbAU1^>jNcAV1]>hNdAX1^>fNcAZ1]>dNeA[1[>eNeA[1\\>dNeA\\1[>cNfA\\1Z>cNiA[1X>cNjA[1X>cNjA\\1V>bNnA[1T>aNRB[1P>aNUB]1l=_N[B\\1g=aN_BY1e=dN_B1oGd0he0UO]BMWHh0de0ROSCf0Xf0K4L4K5Jcdb;"}}, {"image_id": 6, "category_id": 2, "bbox": [320.2629089355469, 383.12542724609375, 327.4301452636719, 553.1818237304688], "score": 0.9999860525131226, "association_id": 1, "segmentation": {"size": [1024, 768], "counts": "g\\R:c0Wo0k0RQOUOXm0P2I6K4N2N2N2M4M2N3M2N2M4M2N2N2M3N3M3M3L5L5K3M2M3N1O1O1O1O2N102M2N3M3M2N2N2N1O1O2N3L4M3M4L3M3M2M4M2N101N1O2N2Q[OoIk?R6k_OdJi?]5m_OSKk?o4m_O]Km?e4l_ObKS`0`4f_OfKX`0\\4d_OgK[`0Z4c_OhK]`0X4`_OkKa`0T4]_OmKd`0S4Y_OoKm`0l3P_OVLVa0d3h^O_L]a0\\3`^OfLda0W3Y^OkLka0Q3R^ORMPb0m2l]OWMVb0f2i]O[MYb0d2d]O^M^b0`2a]OaMbb0^2Z]OeMhb0Y2V]OiMkb0V2R]OlMPc0T2k\\OPNVc0Q2d\\OSN]c0Q2X\\OUNhc0P2j[OZNVd0j1^[O]Nbd0b6O1O0001O1O1O1N10001N10O010000000000100010O000O10O000001O1O101N2O1O0O10O01O00001N2O2N2N2O1N2N1O100O1O001O1O2N1N3N2N2M2O1N1O2O0O2N2N2N3M3M2N1O1O2O0O001O1O2N1O2N1O3M2N1O2N1O010O001O1O010O001O0010O100O100O2O1O1O1O00000000O00100O0010O01O010O001O1O2N1O2N2N2N2N2M3N1O1O1O100XKiXOe0Xg0XOkXOg0Vg0VOnXOh0Tg0TOoXOk0Sg0ROoXOn0Rg0nNQYOQ1Qg0lNQYOS1Qg0iNRYOW1nf0gNTYOX1mf0fNUYOY1lf0fNUYOY1lf0fNUYOX1lf0iNSYOW1nf0hNSYOW1nf0hNSYOW1mf0iNTYOU1nf0jNTYOT1lf0lNUYOS1kf0mNVYOR1kf0mNVYOQ1kf0POVYOn0kf0POWYOo0if0QOXYOn0if0QOYYOm0gf0SO[YOk0ff0TO\\YOj0ef0UO]YOi0df0VO^YOh0cf0WO`YOf0af0XObYOf0`f0XObYOf0_f0YObYOf0`f0XOaYOf0af0YO`YOf0`f0ZOaYOe0`f0ZObYOc0_f0]ObYOb0_f0\\OcYOb0^f0^OdYO`0]f0_OeYO>\\f0BeYO<]f0CeYO:\\f0FhYO5Yf0KkYO0Wf0OlYOMUf03nYOITf07oYODRf0B2O1N2O1O1N2O1N2O001O1N2O2N2M3N2N1O1O1N101O1O1O2N2N3M2N2N2N1O1O1O1O2N2N4L6J5K3M2N2N1O2N1N4M3M4L2N2N1N2O1O1N2N2O2M4L4L4L3M2N2N3N1O2M3N3M3L4M2N2M3N2N2N1N4M2N3M3M2M3N2N1O1O1O1O2N2N2N3L3N2N1O1O2N1O2N3M4R[O\\JX?h5[@fJ_?^5Z@jJb?Y5X@mJe?U5W@PKf?R5V@QKi?P5T@SKk?n4R@UKm?l4P@VKQ`0j4k_OZKT`0g4h_O]KW`0d4e_O_K[`0b4a_OaK_`0`4^_OcKa`0]4]_OeKc`0\\4[_OfKe`0Z4Y_OgKh`0Y4V_OhKk`0X4S_OiKo`0W4n^OjKTa0V4h^OlKZa0aL]^OR65^MRc0a2k\\OaMWc0_2e\\OdM[c0\\2b\\OfM_c0Z2^\\OhMcc0X2Z\\OjMgc0W2V\\OjMkc0V2R\\OlMoc0U2m[OmMTd0U2f[OnM\\d0j62N3M1O2N1O1O1O1O1O1O1O2N2N2N1O1O2N1O2N2N3M3M3M3M2N1O2N1O2N3M3M3M3M2N3M2N1O2N1O2N3M2N3M3M2N1O1O1O1O2N2N2N4L4L3M3M2N1O2N2N2N2N2N2N1O2N2N2N1O2N2N2N2N2N3M3M1O2N1O001O001O001O001O001O001N101O1O1O1O1O2N1N2O1O0O2O1N2O0iNcUOjL_j0m2mUOnLTj0l2TVOQMni0l2VVOQMli0l2WVOQMki0n2WVOQMji0n2VVOSMii0l2YVOSMhi0l2YVOTMgi0j2ZVOVMfi0j2[VOUMfi0j2[VOVMei0h2]VOWMdi0h2\\VOXMei0g2`VOTMai0j2dVORM]i0m2hVOmLZi0R3k1O1O1O1O1O1O1O1N200O2N2O1N1O2O0O1O100O1N101N2O1O0O2O1N2N2O1L6K4I9Gc0POR[X6"}}, {"image_id": 7, "category_id": 1, "bbox": [349.43450927734375, 222.0576629638672, 109.02398681640625, 263.19732666015625], "score": 1.0, "association_id": 2, "segmentation": {"size": [576, 1024], "counts": "_lV6l0d?g1E6J6H:I6K4L4I>ZBnLh;k4dD\\JP:j5jE[Jm9P6kEUJn9S7K4N2M3M3N200O1000000000O0nNdFbI\\9X6PG`IR9V6a1C=K5ROYD_Kk;]4n0M3N2O10VEXK\\8h4_GhKV8X4gGlKX8U4`GSL_8o3aFPM^9R3[FTMd9n2WFUMi9o2iE\\MV:W501O01N1O101N2QOjERJX:LeER5a0jJo9KlER5;nJf:n4`ElJe:m4\\1J5K4M2M4K5L4L7G:VOh0K5J5oNR1B>K3O2M3N2M3N3M2N2N3N1N1O100O2020M0O00001O010O1O2O0O0010O0O2M3Li]Q:"}}, {"image_id": 7, "category_id": 1, "bbox": [627.019287109375, 299.1822814941406, 60.8028564453125, 117.82489013671875], "score": 1.0, "association_id": 1, "segmentation": {"size": [576, 1024], "counts": "PgR;1ma06K2O0O10000O01O1O1O10O010N2N100QOIU@7i?1P@1o?4g_O1Y`08^_OJa`0k0O01000Q@kNS?V1g@VOR?j0l@]Oo>o1K4L3M4L3M5K2N2N10jLhAc2X>ZMlAe2i>UOTA]Nn>^1\\AZNf>f1j001O001O1001O4KUOS@Dn?4b@D^?6h@IY?0n@NU?Mn@3V?CRA8``0JkYn5"}}, {"image_id": 7, "category_id": 2, "bbox": [374.8970031738281, 467.12274169921875, 170.10458374023438, 24.947906494140625], "score": 0.9999998807907104, "association_id": 2, "segmentation": {"size": [576, 1024], "counts": "WSe61oa00N3N100O1000000O100000000000O010000000O10GLf^O3Za0Ne^O3[a0Nd^O2\\a0Nd^O2\\a0Nd^O1]a0Oc^O1]a0Ob^O2^a0Nb^O2^a0Nb^O2^a0Nb^O1_a0Oa^O1_a0Oa^O1_a0Oa^O1_a0Oa^O1_a0Oa^O1_a0Oa^O1_a0Oa^O1`a0N`^O1aa0O_^O1aa0O_^O1aa0O_^O1aa0N`^O2`a0N`^O3_a0Ma^O3^a0Nb^O2^a0Nb^O2^a0Nb^O2^a0Nb^O2^a0Nb^O2^a0Nb^O2^a0Nb^O3]a0Mc^O3]a0Mc^O3]a0Mc^O3]a0Mc^O3]a0Mb^O5\\a0Ld^O4\\a0Ld^O4\\a0Lc^O5]a0La^O5_a060000O2O0000000000000000000000000000O10001O0000000000000000000000000000000000000000000000O2O000001Ac^O9]a0Gc^O9]a0Gd^O8\\a0Ge^O9[a0Ge^O9[a0Ge^O9aa001O0000000001O0000000000000000000000O1000000000000000000O10000000000O1000000O100000000O2O0O10001NRa]8"}}, {"image_id": 7, "category_id": 2, "bbox": [664.8726806640625, 411.0146789550781, 70.68890380859375, 6.709869384765625], "score": 0.9999951124191284, "association_id": 1, "segmentation": {"size": [576, 1024], "counts": "mXi;2na00O10000000000000000O1000001O00000000000000000000000000000000000000000000000000000000000000O100000000000001O0000000000001O0OTYS5"}}, {"image_id": 8, "category_id": 1, "bbox": [388.5434875488281, 637.3273315429688, 289.6369934082031, 130.67266845703125], "score": 1.0, "association_id": 0, "segmentation": {"size": [768, 813], "counts": "l]T9173Zg0f0C8H5L3^OhNUZO\\1ge0a0L7I7K3L4M1O2N101N101N1O2N2N2M3N2O0O2O0O2O0O101N1O2N101O0O2O00001N1000001O0O1000001N10001O00000O2O0000000000000000000000000000000000000000000000000000000001O0O100000000001O0000000000000000000O10000000000000000000000000001O01O00000000000000000000000000001O0000001O000000001O000000000000000000000000001O0000000000000000000000001O00000000001O0000001O0000000000000000000000000000000000000000000000O10000O1000000O1000000000000000O10000000000000000O1000000O100000000O100000000000001N10001O001O001O000O101O0O2O1N2O1N101O001N102N1N3N3L3N1N101N101N101N4M5\\Oa0I7L2N3N2N1N5K5K5H^bT3"}}, {"image_id": 8, "category_id": 1, "bbox": [182.12872314453125, 86.1440200805664, 306.0693054199219, 140.09902954101562], "score": 1.0, "association_id": 3, "segmentation": {"size": [768, 813], "counts": "kk`4i1me0G4O1N2N101O001N101O0O2O00001N10001N2O001O0O2O000000001O0000001O001O00001N100000001O000O100000000000000O01000000O100O100O10000000001O0O100000000000O100000000000000000000000000000000000001O00000000000000001O0001O0001O000000001O000000000000001O00000000000000000000000O100000000000000O101O0000001O001O001O0000001N1000001O000O10001O0000000O2O0000O10O1000O1000000000000O100000000000000000000O1000O10000000O100O10000O2O00000O010000000000000000000000000O10001O0000000O101O00001O001O000O101N1000000O10001O00001O0O101O1O1O1O1N2O1N2N4L3L4L3N1O2N2N2N2M6FRag6"}}, {"image_id": 8, "category_id": 1, "bbox": [6.653026580810547, 282.4931335449219, 278.5122375488281, 127.00762939453125], "score": 0.9999998807907104, "association_id": 4, "segmentation": {"size": [768, 813], "counts": "ca5d2[e04K3N1O2O0O101N1O101N101O000O101O0000000O1000001O00000000000O2O0000000000000O100000000O10O10000000000000O10000000000001O00000000000000000000000000000000010O000000010O00O2O00000000001N10000000000000000O1000000000000001O000000000000000000000000000000000000O1000001O00000000000000001N1000001O000000001O0000000O10000000000000000000000001O0000000000000000000O10001O0O10000O1000000000000O1000000000000000O10000000000000O1000000000000O100000O10000000O011O00000O101O0000000000000000001O0000000O101O001O1O1O001O001O0O2O1O2N2N3M1O1O001O001N102M3N2N1N101O0O2O1N2I:FPf[<"}}, {"image_id": 8, "category_id": 2, "bbox": [33.78194046020508, 349.31134033203125, 254.6105499267578, 125.345703125], "score": 0.9999998807907104, "association_id": 4, "segmentation": {"size": [768, 813], "counts": "edS16jg01O2M5L6J4L1N2O1O1O001O1O2N2N2N1N2O001O001O1O1O1O001O00001O010O1O001O000000001O01O00000001O001O01O01O0000000010O00000000001O00000000O2O00001O001O0000001O0000000000000000000000001O000001O00000000010O0000000010O0001O001O0000010O000000001O00O100000000000000O10000O100O10000O1000000000000O100000000000000O10000000000O1000000O2O00000000000O100000000000000000000O100000000000000000O1000000O100O001O1O0O200O1O100O1O1O1O10O01O10000O100O1000000O1000000O101O0O10000O1000O0100O100O100O2kNZYOm0of0M9FR[Y<"}}, {"image_id": 8, "category_id": 1, "bbox": [2.7839348316192627, 631.0110473632812, 270.2178649902344, 128.40936279296875], "score": 0.9999998807907104, "association_id": 0, "segmentation": {"size": [768, 813], "counts": "Vm28d0U1Xd0K^[O=]d0e1N2N2N1O1N3N1O1O1O1O10000O2O000000000000000O10000000000000000O1001O0000000000000000000000000000000000000000000000000000001O00000000001O000000001O0000000000000000000000001O0000000000000000000000O1000000001O0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000O100000000O01000O10O10O1000O10000000000O1000000000000000000000001N10000O2O0O101N1000000O101O00000O100O2O0O2O1N2N2N2M3M2O2N1O2O1N2N3K8G7\\OTZOeN4Kke0]1VZObNVf0U1eYOnNef0P17N2M4J:ERkk<"}}, {"image_id": 8, "category_id": 1, "bbox": [408.0229797363281, 294.3020324707031, 277.2447204589844, 153.92416381835938], "score": 0.9999998807907104, "association_id": 2, "segmentation": {"size": [768, 813], "counts": "bZb9`1Yf03Se09J3M2ZNKR]OIg0>Wb09b]OI]b0kb0AV]O>kb0BV]O=jb0BW]O=jb0BY]O:ib0EY]O9ib0EY]O9nc0Njjh8"}}, {"image_id": 9, "category_id": 1, "bbox": [462.40887451171875, 417.9097900390625, 140.35028076171875, 218.749267578125], "score": 1.0, "association_id": 1, "segmentation": {"size": [683, 1024], "counts": "Wej94Te06J6T]O5P`0Ni_O:T`0Gh_O>V`0Cf_Oc0V`0_Oc_On0T`0UOg_OT1S`0nNj_OV1T`0kNk_OW1S`0iNl_OY1Q`0jNl_OY1m?mNR@U1Z>kMSBR1BV1V>mMVBm0EV1S>RNSBi0JV1R>WNgAk06o0Q>?PBAo=?PBCn=?QBBn==SBDl=;UBFj=:WBFi=9WBHh=8YBHg=7YBJf=7YBJf=6ZBKe=5[BLd=5[BLe=4YBNf=4XBMh=5TBMl=_OaATN?_2o=\\OeAXN5_2V>XOfA]NM^2^>SOeAl1[>SNfAm1Z>RNgAn1Y>TNdAm1]>_23N1O1O1O0N3M3J6L6L2N2M3N1O2N1O1O1O101N1O1O2M2N2O2N2N1N2N3N100O2O0O101O1N2O1O1000O2O1O1N1000101N0001bLd_Oj1]`0QNg_On1\\`0lMh_OS2Z`0jMh_OU2Y`0iMi_OV2X`0hMj_OW2Z`0dMh_O[2^`0^Md_Oa2``0ZMa_Of2a`0TMd_Ok2]a0010O1O0101N3M2N1N3N2N2L4F;K4M4L4F;H8G8I7Ijco8"}}, {"image_id": 9, "category_id": 2, "bbox": [699.8397216796875, 523.5367431640625, 71.82586669921875, 31.78216552734375], "score": 0.9999998807907104, "association_id": 2, "segmentation": {"size": [683, 1024], "counts": "e]c>1We04N2O1N1O100N3N1O100O1O100000000O1000000O100O1O1N200NZO_[Og0`d0200O101O001O1O000000001O0000000001O001O1VOd[Oc0dd0N0O2O00000O1O2O0O10000O10001N10001N1N3NjaY5"}}, {"image_id": 9, "category_id": 1, "bbox": [761.1405639648438, 390.8343200683594, 53.4892578125, 118.74765014648438], "score": 0.9999998807907104, "association_id": 3, "segmentation": {"size": [683, 1024], "counts": "YPl?3kd0f0F2L3L3O2M2N4M4L4M5L1N5a\\OgNdb0S2L3M4L8I2N4K3N0O100N20O0N3M2M3101N3N2N1O10O2M1N3_Oc0L2N2^Ob0M3N3L4M2`N[\\OW1fc0hNe\\Oo0[c0mNj\\O>DC04Vd07l[ODO2]n^4"}}, {"image_id": 9, "category_id": 1, "bbox": [570.080810546875, 412.7220153808594, 99.27325439453125, 165.92630004882812], "score": 0.9999969005584717, "association_id": 4, "segmentation": {"size": [683, 1024], "counts": "PPZ<2We04K4M3M1N3M3M3WOi0f]OkNY`0Z1e_OPOa?_O\\_Oc1Q1RO\\?b1b@cN[?^1`@iN]?X1a@kN^?U1`@nN_?R1_@RO_?n0`@UO^?j0b@YO\\?h0a@[O^?e0a@^O]?b0a@A^?`0_@Ba?`0\\@Bc?`0X@Ch?>U@Ej?=Q@Fo?k200000000001O001N2O1O1O1N1O1N3N1N2N3M3N2M2N3M2N2O1N201N101O0O201N1O010O010O1100O00O101O1aM_^OQ1ba0jNf^OQ1_a0eNi^OX1^a0\\Ni^Ob1bb0M4L5K2N3JXY\\7"}}, {"image_id": 9, "category_id": 1, "bbox": [196.6199188232422, 461.4387512207031, 214.3416290283203, 221.56124877929688], "score": 0.9999957084655762, "association_id": 5, "segmentation": {"size": [683, 1024], "counts": "WYY41n20X?7c@OW?5f@NX?5d@N[?3b@O]?4`@M_?5]@Oa?3[@0e?1X@1g?0W@2h?0V@1j?0T@1k?0T@0l?2R@Nn?4P@Mo?5o_OKR`06m_OJR`07m_OIT`08k_OGV`09i_OHW`08i_OGX`09g_OHY`08f_OH[`08d_OH]`08a_OJ_`06a_OI``07__OJa`06__OK``04a_OM]`04b_ON]`01d_O2Y`0Mh_O6U`0Il_O;P`0Eo_O`0m?_OT@c0i?^OV@c0j?]OV@d0h?\\OX@e0f?]OY@e0e?\\OZ@e0e?[O[@f0e?ZOZ@h0d?YO\\@g0d?YO\\@g0d?YO\\@g0P>[NRBn0Mh0n=_NRBi01h0j=dNSBd03h0i=fNSBb04h0h=hNRBa06g0f=lNRB=7h0f=nNPB;:g0e=ROkA:?e0d=XObA9j0?c=Y1[BhNc=Z1\\BgNd=Y1[BhNd=Y1[BhNe=Y1YBhNf=Z1XBgNh=Z1VBgNj=\\1RBeNn=_1mAbNR>b1jA_NV>c1fA^N[>c1bA_N^>c1^A_Nb>b1\\A_Nd>T40000000O010000O1000O01O101N100O101O0O1000000000000000000000000000000000000O1000000000000000001O000000000000000000000000000000000000000000000000000001O0000000000000000000000000000001O00001O001O1O1O001O001O00001O00001O0TL[AR1f>kN^AS1c>jN`AT1b>hNaAX1`>dNdA[1^>^NhAa1Z>YNjAg1Y>SNkAl1V>PNnAo1S>oMnAQ2S>mMoAQ2T>kMnAU2S>fMRBY2W>UMRBk2X`0O0000001N101O001O1O1O1N2K6@a0FgYh<"}}, {"image_id": 9, "category_id": 2, "bbox": [780.8938598632812, 498.64935302734375, 50.25927734375, 21.42669677734375], "score": 0.9999891519546509, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "kRZ`01Ye03N0O2N1N2N3O000O100000O02O0O00101O0000000001O1O010O1O1O010O001O0000001O000000000000001N2O1O4KblP4"}}, {"image_id": 9, "category_id": 1, "bbox": [802.78955078125, 396.3833312988281, 40.998779296875, 77.63919067382812], "score": 0.990276575088501, "association_id": 6, "segmentation": {"size": [683, 1024], "counts": "\\[k`0221Re00mZO12Mkd0?_[OAUc06R]O:BBK1^c07R]Oe0nb0^Oo\\Oc0ob0n0O000OJh\\OXN[c0e1600001OO2000O02O00002N001O1O001N1O2N2O0_OQ\\OEoc0:T\\OCoc0;S\\OARd08e0M]Zh3"}}, {"image_id": 9, "category_id": 2, "bbox": [806.4117431640625, 473.82659912109375, 41.09674072265625, 13.596343994140625], "score": 0.9610949754714966, "association_id": 6, "segmentation": {"size": [683, 1024], "counts": "]gl`03Xe01N100O10000O100000O10001O0000001O0000001O01O0000001O000001O0000001N2OTXf3"}}, {"image_id": 9, "category_id": 1, "bbox": [990.2189331054688, 385.54376220703125, 27.9761962890625, 46.4759521484375], "score": 0.9259355068206787, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "gffd09Pe03M4M2K5N3N3M2N9G2N1O00010O0001O0O2N1CS\\O\\Onc0b0?M3N2N3Hmc3"}}, {"image_id": 9, "category_id": 2, "bbox": [196.62557983398438, 532.9894409179688, 187.0716552734375, 150.01055908203125], "score": 0.8656215667724609, "association_id": 5, "segmentation": {"size": [683, 1024], "counts": "hdf42Xe02O1O000O1000000000000O101O0000O100000O100001N1O101NR[R`0"}}, {"image_id": 9, "category_id": 1, "bbox": [838.8634643554688, 398.64776611328125, 21.3499755859375, 51.555267333984375], "score": 0.8496840000152588, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "fP`a0;1Fkd0`0V[OBad0f0G9I5O200O1000000O01O100M301N4L2N:B8H]o\\3"}}, {"image_id": 9, "category_id": 2, "bbox": [796.8173217773438, 481.57330322265625, 41.827392578125, 18.3017578125], "score": 0.8154546618461609, "association_id": 3, "segmentation": {"size": [683, 1024], "counts": "[Rf`04Te03O1O10000O11O00O11O001O000010O0000010O00001O01O000000001O0O10001N2Ncbm3"}}, {"image_id": 9, "category_id": 1, "bbox": [488.71417236328125, 416.6921081542969, 175.0208740234375, 178.94808959960938], "score": 0.661129355430603, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "cbV:`2c1_Nc>h1UA]Ni>e1UA\\Nk>e1TA\\Nk>d1TA]Nk>d1TA]Nl>c1SA^Nm>b1RA_Nn>a1QA`No>`1PAaNP?_1o@bNP?^1o@dNQ?[1o@fNQ?d0^@mMd0b1m>>eAD[>6jAKV>4iANW>1gA2Y>MQAfNQOd1m?Eo@P1Q?nNPAS1P?lNQAT1P?lNn@U1R?nNh@U1Y?oNY@Z1P`0l14K2O1O1O00001O000000O2O0O100O1000000001O0000001O0000001O00001O00001O1O1O1O1O1O001O1O2N1WMT_OQ1m`0kNX_OS1i`0jNZ_OU1g`0hN]_OV1f`0fN\\_OY1h`0`N\\_O_1h`0[N[_Od1h`0XNZ_Og1g`0WN[_Oh1f`0VN[_Oj1f`0TN[_Ol1h`0nM[_OR2oa001O00001O1N101O001O1O0O2N3M2J6L5L3L8^Ofn1XO^RN3L4K4L3M4G8B=M4c]OnNi?NP_OX1T1SOe?a1Y@gNa?Z1]@iNa?W1^@lNa?T1^@nNa?R1^@QO`?P1]@TOa?l0\\@YOb?g0\\@\\Oc?d0[@@c?a0[@@e?a0X@Bg?`0U@Cj?>Q@Gn?;m_OIR`0=f_OEZ`0f20000000000000O1O2N1N2N3N1O1N3B\\_OnKi`0P4;M2O2O10O01O001O1O10O01000O00100O1000O100O1O010O1O1O011M6bM]^Oh0`c0_OUd_7"}}, {"image_id": 9, "category_id": 1, "bbox": [820.7472534179688, 399.24249267578125, 38.30859375, 59.778350830078125], "score": 0.6192453503608704, "association_id": 7, "segmentation": {"size": [683, 1024], "counts": "\\PTa0o0[d03N00000DSOV\\OQ1hc0;N011N10O20OO1000000O100O2N1O0O2O1O1O10000O100O3M9FIYOj[O00e0Wd0Ah[O<[d0]Ol[Oa0dd0J4L3Lcd]3"}}, {"image_id": 9, "category_id": 2, "bbox": [814.4596557617188, 459.7062683105469, 38.32806396484375, 12.922454833984375], "score": 0.6095181703567505, "association_id": 7, "segmentation": {"size": [683, 1024], "counts": "_\\Ua03We01O10000O1000000000000000O3N1O001O01O0001O0001O000001Ojmb3"}}, {"image_id": 9, "category_id": 1, "bbox": [858.2153930664062, 396.01708984375, 23.61865234375, 36.591400146484375], "score": 0.5766560435295105, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "a[ma06Qe05L3KC[[O?]d0;IVOh[Oo0Xd02000000000O1O1O0O2N200O1N2@`[O3cd0Ka[OJK0lYP3"}}, {"image_id": 9, "category_id": 1, "bbox": [845.875244140625, 398.0525207519531, 19.22747802734375, 47.33624267578125], "score": 0.5194374322891235, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "Pfda0=3Ecd0d0K6D:O1O001001N101O1N4M2M5J6G9I6KiYZ3"}}, {"image_id": 9, "category_id": 1, "bbox": [868.013916015625, 394.116455078125, 18.33489990234375, 31.6754150390625], "score": 0.35950967669487, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "b[Sb02Ve04FMU[O8jd05E;O10O10O10O1O1O1O1N3L5Khol2"}}, {"image_id": 9, "category_id": 1, "bbox": [791.5623779296875, 392.9258117675781, 35.7650146484375, 92.16122436523438], "score": 0.31352537870407104, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "[ed`01Ve04GZi0BeVO>\\i0BdVO=]i0CcVO=]i0BcVO>^i0BbVO=_i0CaVO<`i0D`VO;`i0F_VO;ai0D`VO;ai0E^VOfi0BZVO>ei0CZVO=gi0CYVO=gi0CYVO=gi0CXVO=ii0CWVO=ii0CWVO=ii0CVVO=ki0CUVO=ki0CUVO=ki0CTVO>li0BTVO=mi0CRVO>ni0BQVO?oi0AQVO?oi0APVO`0Pj0AnUO`0Rj0@nUO`0Rj0@nUO`0Qj0AnUO?Sj0AmUO?Sj0AmUO?Sj0BlUO>Tj0`0000000000O100000O010000000O10000000O10O10000000000000000O1000000000000O10000000000000001O000000000000000000001O001O01O0001O000001O001O1O2N1O1O1O1O1O001N2N2N6I\\WT1ZOPikNUh0CkWO>Sh0DlWO_8SB`Gn=[8WBeG`2iMZ8[:ZElGj1[No8c9ZERHe1]NS9]9ZEVHa1_NW9V9[E[H\\1aN[9P9\\E^HW1cN`9k8[EaHU1eN`9h8]EcHQ1fNc9e8_EdHl0hNg9a8`EfHh0jNh9^8dEfHb0mNk9\\8fEeH>oNm9Z8hEfH9QOP:X8jEfH3TOR:U8nEgHMUOV:S8nEiHJTOY:Q8PFlHCTO]:P8RFmH]OTOb:m7SFPIXOUOd:k7UFRITOSOh:j7UFTIPOSOk:i7WFSIlNUOn:f7XFWIfNTOS;d7YFXI`NVOX;a7ZF\\Kg9c4[F[Kf9c4]F[Kd9d4_FYKb9f4`FXKa9g4bFVK_9i4dFSK^9l4dFRK]9l4fFRK[9m4fFRKZ9n4hFPKY9o4hFPKY9o4gFQKY9o4hFoJZ9o4hFoJZ9P5hFmJZ9R5gFlJZ9T5hFiJZ9V5hFfJ[9Y5gFbJ^9[5eF_J`9`5bF[Jb9d5_FXJf9f5[FVJj9h5WFUJl9i5VFTJm9k5TFRJo9m5RFQJP:n5QFoIR:P6nEoIT:P6mEnIU:Q6kEnIX:P6iEnIY:Q6hEmI[:Q6fEmI\\:R6eElI_:Q6bElIb:R6_ElIi:m5YEPJo:i5SESJU;g5mDVJY;e5iDWJ];d5fDWJ`;f5aDWJd;g5]DUJh;h5YDUJo;e5SDWJVi1iA\\NV>g1dA]N[>f1`A]N_>g1[A\\Nd>i1VAYNi>k1QAYNm>l1m@VNR?V7O1O1O100O001O001O01000O0101O00100O11N10O0101N200O6K6I4L2N1N2O0O0001O0O2O1N100O100O010O001O001O0nLYBYHh=]7dB`H\\=\\7jBbHV=\\7mBcHT=[7nBdHR=Z7QCfHoc`0f0`@oMZO\\1V`0c0PC\\OR=a0oB@Q=?oBBQ=CR?BSAE[A8b>HcA6[>JhA5V>KmA4R>LPB4m=MTB4j=KYB4e=M\\B4b=L_B4_=LcB4\\=LeB5Y=JiB6U=KkB6T=InB8o]FB_9a0bF_OZ9d0gF]OS9g0nFZOn8h0SGYOi8i0XGXOe8i0\\GYO`8h0aG[OY8g0gG]OT8d0mG^Oo7b0SH@i7a0XHAe7?[HCb7>_HC^7>cHCZ7>gHBX7=jHDT7;oHDQ7:RIFl69WIGg68\\IHb68aIG]68hIGU68PJGm58XJGe59^JF`59dJFZ59iJGU59mJFR59QKGm4WKjAZ2\\9^2i4VK[Bm1P9j2d4WKmB`1b8X3`4VKSC]1b8[3Z4VKZCZ1b8\\3S4YKaCT1c8_3k3[KhCP1d8a3b3^KRDi0c8e3Z3aKYDc0d8h3R3dKbD;c8m3j2fKiD7d8o3b2iKPE0d8U4[2jKUELe8X4T2lK[EDh8`4k1kKaE^Oj8f4d1jKfEZOl8k4^1hKkEUOn8S5V1eKQFPOP9Z5n0dKXFhNR9d5e0`Kl3`4SL[KT4c4lKYKZ4f4eKUKb4i4^KSKi4k4VKQKP5m4PKnJV5Q5jJkJ[5T5eJhJ`5X5`JcJe5\\5l=001O1N2O2M3N3L4M3L3M3N1N3N1N2N101O001O100O101O1O1000O000000O1O1O100O1O1O2O0O1O010O01O001O1O1N3M3M2N3M2N3M2N2N3N1N2N2N2N2N2N4M3L5K5K5L5J6J4L3N1N2N2N101N1O1N3N2N2N2N2N3M3M3M3M2N2N1O1O001O1O001O00100O001O001O001O2K5L5J6J6Io0\\NcRb:"}}, {"image_id": 12, "category_id": 1, "bbox": [388.39703369140625, 259.12322998046875, 348.2666015625, 235.25787353515625], "score": 1.0, "association_id": 1, "segmentation": {"size": [683, 1024], "counts": "[kW87Pe08I7I9E9B`0YOh0C9J5K5L3M4L3M3M4L4_O[LU_Oj3d`0e0F:G7L4M2N2N2O1N1O1O1O1N2N2O1N2O1O1O100O1000O0010O010O10O0100O00101O0O101O0O2O1O1O1N2O001O001O1O1O1O6J4L1O001O1O0O1000000000000O1000000O10000O100O10000O1000000O10000000000O1000000000000000000O100000000000000000000000000000000000000O1000O100000O010O010O010O010O0100O1000000000O10O1000000000000O1000000O1000000O100O100O100O100O1000000O100000000000001O0000000O101O00001O001O001O00001O00001N100000001N100O101N100O2O000O2O001O0O2O1O1O001O1N2O1O001O1O1O001O1O001O1O001O001O001O1O001O001O001O00001O000000001O00010O00001O000010O010O0100O0100O010O001O001O001OjJV@k4j?TKW@m4h?SKY@m4f?RK[@o4e?PK\\@P5c?oJ^@Q5b?nJ`@R5`?kJd@8F_4V`0[Ko_Od4]`001N2N2N3M2O2M1O1O001O001O1O1O2N2N2N1O1O1O1O1O1N2O2M2N4L5L5I4M2M4L3M2O2N2N3L4L4@j0XOZQo5"}}, {"image_id": 12, "category_id": 2, "bbox": [252.2974853515625, 437.1063537597656, 495.43536376953125, 192.98794555664062], "score": 0.9996260404586792, "association_id": 1, "segmentation": {"size": [683, 1024], "counts": "[e\\54Qe0`0T3000g^ODc=;_BG^=9dBHY=8jBGT=9mBJP=5T4O1N2O2M4M2M3MTkjb0"}}, {"image_id": 13, "category_id": 1, "bbox": [231.9683380126953, 594.8298950195312, 34.41523742675781, 74.31060791015625], "score": 0.9999991655349731, "association_id": 1, "segmentation": {"size": [683, 1024], "counts": "^\\k43We03M2N2N1N2M3K5K5A?@`0J6H8N2O1000000000000002N:F2N4L4L6J4L3lNR\\Oe0ad0I5K2N3KQnh?"}}, {"image_id": 13, "category_id": 2, "bbox": [259.8497314453125, 592.7579345703125, 764.1502685546875, 75.8817138671875], "score": 0.9999985694885254, "association_id": 2, "segmentation": {"size": [683, 1024], "counts": "QRj62Ye00O2O0O101O0O10001N100O10001N10000O2O000O10000000000O10001O00000000000O1000000000000O10000000000000000O1000000000000000000O10000000000O1000000O1000000O10000000000000000O100000000000000000000O10000O10000O100O1000000O10000000000O10000000000000000000001N10000000000000001O00000000000000O2O001N101N1O3M3L9]OV[O2loS13QelNa0C2M2N101O0O101O00000O10001O0000O1000O1000000O10000O0100000O10000000000000000O10O10000000000000000000000O10O1000000000O1000O10000000000000000000O1000000000000000O100000O10000000000000000000000000000O1000O100000000000000000000000000000000O1000000000000000000000O10O1000000000000O10O1000000000000000O100000000000000000000000000O1000000000O10O1000000000000000000O10000000000000000000000000000000000000000000000O100001O0000000000000000000000000000000000001O00000000000000000001O0000000001O000000000000000000001O0000000001O01O000000001O000001O01O0000001O01O01O001O00010O000000001OO1000001O0000000000001O0000001O0O10001O000000001O000000000000001O000000000000001O000000000O2O00000000000000010O00000000000001O0001O01O001O001O01O01O00000000001O00000000010O001O1O001O001O002N4L3N0O1O1O001O001O0010O000000000001O000000010O001O001O1O010O0000010O00000010O0000000000001O00000001O01O0000001O00001O001O001O00001O01O0000000000000000000000000000000001O000000000000000000000001O0O10001N101N101N2N3Laf0"}}, {"image_id": 13, "category_id": 2, "bbox": [460.0763244628906, 194.0535125732422, 218.37991333007812, 21.374954223632812], "score": 0.9999592304229736, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "a[R:1Ye01000001O00000O100000000000000O100000000000O100000000000O10000000000000O1000000000000000O10000000000000000000O100000000000O1000000000000000O10000000000000O1000000000000000O100000000000O100000000000000000000O010000000000000000000000000O10O1000000000000000000000000000000O1000O1000000000000000000000000O010000000000000000000000000000000000000000O10000000000000000000000000000000000O1000`mW7"}}, {"image_id": 13, "category_id": 1, "bbox": [49.527992248535156, 173.98133850097656, 974.4719848632812, 353.97705078125], "score": 0.9998970031738281, "association_id": 3, "segmentation": {"size": [683, 1024], "counts": "\\\\R1m0Xd08K4N2N2N2O1N2O1N2O0O2O1N101O00001O001O0000001O00001O0000001O0000001O0000001O000000001O000000001O000000000O2O000000001O000O101O00000O2O0000001N100000001N10000O10001O0O1000000O101O0000000O1000001O00000O10000000001O00000O100000001O00000000000O1000001O0O1000000O1000000O101N10000O100O100O1O101O0O100O1000000O2O00000O1000O010000O100O100O100O100O1O1O1O1O001O1O100O1O100O100O100O10000O1000O0100O100O100O10O0100O10000O100O10000O01000O10000O10000O1000000O10000O1000000O1000000O1000000O1000000000000O1000000000000O1000000000000000000000000000000000000000000000000000000000000000000000000000000000001O000000001O0000001O00001O001O0O101O001O001O001O00001O00001O0000001O0000001O0000001O001O00001O001O001O1O1O2N1O1O1O2N1O1O1O1O1O1O1O1O001O1O001O00001O001O00001O00001O001O00001Oi0WO1O001O001O001O001O001O001O001O01O00000000000000000O10000oN^AYKb>g4`AWK`>h4bAWK^>h4eAVK[>i4hAUKX>j4jAUKV>j4mATKS>k4oATKQ>k4QBSKP>k4SBTKm=k4UBTKl=j4UBVKk=h4XBWKh=g4ZBYKf=d4^B[Kb=c4`B]K`=a4cB^K]=`4eB`K[=_4fBaKZ=_4gB`KY=_4hB`KY=`4gB`KY=`4gB`KY=_4iB`KW=`4iB`KW=`4jB^KW=a4jB_KV=a4jB_KV=a4kB]KV=b4kB^KU=b4lB\\KU=d4kB\\KU=c4mB[KT=e4lB[KT=d4j10000O100O100O100O100O2O0O1O100O10000O100O10000O10O0100O100O100O1O100O1O1O1O100O1O10O0100O100O10000O10000O10000O1000000O1000000O1000000O100O100O10000O100O100O10000O100O10000O10000O10000O10000O100O100O10000O100O1000000O1000000O100000000O101O0000000O10000000000000000000000000000000000000000000000000001O0000000000000000000000000O1000000000O1000000000O10000000000000000O100000O10000000O10000000000O100000000O100000000O1000000O1000000O10000000000O100000000O1000000000000O1000O10000000O1000000000000O100000000000000O1000000000O10O10000000000000O100000000O100000O010000O10000O100O10000O10000O1000O10O10000000000O2O000000000000001O0O100000000000001O000O10000000000000001N10000000000O1000000O10000O100O100O1O1O1O100O1O1O1O1O100O1O1O100O1O100O100O1000O0100O100O010O100\\OWLe_Oi3Y`0\\Ld_Oe3Z`0_Lc_Ob3Z`0cLc_O]3[`0hLc_OX3\\`0kL`_OW3_`0j001O000001O0000000000001O001O00100O010O100O100O10O0100O1O1O1O100O1O1K5I7L4K4N3M3N2O1N2O1N2O1O1O1O1O1O100O1O100O1O1O1O100O1O2M2N2M3L4K5K6\\OR]OcNTc0\\1>N2O1O1O2O0O1O1O2N1O101N1O100O2O0O`BPOoI3l;m0UJQOmI5KL^;l0jJUOkI6IKb;j0jJUOkI6IKb;i0kJVOjI6JJa;j0kJVOkI5LH_;l0jJWOlI3m;e0YJVOlI2m;h0WJVOe6i0\\IWOVJ0Z;h0`JXOUJ2Z;e0bJXOUJ3Y;e0bJXOTJ5Z;a0dJYORJ6Z;a0dJYORJ6[;?fKAZ4?fKAZ4>gKBZ4n5ZAUJf>l5WAWJh>j5VAWJi>j5UAYJj>T601O0001O01O000000001O0000001O01O0001O0000001O000010O000000000O1000000O1000000O1000001N1000000O1@UA`Jk>\\5ZAcJf>X5`AgJ`>V5dAhJ]>T5gAlJY>Q5kAnJV>n4nAPKS>m4PBSKP>k4SBSKo=l4RBSKn=l4SBTKm=l4TBRKm=m4Z1O000O10001N10000O10001O0O10000O10000O10000O10001N1O1O1O1O1O1O1O1O1O1O100O100O10000O1000000O1000000O10000O10000O10000O100O100O100O10000O10000O100O100O1O100O1O1O100O0010000O100O10000O10000O1000000O101O000O10000O100O10000O1000000O1000001N100000000O10000000000O10000000000O10000000000O10000000000000000O100000001O0000000000000000001O0000000000000000000000000000000000O100000000000000000000000000000000O10O10000000000O100000000O10000000000O1000O1001N100O2N101N1O2N1N4M3L5J?ROVT]6"}}, {"image_id": 13, "category_id": 1, "bbox": [57.652156829833984, 341.3053894042969, 966.3478393554688, 250.57083129882812], "score": 0.08655548840761185, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "WRW1:ed0k0]O5L4M3N101N2N101N2O0O2O0O101O000O2O0000001O000O10001O00000O101O000000001N10000000001O0O100000001O000000000O2O0000000000001O0000000000001O00000000000000001N10000000000000000000001O00000000000000000O1000001O0000000000000000000000001O000O10000000000O1000000O10000O1O2O0O1O100O100O100O100O100O10000O2O0000000O100000000000000O10000000O10000000000000O10000000000000000000000000000000000000O1000000000000000O100000O1000000000000000000000000000000O10000000000000000000000001O00000000000000000000000000000000000000000000000000000000000000000000001O0000000000000000000000001O0000000000000000001O0000001O0000001O00001O0000001O000000001O000000001O00000000001O00000000001O0000001O0000001O002N1O2N1O2N1O2N1O2N1eAULT;m3cD[L\\;f3`D]L`;g3XBkKc1b0TYm;BRD?n;@SD`0m;_OTDa0l;_OTDa0l;^OUDb0k;^OUDb0k;]OUDd0k;[OVDe0j;[OVDe0j;ZOWDf0i;ZOWDf0i;YOXDg0h;XOYDh0g;XOXDj0g;UOZDk0f;UOZDk0f;TO[Dl0e;TO[Dl0e;TO[Dl0e;SO\\Dm0d;SO[Dn0e;RO[Dn0e;QO\\Do0d;QO\\Do0d;PO]DP1c;PO\\DQ1d;nN]DR1c;nN]DR1c;mN]DT1c;lN]DT1c;lN\\DU1d;kN\\DU1d;jN\\DW1d;iN\\DW1d;iN\\DW1d;hN\\DY1d;gN\\DY1d;gN[DZ1e;fN[DZ1e;fNZD[1f;dN[D\\1e;dN[D\\1e;dNZD]1f;cNZD]1f;cNZD]1f;cNYD^1g;aNZD_1f;aNYD`1g;`NYD`1g;`NYD`1h;_NXDa1h;_NWDb1i;^NWDb1i;]NXDc1h;]NXDc1h;]NXDc1h;]NXDc1h;]NXDc1h;]NWDd1i;\\NWDd1i;\\NWDd1i;[NXDe1h;[NXDe1h;[NXDe1h;[NXDe1h;[NXDe1h;[NXDe1h;[NXDe1h;ZNYDf1g;ZNXDg1h;YNXDg1h;YNXDg1h;YNXDg1h;XNYDh1g;XNYDh1h;WNXDi1h;WNXDi1h;VNYDj1g;VNYDj1g;VNYDj1g;UNZDk1f;UNZDk1f;UNYDl1g;TNYDl1g;SNZDm1f;SNZDm1f;SNZDn1e;RN[Dn1e;QN\\Do1d;QN\\Do1d;QN\\Do1d;QN\\Do1d;QN\\Do1d;QN\\Do1d;QN\\Do1d;QN\\Do1d;QN\\Dn1e;RN[Dn1e;QN\\Do1d;QN\\Do1d;QN[DP2e;PN[DP2e;PN[DP2e;PN[DP2e;PN[DP2e;PN[DP2e;PN[DP2e;PN[DP2e;PN[DP2e;oM\\DQ2d;oM\\DQ2d;oM\\DQ2d;oM\\DQ2d;oM\\DQ2d;oM\\DQ2d;oM\\DQ2d;oM\\DQ2d;oM\\DQ2d;oM[DR2e;mM\\DS2d;mM\\DS2d;mM\\DS2d;mM\\DS2d;mM\\DS2d;mM\\DS2d;mM\\DS2d;lM]DT2c;lM]DT2c;lM]DT2c;lM]DT2c;lM]DT2c;kM^DU2c;jM\\DW2d;iM\\DW2d;iM\\DW2d;hM]DX2c;hM]DX2c;hM]DX2c;hM]DX2c;gM^DY2b;gM^DY2b;gM^DY2b;gM^DY2c;eM]D\\2c;dM]D\\2c;dM]D\\2c;dM]D\\2c;cM^D]2b;cM^D]2b;cM^D]2b;cM^D]2c;aM]D`2c;`M]D`2c;`M]D`2c;`M]D`2c;`M]D`2c;_M^Da2c;^M\\Dc2c;^M]Db2c;]M^Dc2b;]M^Dc2b;]M^Dc2b;\\M_Dd2a;\\M_Dd2a;\\M_Dd2`;\\MaDd2_;\\MaDd2_;\\MaDd2_;[MbDe2^;[MbDe2^;[MbDe2^;ZMcDf2];ZMcDf2];ZMbDg2^;XMcDh2];XMcDh2\\;YMdDg2\\;XMeDh2[;XMeDh2[;XMeDh2[;XMeDh2[;WMfDi2Z;WMfDi2Z;WMfDi2Z;WMfDi2Z;VMgDj2Y;VMgDj2Y;VMgDj2Y;VMgDj2Y;VMgDj2Y;UMhDk2W;VMiDj2W;VMiDj2W;VMiDj2W;VMiDj2X;UMhDk2X;TMiDl2W;TMiDl2W;TMiDl2W;TMiDl2W;TMiDl2W;TMjDk2V;UMjDk2V;UMjDk2V;TMkDl2U;TMkDl2U;TMkDl2U;TMkDl2U;TMkDl2U;TMkDl2U;TMlDk2T;TMmDl2S;TMmDl2S;TMmDm2R;SMnDm2R;SMnDm2R;SMnDm2R;SMoDl2Q;SMPEm2P;SMPEm2P;SMPEm2P;SMPEm2P;SMPEm2P;SMPEm2P;SMPEm2P;SMPEm2P;RMQEn2o:RMQEn2o:RMQEn2o:RMQEn2o:SMPEm2P;SMPEm2P;SMPEm2P;SMPEm2P;SMPEm2P;SMPEm2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMPEm2P;SMPEm2P;SMPEm2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMQEl2o:TMPEm2P;SMPEm2P;SMPEm2P;SMPEm2P;SMPEm2P;SMPEm2P;SMPEm2P;SMPEm2P;SMPEm2P;SMPEm2P;SMPEm2P;SMPEm2P;SMPEm2P;SMPEm2P;SMoDn2R;QMnDo2R;QMnDo2R;QMnDo2R;QMnDo2R;QMnDo2R;QMnDo2R;QMnDo2R;QMnDo2R;QMnDo2R;QMmDP3S;PMmDP3T;oLlDQ3T;oLlDQ3T;nLmDR3S;nLmDR3S;nLmDR3S;nLmDR3S;nLmDR3S;nLmDR3T;mLlDS3T;mLlDS3T;mLkDT3U;kLlDU3T;kLlDU3T;kLlDU3U;iLlDW3T;iLlDW3W;eLjD[3Y;_LjDa3Y;[LhDe3Y;YLhDg3Y;WLhDi3Y;VLgDj3Y;ULhDk3Y;SLgDn3Z;PLgDP4Z;nKgDR4Z;mKfDS4[;kKfDU4X>00000O1000000000000O100000000O1000000O10000O1000000O100000000000000O1000000000000000000O10000000000000000O10000000000000000O1000000000000000000000000000000000000000000000000000O100000000000000000000000001O0000000000000000000000000000000000001O000000000000000000001N10001O000O2O001N102N2M3K5K7H:D_A"}}, {"image_id": 13, "category_id": 2, "bbox": [200.16744995117188, 348.2013244628906, 823.83251953125, 309.4660339355469], "score": 0.05480420961976051, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "^a`56Qe04M3O2N100O1O2N1O1O1O1O2N100O100O2O000O100O2O00000O101O000O10001O0O1000001O000000001O0000000010O000001O00001O000010O0001O00001O001O01O01O001O001N101O1O001O00001O00001O00001O0000001O0000001O000000001O01O0000001O00001O00010O001O001O1O1O1O010O1O001O001O010O0O2O001N101O1N101N2O1N101N2O1N2O1N2N2O2L4L3M4M2M3Mnog10SPXN4M1N3M2O1N2O1O0O10O10000000O010000000O1000O10O10000O10000O10000O0100000O11O0O100O101N101N2O1N2O1N3M3MeUj0:QjUO1O1O1O2M2O1O100O1O100O10000000000O1000000000000000000000000O100000001O00000O2O000000001O0O10000000001O000O100000000000001O0O100000000000000000000000000000000000000O1000000000000000000000000O1000000O1000000O10000O10000O10000O100000000O10000000O011O0000000000000000000000000000000000000O101O0000000000000000000000000000010O000000000000000000000010O0000000000000001O0001O0001O0001O0000010O0000001O01O01O00001O00001O01O01O0000001O00000000001O00000000001O00000000001O000000001O000000001O000O101O0000001O000000001O0000000000001O00000O1000000000001O0001O00000000000000000001O0001O0000000000000000000000001O0000001O0000001O00001O001O001O001O001O001O001O001O00001O0000001O0000001O00001O00001O00001O001O00001O001O00001O00001O000O101O00001O000O2O00001O001O0O101O001O1N101N101N100O2O0O2O000O10001N10001N100O2O000O2O0O10Y\\a0"}}, {"image_id": 14, "category_id": 1, "bbox": [626.38232421875, 380.74615478515625, 65.54296875, 172.29931640625], "score": 1.0, "association_id": 2, "segmentation": {"size": [864, 1152], "counts": "\\jd`0`0]j0=C7J5K6K5I6J6K5gXOlM^e0Z2VZORNde0X2mYOQNPf0S2gYOTNWf0\\3M3L6J4I6L5M2N2000O100O1N200001O1O2N4L2N10O1O2N2N4L3M3M3M2N2gMZZOTOge0i0aZOQO`e0l0jZOkNYe0Q1a[OUNcd0g1]2N2M3K7I5L5L4L7I5L8H]RW<"}}, {"image_id": 14, "category_id": 1, "bbox": [216.3568572998047, 388.98138427734375, 87.37037658691406, 190.781005859375], "score": 0.9999998807907104, "association_id": 3, "segmentation": {"size": [864, 1152], "counts": "mWi56fj05L4M2N3M2N1M3L4O1M4M2M3N2O1N3M3M4N2N2N2O2N2N3L3M3K6L3N2N3L3M4Kj0VO7H5D=K7HCfYOH]OCQg0b0fYOGA^Omf0g0iYOAWg0;l1In[g`0"}}, {"image_id": 14, "category_id": 2, "bbox": [0.0, 553.4743041992188, 251.43006896972656, 153.20745849609375], "score": 0.9888629913330078, "association_id": 0, "segmentation": {"size": [864, 1152], "counts": "f`1:dj03N2N100O1O1O1O100O100O100O1O100O1O101O0O10000O100O1O1O100O10000O1O1O1O100O100O100O001O1O100O10000O1O010O001O01O010O10O001O00010O0100O010O010O00010O00100O001O1N101O10O01O01O01O1O010O10O01O000O1O100010O010O1O0010O000O2O0O110O01N100O2O01O010O1O00001OO11O0010O10O01O0001O0010O0100O100O1O00100O10O10O01O01O00001O010O010OO100O2O001O010O10O00O10001O010O010O010O01O10O0100O10O10O10O00010O010O01000O010O01O010O01O1O001O1O001O1O0010OO10O00011O00100O1O10ON3N2N2O100O1O100O1O100O1O100O1O1O2N1O1N2O2M2O3LdVjg0"}}, {"image_id": 14, "category_id": 2, "bbox": [699.7420043945312, 451.7844543457031, 35.23779296875, 38.684814453125], "score": 0.9856033325195312, "association_id": 0, "segmentation": {"size": [864, 1152], "counts": "Wn_b01oj01O0O100UO0i04jUOJ]i08`VOK_i06_VOK`i06^VOLbi04^VOLai05_VOKai04`VOLai03`VOL`i04`VOL`i04`VOLai03^VONbi02]VOOdi0O]VO1ci00]VO0bi0N`VO2`i0N`VO2ai0M`VO2`i0N`VO2_i0NeVOO\\i0OeVO1[i00eVON]i02k0NO0bhR;"}}, {"image_id": 14, "category_id": 2, "bbox": [187.34548950195312, 542.8983154296875, 73.44424438476562, 45.33209228515625], "score": 0.8969330787658691, "association_id": 3, "segmentation": {"size": [864, 1152], "counts": "XgQ52mj02N2O0000000000000ENhUO2Vj00jUO0Uj02jUONVj03hUONWj03jUOLUj05kUOKTj06lUOJSj07mUOISj07lUOJSj06oUOIPj08PVOHoi09QVOGni0:RVOFmi0;SVOEmi0;SVOEli0=SVOCmi0=SVOCli0>SVOBmi0?QVOBPj0>oUOARj0f00100N10010O1O10O0100O010O0001O1O001O1O001N2N2O1N2O100O10000O100N2MTZdg0"}}, {"image_id": 14, "category_id": 1, "bbox": [695.1948852539062, 84.19700622558594, 48.553466796875, 456.41851806640625], "score": 0.4355030953884125, "association_id": 0, "segmentation": {"size": [864, 1152], "counts": "Ukib0V1Vi0g1XJVM[@e4_>SLm_O]5;lIbi:M3N2O0O00N3jMmA\\GT>Y8eBYG[=:eAY6f1QIi<4YBa5U2QJQ>[3]DYL\\<_1fXS;"}}, {"image_id": 14, "category_id": 2, "bbox": [701.9727172851562, 470.3985595703125, 33.2802734375, 19.128875732421875], "score": 0.40858832001686096, "association_id": 0, "segmentation": {"size": [864, 1152], "counts": "Udab03mj0000O1O001O1000000000000000000O20O0000001O001O1O1O002NigR;"}}, {"image_id": 14, "category_id": 2, "bbox": [600.4208374023438, 454.10467529296875, 26.146240234375, 16.56671142578125], "score": 0.10324299335479736, "association_id": 0, "segmentation": {"size": [864, 1152], "counts": "PP\\n0"}}, {"image_id": 15, "category_id": 2, "bbox": [83.17974090576172, 304.0821533203125, 442.139404296875, 121.77130126953125], "score": 1.0, "association_id": 2, "segmentation": {"size": [426, 640], "counts": "UTR22m;O\\E2c:OZE5d:MYE5g:KXE6h:JWE7i:IWE8h:HXE8h:HWE9i:HVE8X9DYG5_O7W9FYG3@8U9F[G2@8U9F[G2@8T9G\\G1@8S9I[G1@7U9H[G1@6U9KZGOA6T9L[GNA6T9MZGNA5T9NZGNB4S90ZGLC4S90ZGLC4S90ZGMB3T90ZGMB3S91[GLA4T91ZGKB4T91ZGKB4T91ZGKB4T91ZGKB4T91ZGLA3U91ZGLA3U92YGKB3U92YGKB3U92YGKB3U92XGLC2U92XGLC2U92XGLC2U93WGKD2U93WGKC3V92WGKC3V93VGKC2W93VGKC2W93VGKC2W93VGKC2W94UGJD2W94VGIC3W94VGIC3W95UGIC2X95UGIC2X96TGHC3Y95TGHC3Z95RGIC2[95SGHB3[96RGGC3[96RGHB2\\97QGGC2\\97RGFB3\\98QGEC3\\98QGFB2]98QGFB2]99PGEC2]99oFFD1]99oFFC2^99nFFC1_9:mFED1_9:lFFE0_9;kFFENa9=iFEFNa9?gFDGMb9a0TFPO;b0OMb9i0TFiN1b08Mc9i0QFkN3`08Ld9P1TFTO8Ld9Q1SFSO9Ld9Q1SFSO9Ld9R1QFTO9Kf9Q1QFTO9Jg9k1XFVNh9j1WFWNh9k1VFUNk9k1TFVNl9d20O1000000O10000000000O1000000O1000O010000000000O101O0000000000000000000000001O000001O01O000010O00010O0000010O000001O00000010O000001O0000000010O000000001O00001O000000010O00000000000010O0001O001O00001O0001O01O000000001O001O00001O0000001O00000001O01O000010O0010O000001O01O000001O0000001O001O00001O0000001O0000001O00001O001O00001O000000001O0000001O001O1O1O1O001O001O0000001O001O001O2N2N1O1O1O1O001O00001O0000001N10001O00001O00001O00001O0000100O007I3M4L00001O0000001O00001O00002N2N2N001O0000001O000O101O00001O1O2N1O1O1O001N2O001O001N2O0ZOdC=^<@hCH4L3M6K4L3N2N3M3M2N2N3M8H2N2N3M\\4FaK<]4FbKbKC[4c0aK]O]4h0_KZO_4h0`KWO`4l0]KSOd4Q1XKlNj4Z1PKcNR5b1jJ]NX5e1eJ[N\\5i1aJVN`5m1\\JRNe5T2UJkMm5Y2nIfMS62lHl0n0ROV6`2gI`MX6f2_I_M^6h4N2O012N2M=D=C7H4L5K4L3L3N2O0O100O10000000000O1O1N2M3M3N2M2L4J50M3M5M3K5A?I7I7I7D"}}, {"image_id": 15, "category_id": 2, "bbox": [156.1410675048828, 278.6421203613281, 339.8519287109375, 19.5286865234375], "score": 0.27020686864852905, "association_id": 0, "segmentation": {"size": [426, 640], "counts": "Z]\\21Y=1N10000000000O2O0000000000000000000O100000000000O1000000000000000000000000000O100000000000000000000000000001O0000000O100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000O10000000000000000O2O000000000000O00100000000O1000000000000000000000O10000000O10000000000000000000000000000O1000000000000000000000O10000000O100000000000O1000000O010000000O10000000000000000O100000000000]WU3"}}, {"image_id": 16, "category_id": 1, "bbox": [322.69256591796875, 599.4840698242188, 117.63412475585938, 72.31842041015625], "score": 1.0, "association_id": 1, "segmentation": {"size": [683, 1024], "counts": "g[i61Ye06I7K2M2O3L10O02O1O0008KM0O1O1O000000000O2O0N200O10010O0100O01O100O1O2JVc]7"}}, {"image_id": 16, "category_id": 2, "bbox": [871.6537475585938, 467.3328552246094, 61.44122314453125, 10.3782958984375], "score": 0.5428647994995117, "association_id": 2, "segmentation": {"size": [683, 1024], "counts": "kgVb02Xe02O0O1000000O100000000000000O0100000000000000O1000000O100000000000000O10000000000001O000000000000000000O101O00O11O00oll1"}}, {"image_id": 16, "category_id": 2, "bbox": [532.7743530273438, 535.6106567382812, 76.18731689453125, 11.97052001953125], "score": 0.05922269448637962, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "m[U;2Ye00000000O2O0000000000000000O0100000000000000O10000000000000000O10000000000000O100000O1000O100000000O10001O00000O02O000O100000O10O10000001N1O10ace8"}}, {"image_id": 17, "category_id": 1, "bbox": [76.98246002197266, 521.7070922851562, 81.90959930419922, 135.1629638671875], "score": 1.0, "association_id": 1, "segmentation": {"size": [1228, 819], "counts": "oaP31VV17K5jM;]mNJ]R1=^mNG^R1=\\mNH`R1>XmNIfR1:VmNHhR1?olNDPS1l100O1N2O1OO1N2O0101O1O10FmlN[MUS1P3N5K1O00000000000000O1M31O1O0000001O1O001O001O001O2N1O2N3M3M3M5K2N001O0000000001O1O2N1O2M6lNhmNjMZR1m0`mNcNO?d0KnQ1n0YoNnNQQ1e0a2I5LbTnh0"}}, {"image_id": 17, "category_id": 1, "bbox": [288.3409423828125, 531.3508911132812, 261.3314208984375, 618.2094116210938], "score": 1.0, "association_id": 2, "segmentation": {"size": [1228, 819], "counts": "kZ];=]U1T1ROh0XNh1_O:H6K5K4M3L4L5K6Hj0VO`0B:_VOaIcb0e6U]OiI_b0\\6Z]OkIab0Y6Z]OkIdb0Y6U]OlIhb0Y6P]OlImb0[6i\\OlISc0l6n[O_Imc0bZ]OV@Xc0f?i1L4L4M2N3N3N1O1O1N2O1O1O1O1O1O1N2M3K5I7bNkXO^C[g0Yn]Oo@Sb0m>X^Ol@ha0o>e^Og@^a0R?R_Ob@Qa0W?b_OY@b`0]?\\3D@?E:J6K4M3L4L5K4L4L3L4K5M3M2O2M2O1N2O1N2N2N2N2M3M3L4K5J6I7J6K6K4M3M3N2N2M3N2N2N2N2N2N2N2N2O1N2O1O2N100O2O2N1O2N2M4M2N2N1N2O1O001N2O001N101N2N3L4K7H8I6J6J5K4M4K5K6I9Go0POh0XO>_O?CA5L3M2N3M3M3L4omNjNfn0Z1VQOkNdn0Y1YQOjNdn0Y1YQOjNen0X1XQOjNfn0Z1WQOgNhn0[1WQOdNhn0_1VQObNhn0a1VQO_Nhn0f1TQO\\Njn0h1SQOYNln0i1QQOXNon0j1mPOYNRo0i1jPOZNUo0f1jPO[NUo0f1iPO[NXo0e1gPO[NYo0f1gPOWNZo0k1fPOUNXo0m1hPOSNVo0o1iPORNVo0o1jPORNUo0o1iPORNWo0P2fPOQNYo0Q2dPOPN]o0R2_POPN`o0S2]POlMco0X2ZPOgMho0b2noN^MRP1o2aoNRM_P1T3ZoNnLeP1V3WoNjLhP1X3XoNgLgP1Z3[oNcLdP1`3\\oN^LdP1d3]oNWLeP1k3[oNQLgP1P4[oNmKfP1T4[oNjKeP1W4[oNhKeP1Y4^oNbKcP1^4e0001O001N2N2O001N001O0N2O2O011N10001N2N2M2O2O1O1O1O001N1O2N1O2O001O0001N101N100001O00001O0O1000O2M2O101O1O1O001O1O1O1O1O0O2O1N101O1O001O00010O0O1O1O2N1O101O001O1O1N1O2N2N2O001O1O1O1O1O1O1N2N2N2O1O100O10000O100O101N1O2M2N3M3M2O2M3O1N2N1N2N3J5H8K6N1N2O2N1O1N3M2M3N3M2O1O2M2O2M2L5L4L3N3M4M4K7E\\di3"}}, {"image_id": 17, "category_id": 1, "bbox": [505.54498291015625, 1095.3980712890625, 77.58868408203125, 55.045654296875], "score": 0.9999157190322876, "association_id": 0, "segmentation": {"size": [1228, 819], "counts": "ilob02UV18^ONajN7\\U1?N0O101L3I7N3N10M3N2M3N2O1O1N4Le]V1NnaiNj0D:G7I5M2M2O2M3N1N2O00N3J5J7M2N2N3N000O1N2O1N2OnLcNYQO[1fn0jNWQOV1jn0iNVQOW1jn0iNWQOU1jn0kNVQOU1jn0kNVQOT1jn0lNWQOS1in0oNVQOP1in0ROWQOn0hn0TOWQOk0in0VOWQOj0hn0XOVQOh0in0[OVQOb0mn0^OSQO`0on0APQO>Qo0CnPOSP1@loN`0VP1_OioNb0YP1\\OgoNd0ZP1ZOfoNg0[P1XOeoNg0]P1WOdoNh0^P1WOaoNi0aP1VO_oNj0cP1UO[oNl0fP1SOZoNm0hP1POYoNP1PS110O1O1O1O10001O0O2N10000000001OO10O0O11000001O00O10O010O1000O0000O110001O3M3L4J6K4M3N2N]QT:"}}, {"image_id": 17, "category_id": 1, "bbox": [279.42279052734375, 405.1211242675781, 46.01055908203125, 46.432952880859375], "score": 0.755341649055481, "association_id": 0, "segmentation": {"size": [1228, 819], "counts": "QV`:bQOD]n0>`QOC`n0?^QOAbn0b0ZQO^Ogn0d0VQO[Oln0g0RQOYOnn0i0PQOVOQo0l0lPOVOSo0k0lPOUOSo0n0jPOROWo0P1fPOPOYo0S1ePOmN[o0V1`POlN`o0W1[POlNdo0W1XPOkNgo0W1WPOjNjo0V1UPOjNko0W1UPOhNlo0X1TPOgNlo0Z1SPOeNoo0[1QPOdNPP1\\1ooNcNdo0l1\\PORNeo0P2YPOPNgo0Q2XPOoMho0S2WPOkMjo0V2UPOjMko0W2WoNQM>h0[P1i2coNUM^P1l2coNQM^P1P3coNlL^P1V3doNdL^P1^3doN\\L_P1d3T11O101N101O0O101O00O100O10O010000O10000O10000O1N2O1N2O1O100O1O100O1O1N2O1O1O1O2O0O1O100O2N1O1O1N3M2O1N101O1O1O0O2O2M2M3N3M2M4M3M1N3M3L4M3M3O1N3N2N7H7H6H9H9AllY6"}}, {"image_id": 17, "category_id": 1, "bbox": [335.8236083984375, 355.60675048828125, 66.24935913085938, 48.341522216796875], "score": 0.06159375235438347, "association_id": 0, "segmentation": {"size": [1228, 819], "counts": "afe<`0dU1M1O1O1O1O00O10000O100O10O01WOkjN;UU1DmjN:TU1EmjN:SU1FojN9PU1FRkN9nT1GSkN9lT1HTkN7mT1IRkN8mT1ISkN6lT1LSkN5lT1MSkN3mT1MRkN3nT1NRkN2mT1OSkN1mT1OSkN0mT11SkNOkT14SkNMjT16VkNJiT18UkNIjT18VkNHjT18VkNHhT1:XkNEhT1WkNBhT1`0XkN_OiT1b0VkN]OjT1e0UkN[OkT1R11O101N102M3M101O1O1O1O00000O10000O0100000O1000O00O1000010O010O2NmaVf0"}}, {"image_id": 18, "category_id": 2, "bbox": [158.9151611328125, 415.5577087402344, 144.55035400390625, 32.364349365234375], "score": 1.0, "association_id": 3, "segmentation": {"size": [572, 1024], "counts": "SUm21ia0200O1O2N100O01000O10000O1O01000O1O100O101O0O100O10000O10000O100O100O1000000O1000O10O100000O1000O10O100000O1000O1000O1000O10000000O010000O10000O1000000O100O1000O10O100000000O10000000O100000O10000000O10O1000000000000O100000000O10000000000O100000000O1000000O101O001N[bd<"}}, {"image_id": 18, "category_id": 2, "bbox": [490.024658203125, 409.0556335449219, 113.41961669921875, 49.493194580078125], "score": 1.0, "association_id": 2, "segmentation": {"size": [572, 1024], "counts": "hfb84ga0101N10000O1O100O100O100O100N200O10O01O00100OO10010O000000010O0010O0L4M301O1O0N3N20O10O10O10O10O10000O010O100O1N3N00100O1O1000O0100O100000000O100000000000000000000O10000000000O1000000000000O10000O1000001N10001O000O101O0O2O_hZ7"}}, {"image_id": 18, "category_id": 1, "bbox": [72.99341583251953, 80.85392761230469, 136.82611083984375, 369.44097900390625], "score": 1.0, "association_id": 3, "segmentation": {"size": [572, 1024], "counts": "_S_18aa0:F6G8J5L5K4M2M3M4M2N2M3K4M4N2N1O2O1O1O001000000O100nAhM`lH^6U7U21N2N4L6JkMjFQLi8l3^GVL\\8h3hGYLV8d3oG]Lm7_3ZHcLb7W3dHkLZ7Q3kHoLS7o2PIPMP7m2UIQMk6k2]IQMb6n2cIoL]6n2hIPMY6m2jIRMX6g2nIWMU6V2]JiMe5T1]KjNf4Q1^KnNb4P1cKmN^4Q1eKlN\\4S1gKkNY4T1jKjNW4T1kKjNV4U1lKiNV4S1PLgNS4W1VLZNS4c1T6O3N3M3M2M2O2M3M5K4L3M4Hc0YOc`V>"}}, {"image_id": 18, "category_id": 2, "bbox": [693.6517944335938, 408.8168640136719, 99.64990234375, 52.2750244140625], "score": 0.9999998807907104, "association_id": 4, "segmentation": {"size": [572, 1024], "counts": "UVU<1ia03N2O0O1O10000O01000000O1O100O1M`^OOda01N2N3N1N101O1O1N2O1N2N2N2O4K101O1N2O001O1O0100O10O03N5J2O004L2O0O001O000O1O100O100O1O001O00001OhNLh@4W?0g@OY?2f@NY?5e@K[?8c@G]?:c@E]?;c@D^?G8I6J7J5M3M3M2N3M2N2N2O1N2N2N101N2O1N2N1O2O1N3M2N2N2N1O2M3N1O2N1O2N1O2N1O2O0O2N1O2N1O2N100O2O0O101N100O2O0O101O0O2O0O2O0O2O0O2N2O1N2N101N2N2N2N2N1O2O1N2N2N101N2O0O2O1N2O0O2O001N101N101O000O2O0O10001N100O101N1O100O1O2O0O1O1O100O2O0O100O100O2O000O10000O10001O000O101O0000001O0O2O00001O0O2O001O1O001N2O1O001O1N101O001N101O000O2O00000O2O000O100O101N100O100O100O2O0O10000O10001N10000O101O000O10001O0O1000001O0O10001O0O2O00001N101O0O2O0O2O001N1O101N100O1O2O0O101N100O10001N100O10001O0O100000000O100000000000000000000O10000000001O000000000O1000000000000000000O10000000000O10000O100O10000O100O1O100O1O100O100O100O100O10000O10000O10000O1000000O10000000000000000000000000000000000000000000000000000O1000000000000000000000000000000O100000000000000O10000000000O10000000000O100000000O1000000O100000000O1000000O1000001O0O1000000O101O00000O10001O000O1000001O000O10001O0000001O0O101O001O001O1N101O1O1O2N1O1O1N3N1O2N2N2N2N1O1N3N1O1O1O1O1O001O1N2O001O001O001O001O001O1O1O1O1O1O1O1O2N1O2N1O2N2N2N1O1N2O2N1O001O1O1O1O001O001O1O001O00001O001O001N101O1O001O001N101O001O001N10001O001N10001O000O2O00001N10001O0O101O00001O001O001O001O001O001O1O001O00001O001O00001O00001O0000001O0O10001O000000001N10000O101O000O101O00000O2O00001O0O101O001O001N101O001O001O0O101O001O0000001O000000001O00000000001O0000000000001O0000000000001O000000000000001O00000000001O000O10001O00001O0000001O00001O001O00001O001O001O001O00001O001O000000001O00000000000000000000000000000000000000000000001O00000000000000000000000000000000000000001O000000000000000000000000000000001O00000000000000000000000000000000000000000000000001O0000000000000000000000000000000000001O00000000000000001O00000000001O0000001O0000001O0000001O00001O001O00001O001O001O00001O001O00001O001O001O001O001O001O001O001O1O0O2O1O001Oc0]O4L4L3M3M3M2N1fCk^O`:Wa0]En^O_:Sa0^ER_O_:o`0_EV_O]:k`0`EZ_O]:g`0aE\\_O]:e`0aE^_O]:d`0_E`_O_:a`0_Eb_O_:_`0^Ef_O_:[`0^Ei_O`:Y`0ZEm_Od:T`0REX@k:Tb0N2N1O2N2N2N3M2N3M7I7I;EAd0ZO[1hN;J5J4M4mLWL\\_Ok3``0ZL]_Oj3[`0^L`_Of3X`0eLa_Oa3Y`0hL^_O_3[`0lLY_O]3``0hLZ_O_3``0dL]_O`3_`0cL^_O`3_`0bL__Oa3_`0`L__Oc3^`0`L__Oc3_`0^L^_Og3^`0]L]_Oh3``0^LT_Ob5Q?gJ_@f5\\?h2L4L3M2N2N2N1O2N1O2O0O2O0000000O1000O10000000O01O1O1O001O1O10O001O001O0O101O0010O001O1O1N2O001O1O1O100O1000O10O1000000O10000000000000000O10O2O00001O0000001O001N2O1O1O1O2N1O2M2O001O1O001O1O1O001O1O00000O2O0000000O1000O10000O10000O10O11O1N101N10001N101O0O1O1O1N2N2N3M2O1O1O1O1O1O1N2N2N2N2O1O1O2N1O1O1N2N2N2O1N2O1O1O1N2M3M4M2M3O1N2O1O2M3M2aI]_OS3f`0_LP@U3T`0hLT@Q3n?lLV@P3m?mLV@P3m?nLU@P3m?oLT@n2o?QMS@k2o?UMR@g2R`0XMQ@b2R`0^MQ@[2S`0eMP@S2V`0lMm_Om1W`0SNj_Oi1Z`0VNh_Oe1[`0[Nf_Ob1\\`0^Nf_O\\1_`0dNb_OT1d`0lNg_O?c`0AU5O000010O01O1N3N2N2N2N1N2O1O1N2O1N3M4K7H6J6J7I^Qn`0"}}, {"image_id": 20, "category_id": 2, "bbox": [225.8786163330078, 581.2308349609375, 499.09149169921875, 104.07025146484375], "score": 0.9999980926513672, "association_id": 1, "segmentation": {"size": [844, 1500], "counts": "Vgk58Tj01O0O2O00001O0000000O101O0000000000001O00000O1000000000000000000O2O00000000000000000000000O10001O000000001O0000000O2O00000000000O10001N1000000O2O00001N10000000001N1000000O101O0000001O0O10001O000000000O2O000O10000O2O00000O2O0000000O10001N10000O100O100O100O2O00000O1000000O10000O1N2N2L4O1O100O10000O1000000O10000O100N1M4H8N2O100O100O100000000O100000000000O1000000000O10O1000000000000000000O1000000000000000001O000000000000001O0O101O0000001O000000001O000O101O00001N101O0000001N10000000001O000000000000001O000000000000000000000000000000XXOmMWg0S2hXOnMXg0R2hXOnMXg0R2hXOnMXg0R2gXOoMYg0Q2gXOoMYg0Q2fXOQNYg0P2fXOPNZg0P2fXOPNZg0P2eXOQN[g0o1eXOQN[g0o1dXORN\\g0o1bXORN^g0n1bXORN^g0Q2^XOPNbg0]200000000000000000001O00000000000000000000000000000000000000000000O1000000000000O1000000000000O1000000000000000000000O10000000O10000000O1000000000000O10000000000000000000000000000O1000001O00000000000000000000010O00000000010O000001O001O001O0gM^XOh1cg0VN^XOk1ag0QNdXOn1]g0nMgXOQ2[g0lMkXOb0Be0Xh0XOlWOf0Uh0UOPXOj0kh0N1O1O001O001O00000010O000000O1000000000000000001O000000000000000000001O000000000000001O00001O00001O000O2O00001O00001O001O001O1O2M2O1O1O1N2L4N2N1ORT\\d0"}}, {"image_id": 21, "category_id": 1, "bbox": [561.1118774414062, 288.1451721191406, 81.40264892578125, 173.39254760742188], "score": 1.0, "association_id": 1, "segmentation": {"size": [576, 1024], "counts": "oen9a0Za06L4K4K6N1N3L5X@QOZ>Q1cASOY>P1cAVOX>n0cAXOY>k0dAWOZ>[2M2M2O3M4L5Kf0ZOa0_O6J2N1O1O0000O1O1PO\\CcLeeC^Oa<:eCBb<5dCFgDch]3"}}, {"image_id": 23, "category_id": 1, "bbox": [189.2112579345703, 290.8428039550781, 411.30572509765625, 213.78909301757812], "score": 0.15059776604175568, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "^UY42We06`NJa]O:[b0L_]O8]b05W]OMgb06o\\O3ob0On\\O4ob0On\\O5ob0Mn\\O6Pc0S1O2M3L4I7M3M3M3N2N1O2O0O100O2O0O1O1O1N2N2O1O2N1O1O100O1O100O1O1O1N2O1O1O2N1O100O100O100O2O0O2M2O2M2O2N1O2N10001N100O2O001N2O1N2N2N2N101N101O0O2O00001N2O001O1O1N101O0O101O0O101N101N101N2O001N10001N100000000O1000000O100O100O10000O1000000000001O0000000O1000000000000001O00000000000000000000001O0000001O00001O0000001O000000000000O10000000000O1000000O10000O1000000O100000000O10000000000O10000000000O1000000O1000000O10O10O100000000O100000000O10000O10000O100O10000O1O10000O10000000000O1000000000000O10000000000000000000000000000000000000000000O100000000000000000000000000000000000000000000001O00000000000000000000001O00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000O10001O000000000000000000000O100000000O01000O100O1O100O1O2N1O2N1N3L4oIPAa5o`0hMSji8"}}, {"image_id": 24, "category_id": 1, "bbox": [47.72730255126953, 555.0107421875, 60.843727111816406, 122.2342529296875], "score": 1.0, "association_id": 3, "segmentation": {"size": [768, 513], "counts": "SSV1U1hf06E?H3J6L4K4L4M3L4M2J6M4I6N2N4M2N1O2N1O1O100000000000000000000000000000000000iLi[Oe2Wd0YMn[Od2Rd0ZMT\\Ob2lc0]MV\\Ob2jc0]MZ\\O_2gc0`M[\\O_2fc0_M]\\O_2dc0\\Mb\\Ob2_d0M2O3M6I4M6I5L4K6I?nNTm_9"}}, {"image_id": 24, "category_id": 1, "bbox": [315.2156677246094, 505.2799072265625, 68.43215942382812, 94.828369140625], "score": 1.0, "association_id": 7, "segmentation": {"size": [768, 513], "counts": "\\Q_74gg0>Bo0TO4K3M4M3M2N2O1O2N1O1O1M3N2O1K5N2N2O100O1O100000000O10000O1O1000000O10000000000001O00000cMZ[ODGM0a1Pe0iNQ\\OQ1oc0lNZ\\On0fc0QO`\\Oh0bc0VOb\\Og0_c0VOP]O4`[[3"}}, {"image_id": 24, "category_id": 1, "bbox": [1.6162891387939453, 333.18017578125, 35.097389221191406, 83.67657470703125], "score": 1.0, "association_id": 5, "segmentation": {"size": [768, 513], "counts": "^j1i0Vg05L1O1O2bYOVObe0o0PZO\\One0`1K6TZOPN\\e0Z2001O0O3N2M4M3M3N0N111N1O1O2N1O2M2O2N2M3N2N4L4L6I;E?A]cT;"}}, {"image_id": 24, "category_id": 1, "bbox": [194.47157287597656, 307.79730224609375, 39.43659973144531, 70.79605102539062], "score": 1.0, "association_id": 4, "segmentation": {"size": [768, 513], "counts": "QZc4R1if0:J4K5L4L4L4K5M00000000000000000002N2N2N2N1O2N003M1O2N2N1O2N2M3VOeYOJaf0MfYOJmcd6"}}, {"image_id": 24, "category_id": 1, "bbox": [0.02039620466530323, 424.1005554199219, 54.13655471801758, 107.88510131835938], "score": 0.9999998807907104, "association_id": 1, "segmentation": {"size": [768, 513], "counts": "k>:`g0Pe0AZ[O2jd0Me102MM^OjXOb0Xg020N3M2O10i[o1"}}, {"image_id": 24, "category_id": 2, "bbox": [359.5708923339844, 591.1840209960938, 63.19671630859375, 10.712646484375], "score": 0.9999967813491821, "association_id": 7, "segmentation": {"size": [768, 513], "counts": "gj`81ng0101N1O1M3O1000000O1001O00000000000000000000001O0000000O10000000000000000000001O000000000O101O000O2O000000000000\\UU2"}}, {"image_id": 24, "category_id": 1, "bbox": [52.905029296875, 260.3485412597656, 47.86022186279297, 119.72381591796875], "score": 0.9999963045120239, "association_id": 0, "segmentation": {"size": [768, 513], "counts": "^PX1333_g0b0nZO^Ooa0k0i]OWOUb0P1d]OSOZb0Q1b]OPO]b0S1_]OoNab0T1Z]OmNgb0X1S]OhNnb0\\1l\\OeNUc0_1f\\ObNZc0e1Z\\O`Nfc0l1i[OXNXd0h20000000000000hLg[Oi2kd0M3M4L3M4L2N1O2O1N2N2N3N0O3N2N1N2N3M3M3M4L4L2N100N2O2M7C[ed9"}}, {"image_id": 24, "category_id": 1, "bbox": [254.97805786132812, 359.66302490234375, 57.529693603515625, 104.7017822265625], "score": 0.9999933242797852, "association_id": 0, "segmentation": {"size": [768, 513], "counts": "YeR61mg04VXOMag0:01O0LFcXO9\\g0GhXO6Pg03PYOMkf0:QYOGlf0h0M3O2M5K4L2N2O0O011N2O1N3M3K4K7K8I3N2N3N1N101O00O101N1IjZObMYe0[27M4L4M4J5J6N5J9H4K3N4L4L7I2M3Nc[f4"}}, {"image_id": 24, "category_id": 1, "bbox": [140.4371795654297, 388.7621154785156, 60.83866882324219, 85.811767578125], "score": 0.9999904632568359, "association_id": 8, "segmentation": {"size": [768, 513], "counts": "Xl]36hg0:H01O00O2O0TYOB_O0bf0>oYO0he01RZO_OFm0le0IWZO`0fe0o0N1O1O1O1O1O001O001O1O0002OO01O1O010O100O1O1O1O1O00001O2N001O1O001O1N2N5K5K4J6E:EPc\\7"}}, {"image_id": 24, "category_id": 1, "bbox": [301.5989990234375, 349.4369812011719, 25.289520263671875, 69.78433227539062], "score": 0.9999833106994629, "association_id": 15, "segmentation": {"size": [768, 513], "counts": "^cS73ig0b0A9F6J9YYOeNO3Pf0k1L4N001O0000O1000001O1O3M4L3L4M3I6If0YOST[4"}}, {"image_id": 24, "category_id": 2, "bbox": [230.8648223876953, 370.3554992675781, 29.778366088867188, 7.062255859375], "score": 0.9999608993530273, "association_id": 4, "segmentation": {"size": [768, 513], "counts": "c[^54kg02O00000000000000001O000001N1000001O000000000000000O]Tn5"}}, {"image_id": 24, "category_id": 2, "bbox": [207.28326416015625, 589.3436279296875, 111.82736206054688, 12.7647705078125], "score": 0.9999558925628662, "association_id": 10, "segmentation": {"size": [768, 513], "counts": "bbl43lg0101N1O100O101O0O1000000000000000000000O10000000000000000001O000000000000000000000000000000000001O0000000000001O00000000001O0000001O001O0000000000001O000000000000000000000000000000001O000000000000000000001O00001OZmc4"}}, {"image_id": 24, "category_id": 2, "bbox": [191.63485717773438, 464.1985168457031, 44.84056091308594, 8.806396484375], "score": 0.9999525547027588, "association_id": 8, "segmentation": {"size": [768, 513], "counts": "d^`44jg02O100O10000000000000000001O0000000000001O0000000000001N100000000000000O2O0000\\Yb6"}}, {"image_id": 24, "category_id": 1, "bbox": [347.38824462890625, 287.77508544921875, 34.268890380859375, 52.05633544921875], "score": 0.999906063079834, "association_id": 12, "segmentation": {"size": [768, 513], "counts": "aQV88fg01O5I4O100O002M3N3L2O2O1O0010O00]YOTOSf0l0aYORO28]f0k0aYOUO_f0V11O1O2N1O2N1O2N2M3N2M6K5YOeXO162[]S3"}}, {"image_id": 24, "category_id": 2, "bbox": [472.8122863769531, 346.8280944824219, 38.9403076171875, 14.51458740234375], "score": 0.9995197057723999, "association_id": 0, "segmentation": {"size": [768, 513], "counts": "R[U;1ng01O2O000O101O0000000000000LL\\XO4dg0L[XO5eg04O00001O01G^XO2cg0M]XO3ig0O010O0010O0001O00001O00iT1"}}, {"image_id": 24, "category_id": 2, "bbox": [374.2431945800781, 336.16900634765625, 31.60919189453125, 7.031097412109375], "score": 0.9991666078567505, "association_id": 12, "segmentation": {"size": [768, 513], "counts": "cbi82ng0000O1000001O000000000000001O00000001O0O1000001O0000\\mb2"}}, {"image_id": 24, "category_id": 1, "bbox": [427.1279296875, 316.7380065917969, 52.563018798828125, 101.63912963867188], "score": 0.9990072846412659, "association_id": 14, "segmentation": {"size": [768, 513], "counts": "h[W:2c02[f01TYO10O71HMif00YYO3N251gf0HXYO?MKjf0HWYOj0jf0WOTYOi0mf05O1O0L6O0POhNU[O\\1hd0hN_ZOM>_1Se0iNmZOX1Qe0iNoZOW1Qe0jNmZOW1Se0kNjZOW1Te0iNlZOX1Te0hNiZO[1We0fNfZO\\1Ye0g0OO1O100L5K4N4K6I7J3N2N:B9YOc001O2O1N101MX]k0"}}, {"image_id": 24, "category_id": 1, "bbox": [436.5090026855469, 415.8530578613281, 64.5980224609375, 65.47207641601562], "score": 0.9986409544944763, "association_id": 6, "segmentation": {"size": [768, 513], "counts": "_UX:8eg04G;K4M4L2O1O1O000000O101I7O001O1002N0lXOWOof0P1M2OO11N1N2O1O00O101OOO2L4O10OIRYO\\Oof0e0QYOYOPg0e0TYOYOmf0e08O100000001O2N2M2N2L6J]XONhg0000ZX22bgM2O3N3O2L5LN2N3IPb8"}}, {"image_id": 24, "category_id": 2, "bbox": [280.702880859375, 308.272705078125, 35.459808349609375, 4.22808837890625], "score": 0.9981787204742432, "association_id": 2, "segmentation": {"size": [768, 513], "counts": "fQf61og01O000O1000000001O000000000000000000000000000000001O00Yfe4"}}, {"image_id": 24, "category_id": 1, "bbox": [456.3909912109375, 541.409423828125, 49.533203125, 110.7247314453125], "score": 0.9979057312011719, "association_id": 0, "segmentation": {"size": [768, 513], "counts": "jaf::Rg0JQYOn0bf0b0E7H8K3M6J;E7I2N1N2O001O1O001O00000000000000000001O1QMX[Od2Ue0M1O2N10O01N2O001O001O001O1O1O1O00100O1N6JPf4"}}, {"image_id": 24, "category_id": 2, "bbox": [295.33428955078125, 449.5503234863281, 22.565185546875, 6.862518310546875], "score": 0.9976884126663208, "association_id": 13, "segmentation": {"size": [768, 513], "counts": "Tfm63kg03O0000000000000000000000000000000001OmQd4"}}, {"image_id": 24, "category_id": 2, "bbox": [452.70196533203125, 408.3517150878906, 60.29803466796875, 14.675872802734375], "score": 0.9961963891983032, "association_id": 14, "segmentation": {"size": [768, 513], "counts": "lTg:1og01O001O000O2O000000001O000O1000000O01000000002O1N1O0000000001O001N10001O0000000000000O101O0000000000001O1OPS1"}}, {"image_id": 24, "category_id": 2, "bbox": [307.64739990234375, 413.7010192871094, 45.63848876953125, 7.416839599609375], "score": 0.9922298789024353, "association_id": 15, "segmentation": {"size": [768, 513], "counts": "QU[71ng02O00000001O000000O1O2O0O1000000001O00000000000000001O000000000000000000000000Pcg3"}}, {"image_id": 24, "category_id": 2, "bbox": [30.24979019165039, 409.3680419921875, 44.45646286010742, 8.25390625], "score": 0.9863542914390564, "association_id": 5, "segmentation": {"size": [768, 513], "counts": "l\\h02ng01N100O10001O000000000001O00O2O0000000001O0000001O00001O01O000001N10000000000OS[Z:"}}, {"image_id": 24, "category_id": 1, "bbox": [445.6754150390625, 456.373046875, 54.446990966796875, 116.4945068359375], "score": 0.9589871764183044, "association_id": 0, "segmentation": {"size": [768, 513], "counts": "oo^:6cg0>F6K6]YOROje0f1K2M3O1O001O1M2O2O00N0M2301N21OO1N3O103L1O0O1O100O100O10O1L5N2O00001N1O101O2N2M1`NZZOa0me0XO]ZO;me0B]ZOOke0OR1M4004L01OPQ:"}}, {"image_id": 24, "category_id": 1, "bbox": [139.1944580078125, 348.9319763183594, 42.07695007324219, 57.876953125], "score": 0.9079351425170898, "association_id": 0, "segmentation": {"size": [768, 513], "counts": "`cX31lg08J4G503N3L1O3M2N2N2N2N3M2O00000000000000000000001O001O1OkN]YOm0cf0QOlYOc0Sf0]ORZON\\OS;BiD?Z;AdD?^;B_D?b;B[D?f;BVD?l;BRD=PWcPOQAR1P?nNo@R1R?oNk@R1V?oNh@Q1X?QOe@Q1[?POb@Q1^?SO]@n0c?UOX@m0i?SOU@o0k?SOQ@n0P`0WOi_Oj0X`0YOc_Oi0_`0VO]_Ol0e`0TOV_Oo0n`0YOc^Oj0_a0`12N3M4L3N1M7J4L2N2N3M2O0O01000O10N10001N100O10O10O01N2N2O100O1O1dNY]O3hb0KQ^OYOTb0d0S^OTOQb0j0Y1O1O1O2N1O3J6Klo]8"}}, {"image_id": 25, "category_id": 2, "bbox": [61.5017204284668, 329.9403381347656, 489.279296875, 296.7381286621094], "score": 0.9968873858451843, "association_id": 1, "segmentation": {"size": [683, 1024], "counts": "]`Z1`0id07J4L3M2O2M2N2OO1O1O1O1N2O1O1O1O1O00100O100O10000O2N2O1N2N3M2JPh:JZXE3M4L5K4L4f[OG[c0<`\\OG`c0;Z\\OJdc0o001N100O1O100O01000O01000O01O1O100O01000O100O010O1O001O001O001O010O0001O10O010O010O0001O00O1N2N2O1O100010O010O01000O010O010O0000000O1000010O0010O0100O010O001O000000000000001O0010O01O10O01O1O00001O0O1O01000010O010O010O010O10O0010O00O00001O1O10O100010O010O01O010O001O0O100O1001O01O01O01000O010O1O01O01O000O100001O01O01O10O10O010O10O0001O0000O101O0O110O001O10O010O01O001O00O1M2N3O10O11O00010O0100O010O0010O0000OO2N2O1O2O001O010O10O010O010O01O0000N2O1O1O1000001O010O010O010O01O000000000001O010O0010O010O010O0010OO1O001O1O101O001O010O010O10O0100O001O000000001O000010O010O010O010O01O000O1O1O1N11001O00010O010O010O010O0000000O2O000000000010O001O0100O0O2O1O00100O1O010O10000O10O11N100N2N3M2N2N3L3L5Mh`d;"}}, {"image_id": 25, "category_id": 2, "bbox": [388.23382568359375, 318.8189697265625, 558.3780517578125, 352.49609375], "score": 0.9840161800384521, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "jS`:8od08H6G9F9K5K5K4O2N2O1N2N101N2O000O101N100O1O100O1O1O1O1O1O2N100O100O10O10O010O01O01O000000001O0001O00001O10O0100O010O1O001O001N101N100000010O0010O010O010O01O001O001O0O2O0O100O1000001O0010O01O010O0010O01N10000M3M2O2N2O2O00001O001O001O001O1O0O1O2N1O1O1O1O2O00001O0010O010O010O01O001O00001O00O2O00010O0010O010O10O0100O001O1N101N100O2O000O1001O01O010O010O100O00100O0010O00000O0010O2O01O01O010O1O100O0O2O1O1O001O001OO2O0O2O001O001O10O010O1N2N101N10N2O10000001O0001O10O01O1000O1O010O0001O000000001N10O0011N101O10O010O010O01O010O00001O00000O101O001O00100O0010O00010O000000000O10000001O001O001O1O010O1O01O01O001O000O100O1O1010O01O010O0100O10O01O010O1N10001O0000O110O00100O010O10O100O1O1O1O1M3N2N2N2N2O0N3M3N00M4001N2N2L5KUQ]3"}}, {"image_id": 25, "category_id": 2, "bbox": [52.294673919677734, 269.00970458984375, 854.046875, 372.63824462890625], "score": 0.9748896956443787, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "]mo14Ve06K5J2O1O2M2O1O2N1N2O2N1O1O0O2O001O0O2O00001O001N10001O000O2O00001OO01000000O10O10O10000O01000O100O0100000O10O1000O1000O0100000O010O100O001O1O001N2O001O001N2O000O2O001O01O01O0010O010O010O0100O1O1O1O2N100O1O1O1O1O1O1O1O1O2O1DZe01oZO3N0O101N1O100O100O1000O2N1O1O2N2N2O1N2NPZ;3feD=G7M2NM2N3O1N2O100O001O1O10O01O01O010N2O1N1N3N2N2O1N2O001N2O1O1O100O01O1O001O001O001O001O00000001O00001O0O2O001O0O2O000O2O1O0010O1O100O1O1O1O1N2O1O1N2M3N2N2N2O1O1O1M2M4N2O1O01O0M4K5O001000O1M4K4MZn]12fQbN4K4M3L4M1N3M2N2O2N1N2O1O2N1O100O1O100O10O010O010O001O10O01O010O10O0100O0100O01000O010O1000O0100O10O100O010O010O001O0O2O001O001O010O001O10O010O010O010O01000O0101N101N101N1O2O1N2O1N2N3M6K6IZd73[[H;M3N2M2O1N2N2N2N1O2N1O1O2N1N2O1N2N2N2N3M2N2O1N2O1O1O1O2O0O1O1O100O10000O100O1000O0100O10000O01000O100O10O10O100O01000O010O10O01000O1O1O1O1O001O1O1N2O1M3N1N3M3J6J5M4N2M201N1O2O001N100000O1012M3M4L4L5J7JVmZ8"}}, {"image_id": 25, "category_id": 2, "bbox": [452.9819641113281, 446.7431945800781, 337.6976623535156, 215.27908325195312], "score": 0.4140845239162445, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "[SV:3Ue09H5K4M3M2O1N2O0O2O001N101N101N1O2O0O101N101N10001N10001N10001N100O1O1O1O1O1O100O1O100O010O1O1O001O100O001O10O0001OO10000O00101O010O010O10O01O1O001O001O01O010O010O01O1O001O10O0100O10O010O0010O0N2O2O0O2O10O0100O0010O0000O100010O010O010O01O01OO1O1O1O101O010O0010OO10000N2N2O2O0010O01O01O00O100000000001O0010O01O01O0N2O1O10000010O010O1O01O00O1000010O0100O010O010O000O10000010O0100O010O00000001O0010O0100O010O000000N2N2O11O01O01O10O01N100O100O110O0001000O010O0000000001O00010O10O01O010O000000010O01O10O010O0000O11O01O0100O01000O1O100O1N2O1O1O1O100O100O2N1O1O1O1O1O1O1N2O2N1O1O2NWoT5"}}, {"image_id": 25, "category_id": 2, "bbox": [61.3769416809082, 453.2402648925781, 283.0960998535156, 189.85037231445312], "score": 0.2625718116760254, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "XkY1k0\\d0=Z\\OoN]b0U1]]OTO^b0o0[]OWOcb0k0Z]OWOfb0h0Z]OYOeb0h0[]OYOcb0h0]]OXOab0j0^]OWOab0j0_]OVO`b0k0`]OUO_b0l0a]OUO^b0k0b]OUO]b0k0d]OUO\\b0k0d]OUO[b0k0f]OUOYb0j0j]OUOUb0h0P^OWOoa0f0V^OYOja0e0Z^OYOea0g0]^OXOba0g0`^OYO`a0f0b^OZO\\a0f0e^OZO[a0e0g^OZOYa0e0h^O[OXa0d0i^O\\OXa0a0j^O_OVa0?l^OATa0;Q_OC6CS?g0i@F0IU??m@HLLV?;o@IJMX?9o@IH0X?6QAJG0Y?4QALE1Z?2RAMD1\\?ORAOA3_?JRA3^O4b?CTA9XO6ja0IU^O9ja0GV^O9ja0GU^O:la0ET^O;la0ES^OSb0Ck]O>Ub0Bk]O>Ub0Bj]O?Ub0Ci]O>Wb0Bi]O>Wb0Ch]O"}}, {"image_id": 25, "category_id": 2, "bbox": [216.4913787841797, 277.83612060546875, 353.9451904296875, 263.94097900390625], "score": 0.25049740076065063, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "ila4j0`d05K2N2N2O0O1O010N2O100O1O10O0100O10O000001O000O10O101O000010O010O0O101O001O0001O01O01O01O001O010O010O00100O010O010O000O100001O01O0010O01O001O000O100O1O10010O0010O010O0000000O100000001O0010OO2O000O1O1O10001O00010O10O0010O0O10O1000010O010O010O00010N01000000010O010O0010O0000O100000001O010O010O0000000000O11O01O0010O010O000000000000001O010O00010O00O101N101N101O001O10O0001O0000000O10000010O010O00001O00000001O0010O010O010O00000O1O100O1000001O0010O00O100O100O100010O01O010O000O10O1000000000010O010O001O001O001O00100O00100N2O1N1O2N2N101N110O0001O010O01O001N1010O01O01000O010O0000001O001O00100O010O100O100O1O1O1O1O10O0100O101N1O100O1O1O1O2N1O1O101N1O2NmVQ:"}}, {"image_id": 26, "category_id": 1, "bbox": [744.7945556640625, 168.00531005859375, 274.09039306640625, 655.5925903320312], "score": 1.0, "association_id": 2, "segmentation": {"size": [941, 1024], "counts": "ck_e0l0\\l09I5L4K6J5K6F:F:E;G8J5M3M4J5H9F9H9H8E4L4L4N2N2O1N3M2N2M3L4K5M3M3N2N3O1O1O1O1O2N102M5K7I6PAaBf=g=aAoBZ>V>L5K4M4K2N2N2N100O001O001O001O001O0001O0001O01O00001O0010O0000000O1000000000000O10000000000000000000000O100000000`KZ@XKg?d4b@WK^?f4j@UKV?h4RARKo>j4[APKf>k4bAPK_>k4kAoJW>m4RBlJo=Q5ZBhJh=T5gB^J\\=_5VCPJk=cl0e0@a0D8H6K4L4M2M3M2M4L3K6J5L5K4M3N3M2L5L4M2N3M3M3M3N2N2N1N3N1N3L4M2M4M3M3N1O3N1N2O1O1N2O1oZOeJna0\\5l]OoJma0R5o]OXKka0i4P^O_Kla0c4o]OeKka0^4n]OkKna0X4h]OSLTb0P4_]O_L\\b0]7K6K5K3M2M3N3L3M4M4K5m_OPF`YfMm@Y2U?m52N200O2N3M3M3L4L4L4M4L4M3M3N2M3N1O2N1N2O2N1O002N2M3N3M4L3M2N2N2N1O0000000000000000000000000000000000000000O1O1O1O1O2N1N2N2N2N3L5L4K5L5J8I6I7I6J5L5J7IR1[I`A\\LP?m2jA`Le>i2eBULa=b3PCoKW=i3WCjKoWi0BfVOd03hNlg0e0mWOh00SOhg06VXOT1_OTOTh0H[XOh2_g0YM^XOm2^g0SM_XOS3_g0mL]XOX3`g0lLVXO[3jg0T10000O1000000000001O1O001O000O0100O1O1Ob\\OQK`>o4PAhKi>W4m@`Lg>_3m@\\Me>c2WAnM]>S2`ASN\\>m1bA[NX>f1fA_NV>b1gAbNW>`1fAcNX>_1eAcNZ>^1cAdN]>]1]AiNb>X1ZAkNf>U1WAoNh>V1PAmNP?Y1d@mN\\?Y1Z@lNe?^1l_OgNT`0Y70001O1O00PJ__OUO``0k61O1O1O100O1N2QOe_OjD]`0n:R@hDQ`0U;U1M3L4K5M3N2N2O1N2N2N2N2O1O1N2O1O1N2L4N2N2N2M3J6H8L5K4M3N3M2N4K5I?UHlZOd6Uf0H7H7I6J6K5L4M3M4L3L4K5jLZXO`0jg0^O\\XO9ig0F\\XO1ig0M\\XOJjg05[XOCig0;^XO\\Ogg0>aXO[Ofg09hXOXOdg0a0j2I6JVo_?"}}, {"image_id": 26, "category_id": 2, "bbox": [344.564208984375, 579.359130859375, 64.92098999023438, 12.59051513671875], "score": 0.796180784702301, "association_id": 0, "segmentation": {"size": [941, 1024], "counts": "Ycm95Wm02O1O000000001O0000000000000000000000001O000000000001O000000000001O000001O00000000000001O0000000001O000000001O0000001O0000000Odbda0"}}, {"image_id": 27, "category_id": 1, "bbox": [301.1077575683594, 331.05645751953125, 132.26370239257812, 212.46234130859375], "score": 1.0, "association_id": 6, "segmentation": {"size": [683, 1024], "counts": "ZX_69od05hM1o^O1n`05m^OMPa0:i^OITa0g0\\^O\\Oba0m0S^OVOla0o0m]OUOPb0R1i]OPOTb0U2K5K6L3M3L4L4M3N3F9O3M2N2N2N1O1G9N3N1N2N2K5N29G6J2N2N01N1O100O2N1O2L4M3M3L3K5M4M2O1N2N2O1N3N1O1N200O10000O1000001O00000000000000000000000000000000O1000000000000000000000000]J_A\\4a>bKeAZ4[>eKhAY4X>fKjAX4W>gKmANOj2T>XMbCa2_<]MiC[2XEfDg0aLBP?@bDj0bLCRc07S]ODSc05T]OEQc06V1Ka\\`<"}}, {"image_id": 27, "category_id": 1, "bbox": [918.15283203125, 335.0902099609375, 105.84716796875, 210.16943359375], "score": 1.0, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "oSXc0=fd0?Bd0]O8K4L4E;K6K3G9E;F9N3N2O1G900O001N102N1O1N2J6O2N1O2N1N3N1N2N3L3N2O100O2O0O1O1N2N200O100O100O1N2N2N2L4N2O1N2M3N2O1N2N2N2O1O1N2O1N2O100O100000000000O100O1O1O1N2O1O1O100O1O1N2O100O100O1O1O1O1aNVA\\Lk>^3]A_Ld>\\3cA`L`>V3lAdLY>T3`G"}}, {"image_id": 27, "category_id": 1, "bbox": [633.22998046875, 300.90850830078125, 126.3948974609375, 212.504638671875], "score": 1.0, "association_id": 4, "segmentation": {"size": [683, 1024], "counts": "d[_=6eb0Ki]O2Y1?a`0g0k^O@Qa0f0i^O\\OSa0n0b^OXOTa0d2N2N2N3L3L4M3N2N2K5K5M3M3L4L4M3N2M3N2N2N2O1N2O1O1O1M3K5L4N2O1M3N2N2O1N2O1N2O10000O1000000000000000000000000000000000000000000000000000O100O100O1N2N2N2O1N2N2O1N2N2N2hJi@[4X?bKm@Z4U?dKn@Z4S?eKPAW4R?hKQAT4Q?kKRAR4o>nKRAP4o>oKSAo3o>oKUAm3l>QLYAj3i>TL[Ah3h>UL\\Ah3f>TL`Ag2aNXNda0c1b^OcM08ba0Q2n^OkMWa0P2m^OiMZa0S2V1E;F7J`2SAdMf>a2YAaMd>`2\\AbMa>`2^AbM`>a2]A`Ma>^1X@kNT1I^>^1k@`Nd04]>^1TA]N;8^>\\1ZA[N6:_>[1\\A]N2:_>[1_A]NO9a>Z1aA_NBa0j>S1dA]N]Od0m>P1gA]NXOg0o>m0iA6W>JjA4V>NjA1V>OjA1V>OkA0T>1mANR>3mANR>4lAMR>5mALQ>6mAMR>4lAMS>5kALU>5gAMZ>5_A0a>\\3100O001O1O001N1O2N1O1O101O100O00100O100O1O100O1N2N2M2N3N2O1D\\@nJg?k4`0L4L4N2O1N101N2N21O1O1N101O0O2O1N3M2OUOg_OeLX`0Z3k_OdLU`0[3m_OdLS`0[3o_OdLQ`0[3Q@XLJMV`0j3R@ULMOP`0m3P11O0O100000O100O100F:O0O2L4K5M3N2O1N2O1O1O2M2M3N3L4L3L5]OU]O\\NTc0[1c0J7EU:BiEf0Q:[OlEk0P:UOoEo0n9QOPFS1o9lNoEX1o9hNoE]1n9cNoEb1P:]NfEn1Y:RNaEV2]:iM`E]2_:bM^Eb2b:mJ^Dm1i0_3h:]JkDn17l3g;QLYDQ4g;nKWDU4i;jKVDX4j;gKTD[4n;dKlCa4V<_K`Cj4`k3oARLQ>l3WBnKi=Q4[BmKd=f3ZAlKX1:_=f3QCWLP=a3a2L4O1N2Nk@eL^a3fAbLT>^3nAcLo=]3TBSLGUOS>i4YBlKJYOl=l4\\BdKM@e=m4fBVKLL\\=o4Q21000001O000O1000N3L3N3N20O100000N2N2NiB`Kg9S4dFRLY9m3iFRLW9n3iFTLU9l3lFVLQ9i3RGVLm8i3TGWLl8h3TGXLm8f3TG[Ll8W3]C_Li3:j8W3bGiL^8W3bGjL]8V3dGiL\\8W3fGhLY8X3YGVMh8h2RFcLlMn0R<^2oERM`Mf0`<_ObCd1e0hM1f2h;lMfCc1_2[AaMd>_2\\AeMa>[2_AkMZ>V2hAjMROjNg>Y3_BjMgNnNk>U3eBiM]NTOn>P3UChMl"}}, {"image_id": 27, "category_id": 2, "bbox": [412.137451171875, 439.92913818359375, 39.256988525390625, 10.071868896484375], "score": 0.9997121691703796, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "^Wc82We04N1O1O0000010O00000000000000000001O000000010O000O2O00000O100O101O0O_]P<"}}, {"image_id": 27, "category_id": 1, "bbox": [524.6802978515625, 299.424560546875, 119.545654296875, 239.079345703125], "score": 0.9997065663337708, "association_id": 7, "segmentation": {"size": [683, 1024], "counts": "QQ`;3Ue03N3M2O1^JIPF8n9NkE4S:0gE4Y:OkDk0S;YO^B5Bl0o=SOZB6Aj0U>SO\\BIGQ1l=YOaB[OJZ1e=]OcBQOMa1_=@\\D?b;F]D7b;N\\D1c;6XDaNlLn0k>i0fDlN[;Y1eDbNZ;`1iD\\NV;f1QBkMj1W6N2O1O1O1N10M3L4O2O0O2O1O1N2O1N21O000000O1O1O1O01000000000O2M2O100O1000000O1N2N3M2N3N2M3G;cMj@SNe?oNi_OY2W1hMR`0n1m1\\Oa0G:F;Fn^R8"}}, {"image_id": 27, "category_id": 1, "bbox": [384.3432922363281, 210.56666564941406, 81.89117431640625, 119.37580871582031], "score": 0.9519389867782593, "association_id": 5, "segmentation": {"size": [683, 1024], "counts": "[]T81Ye03M3kZOMhd0`0L3M3YN[Od^Oi0Xa0ZOd^Oj0[a0WO`^On0_a0XOY^Ok0ea0WOW^Om0fa0WOT^On0ja0UOP^OP1na0SOe]O[O2d1Yb0V1N101M2O2O001O1N10001N1000001O0O10000O10001O000O101O02N1O00O1O21N2N3M00O11O4L2O6I1O1O3M3M3M3M2N1O1O2N5K2M2O2N2M4M4J6Dg0^O5K:E_lc;"}}, {"image_id": 27, "category_id": 2, "bbox": [455.0196533203125, 324.9091796875, 31.150543212890625, 9.923004150390625], "score": 0.8625460267066956, "association_id": 5, "segmentation": {"size": [683, 1024], "counts": "ei_92Ye01N1000000O101O00000010O000001O000001O000O20OO10001O1Od`X;"}}, {"image_id": 27, "category_id": 2, "bbox": [237.46109008789062, 475.1031799316406, 84.82296752929688, 17.95623779296875], "score": 0.5278620719909668, "association_id": 6, "segmentation": {"size": [683, 1024], "counts": "lVS54Ve0101O0O100000000000001O0000001O00000O1000000000001O000O101O000000001OO100000001O00000O100O1O100O100O10000000O2O000000000000000000O10000O2O1N2N^hg>"}}, {"image_id": 27, "category_id": 2, "bbox": [775.4871826171875, 485.45269775390625, 92.6728515625, 16.353179931640625], "score": 0.5255075097084045, "association_id": 4, "segmentation": {"size": [683, 1024], "counts": "ggf`01Ye02O0K501O000000000000000000000000000001O0001O01O000000001O0000000001O00001O01O000001N100000000000000O2O0000000001O00001O1O1O1O3LklX3"}}, {"image_id": 27, "category_id": 2, "bbox": [607.7725219726562, 499.0306396484375, 52.63824462890625, 15.8922119140625], "score": 0.5231958031654358, "association_id": 2, "segmentation": {"size": [683, 1024], "counts": "lPf<2Xe02N101N1O1O2O0O1O1O1000000000000000000000000000O100000000O2O000O101N2O1NbYl7"}}, {"image_id": 27, "category_id": 2, "bbox": [583.144775390625, 515.9005737304688, 235.85906982421875, 30.7103271484375], "score": 0.512158989906311, "association_id": 7, "segmentation": {"size": [683, 1024], "counts": "^f\\<1Ze02M101O0O3N2N1O000000001O000000000000001O00000001O00000000000000000000000010O0000000000000000001O000000000001O00000000000000000010O00000000000000001O0000000000000000000000000000000000000000000000001O00000000001O00001O0000010O000000001O0000000001O0001O00000001O000000010O0000HAd[O?\\d0Ad[O?\\d0Bc[O>\\d0Dd[O;\\d0Ed[O;\\d0Ed[O;\\d0Ed[O;[d0Fe[O:[d0Gd[O9\\d0Gd[O9\\d0Ge[O8[d0He[O8[d0He[O8[d0Id[O7\\d0Ie[O6[d0Je[O6[d0Je[O6[d0Je[O6[d0Je[O6[d0Je[O6[d0Je[O6[d0Jf[O5Zd0Kf[O5Zd0Le[O4[d0Le[O4[d0Le[O4[d0Le[O4[d0Kf[O5Zd0Kf[O5Zd0Kf[O5Zd0Kf[O5Zd0Kf[O4[d0Le[O4[d0Ld[O5\\d0Kd[O5\\d0Kd[O5\\d0Je[O6[d0Jd[O7\\d0Id[O7\\d0E_[O159]d0F^[O159]d0F_[OO5;\\d0F_[OO5;\\d0Fg[O:Yd0Fg[O9Zd0Gf[O9Zd0Gf[O9Zd0Gf[O8[d0He[O8[d0He[O8[d0He[O8[d0He[O7\\d0Id[O7\\d0Id[O6]d0Jc[O5^d0Kb[O4_d0La[O3`d0M`[O1bd0O^[O0cd00<0000001O000000000000000000000000000000000000000\\WZ4"}}, {"image_id": 27, "category_id": 1, "bbox": [544.6445922851562, 307.94122314453125, 310.46875, 201.80410766601562], "score": 0.17188115417957306, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "i[i=3We04L3L2O2L3ZOB\\\\Oa0ac0EX\\O?ec0f0N100002N>B6J2M3N1O1O1N2O1N1000O2N10000dJAkEa0S:AlE?T:AlE?S:CkE>U:BkE>U:BkE>U:BkE>U:BjE`0U:_OlEa0T:_OlEa0U:^OjEc0W:[OjEe0]?1O100O101OO1000dJXOUFh0k9ZOSFe0n9\\OQFd0o9]OPFc0P:^OnEb0R:_OnEa0R:@mE?T:AlE>U:BkE>U:AlE>V:AkE>U:BkE=V:BkE=V:BkE=V:AlE>b?L3O1N4NZX=KhgB4O02Mb]g0O[bXO5O101N101N1002N2M3N2M2Oad82\\[G1O2N20N2N2O1NcnV4"}}, {"image_id": 27, "category_id": 1, "bbox": [375.0379943847656, 305.7157897949219, 347.5675354003906, 248.01351928710938], "score": 0.09426606446504593, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "Seb92Xe03L4K5K4M3N2M3CWOU\\Oj0jc0YOS\\Oh0Yd0O2M2N3L6I9GU_81k`G3L5M2N2O0P\\OCQc0>n01O000O10000000000O100000000000000000O100000001O00001O0O10]]OMo?2n_O6o?Ho_O?n?^Ob^O3?e0@QOh`04W_O;>g0XOPOTa0KV_O`0"}}, {"image_id": 28, "category_id": 1, "bbox": [180.80673217773438, 295.47698974609375, 154.41290283203125, 230.4326171875], "score": 0.9999990463256836, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "QXX41ig0hb010OO2O0XN^OS\\Oc0kc0AR\\O?mc0EQ\\O:Qd0Do[OM2N3O00O100O20N1O1M3YOf0E;O110N2N10100O101O1O1O100O1O2N1N3M3N2N2N1N3[^OkK[?W4c@mKX?W4e@lKY?U4f@lKW?W4g@kKW?X4f@jKW?Y4g@jKV?Y4h@hKW?Y4h@hKW?Z4g@gKX?[4e@gK[?Z4\\@nKc?T4Y@oKg?Q4W@QLh?Q4V@PLj?R4Q@QLo?Q4g_OWLY`0a1`_Om0a`0POh_Oj0X`0TOk_Ok0U`0UOm_Oh0T`0XOn_Od0T`0]On_ONd`02__OIc`07^_OGc`08__OFb`0:`_OBc`0<`_O@b`0?a_O]Oa`0b0a_O\\Oa`04]^OnMS1n1a`0MT@1o?_Oa@=d?YOe@c0_?nNo@o0W?gNQAV1nb0N2N3L4L4L3N2N3LSb\\`0"}}, {"image_id": 28, "category_id": 1, "bbox": [400.9846496582031, 291.6043701171875, 50.00164794921875, 136.06356811523438], "score": 0.9999984502792358, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "hc^91T13Xe0=`ZOHZd0c1][OeNXd0c1_[OdN]d0c1Z[ObNfd0\\200M3N2K4OH9]O=302O201O101O1O3m[OQMob0U3i\\OnLVc0Z3_\\OiLac0k301O000001O1N3N2\\OZ\\OjLic0P3i0@?H6L6K5L1M3N3oNQ1L6K3O1N4M2Mjm^="}}, {"image_id": 28, "category_id": 2, "bbox": [245.4810028076172, 555.7147827148438, 334.084716796875, 35.9326171875], "score": 0.9999980926513672, "association_id": 2, "segmentation": {"size": [768, 1024], "counts": "\\iR61og0001O0000000000001O000000000000001O0000000000001O00001O0000000000001O00000000000001O01O01O000000010O000000000001O000001O000000000000000001O0000010O00000000001O00001O00001O0000001O0001O0001O000000001O0001O00000000000001O00000001O00000000000000000000000000000000000000000000000000000001O00000000000001O000000000001O0000000000000000000000001O0000000001O000001O0001O0001O000001O00000001O0001O00000001O00000000001O01O0000000001O00000000001O0000000000000000001O00000000000000000000000000000000000001O0000001O00000000001O0000001O01O01O000000001O0000001O01O00000001O0000000000001O000001O000000000001O0000000000001O00000000001O0000001N10001O000Oim]:"}}, {"image_id": 28, "category_id": 2, "bbox": [670.3475952148438, 563.2933349609375, 309.441650390625, 34.56622314453125], "score": 0.9999979734420776, "association_id": 3, "segmentation": {"size": [768, 1024], "counts": "eah?2mg02O000000001O000000001O0000000000001O000000000000001O0000010O0000000000001O00000001O0001O0000000000000001O000001O00000000000000000000000000000000001O0000000000000001O000001O000000000000000001O000000000001O0000000000001O000001O0000000000000000000000001O000000000000010O0000000000000000000001O0000000001O00000001O01O000000000001O00000000001O0000000001O0001O00000000000000001O0000000000000000001O00000000000001O000000000001O01O00000000000000000000001O0000000000000000000000001O00000000000000000000001O0000001O00001O000001O000001O00000000001O0001O0001O000000001O0000000001O000001O00000000000000001O0000000000000O2OcmQ1"}}, {"image_id": 28, "category_id": 1, "bbox": [139.16746520996094, 312.83935546875, 121.11329650878906, 142.44708251953125], "score": 0.9999929666519165, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "Ve[39eg04M1O1N10010O010O010000O1O1O1O2N2O1N4MeV2MZiM5I7M3M4L4M1O2oYOVOhd0l0W[OWOed0k0[[OWObd0k0\\[OWObd0l0\\[OUOad0V1V[OkNhd0Y1T[OiNjd0Z1T[OfNkd0]1S[OeNjd0]1U[OcNjd0^1V[OcNhd0_1W[OaNid0`1U[ObNid0[201O0O2O1M2O2N1O1_OQMl[OT3Rd0=O2O000100O1O1O1J6O1O100O2N1N3010O06J5K2O1RNnZOVOa0i0bd0JP\\O3Pd0JS\\O6mc0IU\\O6kc0HY\\O5hc0I[\\O6dc0J^\\O4cc0Ka\\OLfc01V2O1N2001O1O1P[OEWb0a>mNW_Om0Q25i>POS_On0T1ROjNn0o`0TOP_OQ1n0VOQO:[a0@d^O_1D^N8`0G@39ka0K^^Oc1ZOcN8?M_O8Ina04Y^OY3\\OUM7]OSb07X^OR4CgKUb0;S^Oo3Wb0TLa]OU4[b0i0O00M3N2O100O1O1O11N101O00001O00O1N2O2M2N2O1000000kKS]OV3ob0eLU]O[3kb0aLZ]O^3fb0aL[]O_3eb0aL\\]O]3fb0bL[]O\\3fb0dL[]OY3gb0gLZ]OU3ib0kLX]Oo2nb0PMT]OCHi2^c0ZMc]O^2Td0L2O0:F3L3N1N1000UOW[O_Ngd0k0Q\\OTOoc0f0W\\OZOic0`0]\\O@bc0POn`0e[OCZd0>f[OAZd0`0g[O]OZd0d0g[OXO[d0h0g[OPO^d0R1V12_YOmNSf0U1lYOmNSf0S1oYOjNRf0U1RZOgNoe06iYO63O`f0HfYO013[f0LYZONje02\\cf8"}}, {"image_id": 28, "category_id": 2, "bbox": [354.4345397949219, 458.62994384765625, 46.220184326171875, 9.1669921875], "score": 0.9141924381256104, "association_id": 1, "segmentation": {"size": [768, 1024], "counts": "_fZ81mg03O1N10000001O0000001OO2O000000001N1O100000000001O1O1O1O1O001O0O2O000000O1O1O10O2O001O_Yd>"}}, {"image_id": 28, "category_id": 2, "bbox": [986.66552734375, 444.00518798828125, 30.3409423828125, 6.814666748046875], "score": 0.8844165802001953, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "n]Ug01og01O001O0O1O1000000000000000000000000000000000O1000000000Tj4"}}, {"image_id": 28, "category_id": 1, "bbox": [590.2638549804688, 343.2751159667969, 139.02203369140625, 223.43899536132812], "score": 0.8015046119689941, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "ba^>1ng02N2N1N2M4N1O1M3L4K5M3YLUOV@n0g?VOT@n0P?mNY^O:`2P1U?jNW^O9`2P1X?lNS^O6a2P1_?dNT^O;]2Q1V`0mNh_OU1Z`0iNc_OV1d`0bN`_O]1\\c0410[L^Nn@_1U?fNf@X1]?kN_@T1c?oNX@R1j?nNW@Q1i?oNW@P1j?POV@o0j?ROV@m0k?SOU@m0j?UOS@l0l?VOS@j0m?XOR@f0n?]Ol^O[OWOX1ma0^Oj^O]OXOT1na0Ag^O^O[OQ1ka0Eg^O\\O^Oo0ia0Hd^O]OCk0ga0K`^O^OJh0ca0M]^O@Oe0aa0N\\^O_O4e0Ya02_^O\\O8i0n`01f^OWO<[1X`0CX_OUO`0X1T`0HX_OSOc0V1V`0EW_OTOd0W1V`0EV_OSOd0X1V`0FU_OROe0X1W`0ET_OROf0Y1V`0DV_OROd0[1U`0^O]_OWO<\\1V`0`Nm^OFk0?04]OGj`0An^ON4Oo0g0E2IC_`0HR_OK6KP1m0\\O22@Z`0JT_OK5JR1o0VO18_OX`0KU_OK2LS1o0TOM?AV`0HS_OO1MR1n0TOKf0@R`0IR_O00NR1n0SOJl0]Oo?KQ_O2N0R1m0POJU1XOl?No^O20OQ1n0nNLY1UOY`01Q@h0cN0Tc0WO[^Ob0iN2ob0\\OY^O`0jN0Qc0_OU^Oa0kNNTe01oZOKSe05\\10000O101O0000001N3MWRg7"}}, {"image_id": 28, "category_id": 1, "bbox": [700.1517333984375, 403.5250549316406, 297.74822998046875, 127.67965698242188], "score": 0.7340817451477051, "association_id": 3, "segmentation": {"size": [768, 1024], "counts": "Xe^b03lg03N1O1OO100O1O1N3NYRh01gmWO001N100001O0O1000am52[RJ4M2O1N101O00001O0000000O100000000001O0O2O1N2O1O1N2L\\hZ1OhWeN2M2O1N101O0O2O0001O0OS[OITb06k]OKVb04b]OLcM2kd02a]O5cb0F]]O\\?XOa_O8R1a0[?ZOf_O0n0h0[?[Of_OLm0k0]?ZOb_O2l0d0c?^O[_O2o0a0f?^OZ_O4l0>m?XO[_O=c0=T`0QO\\_Oc0==]`0iNW_Om09:Ra0eNV^OU1d07Va0fNS^OU1f05Xa0fNR^OV1c05\\a0fNo]OV1b07`a0dNi]OX1g03aa0kN^]OV1R1N_a0h0b^OWO^a0k0]^OXOca0l0U^OXOka0k0Q^OVOPb0l0m]OTOTa0XNS_Og2FQOYb0iN[]OB5>b1d0Ra0oNh@l0Y?QOk@l0Q>ROW_O2h2j0R>WOU_ONi2h0Zc0N101O1G9NO201O1O2N1002M6J2O2NWiX:"}}, {"image_id": 28, "category_id": 1, "bbox": [713.2286987304688, 404.7262268066406, 143.68194580078125, 78.04977416992188], "score": 0.45674365758895874, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "QUg`09bg09J3O2N1O1N2O6lXORO3Nbf0S1_YOmNaf0P19O1N1100000000PYOTOlf0P100000OaYOoNRf0o0oYOQOQf0o0nYOSOQf0m0oYOSOENYf0o0QZOSOFNYf0P1PZOSOEN[f0P1oYOVOQf0i0oYOWORf0h0nYOXORf0h0nYOXORf0h0nYOXORf0g0PZOROF1[f0m0oYOROG0[f0m0SZOSOme0m0SZOSOme0m0SZOSOme0m0c01O01O0O2O1H^YO^OTf0`0mYOBSf0"}}, {"image_id": 28, "category_id": 1, "bbox": [506.6829528808594, 364.3025207519531, 506.2359924316406, 190.04507446289062], "score": 0.3247929513454437, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "bU[=3mg01OO2Nl`o02S_PO5J2O1N101N100O101O0O101O0_N_Oc[Oa0\\d0Ba[O`0]d0BT[OK_Oc0\\e0DS[OJAc0Ze0ET[OI@d0[e0CT[OJAd0Ye0DU[OIAd0Ye0DU[OHAf0Xe0DU[OHBe0Ve0FW[OEBg0Re0IZ[OADg0id00c[OZOCg0hd01Y[ORO16Mh0id00X[OTO05Oh0hd0OZ[OSOO6Oh0hd0N[[OTON6Oh0id0MZ[OUON6Oi0id0J\\[OVOL7Oi0md0FX[OYOM8Nj0nd0nNR[O>5BM8Nj0Ue0[OQ[OCL8Nk0Ue0YOQ[ODL8Nl0Te0XOS[OCK:Mm0Te0UOT[ODK:Nn0Qe0SO_[OO@P1Pe0PO`[O0@Q1od0oNa[O0@T1md0kNc[O1@X1jd0fNf[O2AY1hd0dNg[O3AKMV1ld0iNg[O6AG0Z1kd0eNd[O:Lo0Xe0oNkZOn0We0POkZOm0We0ROV[O8Ue0GnZO4Ue0JoZO1Se0Na1OYb]62d]bI2N2N1O2N100O2OO2O0O101N3N1N2Omo`1"}}, {"image_id": 28, "category_id": 1, "bbox": [963.6615600585938, 382.9342041015625, 32.76361083984375, 76.56878662109375], "score": 0.25958335399627686, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "gTdf0;Rg0LUYOe0]f0a0M3O4K3N4L3M2N1O2N1OO1O1O100N4N4L3L5L2M4M1O2M3N2O0O3L7UOc[e0"}}, {"image_id": 28, "category_id": 1, "bbox": [260.41650390625, 319.8511962890625, 484.48828125, 241.242919921875], "score": 0.2024156004190445, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "kXd:1mg04M3M2N2N2N2O0O100O10000O10001O0O100000000O100000O1O010O1O1O010O10O010O0010O01000O010O100O0100O010O100O00100O1O100O01000O10O10O010O01O001O01O000010O01000O100O10O01O1O1000O010000O0100000O100O2O0O2O1N2IT_7MPaH6L4N2N2M3N2N2M2L5K5D;M4M2O1O1N3OO10O100000O01000000A[NcZOe1\\e0\\NdZOd1\\e0]NcZOb1]e0`NbZO`1^e0`NbZO`1^e0`NbZO`1^e0aNaZO^1_e0cN`ZO^1ae0aN_ZO_1ae0aN_ZO^1be0bN^ZO^1be0bN^ZO^1be0cN]ZO]1ce0cN]ZO\\1de0dN[ZO]1ee0cN[ZO]1ee0cN[ZO]1ee0dNZZO\\1fe0dNYZO]1ge0dNXZO[1ie0eNVZO\\1je0=00000000O2O000O101CiMoZOW2Pe0kMnZOW2Qe0kMmZOU2Re0mMmZOS2Se0nMkZOT2Se0mMmZOS2Se0nMlZOS2Re0oMlZOR2Te0>N101OO1RNoZOm0Qe0ROR[Ol0md0UOV[Oh0jd0WOY[Og0gd0XOZ[Og0gd0XO[[Og0ed0WO][Oh0cd0SOd[Ol0\\d0oNi[OP1Wd0QOi[Oo0Wd0QOj[Om0Vd0SOk[Ol0Ud0UOl[Oj0Sd0WOm[O:SO_OQe07m[O8UO_Omd09o[O7VO^Old0;n[O6XO^Okd0k[O6ZO\\Okd0>k[O5\\O[Ojd0a0i[O4^OZOjd0a0g[O5id0KW[O5id0KW[O4jd0LV[O4kd0KU[O4ld0LT[O4ld0BXZO0l0LXc`6Ok\\_I000O10000O1000000O11O1O1OTXf:"}}, {"image_id": 28, "category_id": 1, "bbox": [725.7587890625, 413.55596923828125, 219.453125, 86.26705932617188], "score": 0.06348564475774765, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "[eUb01og00O2O001O004K2O1O1N1O2N1O1O2N1O1hXO\\OSg0f0kXO[OVg0c040000O100O2O0O2O000O^ZOCdc0<[\\OEec0:[\\OGec09Z\\OHfc07[\\OIfc05Z\\OLgc02Z\\ONgc00Z\\O0gc0M[\\O3he01000000001O1O00000000000000001O0000000000O1000000000000000000001OaMOo\\O1Pc02n\\OMSc06Z21O1O1O0O10001O00O100000000000000000001O00010O000O2O0O100O100O2N]XV1LfgiN4M2O0000001O000001O3M2M`bk1"}}, {"image_id": 28, "category_id": 2, "bbox": [488.8538513183594, 624.9339599609375, 341.6596984863281, 47.80828857421875], "score": 0.05967755243182182, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "b[Q<1ng02O0000000000001O00000000001O0000000000001O000000001O0000000000001O000000001O0000000000001O00000000000000001O0000000001O01O00000001O01O0001O00010O00010O000000010O0000010O01O00000010O00000000000001O0001O000000000001O0000000001O000000010O0000001O000000010O0000001O00001O01O0000000001O00000001O0001O00000000010O00000001O000000000010O000000000001O0000001O000001O000001O0000001O01O0000000001O0001O01O00000000000000010O00000001O01O00000000000000010O000000000000001O0000000010O00000000000000000001O00000O10000000001O00000000000000000000000000000000001O00000000000O100000000000001O0000000000001O00001O0000000010O0000000000000000001O001N2O2Lck`4"}}, {"image_id": 29, "category_id": 1, "bbox": [369.8441467285156, 218.43994140625, 232.20608520507812, 190.65447998046875], "score": 1.0, "association_id": 0, "segmentation": {"size": [682, 1024], "counts": "gSj77gd0g0]O=^O`0J5K5N1N1oNjMm^OX2Pa0lMm^OV2o`0nMo^OS2Pa0PNl^OR2Sa0RNg^OR2Wa0QNe^OQ2Za0QNc^OR2\\a0oM_^OU2`a0k0O1O1O1O2N100O100O1O1O001N2O100O1O1O1N2N1N3O1O1O100O1O100N2O1O100O1O100O1O1O1N2O1O1_OTKc@m4\\?]KZ@d4d?b0N2O001O1000000O10000000000000000000000000000000000001O0000001O001O1O1O1O1O2N1O001O001O001O000000001O000000001OO10000000000000000000000O1000000000000O10000O10000O1N2O1N2N2O1O1000000O100000000000001O0000000000000000000000000000000000jJe@]4[?_Kj@`4W?]Km@a4S?]KPAb4P?\\KSAc4m>[KVAd4k>ZKWAe4g?01N10001O0O10001N1O2N2N4L5L3L4M5J5K3N4J3N2N2O0O2O1N3M4M2M4L3M3M2O2M3M8IU1jN5J5J5L4Jcfj8"}}, {"image_id": 29, "category_id": 1, "bbox": [595.915283203125, 140.01724243164062, 228.62298583984375, 156.02041625976562], "score": 1.0, "association_id": 1, "segmentation": {"size": [682, 1024], "counts": "h``<5Pe0?T[OBPd0U1YOe0J5M2N2N101N2L4[OgMS^O]2la0b0O0O100000000O100000000O010OO1000001O1O0010O1O0M4N101O00100N1N3L4O1O010O101N1N2N3M2O100O2O0O100O1O1O101N10000O100000000000O100000000000O10000000000000000000000O1000000O10000O10000O101O000000000O1000000000000000000000000000000000000000001O0000001O00001O001O0000001O000000001O000000001O0000001O001O000001O000O100O10001N101N1O2N1M3M4N1O101N1O101M3O0O2O1O001O101N1O100O10O01O3N3L2N100O1O100O2O1N2O1N100O1O1O2Nb0^O8H3M3M3M3M6I6Ii0eNgYT4"}}, {"image_id": 29, "category_id": 1, "bbox": [838.4102783203125, 134.99252319335938, 182.17401123046875, 121.1015625], "score": 1.0, "association_id": 0, "segmentation": {"size": [682, 1024], "counts": "ld_a0;ld04M4G8K7I7L3N2M3N1N4L9H4K2O1N2O1N2O1N2N100O100O1O1O100O101N100O1O100O1O001N2O00100O1L4K5N200O1O1O10O0100O100O100O1O100000000O10000000O100000000000000O100O10000O1000000O1000000O100O100O10O0100O010O10O010000O10000000O101O0000001O001O0001OO2O0000001O0000001O00001O001O001O1O001O010O00001O001O00O100000001N100O1N3M2N2O1O2N1O100O10001O001O1N2O001O1O1O1O2N1O1N3M4K?QNWl1"}}, {"image_id": 29, "category_id": 1, "bbox": [111.7788314819336, 387.5503234863281, 309.98370361328125, 250.48342895507812], "score": 1.0, "association_id": 2, "segmentation": {"size": [682, 1024], "counts": "UR[2X3na07L2N3M2O1N2N101N1O2M2O2N1O101N100O1O1O1O1N2O1O1O1O100O1O2N1N2L5K4M4M2O2M3N2N2N2N2M3M4L1O0O2O000O2O00000000000O2O0000000000000O10001O000000000O10001O0O100000000O2O00000000000O101O00000000000001O00001O001O00001O1O1O1O0000000001N10000000000O100O1N20O0100000000O10000000000000000000000000000001O00000001O0000000001O000000000000000010O000000000001O0000001O0000001O3M1O0000001O001O3M1O001Oej4OZUK2O10000O10000O1O1O1O1000000000O010000000000000000O1000O100000000000O10O1000000000000000O01000000000001O00000O100000O1000O10001O1O1NoPZ3"}}, {"image_id": 31, "category_id": 1, "bbox": [743.8051147460938, 107.19990539550781, 263.59716796875, 254.2284393310547], "score": 0.9999998807907104, "association_id": 1, "segmentation": {"size": [502, 1024], "counts": "Xn\\;U1Y>a0A;H5L3M4L4L5J;EElR8"}}, {"image_id": 31, "category_id": 2, "bbox": [40.016971588134766, 98.44770050048828, 781.0533447265625, 374.16094970703125], "score": 0.9999997615814209, "association_id": 1, "segmentation": {"size": [502, 1024], "counts": "Rkf07\\?6K4K6J5dA_OZ=b1K5L4N101N2N2O1N2N2O1N3M2N4L5L2M4L3M1O2N2N101N1O2O0O101N100O2O0O101N100O2O0O2N101N1O2N2N1O2O1N1O2O0O2N101N100O2O000O2O0O100O2N100O2N1O2N101N1O2N1O2N2N2N2N1O2N2N101N1O101N10001N101N100O2O0O2N2N101N2M3N2O1N1O2N2O0O2O0O101N101O0O101O0O10001N100O2N101N1O2N1O2N2N1O2N1O2N1O2O0O1O2N100O101N10000O10000O1000000O1000000O2O0000000O10000000000O100000000O1000000O100O10000O100O1O100O1O100O10000O10000O10000O1000000000000000000O10000000000000000O10000000000000000O10000O10000O10000O100O1O100O100O10000O100O1000000O100000000O10000000000O1000000O100000000O10000O1000000O100O10000O100O10000O10000O1000000O1000000O1000001O0O1000000000000O1000000000000000000O100000000000000O1000000000000O1000000000000000000000000000000000O100000000000000000000000001O00000000000000000O101O0000000000000000000000001O0000000O10000000000O1000000O1000000O10000O10000O100O100O1000000O1000000O100000000O1000000000000O100000000000000O1000O100000000O10O10O10000O10O10O100O100O010O1000O010000O01000000O10O1000O1000000O1000O1000O10000000000O10O1000000000O1000000O100000000O101O000O1000000O100000000O1000000O10000O100O101N100O1O10000O101N10000O1000001N100000000O2O00001N101O0O2O001N101N100O2N1O1O2O0O1O101N10000O2O0O1000001N10000O2O000O2O0O2O0O2N101N2N1cJ\\Gh3e8VL_Gf3c8XLaGe3_8ZLeGb3]8\\LfGb3Z8]LSHV3o7hLWHS3i7lLYHR3h7nLYHQ3h7mLZHR3f7mL\\HR3d7nL]HP3e7nL]HQ3c7nL_HQ3a7oL_HQ3b7mL`HQ3a7nL`HR3a7lLaHS3_7lLbHS3`7kLbHT3^7kLcHT3_7kLbHT3^7kLdHS3^7kLcHU3^7iLdHU3]7jLdHV3_7fLcHX3`7fL`HY3d7cL^H[3e7bL\\H^3e7`L]H^3f7_L[H`3o9O0O2O0O2O000O2O1O001N2O001O1O1N101O001N10001O0O2O000O2O000O2O000O2O0O101N100O2O1N101N2O0O3N2M2O2M3M3N2M3N1N3M2O1N2N2N2O1N2O1N2O1N2O1N2O1N2O1N2O2M2N3M4L6J5K`Un3"}}, {"image_id": 31, "category_id": 1, "bbox": [307.9883117675781, 112.18212127685547, 473.1570129394531, 296.85247802734375], "score": 0.0711296871304512, "association_id": 0, "segmentation": {"size": [502, 1024], "counts": "Tkn94n>NbA6W>2dA2V>4gANW>5fAMX>6dANZ>h0N;F2N2M3N2M3N2M2O2N1N2O2N1N2O1O001O00001O0O101O00001O00001O001O00000001O000000000O2O0000000000001O00000010O000001O00001O00001O001O01O010O10O0100O1O101N1O101N1O100O1O1O1O1O1O2N1O100O2N1O2N1O2N1O2N1O010O0001O001O0010O02N1O1O1O1O2N100O1N3M3M3L4@Y1^NSB@]Zh3"}}, {"image_id": 32, "category_id": 1, "bbox": [731.865234375, 66.7221450805664, 270.6826171875, 741.2510375976562], "score": 1.0, "association_id": 2, "segmentation": {"size": [858, 1024], "counts": "lo]c0d1Si0>C8H7I6K5K7I8G;E9G6I5K5L4L3N2N2N2N2N2N2a^OeK\\<]4_CPLXgMWBV2k=cM]B[2d=\\MfBa2\\=XMkBf2W=VMmBi2U=SMnBk2U=QMnBm2V=nLmBP3V=mLkBQ3Y=kLjBR3Y=kLiBS3Z=jLhBS3\\=iLgBU3\\=gLgBW3\\=cLiB[3Z=aLiB^3Y=^LjBa3W=]LkBb3W=\\LjBc3W=[LkBe3V=XLlBh3U=ULmBk3S=QLQCo3P=lKTCS4na3Y43M3M2N2N2N2N3N1N4L4L4L4L2N3N01N101O1N3N3M1O2M101N3N2M4M4K7J4L3L3N2M3L6K9F=C=C:F9F8I7I6G:EPic0"}}, {"image_id": 32, "category_id": 1, "bbox": [22.70050811767578, 133.49012756347656, 197.07052612304688, 541.7015991210938], "score": 1.0, "association_id": 3, "segmentation": {"size": [858, 1024], "counts": "[Rf0=[j07I5J5K3M4L3N3M3M2N3N1N3M2O1M3N2M3N2O1N2O0010O0000O10O1OO4L3N2M4M2fZOnMka0S2P^O[Nea0h1U^O`Nga0e1Q^OcNia0e1k]OfNma0e1c]OlNQb0l5RO=C6K3M4M4L4K5L2WCcFP8`9lGdFR8^9jGfFT8\\9iGeFW8]9eGeF[8_9`GcF_8a9[GaFe8a9WGaFi8a9RGbFn8`9mFdFR9]9kFeFT9]9hFfFX9\\9dFfF\\9\\9`FfF`9\\9\\FfFd9^9UFeFk9]9QFeFo9]9kEgFU:\\9cEiF\\:[9YEmFg:W9_D_Ga;m;000O001O0O1N3K4N2O0O1N3M2O1O2O10O0O1cNVCjDk000010^OROXWOm0hh0TOWWOl0jh0TOVWOk0kh0UOTWOj0nh0VOQWOj0Pi0VOPWOi0Qi0WOnVOj0Ri0WOmVOi0Ri0XOmVOh0Ti0XOlVOh0Ti0YOkVOf0Vi0ZOiVOf0Wi0\\OhVOd0Xi0\\OgVOd0Zi0]OdVOd0\\i0\\OdVOc0\\i0_ObVOb0^i0@`VO?ai0<1O1O010O100O0100O0100000000000O100000000O100000000O10000000000000000000O10000O10000O0100000O1000O0100000O01000O100O010000O010O1000O10O10O0100O01000O100O1000000O1000O0100O10O10O10000O100O1O100O100O10000O100O100O1O1O100O100O1O10YVO]OWi0c0gVO_OYi0a0fVOAYi0?fVOCYi0=gVODXi0M1N2O001O1O0O2O00000000O100000O1000000O10O10000O1000000O10O1000O10000O1000000O1000O10O10O1000O100000000O010000O0100000O1000O10O10000O0100000O10O100000O100000O10O10O100000000O1000000O100O10000O100O101O0O010O100O101N100O1O1O1O101N1N2N2O2O001N1O2N100O101ImUODTj0;nUOCTj0;600O100010O000000001O3M2N00000001O00001O0N3IXj6"}}, {"image_id": 32, "category_id": 1, "bbox": [357.9371643066406, 130.3109130859375, 236.65890502929688, 645.7599487304688], "score": 0.9999997615814209, "association_id": 1, "segmentation": {"size": [858, 1024], "counts": "[Y\\9R1Ui0X1QOc0B9I6L101N1O2N101N1O2ON2N101N1O2N1O1O2N1O1O1O2N1N2O1N2O02M3N3M2N3M2N3M2N5L5I9F>oZOQM^a0e3S]OhMYb0g5D:F9H6N2N2N4L7IX2gM7J4K4K4L5K6J8G:G5K4L3M3N1O3M3M4^EmAU8e>eFQBY9j?N2N1N1O1O2O0O1O1O100O1O1N2N2N2dM__O\\Jd`0b5f_OmIc`0P6e_ObId`0]6m1O1000000O10aJTJhB3n0i5TgMfAZ2[>jM_AW2c>kMWAW2j>lMPAV2Q?i41O1O1O1O1O1O1O001O1O1O001O2NN200O1O1O1O100O100O100O100O100O100N3M2M3K5K5M3M3N2O1M4L3F:@a0^D_Be9e=VFdBc9_=YFhBb9[=YFkBc9X=XFnBd9V=UFRCf9S=kE\\Co9m>CH8K4M4N1O2N2N1O2M3N2N2O1N2O1O1O1O1O1N201N2O001O1O10O102OoMR[OPNQe0l1g[O^M]d0\\2Q\\O^Mlc0]2c\\OVM`c0e2b\\OZMcc0`2^\\OaMec0Z2\\\\OgMjc0P2X\\OQNmc0g1U\\O[NQd0Z1P\\OjNSd0n0o[OUOTd0c0n[OASd08o[OMQd0IU\\O3dj06WVOLch0:VWOMch0d0lVODjh0]1D:K5L4M6[IcMeD]2X;hMfDY2V;jMgDZ2U;hMgD]2W;dMhD]2V;eMoDW2o:kMPET2P;mMQER2n:nMm@AT1DjMj2U`0SNh@Fn0GRN`2X`0VNa@HS1CRNa2Z`0UN^@JT1ARNb2\\`0SN\\@NP1DPNa2c`0nMZ@11mNCV4R`0nLV@20QOCQ4W`0jLU@71QO]OQ4]`0gL`_Ol0f0^NUOU4e`0`L`_On0e0Y3k?jKe_Oh0=`3n?hKi_Oe05f3R`0fKc_Og0?a3n?hK]_OEG;R1V4j?jK]_OCJ:Q1@mNU4k`0]Lc_O_OE;R1^4f?gKh_O[OB;S1d4c?fKh_O[OC5X1i4]?hKf_OZOF0]1m4W?iKf_OZOFN_1o4U?gKh_O^OALa1Q5W?bKi_O1P1_4W?`Kg_O3S1\\4W?aKb_O7X1V4W?bK]_O<^1P4Z?ZK\\_Of0Z1Q4_`0oK`_OR4^`0oKd_Oc2eNnLea0a0j_OT2lNYMUa0g0S@U1XNaMg0a0o`0h0U@m0FZNU`0i0c@9_OmNn?j0aAWOfNNh?k0cDUO];j0eDUO[;l0eDSO\\;m0dDQO];P1eDmN\\;S1dDlN\\;U1eDiN`;S1`DkNj;n0TDROn;m0RDROPL4O1O100000000010O2N1O1O2N101N1O1O2N101N101M3N1O2N1O100N2O1O1O1O1O1O2WO^\\OEdc06k0O10001O1O001O0000001O000000010O1001OO10O010000000O10O010O11O00O10O01O2N100O001000001OO01O100O10000O010O1O2O0O10O02M3M2N`_k2"}}, {"image_id": 33, "category_id": 1, "bbox": [447.93389892578125, 201.89834594726562, 249.609130859375, 475.3065490722656], "score": 0.9999985694885254, "association_id": 1, "segmentation": {"size": [683, 1024], "counts": "eb`97md0>B=C9I7XOdNY]Oa1ab0h0I6G9D=VOi0H8L5M2N2O0O1N2N2MZNP@XNn?h1]@nMd?P2c@iM^?W2g@cM[?\\2i@_MY?`2l@ZMV?c2QAVMR?c25fMa@S2`?_NT@]1l?lNn_OS1S`0SOf_On0[`0UOa_Ok0a`0XO[_Oi0d`0[OW_Of0j`0]OQ_Oe0o`0k1O100O1O1O101O1O1O1O1O100oAjKl:W4kD[Ll:e3REbLh:_3WEdLg:]3VEgLh:Y3UEmLh:T3SETMi:l2jDhMo:Y2dDZNU;g1dDeNV;[1fDlNY2]Lh5h4jGQOV2`Lm5`4iGUOT2aLQ6\\4eGYOR2dLV6U4aG^OS2eLX6c8_IiGZ6h9md08F:G8H9CWDPOTO`0df0YAGe>:WAJi>6SALo>4g@4Z?M`@8a?HX@NmNSOk`0P1S@1UOlNi`0U1m_O2\\OfNg`0]1f_OOEbNe`0n1T_ODZa0V201O01000001O0O\\_OULi?m3T@VLk?l3m_O^Ln?e3k_OeLP`0]3i_OjLT`0Y4N1O1O2N102M3SOcJgA^5W>eJeA^5X>gJdAZ5[>hJbAY5^>iJ`AX5^>jJ`AW5`>kJ]AW5b>iJ]AX5c>iJ[AX5e>h0O0O2O01O0000000000000000001O0O100O2O000N2O1N2O2N1O001O1O001O1O100O100O10000OTBoI`B5J6Jmcb0LV\\]O5K4N1O1O1O00001O0000001O01O0000001O001N2N5DTXh7"}}, {"image_id": 33, "category_id": 1, "bbox": [51.342369079589844, 399.074462890625, 253.088134765625, 283.925537109375], "score": 0.9866470098495483, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "RZS1m0[d07I4M3M2N2N3K4F:J6L4N3N1O1O1N2N2oN]MS_Oj2b`0U1N2N2O1O1O1O1M3M3M3N2N2O100O1O1O1O1N2O1N2O100O1O1O1N2O1N2O1O1O100O1O100dMdJhD]5T;jJhDW5U;nJiDR5U;RKhDo4W;SKgDn4W;UKgDl4X;WKdDk4[;WKcDj4\\;WKcDj4\\;XKbDi4\\;ZKbDg4];ZKbDg4\\;\\KbDe4];\\KbDe4^;\\K`De4_;\\K_Df4`;\\K^De4a;]K]Dd4b;^K]Db4c;_K[Db4d;`KZDa4e;aKYD`4f;bKXD_4g;cKWD^4h;dKVD]4i;fKRD]4n;eKlC_4S<]200O100000000O10000000000000000000000000000000000000000000000000000000000000000000000000000000000000O1O1O1O1L4L4M3N2N2O1N2M3N2N2O1N2O1O200O010O1O2O0O100O10000cJ]BR3c=eLlBS11]NR=N_Co09POXY=ZORCc0S=nN[Cn0c`0N001O000O1O3M3M4L2N1O100O1O001O1N2O1O2N1O1O1O001N101O1N2O0O2OVXP`0"}}, {"image_id": 33, "category_id": 2, "bbox": [472.0242919921875, 283.083984375, 250.62335205078125, 374.09735107421875], "score": 0.8328986763954163, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "oQX:jd09J1N2OO100M_[O\\Obd0`06M3N2O2NZfd0MgY[O4N1O1O1GC_[O2N<^d0=A?L4M3O10000O1O1O1H]Ng\\Od1Xc0^Nf\\Oc1Zc0]Nf\\Oc1Zc0]Ne\\Od1[c06O10000000000001O00000VNe\\Od1[c0[Ng\\Od1bc0N2N2bNY\\OT1Sd0L1O1O001O2N2N4H6N1O1N5AT[O30MZdd09aP\\O8J3N001O0001O00001N10010O00001O0010O0002N4M2M1O010O1O1O001O001O01O0001O01O01O000001O00010O000001O0001O00000001O0000000000000O2O001N1OnVj6"}}, {"image_id": 33, "category_id": 2, "bbox": [240.22406005859375, 331.3019104003906, 20.101959228515625, 4.892242431640625], "score": 0.058401092886924744, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "dgS51Ye0101O000O1000O101O000OZXo?"}}, {"image_id": 34, "category_id": 1, "bbox": [0.0, 149.3645782470703, 1024.0, 270.01324462890625], "score": 0.9999994039535522, "association_id": 1, "segmentation": {"size": [683, 1024], "counts": "YP7:Pe04M2M4L3N000O2O0O101N100O2O0O101N1O1O2O0O1O2N1O1O2N1O2N1O1O2N100O2N100O101O0O100O2O000O10001N100O10001N100O1O101N1O100O2N1O1O2N1O101N1O101N10001N100O2O000O2O00000O101O0O10000O10001N100O100O101N100O100O2O0O100O101N10000O2O00000O2O00000O101O00000O1000000O10000O100O100O100O100O100O101N100O10000O1000000O1000000O10000000000O010000000O1000000O0100000O10000000O0100000000000O010000000000000000000000000000000000000000000000000000000000000000SMQL^Do3b;RL]Dn3c;SL\\Dm3d;TL[Dl3e;ULZDk3e;VL[Dj3e;WLZDi3f;XLYDh3g;XLYDh3g;XLYDh3g;XLYDg3h;YLXDg3h;XLYDh3g;XLYDh3h;VLYDj3g;VLZDi3f;VL[Dj3e;UL\\Dk3d;UL\\Dk3d;TL]Dl3a>000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001O0000000000000001O0000000000000001O00000000000000000000000010O00000000000000000001O01O0000000010O0000000000010O000000000010O000000000001O000001O0001O000000001O00001O00001O0O101O00001O000000001O0000001O00000000001O000O100000001O000000000000001O000O100000001O00000000001O0O10001O00000000001N100000000000000000000O100000001O00000000000O1000000000000000000000000O100000000000000000O1000000000O10O100000000O1000000O1000O10O1000000OgN^KkAb4T>bKiA^4W>dKgA\\4Y>gKdAY4[>iKdAV4]>jKcAV4]>kKaAV4_>jKaAV4^>lKaAT4_>mK`AR4a>nK_AR4a>oK^AQ4b>PL]AP4c>QL\\An3e>RL[An3e>SLYAn3g>SLXAm3h>TLWAk3j>VLUAj3k>VLUAj3k>WLTAh3l>YLTAg3l>ZLRAf3o>ZLQAf3o>[LPAc3R?]Ln@a3T?`Lk@]3X?cLh@Z3[?gLc@X3_?hLa@V3a?kL]@S3f?mLY@S3h?mLW@R3k?oLS@Q3n?oLP@R3Q`0oLm_OQ3T`0oLk_OQ3V`0R10O1O1O1O100O100O1000000000000000000O10001O000000000000000000000000001N1UL__Ol2a`0TM__Ol2a`0TM__Ol2a`0TM`_Ok2``0UM`_Ok2``0UM`_Ok2``0UM`_Ok2``0UM`_Ok2``0TMa_Ol2_`0TMa_Ol2_`0UM`_Ok2``0UM`_Ok2``0UM`_Ok2``0UM__Ol2a`0TM__Ol2b`0SM^_Om2b`0n00000000000000000000000001O0001O000000000001O00000000000000001O000000001O0001O0001O000000001O0001O0000mK`_O[3a`0`Ld_O_3\\`0`Le_O`3[`0`Lf_O_3Z`0`Lg_O`3Y`0`Lh_O_3X`0`Li_Oa3V`0_Lk_O`3V`0^Lk_Ob3U`0^Ll_Oa3T`0^Lm_Ob3S`0^Lm_Ob3S`0^Ln_Oa3R`0^Lo_Ob3Q`0^Lo_Ob3R`0]Lo_Oc3P`0\\LQ@d3o?[LS@d3n?[LS@d3m?[LT@e3j`0O000000001O00000000001O0000000000001O000000000000001O00000000000O1000000O1000000O1000000O1000000O100000000O10000000000O10000000000O100000000O10O1000O10000O1000O0100O10000O01000O1000O010000000O0100000O010000000O10O1000O10O10O1000O0100O010O010O010O0O2N1N3N1O2N2O0O2O001N2J5N3O10O0100O01000O10O10O10O10O10O01000O0100O010O0010O010O010O10O01000O01000O10O100000O10O1000O10O10O1000O0100O0010O010O010O0010O010O01O10O10O010O01O10O01O10O0100001N10000O2O0O10001N100O10001N100O101N100O1O2O0UNY^O1ha0OY^O0ga0O\\^ONfa00\\^OOda00^^ONca02^^OMba02`^OLba03_^OcNJm0ga0?l^O@Ua0`0l^O_OUa0?l^OATa0?m^O_OTa0`0m^O@Ta0?l^OAUa0=m^OAUa0>k^OBVa0Z]OEYO03MZc0=[]OFXO03L[c0>Z]OFXO03L[c0>Z]OEYO13K[c0=Z]OGXO0ec08U]OFXO1cc08V]OGWO1dc06V]OHXO0cc07V]OIWO0cc07W]OHWO0cc06[1M4MVP:0boE4Q[OOm0Mob0l0Beb0d0[]O\\OXOMWc0h0`]O[OXONWc0h0a]OZOWOOXc0h0`]OZOVO0Yc0g0`]O_O`b0b0^]O@`b0a0`]O@_b0a0`]O@^b0b0a]O_O^b0a0b]O@]b0a0b]OA[b0`0e]OCXb0=h]OFTb0mLhAS3W>nLiAR3W>oLhAQ3W>PMiAo2W>RMiAn2W>SMhAm2W>TMiAl2W>TMiAl2W>TMiAk2X>UMgAl2X>UMhAj2Y>VMgAj2Y>VMgAi2Z>XMeAh2Z>YMfAf2[>ZMeAf2[>ZMdAf2]>ZMcAf2\\>[MdAd2]>\\McAd2\\>]MdAc2\\>]McAc2^>^MaAb2_>^MaAb2_>^MaAb2_>^MaAa2`>_M`Aa2`>_M`Aa2`>_M`Aa2`>_M`Aa2`>_M`Aa2`>_M`Aa2`>_M`A`2b>_M^Aa2b>_M^Aa2b>_M^Aa2b>_M^Aa2b>_M^A`2c>`M]A`2c>`M]A`2c>`M]A`2d>_M\\A`2e>`M[A`2e>_M\\Aa2d>_M\\Aa2d>_M\\A`2e>`MZAa2f>_MZA`2g>`MXAa2h>_MXAa2h>_MWAa2j>_MVAa2j>_MVAa2k>^MTAb2m>^MSAb2m>^MSAb2m>^MRAc2n>]MRAc2n>]MRAb2o>^MQAb2o>^MPAc2P?\\MQAd2o>\\MQAd2o>]MPAb2Q?^Mn@c2R?]Mn@c2R?]Mn@c2R?]Mm@c2T?]Ml@c2T?]Mk@c2V?^Mi@b2V?_Mi@a2X?_Mg@b2Y?^Mf@b2[?^Me@b2[?^Md@b2]?_Ma@b2_?^M`@c2`?]M`@b2a?^M^@c2b?^M]@b2b?_M]@b2c?_M[@a2e?aMZ@_2e?cMY@^2g?bMX@_2h?bMV@^2j?eMR@]2n?dMP@]2o?eMn_O\\2S`0fMf_O_2Y`0Y1100O010O010O10O10O10001N100O10000O100O1O100O100O100O1000000O10000O1000000O10000O10000`Ln^Of2Sa0YMP_Oe2o`0\\MR_Ob2n`0_MQ_Ob2o`0_Mo^Ob2Pa0_Mn^Ob2Sa0k00O010000O010O100O10O0100O_Lo^Oj2Pa0WMP_Oi2Pa0i0O100O1O1O1O1O1O1N2O1O1O1O1O100O1O10O10O10000000O1000O10[N`_O^Na`0^1f_O_NZ`0i0c_OVN:n0S`0h0j_OSN9R1n?i0m_OPN:U1i?i0m@UOT?i0o@VOP?Dh_O2Y1:o>Bj_O3Y19o>@m_O3W1]OP@4V1=l>]OQ@2V1`0k>ZOS@2U1c0j>WOaBg0Sa0O1N2O1N3N1N2O1N2N2N1O2N1O2N1O2NUR_1"}}, {"image_id": 35, "category_id": 1, "bbox": [15.267549514770508, 59.91611099243164, 436.25372314453125, 166.333251953125], "score": 0.999995231628418, "association_id": 2, "segmentation": {"size": [900, 928], "counts": "^P?b03BUk0k0K5K5L4K3N110O00001O001O001O1O00010O000010O100O10O100O100O100O100O010O000100O10XWO[NPg0d1oXO^NQg0b1eXO[NkN6`h0^1dXOjN]g0V1aXOlN_g0T1_XOnN`g0T1^XOmNbg0S1\\XOoNcg0S1ZXOPOdg0Q1[XOPOeg0P1YXOROfg0n0YXOTOfg0m0XXOUOgg0k0XXOVOig0j0VXOWOig0i0WXOWOig0i0WXOWOjg0i0UXOXOjg0h0UXOYOlg0g0SXOYOng0g0QXOZOng0f0RXOZOog0f0PXOZOPh0g0nWOZORh0f0nWOZOSh0e0mWO\\ORh0e0mWO[OSh0e0mWO[OTh0d0lWO\\OTh0d0lWO\\OTh0d0lWO\\OUh0d0jWO\\OVh0d0iWO]OXh0b0hWO]OYh0c0gWO]OZh0b0fWO^OZh0c0eWO]O[h0c0eWO]O\\h0d0bWO\\O^h0f0_WOZObh0f0]WO[Och0f0\\WOZOeh0e0ZWO\\Ofh0d0ZWO\\Ofh0d0ZWO\\Ofh0e0ZWOZOfh0f0\\WOXOeh0h0[WOWOeh0i0[WOWOeh0i0[WOWOfh0h0[WOWOeh0j0ZWOVOgh0i0YWOWOgh0i0YWOWOhh0h0XWOXOhh0h0XWOXOhh0h0XWOXOih0g0XWOXOhh0h0XWOXOhh0h0XWOXOhh0i0VWOXOjh0i0TWOXOmh0h0RWOXOnh0o10000001O0000001O00001O00001O0001O01O0000001O000000001O00000O101O00001N10001O000O2O00000O101N10000O101N10000O101O0O101O000O1000001O0O10000000001N100000000000000000000000O100000000000000000000000000001O0001O00000000O100000000000001N100000000000000000000001O000000000000001O0001O1O102M3M4L2OO01O1O010O001O0010O01O10O01O01000O010O10O01O010O1O001O10O01O0010O01O010O010O010O000010O01O01O01O0001O01O01O01O01O00010O01O001O01O01O1O001O00001O00000O2O00000O101O0O100000001N101O00001N2O001N2O1O1N2O1N2O1O0000001O00001O001O001O001O01O01N101O0J7N101M]ai>"}}, {"image_id": 35, "category_id": 2, "bbox": [235.86886596679688, 432.35009765625, 261.45867919921875, 47.07763671875], "score": 0.9999719858169556, "association_id": 3, "segmentation": {"size": [900, 928], "counts": "bVS71Pl00QTO1nk0300O101N1000000O2O00O1000000000000000000000000000001O000000000O1000000000001O00001N101O0Oedl10Y[SN4N2N1aTOHQk09nTOIQk07oTOIPk08PUOIoj07QUOHPk08QUOGoj09QUOFPk0:=0000000000O10O1000000O10000000O10O10000000O1000000000000000000O10O10000000000000O1000O1000000000000O100000000O100O1O100O10001O000001O000001O000010O01O1O100O001O0001O0@eTO7[k0IfTO7Zk0GhTO8Xk0HiTO7Wk0HjTO9`k00001O001O010O1O00_OKSUO5mj0KTUO5kj0JVUO5]k00001O001O001N2Omkm;"}}, {"image_id": 35, "category_id": 2, "bbox": [45.18974304199219, 146.04229736328125, 398.28607177734375, 93.64810180664062], "score": 0.9999672174453735, "association_id": 2, "segmentation": {"size": [900, 928], "counts": "Q[i11Sl00O2O1N101N10000O2O000O10000O1000000000000O1000000000000000000O01000000O100000O010000000000000000000000O10O100000000001O0000000000001O000000000000000000O10000O10000O10000O10000O10OO2N2N2N1O2O01000O10O1000O010000O01000O010O1000O100000O1000O1000000O01000O1000000001O0O10001O002N2N001O0000000001O0000001O000O2K^OfTOb0Zk0_OeTOa0[k0_OeTOb0Zk0_OeTOa0Zk05000000000000O10000000000000000000O1O1N2O1O1O1O10000O10000000000000001O00000000000000001O00010O001O001O000010O0000010O0001O01O01O010O01O01O01O00001O01O01O10O0001O010O00001O01O00001O010O001O001O00000010O000010O01O010O00010O00001O01O0000000000001O0001O00000001O00001O000010O01O00001O01O00000001O0000000O1000001O0000000O2O1N2NmPm>"}}, {"image_id": 35, "category_id": 1, "bbox": [0.0, 665.2225341796875, 139.964111328125, 73.30804443359375], "score": 0.9999443292617798, "association_id": 4, "segmentation": {"size": [900, 928], "counts": "ce0g0Zk09H3M;D4L3L5N2OO0010M201000O0100000O101O001O001O0010O00000000O10000000000000001O001O1N2O1O1N2O001O001O00001O0000000000000000000000000000O10000O1000000000O1001O0000000001O000001O00001O000000000001O0O1O100O100O1O2O001N100N3N1O2O000O2O0O101N1N3O0O2N2N3M2O1N1O2M9Hgike0"}}, {"image_id": 35, "category_id": 1, "bbox": [209.85678100585938, 363.40948486328125, 268.5741882324219, 109.63372802734375], "score": 0.9999362230300903, "association_id": 3, "segmentation": {"size": [900, 928], "counts": "e\\j63ok03L3O1O101N100K5O100O1iTO]Omj0c0SUO]Olj0d0TUO\\Okj0e0UUO[Okj0e0UUO[Okj0f0TUOZOlj0f0SUO[Omj0f0RUOZOnj0i0oTOWOPk0n0100000000O10O1000000O10O1001N1000001O0O101O0000001O0000001O001O0010O01O001O2N1O1O1O1O1O2N1N101O00001O0O1000000O101N10000O100O010O1O100O1000000O10000000000000000000000000O101O0O1000000O100O2O0O100O2O0O1O1O0O2O1O1O1O100O10O10O1O010O010O0100O01000O10O01O010O010O1000O01000O10O01000O10O100000O010000O10000O10000O100000O1000O01O100O1O10O01O100O1O1M3N2O100O00101O00000000001N[OTVOoNFNVj0R1VVOmNF1Uj0P1VVOoNE1Uj0m0ZVOPOC2Tj0b0kUO^Oh00^i0:PWOFQi07QWOJnh04TWOLmh0MYWO4[j01O01OY`f<"}}, {"image_id": 35, "category_id": 1, "bbox": [404.45880126953125, 281.7732849121094, 264.768310546875, 96.4945068359375], "score": 0.9998843669891357, "association_id": 1, "segmentation": {"size": [900, 928], "counts": "Ynd;1Rl0`0A2M2O001O1O1N101O1O1O00001O000010O01O001O00001O00001O001O00001O0000000O101O0O10001O001O1O1_UOgNVj0Z1fUOkNWj0b10\\NeUO]1bj0O010N2O2N1O1O00001N100000001O0000001O000000000000O10001O00001O1O001O010O001O0000000000000O100000000O100O100O1000000O1000001O000O101N1O11`NbUOX1Yj0dNkUO1NZ1Uj0hNmUOL0[1Sj0iNmUOL0[1Qj0kNVVOT1ii0mN[VOo0di0RO]VOn0bi0RO^VOn0ai0SO_VOm0ai0SO`VOl0`i0SOaVOm0_i0ROcVOm0]i0ROeVOm0[i0ROgVOm0Yi0ROiVOn0Vi0ROjVOn0Vi0ROkVOm0Ti0TOmVOk0Si0TOoVOl0Qi0ROQWOm0Pi0QORWOn0Rj001O1O1O010O00001O00000000001O000000000000O1000000000000O101O0O100O10001N01000O100O100O100O010O0001M2N2M300100O001O00N3N11O001O010O01O1O1O001O1O1O1O101M3N3KUnk7"}}, {"image_id": 35, "category_id": 2, "bbox": [833.869140625, 20.67694854736328, 49.50579833984375, 40.8717041015625], "score": 0.9998559951782227, "association_id": 9, "segmentation": {"size": [900, 928], "counts": "`cWg01Ql02M3M3N2O0000001N10OO2O1J600O20ON[OgTO0Ob0\\k0_OgTO>[k0CbTO=]k0AdTOb0_k0O2N101N010O1O010O1O2N101N3LRYY1"}}, {"image_id": 35, "category_id": 2, "bbox": [459.00604248046875, 329.7572021484375, 206.60723876953125, 52.819244384765625], "score": 0.9994243383407593, "association_id": 1, "segmentation": {"size": [900, 928], "counts": "joW=4ok01O2O0O100N2O1O10000O10O01O00100O10O10O01N1010O010O10O1O1O1ONHZTO7gk0IYTO7gk0JXTO6hk021N2O100O10000O100LSTO1cf]10]UcN0O2O0000001O00001O01O0001O000010O000001O01O01O00010O000000001O0001O0001O0001O01O00001O00001O01O01O00001O001O00000000000O100000000O10000O1000O10OO2N020O01000O100O010O100O1O2NeiV7"}}, {"image_id": 35, "category_id": 2, "bbox": [546.474609375, 115.5594711303711, 351.66033935546875, 117.24811553955078], "score": 0.9993245601654053, "association_id": 0, "segmentation": {"size": [900, 928], "counts": "Wlf?1Rl02N100O2O000000O2O00000O2O00X`\\21a_cM7N2O0O2O000O101O0O1O1O2N1O101O0O100O1O1O1L4O00100O100O100O01HoTO[OSk0d07N1K600O100O10O10O101O0O100O101N100O2O000O101O0O101O000O2O001NaPm00nmRO1nVO1Pi03mVOMRi04nVOMPi05oVOKQi05oVOKPi07nVOKQi05oVOKQi05oVOLPi04PWOLPi04PWOLPi05oVOLPi04PWOLPi04PWOLPi04PWOLPi05oVOKQi05oVOLPi05oVOKQi05oVOKQi05oVOKQi06nVOJRi06nVOJRi06nVOKPi06PWOJPi07oVOIQi07oVOJPi06PWOJPi06PWOKoh06PWOJPi06QWOIoh07QWOJnh06RWOJnh07QWOIoh07QWOIoh07QWOIoh07QWOJnh06SWOImh07SWOImh07SWOImh07TWOIkh07UWOIkh07UWOJjh07VWOHjh08VWOHjh08VWOHjh08VWOIih07XWOHhh09WWOGih09WWOGih09WWOGih09XWOGgh09YWOGgh0:YWOFfh0:ZWOFfh0:[WOFdh0:\\WOFdh0:]WOFch09]WOGch09^WOFbh0:^WOFbh0:^WOGah09_WOGah08`WOI`h06`WOJ`h06`WOL_h02bWO1[h0OfWO1[h0LfWO4[h0JfWO7[h0BjWO>Wh0_OkWOa0Uh0^OlWOc0ji0000010O01O001O1O001O000000O100O100O1O100O100O10O0100O10O010000O10O1000O10000000000O10000O100O10000O2O0O2N3LkQk0"}}, {"image_id": 35, "category_id": 1, "bbox": [0.0, 319.19537353515625, 378.67230224609375, 152.64590454101562], "score": 0.9989135265350342, "association_id": 10, "segmentation": {"size": [900, 928], "counts": "U;W1ej0=I4L3N2M3M200O2O000O10000000000O100000000001O000000001O000000000O101O0000000O2O000000001O0O1000000000O100000000000000000000000001O0000001O0000001iWOQNWf0o1hYORNXf0n1gYOSNYf0n1eYOSN[f0n1cYOSN]f0n1bYORN^f0o1aYOQN_f0P2_YOQNaf0Q2]YOoMcf0S2ZYOnMff0T2XYOlMhf0U2WYOlMhf0V2UYOkMkf0Y2QYOgMof0]2mXOcMSg0`2jXO`MVg0d2eXO]M[g0d2dXO\\M\\g0e2cXOZM^g0g2aXOYM_g0h2`XOXM`g0j2QXOlL8:gg0P3WXOQMig0P3VXOPMjg0Q3UXOoLkg0R3SXOoLmg0Q3RXOPMng0Q3QXOoLog0Q3PXOoLQh0Q3oWOoLQh0Q3oWOoLQh0Q3PXOnLPh0R3QXOmLog0T3QXOkLog0U3RXOjLng0V3RXOiLog0X3QXOgLog0Y3QXOgLog0Y3QXOgLog0Y3QXOgLog0Y3RXOfLng0Z3RXOeLog0[3QXOeLog0Z3SXOdLng0\\3RXOdLng0[3TXOcLmg0]3=O10000O1`N[WOAeh0;_WODbh0;_WOEah0;_WOEah0:aWOD`h0;aWOE`h09aWOG_h08bWOG_h08cWOG]h09cWOE_h0:bWODah0:aWOD`h0<`WOCah0aWO@ah0>`WOZOhh0f0YWOWOjh0g0XWOWOih0i0WWOoN[OK_i0U1WWOPO[OJ^i0V1VWOQOQi0o0oVOQOPi0P1PWOPOPi0P1oVOQOQi0o0oVOQOQi0o0nVORORi0n0nVORORi0n0mVOSOSi0l0nVOTORi0l0nVOTORi0l0mVOUOSi0k0mVOUOSi0l0lVOTOTi0m0kVOSOUi0n0jVOROVi0n0jVOQOWi0P1hVOPOXi0P1hVOPOXi0Q1gVOoNYi0Q1gVOoNYi0R1fVOnNZi0R1fVOnNZi0S1eVOmNHE[i0^1mVOmNHE[i0_1lVOlNHF\\i0_1kVOkNIF[i0`1lVOiNKFYi0a1mVOhNJGYi0a1mVOhN\\i0Y1cVOgN]i0Z1cVOdN]i0_1aVOaN_i0a1`VO^N`i0c1`VO[Nai0e1?1O000O10000000O10000O10000O100000000000000000000O0100000000000000O100000000O100000000O1000O10000O00100O1O1O1O1O00100J7N100O1O1O1O2N100O2O0O7J1O001O0O2O001O0OUWOYO\\f0f0cYO\\O\\f0d0ZYO\\OQN1fh0b0XYO_OPN1hh0>XYODmM0kh0;WYOOjf0CVWO4P2;Zf0]ORXO0G8m1:[f0^OYXO6^1;Xf0@ZXO4_1;Xf0AZXO3^1Vf0DdZO;\\e0FdZO:\\e0FdZO8^e0HTZOMhM:Uh0JRZOLjM8Uh0LQZOLjM8Uh0LQZOLjM8Th0MRZOKjM7Uh0NQZOKjM7Uh0NQZOKjM7Uh0OPZOJlM5Uh01oYOJlM4Vh02nYOJlM4Vh03mYOImM3Vh05mYOHmM2Wh06lYOHmM2Wh08jYOFPN0Wh0=fYOCSN0Wh0d0_YO\\ORg0d0nXO\\OQg0f0nXOZOSg0e0mXO[OSg0e0mXO[OSg0f0lXOZOTg0f0U210O01O001O00010O000000000001O00000000jWOYOPe0f0eZO[O]M1mg0e0eZOZO]M2ng0d0eZO[O[M3og0b0fZO\\OZM2Qh0a0eZO]OYM3Rh0`0eZO]OYM3Rh0`0eZO\\OZM4Qh0`0fZO[OYM5Rh0?eZO[OZM6Qh0?kZOBTe0>lZOBTe0>lZOBUe0=kZOCUe0=kZOCUe0=kZOCUe0>jZOBWe0=iZOCWe0=iZOCXe0;iZODXe0fTODZk0d0N101O00001O001O010O00001O01O01O0001O1O001O001O00001O001O001O001O000001O0000001O00010O001O001O0001N101N1O2N3M2N2N2Nabl1GoaRNOak0:O10000O101N10000O2O0O101M21O001O00000000000000001O000000000001O001O002N1O1O2N1O2N1O1O0000001O0000001O001N2O001O1O001O000101N010O10O010O00010O001O01O00O2O0000001N101O001O001N2O001O0010O0001O010O0010O01O0010O01O0010O000000010O000000001O000001O01O000O2O00001O00001O0000001O00000001O00001O001N1000001O0000001O00001O010O001O001O001O0010O0001O0010O0001O010O010O00010O001O01O0010O01O001O001O10O01O00001O001O001O001O1O001O001N101O001O001O00001O00001O00001O001O00001O01N10001O0O101O0O101N1O1O2M20000O1000000000000O1000000O1000000000O100O2O0O1O2N101fN\\UOQ1ej0nN_UOm0_k0[O6JThQ2"}}, {"image_id": 35, "category_id": 2, "bbox": [126.50726318359375, 481.700439453125, 288.5484313964844, 85.9266357421875], "score": 0.9964189529418945, "association_id": 7, "segmentation": {"size": [900, 928], "counts": "egU52Ql03N001N1000000O100000000O10000000000000O1000000000001O000000010O0000000000000000001O000000000000000001O0000000000001O0000000001O000000001O001N2O2NYeo00i^oN0bk00]TO3NO2NWk00iTO?NCWk0h0M3N3N1O2O0000O1O1O1M3N2O1O1O1O010O001O0O1L41O00010O10O1O001O0O1L4N3O010O100O1O100O1000000O1000001N2O0O]gg00cXXO2N1O1O101N1000001O0000000000000001O0000000O10000000000O101O0O`PU>"}}, {"image_id": 35, "category_id": 1, "bbox": [82.51924896240234, 403.4828186035156, 346.6693115234375, 149.86441040039062], "score": 0.9962098598480225, "association_id": 7, "segmentation": {"size": [900, 928], "counts": "[XZ2275J4Vk0KkTOd0ej0ZO_UOP1_j0RO_UOo0Xj0nNiUO5Mo0Yj0mNiUO5Mn0Yj0oNhUO\\1Xj0eNgUO[1Yj08O10001N10000O1M4O03M1O001O00001O01O000001O01O001O10O01O001nUOTNki0S2O00100O1000O100O1O2N2O1N2N2N001O001O0010O01O3M3M1O1O100O1O\\VOaNdh0^1\\WObNeh0^1ZWObNfh0`1XWO`Nih0`1VWO`Njh0a1UWO_Nkh0b1TWO^Nmh0a1SWO_Nmh0b1RWO^Nnh0b1QWO_NPi0`1mVOcNSi0^1kVOcNUi0]1kVO`NYi0`1g0O2M010O010O0001O01O0000010O000000001O01O00000001N10000O10000O10000O2O0000O100000000000000000000O10001O0O10000000000O1000001O0000000O10001O000000000O2O000O2O0O1O2N100O2N11O00TOVN^WOj1ah0XN_WOg1ah0YN_WOh1`h0YN_WOg1`h0ZN`WOf1_h0[NbWOd1]h0]NcWOc1\\h0^NPWOI=h1bh0aNoVOI>f1bh0bNoVOJ>d1bh0cNPWOI?d1_h0dNSWOF?f1^h0cNUWOE>h1\\h0dNmWO\\1Qh0eNoWO[1Qh0eNoWO\\1og0eNQXO]1mg0cNSXO^1kg0cNUXO^1jg0bNWXO_1gg0aNYXO`1fg0`NZXOa1dg0`N\\XOa1cg0_N]XOb1bg0_N^XOc1_g0]NaXOf1\\g0ZNeXOf1Zg0[NeXOf1Zg0`NaXOa1\\g0aNcXO`1\\g0aNdXO_1[g0aNeXO`1Zg0aNfXO_1Yg0aNgXO_1Yg0bNgXO^1Xg0bNhXO^1Xg0bNhXO^1Xg0bNhXO^1Xg0bNhXO]1Yg0cNgXO]1Yg0cNfXO^1[g0aNeXO_1[g0aNeXO_1[g0aNeXO_1[g0bNdXO]1]g0cNcXO]1]g0cNcXO]1]g0cNcXO]1]g0gN_XOX1bg0jN\\XOV1dg0jN[XOV1fg0kNYXOT1hg0lNWXOT1jg0mNTXOS1mg0nNQXOR1Ph0oNmWOR1Th0^11O1O100O1O1O1O1N2N2N2O1O1O1O100O101N10001N101N102M5L3L3NM3M3N2O001O10000O01000O11O1O1O1O1O1O1O1O3M1O1O00001O0000000^N^VOb0bi0\\ObVOa0`i0]OcVOa0]i0^OfVO`0Zi0_OhVO`0Xi0_OkVO?Ui0AlVO>Ti0AmVO?Si0AmVO?Si0@nVO`0Ri0_OPWO`0Pi0_OQWOa0oh0^ORWOc0mh0\\OTWOd0lh0\\OTWOd0kh0\\OVWOd0jh0\\OVWOd0jh0[OWWOe0ih0[OWWOe0ih0ZOXWOf0hh0ZOXWOf0hh0ZOYWOe0gh0ZOZWOf0gh0XOZWOh0fh0VO]WOh0dh0WO]WOi0ch0UO`WOj0`h0VO`WOj0ah0TO`WOk0ah0UO`WOj0`h0UOaWOk0_h0UObWOi0_h0VObWOj0^h0VOcWOi0]h0WOcWOi0]h0WOdWOh0\\h0XOdWOh0\\h0WOfWOi0Yh0WOgWOi0og0WOjVO0X1h0mg0[OhVON\\1f0ig0GXXO8gg0IYXO7fg0I\\XO6cg0K]XO5cg0J_XO5bg0I_XO7ag0HaXO7_g0GdXO6^g0IfXO0_g0NeXOM]g02hXOHZg08Z2N1O5LnYl="}}, {"image_id": 35, "category_id": 1, "bbox": [817.3482055664062, 8.902290344238281, 49.592041015625, 54.86603927612305], "score": 0.97240149974823, "association_id": 0, "segmentation": {"size": [900, 928], "counts": "fS^f0=ck05N1J6N2N2O100O10O10ZOTOSVOl0mi0UOSVOk0mi0UOSVOk0li0VOTVOi0mi0WORVOj0ni0VORVOj0ni0VORVOi0oi0WOQVOi0oi0XOPVOh0Pj0XOPVOg0Qj0YOoUOg0Qj0ZOnUOe0Sj0\\OlUOd0Tj0\\OlUOd0Tj0^OjUOa0Wj0_OhUOb0Xj0^OhUOb0Xj0^OgUOb0Zj0^OdUOc0]j0]OcUOb0^j0^ObUOa0_j0_O`UO?cj0A]UO=ej0B^UO;cj0DYUOJ1=gj0HYUOLJO2`g0B_XO?ag0A_XO?ag0@aXO?_g0AaXO?^g0BbXO>^g0BcXO=]g0CcXO=]g0CcXO=]g0CdXO<\\g0DdXO<\\g0DdXO<\\g0DdXO<\\g0DeXO;[g0EeXO;[g0DfXOO1O100O1O1N2O2N1O1O1O1O1O10ZgS="}}, {"image_id": 35, "category_id": 2, "bbox": [360.807373046875, 106.98210144042969, 219.5718994140625, 58.274017333984375], "score": 0.4624817371368408, "association_id": 0, "segmentation": {"size": [900, 928], "counts": "hca:1Rl01O2N2N1001O00000O1000000001O00001O010N100O10001O0O100001O1O1O1O1O3M001O0OZlm06`SRO2UTOHgk0"}}, {"image_id": 35, "category_id": 2, "bbox": [4.102137088775635, 658.1065673828125, 160.54469299316406, 111.84124755859375], "score": 0.26840975880622864, "association_id": 0, "segmentation": {"size": [900, 928], "counts": "Ph77lk02O000O2O000O10000000000O10O1000O1000000O100000000000001O0000000O100000O1000O100000000000O1000O100000000001O0O1000O100000000000000O100000000000O10001O000000000O1000000000000O10000000O100000O10O100O1O1O1O10000O100O10O10000000000O1000000O1000000000001O001O0O101O0000001O00001O1N2O001N2M^VZe0"}}, {"image_id": 35, "category_id": 1, "bbox": [0.0, 240.2299041748047, 30.027114868164062, 38.85795593261719], "score": 0.22688473761081696, "association_id": 0, "segmentation": {"size": [900, 928], "counts": "j71nk0?E1N4M2O1O0001O0O1000001O000000000O2O0O2O0N3O001M200O2O1MaPeh0"}}, {"image_id": 35, "category_id": 2, "bbox": [5.460431098937988, 512.5431518554688, 161.5483856201172, 32.92071533203125], "score": 0.20121216773986816, "association_id": 0, "segmentation": {"size": [900, 928], "counts": "ce64Pl01N100O101O0000000000000000000000000000000000000000000000000000000000000000000000O10000000000000000000000000001O00000000000000000000001O000000000000000000O1000000000000000001O0000000000000000000000000000000000000000000000000000000000000001O00000000001O001N1000000000001O0000Re_e0"}}, {"image_id": 35, "category_id": 2, "bbox": [15.482156753540039, 650.4852294921875, 199.9994354248047, 24.5203857421875], "score": 0.17204661667346954, "association_id": 0, "segmentation": {"size": [900, 928], "counts": "[ZW11Ql04M1O1O10000N20000000000000O1O10000000001O00000O101O000O2O000000000000000O10001O00000000000000Ylj10gSUN0O10000000000000000000000000000000O10O10000000000O100000000O1000O1000000O1000cRPd0"}}, {"image_id": 35, "category_id": 2, "bbox": [149.58631896972656, 439.18609619140625, 345.8563232421875, 60.285125732421875], "score": 0.11484146863222122, "association_id": 0, "segmentation": {"size": [900, 928], "counts": "PRa:4ok02N1O2O000O1000000O10000O10000O01000O10000000000000000000O100000000000000O010000000O10O1000000000000000000O100000000000000000000O2O000000000000000000000000000000000000O100O1O2N1O1O1O10001KSTO0nk00STOOmk0040R^X<"}}, {"image_id": 35, "category_id": 2, "bbox": [58.8206901550293, 433.138671875, 435.3207702636719, 100.39764404296875], "score": 0.09074690192937851, "association_id": 0, "segmentation": {"size": [900, 928], "counts": "id]51Sl0001N2O00001N1000000000000O1000000000000O100000000001O00000000001O0000000000001N100000000O2O000O10eg^30ZXaL2O001O000O2O0000000O1000000O1UNKgWO6Wh0KiWO5Vh0MiWO3Wh0MiWO3Wh0MiWO3Vh0NjWO2Vh0NjWO2Vh0NjWO2Vh0NjWO1Wh0OiWO1Vh00jWO0Vh00kWOOUh01kWOOTh02mWOMSh03mWOMSh03nWOLQh05PXOJPh06QXOIog07o1000000000000O10000000O1000000000O1000O10000O1000O10O1000000000000000O10000000000000000000000000000O10000O2O000O101O0O10001O000O2O00kb^<"}}, {"image_id": 35, "category_id": 2, "bbox": [302.2692565917969, 75.92167663574219, 339.4693298339844, 91.0025634765625], "score": 0.07881009578704834, "association_id": 0, "segmentation": {"size": [900, 928], "counts": "\\lf:2Ql03M3M2O001N100O101O0O10001N100000001O0001O0000000001O01N2N2O1N2M5K3NV]Q14fbnN4M0O2O0O2O00000O2O001O1N2O001O01O01O001O001O010O000000010O01O001O001O0010O000001O0000001O00001O001O00001O001O1O001O1O001O001O00001O3MUR>NlmA1O10001O000O101O00001O000000000O1000000000O010000000O10000000001O00000000001O001NeiY9"}}, {"image_id": 35, "category_id": 2, "bbox": [552.3796997070312, 6.939164161682129, 157.8131103515625, 39.960304260253906], "score": 0.07226508855819702, "association_id": 0, "segmentation": {"size": [900, 928], "counts": "mg\\`04nk02J7O00000000000001O00000000001O001O00000O100O10000000000000O10O100O10O10O10000O1O100O100O100000001N`e91`ZF001O0000000O2O0001O0001O000001O01O000001O001O01O01O00jhc6"}}, {"image_id": 35, "category_id": 1, "bbox": [0.0, 44.55895233154297, 836.9429321289062, 154.630859375], "score": 0.07159395515918732, "association_id": 0, "segmentation": {"size": [900, 928], "counts": "ZS72Ql02N2N1O2N1O2O0]TOE]k0;7O001N101O001N101N101NgQ70YnH2O0O2O0O2YTOJ^k06`TOL`k05^TOMak03^TONbk02^TOOak01_TOOak01_TOObk090000010O000010O00010O0001O100O0000000000010O00000000eVOCof0=QYODnf0dKC[4Cm0gYObNXd0h2K5K3M2O1O1O001O00100O1O1O010O1O0010N3L3N3\\Lk[OV3od0\\OffP;"}}, {"image_id": 37, "category_id": 1, "bbox": [246.28208923339844, 82.64505004882812, 379.73858642578125, 1065.2269287109375], "score": 0.9999984502792358, "association_id": 1, "segmentation": {"size": [1272, 954], "counts": "[g^:j0lV1`0@3dWOROj9R1jEDh9?jE;g9HnEi0i9ZOQFm0k9VOPFP1l9SOPFR1l9QOPFT1m9nNPFU1m9mNPFW1n9iNQFY1n9fNQF^1l9cNRF`1m9`NPFd1n9\\NPFh1n9XNoEn1n9RNPFR2m9nMSFU2j9lMTFX2j9hMUF[2h9fMXF]2e9cMZF`2d9aM[Fa2c9_M]Fc2`9]MaFe2\\9\\McFg2Z9YMfFj2U9XMiFm2R9VMiFQ3P9SMmFS3o8mLmF[3P9eLkFc3S9ZLjFn3S9QLlFT4R9kKmFX4R9hKlF\\4S9dKkF_4S9aKkFb4S9`KkFb4T9_KhFe4U9^KgFe4X9]K]Fn4_9VKkE_5Q:fJVER6f:SJdDb6X;cI\\Dh6b;[IUDk6j;YInCm6Q_U1_OgjN;[U1DjjN7^V1M4Lfef11WZYN;_O`0C;F7K5M2N2N2O0O2O001O0000O1000000O101O0O10000O1000001O0O10001O00001O001O00001O0000001N1000001O0000001O001O001O1O001O1O001O0010O01O001O001O001O001O001O1O1O10O01O00001O000010O0001O01O01O001O100O001O000010O0001O0001O01O00100O0010O010O010O00010O000010O001O010O1O010O001000O010O01O010O0010O0001O0010O01O0010O00010O010O0010O000010O000000010O0000000010O00000001O0001O00010O00010O0010O000010O00000001O01O00gjN]O]S1c0clN]O]S1c0clN^O\\S1b0clN_O]S1a0clN_O^S1a0alN_O_S1a0`lN@`S1`0`lN@`S1`0`lN@`S1`0`lNA`S1>_lNCaS1=_lNCaS1>^lNBbS1>]lNCdS1<\\lNDdS1<\\lNDdS1<\\lNDeS1iT1@YkN>hT1A[kN;hT1B[kNA=G;Ga0^O3MB>L5020O101N100O1N103n]OgMl`0c3h@[L]h5O2M2J6ZOf0N2O1O1O1O100O1N20O01O010OO2jNRCmIP=k5fCbI_jd07J2O2L4L4E;M4L6Z\\OdN8L\\b0m1`]OYN^b0f1c]O\\N[b0\\2N1O1O1O2N2P^ORM_a0R3W^OWMfa0U2d^OVN\\a0e1k^OXNWa0d1m^OZNUa0d1l^O[N_a0Y1d^OeN_a0X1c^OeN`a0Y1a^OdNaa0\\1a^OaNaa0^1b^O^Naa0a1U103N1O02N0009G5J3M;D2O1000O4L9IN1N3M3LlhQ="}}, {"image_id": 38, "category_id": 2, "bbox": [831.1922607421875, 474.6824035644531, 133.697021484375, 24.35260009765625], "score": 0.9999997615814209, "association_id": 4, "segmentation": {"size": [683, 1024], "counts": "Y]]a01Ve06M2O0O101O0O101O00000000001O00000000000000000000000000O10O100000001O0000000O1000000O100N3O0O10000000000000000000000000001O01O00001O00002N00000000000O3N1O3FS[O0md0MW[O1Se0OeZa03Xe^O1O1O1N3N00010O0000000001O0000001O001N1000\\aW1"}}, {"image_id": 38, "category_id": 1, "bbox": [276.5770568847656, 349.0798034667969, 54.55657958984375, 122.31942749023438], "score": 0.9999995231628418, "association_id": 2, "segmentation": {"size": [683, 1024], "counts": "STi5Q1Wd07K3M3M3L2O101O1O2M5K3K6C"}}, {"image_id": 38, "category_id": 1, "bbox": [504.7898864746094, 330.48052978515625, 44.276885986328125, 125.99114990234375], "score": 0.9999994039535522, "association_id": 3, "segmentation": {"size": [683, 1024], "counts": "Uka:TOi0K4L`0A4L2N5K4L2N2N2N1O2N3M3M2X^OTMn`0e30O5K3M3N2M2N3L4YNZ^OCja07\\^OEna0M\\^OMha0M^^ONcc0K4M4IneW7"}}, {"image_id": 38, "category_id": 1, "bbox": [31.083650588989258, 351.59906005859375, 56.21002960205078, 125.53964233398438], "score": 0.9999986886978149, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "Yge07Qe06K3K4O1N2N20O00Y\\OZOib0h0Q]ODgb0>V]OGcb0c0U]ODbb0g1G9P^O]MRa0g2j^O]MSa0g2d^O`MZa0Z3N10000000mNn^OlMSa0P2R_OoMo`0k1Y_OQNi`0k1\\_ORNf`0i1__OUNc`0f1c_OWNa`0e1a_OYNa`0e1b_OUNe`0h1a1N2N200O10O2N2N3M101N1010O00O11]NW]Of0fc06KM2N2N2N5J3N2L5Kk``c0"}}, {"image_id": 38, "category_id": 1, "bbox": [201.15853881835938, 354.37640380859375, 46.125152587890625, 119.246826171875], "score": 0.9999979734420776, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "S^X49od07I6K5J8d[OROoc0Z1G9G8J6K4N4K5L4L3M3n]OXM[a0^3N000001O001gN_^OfNda0V1a^OeNca0W1h^O^N\\a0_1f^O^N^a0`1d^O[N`a0d1T1000001OO2O1O1020M5M7Ga0B72KH3N1NZjU`0"}}, {"image_id": 38, "category_id": 1, "bbox": [588.0947875976562, 335.8383483886719, 47.2264404296875, 119.18435668945312], "score": 0.9999978542327881, "association_id": 5, "segmentation": {"size": [683, 1024], "counts": "aVY<8ld0?A?E=F1N3N2N2N4L]_O[Of`0`0U2N4K3N3NR^V8"}}, {"image_id": 38, "category_id": 1, "bbox": [756.2059936523438, 325.89764404296875, 47.89178466796875, 122.73040771484375], "score": 0.9999955892562866, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "_Xi??hd05L4L4M001J8G8L4O7J3M002N2N1O2N3M2N3M3M5K3M3O1O01O4K2N100O00O10001O2O9EgNn]O[OQb0a0U^O]Ola0?X^O_Oja0=Y^OBia08\\^OGfa04_^OJca0Oc^O0`a0Fg^O:Vc0O3M2MUZb4"}}, {"image_id": 38, "category_id": 1, "bbox": [92.81854248046875, 328.7689514160156, 47.99351501464844, 146.85357666015625], "score": 0.9999880790710449, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "_\\n1h0^d0:H6J5L4F;A?K6J7J5L4K3N4L3M5g^OjLS`0\\3a_OkL^`0Q4001O1O2lNU_OdMl`0W2]_OdMd`0V2c_OhM_`0T2f_OiM\\`0T2g_OjM[`0T2g_OiM]`0V2c_OhM_`0Z2^_OeMd`0\\2Y_OdMi`0^2R_OcMo`0_2m^OcMRa0[32N2N001O1O1SNi^ODXa08S_O_OPa0"}}, {"image_id": 38, "category_id": 2, "bbox": [650.1898193359375, 445.0792541503906, 150.8837890625, 10.35443115234375], "score": 0.954377293586731, "association_id": 7, "segmentation": {"size": [683, 1024], "counts": "VZc=2Ye00XPb00fo]O3O000000000000000000000000O101O00000000000000000000000000000001O000O100000001O000000000000000001O2N1O00^e80`ZG3N10000000000O11O0000000000000001O01O00000000000O10000000000000000000000000000O1000001O000O10000OQof4"}}, {"image_id": 38, "category_id": 2, "bbox": [159.43682861328125, 464.3799743652344, 33.43028259277344, 6.2900390625], "score": 0.5444602966308594, "association_id": 6, "segmentation": {"size": [683, 1024], "counts": "Qka32We020000O010000000000000000000000O1000001O00__Za0"}}, {"image_id": 38, "category_id": 1, "bbox": [668.6369018554688, 328.2937927246094, 119.12957763671875, 125.30789184570312], "score": 0.25092679262161255, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "jah>4Ve03M2N2N2N101O2N3M1OO2O0O2O1N2O1N7I4LoZO1O0dZ11ZZO4N1O1EK[[O:dd07h\\O_Oea0N\\^O8g2MX?Lh@5Ub03M2000000^MFS@:`b0O2N2N4Kfle00[SZO2M2N2O3L2ON2N2O1O2O1N1OkhY6"}}, {"image_id": 38, "category_id": 2, "bbox": [569.1387939453125, 450.14495849609375, 52.4366455078125, 6.74285888671875], "score": 0.20439781248569489, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "Udn;2Xe01000000O1000000000000000000O10000000000000000000000000000000000001OlPe8"}}, {"image_id": 38, "category_id": 2, "bbox": [348.0415344238281, 456.6853332519531, 40.62335205078125, 8.57177734375], "score": 0.14455094933509827, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "PbZ73Xe0001O0O1000000000001O000002MTP8NnoG1000000000000001OYhW="}}, {"image_id": 38, "category_id": 2, "bbox": [148.65444946289062, 346.2144470214844, 73.69949340820312, 128.89804077148438], "score": 0.1248013824224472, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "PP[e0"}}, {"image_id": 38, "category_id": 2, "bbox": [633.8216552734375, 447.3450927734375, 88.54534912109375, 8.120849609375], "score": 0.11713068932294846, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "PZW=3Xe01O000000000000000000000000000000000000000000OmZ=NTeB3N10000000001OO100000000000000O1000000000000000000O101O000001O00000000000000000000000joX6"}}, {"image_id": 39, "category_id": 1, "bbox": [340.5099792480469, 492.6719970703125, 453.1517028808594, 438.55474853515625], "score": 1.0, "association_id": 1, "segmentation": {"size": [1365, 1024], "counts": "h`P?5_Z18H6J2O1N2N2N1O2N2N2M3M3M3M3N2N3M2O1N2N2O1O001N101O1O001N101O001N101O0O2O001N1O2O0O2N2N2N101VmNdMXm0^2eROoMol0R2oRORNol0o1oROTNnl0m1QSOVNml0k1QSOWNnl0i1QSOZNll0g1TSOZNkl0f1TSO[Nll0e1TSO[Nll0e1SSO]Nll0c1SSO^Nml0b1RSO_Nnl0a1QSOaNml0_1SSObNml0^1RSOdNml0\\1RSOeNnl0[1QSOfNol0Z1PSOhNol0X1PSOiNPm0V1PSOlNol0T1PSOmNPm0S1PSOnNnl0S1QSOnNol0R1QSOmNPm0T1oROkNQm0V1oROiNRm0X1mROgNSm0[1lROdNTm0]1kROcNVm0^1iRO`NXm0b1gRO]NYm0e1fROZN[m0f1dROYN]m0i1bROVN^m0l1`ROSNam0o1]ROQNcm0Q2ZROnMhm0T2TROlMom0U2nQOiMUn0Y2jQOdMXn0^2nQOWMUn0k2i42N2M3]lNYLUP1i3hoN[LTP1h3joNZLSP1i3joNYLPP1n3moNULio0U4TPOmKho0X4UPOjKjo0X4TPOjKjo0X4SPOjKlo0X4RPOiKmo0Y4QPOhKno0Z4PPOgKoo0[4ooNfKPP1\\4noNeKPP1^4noNbKRP1a4koN`KSP1d4joN]KTP1g4ioNZKTP1l4hoNUKVP1o4foNSKXP1T5boNmJ\\P1Z5]oNhJbP1\\5YoNeJfP1`5UoNbJjP1b5RoN_JmP1c5PoN_JoP1d5nnN]JQQ1e5mnN\\JRQ1g5knNZJTQ1h5inN[JVQ1g5gnNZJXQ1j5cnNYJ\\Q1`7O2O1O0O2TQOiFXl0X9ZSOVGel0k8YSOVGfl0l8WSOWGhl0j8VSOXGil0i8USOXGjl0j8TSOXGkl0i8TSOWGll0i8SSOXGml0i8QSOYGnl0h8QSOXGol0i8oROXGQm0i8mROXGRm0j8lROWGTm0j8jROXGUm0j8hROWGXm0j8fROWGZm0j8dROWG\\m0k8`ROWG`m0j8^ROWGbm0l8YROWGem0k8YROVGgm0l8VROUGjm0l8TROUGlm0j8VROUGim0j8ZROUGfm0i8^ROUGam0j8bROUG]m0j8gROTGXm0k8lROSGSm0m8oRORGPm0m8SSORG\\l0]9gSOaFUl0b9nSO]Fmk0f9UTOZFgk0h9\\TOWFck0i9_TOVF`k0i9bTOWF]k0h9fTOWFYk0i9hTOWFXk0h9jTOWFUk0h9nTOVFSk0h9oTOXFQk0f9RUOXFnj0g9VUOVFkj0e9[UOZFej0_9dUO^F]j0Q9[VOgFei0e8VWOTGkh0i8b4M3N2N101N2O1O1O1O1N2O1N2N2N2M3N2O1N200O1O1O10001N1kIVmN_4kR1XK`mNd4aR1UKimNh4XR1TKomNh4QR1VKVnNd4lQ1XKZnNe4gQ1WK_nNe4cQ1XKanNe4aQ1SKgnNl4cS1M2N3N1N2N2O1N2O1O0O2O1O1N2O001O1N101O1O0O2O1O1O1O1N101O1O001O001N101O000000000000O1000000O1000000O10000O100O100O100O1O100O100O10000O10O10O100000000000000000000O10000000000000000000000000000000000O1000000001O00000000000O101O000000000000001O000O100000001O0O100000001O0O10001O001O00001O001O001O00001O0000001O0O10000O2O0O10000O101N10000O100000000O2O0000000O10000000000O2O000O10000O2O000O100O2O0O100O2O0O2N2N2N2N2M4M2N2N2N2N2N2N101N2N2N1O3M2M4L6H9GkYc9"}}, {"image_id": 39, "category_id": 2, "bbox": [172.21543884277344, 923.6845703125, 394.18719482421875, 63.8751220703125], "score": 0.9999995231628418, "association_id": 1, "segmentation": {"size": [1365, 1024], "counts": "hld74_Z120001N100O101O000O1000000000000000000000000000000000000001O000000000000000000000000000000000000000000000000000000O100000000000000O1000000O1O1O1N2L4O1O100O1O100O10000O100O1O1O100O100O100000000O10000O10000O10000O10O100000O10000O10000O10000O100000000000000000O1000O100000000000000000000O10000000000O10000000O1000O10000000000O1000000000O1000O10000000O010000000000O01000000O10O1000000O010000O01000O010O010O10O10O10O1000O10O100O100O10000O10O1000000000000O01000000000O1000000000000O2O0000000000001N10000000001N101O001O001O1N4M00001UOXfNg0hY1300O01000000O10O1000O1000000O10O10000000O10O1000000000BWfNOjY1MVfNI1:iY1L\\fN3dY1M\\fN3dY1L^fN3bY1KafN4_Y1JdfN5nY1O2O000O101O0O1000000O100O10[WPf0"}}, {"image_id": 39, "category_id": 2, "bbox": [411.1301574707031, 932.4970092773438, 272.2341003417969, 38.27178955078125], "score": 0.9004683494567871, "association_id": 0, "segmentation": {"size": [1365, 1024], "counts": "`i\\b01cZ1100NO`eN1`Z1O`eN1`Z1O`eN1`Z1O`eN1`Z1200000000000000000O10000O100O100000\\O0cfN0\\Y11dfNOZY13ffNMYY14ffNMYY14dfNKC1hY15efNN[Y12efNN[Y12efNN[Y12dfNO\\Y11dfNO\\Y11dfNN]Y12bfNO^Y11bfNO^Y10cfN0]Y10cfN0]Y10cfNO^Y11bfNO^Y10cfN0]Y10cfN0]Y10cfN0]Y10bfN1^Y1NcfN2_Y1LafN3QZ1000000000000O100000000000000000000O100000O1000000O1000000000000O1000000O100O1000000O10000000000O10O10000000000000O10O10000000000000O1000O1000000000O1000000000000O10000000O100000000000O10000000000000O1000000000000000O10O10000000000000000000O100000O1000000000O1000000O10000000O10000000000000O100000000000O10000000000O10000000000000000O10000000O100000O10000000000000000O10000000000000001N10adU>"}}, {"image_id": 40, "category_id": 1, "bbox": [679.10546875, 142.01724243164062, 298.0831298828125, 506.3899230957031], "score": 1.0, "association_id": 2, "segmentation": {"size": [680, 1024], "counts": "e]T>1Re0>C;F6L2O1N2O1N2O1N2O1N2O1O10O0010O0i_O4S;KUDe1S;[NbDU2Z;kM`D_2[;aMbDe2[;[McDj2[;UMcDP3Z;QMcDS3\\;lLaDY3];hL`D]3^;cL]Dd3`;\\L]Dk3_;WL\\Do3b;RLZDS4h2gJ`4X1cHV4n1cK\\59aHX4l1fKa55_HX4k1iKc54PHb4X2^Kh5h6SJ]Ik5e6oIaIo5d6hIcIV6a6_IkI[6[6RIXJh6Z:K1N2O0O1O10O0000010O00000010O00000001O000000001O0000O10000O100O10000O10000O100O10000O10000O100000000O100000000000000O10000000000O1000000O100O100O100O1O1O1O1O1N2O1O100O1O100O100O10000000000O100000000000000000000O10000000000000O100O10000O100O1O100O1O1O1N2N2N2N2N2N2N2M3M3M3L4L4L5J5L4M3M3M3N2N2N2N2N2O1N3M2O1N2O1N3M3N2N1N3N3M2N3M2N2N2N2M3N1N3M3M2N3N1N3N1N2N3M2M4L3L5K5K4M4M3M3M4K4M3K5K5M3L4M2O2M3N1N3M2M4M2M4M3M2N3N2M2N2N3M2M4L3M4K5L4M2N4L4L4L4K6G9hJh@S4j`0YOeIUBX6`>M100O10O100O010O0010O01O010O01O01O01O0001O00010O00010O000001O0O100O2O0O1000001N100O1O1O1O2N1N2N2O1O1O100O2N1N2N2M3cLV@Y1n?dNV@X1l?gNW@T1l?jNX@R1j?mNY@P1h?oN[@n0g?oN^@l0d?SOb@f0a?XOd@b0^?\\Oh@8a?FR3N2M3N2N3L3N2N3M3L4L9GWRf7"}}, {"image_id": 40, "category_id": 2, "bbox": [440.1448669433594, 423.7196044921875, 265.9076843261719, 118.14068603515625], "score": 0.9999997615814209, "association_id": 1, "segmentation": {"size": [680, 1024], "counts": "g[U99nd02O0O2O0O101N1O1O1O1O100O100O1O10O01N2O100O1O100O100O10O010000O100O10O10O10O100000O01000O1O100O100000O010000O1O100O1000O01000O0100O010O1000O10O1000000000O100000O0100O0100O0100000O100O010O1O1O010O010O100O00100O1O10O01O100O00001O00100O10O1000O0100O1O1000O01000000O100O010O10001N101O1N101N100O101O0O10001O001O0O2OO100O01O010O10O10O10O100O00001O010O00100O10O01N1N3O001O100O10O01N2Dj0jAROV>m0kAROW>l0kASOV>j0mAUOU>g0nAXOT>d0oA[OR>?TB_Oo=;VBDk=5[BKg=0^BMg=M]B0g=L\\BOm=IWBOS>ITBHb>KeAIg>1\\3]Od[O2`d0Dn[O3ni21ejM4L3M20L5JmeT<"}}, {"image_id": 40, "category_id": 2, "bbox": [287.6131286621094, 453.6479797363281, 139.193359375, 37.52783203125], "score": 0.9999719858169556, "association_id": 3, "segmentation": {"size": [680, 1024], "counts": "W[Z62Ve0000O10000O1O100O100O100O1O1O100O100O01000O1000000000O10O100000000O010000000O100000O0100000000O010000000O01000000000O01000000000O10O100000000O0100000O100000O100000O100000O10O100000O010000000O10O10O100O100O010O1000O10O100000000000O100O1O2M2N5JUe\\<"}}, {"image_id": 40, "category_id": 1, "bbox": [48.44716262817383, 282.23248291015625, 113.03213500976562, 142.0869140625], "score": 0.9999581575393677, "association_id": 6, "segmentation": {"size": [680, 1024], "counts": "P`[1e0ad0;U\\OQOjb0Q1R]OTOfb0T1T]OROib0R1P]OSOnb0d1N3C=L3M4MTOm]OgNQb0Y1R^OeNna0[1T^OdNka0[1Y^OcNga0]1Y^OcNfa0_1X^ObNha0^1W^OcNha0_1U^OcNja0]1V^OeNia0Z1X^OfNha0X1Z^OiNda0W1\\^OkNba0W1[^OkNda0^2O0O2N1N3M^N^^OD_a09f^OGXa09i^OGVa02f^O\\N5d1Sa0OT_O2k`0MV_O4j`0KW_O6g`0KY_O5g`0KZ_O4e`0M[_O3e`0L[_O5e`0K[_O5e`0J[_O7e`0IZ_O9e`0G[_O8f`0HX_O:h`0FU_O=k`0CR_O`0o`0@n^Oa0Sa0@g^Oe0Za0d11O1O0O2O1O001O001O0001O1O1O100OXOf^OTMN6\\a0\\2\\_OaMc`0l1e^OSNR11X`0k1i^OoMR16T`0j1V@WNi?e1[@\\Nc?a1b@^N]?`1g@^NZ?a1i@[NX?e1U20100O1O10O01O00002N2O2L3QOW\\O;Rd0\\OP\\Oa0_d0I7GdhPb0"}}, {"image_id": 40, "category_id": 2, "bbox": [137.92367553710938, 435.8825378417969, 125.09368896484375, 16.059112548828125], "score": 0.9900211691856384, "association_id": 0, "segmentation": {"size": [680, 1024], "counts": "R]m21We00000000O1000000O100000000O1000000000000O10000000O1000001O000O2O`c>0_\\A1O100O100N2O100O1O100000000O1000O10000000000000000000000000000O1000O1000000000000O1000000000O0100000000000000000000000O10000000000O10dmh?"}}, {"image_id": 40, "category_id": 2, "bbox": [7.231074810028076, 398.7140197753906, 77.74116516113281, 14.459625244140625], "score": 0.9652104377746582, "association_id": 5, "segmentation": {"size": [680, 1024], "counts": "bf57Qe00O2O01O00001O000000000000O10000O00100O10000000000000000000O1000000000000000000000000O10000000001O1O1O1O1O1Ochmc0"}}, {"image_id": 40, "category_id": 2, "bbox": [866.0518798828125, 442.4382019042969, 145.63775634765625, 165.12460327148438], "score": 0.9422325491905212, "association_id": 2, "segmentation": {"size": [680, 1024], "counts": "^ZPb07Pe02N1N2I7I7O1N3N1M3L4O1O1O1O1O1I7O1O1N2O1O1O11O0000000000O1O1O100N2M3C=VOj0K5N2N2L4M3N3M2O001N2N`Nj^OROUa0n0m^OQORa0P1n^OPOQa0R1o^OmNo`0U1R_OjNm`0W1U_OgNj`0Z1W_OeNh`0]1X_ObNg`0a1W_O_Ng`0c1Z_O\\Nf`0d1[_O[Nd`0g1\\_OYNb`0h1`_OVN_`0k1c_OSN[`0P2g_OmMV`0V2k_OiMS`0Z2n_OdMQ`0]2P@bMo?_2R@`Ml?b2V@\\Mh?f2Y@YMe?i2\\@VMd?j2]@TMc?n2]@QMb?P3`@nL_?T3b@jL]?W3e@gLZ?Z3h@dLX?\\3j@aLW?_3PAYLP?h3X11O0000O100000000001O0000UMe^Oi1\\a0UNl^Od1Ta0[NQ_Oa1o`0_NR_O`1n`0_NT_O`1l`0`NT_O`1l`0`NU_O`1j`0`NV_O`1j`0`NW_O_1i`0aNW_O_1h`0bNY_O]1h`0bNX_O^1h`0bNX_O^1i`0aNX_O]1j`0cNU_O]1k`0cNU_O]1k`0cNU_O]1k`0cNV_O[1k`0eNU_OZ1l`0fNT_OX1m`0iNS_OV1o`0iNR_OV1n`0jNR_OT1Qa0kNP_OS1Qa0mNP_OP1Sa0oNn^Oo0Sa0QOn^On0Ra0ROP_Ok0Qa0TOR_Oi0o`0WOS_Oe0Pa0ZOQ_Od0Pa0\\OQ_Ob0Qa0]Oo^Ob0Sa0]Oo^O?Ta0_Oo^O=Ua0Al^O=Ua0Cl^O;Va0Cl^O2hNB`b08n^ONaa0L[aa0"}}, {"image_id": 40, "category_id": 2, "bbox": [796.1142578125, 549.261962890625, 146.83648681640625, 124.012451171875], "score": 0.5499617457389832, "association_id": 0, "segmentation": {"size": [680, 1024], "counts": "fkm`02Te02N2N3N100N2O1O1O1O1O1O1N2O100O1O1O1O1O1O100N2O1O100O1N2O1O1O001N1O101O1O1O1O1O1O001O1L4N2O001N2K5L3O2O0O2L3L5N2O0O2M3K4N201O0O2L3O2O1O1M2N2O1O110000O010O100O2N1O100O100N3O0O101N1O2N1O2N2N3N3K3N2N2N2N1O2N1O2N100O100O101N2O1N2N2N2O2N5J4M1O1O0O2N3L3N2N3M4HjVe1"}}, {"image_id": 41, "category_id": 1, "bbox": [633.053955078125, 152.71617126464844, 207.33636474609375, 483.8509521484375], "score": 1.0, "association_id": 1, "segmentation": {"size": [774, 1024], "counts": "R^`?2o`0h0[E^O[:Q1YEVOa6C\\G`1m1oN]6N^G[1o1iN[68^GW1Q2cN_6SGb1j1UNQ7>iEhNBP3Y3nM[7>eEgNBV3U3iMc7=cEfN@[3T3dMk7:^EnN[OZ3W3aMP87[EVOUOY3Y3^MX81XEf3d1QMT9YOUEm3Z1SMa9POREY4j0QMU:eNPEd49oLi:[NmDn4NmLU;WNhDT5IjL^;WNaDk8_;m110000O10000O10001N10000O10O101O0O1RNZD\\Gf;`8bD\\G^;c8eDZG\\;e8hDVGY;j8lDQGT;o8REjFo:W9VEcFi:^9\\E\\Fe:d9_EXF`:j9m11O1O100O1O100O1O1O1N2N2N2M3M3M3M3K5H8E;I7K5M3L4L4K5I7E;I7L4N2L4L4J6J6K5L4N2O1N2O1O1O1O1O101O00100O1O1O102N2O1O2OUB^Go;g8`CoGV2fN[b0Q1]]Oe1^b0W2]^OcJQ`0l6L4N100O1O2N1O1N2N3N010O10O01000OO2M2M3O1N0J3013I7A>G:L4O2N2N3O02O1O1O3M6S@XIP>T7YA_I_>W8M1O1O1O1O000001O0O2O003L3M3M2N1L5K4K6B`0B>C^6AXJ?g5AXJ`0h5@WJa0h5BfI08`0Q6_OiIN8b0Q6^OUJc0k5]OUJc0k5]OUJb0l5^OTJ>P6CnI:@Fb62mI3ALf61gI:X6FhI;W6EiI:Y6DfI`0X6@hIa0W6^OjIc0d60001O3K3N1M6IooU2"}}, {"image_id": 43, "category_id": 1, "bbox": [741.4671020507812, 225.11097717285156, 306.26446533203125, 410.6658935546875], "score": 1.0, "association_id": 1, "segmentation": {"size": [853, 1280], "counts": "^Pgc01dj01N100O2N1L5G9N2M5LQKWAo4h>UKUAl4j>VKUAi4k>YKSAh4l>ZKRAf4n>\\Ko@f4o>^Km@c4S?`Ki@a4U?dKg@^4W?fKf@Z4Z?iKb@X4]?kK`@V4`?mK]@S4c?oKZ@R4g?nKX@Q4i?QLT@P4m?RLP@m3Q`0ULm_Oj3T`0YLh_Oh3Y`0[Lb_Oe3_`0_L\\_Oa3e`0bLW_O]3k`0fLP_OZ3Ra0iLe^O[3]a0hL\\^O[3ea0h22N2O2O1N101O0O2O1O001O1O1N2O100O1O100O100O100000000000000000000000001O001O1O001O1O1O1O1O10000O10000001O00000000O2O1N3N2M3M3N1N100O1O1000000001000O001O00O100O1O101N1O3M101N1O1O1O1O1O1O2O2M3M2N2N1O1O2N100O3M5K6J3N1N2N1O10O10O101O1O6J9G2N1O1O0O1O2O1N:F7I100O1O1ORLS@UMm?f2\\@UMd?h2d@SM]?h2i@VMX?f2n@WMS?d2TAYMm>h0Y@ZMS1j1e>4oCHSo3WA\\Lf>k7M3M3O2M2O1O1O1N2N2M3M3N2M3^NTDWDP^WOCbh0=^WOCbh0=^WOCbh0=^WOCbh0<^WOEbh0;^WOEbh0;\\WOA\\O4Xi0;\\WOGdh09[WOHdh09\\WOGdh09\\WOGdh09[WOHeh08[WOHeh08[WOHeh08ZWOIeh08[WOHeh07\\WOIdh07[WOJeh06[WOJeh06[WOJeh06[WOJeh06[WOJeh06[WOJeh06[WOJeh06[WOJeh06[WOJeh06ZWOKfh05ZWOKfh05ZWOKfh04[WOLeh04[WOLeh04ZWOMfh03ZWOMfh03ZWOMfh03ZWOMfh03ZWOMfh03ZWOMfh03YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh01ZWOOfh01ZWOOfh01ZWOOfh01ZWOOfh01ZWOOfh01ZWOOfh01ZWOOfh01ZWOOfh01ZWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh01ZWOOfh01ZWOOfh01ZWOOfh01ZWOOfh01ZWOOfh01ZWOOfh01ZWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWONgh02YWOMhh02YWONgh02YWONgh02YWONgh02YWONgh01ZWOOfh01YWO0gh00YWO0gh00YWO0gh00YWO0gh0OZWO1fh0OZWO0gh00YWO0gh00YWO0gh00YWO0gh00YWO0gh00YWO0gh00YWO0gh00YWO0gh0OZWO1fh0OYWO1hh0OXWO1hh0OXWO1hh0NYWO2gh0NYWO2hh0MXWO3hh0MXWO3hh0MWWO4ih0KXWO5hh0KXWO5hh0KXWO4ih0LWWO4jh0KVWO5jh0KVWO5jh0KVWO5jh0KUWO6kh0JUWO6kh0JUWO6kh0IVWO7jh0IVWO7jh0IVWO7kh0HUWO8kh0HUWO8kh0HUWO7lh0ITWO7lh0HUWO8kh0HUWO8kh0HUWO8lh0GSWO:mh0FSWO:nh0ERWO;di0O10000000000000000O100000O10000000O100000000000O10000000O1000000000000000O1000000000O10000000O10000000000000000000000000O1000000000000000000000000O100O2O0O3Nlk;"}}, {"image_id": 43, "category_id": 2, "bbox": [792.6250610351562, 658.4698486328125, 101.47406005859375, 8.68206787109375], "score": 0.9961963891983032, "association_id": 4, "segmentation": {"size": [853, 1280], "counts": "kQfd01dj0000O1000000O101N1000000O1000000000000O100000000000O100000000000O1000000000000000000000000000000000000000000000000000O1000000000000000000000000000000000000000000O100000000O2NclZ:"}}, {"image_id": 43, "category_id": 2, "bbox": [281.7189025878906, 818.718994140625, 278.4450378417969, 25.48907470703125], "score": 0.9957563281059265, "association_id": 0, "segmentation": {"size": [853, 1280], "counts": "Sg[7:[j01N100000000O1000000000000000000000000000000000000O1000000000000000000000000000000O10000000000000000000000000000000000000000O1001N10000000000000000O1000000O100000000000000000O1000000O10000000000O10000000O100000O10000000000000000O100000O10000000O100000O10000000000000000O1000O10000000000O10000000O1000O10000000000000O100000O1000000000000000000000000000000000000000000000000000000000000000O1000000000000000000000000O100000000000000000000000000O10000000000000000O100000000000000O1000000000000O1000000O1000000000000O10000O100O100000001N1O100OUdmb0"}}, {"image_id": 43, "category_id": 2, "bbox": [952.3795776367188, 627.186279296875, 319.83465576171875, 36.01025390625], "score": 0.9913272261619568, "association_id": 2, "segmentation": {"size": [853, 1280], "counts": "TY]j01dj00000001N10000O101O000]VOLeh04YWOLVO0ai04XWOOhh01XWOOhh01XWOOhh01XWOOhh01XWOOhh01WWO0ih00WWO0ih00WWO0ih00mVOLJ4Yi00mVOLJ4Yi00mVOLJ4Yi00mVOLJ4Yi00mVOLJ4Yi00mVOMI3Zi00mVOMI3Zi00mVONH2[i00lVOOI1[i00lVOOI1[i00lVOOI1Zi0OoVO0G1Zi0OoVO0G1Zi0OoVO0G1Zi0OoVO0G1Zi0OoVO1F0[i0OoVO1F0[i0OoVO1F0[i0OnVO2GO[i0OnVO3FN]i0NmVO4FN]i0MnVO6DM^i0MnVO6DM^i0MnVO6DM^i0MnVO7BM`i0LnVO7BM`i0LnVO?Ri0AmVO`0Si0@mVO`0Si0@mVO`0Si0@mVO`0Si0@mVO?Ti0AlVO?Ti0AlVO?Ti0AlVO?Ti0AlVO?Ti0AlVO?Si0BmVO>Si0BmVO>Si0BmVO>Si0BmVO>Si0BmVO>Si0BmVO>Si0BmVO>Si0BmVO>Si0BmVO>Si0BmVO>Si0BmVO>Si0BmVO>Si0AnVO?Ri0AnVO?Ri0AnVO?Ri0AnVO?Si0@mVO`0Si0@mVO`0Si0@mVO?Ti0AlVO?Ti0AlVO?Ti0AlVO?Ti0AlVO?Ti0AlVO?Ti0AlVO?Ti0AlVO?Ti0AlVO?Ti0AlVO?Ti0AlVO?Ti0AlVO?Ti0AlVO?Ti0AmVO>Si0BmVO>Si0BmVO>Si0BmVO>Si0BmVO>Si0BmVO=Ti0ClVO=Ti0ClVO=Ti0ClVO=Ti0ClVO=Ti0ClVO=Ti0ClVO=Ti0CkVO>Ui0BkVO>Ui0BkVO>Ui0BkVO>Ui0BkVO>Ui0BkVO>Ui0BkVO>Ui0BkVO>Ui0BkVO>Ui0BkVO>Ui0BkVO>Ui0BkVO>Ui0BkVO>Ui0BkVO>Ui0BkVO>Ui0BkVO>ei010000O10000O10000000000O1000000000000O100000000000O100000000O0100000000000O1000000O1000000000000000O100000O1000000000000000000O1000O100000000000000000000000O1000000000O1000O10000000000000000000000000000O010000000000000O10000000O1000O1000000O100000000O100000000O100000000O10001N1O2N]Q6"}}, {"image_id": 43, "category_id": 2, "bbox": [1171.0985107421875, 594.7155151367188, 98.0767822265625, 10.1068115234375], "score": 0.9896023869514465, "association_id": 0, "segmentation": {"size": [853, 1280], "counts": "PaQo02bj0100O100O101O000000000000000000000000000000000000000000O1000000000000000000000000000000000O100000O10000000000O01000000000000000000000000000000001O0O10X]9"}}, {"image_id": 43, "category_id": 2, "bbox": [530.1456298828125, 630.4697265625, 181.381103515625, 22.98138427734375], "score": 0.962568998336792, "association_id": 0, "segmentation": {"size": [853, 1280], "counts": "Zcj>4aj01N101O00000000000000O1000000000000000001O0O10000000001O000O100000000O11N100000000O100000000000000O1000000000000000000000000000000O10000000000000000O100000000000000000000000000000000000001N10000000000mUOHii08VVOIji07UVOJli05SVOMli03SVONmi02SVONmi01TVOOli01SVO0mi00SVO0mi00SVO0mi00RVO1ni0ORVO1ni0ORVO1ni0ORVO1ni0ORVO1oi0NQVO2oi0MRVO3oi0LPVO5Pj0KPVO5Pj0KPVO5Pj0JQVO6Pj0IPVO7Pj0IQVO6Pj0IPVO6Xj000000000000001N1000001N1Oa`m>"}}, {"image_id": 43, "category_id": 2, "bbox": [279.9679870605469, 548.6541748046875, 495.3529357910156, 54.07916259765625], "score": 0.895256519317627, "association_id": 3, "segmentation": {"size": [853, 1280], "counts": "_i^71cj03N1O000O2O000O10000O1000001O0000000O100000000000000000O1000000000000000000000000000000000000000000000O100000000000000000O100000000000000000000000000O100000000000000000000O1000001O0000O1000000000O10000000000000000000000O10000000000000000000000000000000000000O1000000000000000000000000000000O1000000000000O10000000O100000O1000000000000000000000000O100000000000000000000O10001O00000000000O100000000000000000000000001O00000000000O1001O1N101O0O2N2NmdT1LX[kN0MObUO1^j030001O00000O1000001O000O10000000000000000000000O100000000000000000000000000O100000000000000O1000000000000000000000O100000000000O100000000000O10000000000000000O100000O100000000000O101O00000000000000000O1000001O000000O10O10000000000000000000000000000O10000000000O101O0000000000000O10O1O1000000O10000000000000000000000000000000000000000000000000000000000000000000000000000000000000O1000001O000000001O00enc="}}, {"image_id": 43, "category_id": 2, "bbox": [279.3287353515625, 535.0271606445312, 448.52008056640625, 107.785888671875], "score": 0.356667160987854, "association_id": 0, "segmentation": {"size": [853, 1280], "counts": "^ic72aj02O2O00001O0O10001O000000000000000O10001O000000000000000000O1000000000000O1000000000000000000000000000O10O100000000000000000000000001O0O10000000000O10000000000O101O000000000O1000000000001O0O100000\\oW11cPhN0000001O0O10001O000O10001N1000000O100000001O00000000O10000000000000O10O10000000000001O000000001O00000O101O0000000001N101N101MWjX1KoUgN4L2O0O2O000O100000000001N100000000O100000000O100000O2O00000000000O10000000000000000O10000000000O10001O000O1000000000000O10O10000000000000O10000000O100000000O10000000000O10000000000O10000O101O0O10000O2O000000000O1000000O1000000O10O10000000000001O000O100000000000000000Ze10fZN0000000000000000000O10000000000000000000000000000000000000000dSa>"}}, {"image_id": 43, "category_id": 2, "bbox": [471.69488525390625, 534.0511474609375, 473.26318359375, 31.77581787109375], "score": 0.3508407473564148, "association_id": 0, "segmentation": {"size": [853, 1280], "counts": "Zf_>2bj02O1N1000000O2O00000000O10000000000000000000000000O100000000000000000000O1000001O000000000000000O100000000000000O100000000000O1000000000000000000000000000000O010000000000000O1000000000000000000000000O100000000000000000000000O10000000000000O1000000000000000000000O100000000000O10000000000000000000000000O0100000000000000000000O100000000000000000000000000000000000000000O1000001O00000000000000000000O2O00001O001N3NjdY1NV[fN2O1O2N1000000000O01000000000000O100000000000000000000000000000000001O0O100000O10000000000000000O10000O1000000000000000000000000000000000000000000O10000000000000000000000000000000000000O101O000000000O10000O3N0O2NX[[9"}}, {"image_id": 43, "category_id": 2, "bbox": [526.9522705078125, 544.7389526367188, 303.93060302734375, 20.5228271484375], "score": 0.23527657985687256, "association_id": 0, "segmentation": {"size": [853, 1280], "counts": "[Vb>1dj00O10000O2O00000000000O10000000000000000O100000001O00000000000O010000000000000000000O1000000000001O00000O10000000000000000O10000000O0100000000000000000000O10000000O100000000000000000O100001N100000000000000O100000000000000000O1001O000000000000000000000000O100000000000000000000O100000000000000O1000000000O1000000000000000000000000000000000001N100000000000000O100000000000000O1000000000000000000O10000O100O3N00^Y]="}}, {"image_id": 43, "category_id": 2, "bbox": [801.0584106445312, 629.0403442382812, 86.096923828125, 26.68115234375], "score": 0.19178295135498047, "association_id": 0, "segmentation": {"size": [853, 1280], "counts": "QfQe08\\j02O1O1N10000000001O0000000O2O000000000O10000000000000000000O100000000O100000000000000000000000000000000000000000000O1000000O1000000O100000000O1000000O10002MWhV:"}}, {"image_id": 43, "category_id": 2, "bbox": [827.0778198242188, 657.555419921875, 54.7708740234375, 8.5509033203125], "score": 0.1416093409061432, "association_id": 0, "segmentation": {"size": [853, 1280], "counts": "[aae05`j00O1000000000001O0O10000000000000000000000000000000O10000000000000000000000000000000000000000O101O0O2Nb\\]:"}}, {"image_id": 43, "category_id": 2, "bbox": [510.751708984375, 597.9840698242188, 769.248291015625, 61.92852783203125], "score": 0.051258634775877, "association_id": 0, "segmentation": {"size": [853, 1280], "counts": "Tmga01dj01N101N100000000000000001O001OohT30PWkL2N101N10000O101O00000000000000001O000000000000000000000000001O0O1000000000000000O1000000000O1000000000000000000000O1000000000000000000000000000O01000000000000000000000000000000000000000000000O1000000000000000000000000000000O100000000000000001O000O1000001O001O0O2N3M3M`T\\11^kcN6K2N1O101O0O2O00001O000O100000000000O1000000000000000000000O1000000cVOAdh0?ZWOEdh0;\\WOFch0:\\WOGdh09\\WOGdh09\\WOGdh09\\WOGdh09\\WOGdh09\\WOGdh09[WOHeh08[WOHeh08[WOHdh08]WOHch08]WOHch08\\WOIdh07\\WOIdh07\\WOIdh07\\WOIdh07\\WOIdh07\\WOIdh07\\WOIdh06\\WOKdh05\\WOKdh05\\WOKdh05\\WOKdh05\\WOKdh05\\WOKdh05\\WOKdh05\\WOKdh05\\WOKdh05\\WOKdh05[WOLeh04[WOLeh04[WOLeh03\\WOMch04]WOLch04]WOLch04]WOLch04]WOLch04]WOLch04]WOLch04]WOLch04]WOLch04]WOLch04]WOLch04]WOLch04]WOLch04\\WOMdh03\\WOMdh03\\WOMdh03\\WOMch04]WOLch04]WOLch04]WOLch04]WOLch04]WOLch04]WOLch04]WOLch04]WOLch03^WOMbh03^WOMbh03^WOMbh03^WOMbh03^WOMbh03^WOMbh03^WOMbh03^WOMbh03^WOMbh03^WOMbh03]WOMdh03\\WOMdh03\\WOMdh03\\WOMdh03\\WOMdh03\\WOLeh04[WOLeh04[WOLeh04[WOLeh04[WOLeh04[WOLeh04[WOKfh05ZWOKfh05ZWOKfh05ZWOKfh05ZWOKfh05ZWOKfh05ZWOKfh05ZWOKfh05ZWOKfh04[WOLeh04[WOLfh03ZWOMfh03ZWOLgh04YWOLgh04YWOLgh04YWOLgh04YWOLgh04YWOLgh04YWOLhh03XWOMhh02YWONgh02YWONgh02YWOMhh03WWONih01XWOOhh01XWOOih00WWO0ih00WWO0ih0OXWO1hh0OXWO0ih00WWO0ih00WWO0ih00WWO0ih00WWO0ih00WWO0jh0OVWO1jh0OVWO1jh0OVWO0kh00UWO0kh0OVWO1jh0OVWO1jh0OVWO1jh0OVWO1jh0OVWO1jh0OUWO2kh0NUWO2kh0NUWO1lh0OTWO1mh0NSWO2mh0NSWO2mh0MTWO3lh0MSWO4mh0LSWO4mh0LSWO4mh0LSWO4mh0LSWO3nh0LSWO4mh0LRWO5nh0KRWO5nh0KRWO5nh0KRWO5nh0KRWO5nh0KRWO5nh0JSWO6mh0JSWO6mh0JSWO5nh0KRWO5oh0JPWO7Pi0IPWO7Pi0IPWO7Pi0HQWO8fi0000000O100000000000O100000O10000000000000000000O100000000000000000000000O10000000000000O100000000000000000000000O1000000000000O100000000000000O1000000000001N10001NeV5"}}, {"image_id": 44, "category_id": 1, "bbox": [256.8251647949219, 192.1514892578125, 36.66656494140625, 74.15780639648438], "score": 1.0, "association_id": 1, "segmentation": {"size": [480, 640], "counts": "fTi39c>6L3L4M4M2jBVOS7I8J5L3L5K4N2M4L3M2N3M3N1N2O1M4L3N2N2N3L3O1O2M2O1O1O2N2N1O2N2N1O1O3M2N101N2O010O1N1O2N2O0O1O2O002N2N5J3M0010O00001O2N1O1O002N2N001O1O2N3M2N2N3_NnDnNU;l0REPOZ;a0kD]Of;0aDKb;OcDNa;MeDO\\=IV[o2"}}, {"image_id": 44, "category_id": 2, "bbox": [57.881492614746094, 279.2305908203125, 359.1332702636719, 81.1993408203125], "score": 0.9999995231628418, "association_id": 1, "segmentation": {"size": [480, 640], "counts": "Sh^12n>0O100O2O0O100O1O101N100O100O2O0O100O1O001O1I7I7K5N2O100O100O1N101O1O1O1O1O100O01000000000O010000O1000O10O100000O01000O10O10O1000000O0100000000O01000O1000O01000000O0100000O010000O1000O10O100000O100000O0100000000000O01000000O01000O10O100000000O010000O01000000O0100000000000O01000000O10O1000O10000000O1000O10O10000000O2O001O1O001O000000001O00000000000O100[OYB@1O1000O100O10O10000000O1000O1000O0100000O10O10000O1O1000000OWO0dB0\\=1cBO]=1cBO]=1cBO]=1cBO]=1cBO]=1cBO]=1cBO]=1cBO]=1cBO]=1k0OO000eY31ZfL000000000000000000O10000000[Si3"}}, {"image_id": 44, "category_id": 2, "bbox": [162.04331970214844, 267.5562744140625, 70.07676696777344, 11.924713134765625], "score": 0.9998887777328491, "association_id": 0, "segmentation": {"size": [480, 640], "counts": "bV\\23l>2N10000O10000000O1000000000O10000000O10O1000000000000000000001O0O10O100000000000000O1000000000O100000000O100000001N1000000O100000000000c^o5"}}, {"image_id": 44, "category_id": 1, "bbox": [0.0, 226.15525817871094, 142.0872344970703, 204.11830139160156], "score": 0.9901199340820312, "association_id": 0, "segmentation": {"size": [480, 640], "counts": "R9X3`:kLYFm3X9YLWFLNQ4g9VLUFX4k9=0001O1001N101O1O1O1O1O2O0O1O0O2N101N2O001N200O1O001N1O2O001O2M2N2N2O000L4L5N101N2I7K5M3O0O2N2N2N101N2N2K5M3N2O1N2N2N2O100O010O100001O0000001O1O2N2N2N1O2Nm0SO3M2N2N1O2N001O1O1O1O2N1O00001O0000000000000000O100O1O10000000000O1O1N2O1N2O1N2O1M3M3N2M3K5F:M3N2N2J6K5L4N2O1M3N2O1O2M4LmVY7"}}, {"image_id": 45, "category_id": 1, "bbox": [434.66180419921875, 282.0588073730469, 147.50323486328125, 286.9382019042969], "score": 1.0, "association_id": 2, "segmentation": {"size": [683, 1024], "counts": "gcV9:Vd0n0A`0SO^N\\]OR2Tb0k0F9M4K4L5G9H8L3M3M3L5K6K5L2N2L5K7I5M2M3L5J8I6K4L4M4L3M3N2M2M2N3M2N2O1O2O0N2O2M2N2OO01O1O1O2M2N3L4N101OO001OO200010O0100O100000O100000000000000001O001O001O1O1O2N1O1O1O001O1O001O1O001O1O001O001O00000000O101N1N2\\HiCQ6Z[N^Ah1^>`N[Ac1`>gNVA_1e>kNo@[1o>jNg@^1W?gNU@i1]3hLc8U5WGQKg8Q5QEeKHCU;i4fDWLHWO`;d4dDbL]OoNo;a4_DgM_;\\2]DfMb;R6N2N2N2M3M3M3TOl0N2O1O1O1000O1O1O1M3N2N2O1N2N2eNSETHQ;a7dEaGP;]8P1O1O2M4L3M6I8I6K5K6J6J4K4K4M3N2O0O2O1N2O0O3N1N2N2WKj@Z3X?dLj@Y3X?gLh@W3[?gLg@W3[?gLh@W3X?gLn@V3R?hL`Ag2`>YMRBU2o=iMWBS2i=kM[BS2e=kM]BT2e=hM^BY2d=_MaBb2b=SMfBl2m?1O101N110O108H6J0N1000102N3M2M1N1O105L7I7IN010O0O2N5K4L3M4L3lLh^OP2[a0eMQ_OU2Yb0J6J5K3M2N2N3L9H>B7H5L2M4KeeW:"}}, {"image_id": 46, "category_id": 2, "bbox": [0.0, 524.8439331054688, 486.66436767578125, 38.69805908203125], "score": 0.999997615814209, "association_id": 2, "segmentation": {"size": [683, 1024], "counts": "Vl12Xe02O00000O1000000O1000000000000000000O10000000000000000000000000000O10000000000000000000000000000000000000000O10000000000000000000000000O1000000000000000O1000000000O1000000000O100000000000000000O10000000O10000000O10000000000000000000O100000O10000000000000O100000000000000O10000000000O10000000O100000000000000000O0100000000000000000000O0100000000000O1000O1000000000000000O1000O10000000O10000000000000O1000O10000000O100000O1000O1000000000000000O1000O1000000000O10000000O1000000000000O0100000000000O1000000000000000O10O1000000000000000000O100000000000000000000O100000000000000000000O1000000000000000O01000000000000O10000O1000000O10000000000000000O100000000000000000000O10000000000000EY[O1hd0OY[O0gd0OZ[O1fd0OZ[O1ed00\\[OOdd01\\[OOdd01\\[OOdd00][O0cd00][O0cd00][O0cd00][O0cd00][O0cd00][O0cd0O^[O1bd0O^[O1bd0O^[O1bd0O^[O1bd0O^[O1bd0O^[O1bd0O^[O1bd0O_[O0ad00_[O0ad00_[O0ad0O`[O1`d0O`[O1`d0O`[O1`d0O`[O1`d0O`[O1`d0O`[O1`d0O`[O1`d0O`[O1`d0O`[O1`d0O`[O1`d0O`[O1`d0O`[O1`d0Na[O2_d0Na[O2_d0Na[O2_d0Na[O2_d0Na[O2_d0Na[O2_d0Na[O2_d0Mb[O3^d0Mb[O3^d0Mb[O3^d0Mb[O3^d0Mb[O3^d0Mb[O3^d0Lc[O4]d0Lc[O4]d0Lc[O4]d0Lc[O4]d0Lc[O4]d0Lc[O4]d0Kd[O5\\d0Kd[O5id00000000000000000000000O10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001O00000000000000000000000O2O00idY;"}}, {"image_id": 46, "category_id": 2, "bbox": [589.5731811523438, 504.49652099609375, 434.42681884765625, 28.11175537109375], "score": 0.9999954700469971, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "V\\c<1Ze0000O100000001O000000000O1000000000000000000000000000000000000000O10000000000000000000000000000000000000O1000O10000000000000O1000000000000O100000000000000000000O1000000000000000O10O1000000000000O10000000000000000O1000000000000000000O10000000000000000000000000000O100000O100000000000000000000000O1000000000000000O10000000O1000000000000000000O10000000O100000O100000000000000O100000000000000O100000O10000000000000O10000000000000000000000000000000O0100000000000000000000000000000O10O100000000000000000O1000000000000000O100000O1000000000O10000000000000O1000000000O010000000000O10000000000000000O1000O1000000000000000O1000000000000000000000000000000O10000000000000000000000000000000000000000O100000O100000000000000001O0O100000000000000000000000000000O10O100000000000000000000000000000000000000000000000000O1000000000000000001N100000001O1NV`1"}}, {"image_id": 46, "category_id": 1, "bbox": [536.5973510742188, 528.5909423828125, 15.05987548828125, 17.84747314453125], "score": 0.9999734163284302, "association_id": 3, "segmentation": {"size": [683, 1024], "counts": "VfV;:Pe03M10001O001O00000000O2N2O1MfYj9"}}, {"image_id": 46, "category_id": 1, "bbox": [299.9187316894531, 189.91969299316406, 76.19537353515625, 166.1185760498047], "score": 0.999891996383667, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "UZX64nd0e0B5L3M2N0P]OWO^a0k0_^O[O]OJVa0k0[_O^OTO1`a0b0[_O^OQO4ca0`0Z_O7e`0NW_O2e`05W_OLe`0:Z_OEc`0>o_OPOn?S1X@gNh?Z1X@eNg?]1Y@bNg?`1W@RNeN6Ta0h1X@mMlN6l`0m1Q200100O1OZOS]OoNlb0o0X]OPOhb0n0[]OPOfb0m0]]OSOcb0j0`]OUOab0i0d]OSO]b0k0e]OTO]b0i0d]OXO_b0d0a]OXOgb0d0Y]O[Ojb0b0Q1O2N2M3M2O2M2OV]O0[`0Md_O8fb03M4M2O2M1O102N11O00N11O1OO3O0OO0O4L1O3M3M2N4L3M2M3NUad="}}, {"image_id": 46, "category_id": 1, "bbox": [369.60888671875, 166.26324462890625, 121.64877319335938, 231.0203857421875], "score": 0.9786441922187805, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "ZTg7P1Wd0;H100O100000001O0O11N2O0]OR\\OHQd0NZ\\OMhc02\\\\OGic06g0O3KXe02bZO8M3N1N000d[OKdc04^\\O0^c00b\\O3[c0Mf\\O5Wc0Li\\O6Sc0Ll\\O7ob0LQ]O6lb0JU]O7ib0IX]O8fb0G\\]O9bb0Ga]O9\\b0Gf]O9g?QOUBf0UN:a?\\OPB;`N9\\?AQB6eN9W?FPB2jN8T?IoA0nN7o>NPBJTO8j>1oAGYO7g>6o@D\\O1o05e>:i@`0b0VOd>c2^A\\Ma>d2_A]Ma>b2`A^M`>a2aA_M`>`2aA_M`>a2`A\\Mb>d2`AWMd>h2]AVMe>j2[AVMd>l2ZATMe>n2[ARMc>P3\\APMc>R3]AmLb>V3`AgLh=3QAZ3]1\\L]=`4e12N2O1O2M2O1O1O2N1O1O0000001fAgJ`T]ONkb0Od]OE]b08g]OFZb08i]OEXb0:k]OCWb0L4_[O[OTd0Q1M3M2O2N2N2N2N2N2M3F;M3N1N3M2N2O0O2N2aNZMU@f2k?[MS@g2l?YMT@g2l?ZMR@h2m?YMh_O4TOc2Ta0ZMg_OQ3X`0QMe_OP3[`0QMP_OM9T3e`0[MZ_Oe2f`0\\MX_Oe2h`0[MX_Of2g`0[MW_Of2i`0[MV_Oe2j`0\\MT_Of2k`0[MS_Of2m`0[MQ_Og2n`0l00001O001N10001O00001O00001O0000001O00001O0O11O00000001O0000000000000000001O000000000000000000000001O0000001O00001O2N3M2Njb0CV]O=jb0CV]O=jb0CU]O?jb0@W]O`0ib0@W]O`0ib0@n\\O^O2R1Pc0@m\\O@1R1Pc0_On\\OA1P1Qc0_On\\OA1P1Qc0_On\\OB0o0Rc0_Om\\OD0m0Sc0_Om\\ODOo0Sc0]On\\ODOo0Tc0[Oo\\OEMP1Uc0ZOn\\OFMP1Vc0YOn\\OGKP1Xc0WOn\\OIJP1Yc0VOm\\OJJQ1Yc0TOn\\OJIR1Zc0ROn\\OU1Sc0iNQ]OU1Rc0fNQ]OX1bc01O1O2i\\OdNYb0^1Y]OVO_b0Q2K3M1O1O1O1O1O7I4L2N001O001O00100O001O00001O01O01O000010O0001O00010O0000010O0000010O0001O001O00001O0010O0001O001O00001O002N3M2N00001O0001O01O0000001O00001O0O101O001O1O1O1O1O1O1O0000001O000000001O0000000000000000001O0000000O1000001O000000001O000000001O000O10000000001O000000000000000000001O0000000O1000000000001O00000000001O00000O2O001O001O1O1O1O1O1O00001O00001O0O10001O0000001O0000001O001OoNVN`^Oi1]a0[Nc^Od1Za0_Ng^O`1Wa0cNi^O\\1Ua0fNl^OY1Ta0gNm^OX1Sa0iNm^OV1Ra0kNn^OU1Ra0kNo^OT1Qa0lNo^OT1Qa0lNP_OS1o`0nNQ_OR1o`0oNQ_OP1o`0POQ_OP1o`0POQ_OP1o`0POR_Oo0n`0QOR_Oo0n`0QOR_Oo0n`0QOR_On0o`0ROR_Om0n`0SOR_Om0n`0SOR_Om0n`0SOS_Ol0m`0SOT_Om0l`0SOT_Om0l`0SOU_Ok0l`0UOT_Ok0l`0UOU_Oj0k`0VOU_Oj0k`0VOV_Oi0j`0WOW_Og0j`0YOY_Od0g`0\\O\\_O`0e`0@^_O=b`0Ba_O<_`0Db_O:_`0Fb_O9^`0Gc_O8]`0Hc_O7^`0Ic_O6]`0Jc_O6]`0Jd_O5\\`0Kd_O5\\`0Ke_O3\\`0Md_O3\\`0Md_O3\\`0Lf_O3Z`0Mf_O3Z`0Mg_O1Z`0Of_O1Z`0Og_O0Z`0Of_O1Z`0Og_OOZ`01f_OOZ`00h_ONY`02h_OLZ`03g_OKZ`05h_OHY`08i_OEX`0;^2N2N3L3N]id5"}}, {"image_id": 48, "category_id": 2, "bbox": [1.54511296749115, 384.95855712890625, 29.699615478515625, 6.060028076171875], "score": 0.9661754965782166, "association_id": 0, "segmentation": {"size": [685, 1024], "counts": "mf12Ze02O000000000000000000000000000001O00O1000000000000001O00Zlgd0"}}, {"image_id": 48, "category_id": 1, "bbox": [92.41081237792969, 245.86167907714844, 230.31813049316406, 164.0552215576172], "score": 0.9255075454711914, "association_id": 0, "segmentation": {"size": [685, 1024], "counts": "\\nY2b0ad0>I4G9M3K5H8B>D"}}, {"image_id": 49, "category_id": 1, "bbox": [433.78765869140625, 29.62174415588379, 247.31939697265625, 113.25519561767578], "score": 1.0, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "PbU:=`g0:H3L4M2O1O00001O0O101O000O01O0010O0001O1O010000O10000O10000O2N101N101N100O2O0O1O2O0N2O2N1O2N2N101N2O2M2O2N5J2O1N2O001O1N2O1O1O001O001O1O1O1O1O2N2N1O1O1O001O1O001O1O2N1O001O001O1O001O000000001O00000000000000000000000000000000000000000000000000O10000O1O100O1O1O1O100O1O1O10000O10000O10000O100000000000000000000001O0000001O0000000010O000000010O0000001O00001O000010O01O1O1O100O1O001O010O1O100001O0O10O0100O10O1O010O001O00001O00001O001O00001O000000001O00000O2O0M4SOm0M3N2N1N4M3Ma0oNhXO9edX8"}}, {"image_id": 49, "category_id": 1, "bbox": [695.0618896484375, 49.73197937011719, 187.0350341796875, 135.2887420654297], "score": 1.0, "association_id": 1, "segmentation": {"size": [768, 1024], "counts": "o[Y`0h0Sg09I4M2O2M2J7M3L3M4N101O0O2O1O0O2O001O000O101O0O1O2M3M2O2O0O2N1O1O1O1O1O1O1O1N2O1N2N2O1O1O100O1O100O1N2O1N2O1O1O10000O100O10000O1000001N10000000000000000000000000O01000000000000000001O0000000000001O0000001O001O0O2O001O1O001O1N101O1O001O0O2O001O00000000000000000000O1O1O1N2O1M3M3M3K6M2O1O100O1O1O100O1000001O001O00000000001O00000O2O001N2N1O2O0O2N1N2H9M2N3N2N2M3M3N2N2N3M3M8Ee]Z3"}}, {"image_id": 49, "category_id": 1, "bbox": [300.5460205078125, 62.16727828979492, 131.09970092773438, 90.33595275878906], "score": 1.0, "association_id": 3, "segmentation": {"size": [768, 1024], "counts": "fkQ71hg0?F7J2N3L4K4O2M3N1N3N0O2M2O1O101N100O1O1N2O010O10O10O000N3O1000O100000O100O100000001O0O1N2N3N1O1O2O001N101N10001N101O0O10001O0O100O10000O10000O100O10O10000000O1000000000000000O10000001O0000000000000001O000000000O10000000000O2O00001N1jMcZOi1]e0VNeZOi1\\e0UNfZOi1[e0WNfZOh1Ze0WNgZOg1[e0XNgZOf1Ze0WNiZOh1je0K5M4K7F6K<@Qel="}}, {"image_id": 49, "category_id": 1, "bbox": [177.53793334960938, 45.105499267578125, 179.62030029296875, 97.80351257324219], "score": 1.0, "association_id": 5, "segmentation": {"size": [768, 1024], "counts": "ibU4;bg0e0\\O3N2L4L4I7N2N1O2N1O1M3M4O0O100O2O0O1O2N101N100O2N2O1O001N101N2N101O0000000O10000000O10O10O100O001O1O10000O1000000000000000000000000000000001O000000000000001O00001O00001O00001O00100O001O001O1O001O01O00000000000000000O10000O100O1O1O1N2O1000000O101O0O1O1O0O2L4H8O2N100O100O10aZOTNjd0i1i0L3N3N1O2O0O2O001N1O2N2N2N3M3M3GoXO]OUg0?;K3InmS`0"}}, {"image_id": 49, "category_id": 2, "bbox": [710.9478759765625, 154.0299835205078, 179.58563232421875, 36.49989318847656], "score": 0.9999998807907104, "association_id": 1, "segmentation": {"size": [768, 1024], "counts": "[mo`02ng01O1N102N4L1O001O00001O00001O000000000000000010O0000000001O000000000001O000001O00000000000000000000000O2O0000000000000000000001O01O0000000001O0000001O001O001O001O2N1O001O00001O1O1O1O000000000O1000O100O1O1O100O100O1C=O00100O1O1N2O100O1O01000O10O10O1000O10000O10000O10O01000000O10000000000O100N2M300O100O100O1O10000O100O1O10001N10U[T3"}}, {"image_id": 49, "category_id": 2, "bbox": [959.9636840820312, 175.85092163085938, 61.84515380859375, 34.93341064453125], "score": 0.9999997615814209, "association_id": 2, "segmentation": {"size": [768, 1024], "counts": "Pfaf01ng02N2O1O2N1O1O1O1O001O00001O0O10000O1000001O0O1000000000001O00000O100000000000001O00000000000000001O0O10000000000000O5KTZ1"}}, {"image_id": 49, "category_id": 1, "bbox": [949.4347534179688, 61.65119171142578, 72.448486328125, 132.47714233398438], "score": 0.9999990463256836, "association_id": 2, "segmentation": {"size": [768, 1024], "counts": "_]Yf09^g0=I5E;G8L3M3K5E;K5N2O0N2O2N2O010O2N0N3N1O2O1N2L4N101N2N1O1O2O1O100M3M3L4N2001O0O1001O00O100000O10000O1000001O0O20O001O00010O1O1N2N2O3L6PM^[OX2`e0Ek0kMhYOj0PR2"}}, {"image_id": 49, "category_id": 2, "bbox": [205.17654418945312, 132.59176635742188, 99.67819213867188, 14.276748657226562], "score": 0.9999980926513672, "association_id": 5, "segmentation": {"size": [768, 1024], "counts": "]li44kg02N100O1000000000000000000000001O0O10000000000000000O100000000000000O10000000000000000000000000000O1000000000000000000001O0000001O1O002N1N102N1O1O0OQ`10o_N1O2O0O1O1O100O1N200O00100000000000O10001O5HgSk`0"}}, {"image_id": 49, "category_id": 1, "bbox": [870.102783203125, 38.08018112182617, 117.583984375, 74.07212829589844], "score": 0.999994158744812, "association_id": 6, "segmentation": {"size": [768, 1024], "counts": "miad04jg09H4L3L4N1N1O2O1N4L3M2O001O1O00000O2O0000000O10001N101N10001O0000000000000O100000001O0010O01O1O1O1O001O1O01O01O0010O000001O0000000010O0O101O001N101N1O2O0O2J5O1L4K5N2N3N2O1N1O2L4N1N2O2O0O100O1O2O0O1000001N10001NRfn0"}}, {"image_id": 49, "category_id": 2, "bbox": [253.7897186279297, 333.05694580078125, 723.049560546875, 180.2166748046875], "score": 0.9999938011169434, "association_id": 4, "segmentation": {"size": [768, 1024], "counts": "fVj77gg04L2O2N2N101N101N10001N100O2O0O100O1O101N1O1O1O1O1O2N1O100O100O10000O2O00000O100000000O100000000O100000001N1000000O1000000O100000000O10001O00000O100000000000001N1000000000000000001N100000000000000O2O000000000O100000000O101O00000O1000000000000O1000001O0000000O1000000000001O000O100000000O1000000O10O10O100000000O1000000000000O1000000000000O100000O10O10000O100O10000O1000000O100000000000O10O10000000O10000O010O10000O10O1000O10O10000000O0100000000000O10O100000O10000O10000O100000O010000000000O10000000O1000000000O01000000O10O10O1000000O01000000O10O1000O100000O0100000O01000O01000O10O1000O10O1000000O010000000O100000O10O1000000O10O10000000O1000O1000O1000O0100000O010000000O10O10000000O1000O1000000000001N1000001N10001N2O1O2M2O2N001N1000001O000O101O000000001N1000001O0O2O001N2O0O2O001O0O2O00001N10001OO100000O1000O1000O1000000O10O010000O1000000O1000O10000000O01000000O100O001N2M3J6N101O100O00100O010O10000O010O100O10O0100O1O1M2K6E;M3M210O10O0100O01000O10O1000000000000O100000000000000O100000000000O10O1000001O000O101O000O101N101N100O2O0O2O0O101O0O100O2O00000O10001O00000O101O00000O2O001O000O2O000O2O00000O2O00000O10001O0O10001O000O2O001O0O2O00001N1000001N1000000O101O000O101O00000O2O1O1O1O0O2O1O1O0O2O00001N10001O0O10001N100O2O0O101N103LkSg1"}}, {"image_id": 49, "category_id": 1, "bbox": [100.49388122558594, 145.0594024658203, 856.6506958007812, 346.31219482421875], "score": 0.9999895095825195, "association_id": 4, "segmentation": {"size": [768, 1024], "counts": "bi\\2;`0JTf0[1nYOcN1=mc0[1k[OaNOe0dc0R1V\\ObNMb0gc0R3M4M2N2O1N2O1N2O1N2O1O001O1O001O001O00001O001O00001O00001O00001O0000001O0000001O002O1N0010O010O00100O6J7I2N2N2N3M3M1O1O1O100Ob]OgKVa0X4h^OkKXa0T4f^OnKZa0R4d^OPL]a0o3b^ORL_a0m3`^OTL`a0l3_^OULba0j3]^OXLba0h3]^OYLca0g3]^OYLca0g3^^OXLca0g3^^OXLba0h3^^OXLba0h3_^OWLaa0i3`^OVL`a0j3`^OVL`a0j3`^OVL`a0j3a^OUL_a0k3a^OUL_a0k3b^OTL_a0k3a^OUL_a0k3a^OUL_a0k3a^OUL_a0k3b^OTL^a0l3b^OTL^a0l3b^OTL^a0l3b^OTL^a0l3b^OTL_a0k3b^OTL^a0l3b^OTL^a0l3b^OTL^a0l3b^OTL^a0k3c^OUL]a0k3c^OUL]a0k3c^OUL]a0k3c^OUL]a0k3d^OTL\\a0l3d^OTL]a0k3c^OUL]a0k3c^OUL\\a0l3d^OTL\\a0l3c^OUL\\a0m3c^OSL\\a0n3d^ORL\\a0n3d^ORL[a0o3d^ORL[a0o3e^OQLZa0P4e^OQL[a0o3e^OQLZa0P4e^OQLZa0P4e^OQLZa0P4e^OQLZa0P4d^ORL[a0o3d^ORL[a0o3c^OSL\\a0n3c^OSL\\a0n3c^OSL\\a0n3c^OSL\\a0n3c^OSL]a0m3b^OTL]a0m3b^OTL]a0m3b^OTL^a0l3b^OTL]a0m3b^OTL^a0l3b^OTL]a0m3b^OTL^a0l3b^OTL]a0m3c^OSL]a0n3a^OSL_a0m3a^OSL^a0n3b^ORL^a0n3a^OSL_a0m3a^OSL^a0n3a^OSL_a0m3a^OSL^a0o3`^ORL`a0n3_^OSL`a0n3`^ORL`a0n3_^ORLaa0P4]^OQLca0o3\\^ORLca0o3\\^ORLba0Q4[^OQLba0R4]^OoKaa0Y5N2M3O1O1O1O1O001O100O1O100O010O100@ZIe_Og6W`0c0J7I6M3M3O100O100O101N1O1O1O1N2N2N2O1O100O1O100O100O101O0O010O100O010O10O01O0010O01O010O010O010O010O01O010O10O01O10O010O010O010O001O01O000001O00O10O10O10000O2O001O0010O01O010O10O0100000O010000O01000O010000O010O10O0100O01000O10O10O10O1000O0100000O0100O10O10O1000O0100000O010O1000O010000O10O010000O1000O01000000000000000000000000O010000000000000000000000O1000O10000000O1000000O100O10000O100O100O10000O1000000O010000000O100000000000000000000000000O100000001O00000000000000000000000000000000000000000000000O1000000000000000001O00000000000O1000000000000000000000001O00000000000000000O1000001O0000000000000000000000000O1000000O100000O010000O1000000O1000000O10O10000000O1000000000000000000O101O00000000000000000000000O1000001O0000000000000000000O100000000000000O1000000000000O100000000O101O00000O100001O01O000010O0001O000010O000001O01O0001O0000010O0000001O0001O00010O00001O0010O01O00100O1O10O01O10O010O010O010O010O010O010O1O1N2O1O1O1O2N1O2N1O2N2N2N2N2N2N2N2N2N1O1O1N101O1O001O001O00001N101N101N101N1O2O1N2N1O2M3L4M2M4L3N3M3M2O2N1N3N1O1O2N1O2N1O1O2N1O2N1O1N3M2N2N2M4L3L4L4K6L3N2N2N2O2M2O1O100O101N10000O1000000O1000001O000O100000000O10000000000O101O0000000O100000000O10001O0O100O10000O100O2O0O100O10000O101O0O1000000O2O00000O101O001N10001N101N100O2O0O2N1O2N1O101N1O2N1O2O0O1O2O0O2N101N1O2N1O2N1O2N2N1O2N2M3M3K5K5K5I7JoWY2"}}, {"image_id": 49, "category_id": 2, "bbox": [314.4143371582031, 144.77627563476562, 74.209716796875, 12.58978271484375], "score": 0.9999493360519409, "association_id": 3, "segmentation": {"size": [768, 1024], "counts": "f\\\\72mg0101N1000000000001N100000000O101O0000000O100000001O000000000000000000000000000001O1O001O1O001O001O0000001O0O2NXcY?"}}, {"image_id": 49, "category_id": 2, "bbox": [887.4486694335938, 98.76899719238281, 89.79693603515625, 11.731452941894531], "score": 0.9994227886199951, "association_id": 6, "segmentation": {"size": [768, 1024], "counts": "Ucnd06jg0000O2O0001O000000000000000000000000000000000000000000001O000000001O0000001O01O01O0000000000000000000001O0O1000000O100000000000000000O101O0O2Nh\\[1"}}, {"image_id": 49, "category_id": 2, "bbox": [874.685546875, 125.64664459228516, 24.85882568359375, 7.931953430175781], "score": 0.997908353805542, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "P\\`d04lg0000O101N1000000000O2O00000000000000001O00001NPdm2"}}, {"image_id": 49, "category_id": 2, "bbox": [80.20497131347656, 469.90716552734375, 360.95452880859375, 255.0257568359375], "score": 0.9509072303771973, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "SZV2>]g07M3M2O1N3M2O010O1O1O001O1O001O1O10O01O10O01000000O100O100O10O01O1O010O10O0100O100O2O000O10O0100O2N101N2O0O2N100O100O100001O1O100N2O000O10O01O010O1O102M8H2O0O2O0O100O102M2N3N1N2O0O1O100O10O10O10O01O010O010O01O0001O01O0001N1O1L5L3M4M2N2N\\ZW3OgehL1O4L4L1N101O0000000000O10000000O1000O100000000O101O0O1000000O100O1O2M2O1OWal>"}}, {"image_id": 49, "category_id": 1, "bbox": [437.59075927734375, 553.4384155273438, 148.32855224609375, 214.56158447265625], "score": 0.3099295496940613, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "]oY:=_g07I4L4K6K4M3H8D=D;L4M3N2N2M3J6M3N2N2N2dN[M[]Of2ab0eMV]O^2gb0iMS]OY2kb0_1N2O1N101O1L5dNPKa_OU5^`0TKX_On4g`0WKR_Ol4m`0XKn^Oj4Ra0R101O00000000O10000O1000000001OO1O1lJg^O`3Za0\\Ll^Oa3Ua0\\LP_Oa3Qa0]LS_Oa3m`0]LV_Oa3l`0[LY_Oc3h`0[LZ_O3_OT2Xa0gM\\_O2AS2Ta0iM]_O1CT2Ra0gM^_O3CS2Ra0eM__O5DR2Xa0ZMZ_Oa0Mf1]b0XNP^OZ1Rb0eNR^OW1Pb0hNS^OT1na0lNU^Oo0na0oNZ^Oh0ha0XOb^O;ba0D^3O01O001O10O11O0O100O01O100O2O1N1O1N3LQ\\c;"}}, {"image_id": 49, "category_id": 2, "bbox": [499.2298583984375, 740.38330078125, 56.23077392578125, 20.61395263671875], "score": 0.23227396607398987, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "dWi;4gg05N3N1O1O1M3O10000O1000000000000000000000000000000O1001OO1001N100000000O101O1N4M1O3GYXO2kg0O3N]PU;"}}, {"image_id": 49, "category_id": 1, "bbox": [93.14109802246094, 405.4095764160156, 374.9266357421875, 325.4922180175781], "score": 0.18671919405460358, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "fWY23dg0=I7J4L;E7I4L4L5jM_Ne]Of1Xb0]Nc]Ok1Wb0UNh]OP2Sb0RNk]OR2Rb0nMm]OU2Qb0kMn]OY2oa0gMP^O]2ma0dMQ^O_2ma0aMS^Oa2ka0_MU^Oc2ha0^MW^Oe2ga0[MY^Oh2da0XM\\^Ok2aa0UM_^Ol2`a0TM_^Om2aa0SM_^On2`a0RM`^On2`a0RM`^Oo2_a0QM`^OP3`a0PM`^OQ3_a0oLa^OQ3_a0oLa^OQ3_a0oL`^OS3_a0nL`^OR3`a0nL`^OR3`a0nL`^OS3_a0nL`^OR3`a0nL`^OS3_a0mLa^OS3_a0nL_^OT3`a0lL`^OT3`a0lL`^OU3_a0kLa^OU3_a0lL`^OU3_a0kLa^OV3^a0kLa^OU3_a0lL_^OV3`a0lL^^OT3ba0mL]^OT3ba0QMY^OP3ea0UMW^Ok2ia0XMS^Oj2la0YMQ^Og2oa0[Mo]Of2Pb0\\Mm]Oe2Sb0]Mk]Od2Tb0^Mi]Oc2Wb0d1O1O1N3N1O2N1O2N2N1O1O2N1O2N2N2N2N3M2N3M3M3M3M3M2N2N2N1O1O00001O001O00001O00001O000000000000000000000000001O00O100000000bIf_OV5[`0eJj_OZ5V`0bJo_O]5Q`0bJQ@]5o?bJS@]5m?bJU@]5k?bJW@]5i?cJX@\\5h?dJW@]5i?bJX@^5h?bJX@^5h?bJW@_5i?aJW@_5i?`JX@`5h?`JW@a5i?_JW@a5i?_JV@b5j?^JV@c5i?]JW@c5i?\\JW@e5j?ZJV@f5i?[JW@e5i?[JW@e5i?[JW@e5i?[JW@e5i?[JW@e5i?[JW@f5h?ZJX@f5h?ZJY@e5g?[JY@e5g?[JY@e5g?[JY@e5g?ZJZ@g5e?YJ[@g5e?ZJZ@f5f?ZJY@h5f?YJX@i5g?XJV@k5i?UJU@o5i?RJT@S6i?nIS@Y6i?hIT@]6i?o0N2N1O2N1O1O001O2M2O2N1O1O1O1O0O2O1O0000000000000001O0O1000000000000O10000O10000O01000O10001O0O1000001O0O101O000O2O001OOUJ_@X3b?gL`@X3`?fLc@Y3]?fLe@Y3[?fLf@Y3[?fLg@Y3Y?fLi@Y3V?gLk@Y3U?fLm@X3T?gLn@X3R?gLo@Y3Q?fLQAY3o>gLRAW3o>hLRAY3n>eLSA[3n>cLSA^3n>^LTAb3n>[LSAe3o>XLRAi3n>TLTAm3m>kJW@e0m0`4m>eJ_@e0f0g4k>`Jg@b0a0m4b?oJ_@R5a?kJa@U5a?hJ`@Y5`?eJa@[5a?bJa@]5b?^J`@b5Pa0O10O01O001O001O01O0001N1O1O1O1N2O100O1O1O1O1O1N3N1O1N3N100O2N1O101N1O1UMh\\Om0Zc0nNk\\OP1Vc0lNn\\OT1Sc0dNU]O[1lb0`NX]O`1hb0_NY]Oa1hb0^NX]Ob1ib0]NW]Ob1kb0\\NV]Od1jb0\\NV]Od1kb0[NU]Oe1kb0ZNV]Of1kb0YNU]Og1kb0YNU]Og1lb0WNU]Oi1kb0WNU]Oi1lb0VNU]Oh1lb0XNU]Oe1nb0YNT]Od1nb0\\NT]O_1Pc0`NR]OZ1Rc0eNQ]OV1Sc0iNn\\OR1Vc0nNl\\On0Xc0POi\\Ol0Zc0SOh\\Oj0[c0UOf\\Oh0]c0WOd\\Og0^c0XOb\\Og0_c0YOb\\Oe0^c0\\Oc\\Ob0^c0^Oc\\O`0]c0BQ]ONPc02U]OGlb0;\\2000O2O0O101O0001O001O1O001N2O001O001O0O2O0001N101O001O001N101O1O1O1OO2N2N1N3N3K4JZWZ="}}, {"image_id": 50, "category_id": 1, "bbox": [449.1925048828125, 4.092830657958984, 143.48663330078125, 198.08421325683594], "score": 1.0, "association_id": 1, "segmentation": {"size": [683, 1024], "counts": "]o^9b0fd06K4L3M3L4L4M3M3M2M3M3M4N1N2N2N2O00100O100O010O1N1O2O1POgMm^OY2U`0nMS_O;f0h1R`0mNi_OV1Q`0SOi_Oo0P`0^Og_Of0W`0X2N2E:E"}}, {"image_id": 50, "category_id": 1, "bbox": [680.0254516601562, 203.9717254638672, 330.10015869140625, 281.7423095703125], "score": 0.9998985528945923, "association_id": 3, "segmentation": {"size": [683, 1024], "counts": "Zc\\>3Se07K5M3L5L2O1N2O1O101N101mM]O[_Oe0^`0E\\_O?^`0Ea_O=[`0Fd_O:Z`0Id_O8Z`0Jf_O6X`0Od_O2Z`0Lj_O3U`0Nl_O2Q`00P@0m?2U@Mh?5Y@Kb?9_@G]?;f@DV??k@BQ?`0PA@m>b0TA]Ok>d0VA\\Oh>e0YA[Oe>f0[AZOc>g0^AZO_>h0bAXO[>i0fAXOS>n0mASOa=^1`BcNX=b1iB_NQ=f1PCZNkT2XAkMk>R2VAnMl>P2TAoMn>o1SAPNn>o1RAQNo>n1RARNm>n1SARNn>m1RASNn>m1RASNn>m1SARNm>n1SARNm>n1SARNn>m1RATNm>l1TASNl>m1TASNl>m1TASNl>m1TASNl>m1UARNk>n1UARNj>P2UAPNk>P2VAoMi>R2WAoMg>S2XAmMg>T2ZAkMf>U2ZAkMe>W2[AhMe>X2\\AgMc>Z2]AfMc>[2]AdMb>]2^AcMb>^2^AbM`>_2`AaM_>a2aA_M]>c2bA]M]>e2bA\\M[>i2cAWMZ>m2dATMZ>P3cAPM\\>R3dAnLZ>T3eAmLY>U3gAjLX>X3gAhLX>Y3iAfLU>\\3kAdLS>_3mA`Lo=d3RB[Li=k3XBRL`=W4aBhK[=\\4fBcKX=`4hB_KV=c4kB\\KS=_2RBkNk0eNR=]2ZBkNe0gNQ=\\2]BlNc0gNo<^2`BhNc0iNkS3@R9n0`DAmb0O1O1O1O1O001O5K2OO0O1N2M3O10000O1000000O103M2M4f_OZOi;g0SD\\Om;e0PD]Oo;e0nC^OQYO[:b0YE5;YO]:?[E78ZO]:=^E85[O_:9`E;O]Ob:3eE>I_Oi:EgEj0@A[>=dAC^>;bAE_>:aAF`>:_AFb>9]AHd>7\\AIe>7ZAIg>6YAJg>6YAJh>5XAKj>4UALl>3TAMm>2SANn>1RAOo>1o@0Q?0o@0R?On@1R?On@1R?0m@0S?0l@1T?0j@1V?Oi@2W?Og@2X?0f@1Z?Od@3\\?Na@4_?M^@5a?M\\@5d?LY@6g?Kl_Oa0S`0@l_Oa0S`0Ak_O`0T`0Bi_O`0U`0Bj_O?T`0Dh_O?U`0Eh_O=U`0Gh_O;V`0Hg_O:W`0Hg_O:X`0Hf_O9Y`0Kb_O7]`0M[_O8e`0IY_O8f`0JX_O7g`0KW_O6i`0V2O001O1O1O100O10O2O1[Mj_O2X`0Jn_O1W`0HQ@O\\`0@Q@0W`9"}}, {"image_id": 50, "category_id": 1, "bbox": [393.9391784667969, 49.238487243652344, 28.970245361328125, 31.9617919921875], "score": 0.9992979764938354, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "akV8;md04L2M5M2N200O1O2N1000001O0000000001O001O1O001O1N2J6M4M5Fji`<"}}, {"image_id": 50, "category_id": 1, "bbox": [615.1367797851562, 149.86778259277344, 92.2598876953125, 91.57496643066406], "score": 0.9992387294769287, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "\\\\j[2RAeMm>[2SAfMl>[2TAeMk>[2UAfMj>Z2VAgMi>Y2WAhMh>X2YAgMg>Y2YAgMg>Y2YAhMf>X2[AfMf>[2YAdMg>]2ZA`Mh>a2]AVMf>j2e11O1O001O0000001O000000000O2O00001N101O1N2O000000000000000000000O0100O1O100O010O101O0O100O1O2N1O100O10O100000O10O1000000000000O1000000000001O0^_OZMP?g2k@^MT?b2i@cMU?^2h@eMW?\\2f@fMZ?[2d@gM[?Y2e@fM\\?[2b@eM_?]2^@cMc?^2[@bMf?e2R@ZMo?h31O1N2O1O1M3Bf_OWL_`0c3?M3N2O100O10000000000000000001O0010O01O2O0O1O2OO10010O2O09H3K2OSMe_OX1\\`0bNi_O]1Z`0ZNn_Oe1U`0lMY@Q2]a0L4K4L3N0O100N2O1M3Nicc5"}}, {"image_id": 51, "category_id": 1, "bbox": [118.71844482421875, 373.0406188964844, 96.78286743164062, 68.3616943359375], "score": 0.9999996423721313, "association_id": 0, "segmentation": {"size": [666, 1002], "counts": "Pj]28^d06L2K5O1O1O1O100O0O101O0O01O1000N120O0O1O100O1O2O001O001O010O1O10000O10001O2M2N2O6J6J0O1O0100N2E;L301O1O1O1000O0100000O100000001O0000000000001O002N00001O00000000001O1O100O100O1002N0000m0SO0O4K_^o?"}}, {"image_id": 51, "category_id": 1, "bbox": [410.3345031738281, 330.1443176269531, 70.24478149414062, 51.611297607421875], "score": 0.9999995231628418, "association_id": 0, "segmentation": {"size": [666, 1002], "counts": "WZ\\85Zd0=M1N3N2N1N2O10O01O1O001O1O1O001O01L3N2100O101O2M2O0O10K5N2O00100O01000000000000000O100000000001O001O1O4L2N2N1O2N1O001O0010[Oe\\OI\\c01S]OCQc07m0MW_d:"}}, {"image_id": 51, "category_id": 2, "bbox": [634.0435791015625, 353.7788391113281, 106.71954345703125, 15.965606689453125], "score": 0.9999969005584717, "association_id": 0, "segmentation": {"size": [666, 1002], "counts": "edn<1hd02O1O0000001O000000001O000000001O0000001O0000001O00010O0000001O01O00000001O01O00000000001O000001O000001O0001O0000000000000001O0000000000001O000000000000001O00000O100000001O00000O100000001N10Vc^5"}}, {"image_id": 51, "category_id": 2, "bbox": [375.6976013183594, 407.3004455566406, 156.87875366210938, 23.905029296875], "score": 0.9999954700469971, "association_id": 1, "segmentation": {"size": [666, 1002], "counts": "Ynd74ed02O1O0000001O00000000000000000000001O000000001O0000000000001OO101O000000000000000000010O00000000000000000000000001O000001O000000000010O0000000001O0001O00000000001O0001O00000001O00000001O0001O00000000001O01O0000000000000001O01O00000000000000010O00000000000010O00000001O0000001O00001O001O000000010O00000O10001O1ObXa9"}}, {"image_id": 51, "category_id": 2, "bbox": [2.2501978874206543, 263.98968505859375, 77.11456298828125, 20.714447021484375], "score": 0.9999804496765137, "association_id": 2, "segmentation": {"size": [666, 1002], "counts": "oa11fd05N1O001O001O1O001O001O0000001O0000000000001O0000010O0001O001O010O00001O001O01O0000000000001N100000000O10001O0O1001O000000O11O01O0000000001O000O2O001O2FeQhb0"}}, {"image_id": 51, "category_id": 1, "bbox": [68.07256317138672, 201.4524383544922, 78.51496124267578, 87.77946472167969], "score": 0.9998753070831299, "association_id": 2, "segmentation": {"size": [666, 1002], "counts": "j\\`11gd05J4L4N3M2O0O2M3N1O1O1O1O1M3O1iNQOX^OZ1ea0o0O1O1O100O100O100O10000000000001O1O001O002N4L2N6J7I1O2N3M1O2N2N2N6J2N1O1O1O1O001O00001O1O1O0000001O1N2O1O1N3M5G[j[a0"}}, {"image_id": 51, "category_id": 2, "bbox": [4.206997394561768, 620.2653198242188, 187.34471130371094, 18.9287109375], "score": 0.9932957291603088, "association_id": 0, "segmentation": {"size": [666, 1002], "counts": "ek36cd02O000O101O00000000000O01000000O100000000O100000000000000000000000000000000000000001O00000000000000000000000000000000000000000O2O000000000000001O000000000000001O00000000001O000000000O2O0000000000000000000000000000000000000000000000O100000000O10000O100N2N20000O100000000O1000000000000000000000000000000000001O000000000000000000000000001O000O1000001O0Ob[e`0"}}, {"image_id": 51, "category_id": 1, "bbox": [368.1654968261719, 239.1644744873047, 24.80859375, 33.56614685058594], "score": 0.7712899446487427, "association_id": 0, "segmentation": {"size": [666, 1002], "counts": "jW`7;]d07I2N2N2N2O1N2O00100000000001N101N2O1N3Jei]<"}}, {"image_id": 51, "category_id": 1, "bbox": [535.4235229492188, 383.17877197265625, 47.0299072265625, 50.445587158203125], "score": 0.7270745038986206, "association_id": 1, "segmentation": {"size": [666, 1002], "counts": "Uem:9`d07H5F7M4M10001N10M3O10001O001000O2O1O3L3N2N1O1OO1N2N2N200O100O1001O1O000000O1O2M3L4H8M3LUi`8"}}, {"image_id": 51, "category_id": 1, "bbox": [760.7070922851562, 337.5847473144531, 37.071044921875, 35.80084228515625], "score": 0.6735468506813049, "association_id": 0, "segmentation": {"size": [666, 1002], "counts": "WY_?>[d0100O01O0O12N2N2N2O4K1O100ON3O10O2O1O4L1O1O0000000000O100O100J7L3N4Dec0B[\\O>dc0C[\\O>ec0CZ\\O>Vc0^Oi\\O41>Vc0^Oh\\O60=Wc0^Oi\\O50=Wc0_Oh\\O5O=Yc0^Og\\O8N:[c0_Of\\O7N;\\c0^Of\\O8M:]c0_Oe\\O7M;^c0^Od\\O8N:^c0^Od\\O9M9_c0^Od\\O9L:`c0]Od\\OU1\\c0kNd\\OV1[c0jNe\\OV1[c0kNc\\OV1]c0jNc\\OV1]c0jNc\\OW1\\c0jNc\\OV1]c0<1O0000000000000000001O000001O00000000000000000000000001O0000001O000000001O00000000001O0000001O0000000000000000001O00000000000000001O0O1000001O00000000000000000O100000000O101OO10000000000000000000000000000O1000O1000O1000000O100000000O10O10O100000000000O2O00001O001O0O10001O00001N101O2N1O1N101O0000001O001N2O1O1O0O2O0000001O000000000000000000000O100000000O100O1000000O1000000O1O1O100O1O100O100000000O1000O10000000000O10000000O1000000000000000001O000000001O0000000001O01O000000001O00000001O0001O000000001O0000001O0000000001O0001O000000000000001O00000000001O000000000O2O0O2OmoV;"}}, {"image_id": 52, "category_id": 1, "bbox": [189.76007080078125, 76.10951232910156, 291.1886901855469, 438.1640625], "score": 0.9999905824661255, "association_id": 1, "segmentation": {"size": [683, 1024], "counts": "\\Qo3j4[`0:J6J4M3M3M1O2N1N3N1N3M2O2N1O10O000000O1ZJVJlKj5Q4_JfIL`Nf5g7eJ`I0aN^5m7gJ[I2cNX5R8iJVI4dNT5V8jJSI6dNQ5X8lJPI7dNo4[8lJnH9dNl4]8oJjH1h:\\3kD^L?9e:X3ZGjLe8V3[GjLe8U3oDdL86j:V3mDoL0JS;W3lDUMLDX;W3kDZMJ]O];W3jD`MEYOa;W3iDcMETOc;Y3hDdMDSOe;W3iDcMIPO`;[3jDYMY=e2h2N\\EiL\\3P3VLaMm3Y2RLjMQ4Q2nKRNU4i1jKZNY4`1gKeNY4V1gKoNY4l0fK[OX4a0gKFV47iKOV4MjK7U4FkK>T4_OoKa0P4^OSLa0l3^OWLb0g3]O^L`0a3_OdL>Z3CjL:U3FoL6R3HRMlNdHf0Z:=eME[2:dMH\\27aMQOnG=b:`0_MQOSH?_:>^MSOTH>b:;YMWOVH?c:7WMZOWH?c:5WMYOXHc0a:4iMNV21kMOU21jM0V2OjM2V2NiM3W2MhM3Y2LgM5Y2JhM5Z2IfM7[2IdM7^2GcM8^2HaM8`2H_M8b2H]M8e2GZM9h2FWM:P3@oL`0T3@hLa0Y3F_L:b3F\\L;d3FZL;f3FXL;i3DXL;h3FXL9h3GYL7h3IYL6h3IYL5h3LXL3h3MXL3i3LXL2P4DUL8c<@ehg="}}, {"image_id": 53, "category_id": 1, "bbox": [259.714111328125, 278.7991027832031, 118.12911987304688, 88.68377685546875], "score": 1.0, "association_id": 2, "segmentation": {"size": [480, 640], "counts": "Smm35i>3TCLj:5SEOj:3UENi:4UENi:4UEMj:4VEMi:4UEMj:5TELk:6RELm:5RELn:5PELP;5nDKS;=aDG^;<_DEa;=]DBc;b0YD_Og;i0mC[ORN1O2L4M200O2B=L5M3N2Ma\\l3"}}, {"image_id": 53, "category_id": 1, "bbox": [92.19361877441406, 182.1015625, 141.15185546875, 175.0986328125], "score": 1.0, "association_id": 1, "segmentation": {"size": [480, 640], "counts": "na_12a>T1VOL4K5L3M4N101N101O0O201O01N2O00O110O01O0000011O0N1001102NOO0010O2N1O00O02N2N1O100N2O4L3L3kNYCMh1N2O2N1O1O001O1O1O001O0000001O0000001O00000000001O0000000000001O000001O000001O000000010O0000000001O0000010O00001O0000000000001O00000001O00000000001O0001O000001O00001O0001O0000001O0010O02N2N1O1O1O1O01O0001O00001O001O0000000001O0001O00O2O000000000000000000000000000001O0000000000000000000001O0000000001O0000001O000000mRj6"}}, {"image_id": 53, "category_id": 2, "bbox": [210.54238891601562, 349.10247802734375, 129.97811889648438, 15.4971923828125], "score": 0.9999990463256836, "association_id": 2, "segmentation": {"size": [480, 640], "counts": "PaV31n>101O0000000000001O0000000001O00000001O0000000001O0001O00000001O0001O0000001O0000000O2O00001O0000000000O1O1O2O1NQm83lRG2O000O10000000O10000000000000000001O000001O000001O0000000000000000001O000001O00000000001OlX\\4"}}, {"image_id": 53, "category_id": 1, "bbox": [614.0435791015625, 151.9246826171875, 25.435791015625, 121.7901611328125], "score": 0.9999071359634399, "association_id": 0, "segmentation": {"size": [480, 640], "counts": "QRP9?[>7nNR1J5I7lNT1J6L4M3O1N2O1O0100000000O100O1N2O1oNPERNP;k1VEiMS;P2Z;"}}, {"image_id": 54, "category_id": 1, "bbox": [769.8787841796875, 94.6421890258789, 164.74713134765625, 425.4259338378906], "score": 1.0, "association_id": 3, "segmentation": {"size": [659, 1024], "counts": "SYd?]1ob0>E6I6G9K5L4M3M2N3K4o@RMZK5N2N2M3L4C=K5N2N2O1N2M3M3N2N3N2N2N2nHQD\\5S<\\JVD`5o;UJ[Df5]=J7F9G7B?G7L4K6I6L4N3M2O1O1N2O1N3M2O2N3N1N3M3M3N1M3N2M2N3M3M3N2O1N2O3L4M3M2N3L4M2M4L4K5J6J6K5K7GYfi1"}}, {"image_id": 54, "category_id": 2, "bbox": [136.11065673828125, 474.91455078125, 125.35507202148438, 23.819061279296875], "score": 1.0, "association_id": 4, "segmentation": {"size": [659, 1024], "counts": "kdh22`d0100O2N10000O1O01000O1O1M3O10000O10O100000O0100000000O01000O10000O010O10000O1000O10O10000O1000O10000000O100000000000O11O1O1O1O1O1NSe9NP[F0O1J6N2O0010O010O010000000O1000000O1000000O101O0000000O1000000O10000O10000OaT]?"}}, {"image_id": 54, "category_id": 2, "bbox": [288.2535705566406, 489.6175231933594, 125.32684326171875, 30.337799072265625], "score": 0.9999998807907104, "association_id": 2, "segmentation": {"size": [659, 1024], "counts": "SYP61ad01O1KNf[O5Wd0500O1O1O100O1O001O1M300O001O1O01O1N2N2O1O010O1000000O1000000O100000O01000000000O0100000000001O00000000000000000000000000000000000000000001O0O10001O00001O0O1000000O10000O101O0O10000000000000000000000O100000001O000OgY[<"}}, {"image_id": 54, "category_id": 2, "bbox": [769.1239624023438, 493.0179138183594, 151.0015869140625, 28.273345947265625], "score": 0.9999998807907104, "association_id": 3, "segmentation": {"size": [659, 1024], "counts": "\\\\_?3^d04N001N1000001O00000O101O00000O2O0L400O2O000000FS\\ONmc0<001O00000000000O100000000000000O10000000000O1O1L4N2N2Ne[OL]d00ZP90ioF3N1O1O1O001O2N;E3M0000000000000000O10000O101N100O101O001N1O101N1000000O100000000O100000000O10000000000O100O2O0000000O1000000000000000000O1000000000001O0O100O2OZgS2"}}, {"image_id": 54, "category_id": 1, "bbox": [403.8702087402344, 83.62701416015625, 153.16189575195312, 446.45654296875], "score": 0.9999997615814209, "association_id": 1, "segmentation": {"size": [659, 1024], "counts": "dY[8l0bc0i0XO;F4L4M3M3M3M3L5H8G9I8J5L2O2M2N3N1M4K7J6J?Af0[Oj0UO8Ha=_OcB:c=D`B7e=F]B6g=G]B5e=J^B2e=L^B0e=N]BOe=0]BMf=1\\BMg=O\\BNg=0\\BMe=2]BKf=2]BLd=2`BEh=7]3Gmdb<"}}, {"image_id": 54, "category_id": 2, "bbox": [404.2482604980469, 224.16574096679688, 143.85177612304688, 269.5411071777344], "score": 0.06038331240415573, "association_id": 0, "segmentation": {"size": [659, 1024], "counts": "PPcd0"}}, {"image_id": 55, "category_id": 1, "bbox": [296.1820373535156, 229.79766845703125, 102.65625, 318.5133056640625], "score": 1.0, "association_id": 1, "segmentation": {"size": [683, 1024], "counts": "n\\X64md0m0[O`0@>B:G4K5L4K6K3M2N2N3N2N4K6K3M6J9G4L2YNlKRBY4h=QLPBR4l=RLPBQ4m=RLoAR4o=RLkAT4Q>RLdAY4V>kKbA]4Z>_1K=C9G3ZDWHd9n7UFVHi9P8oESHP:P8lERHS:Q8gERHY:Q8`ETH_:n7\\EUHd:l7ZEUHf:m7VEUHj:S8kDPHU;S90000000000000000000fMkE^IU:_6SF[In9e6UFXIk9h6WFUIj95PE\\5Y1[Jh96TE]5W1XJi96TEa5W=TJQCm5V>010O1O1O1O1O001O1O00001O01O100O2dNPAZLP?`3\\AZLd>_3gA_LW>]3nAcLQ>Z3RBfLm=W3WBiLi=R3\\BnLc=o2aBPM_=m2fBQM[=i2nBSMR=i2TCUMl?A10O100O100000O1000000000000O10000000O01000O010000O010000O10O0100O100O100O1O100O100O1000000O100O10000O100O100O100O100O10001NUf_<"}}, {"image_id": 55, "category_id": 2, "bbox": [500.02935791015625, 468.5456848144531, 47.10687255859375, 14.365264892578125], "score": 0.9999998807907104, "association_id": 2, "segmentation": {"size": [683, 1024], "counts": "bYa:2Ye01O0O1O1M3O2M102O00O1000000000000O100O10000O100000000O100000000O2O000O10000O101N2OVfm9"}}, {"image_id": 55, "category_id": 1, "bbox": [474.4131164550781, 283.76947021484375, 67.21420288085938, 194.68099975585938], "score": 0.9999995231628418, "association_id": 2, "segmentation": {"size": [683, 1024], "counts": "mTm9f3gAZLY>j3cAVL]>o3]ARLc>Q4ZAnKh>S4YAiKi>W4\\A_Kh>b4Q1010d0[O3M10OfNT_OUNj`0h1[_OWNe`0f1^_OYNb`0e1a_O[N_`0b1e_O\\N[`0b1i_O[NX`0d1k_OYNV`0d1P@WNR`0c1n1J6M4H8K5L4M3L4H8K6L8DijS:"}}, {"image_id": 55, "category_id": 1, "bbox": [783.78564453125, 287.01336669921875, 54.173583984375, 145.75338745117188], "score": 0.9999995231628418, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "iW[`0b0hd04K6J3M4L3L3L6K4M6K4L7H6K6Jj0WO5I8AB7J301N1000001O:F5K10O001N3M=A6aNg\\O1=]ORc08m\\O5ic0C_\\O7Sd="}}, {"image_id": 55, "category_id": 1, "bbox": [939.3831176757812, 312.0325622558594, 37.91058349609375, 89.82156372070312], "score": 0.9950856566429138, "association_id": 0, "segmentation": {"size": [683, 1024], "counts": "cYcc05Se0:H:E5L6J5J5K4K6J7H6M3N1O1O0000O1N20000N2O202mMm\\Oi1[c010YOe\\OZO\\c0b0j\\OZOYc0a0m\\O[OUc0a0l0O2N5I6EVfQ1"}}, {"image_id": 56, "category_id": 1, "bbox": [424.3655700683594, 250.07000732421875, 254.07595825195312, 119.59832763671875], "score": 1.0, "association_id": 1, "segmentation": {"size": [601, 785], "counts": "egi7h0la0;I2N101N1N3N2M3N2N2O1N101N100O2O0O2O000O2O0000000O101O0O10000O10O10000O010000000O0100O10O0100O0100O10O1O10OO200O100O1O1O1O1N2O2O0O100O101N1O1O1O2O0O100O100O101O0O1000000O10000O10000O10000000000000000000000O101O0000001O00001O0010O01O2N1O001O1O001O1O2N2N001O1O00001O0001O01O000001O000O100O10000O2O000O100O1N2N2O100O100O1000000O010O100000000000000000O10001O00001O0000001O0000010O00001O0010O000001O00000001O0001O01O001O1O001O00001O001O3M1O1O1N2O001O003M3M2N1O1O001O0O2O1O1N3N2M2O0O2O001N3N3L3N1N2O2M2O2M3M6Gl_n1"}}, {"image_id": 56, "category_id": 2, "bbox": [344.65130615234375, 340.2510986328125, 301.32769775390625, 35.070709228515625], "score": 0.9999991655349731, "association_id": 1, "segmentation": {"size": [601, 785], "counts": "cb\\62gb01O000O101O0O2O001O0000000000000O2O0000001O0000000000001O0000000000001O000000001O00000000001O000000001O0000000000001O00000000001O000000000000001O00000000000010O0000001O01O01O0000001O101N1O0010O0000000001O0001O000000001O000O1000000O2O0000000O1000000O10001O0O1000000000000000001O0000000001O0000001O01O00000001O00000000000000001O0000000001O0000000000000001O001O00001O000000010O00002N1O00001O0000001O001O5K1O1O001O00001O00000000001O0000000001N100O100O100000000O1000000N2O100O10000000O10000000000000000000000000000O10000000000000001O000O100000001O0000000O1000000000001O0000000O10001N10eZe2"}}, {"image_id": 57, "category_id": 1, "bbox": [204.14007568359375, 109.88412475585938, 246.6812744140625, 240.8760986328125], "score": 1.0, "association_id": 1, "segmentation": {"size": [480, 640], "counts": "aYP3k0P>8H8G7B?C6L4M1N101O0O2O001O1N4M2N001N2O001O001O1O1O1O6J2M2O001O00001O0O101N5L5K2N2M101O00001O0O2O009G4L1O001O00001O00001N2O001O001O00001O000O101O0O100000001O000O1000000000000000000000000000000O10001O000O100001O000000010O000001O01O00001O1O3N9F3M1O1O1O001O00001O001O00001O00001O0000001O0000000000001O0000001O1O001O1O1O1O001O001O1O002N4Ll0TO2N1O1O001O0000001O0000001O00001O0000O100000000O1000000000000O100000000O10000O10000000000000000000000O1000000000000000O100000000000000O100000000000000O100000000000000000000O100000000000000000000000000000000000000000000000000000000O100000000O1000000O100000O1000O1000000000000O101O0O1O1O1O1O1O1O2N1O1N\\eX3"}}, {"image_id": 58, "category_id": 1, "bbox": [464.7535400390625, 161.6643524169922, 108.36590576171875, 269.33563232421875], "score": 1.0, "association_id": 0, "segmentation": {"size": [431, 640], "counts": "g\\T6:Q=5K6I6M3M2K4M4M2N3M2N3N1O00M4M3N3N1N2OdFTOX6k0gI^OP6c0mIJj56SJ:`5F]Jd0\\5\\OcJi0Z5WObJT1W5lNeJP2b4QN[KU2a4mM\\KW2`4kM^JQOBY3f5PN\\JZ3V5TMdJR3W5e2K5M3O10O10O01N1000O0100M4L3O2N2M3N2O1O100000101002N3L3M3N1O10N4L3L3N0N4M3M1O001O0O1000000000001fLoIUOP6e0]JTOc5j0bJSO_5i0iJROX5j0WKjNk4Q1ZKmNh4Q1ZKmNg4Q1]KlNd4S1`KiNa4U1bKiN^4V1eKhN]4T1kKeNW4W1YL\\Nj3`1^LXNd3e1fLoM`3m1S4L4L5K9_Nlnn0"}}, {"image_id": 58, "category_id": 1, "bbox": [357.50579833984375, 185.5033416748047, 32.615081787109375, 84.20384216308594], "score": 1.0, "association_id": 1, "segmentation": {"size": [431, 640], "counts": "QZg43Y=5N0N1L4M4N3M4N7Hf0YO4M4Jl<4K5UE^Of8f0TGBf8a0UGFf8=WGGe8PFTOn0>P9m0nFTOo8Q1nFPOQ9R1mFoNR9S1lFnNS9U1jFlNT9X1iFjNU9Z1gFgNX9_1bFbN]9c1^F^NR9QOXGf3d8cLVG^3g8hLUGY3h8g0N2O0NoN`G\\M^8b2hGZMU8g2SHSMi7P3^HjL^7Z3hH`LT7e3QIULi6Q4T1500O100000010O1O1O0O2O1N2N101hM_KcKc4]4^K`Kd4`4^K]Kc4b4`K[K`4f4bKWK_4i4mKjJT4V5nKhJR4W5PLgJR4X5oKgJQ4Y5QLdJQ4[5PLcJR4\\5PLaJR4^5PL_JR4_5QL]JR4b5RLWJS4g5PLQJV4n5e1O1O2N1N2RKdHj3]7SLfHl3Z7SLgHm3Y7SLgHm3[7oKgHQ4_7fKdHZ4W8000O100000000aMVK\\Lj4c3ZKZLf4d3^K_JKY1g4W4aKZJM^1b4W4eKTJNd1]4W4WLdJPOa0i4i4[L`JSOd0b4k4_LYJWOi0Z4k4XMQKi2l4\\MRKd2j4cMSK]2i4iMTKX2k4jMSKW2k4mMRKT2m4nMoJU2P5T3O1O100O100O1O100O1O100O1O10000O10000000000001O00001O00001O001O001O001O001O001O00010O0000001O01O00010O1mKUHc2k7ZMYHe2k7TMZHk2k7iL]HU3o8N2O0O100O10O0fHjL_4V3]KoLa4R3ZKSMe4m2]KPMd4Q3_KiLc4W3j20O001O0ZGcL]7]3bHeL]7\\3aHfL^7Z3`HhL`7Y3^HiLa7W3]HlLb7U3\\HlLd7T3ZHnLf7S3XHoLg7Q3YHnLh7R3ZHkLg7U3\\HgLe7Y3_HaLc7_3U10000000000000000000000O100O1000000O100000000O10000000000001O00000000000000001O000O10001N101N101N1O2N2N2O0O2N2O001N2O001O1O1N3N2N3M4L3M4K4M2N3M0O2O001N1O2QIkJd5W5SJRKl5V3gIgM:VOm5k2_JcMAEn5b2kJgMTOIP6_2oJiMlNLS6[2SKoNm4o0VKQOh4o0YKQOg4n0[KROd4m0]KSOb4m0`KQOa4n0aKPO`4o0bKoN^4P1eKeMXN;T6n1gKXMjNb0_5T2RMgMo2V2XM\\MQ3a2o3L3M3000001O010O001O100N101N2O1O1O001O1O100O10O010O100O1O00100N110O1O010O1000001O100O001O1O001O010O000010O010O101O001O1O1O1O1O00000O100O10000O101O1O2M3N1O0O10O01O10O0001O1O001O1O1O2N3M2N1O2N1O1O1O1O0O2N3N1N2N3M<[ORjc2"}}, {"image_id": 59, "category_id": 2, "bbox": [56.63185501098633, 358.8075866699219, 109.94316101074219, 46.431671142578125], "score": 0.999883770942688, "association_id": 0, "segmentation": {"size": [428, 640], "counts": "gch03Y=00O[S2OWZ34PbJM^C6\\oCH8Ji;i0WDWOi;i0WDWOi;h0YDVOh;j0XDVOg;j0>000kCWOg;i0YDWOg;i0YDWOg;h0ZDXOf;h0ZDXOf;g0[DYOe;f0\\DZOd;f0\\DZOd;e0]D[Oc;c0_D]Oa;a0aD_O_;?cDA\\;>fDBZ;4K6L3N3M2M2N3lDYOT8j0eGFP8;mGKo75lG3Q8NeGLC5g=j0K4N2O10000000O1HbBVOa=`0c0I5N6GhiU5"}}, {"image_id": 60, "category_id": 1, "bbox": [307.2099609375, 230.86102294921875, 27.46966552734375, 62.025390625], "score": 0.9999996423721313, "association_id": 2, "segmentation": {"size": [471, 640], "counts": "o[^4`0Q>:I5L2N5L1N2OKgBnNW=[1N4L4M4L2N2N0000O3N3L4L3XOZCYOj201N1O100000O010O100O1000O10O101N1O^Q52`nJ2N101O0O101N100O10000@H`B9_=HaB8^=IbB7]=KbB5^=KaB6^=L`B5`=N\\B2d=0ZB1e=a0O1000O0100hBQOh8H9G8J8I1O001O01O1O2M4K4[Of0Jgmh4"}}, {"image_id": 60, "category_id": 1, "bbox": [382.0120849609375, 240.34469604492188, 15.713043212890625, 30.6732177734375], "score": 0.9999531507492065, "association_id": 3, "segmentation": {"size": [471, 640], "counts": "gn_55b>O10O1N1N3G9L7L2O1O0001O2N1@_a_3"}}, {"image_id": 60, "category_id": 2, "bbox": [274.228271484375, 273.0682373046875, 23.9891357421875, 3.24737548828125], "score": 0.9998472929000854, "association_id": 4, "segmentation": {"size": [471, 640], "counts": "eeo31e>10000000000000000000000000000001O00fnm4"}}, {"image_id": 60, "category_id": 2, "bbox": [315.4507141113281, 289.6347961425781, 86.15570068359375, 13.105316162109375], "score": 0.9997546076774597, "association_id": 0, "segmentation": {"size": [471, 640], "counts": "Wff42d>1000000001O000001O000000000001O00000000001O0000000001O00000000001O00000001O000001O000000000000001O0000000000000000000000000MMbA3^>30O10000L`A0a>0b__3"}}, {"image_id": 60, "category_id": 2, "bbox": [393.1884460449219, 267.2611999511719, 28.889434814453125, 3.968048095703125], "score": 0.9993129968643188, "association_id": 3, "segmentation": {"size": [471, 640], "counts": "P]f51f>1N10000001O000000000O10eoY3"}}, {"image_id": 60, "category_id": 2, "bbox": [328.3642883300781, 278.17413330078125, 49.803619384765625, 7.977569580078125], "score": 0.832843005657196, "association_id": 2, "segmentation": {"size": [471, 640], "counts": "Ucg42e>001O000000000000001O000000000000000001O01O0001O0000000000001O00000O10lVn3"}}, {"image_id": 60, "category_id": 2, "bbox": [272.18609619140625, 273.92022705078125, 35.4150390625, 2.906829833984375], "score": 0.21080201864242554, "association_id": 0, "segmentation": {"size": [471, 640], "counts": "nVo31f>0000000000000000000000000000000000000fnm4"}}, {"image_id": 60, "category_id": 1, "bbox": [307.5927734375, 232.60826110839844, 14.417388916015625, 53.81443786621094], "score": 0.08518064767122269, "association_id": 0, "segmentation": {"size": [471, 640], "counts": "W\\^43c>4^AKQ>OVBb0]=`0L3N2OK500:FHhBTOW=;_C]Od10000001O00jQg4"}}, {"image_id": 60, "category_id": 1, "bbox": [287.3069152832031, 233.28712463378906, 43.46136474609375, 49.71995544433594], "score": 0.051068175584077835, "association_id": 0, "segmentation": {"size": [471, 640], "counts": "`aV47^>5J9H9H8H3N0010O2N1O2M2M3F:N2N1CQB2Z>1CMRB8i=?J8J00O04M10McBPOX=[1M1O1O000000TOlB5U=JlB5T=g02N2^OlB\\OW=?d0Jel]4"}}, {"image_id": 61, "category_id": 1, "bbox": [80.99006652832031, 171.64312744140625, 148.221435546875, 276.6790466308594], "score": 1.0, "association_id": 2, "segmentation": {"size": [473, 640], "counts": "miY1?V>7I7mCTOQ:P1dE^OV:e0eEBV:`0fEFV:=cELX:6aE4Y:0`E8[:M_E8^:OYE6`0[NT9g3gF_LU9e4M3M4L2M4L3M2N3N2N2N4K5K3N3M2N4L9H4K3L3M5K6K5K3M3L3L4M3M2O2N1N101N2O10O1O0O2N2N2N2M3I7J6N2N201N100O1010102M3N3L2N3N0O0O2O0O1N2N3M2N2M3M3M2L5M2lMbGkMa8U43K6J6K4L3N3M4K3M4L3O0O2O1O2N1O1N2O0O2N2N2M3N3L4M3N3L5J5J5L5L3M2N2O1N101N1O2M2O1O2N1O2O2M3M2TOoCmNS2N001N2O010O001O010O001O00001O01O000010O00010O010O01O01O01O01O010O0010N2Ne4"}}, {"image_id": 61, "category_id": 1, "bbox": [580.66748046875, 159.95236206054688, 51.063720703125, 158.11105346679688], "score": 0.9999991655349731, "association_id": 1, "segmentation": {"size": [473, 640], "counts": "PQ]8:]>8Hk0TO5M4K4K3M5Ii0ZO7I;E?@8H6K3N3M3N1O0O2O00O01O01O1O1O1O3N1N102M4K]Ob;9[D24Ga;5dDJM1`;3fEK[:OQQ4"}}, {"image_id": 61, "category_id": 2, "bbox": [81.02239990234375, 432.12042236328125, 130.49742126464844, 40.87957763671875], "score": 0.9999985694885254, "association_id": 2, "segmentation": {"size": [473, 640], "counts": "aZV11f>4M2O1N2O000O2O001O00001O0O1000000000000O10000O10000O1O100O1O1O10000O100O1O100O100O100000010O000000000000000O10000O1O1O1O1O100O1N200O1N101O10000000000000000000000000000001O;E1O1O001O1O1O2N002N1O1O0000001O0000001O0000001O001O1O002N2N001O1N2O001NX_X6"}}, {"image_id": 61, "category_id": 1, "bbox": [532.1072387695312, 327.3283996582031, 43.50531005859375, 136.38128662109375], "score": 0.9999911785125732, "association_id": 0, "segmentation": {"size": [473, 640], "counts": "k`g7P1f<\\OlCm0i;W1XOh0I7F8M4M4M2O1N10000000000O10000000000000000001O00000O3L2N3N4L3K8JY1dN[Qo0"}}, {"image_id": 61, "category_id": 1, "bbox": [298.2314453125, 66.21898651123047, 249.889892578125, 406.781005859375], "score": 0.9999797344207764, "association_id": 3, "segmentation": {"size": [473, 640], "counts": "kh[49Z>8C>F:K6J5K4M3L4M2N2M3N3L4L4L4M3L4`E\\Mf8f2VGWNn7m1nGXNm7n1lGZNm7n1hG\\NP8]4I8G7I7J4L4M1N3M2N2N2M4M2O1N20O01O0001O000O10000O0O2L4L3M4O000001O0K5[Oe0O0101O010O11O0O2N2N101O001O1000001O0O2O001O00001N101O0O2O0O2N101N101N3N1N3N2M3N1N2O2M2N3M3N9F9H5J4M2M4M2M4L4M4K4L2M4L3M2L4M4K4M3M3M4M2N2O1O10000O10O10O1001O1N2O2M3N2M2N3N2M3G9F;\\Od0D;I7K6K3N3L3M4L4K4M4K5L5K3M3M3N2N1O2N1O2N1O1O2O0O2O001O001N101O1O2O0O2N100O1O010O1O1O100O2N2N2O1N1O1O1O1N3N3L=Dc0]O3L3N2N3L4M2N2M3N1_NTGRMn8l2UGRMl8k2XGSMi8k2ZGRMi8l2ZGPMh8n2\\GoLf8o2d1M2O2M2O1O1O1O101N3M2O1N101N0O2N2N2N3L3N3M4L3K6D4I7N1O2M2N2O1O2N10001SBVOj=n0N1O00000001O1O00001O001N2O0O1O2L4N8H3N1O0O100000OO3NThX5"}}, {"image_id": 61, "category_id": 2, "bbox": [349.9568786621094, 397.03314208984375, 232.24325561523438, 73.923583984375], "score": 0.9994509816169739, "association_id": 3, "segmentation": {"size": [473, 640], "counts": "fSR5:]>4L3N2O01O1O1O1O001O1O00001O1O001O000O2O00001N3Nbl4M6K2N2O00000000000001O00000000000000O10000O1000000001O1O001O1O1O1O1O2N1O1O1O2N001O1O0000001O0GeA4[>KfA4[>LgA1iah3"}}, {"image_id": 62, "category_id": 1, "bbox": [145.02052307128906, 141.27272033691406, 154.11412048339844, 186.96546936035156], "score": 1.0, "association_id": 1, "segmentation": {"size": [375, 500], "counts": "oah1TFCl9>SFCl9?PFCP:R1000000001O00001O0O20O01O1O001O001000O100O0010000O101N1O00100O11O0O1O1N5[ObEI`:4eEBb:;`0K[TQ3"}}, {"image_id": 62, "category_id": 1, "bbox": [35.46624755859375, 174.1934814453125, 100.07417297363281, 118.0001220703125], "score": 0.9523448944091797, "association_id": 0, "segmentation": {"size": [375, 500], "counts": "n]=?U;5N000O11O1N2N2N2N2N8HTo30mPL2N2M2O1O2N0100O100O0001O001O10000O10O010O00100O1O0010O001O100O1O00100000O0010O001O1000O10O010O1O1O001O01O002O0O0010O10O010001N0010O001O100O1O0O101O2Mg]U4"}}, {"image_id": 62, "category_id": 2, "bbox": [410.345458984375, 249.78573608398438, 29.6278076171875, 4.3937225341796875], "score": 0.8511143922805786, "association_id": 0, "segmentation": {"size": [375, 500], "counts": "\\kg41f;001O00001O0000001O0000000000000000000000000000000Zge0"}}, {"image_id": 62, "category_id": 1, "bbox": [444.21343994140625, 188.82040405273438, 12.351104736328125, 65.18075561523438], "score": 0.4000343382358551, "association_id": 0, "segmentation": {"size": [375, 500], "counts": "`VS59P:^1F:0000000000001QNbFe07Gdb`0"}}, {"image_id": 63, "category_id": 1, "bbox": [229.1555633544922, 155.49215698242188, 111.36759948730469, 162.0784912109375], "score": 1.0, "association_id": 1, "segmentation": {"size": [327, 500], "counts": "Tm[21Q:6M3M2M3M3N3I6I7O2M2N3J9J5L7I3K5M2jHQNQ6Q2kISNS6P2iITNS6o1jIVNQ6n1lIUNR6Q3N4M4K4M2L4M2N2N1O1H8L4N200O101OO1000O1000000000O1O1VORKXLQ5e3VKULl4i3j000O1O2O0O1N2O1O2[NPJPOT6i0RJTOQ6h0SJTOQ6j0QJSOW6e0PJROX6h0f1N1O1O3M100O2O2M1O2O2N2OO01N2O2M1O101N2OO2OO101O0O10O010O01N4L4KYid1"}}, {"image_id": 63, "category_id": 1, "bbox": [81.42132568359375, 111.30996704101562, 157.07696533203125, 200.69509887695312], "score": 0.9999996423721313, "association_id": 2, "segmentation": {"size": [327, 500], "counts": "W]j0Q1Q97M1N2M3H8N2N2O1N2K4B>O2O0O01CaHQN[7P2>M5O101O1M3L3M4O1O0O1O1N20001O00100O1O10O3N1O1O1`H`NW6`1gIdNW6]1eIhNW6\\1aITOT6S1YIA^6W2M2N2N1O0N3MnNSJoMl5o1\\JmMb5o1hJkMW5W2TKXMb4X3o0701O0100000O10001O00001VKeLf2[3XMiLf2X3XMjLg2W3WMjLi2Y3SMhLm2g3bL\\L]3V4oKlKQ4[4eKiKZ4R51N101bJPLb4R4XKULe4i4N1WObJfLa5V3fJdL\\5T3QKbLU5l2\\1M4L2N3N2M2NoIaM_4]2bKfM[4Z2dKjMZ4U2eKmMZ4T2cKnM^4Q2`KRN`4n1]KUNc4k1[KVNe4k1YKVNh4j1VKWNj4j1RKYNn4i1nJYNS5h1iJZNW5h1fJYNZ5i1cJXN]5k1\\JYNd5T3100O1O1K5G9G9N2gNXIROj6l0^IkNd6T1gI_N\\6`1V100O1011O002N000O100O2N1O10OO2O00000001O00001N1WOPH[OQ8`0VH]Om7>XH^On7:XHBn76WHEdmf2"}}, {"image_id": 63, "category_id": 2, "bbox": [195.9064483642578, 284.0616149902344, 87.10633850097656, 40.379730224609375], "score": 0.9998939037322998, "association_id": 1, "segmentation": {"size": [327, 500], "counts": "dVo1110U:000j]51jaJ6XFLd9=O1N2O1ON21aF]OZ9b0gF_OX9`0iFAU9?mFBP9>QGCn81N101O1O001O0010O10000O5L0O103M0O106I2O0O2O1O0OQSZ2"}}, {"image_id": 63, "category_id": 2, "bbox": [79.97476196289062, 257.72576904296875, 130.6625518798828, 48.062255859375], "score": 0.99979168176651, "association_id": 2, "segmentation": {"size": [327, 500], "counts": "Pcn01T:2O2N6J2O1O00001O1O001O004L1O1O001O001O0000000000000001O001N2MSl2LRTM5[F]O^9f0O2O2N1O00010O01O01OO101J5N3N1O3K\\l25`SM3N2O0001O0000001M3M3M2O2MVe0JQ[O3M1O101N100O1O1O2O0001O00001N3N2N2N1OU`o2"}}, {"image_id": 63, "category_id": 1, "bbox": [403.3948669433594, 229.60702514648438, 61.774566650390625, 51.7747802734375], "score": 0.896142303943634, "association_id": 0, "segmentation": {"size": [327, 500], "counts": "U_T42T:1O2E;M3B=N3L3N200O11O1O00001O00000000000000O10000O1O100O1O100O100000000001O001O1O1I8L3M3K7K6I4MXb;"}}, {"image_id": 63, "category_id": 1, "bbox": [347.1922302246094, 192.5021514892578, 124.87750244140625, 76.85789489746094], "score": 0.3693290650844574, "association_id": 0, "segmentation": {"size": [327, 500], "counts": "liR43T:1O0O2N1O1jGI\\67cIK[66dIK\\65cIL]65aIL^65aIL_65_ILa64^IMb62PIJQO;o7IoHb0Q7\\OPIe0P7ZOQIf0P7XOQIh0V81O1001O1O001O00000FeFHZ99gFFY9:gFFY9:gFFY9:fFGZ9c00000000EiFFW96nFIS95nFKR95nFKR96mFJS98kFHU99eFC24Y9=fFC[9=dFC\\9d01N101M4H:GRa<"}}, {"image_id": 63, "category_id": 1, "bbox": [126.4034423828125, 148.75880432128906, 342.5605773925781, 157.89109802246094], "score": 0.2304760068655014, "association_id": 0, "segmentation": {"size": [327, 500], "counts": "_k_13P:5N101N2O1O0O2O1O001O000O2O00001O0O101O01O1O1O001O1N2O1O1O1O1O001M3N[hi00VQVOLj2UGAl8?UG@k8`0VG^Ok8d0;001O001N20O01O0100O2O4K100O1O6LO0O02N4L00egZ2"}}, {"image_id": 63, "category_id": 2, "bbox": [204.25807189941406, 163.84664916992188, 95.93006896972656, 152.2987060546875], "score": 0.09154308587312698, "association_id": 0, "segmentation": {"size": [327, 500], "counts": "`TX22S:7KN101O01N200O10O001001N2O1O1N2O0O101O1O1O1O0O3N1O1100O1N4L4L2N4JXe\\2"}}, {"image_id": 63, "category_id": 1, "bbox": [296.4076843261719, 133.59217834472656, 178.66769409179688, 125.90510559082031], "score": 0.07807169109582901, "association_id": 0, "segmentation": {"size": [327, 500], "counts": "ddo21mg50YbJ0O101N1O1O2N100000000000000001O1N2N3NZd73b[H3jFJV89hGGX8:gGFY86L3M2N3lBD_;d0UDDg;b0RD@m;c0PD_On;d0oC]OPd8B_G<`8DiG^NXOd0P9n0iHQOW7n0lHPOT7o0nHPOQ7P1RInNn6R1TIkNm6T1UIkNl6Q1XInNh6n0\\IROf6i0^IVOc66`F^OP3;`65dF]Oo2<]66WJIj54YJKg54[JKe54\\JLe53\\JLd53_JJc55`JH`57cJF^59g4N6HfQ^3"}}, {"image_id": 64, "category_id": 1, "bbox": [446.23406982421875, 103.20403289794922, 54.386138916015625, 80.0809555053711], "score": 0.9999979734420776, "association_id": 0, "segmentation": {"size": [480, 640], "counts": "`Tb62:OZ>0Z\\1f0XcN5N3L3\\BVOnj0]OX<;nCGQ<8]1N3N1O1O001N1000001NoYT2"}}, {"image_id": 64, "category_id": 2, "bbox": [2.8237643241882324, 259.7663269042969, 58.10858154296875, 12.42681884765625], "score": 0.999987006187439, "association_id": 1, "segmentation": {"size": [480, 640], "counts": "Xe12m>2O0O100000000000000O10000000000O101O00001O0000001O00000000001O0001O001O2N1O001O001O001O00001O00001O010O00aPa8"}}, {"image_id": 64, "category_id": 2, "bbox": [392.38311767578125, 177.13951110839844, 104.27044677734375, 7.7676239013671875], "score": 0.9999635219573975, "association_id": 2, "segmentation": {"size": [480, 640], "counts": "c]o51o>00001O0000000000001O00000000000000001O00000000000000000000000O10000000000000000000000O10000001O0O1000000000000000000000000000000000001O000000001O0OQl10PTN00001O0\\VU2"}}, {"image_id": 64, "category_id": 1, "bbox": [497.5140686035156, 110.48709106445312, 63.859588623046875, 75.65469360351562], "score": 0.9996305704116821, "association_id": 2, "segmentation": {"size": [480, 640], "counts": "SbY73l>3M2O00M3O1O2O0Ocn08VQO6fAEd=a0TBAk=k0O1O001O001O01O1N2O1O0O2M2O00O2YOCjB?U=BhB`0W=f0O1N2N1O100O1O00VOnB^O2CS=o0mBPO00^=S164N3O1O0000O11O00OPChNZF5J_lT1"}}, {"image_id": 64, "category_id": 2, "bbox": [62.291290283203125, 242.3994598388672, 307.03497314453125, 20.508132934570312], "score": 0.9644847512245178, "association_id": 3, "segmentation": {"size": [480, 640], "counts": "jTf11n>101O000O100000000000000000000000000000000000000001O0000000000000000000001O00000000000000000000000000000000000000000000000000000000000000000001O0000000000O10000000000000000000001O0000000000000000001O0000001O000000000001O0001O0000000000000001O01O000000000000000001O01O00000000000000001O01O00001O10O000001N102NmU1Ea=;fBg0k<]ORCe0m4M2O0O2O01N101N2NUV:"}}, {"image_id": 64, "category_id": 1, "bbox": [432.8223876953125, 92.66644287109375, 24.908111572265625, 77.52438354492188], "score": 0.2278883159160614, "association_id": 0, "segmentation": {"size": [480, 640], "counts": "n`[65j>2O1ZAJ`>>M3]BB^0iRg2"}}, {"image_id": 64, "category_id": 1, "bbox": [466.2640380859375, 106.94813537597656, 54.81658935546875, 78.55052185058594], "score": 0.14861249923706055, "association_id": 0, "segmentation": {"size": [480, 640], "counts": "_aj6LnA2S>KoA6R1Kl;7PDKo;6QDIP<5`1L3N1O2ORj21lUM2O010O1O2M4L4N0O12O2M3K2OXALb>;N6L0fAAR>i0K4L3VBnNd=X1O1001N0O2Lgdg1"}}, {"image_id": 64, "category_id": 2, "bbox": [16.785663604736328, 232.85671997070312, 80.38825988769531, 37.085601806640625], "score": 0.1285533905029297, "association_id": 0, "segmentation": {"size": [480, 640], "counts": "VW84k>2O0O101O0O10000O2O001O000O10000001O1O2N1O2N1O1O001O001O1Ocfe8"}}, {"image_id": 65, "category_id": 1, "bbox": [205.52716064453125, 172.59619140625, 64.42001342773438, 182.6160888671875], "score": 1.0, "association_id": 3, "segmentation": {"size": [427, 640], "counts": "oSf2Q1W<6H8J5I5N3L6K6K6K8G4K;F5K6J4M2N3M3Lb0_O2L3L3E\\KlGh4o7nNnGcMo7Z2[HbMc7_2PInLQ7Q3VIgLl6Y3c1002N3M3M7IWNXFHn96UFGo96ZF^Ok9`0ZFUOo9i0]1N0020O000O02OO1ON4M2KaQj4"}}, {"image_id": 65, "category_id": 1, "bbox": [463.7024841308594, 205.11264038085938, 106.53036499023438, 114.57861328125], "score": 1.0, "association_id": 2, "segmentation": {"size": [427, 640], "counts": "mbR63U=3O2N1O1O100O10000000O1O1O1O10000O10O1O000010OTDIf:7YELe:3ZE0d:0\\E1d:N\\E4b:L^E5`:M`E3`:L`E5`:K^E6S9DYG7B7S9HWG1D9S9IXGND:R9LVGME9T9MTGKZOf0`9BTGIZOg0b9ARGJYOf0f9AmFX1R9kN`F`1a9U10O1_Oa0N201M2F;L4N3M5J5L2O2N10O010O1O1O1000;E1N10O02OO100O001O1O100[OkDROV;l0mDROT;l0nDSOT;j0nDVOS;f0oD[OQ;c0PE]OQ;a0QE^OR;>oDBT;9oDGQ;7PEIR;4PEKS;1nDOT;NnD1S;MnD3U<0001O00001O001O0100O2N1O1O2O00Llll0"}}, {"image_id": 65, "category_id": 1, "bbox": [378.8447570800781, 174.14569091796875, 71.404296875, 126.77249145507812], "score": 1.0, "association_id": 1, "segmentation": {"size": [427, 640], "counts": "lRo46Q==D9D9K3L3O1O1O1O1O1O2O002N2M1N3M2C?M2M2O1O2O00010Oh0XO3N4L1O00000>B0mN[F_Ne9`1]F^Ne97VF59^Oc9;VF7l:HUE7k:HWE8i:FYE:g:D[E=d:A^E`0a:_OaEa0]:_OgE`0W:_OjEa0U:^OoE`0P:@QFa0m9^OUFc0j9[OZFd0d9\\O\\Fd0d9]O^F`0a9AbF<^9CcF<_9CcF:]9GcF8]9IbF7^9JbF5_9KaF3a9L`F3a9LaF1b9LP2NW`a2"}}, {"image_id": 65, "category_id": 1, "bbox": [148.72097778320312, 196.11988830566406, 41.62196350097656, 67.59361267089844], "score": 1.0, "association_id": 4, "segmentation": {"size": [427, 640], "counts": "S\\n14U=4M2M2N2O1N01L4O100O02M2L4M3L5M2N2N1N2JSOPDn0o;71O10000001O1\\DlNo:i1O10O2WNbD2>i0o;M2CeCF_<2kmm5"}}, {"image_id": 65, "category_id": 2, "bbox": [413.3306579589844, 295.37158203125, 67.11563110351562, 11.95355224609375], "score": 1.0, "association_id": 1, "segmentation": {"size": [427, 640], "counts": "[P_55V=001O0000001O0000000000001O0O100000000000000001O001O1O0O101O00000000000000000000000001N10000000000004KdUV2"}}, {"image_id": 65, "category_id": 2, "bbox": [224.35482788085938, 343.0352783203125, 84.62579345703125, 28.361968994140625], "score": 0.9999998807907104, "association_id": 3, "segmentation": {"size": [427, 640], "counts": "V]o23X=0O3N1O1O3M100O0010O10O0000010O00001O0O101O001O00001O0010O000000010O000000001O00000000001O000000001O00001O00010O0010O01O010O000000000000N2M30000O11O00001N3N5J4J`eY4"}}, {"image_id": 65, "category_id": 1, "bbox": [46.0318603515625, 158.16920471191406, 93.78480529785156, 218.9900665283203], "score": 0.9999997615814209, "association_id": 5, "segmentation": {"size": [427, 640], "counts": "oVd04P=l0XO6L3K6K5L3N2N3L3N2L5K5K3M6YOk0F7K7H?B7cH`K`5f4YJ^Ke5l4nIWKR6P5dITK[6n4aIUK^6m4_ITKa6T5UIoJj6j5O00000001O00001M4gMgIZM`6mNiHU3P1kL]O4Z7l2_IhLc7T3]1M3N1O0010O1O3N1N2O2M2O1O01O01N2O000O10kL[Fc2e9XMfFc2V:L2L6K6I>C?@=D2N2O00O0101O00O10O100103N1M1O1N10000000O1N2M3L4Igb`6"}}, {"image_id": 65, "category_id": 2, "bbox": [64.37731170654297, 361.7147216796875, 81.05387115478516, 39.181365966796875], "score": 0.9999996423721313, "association_id": 5, "segmentation": {"size": [427, 640], "counts": "VZl05U=2N2M2O2[OEXD;h;FUDn1eAUNZ>k1eAVN[>k1cAWN]>h1bAYN^>h1`AZN`>Z201O0001O00001O001O2N1N2O001O001N2O1O1O1O1O001O1O0O2O1O1N2O001O0O10000O1000000O10000O010O10O0100O010000O010O010OkNa@;`?Dc@:\\?Ge@7\\?Hf@7Z?If@7Z?Hh@6X?Kh@5X?Ki@3X?Li@4W?Lj@2V?Nk@1W?Nj@1V?Nk@1W?Mk@2U?Mm@1U?Mo@MU?1V1N101N2N1MnmW1"}}, {"image_id": 66, "category_id": 1, "bbox": [454.2298278808594, 300.30267333984375, 86.46066284179688, 127.47854614257812], "score": 0.9999487400054932, "association_id": 0, "segmentation": {"size": [559, 559], "counts": "agh7d0h`04M3O0O2N1O2N101O0O2N1N2O2O1O2N2M3M3M2N2O1O1N10000O2O0ATNXAo1f>ZNQAh1l>?OO2O01O1000O100002N2N10O01O1O001O1O2N1O1O1O4cAUMn=W30O001O3iLSBf2^>M100O2N1O1O2N1O1O2M2O1Bn@]NR?[1[A_Ng>i0[1M3L4N2O101O0O2N2N2M4LdS;"}}, {"image_id": 66, "category_id": 1, "bbox": [471.375, 258.00982666015625, 37.095428466796875, 61.30902099609375], "score": 0.986035943031311, "association_id": 0, "segmentation": {"size": [559, 559], "counts": "`nQ86Va05M2N2O0O2M2O2N1N2N2ODd_OF\\`08i_OGT`09m_OJo?5S@Mj?3V@0h?0W@3f?OW@4i?JV@:g?EZ@;b`0j0D:F6M7J00O2O0N3M3N101N2O000O2O0O2O0O1O1O2N1O010O10000O01000O1000O01O01O0100O010000O0100O01000O10O11N1O1O1O1N3M2N2O1O2O000O2O0O1O1O2O0O101O0O3M2MPgj7"}}, {"image_id": 66, "category_id": 2, "bbox": [457.2190856933594, 371.89190673828125, 61.688751220703125, 48.078643798828125], "score": 0.10796555131673813, "association_id": 0, "segmentation": {"size": [559, 559], "counts": "`em71^a0000Re70nZH1j^O3h`0NW_O3h`0MW_O4i`0NU_O3j`0NU_O2k`0OS_O2n`08OGT_OOl`01V_OMj`03V_OMj`02W_ONi`02W_ONh`03Y_OLg`04Y_OLh`03Y_OJi`05:O1O1ObXo0"}}, {"image_id": 66, "category_id": 2, "bbox": [528.5070190429688, 413.3683776855469, 21.07586669921875, 22.884735107421875], "score": 0.06927859783172607, "association_id": 0, "segmentation": {"size": [559, 559], "counts": "RVQ92\\a02N1O101O001N1102M1O1O1O10N2O1O0O1001NaQ5"}}, {"image_id": 67, "category_id": 1, "bbox": [481.2207946777344, 78.82611846923828, 170.19515991210938, 106.37999725341797], "score": 1.0, "association_id": 0, "segmentation": {"size": [250, 1000], "counts": "Pie36b74M2O0O2N3M2O2M2O1N6J9G3M3M1O2N2M3K6M2O0O2N2M2M4O1N2O001O00001O00001O1O001O001O00001O001O001O000^K^Ml3b2RL`Mn3a2PL`MP4`2PLaMo3`2oKaMR4^2nKbMS4^2kKcMV4]2iKcMW4]2iKcMX4]2fKdM[4[2eKeM\\4[2bKfMe4U2XKlMi4b21O00001O1O1O00000O100000000O2O0O10000O10000O1O100O1O10000O100O2O001N101O00001N10001O001N101O0O2O1O001N2O001N2O1N101N2O1N2O1N10001N101N101O00001O0O101O1O001O000O2O00001N2O1O001O002N1O001O001O2N2N001O1O001O2N1N101N5IPRe2"}}, {"image_id": 67, "category_id": 1, "bbox": [812.9723510742188, 17.779216766357422, 149.2760009765625, 68.33343505859375], "score": 1.0, "association_id": 0, "segmentation": {"size": [250, 1000], "counts": "\\hW6<[75M2O1N2M4I7M2N1O2M2I8N1O2O0O1M4O0O2O0O100O101N10000O100000000O100000000000000000000O1000O10O10000000000000000000000000O100000000000000O1000000000001O00001O0000001O0O101O0O10001O0O10000O100O1O1O10000O101N1O100O1O2O0O100O1O1O1O100O100N2O2N10001N2O001O2M2N3L3K5N2N2N2Lle;"}}, {"image_id": 67, "category_id": 1, "bbox": [23.431720733642578, 87.74626922607422, 213.94253540039062, 76.7682113647461], "score": 1.0, "association_id": 0, "segmentation": {"size": [250, 1000], "counts": "Sn75d72N2O0O2N1O2M201N10000O001N1N2010O10O1O0O1N2000010O10000O010O100O11O00000001O01O0000100001N100O0100O1002N2M10O01O00001N2O1O00001O0O2O1O1N101N10000O1O1N2O100O100O1O2M2O1O100O100O100O1O100000O01000000O1000000O100000O1000000O10000O0100000O10000O100000000O10000O100O1000000O10000O10000O10000O100O100000000O100000000O100O100O1O10000O10000O1O10000O2O000O1O1O100O2O0O2O1M5POWIa0NBT7:8N1N3N2NeRn5"}}, {"image_id": 67, "category_id": 2, "bbox": [359.92266845703125, 45.58211135864258, 137.72024536132812, 57.4363899230957], "score": 0.9999998807907104, "association_id": 1, "segmentation": {"size": [250, 1000], "counts": "Sej2214`74N2L5K3O100O1O0O10100O0O2O1O100O1N2N2O1O1O1O1N2O100O10000O100000000O100000000O01000000O10O10000000O10000O10000O100O10000O100O10000O10000O1000000O1000000O101OO10O1000000O10000O1000O01000O010000O10O0100O1O001O100O1L4N2O100N2N200O100O1O1O100O100O1O101NXhj3"}}, {"image_id": 67, "category_id": 1, "bbox": [663.39697265625, 173.38983154296875, 137.6875, 75.1922607421875], "score": 0.9999998807907104, "association_id": 2, "segmentation": {"size": [250, 1000], "counts": "nYR55c73N3M3M3L5L2O1N4M5J3M2N2O1L5M3M2N1O2J6L3O2N1O1N20001O0O100000000000O1000000000000000000000001O000000001O001O00001O00001O0000001O000O100000000000000O100000000O100000000O100000000O100O100O2O000O2N1O100O1O2M2N2O1O100M4L3O2O0O1N2N2N200O10O0100N3N1N2N2M3O2M3N2N1O2Ngka1"}}, {"image_id": 67, "category_id": 1, "bbox": [309.642333984375, 16.638696670532227, 84.45709228515625, 92.4363784790039], "score": 0.9999996423721313, "association_id": 1, "segmentation": {"size": [250, 1000], "counts": "WW\\2?V77M2N3L3N2M2M4CnNoIT1P6nNkIU1U69O0O2O1O1N2O2N1N3N=B3N1N2O0O1O1O2N1O1O1000O100000000O100000000001O00001O0010O6J2N1O2N1O1O1O1YOgJkNY5S1jJkNW5T1lJiNU5V1nJhNS5V1PKgNQ5X1j0N2M200O2N2N2N1O2N1O2N3L2O2N3L4M2M[dd4"}}, {"image_id": 67, "category_id": 2, "bbox": [747.05615234375, 183.97862243652344, 81.195556640625, 56.226715087890625], "score": 0.9998922348022461, "association_id": 2, "segmentation": {"size": [250, 1000], "counts": "\\^l55d70O2O100O001O1O1N101M3N2N2K401N1I8000O01000O2O001N101N10000O1O2N1O1O1O2N1O100O1O100N2O1O1O1O1O100O100O2N101M\\YZ1"}}, {"image_id": 67, "category_id": 2, "bbox": [159.03189086914062, 101.19139099121094, 99.62301635742188, 41.15997314453125], "score": 0.31481054425239563, "association_id": 0, "segmentation": {"size": [250, 1000], "counts": "Tfa11i70N101O1O1N1O200M3O010N2O100O0100000JCnH=Q7EoH;Q7EnH;S7FkH;T7510O010O0100O100O10O10O10000O1O010O1O1O1O1J6O10O10O1O011N101O^Ye5"}}, {"image_id": 67, "category_id": 2, "bbox": [881.5335693359375, 33.703792572021484, 98.11102294921875, 46.33915328979492], "score": 0.2746637165546417, "association_id": 0, "segmentation": {"size": [250, 1000], "counts": "gSS71f74O1N0O2O10O0001O010O00100JGiH:T7800N2O1O10O0100O100000O2O000O100O10001O0O100O101O0O100O100O1O2O0O2N3Llj4"}}, {"image_id": 68, "category_id": 1, "bbox": [279.1902160644531, 204.61331176757812, 78.23959350585938, 141.89669799804688], "score": 1.0, "association_id": 1, "segmentation": {"size": [427, 640], "counts": "eje38R=2O1N2O1M2gCE`;>YDMa;5\\DO_;S1K5iDZNb:i1YE\\Nc:X2M3N1N3M2O2N2M3K6J5M4K3N3N10000000O100O10000001O1O3M6K011O20M4L1O1N1O1O00001O1O2N001O0]ObFYM_9e2eFWM]9g2e0N3M6J4M4K4M1O2N2M2`NjDh0Z;ROVE2N101N1O100O1000O100000O10O10000O1000O0100O10000O010000000000O10000O01000000O10000O1000O1000O100000000000000O100000000000000O100000000Oc`_5"}}, {"image_id": 69, "category_id": 1, "bbox": [318.29815673828125, 168.36607360839844, 169.09274291992188, 192.73744201660156], "score": 0.9999997615814209, "association_id": 1, "segmentation": {"size": [480, 640], "counts": "bge4V1_=?J5M1O2M3N2N2N2N1003N:E10WOWNXDi1f;XN[Dg1e;ZN[Df1c;[N]D9\\Ok0V1O0000001O01O001O1O0000000O1000O100O100O1O1O1CKnA6n=`0N2M3J6O1N20O0100O100001N100O2O0O101N10001N10001N101O001O0000100O00010O0010O1O01O01O10O00010O01O1O00010O0010O000001O00001O010O0010O00010O0010O010O01O1O00001O10O00010O0001O1O00010O1O1O001O1O1O1O001O100O1O001O1O1O001N3M[Td1"}}, {"image_id": 69, "category_id": 1, "bbox": [310.80029296875, 179.6612548828125, 108.18035888671875, 138.13253784179688], "score": 0.9868587255477905, "association_id": 0, "segmentation": {"size": [480, 640], "counts": "aoa4j0m=7K4L4N1O2M2N2N2N2M4M2N2mMROgFR1V9MbE?Y6fNoLR3k2VMQMl2n2VMPMk2o2VMoLl2P3VMmLl2S3TMkLn2T3TMiLn2W3SMgLn2Y3RMfLo2Z3SMcLn2]3SM`Lo2`3SM[LP3e3QMkJOmNX3X6jLgJ`4Y5aKeJ`4[5aKbJ`4f3bJkLP1]O^4f3gJkLl0[O^4j3kJhLh0YOe3[OdKj46_Lb0XOl2d5gLQK`0UOX2O_LP6l0jJd0nNQ2g6]MYJY4g5jKVJU4l5nKoIQ4S6ULeIk3]6YL\\Ii3f6ZLTIg3n6[LnHg3Q7h1100O010O1O001N1O10001O2O001O1N101OO1O1O2N1O1O1O2O1O2N2N2M2O1O1O2N3MmI`I_4^6[KjIe4T6YKoIh4o5XKRJg4o5WKUJg4j5YKYJf4e5ZK^Jd4a5[KaJf4]5ZKdJf4\\5XKfJi4Z5UKgJk4Y5SKjJl4W5RKkJl4V5RKnJl4R5SKoJl4R5SKoJm4Q5QKQKn4P5QKPKo4Q5PKPKo4Q5PKoJP5R5nJPKQ5Q5nJPKQ5W5fJlJY5T7N3M2PL^GU2c8iMaGT2`8jMcGT2^8jMeGT2]8iMgGT2[8iMiGT2Z8hMjGU2X8hMkGQ1QOTOU9IlGn0UOWOQ9HmGm0TO\\Oo8CSHm0PO@Q;;PEFT;4nDLT;1lD0U;MlD5R;KoD4R;KnD6Q;IQE6P;IQE6o:JSE5l:KVE3k:KWE4j:JXE6i:GYE8S;ZOoDf0[<0O01O0001O0000000100000101OO1O0O0001O0000010O000010O000001O001O001O1N6IT^a3"}}, {"image_id": 70, "category_id": 2, "bbox": [128.4033966064453, 322.8200378417969, 173.15834045410156, 114.112548828125], "score": 0.9999983310699463, "association_id": 1, "segmentation": {"size": [457, 685], "counts": "Sij11U>4N2O2N1N101O001O1O001O1O001O1O1O001O001O1O1O1O1O1O1O1O1O1O4L100O101O1N2O0O001O100O0010O1O01O01O00001000O0100O01O01O1O010O10O1O10000O100O010O2O0O2O0O01000O2N010O010O10000O001O00100O1O001O010O100O010O001O1O1O0010O0YOaCE^<:eCD\\<;fCEX<:iCGW<8jCIOZOm;m0UDJK[OP2N2M2M3M4K4K5H8M4G8I7K5N201O0001O=C3M4L?A5K4K4M2NlU="}}, {"image_id": 70, "category_id": 2, "bbox": [245.7714385986328, 373.129638671875, 186.19813537597656, 65.73916625976562], "score": 0.9927523136138916, "association_id": 0, "segmentation": {"size": [457, 685], "counts": "lT^3?b0BeoC^OH9>Il;`0QDGb<9_CFa<:_CFa<:_CEb<;^CEb<;_CDa<0000001O00000000001O0000000000000001O001O001OZWi0"}}, {"image_id": 70, "category_id": 2, "bbox": [146.7076873779297, 351.5276184082031, 285.927490234375, 87.63714599609375], "score": 0.20781943202018738, "association_id": 0, "segmentation": {"size": [457, 685], "counts": "RdT21X>2N001N100000001O00001O1O1O2N3M001O00001O001O001O2N001O00001O00001O1O1O001O1O00001O001O2N2N1O1O1O00001O001O003M1O1O00001O01O01O1O2N1O10O0001O001O010O2N1O001O010O000010O0[OaCA^gCCY<4K4J6DQ1RAoNn>P1TAoNm>P1SAQOl>o0TAQOl>n0VAROi>n0WAROi>m0XATOg>l0YATOg>l0ZATOe>l0[ATOf>j0\\AVOc>j0]AVOc>j0]AWOb>i0_AVOb>h0_AYO`>g0`AZO_>f0bAYO^>g0bAZO]>e0dA[O]>d0cA\\O]>c0dA]O\\>c0eA]OZ>b0gA^OY>a0hA_OX>a0hA_OY>`0hA@W>?jAAV>?jAAV>?kAAT>>mABT>=lADS>;oADR>:oAGQ>8oAHQ>7PBJP>5QBJo=5RBKo=4QBMn=3RBMn=3RBMo=1SBOm=0SB0n=NSB3n=JTB6l=ITB7m=GUB8l=GTB:k=FUB:l=EUB:l=DUBm=_OTBa0o=\\ORBc0]?001O0010O000O2O1O1O1O1O1O001N2N2N2JZXV1"}}, {"image_id": 71, "category_id": 1, "bbox": [177.97023010253906, 41.92325210571289, 318.9251708984375, 477.9553527832031], "score": 0.9999984502792358, "association_id": 1, "segmentation": {"size": [559, 559], "counts": "PbV3e0e`06J6I7L3N3L4M2O1N3M2J6I7A`0bN]1I7J6N2O1N3N1nKYK[Kh4a4fKSK[4h4TLmJn3l4`LjJc3d4WMQKl2V1UK^O\\2VOb2U1bKmN]2JS2T1lK_N^2:h1S1TLWN\\2c0a1R1[LSNY2i0]1R1aLjMY2Q1X1R1nLVMV2f1l0S1j1iNWNU1n1gNSNX1S2_NQNa1Z2nMlMR2g81hN[MeCh2QbI^O00^6b080ZI^O0010X6b0gICOLZ6b0eIC1LX6b0gIGY6i0M1O0O2O1O0O2O0000000O2O0000000000O10O1000O1000000O10000000O010000000000000000O1000000O1O010O1000000000000O100000000000000O1O1K5N2O100000000000000O100000000000000O100O10000O1000000000000O100000001O0O10000K6M2M3O2J500O2O00000000000000O2O000000000iHMU76O000000000O10000O101N1000001O3M2Mb0WInNV6U1O1O002N1O0O10001OO100000000O1O1O1000000000000O1000000000000O10000O100O1O1N2N2O1O10000O10000000000O10000O1O100O100O1000000O100000000000000O1000000000000000000O100000000000000000000000000000000O100000000000000000000000000000000000000000000000000000000O10000000000O1000000O2O0000000O1000000000001N1000001N100O1O10000O10001O00000O100000000O10001N101Olnh0"}}, {"image_id": 72, "category_id": 2, "bbox": [11.713224411010742, 161.3423614501953, 278.5499267578125, 56.25689697265625], "score": 0.9997962117195129, "association_id": 1, "segmentation": {"size": [236, 592], "counts": "jn51[70O2L3O1O1N2N3YOIWJ7i5JUJ7j5JVJ6j5JVJ6j5JVJ6i5LUJ4l5LTJ4k5MUJ3k5MTJ3l5OSJ1m5OSJ1m5ORJ1o50PJ0o51QJOo51QJOo52oIOQ61oINS61mIOS62jI0V60hI1Y6a0000000O01000000O10000000000O10000000000O10000000O10O1000000O100000000O100000000O100000O10O100000O01000000O1000O1000000000000000000000000O1000000000000O100000000000000000O1000000000000000001N10001M3[OdINJ1]`2OkfM0O2hHNT75O101O1O4L7SI1o5h0N0O2O00000000O10000O10000000000O10000O1O100O1000000O10000O10000O100000000O100000000O100000000O1O1O1000000O1000000O1O1N2O1O10000O100O1O100O100O10000000000000000O1000000000000000000000000O1000001O000000000O100000000O101N1IUILl60RI03Nl62QIOV7O40XTV2"}}, {"image_id": 72, "category_id": 1, "bbox": [3.2110157012939453, 5.965528964996338, 126.88665771484375, 192.723876953125], "score": 0.9996312856674194, "association_id": 1, "segmentation": {"size": [236, 592], "counts": "no08R74N0O2O0O2O1N3N2M4L3YNZOcLh0X3D^Lb0[39PNBd14<9RNAd15::SN_Oe168;j0DWO:j0EWO;j0DVO001N2O000000O1000001Nh[92UdF6K2N2O000O100000000O1aBBS=>lBCT==kBET=;lBET=;kBGS=:mBFS=:mBFS=:lBGT=9lBGS=:mBFS=;kBFU=:kBFU=:kBFU=;iBFW=f00O10O1000000O1O[OoB4nTCAl<>UCBk<>UCBk<>VCAj6M2N101OO010O1O10O100O101O0000000000001O000000001O00001O001O0oBCV<=iCEV<h1Fc3JgJ>h1Ga3KhJ000000000000000000000000000nAOl=2SBNm=2SBNm=2RBOn=1RBOo=0QB1n=ORB1n=OQB2o=NQB2o=OPB1P>OPB1P>40000000000000000001O00000000000000000000000000000O1000000000000000O01000000000000O10O1000000000O10O1000O100000000O100000O10O1000000O1000000000000O10000000000O10PWo7"}}, {"image_id": 73, "category_id": 2, "bbox": [250.99554443359375, 188.38955688476562, 254.0333251953125, 71.28695678710938], "score": 0.9963550567626953, "association_id": 3, "segmentation": {"size": [457, 685], "counts": "[Xd33U>2O001O0O1000001N10000O10000O100O100O2O0O10000O100O1O1O1O100O2O0001O0000001O0000001O001O2N001O00001O001O1O1O2N1O1O001O001O001OhYf0MZfYO2K8K2N2O0M4O0O2O0O2O1L4K4N3N1O1O2N1O1N2M3L301000000000000000O10000000000O1000000000000000000O100000001O0000001O00000000001O0O100O2O0O100O2O000O10000O1O2O0O1O1000001N100O10000O101O000O101O001O000O101O001O1O1N2O1O1O001N101N3LVUh2"}}, {"image_id": 73, "category_id": 2, "bbox": [563.4136352539062, 130.9241180419922, 38.01641845703125, 17.700592041015625], "score": 0.9949758052825928, "association_id": 1, "segmentation": {"size": [457, 685], "counts": "hko71V>3N1O1O100N20O0100O10O010O00001O010O001O1O100O1O1O10hiU1"}}, {"image_id": 73, "category_id": 1, "bbox": [201.03041076660156, 0.0, 124.68833923339844, 219.83348083496094], "score": 0.985238790512085, "association_id": 3, "segmentation": {"size": [457, 685], "counts": "ohi27g=a0nEAl5e0oI^Ol5i0oIXOl5n0SJROe5X1XJiNe5[1ZJeNd5^1[JbN`5d1_J\\N\\5k1aJVN]5n1aJSN]5o1bJQN]5Q2aJPN]5U2_JlM_5Y2]JhMb5[2[JfMd5\\2ZJeMf5`2SJbMm5\\3SIfLl6`3hHgLX7`3oGRMP8d400O1N2O1N2O1N2O1N2N2O1OPOcHVK[7k4hHSKW7n4kHPKS7R5oHlJP7l3dHgL=\\Oo6k3hHdL=@k6i3aJVL_5e3fJ[LZ5a3kJ^LU5^3oJbLQ5Y3TKgLl4R3[KnLe4o2_KPMa4n2aKRM_4n2aKRM_4m2bKSM^4m2bKSM^4m2aKTM_4l2aKTM_4k2bKUM^4a2eHUMn2:]4`2jHRMi2>]4_2nKaMR4^2oKbMQ4^2oKbMR4\\2oKdMQ4P2cHiM;Ge2`0]4P2fHeM9Lc2?^4o1\\LQNd3n1]LRNc3n1^LQNb3n1_LQNb3o1^LQNb3n1_LRNa3n1_LRNa3n1_LRNa3n1_LRNa3m1aLRN`3m1`LSN`3m1`LSN`3l1aLTN_3k1bLUN_3i1bLWN_3g1bLXN`3e1bL[N_3c1bL]N`3NZHV1W4kNb3J]HV1T4oNm3m0VLPOn3m0TLQOl3o0VLQOh3o0ZLQOe3n0]LRO_3Q1bLnNa3o0`LPOe3l0\\LROg3k0o4AiBEZ=7<1O100O11HZG1j82N2O1M4O3M00F[B1d=N]B2o=N2M3Ne8OlW10R]S5"}}, {"image_id": 73, "category_id": 2, "bbox": [24.20587730407715, 371.61187744140625, 131.0983428955078, 80.67471313476562], "score": 0.9814085364341736, "association_id": 0, "segmentation": {"size": [457, 685], "counts": "]Rd02V>2O0O10000O100O1O100O001O100O10O0100O10O01O100O100000O001000O001O01O01O01O010O01N1010O0010O1O0010O01O010O010O000100O01O000100O10O01O10O1O01O1O010O00100O010O1O100O010O1O10O010OO2O00100O01000O102KWna7"}}, {"image_id": 73, "category_id": 1, "bbox": [282.0435791015625, 162.30233764648438, 185.54629516601562, 185.78280639648438], "score": 0.9048416018486023, "association_id": 4, "segmentation": {"size": [457, 685], "counts": "omn3;k=5M2N2M2O2N2N1O100O1O100O2O0O100O2O0O101N101O1N2O1N4M3L2O1gF_Ng5c1lIlNQ6U1iISOR6o0mISOn5R1PJPOm5S1QJnNo5S1oInNQ6S1nImNR6S1mInNS6S1kInNU6R1jIoNV6R1iInNV6S1iInNW6R1iInNW6S1hImNX6S1gInNX6T1gIlNY6U1fIkNZ6V1eIiN\\6W1dIiN\\6X1bIiN^6W1bIhN_6Y1`IgN`6Y1_IhNb6X1]IgNd6Y1\\IgNc6[1[IeNf6\\1WIfNi6[1SIhNm6\\1mGFS8=`GLa8n200000001O000000001O001N101O00010O0000001O00O10000000000VL`Gj1a8TNbGj1_8UNdGf1_8XNeG[1f8cN]GZ1f8dN\\GY1f8fN\\GX1d8iN\\GV1e8iN\\GU1f8iN]GU1d8jN]GU1d8iN_GV1a8iN`GV1a8iN`GV1a8hNaGW1`8cNfG\\1[8`NiG_1X8^NlGa1T8^NmGa1T8^NmGb1S8\\NPHc1P8[NTHc1l7ZNZHb1g7[N_Hb1b7[NaHd1_7YNeHf1[7WNhHi1X7UNkHi1V7UNlHj1U7UNmHh1U7XNlHg1U7WNmHg1T7YNmHe1m9O1N3N2M3M2N1O2O1N4M5K1O1N2O0O2O1N2M3N2O1N2N2M`]b3"}}, {"image_id": 73, "category_id": 2, "bbox": [269.7185974121094, 175.1387939453125, 233.989013671875, 139.8521728515625], "score": 0.2968777120113373, "association_id": 0, "segmentation": {"size": [457, 685], "counts": "ZUi36R>2N2N10000O100O100O100O2O000O10000O10000000000000010O000001O001O010O1O001O1O001O1O1O1O10OO2O1O1O2N1O1O0000bdg01T[XOB;E1O1O2N2N002N1O1O001O001O1O1O001O000000001O001O1O1O00000000000000000000O10000O100O100O100000000O1O1N200O10000O1O1N200O1O1O1O1N2M3O1N2N2M3O1N2J6L5M3M3F:L3O2G:I6N2N1L5M4M3K5J6L4LPQk1"}}, {"image_id": 74, "category_id": 2, "bbox": [290.3431396484375, 87.06549072265625, 183.81344604492188, 167.3248291015625], "score": 0.999994158744812, "association_id": 1, "segmentation": {"size": [314, 500], "counts": "Y^i2e0S93L4CoBBR=jH_OX7`0iH_OX7a0iH\\OZ7c0hHXO]7e0iHTO\\7i0UIcNQ7Z1h4M3M2O0O101N2O1N2O2M2O1O0O100O10001N101N2O001N100O100O01O10O01O010O00010O010O0000O2O0000001O001O001N101N2N2O1N2N3L3I8IngX2"}}, {"image_id": 75, "category_id": 1, "bbox": [437.2041015625, 78.35118103027344, 169.912109375, 166.77484130859375], "score": 0.9992073178291321, "association_id": 0, "segmentation": {"size": [566, 643], "counts": "^mh71da03M20N1O2NiS10WlN101O0O2O000h^O1j`0MW_O4i`0JZ_O4Ta010O01O0O3M3M4L3N1O1O01O1O1O1O1O0001O00001N11O000010O01O0000O101O000O100O1O0O2O1O1O1O1N2M201N2O0O0N2N02O20OO01M201O2000O00\\Ob0H:O2K5N2M3K4N3O101O000M2N3O11O00O1O1O1O2O00100O0000010O00010O0010O100N2O1O10O0100O1O1N200O100O1O1O2N1O1O100O1O1O2N1O2N2N2M2O2N1O2N1O2L4M3M3N2N3L4K4M3M3N2K=@dic0"}}, {"image_id": 75, "category_id": 1, "bbox": [81.71314239501953, 358.4747619628906, 20.55614471435547, 19.112213134765625], "score": 0.5364384651184082, "association_id": 0, "segmentation": {"size": [566, 643], "counts": "ge]15`a04L2N3M2O001O000000000000O101N3M4L2NWW[9"}}, {"image_id": 76, "category_id": 1, "bbox": [205.36361694335938, 204.52911376953125, 263.9605407714844, 147.14324951171875], "score": 0.9999951124191284, "association_id": 0, "segmentation": {"size": [479, 640], "counts": "a^P42N2N2N2E6I4M2O1O001N2O1O00001O0000000000000O1001O00000000000000000000000000000001O00001O001O1O00010O00001O010O00102M2O00001O00000001N100000O1000000000O10O1000O01XUg7"}}, {"image_id": 76, "category_id": 1, "bbox": [86.8269271850586, 283.5348205566406, 24.711288452148438, 16.229339599609375], "score": 0.994147539138794, "association_id": 1, "segmentation": {"size": [479, 640], "counts": "Z^Y16h>1O2O0O1000000O2O0O10O1O10O10000001O1O1O1N10_Ug7"}}, {"image_id": 76, "category_id": 1, "bbox": [471.7800598144531, 198.48739624023438, 161.90756225585938, 187.789306640625], "score": 0.9514859318733215, "association_id": 2, "segmentation": {"size": [479, 640], "counts": "gRm6b0T>=K3N2N3M3M3N1N2N010000O10O100O3M1O1O1O00010O00001O001O001O1O010SNZN_Ff1^9bN^F^1^9fNaF[1]9hNbFX1]9iNcFW1[9mN`FV1_9oNZFT1d9oNXFT1g9nNUFU1i9mNTFV1k9lNQFW1m9kNQFW1n9kNmEX1R:mNhEV1V:mNfEV1X:nNdES1\\:i1O0O1000001N1O1O1O2N1O101N100O2OhKSF^3l9bLWF\\3i9dLWF]3g9dLYF\\3f9dL[F\\3d9eL\\F[3d9eL\\F\\3b9eL^F[3a9fL^F[3a9fL_FZ3`9gL_FZ3_9iL_FX3`9iL`FW3`9T1O2N100O1O1O1O100O100O11O01O000000000O10O1000000000000000000VOiFkKX9o3PGoKP9o3SGPLm8h0fFj1a0\\Mi8j0SG\\15jMh8P4WGPLi8P4XGoKh8R4WGnKi8R4WGmKj8T4UGlKk8T4XGhKi8X4_G`Ka8`4o0O1000000001O00001O0000000000mKlE[3T:iLhEW3X:i0O1O001O1O1O1O1O2N1O10O001O1O2O0O1O2[KlE[4^:M4M3aMXEa0k:XO\\Ed0o:lN[Em0h3N1N2O100O1M4M2O1M202N12M2OO1O010O101N100O2N100O100O01O01O0100O1\\OPB8R>FPB8R>ERB9o=ESB9[>N3Mhia8"}}, {"image_id": 76, "category_id": 1, "bbox": [427.9767761230469, 211.36642456054688, 76.44015502929688, 118.47134399414062], "score": 0.6005334258079529, "association_id": 0, "segmentation": {"size": [479, 640], "counts": "WZZ61j>8J4N1UCEo:>mDGo:;]DFRO9_2O0O2O1N2N2O1N1O101N10000000000000O1000O11O001O001O1O010O000000^AG^>=0000O101O00000O01O00010O000100O1000O10O10000000O011O0N2O1E`A5YZ2IdTN0bY_4"}}, {"image_id": 76, "category_id": 2, "bbox": [244.92974853515625, 295.7829284667969, 190.864990234375, 51.259857177734375], "score": 0.2962338328361511, "association_id": 0, "segmentation": {"size": [479, 640], "counts": "eTg31n>0iZ20VeM101M3K4O2O0O10000O100O101O0O0100O00100O0010000O1000000O2O000O2O0O2O0O101O000MWA080W>ObA063Z>MeA4W>MdAO45X>OhA1W>1dA3Z>:00O1000O0100OO1001000O01000O1O01001O1N2AbA;h>HY\\1LkcN1N3N100O3N0O00100O100O10O100O1N2O1O100N2O1O1O10hln00WSQO101N1000000000000001N^QP3"}}, {"image_id": 76, "category_id": 2, "bbox": [162.72756958007812, 328.0289306640625, 181.17254638671875, 52.589202880859375], "score": 0.25354984402656555, "association_id": 0, "segmentation": {"size": [479, 640], "counts": "d[g21n>000O100000000000000000000000000O10001O00000000000000001O0000000000000000000000000000000000000000000000000000000000000000000000000000001O000001N1000UOMjB2V=0jBNV=3jBMU=5i01M4N1O2O0000000O100000O100N2O100O100O100O1O100N20000O101O000000000000^A1T>OhANK6\\>LhA7X>IgA8Y>HfA9Z>510O01000000O100O10000O100N2O100O100O10000O10000O2O00001NTY_4"}}, {"image_id": 76, "category_id": 2, "bbox": [178.65199279785156, 318.4645690917969, 188.8472137451172, 45.8365478515625], "score": 0.14700016379356384, "association_id": 0, "segmentation": {"size": [479, 640], "counts": "gcQ31n>0h\\g02UcXO2O0O1O1O1M300O2O0O10000O100O1000O1O001O1O001O10000000000000000O2O000O2O0O10001O`ANS>1lA2S>KfA075S>KfA066T>NkA2T>OfAL17X>;0100O100O010OO1001000O1O100O100000000O3M:F4LmTa4"}}, {"image_id": 76, "category_id": 2, "bbox": [153.77781677246094, 349.1291198730469, 197.8074493408203, 27.4383544921875], "score": 0.0620230995118618, "association_id": 0, "segmentation": {"size": [479, 640], "counts": "iad21n>0O2O000O11O0000000000000000000000000001O0000000000000000000000000000000000000000000000001O00000000000000000000000000000000000000000000000000001O000O100001O000O100O10001Mob^5"}}, {"image_id": 76, "category_id": 2, "bbox": [140.43417358398438, 380.3664855957031, 115.95477294921875, 7.251953125], "score": 0.05513828620314598, "association_id": 0, "segmentation": {"size": [479, 640], "counts": "`iR22m>0000001N10000000000000000000000000000000000000000000001O0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000O10000000001O0000000000000000000000001O1Oe\\h5"}}, {"image_id": 77, "category_id": 1, "bbox": [102.55587768554688, 72.25706481933594, 252.74417114257812, 200.5012664794922], "score": 0.9999995231628418, "association_id": 1, "segmentation": {"size": [343, 500], "counts": "V[b14T:`0J6I6K5N200O100O100000001O001O0O101O00100O1O1O2N1O2N1O1O10O10O101O0000000O010000010O001O000O1000001O1O:E6K2N1iGgMl7c201O1O9Fa0eH]La6R4YIUL64\\5j4L1O10O00100O1O1O1O1O001O001O1O1O2N1O0SNYJYM9l0_5g1RKWNn4f1VKYNk4c1ZK[Ng4a1^K]Nc4^1cK_N_4[1kK_NW4Y1[LXNi3g1e2N1O2N101O001O1O1N2O1O0000001O0000000001O01O1O1O1O100O001O00001O1O001O1O1O1O00001O000O101O00001O0O100O1O2M2N2O1O2N001O010O010O10O010O1O001N1M4M2O101O1O001O100O010O10O1000000000000000000000001O001O001O001O1N101N1O2N2O1N2N2N3M4L[Sa1"}}, {"image_id": 77, "category_id": 2, "bbox": [37.686763763427734, 151.23118591308594, 293.2585144042969, 134.7152862548828], "score": 0.9999268054962158, "association_id": 1, "segmentation": {"size": [343, 500], "counts": "\\cc01f:2N2M101O00000O10000O10000O1O100O1O1O1O1N2N1O2N2N2O02O001O0010O01O0000001O00101N2N2OO10O0100O001O001O1O1O1O1O1O001O00001O1O001O001O001O00001N101O001O00001N1000001O00010O001O00001O000000001O00000000001O01O01O1O001O1O1O0010O01O10O0100O3N2M1O1O010O1O3M3M2N3N1N1O1O1O000000001O0000000O20O0O2O2N2N>A001N101O006J0O10001O000O1000000O100000000O1000O100000000000000000000000O2O00000000001O00000O10000000000000000000000000000000000000000000000000000000000000000000000001O01O00000000000001O000000000000000O100000001O0000001O0O10000000000O1000000000000000001O0000001N100000001O001O0000001O0O10001O1NRim3"}}, {"image_id": 78, "category_id": 2, "bbox": [0.24938666820526123, 294.3852844238281, 72.07349395751953, 16.249267578125], "score": 0.9999996423721313, "association_id": 4, "segmentation": {"size": [453, 604], "counts": "]g0325e=601O0000000000000O10000000000000000000000000000000000000000001O001O6I1000000O01O001M2010O10000O1000000O2O000O10000000000O100000001O0000001NkQ[7"}}, {"image_id": 78, "category_id": 1, "bbox": [418.019775390625, 92.56617736816406, 164.935546875, 229.7785186767578], "score": 0.9999996423721313, "association_id": 5, "segmentation": {"size": [453, 604], "counts": "emi53R>7I001O1O1O2OO3L4Lb>4ZAc0^O01M4M5]OdB4k=Kkj01SUO6J5L2M4M2N2O2M5L4K;F7H6K4K2O1O1O1N2O2N2N1O0O2O000O1000001N100000000O101O00000O2O001O1O1N101O1O2M2O3jG`M`4b2ZKeMd4]2XKfMg4\\2\\JkLiNo0k6h2_IXNa6o1hHaNX7U4010N2L4M2I8C=N2BkGjJX8S5>O2M2O1N3N1O1O2N1O1O1N2N2N2M4M2O1M3L4J6N2N2O1O1N2O1O1eMcEn0]:oNgEo0Z:nNiER1W:nNjEP1W:oNjEQ1V:oNjEQ1W:nNjEQ1V:oNjEP1V:POkEP1U:POlEo0T:QOlEo0T:QOlEo0T:QOmEn0T:QOmEn0S:ROnEm0R:SOoEk0R:UOoEj0R:UOoEj0Q:VOPFi0P:XOoEh0R:WOnEi0R:WOnEi0R:WOnEi0R:WOnEh0S:XOmEh0T:WOlEi0T:WOlEi0U:VOkEj0U:VOkEj0U:VOkEk0U:TOkEl0U:TOkEl0U:TOkEm0T:TOkEn0S:ROmEo0R:ROmEP1R:oNnES1P:nNoER1Q:nNoENF0Z:3PFJLOT:7PFI1Nm9:QFG7Ne9;TFF:Na93M3N1N2O2N2M2O001O1N1O2O1N2O1O1N2O1O000O01000O100O1O100O1O100O100O100000000O1000000000000O100000000000000000001O001O001O00001O001O001O001O001O1O001O001O001O1O001O001O001O000000001O0000001O00000000001O0000000000000000000001O000OiDZNQ:f1oE[NSOOc:e1[F\\NQO2b:b1\\F^NPO3b:^1_F`NmN4c:\\1`FnN_9R1aFoNQO\\OU:d1kFPOoN^OU:b1lFQOmN^OW:`1mFROmN]OV:a1nFQOmN\\OV:b1UGjNT9c0cEXO\\14Q9b0gEVO[17n8b0dG]O\\8b0fG]O[8a0gG^OY8a0lGYOV8g0e2N1O100O2O0O1O100000000O2O000000000000010O000001O0000010O00001O010O002N1O6J1O2N1O1O1O00001O00001O0001O00001O00001N101O001O1O1O1O1O1O1O1N2N2N3JShh2"}}, {"image_id": 78, "category_id": 1, "bbox": [29.06230354309082, 87.72991943359375, 211.51304626464844, 212.0584716796875], "score": 0.9999923706054688, "association_id": 2, "segmentation": {"size": [453, 604], "counts": "[n<2P>d0]O7J3M2N101N101N10001O001O1N101O001O001O001O001O001O001O001O0O10001O001O0O2O001N2O1N2N2N2N3N1O6I4M1O00001O001O000000000000000000O10000O100O1000O100000001O0000O0ZOg0N2O1O001O001O01O010O0100O11N2O001O1O001N101N101N2N3UDUNW;_2N1O1N2O1O9G1O1O2NkNWEnNi:i0cERO`:h0hEiNd:U1W1O2N1O2N101O00001O0000010O01O001O100O002N100O1O1O101N101O0O2O1N100O1O000001O000O100001O1O1O2N1OiNmC=R1N1000001N2O0000001O00000O2O0000000000000000000O10001O000000000000000000000000000000001O0000000001O00000000001O1N6K1NYl00eSO1PB0n=5M3O0O10001O00000000000000O10000000000O10001O000O101O001O000000000000O10O10000O10001O0O10000O2Ocoe5"}}, {"image_id": 78, "category_id": 2, "bbox": [430.12310791015625, 292.0935974121094, 106.02001953125, 21.32720947265625], "score": 0.9999237060546875, "association_id": 0, "segmentation": {"size": [453, 604], "counts": "j_R635Ng=3WB0f=2XBOh=8O00001O001O001O00000000000000000000000O100000000000000000000000000000000000000000O1000001O000000001I7N2O1OSBNg=1ZBOe=:N1O2O0000O101O00001O000000000000001O0000000000000O101O000O10000O2O000O2O0O]Wn0"}}, {"image_id": 78, "category_id": 1, "bbox": [370.0599060058594, 233.9275665283203, 42.12982177734375, 47.69990539550781], "score": 0.9998553991317749, "association_id": 3, "segmentation": {"size": [453, 604], "counts": "djT59d=I_B:]=9K5J6M3M3M111O10000000000000O10000000010O01N101O0O100O100O1000N2O1O2Oi0UO5K6Iged2"}}, {"image_id": 78, "category_id": 2, "bbox": [300.541259765625, 321.44451904296875, 217.27642822265625, 40.734832763671875], "score": 0.9828428626060486, "association_id": 0, "segmentation": {"size": [453, 604], "counts": "hPY43R>1N101O0O100O2O000O101O000O1000000O1000000O2O0O10000O10000O2O000O10001O00000O101O00000000000O1000000000000000000000000000000000000000001O0000001O0000000000001O0000000000000001O000000000000001O0000000O2O001O0000000O10001O0O1O101K^BDSo37d^L6K4N1O100O100O1O010O10000000000001O0000000O1000001O0000000000000000001O000000000000001O000000000001O0001O000000000000000O10001O00000O100O100O100O10001O0O1000000O10001O0NUgU1"}}, {"image_id": 78, "category_id": 2, "bbox": [388.0151062011719, 293.8659973144531, 51.406585693359375, 14.536285400390625], "score": 0.97208571434021, "association_id": 5, "segmentation": {"size": [453, 604], "counts": "S\\\\54P>2O001N10000O10001O00000O10000000000000000000000000001O000001N101NRi_2"}}, {"image_id": 78, "category_id": 2, "bbox": [376.65850830078125, 279.314453125, 24.171234130859375, 7.46759033203125], "score": 0.9718494415283203, "association_id": 3, "segmentation": {"size": [453, 604], "counts": "j_W55P>000O2O0000000000000000000001O001O1O0O2OV]j2"}}, {"image_id": 78, "category_id": 1, "bbox": [30.285646438598633, 222.2249298095703, 25.769575119018555, 75.89927673339844], "score": 0.9558180570602417, "association_id": 4, "segmentation": {"size": [453, 604], "counts": "Rh?f0Q=?L300009G4]OiB0Y=JQC0o10001O0000001O0000000000001O0000000000001O0000001O000000000000000000000000000000000000000001N10000O2NTS30mlL1O1O00001O0000000000000000001N1001O0O1000000000000000000O1000001N100Olim0"}}, {"image_id": 78, "category_id": 2, "bbox": [265.58795166015625, 276.4828796386719, 82.52987670898438, 11.03643798828125], "score": 0.7517799735069275, "association_id": 0, "segmentation": {"size": [453, 604], "counts": "Zne34P>1000001O000O10000000000000O1O2Nnd20R[M3N1O1O000010O000001O0O10000000000001O00000000000000000000000000000000000000000000000000001O001O1O001O0O2O1Nigb3"}}, {"image_id": 78, "category_id": 1, "bbox": [158.41795349121094, 188.91566467285156, 62.82637023925781, 19.02978515625], "score": 0.6254695653915405, "association_id": 0, "segmentation": {"size": [453, 604], "counts": "^X`23P>3L4O0O1000001O0000000010O00000010O0000001O00000000000000010O0002N1O001N101O1OcWY5"}}, {"image_id": 78, "category_id": 1, "bbox": [418.2832946777344, 152.4264373779297, 24.726654052734375, 262.44525146484375], "score": 0.5997180938720703, "association_id": 0, "segmentation": {"size": [453, 604], "counts": "]Uj5P1R5K3M101O0O101N10000O10000O2O0O10000O1O101N1O1O1O100O2O0O2N2N2N2N2N2N2N3M5K5L4K3M3N1N2O1O1N3N2N1N2O1O0O2O010O00001O0001O0001O00001O00001O00001O0000001O0000001N2O1N1O2N2N2N2O0O2O2N2N2N3L5L2N2N1O2M3SFTL]9\\4N1O2N2N4L2NO10000000000O10000O100O2O0O100O1O2N1O1O2N1O2N1N3L4M2N2O2M200O101N100O1O1O2N1O1O1O1O1O1O1O1O1O1O1O1QNTEd0m:[OUEd0k:]OSEc0n:]OQEd0P;X10O10000O100O1O1O2M2M3N2J6H8H8@`0N3N1N2O1N2O2M2O2L6J;@[n:"}}, {"image_id": 78, "category_id": 1, "bbox": [64.67779541015625, 195.8501434326172, 39.802825927734375, 79.49794006347656], "score": 0.4301452040672302, "association_id": 0, "segmentation": {"size": [453, 604], "counts": "fgn05n=5K3M4NO03N4K4PCEo;d0eCAY2O00001O000O100000001O0O10000000000000N3Nod2OR[M3N2N0000001O04LO101M200O1000000001OaeR4"}}, {"image_id": 78, "category_id": 1, "bbox": [421.64178466796875, 69.85974884033203, 49.76593017578125, 327.50439453125], "score": 0.1155070886015892, "association_id": 0, "segmentation": {"size": [453, 604], "counts": "\\fk54S>MRIk0f3XOeE1m0P1X9=eE1o8fNoFS4n7e1MXNdHhL]7l2jIWL]6U3f2WOh0nNW1jN]N1fi5<[XJ7I5I6L4M3N00L3N4O0@`0K6I8H61N3M21Lhl0L]ji1"}}, {"image_id": 78, "category_id": 2, "bbox": [298.75164794921875, 310.0595703125, 225.4991455078125, 84.41091918945312], "score": 0.08549186587333679, "association_id": 0, "segmentation": {"size": [453, 604], "counts": "bRU4;i=3N1N2O001O1O00000O2O000lN]OfDc0Z;_OdDa0[;AdD?[;BeD?Z;BeD>Z;CfD=Z;DfD;Z;EfD;Y;FgD:Y;FgD:X;GiD8W;HiD9U;HkD8U;HkD8U;HkD8U;HkD8U;HkD8U;HkD8T;HmD8S;HmD8S;HnD7R;InD7R;InD7R;InD7R;InD7R;InD7R;InD7Q;JoD6Q;JoD6Q;JoD6Q;JoD6Q;KnD5R;KnD5Q;LoD4Q;LoD4Q;MnD3R;MnD3R;MnD3R;MnD3R;MnD3R;MnD3R;MnD3R;MnD3R;MoD2Q;OnD1R;OnD1R;OnD1Q;0oD0Q;0oD0Q;0oD0Q;0PEOP;1PEOP;1PEOP;1PEOP;1PEOP;1PEOP;1PEOP;1PEOP;1PEOP;2oDNQ;2oDNQ;2oDNQ;2oDNQ;2oDNQ;2oDNQ;2oDNQ;3nDMR;3nDMR;3nDMR;3nDMR;3nDMR;3nDMR;3nDMR;3nDMR;3nDMR;3nDMR;3oDLQ;4oDLQ;4oDLQ;4oDLQ;4oDLQ;3PEMP;2QENo:1REOo:ORE1n:NSE2m:NSE2m:NSE2m:MTE3l:MTE3l:MTE3l:MTE3l:MTE3l:MTE3l:LUE4k:LUE4k:LUE4k:KVE5j:IXE7h:HYE8g:HYE8g:BPD2Y1o0oA0c`74RmHO]B7`=9N0000O1000000001O0000000000000000O10000000000000000000000000000000000000001O000000001O000000000001O000001O00010O00000O1000000O100O100O100O100O100O10000O1000000O2OSgU1"}}, {"image_id": 79, "category_id": 1, "bbox": [137.75784301757812, 92.87965393066406, 71.1510009765625, 245.55165100097656], "score": 1.0, "association_id": 1, "segmentation": {"size": [356, 297], "counts": "\\ja1h0Z:5Kb0\\O=F7Jj1UN7Je0[O?A7I[1eN2N4K4M1O00001O2N2N1O1O001N1000000001O0000000000000000000O1000000O101N100O1N2O1O1O1O1K5M5I6`N\\LnJW4h2_KfNg5Fh3_Oc0BSWP1"}}, {"image_id": 79, "category_id": 2, "bbox": [193.6814422607422, 263.6546325683594, 92.83775329589844, 71.08255004882812], "score": 0.999992847442627, "association_id": 1, "segmentation": {"size": [356, 297], "counts": "aST22l:6B>O1N2I7N2O1000000000O010O1000O010O10O100O1000O1O1000O100O01000O10O01O0100O10O01000O01000O1000O010O010000O100000O100O10001N100000O10O1O01O10O01O010O1O1O100O1O1O1J6O1N2O2N1O1O2N1Oka3"}}, {"image_id": 80, "category_id": 1, "bbox": [0.0, 116.61481475830078, 286.114013671875, 172.24945068359375], "score": 0.9999997615814209, "association_id": 1, "segmentation": {"size": [391, 640], "counts": "`Z1356_;`0I4L2M3L4L3N3N2N2N2N2N101N2O0O2O1N2O001N2O1N2O1N101N2O1N101O1O1N3N1N3N2M3M2N3N2M3N2M2O0O2O0O2M2O2O0O2O1N101N1O2L3M4N2N1O2O0O2O0O2N2N2O1N2N3N1O1N2O1O1N2O1O2M2N2O1O1N100000001O0O1000000000000000000000000000000000000000000000000001N10000O1O100O1O100O1O101N1M3L4N2N2O2M2O1O2M2O1M4M2N2O1O2O0O1O101N2N1N5L6jLVGd2Y9M2N3M102N1N3N1N3N0O2N2N1N3M2N20001N101N10kFVNn7h1PH\\No7c1oGbNo7]1lGkNS8T1kGoNT8P1kGSOT8g0oG\\OQ8d0lG@T8>jGFU8:iGIV86iGMV82kGOU80jG2U8MkG4U8KlG6S8ImG8S8GmG:S8DnG=R8@PHb0o7^OQHb0o7]OQHd0o7\\OQHd0o7\\OoGg0P8YOoGh0Q8WOPHi0P8WOPHi0P8WOPHh0R8WOnGh0S8XOmGg0T8YOlG?YOiNm8g0jG2k8NUGLT91lFMY90gFEe9:[FEf9;ZFDh9;XFEh9;XFEh9;XFDi9=VFCk9\\F]Od9c0Q1OPE^O[:b0f0O0D]D4d;GaD7i;O1N2N2NnSm4"}}, {"image_id": 80, "category_id": 1, "bbox": [140.80386352539062, 131.5014190673828, 477.3214416503906, 201.8990020751953], "score": 0.9999983310699463, "association_id": 2, "segmentation": {"size": [391, 640], "counts": "]jf11Q<6L4M3M2O2N1O2O0O100O2O000fD\\OP;f0lD]OT;l0O1N101O001O1N101O6J3L2O1O1O2N4K6K2N3M2M2O1O1O1N101O1N101N2O1O1N2O2M2O1N2N2O1N2N1O2O001O1O001O1O1O1O1O1O2N1O1O2N1O1O2N1O1O2N2N2N2N2M101O00001O0000001O00000000000001O0000000000000000001O0000O100000000000000000000000000000000O1000000O1000000O1000000O100000000O1000000O1000000O10000O10000O100O100O1O1O1O1O1N2N2N2N2M3M3N2O100O100O100O1O1O1O1O100O1O100O10000O10000O010O10O010O0I8K5L3N3N2O00100O10000O010O100O1O1O100O100O010O1000000O1000000000O100000000000000000O10000000000000000O1000000000000O100000000O10000000000O2O00000000000O1000000000000000000000000000O1000000000000001O00000000000000000000000000000O10000000000000001N100000000000000O100000000000000000000000000000000001O0000001O00000000001O00000000001N101O001O1O4K6K3M2N1N2O001O0O20O0001O010O1O001O010O001O000010O0000000000000000000000000000001O000000001N100O2O0O2N2N1O2O1N1O1O2O0O100O2O0O1O2N1N3N3J9dMTIhNZ7k0X2eNaE1J9m:AlE1^Pd0"}}, {"image_id": 80, "category_id": 2, "bbox": [116.7235107421875, 289.0360107421875, 458.030517578125, 101.3074951171875], "score": 0.999981164932251, "association_id": 2, "segmentation": {"size": [391, 640], "counts": "_P]1l0Y;5L3M2N2O1O1N10000O2O0O1O1O1O2O0O1O1O10001N1000000O2O000O100O101N100O100O1000000O1000000O1000000O10000O1000000O100000000000000000000O10000000000000000000000O100000000000000O1000000001O00001O00001O001O001O001O0000001O00001O2N3M=C3M1O1O001N101O00001O001O0O2O005K5K1N2O00001O0000000O2O00000O101O0O101N10000O2O00000O10000O010O100O100O10O1000O1000000000O1000O10000000O1000O100000O01000O100O10O01O1O1O1O1O0100000O100000O010000O0N3K5N2O1O100O010O100O100O010O00OM3]Oc02O01O01000O1000O10O1000O01000O010000O10O10O1000000000O100000O01000000O100000000000O10O1000O10000O10000O1000000O10O1000O100O01000O100O0100000O100000000O10O100000O10O1000O01000000000000O1000O100000000000O10000000000O10000000000O1000000000000000000O10000000000O10000O100000000O1000001O000000000O101O0000001N1000001O0O101O001O2N4L3M1O3M1N2O0000001O0000001N101O1N3N001O0O10001O00000O10000000000O10000O1000001N10000000000O101O00non0"}}, {"image_id": 80, "category_id": 2, "bbox": [1.2145333290100098, 261.21282958984375, 178.5194854736328, 39.36865234375], "score": 0.9999790191650391, "association_id": 1, "segmentation": {"size": [391, 640], "counts": "kd0d0b;2N2O0000000000000000000000000000000000000000000000000000000O1000000000000O10000000000O100000000000O0100000000O1000O10O1001O001O00001O001O3M3M0000001N3N2N1O00001O001O00000O10001O000000000000000000000000000000000000001O000O10001O001O1N1000i`10\\kN1hC2L4N2O100O1N2M3O100000O01000000000000O1000O1000000000O10000000000000000O10000000000000000000000000O2O3KX\\_5"}}, {"image_id": 80, "category_id": 2, "bbox": [3.8398637771606445, 254.53810119628906, 48.12286376953125, 10.307601928710938], "score": 0.543256402015686, "association_id": 0, "segmentation": {"size": [391, 640], "counts": "mh16P<2O00O10000000O1000000000000000000000000000000000000000000001O001O1O1N2O1OeRT7"}}, {"image_id": 80, "category_id": 2, "bbox": [279.6725769042969, 280.2405090332031, 283.4997863769531, 93.783203125], "score": 0.06392386555671692, "association_id": 0, "segmentation": {"size": [391, 640], "counts": "n`b31U<10001O0O10000O1O100O1O1O100O1000000O100O1O100O100000O0100N2O1L30100O01000O1O1N1H9I7L4N1O2O1N10000OO10020O10O10O1000000O0100000O1000O10000000000000000000O1000O10O100O1000000000O100000O10O10000O10000O1000O0100O01000O10000O100O010O10000O1000000O10000O1000O0100O10O01000O10O100000000000O1000O10000000O10000O100000000000000O100000000000000000000O10000O10000O1000000000000000000000001N10000O2O000O101O000000001O000000001O0O2O1O1O4K7J2M2O1O001O1O1O1O1O1O1O1N101O0000001O0O101O0O2O00000O1000000000000000000O101O0O100O100O2Olon0"}}, {"image_id": 81, "category_id": 2, "bbox": [0.365234375, 339.6561584472656, 290.1236877441406, 114.432373046875], "score": 0.9999997615814209, "association_id": 1, "segmentation": {"size": [533, 400], "counts": "gl0:Z`02O1N2N2O1N101O1N2O001O0O2O001O001N101O1O1N2O1O00001N10001O1O001O0O101O00000O100O2O000O2O00000O0100O0100O010O1000O100O1^Oo@^OS?`0b0O1000O0100000000000000000000000000000000000000000000000O101O0O101N101O000O101N100@VOTAl0i>XOSAj0m>`0N1O2O000000001N1000000000010O01O100O10O00010O000001O001O001O001O00010O00000100O00010O00001O00001O010O001O001O000O2O001O2N1O1O0O2O00001O000O2O1O001O000000000000000000[OjAkNV>T1oAhNQ>W1VBbNk=^1f000O10000OeAcNa=\\1^BiN^=V1bBmN\\=S1dBoNZ=Q1fBPOZ=n0gBROY=n0jBnNX=P1kBnNV=Q1X1N7Hom:UOhRE9L6J2O0O100N2O2N1O1O10000000000001O00001O00000000001O000001O0000001O00010O001O100O10O01O0001O01O0001O01O00010O01N2N3L6Iglh1"}}, {"image_id": 81, "category_id": 1, "bbox": [63.19682312011719, 112.58100891113281, 303.1639404296875, 332.06781005859375], "score": 0.9999986886978149, "association_id": 1, "segmentation": {"size": [533, 400], "counts": "WXW1?R`0>B6K5M3M2N3M3M7I:F:F6I6K4L5K4M3M3L3N3M3M4K4M3M2N2N1N101O001O000O2O00000000O100O1O1N2O1N2O1O1O1O1N2N2M3M3M3K5L4M3N2O1N2O1O1N2N2N2N2N2N2O1O1O10000O100O10000O100001O1O1O1O1O1O1O1O001O1O2N1O3M2N3M3M2N2N1O2N1O1O2N2N2N2N2N2N2N1O1O1O1O1O1O2N1O2N2N2N1O1O1O1O1O2N3^F]Kk6i4lH`Ko6d4iHeKR7_4fHgKX7]4bHfK]7]4^HeKb7]4[HeKc7_4YHbKf7b4UH`Kj7e4PH^Kn7e6N2O1N2O2O0O100O1O010O001N[NWHaJh7]5cH[J]7b5jHZJV7e5oHVJR7j5QIQJQ7n5SInIn6Q6VIjIl6T6j1N2[OkEfJW:X5`0O3O31N3N2O1N3M2L5L4M201O001O01000000000O10001O000000000000000000001O0000000001O000nKjEe1W:iM^FS2b9hMfFU2[9eMnFW2R9fMRGY2o8dMTG[2l8dMVG[2k8cMWG\\2k8`MWG`2l8\\MVGc2m8XMUGg2P9PMUGP3X;0001N10000O1001O1oDlL_8U3^GnLa8S3[GQMd8P3YGSMf8o2UGUMj8l2TGVMk8l2RGVMm8l2PGVMo8l2nFVMQ9j2oFVMQ9i2PGWMP9i2PGVMQ9i2QGVMo8h2SGWMn8h2SGXMm8f2VGXMk8g2WGXMi8g2YGWMh8g2\\GWMd8h2^GVMc8i2`GTMa8l2bGoL`8P3iElLSj0C1O100O2N1O1kKcMPJ^2l5gMRJZ2i5kMWJT2g5oMbJh1\\5ZNdJe1[5\\NfJc1Z5]NgJb1X5_NjJEgK]1_9POXKl0h4UO[K]OXL2\\8b0[61N2N2M3N2WAQOj=P1UBSOj=m0UBUOj=k0UBWOi=j0VBWOj=h0VBYOj=g0TB\\Ok=d0TB]Ol=c0SB_Ol=`0SBBm=>RBDm=:TBHk=5UBOj=0TB4k=KSB9l=HPBAoAb0o=_OoAc0P>]OoAg0n=ZOPBj0b1^Nb:d2WE`Mi:d2QE_Mn:d2nD^MQ;f2iD\\MW;g2dD[M\\;g2_D]M`;e2_DZMa;j2]DTMc;S3VDmLj;T3VDkLj;V3UDjLk;V3VDjLi;W3VDiLj;W3VDiLj;X3UDhLk;X3UDhLk;X3UDhLk;X3UDhLk;Y3SDhLm;Y3QDhLo;o30000001O1N2fKXDe3d_8AcG>]8BcG>]8BcG>]8BcG>]8CbG?\\8AeG?Z8AfG`0Y8@gGa0X8_OhGa0X8_OhGb0W8^OiGb0W8^OiGc0V8]OkGb0U8^OkGc0T8]OmGc0R8]OnGd0Q8\\OoGe0P8[OPHf0o7ZOQHf0o7ZOQHf0o7YORHh0m7XOSHh0m7XOTHg0l7YOTHg0l7YOTHh0k7XOUHi0j7VOWHk0h7TOYHl0g7TOYHm0f7RO[Hn0e7SOZHm0f7SOZHn0e7RO\\Hm0d7TO[Hl0e7TO[Hm0d7SO]Hl0c7TO]Hl0c7TO]Hm0b7SO^Hm0b7SO^Hm0b7SO^Hm0b7SO^Hm0b7SO^Hm0b7SO^Hm0b7SO]Hn0c7SO\\Hm0d7SO\\Hm0d7SO[Hn0e7RO[Hn0e7RO[Hn0e7SOYHn0g7ROXHo0h7ROVHo0j7ROQHR1o7POmGR1S8d00000000000000000000000000000000000000VOPHWOP8e0VHYOj7f0XHYOh7g0YHXOg7h0ZHWOf7h0[HXOe7h0\\HWOd7i0\\HWOd7h0^HWOb7h0`HWO`7i0bHUO^7j0dHUO\\7j0eHVO[7j0fHUOZ7k0fHUOZ7l0fHRO[7n0fHQOZ7P1Q12N1O1nFgNn8]1O0000O1G9N2K5O1O1O10000O1000000O1000000O10001O00000000001O00000010O0001O0010O000001N101O000O101O00000O10000O2O0O10000000001O0O10000000000O2O0000000O101O0000001N10001N1Ol[2"}}, {"image_id": 82, "category_id": 2, "bbox": [381.13226318359375, 210.48568725585938, 63.761688232421875, 5.328277587890625], "score": 0.9999610185623169, "association_id": 3, "segmentation": {"size": [333, 500], "counts": "keo31\\:000000001O00001O00000001O0000000001O0000000000000000000000000O100000000001O00001O0000000000000000mdb0"}}, {"image_id": 82, "category_id": 1, "bbox": [246.2325897216797, 220.4413604736328, 131.96693420410156, 66.62120056152344], "score": 0.9947804808616638, "association_id": 0, "segmentation": {"size": [333, 500], "counts": "ba`21Z:4K4O1N2O1N2O0O2O0O2O001N102N1cFCh8>VGEh8R8CnG>Q8APHb0m7^OSHb0m7^OSHc0l7\\OUHd0k7\\OUHd0k7\\OUHd0k7\\OUHd0k7\\OUHd0k7\\OUHd0k7\\OUHd0j7]OUHd0k7\\OUHd0k7\\OVHc0j7\\OWHd0j7[OVHe0j7[OWHd0h7]OXHc0h7]OXHc0h7]OXHc0h7]OXHc0h7]OXHc0h7]OXHc0h7]OXHc0h7]OXHc0h7]OWHd0i7[OXHe0h7[OYHd0g7\\OYHd0g7[OZHe0f7ZO\\He0d7[O\\He0d7[O\\He0e7ZOZHg0f7YOZHg0f7SOeG1e0l0g7ROdG1f0m0f7QOfG0e0o0e7QO_HP1_8000XOTOoGl0o7YOmGh0P8^OkGd0U8]OiGd0W8i0001O000GbGcN_8X1aGcN13c83gGO100O0100000O10O1000000O1000O0100000000O1000O101O00000000001O001O00001O1O1O001O2N001O0010O000001O000000000001O000O2O1O1O1N103M2N001N3N1O0O2O1O0O2O00001N10001O000O101O1N2N_ab5"}}, {"image_id": 83, "category_id": 1, "bbox": [559.6797485351562, 199.95989990234375, 67.30426025390625, 53.25883483886719], "score": 1.0, "association_id": 2, "segmentation": {"size": [434, 650], "counts": "lW_73]=4M1O2O1O2M1O3N1VCNQ<4mCOPjN_OS;2RFb0jN\\OT;3QFa0kN\\OT;3PFb0lN[OT;3PFb0lN[OT;3oEc0mNZOT;3oE>lNFT;LPF=nNFR;MPFm:AoDf0n:[OkDl0U;SOiDP1V;POkDP1V;nNjDV1T;hNmDY1S;eNmD\\1U;aNlD^1T;cNlD\\1T;dNmD[1T;fNlDX1S;kNkDU1U;lNgDW1Y;iNgDW1Y;jNfDV1Y;kNfDV1Z;mNbDT1^;`00O0MdDRN\\;m14A`0H8O001O1O10000000O100000001O0000001lCjNi;X1UDiNk;W1VDhNj;Y170kCgNQTDBm;?RD@n;?YDZOj;b0ZD\\Ok;>WDAl;:XDCk;:iVe5"}}, {"image_id": 83, "category_id": 2, "bbox": [346.99346923828125, 237.50970458984375, 32.441070556640625, 6.429901123046875], "score": 0.9929159879684448, "association_id": 1, "segmentation": {"size": [434, 650], "counts": "`]e41a=1M20000001O000000010O0000000000001O000001O000001O0Omcb3"}}, {"image_id": 83, "category_id": 2, "bbox": [409.6454162597656, 247.0316619873047, 24.806121826171875, 18.067489624023438], "score": 0.8892927765846252, "association_id": 5, "segmentation": {"size": [434, 650], "counts": "\\^^52`=0O2N1O1O1F:O10000000000001O001N2O3M1N101N1NcYk2"}}, {"image_id": 83, "category_id": 2, "bbox": [324.40936279296875, 235.9277801513672, 56.40594482421875, 7.4693756103515625], "score": 0.4654364287853241, "association_id": 0, "segmentation": {"size": [434, 650], "counts": "ae[41`=1000000000000nm5OSRJ0O2O0O100001O000000010O00000000001O00000000000000001O00ZVb3"}}, {"image_id": 84, "category_id": 1, "bbox": [143.7554473876953, 54.71254348754883, 161.5736846923828, 142.42645263671875], "score": 1.0, "association_id": 1, "segmentation": {"size": [600, 521], "counts": "dgi23bb0<@:U_OER?`0^@0\\?4_@1_?0_@3]?1^@5^?NY@<`0]N^>T3ZAQMd>b3O1O2N100O100O1O1O1O1O100O1O100O1O10lNlAdMS>[2RBbMn=\\2WBaMi=\\2_B^Mb=^2eB_M[=_2iB_MW=_2oB\\MR=c2b1O1M3M201O1O1O1N2O1O1O100O100O1000001O00000001O0f@SNi=o1SBVNj=k1SBYNk=h1PB^Nn=c1iAfNV>\\1eAgN[>Z1aAiN_>h20000000O1N2]OWARMn>m2?O1O1001O001O001O1O4L8H8H1O1O1O100O1O10O1N1O2O0O2O0O1O1H8@m@UMY?U2TAhMX?R2k0N2N2O0O2O0010O2i_ORN`?h2K3M101N2O1O2N2M2O1O001O1O00O010O2N1O100O1O1O4L2N1N2O1O1N6J3N1N2N3L5K5VO\\_OWOi`0`0l0M4L4KY^n3"}}, {"image_id": 84, "category_id": 1, "bbox": [308.3033447265625, 266.2545471191406, 153.82205200195312, 277.6302795410156], "score": 1.0, "association_id": 2, "segmentation": {"size": [600, 521], "counts": "gid5f0aa0Y2TN6K4M3M2N2M4N1O2M3N2M3M3M3N2M3M2O2M3M3N3L6K4REPKm7S5lGTKP8P5kGTKS8P5gGSKW8T5aGPK]8\\5UGgJj8e5gF_JY9d5bF^J^9f5[F]Je9l5kE[JU:T7O1000000001O00000O2N2N2mNfEbI_:[6Q1L4M3J6K5L3N30001N101O02^DVJP:n5gEXJX:S6SEYJk:j601O1M2N2O1O1O1O10O0100O100N01oN_EkIb:X5m1H8M3N3L4L4J5N3N2N1O2M3N1N30O3M3ZCWKX;l4bD_KV;d4eDbKW;a4cDeK[;m5N10001N1000O100O1O1O1O1M3M3H8L4O1N2N2M3L4M300O1O1O1O11O6J8Hi0WO3N0O0100O100O1O1N1^N^DnKc;f3UElKm:o3\\EkKe:S4_EiKd:S4bEfKc:V4R2A?I8K4L4L3L5L3N3N2L6H[YR1"}}, {"image_id": 84, "category_id": 1, "bbox": [47.23221206665039, 289.5937194824219, 241.21255493164062, 160.55438232421875], "score": 1.0, "association_id": 3, "segmentation": {"size": [600, 521], "counts": "dXU1RH_Oo7?SH@m7>VHBj7]OBo8m0VGROMk0k86SG7l8X100000001O0[GZM]8f2bG\\M]8e2`G`M]8m2N2N2N1O1O100O001000O100O2O00000O010O010O0100O100O1000O10O10000O1000O2N101O0000O1O001O001O001O1000O100O2O0O0010O001lNgLlIZ3S6gLmIY3R6hLmIY3R6gLnIZ3Q6gLoIX3P6iLPJW3P6jLRJS3n5mLUJQ3j5oLXJo2h5QMZJm2f5TMZJk2f5UM[Jj2e5WM[Jh2e5YM\\Je2d5[M]Jd2c5]M]Jc2b5]M_Jb2a5_M_J`2a5`M`J_2a5`M`J`2_5aMaJ_2^5aMcJ^2]5cMdJ\\2[5kM`JS2`5mMaJS2^5nMbJQ2`5mMaJR2a5cMSIO^1\\2a5`MUI3\\1[2i5dMZJY2g5gMZJX2e5hM]JV2d5jM\\JU2c5nM\\JQ2d5QN\\Jm1d5XN[Jd1e5]N\\Ja1d5`N\\J_1d5bN\\J]1d5cN]J\\1c5eN\\J\\1c5eN\\J[1d5gNZJZ1e5lNVJT1i5nNUJS1j5oNTJQ1l5QORJP1l5ROTJm0l5TOTJk0l5VOTJi0l5YORJh0m5YOSJf0l5\\OSJd0m5]ORJc0n5]OSJb0d5TN]I[1n0a0c5XN\\IY1Q1>a5]N\\IV1S1<_54`JK`56`JI_59aJG^59bJG^5:bJE^5;bJE^5h1c4POkJ[Oc0d1c4POhJ@d0_1d4ROeJBg0\\1c4SOdJCi0Y1c4TOcJEi0W1e4TOaJFj0U1e4VO_JGk0S1f4XO\\JGn0Q1e4a0[K^Oe4c0[K\\Of4d0ZK[Of4g0YKYOf4h0ZKWOf4j0YKVOh4i0YKWOf4j0ZKUOf4k0[KUOe4j0[KVOe4k0[KTOe4l0\\KTOc4l0]KTOd4l0\\KSOd4m0]KROd4n0[KROe4o0[KPOf4P1ZKoNf4R1ZKmNg4S1YKmNf4S1[KlNf4T1ZKkNf4V1YKjNg4V1ZKiNg4W1YKhNg4X1YKhNg4Y1YKeNi4[1WKdNi4\\1XKcNh4^1XKaNi4_1WK`Ni4`1XK^Ni4c1WK\\Ni4d1XK[Nh4e1YKYNi4g1WKXNi4h1XKWNh4i1XKVNi4k1WKTNj4k1VKTNk4m1UKRNk4o1TKPNn4P2RKoMn4R2QKmMP5T2PKjMQ5W2nJhMT5W2mJgMT5Z2lJdMU5]2jJbMW5_2iJ_MX5a2jJ\\MW5e2kJVMW5j2j10O1O1O2N1O1O2N001O1O0010O01O2O0O2N2O1NTNQH7m7FYH8e7G^H8b7FaH:]7EdH;]7DcH=]7AdH`0]7^OcHc0]7ZOeHh0\\7SOfHo0Z7kNjHV1X7fNhH]1X7_NjHb1W7[NjHg1U7WNlHj1U7SNlHn1\\8002M2O1N2O1O1O0O2O1O1O001N2OcNVG1b85cGjNJd0b8`0hGgNIi0^8?THBk7;XHFf78]HIa74dHL[72gHOW70kH1S7NoH2P7NQI3l6NUI2j6OVI2i6MYI2f6N[I2d6M^I3a6LaI4^6KeI5P63RJMS5_O]I=j14g4e0ZK[Od4f0]KZOb4f0`KYO^4h0cKXO[4i0fKWOX4k0hKVOU4k0lKUOS4k0oKTOP4l0QLTOn3k0ULTOk3k0WLTOh3l0YLTOg3j0\\LUOd3j0^LUOa3l0_LTOa3k0`LUO`3k0aLTO^3l0cLTO]3l0cLTO]3l0dLRO]3n0cLRO]3o0cLPO]3P1cLPO]3P1dLoN\\3Q1dLoN\\3R1dLlN]3T1dLkN\\3U1eLjN[3V1eLjN[3W1eLhN[3X1eLhN[3X1fLfN\\3Z1cLfN]3[1bLdN_3\\1bLcN_3]1aL`Na3`1`L]Nb3d1aLUNb3l1S3O010O01O10O010O010O0010O01O0010O01O1O00100O001O1O00100O1O1O010O01O010O1O100O1O100O10O01O01O010O10O010O01000O100O010O01O1O00100O1O101N1O100O002M2M4L4L6oNbEa0\\fX1"}}, {"image_id": 86, "category_id": 2, "bbox": [65.34174346923828, 115.60130310058594, 165.72894287109375, 219.3403778076172], "score": 0.10441171377897263, "association_id": 0, "segmentation": {"size": [371, 483], "counts": "Qjg0V1]9T1ZMWNoJW2k4oMnJV2P5lMoJU2n4nMQKR2o4oMPKR2n4oMRKQ2m4QNQKQ2n4PNPKQ2P5PNnJQ2R5PNkJR2V5nMhJS2X5nMfJS2[5mMbJU2^5lMaJT2W5TNkJk1R5WNQKf1m4\\NUKb1i4`MYJ:o0T2f4aM_J:l0T2c4cMbJ9l0S2`4eMfJ8j0S2]4gMiJ7j0R2[4hMlJ5j0S2W4iMPK5h0T2U4hMTK4g0T2T4hMUK4h0S2S4iMUK4i0R2R4jMUK5j0o1Q4kMWK5i0P2o3kMXK5j0o1n3lMXK5k0n1n3lMWK7k0l1o3mMTK8n0k1o3mMPK9R1i1P4QNgJ9Y1f1P4WOPLi0Q4VOPLj0P4VOPLj0P4UOQLj0Q4UOPLj0Q4VOPLg0Q4[OoKb0R4@mK?S4AnK=T4BmK[KBe4?ZKAg4?XKAh4`0XK_Oh4b0WK^Oi4c0VK]Oj4e0UKZOl4f0TKYOl4h0UKVOk4k0UKTOl4k0UKTOk4m0TKSOm4l0TKSOl4n0SKROn4o0PKQOQ5o0oJPOQ5Q1nJoNS5P1nJoNR5R1nJmNS5R1oJlNQ5T1PKkNP5V1PKiNP5W1QKhNP5W1PKiNP5X1PKgNP5Y1PKgNP5Z1oJfNQ5[1oJdNQ5]1oJbNQ5_1oJ`NQ5a1oJ^NQ5b1PK]NQ5b1oJ]NR5d1nJ[NR5e1nJ[NS5d1nJ[NR5e1nJ[NS5e1mJZNT5e1lJZNV5e1kJZNU5f1lJYNT5g1nJWNR5j1oJSNQ5n1PKQNP5o1QKPNn4Q2SKnMm4S2SKkMn4V2SKgMo4Z2QKaMR5`2PK[MS5e2m1001N2N3M4M3L2O2O1N3N2N1O0O1O2O1N2N100O10001N1000O2O0O1000000eMdH>\\7]OjHb0W7ZOmHd0U7YOmHg0S7VOQIh0P7VOSIi0m6UOVIi0k6VOWIh0k6UOWIk0i6RO[Il0f6PO^I_OTOm0^7@XJ>h5@[J?e5_O^J>e5_O]J`0e5]O^Ja0d5\\O^Jb0e5ZO^J3`M9S;M3M4JTPk2"}}, {"image_id": 87, "category_id": 1, "bbox": [14.784979820251465, 4.481450080871582, 95.54330444335938, 171.306396484375], "score": 1.0, "association_id": 2, "segmentation": {"size": [305, 405], "counts": "b]5a0m85L3M5K4L3N3K5UJhNX3[1cLiN[3Y1bLjN]3V1aLlN^3W1]LlNa3W1\\LkNc3W1ZLkNe3W1ULnNj3T1RLoNl3T1QLnNm3W1mKlNR4V1jKmNU4U1iKkNW4X1eKiNY4]1aKcNa4_1\\K^Ni4c1SK\\NP5o24N2O0O1000O11N1O200O100001O3\\94L200O2O00O1O100O00100O10000O01000O10^OLgG4W8OhG1W80iG0W81hGNX83gGNY82gGNY82gGNY82gGNY82gGNY82gGNY81gG0Y80gG0Y80gG0Y80gG0Y80gGOZ81fGOZ81fGOZ80fG1Z8OfG1Z8OfG1Z8NgG2Y8NgG2Y8NgG2Y8MhG3X8MgG4Y8LgG4Y8LgG4Y8KhG5Y8JgG5Z8JgG6Y8JgG6Y8JgG6j800O10000000O10000^OJiG6V8LhG5X8KhG4Y8LgG4Y8LgG4X8MhG3X8MhG3X8MgG4Y8LgG3Y8NgG2Y8OeG2[8NdG3\\8MdG2]8NcG2]8NbG3^8MbG3]8NcG1^8ObG1^80`G1`8O`G1`80^G0b82YG2g8<0O1000000000O100000000O1000000000000O2O001O0O101O00000O10000O2O00000000O001O1O10O0100000000O1O1000000O1000O10000000O1000000O10000000000O1000000O10000000O10O100O1O10000O10000000001O0000000000001O0O101MdW9EihF0O101O0O100O100000000O10000001N1000_GJh75WHLi73XHNg72XHOh71XHOh70YH0h7NXH3c80000000000000O1000000O100O1000000000000000O3L3NTak0"}}, {"image_id": 87, "category_id": 2, "bbox": [305.3192443847656, 27.44654655456543, 36.31884765625, 3.1601409912109375], "score": 0.9999103546142578, "association_id": 1, "segmentation": {"size": [305, 405], "counts": "RRl21`90000000000000000000000000O100000000000000000O100000000000Vdc0"}}, {"image_id": 87, "category_id": 2, "bbox": [268.9867248535156, 25.588151931762695, 28.88262939453125, 3.146085739135742], "score": 0.9949316382408142, "association_id": 0, "segmentation": {"size": [305, 405], "counts": "jg`21_9100000000000000000O1000000000000000000000fZQ1"}}, {"image_id": 87, "category_id": 1, "bbox": [259.9665222167969, 0.0, 13.772308349609375, 29.51697540283203], "score": 0.6562979817390442, "association_id": 0, "segmentation": {"size": [305, 405], "counts": "\\^]2482a8c0M201O000000FbG@_8?:O2L7K4LmYW1"}}, {"image_id": 88, "category_id": 1, "bbox": [87.40778350830078, 172.2215118408203, 233.645263671875, 474.5682373046875], "score": 0.9999979734420776, "association_id": 1, "segmentation": {"size": [924, 520], "counts": "RmR3d0nk0>G7J5M4K5L4K4L4_FQNoGS2m7VNhGQ2T8YN_Gm1^8[NYGj1b8]NXGf1f8_NTGe1i8_NRGd1m8_NoFd1o8_NjFg1T9]NbFk1]9ZNUFo1j9WNhES2W:SNTD]3j;mLcC]3]ZMaAi2_>YM]Ai2c>YMXAj2h>YMQAk2o>YMf@n2Y?\\5O0000001N10000O100O100O100O010O010O010O01O1O001O1N2O001O1O1O1O1O1O1O1N2O1N2N2M4L3N2M3M4L3O1O2O1O1N2O001N101O001O00001O0O10001O00001O00001N10001O1O2N2M5L4L3M2N3M3L4M4L5K4K5L3M2N2M3N3M9Gg1XN9H2N2M3N2N2O3L3M2N2N100O1O101O0O2O2N1N1001O0O2O1O1O1O0O20O\\LjIa@V6\\?oIc@P6[?TJe@j5X?ZJi@d5U?`Jj@_5T?dJl@[5R?hJn@X5P?iJPAW5o>iJSAU5n>jJTAU5k>kJ[AP5d>PKcAj4]>UKiAf4V>ZKmAc4T>\\KoAb4P>^KRBa4n=ZKWBd4l=UK\\Bh4f=QKbBk4mb0J6K5J5K3N2M3M4M2M5K4M3L3N2M3N2M4L5L3L4M2M3N2L7J`0[@T1a?oNU@[1h?gNo_Ob1o?`NV_OZ2i`0gMo^Ob2Pa0_Mm^Oc2Ra0`Mj^Oc2Ua0^Mi^Oc2Wa0^Me^Oe2[a0\\M`^Oh2`a0YM[^Ok2ea0VMW^Ol2ja0UMS^Om2ma0TMo]Oo2Qb0RMk]OQ3Ub0QMd]OT3\\b0nL^]OV3bb0lLY]OW3gb0mLQ]OW3ob0VM\\\\OR3dc0S300000001O001O00000000001O1O1O1O001O0000001O0000000000000000000000000000000000000000000000000000000000000000O1O1O1O1N2M3L4@`0H8M3L4SOm0^Ob0K5M3L4F:^Ob0F:L4L4kNU1B>J6M3L4D]\\ODbc0=]\\OCcc0>\\\\OBdc0>\\\\OCcc0>\\\\OBdc0>]\\OAcc0`0\\\\O@dc0b0[\\O]Oec0d0Z\\O\\Ofc0e0Z\\OZOfc0g0Y\\OYOgc0h0Y\\OWOgc0j0X\\OVOhc0j0X\\OVOhc0k0W\\OUOic0k0W\\OUOic0l0V\\OSOkc0n0T\\OROlc0o0S\\OQOmc0P1R\\OPOnc0Q1Q\\OoNoc0Q1Q\\OoNoc0Q1Q\\OoNoc0Q1R\\OnNnc0R1S\\OmNmc0S1S\\OmNmc0S1T\\OlNlc0T1T\\OlNlc0T1U\\OjNlc0V1T\\OjNlc0W1S\\OiNmc0W1T\\OgNmc0Y1S\\OgNmc0Y1S\\OeNPd0Z1P\\OeNQd0[1o[OeNQd0[1o[OdNRd0\\1n[OcNSd0]1n[ObNRd0]1o[ObNRd0^1o[O`NRd0`1o[O\\NTd0d1o[OWNSd0i1P\\OQNSd0o1]3000000O101XN]UOU1cj0jN`UOT1`j0jNdUOS1]j0lNfUOR1Zj0mNjUOP1Vj0POkUOn0Vj0ROjUOn0Vj0ROkUOm0Uj0SOkUOl0Vj0UOiUOk0Wj0UOjUOj0Vj0VOjUOi0Wj0WOjUOh0Vj0XOjUOh0Vj0YOhUOh0Wj0YOhUOh0Xj0XOhUOh0Xj0XOhUOh0Xj0XOhUOh0Xj0XOhUOh0Xj0XOgUOi0Yj0WOgUOi0Yj0XOfUOi0Yj0WOfUOk0Yj0VOeUOl0Zj0VOcUOl0\\j0l0N1O1O1O101N10nMlUO\\1kj00O1N101OO001O001O1O1N2O1O00O1O1N2O1O1O100O01000000O1000O010O0O2O001O001FSNdUOn1[j0UNcUOj1hj001O2M2O1N7I4M2M2N2N2M;EQQc5"}}, {"image_id": 89, "category_id": 1, "bbox": [126.7133560180664, 16.896007537841797, 312.4027404785156, 284.52685546875], "score": 0.999998927116394, "association_id": 2, "segmentation": {"size": [725, 525], "counts": "\\ni2Q3`c0:H4L4L3N2O1N2O0O2O1O0O2O001O0O2O00001O001O001O001O1N101O010O00001O00001O0000001O00010O00000010O0001O001O100O4L3M6\\^O`Kg`0\\5L0O2N1O101N2N101N2N1O2O1N1O1O0000001O0001O00000001O00001O001O0010O01O001O1O001O2N1O1O2N1O1O2N1O1O2N1O3M3M7I6J5K2O0O1O1O001O001O1O1O001O1O2N1O1O2N1O2N2N10O01O001O000000001O000001O00000000001O0000001O00001O0000001O000000001O000000000000001O000000000000000000000000001O0000000000000000000000000000000000000000000000000000001O000000000000000000001O00001O00001O001O1O00001O0000001O0000001O00000000001O000000000O10001O0000000O100000000O2O0O1N3fMiAPL[>g3TBoKP>\\3ZCgKoJ5L4BXeo1"}}, {"image_id": 89, "category_id": 1, "bbox": [254.63552856445312, 389.09088134765625, 196.57443237304688, 235.569091796875], "score": 0.9999887943267822, "association_id": 1, "segmentation": {"size": [725, 525], "counts": "cXn53ee0^1QOd0H4L3N2N3M4L7I5L1N2N3N2M7SMbLWBd3b=`LZBc3c=`L[Ba3c=bLZB`3e=aLZBa3d=`LZBb3e=_LZBb3e=_LZBa3f=`LYBa3f=`LXBa3h=`LWBa3h=`LWB`3i=`LWB`3i=aLVB_3j=aLVB_3j=bLUB^3k=bLUB^3k=cLTB]3l=dLRB]3n=cLRB]3o=cLoA^3Q>cLmA^3S>cLlA]3T>eLiA\\3W>eLgA\\3Y>eLdA]3\\>eL`A]3`>fLYA^3h>W20001O000001O0^IV@Y6T`0O1O1O0001O001O100O1BdI`@]6_?gI\\@[6d?aJSA^5m>aJTA_5l>`JVA_5k>^JXAa5h>\\J[Ad5e>ZJ^Ae5b>XJaAh5_>VJdAi5]>TJeAl5\\>QJfAo5[>nIgAR6^?01O0000000O1000000000001O1N2N3M3M2N1O2N2O0O2O2N1N2O1N2M3N2M3N3M2N2N2N3L6XLi^Oi1]a0mMk^Oo1[a0iMj^OT2nb0N1N3M2M4L4L3N3M2M4L4L6I6J5L3N3M4Kkad1"}}, {"image_id": 89, "category_id": 2, "bbox": [106.63499450683594, 337.5964660644531, 213.9137420654297, 268.3600769042969], "score": 0.9999083280563354, "association_id": 1, "segmentation": {"size": [725, 525], "counts": "Umc27Zf06M4L4L3M2N2O1N1O2O1N3M3M3M2N101N2O2M3N2M2O1N2N2N2N3M3M3M2M2O2N2N3L4M3N2M2O1N2O3M4L9G9G5K1O1O2N2N3M2N2N1O100O1O2N4M2M3M2O^L]^OQ2ca0eMh^OZ2Za0`Mj^O`2Wa0\\Mm^Oe2Sa0VMR_OP3i`0kLZ_OW3e`0dL__O[3b`0bLb_O\\3^`0aLe_O_3ja0O9G10OXMc\\OX2]c0dMi\\OZ2Vc0bMP]O\\2Qc0`MX]OY2lc0G4L3M3N2NRM[Nj@d1P?bNQA]1k>gNVAX1i>iN[AS1c>oNaAm0^>UObAk0\\>WOcAj0Z>ZOeAe0Z>]OeAc0Z>_OeAa0Z>_OgAa0Y>^OgAc0X>^OgAc0Y>\\OgAf0X>YOhAi0W>VOiAk0V>VOiAk0W>TOiAm0W>SOhAm0Y>ROgAo0Y>QOfAP1Z>oNfAR1Z>nNeAS1Z>mNgAT1X>kNhAV1Y>iNeAY1[>fNeAZ1\\>fNbA[1_>dN`A^1`>aN_A`1a>aN^A_1c>`N\\Aa1d>_N\\Ab1c>^N\\Ac1d>]N[Ad1f>[NYAf1g>ZNXAg1h>ZNUAh1k>XNSAj1m>VNQAl1P?SNo@n1Q?SNm@o1S?QNl@o1T?RNj@o1W?RNf@P2Z?UN`@l1_?XN\\@j1d?WNY@k1f?VNY@k1g?VNV@k1j?WNS@k1l?WNP@k1Q`0WNk_Ok1T`0WNh_Ok1X`0XN__On1b`0VNU_Oo1j`0n100000000001O00001O001O001O0dNe^O^M\\a0^2j^O_MVa0\\2T_O^Mn`0j1n_OoMT`0_1i^OhMf16g?P2f2O2N100O2O001N10001N1010O00010O0001O001N2N3M2M3M3N2N3L4M4K4K7J9EcVi4"}}, {"image_id": 89, "category_id": 2, "bbox": [32.11723327636719, 60.01995086669922, 107.66714477539062, 108.8606185913086], "score": 0.9270167350769043, "association_id": 2, "segmentation": {"size": [725, 525], "counts": "Phf024l0Se0k0C3OO0O20OO0N1K6N20J700001000O1001O01O001O1O1N101O1O1O1O001N101O1O1O00001O1O1O1O0000001O100O010O0000001O1O1O010O000000001O1O1O0000001O00010O00100O01O1O1RNn[OBO^1Yd0bNi[OM:_1ld0J3M8H2O0O3M4M4L0O2N4M0O2M2O2N1O1MPnh8"}}, {"image_id": 89, "category_id": 1, "bbox": [186.26861572265625, 342.4626770019531, 248.13031005859375, 237.86911010742188], "score": 0.573329508304596, "association_id": 0, "segmentation": {"size": [725, 525], "counts": "W_U43`f05K5M1000O10000Oh[O3ja0KT^Ob0ba0^O\\^Od0ca0\\O\\^Og0ca0XO\\^Oi0da0WO[^Ok0ea0TOY^On0dNkNfb07b^OS1fNhNhb04a^OV1dNiNkb00`^OX1dNjNlb0M_^O[1bNkNob0NZ^OW1fNnNRc0HW^Ok1Xc0000O1O100000N3O000O1O1O10@YNS\\Og1mc0[NR\\Od1mc0_NQ\\Oa1Pd0`No[O`1Pd0bNn[O^1Sd0dNj[O]1Vd0b0O0000001O000001N2N1N3N2dNe[O;\\d0Ch[O:Zd0Eg[O9Zd0Fh[OAK9_d04h[O_OO:Yd07Z\\OFhc08\\\\OEec0:]\\OCec0;]\\ODdc0:_\\OCdc09^1M2O3M2MnP:1RoE3]NO\\\\O6_c0ROeAT1[>[On@m0R?[30000000000000000000000000000000000000000000000000000000000000000000000001O0000000000001O0000001O1O1O001O1O001O00001O1O002N1O1O001O1O1O2N2kJZ@W3h?cL]@\\3d?bL]@^3d?`L^@_3c?`L]@`3d?^L^@a3b?^L_@b3c?[L^@e3e?VL]@j3h?mK\\@S4m?aKV@_4Qa0O0000001O001O1O1O1O1O00001O00001O000000001O1O1O1O2N1O1O1O001O1O1O2N2N2eM[]Ob0gb0XO`]Oe0ab0XOc]Of0^b0UOh]Oi0Zb0oNP^Ol0Sb0oNU^Ok0oa0nNa^OH_N>WbP2"}}, {"image_id": 89, "category_id": 1, "bbox": [271.5157470703125, 345.77252197265625, 112.58779907226562, 74.3787841796875], "score": 0.4721482992172241, "association_id": 0, "segmentation": {"size": [725, 525], "counts": "UnP6c0oe07J3M4I7M1O2M4L5L2O0O2N2N101N1O2O1N10000O100O1000Ee[O]NZd0c1g[OZN[d0f1:0000000000O11O001O001O0000001O1O1O1O0000000000001O0000000000000000001O00001b[OPNUd0R2h[OoMXd0W201O000001O001O000000001O0000001O001O00001O001O001O001O1O001O001N2O001O0N5L2N2O0O3N1N2N3LP_S3"}}, {"image_id": 89, "category_id": 2, "bbox": [426.7703552246094, 75.0234603881836, 98.22964477539062, 179.24691772460938], "score": 0.23276911675930023, "association_id": 0, "segmentation": {"size": [725, 525], "counts": "X\\c91[f0a0B;C;I6L4M3M3M3N2M2O1N3N1O1O1O1O3M2N1O102M100000001O0O101001O0O10001N1O1O11OO1O2N2O000O0010O1001O1OO100O2N01O1O01O1O01N2O101OO00O2O2N010O2N00002O00O1dMPNQ@P2b?]N^@c1X?gNh@Y1V?iNi@W1U?lNk@T1S?nNm@S1P?oNo@Q1P?POPAo0P?ROPAo0o>QORAn0n>QOSAn0n>POUAn0l>POXAe0bM`NYa0`0dAh0fb0gNXJ"}}, {"image_id": 89, "category_id": 1, "bbox": [128.8612518310547, 333.73101806640625, 205.8957061767578, 202.56103515625], "score": 0.11743901669979095, "association_id": 0, "segmentation": {"size": [725, 525], "counts": "^nl33o\\OC5;kb00P]OV1nb0hNS]O]1jb0`NV]Oe16mMda0=V^Oj1OPNha07V^Ok10PNka07P^Ol13mMna0U3n]OkLTb0W3h]OjLXb0W3e]OjL\\b0U3d]OlL\\b0T3c]OmL]b0R3c]OnL^b0Q3b]OnLbb0n2`]OQMbb0m2^]ORMfb0j2^]OSMeb0g2e]OQM]b0l2g]ORMZb0m2g000001O001O000000O101N100O2O000O2O000O2O000O101N100O100O2N100O2N2N2N2hNe[O3]d0Jg[O3[d0Kg[O3[d0Aa[OE7h0Zd0AR\\OVOdAk0\\>UObAm0^>TO`An0^>TO`Am0`>TO_Al0a>UO]Al0Y>`NQ_Og0d2i0Y>dNQ_Od0e2h0Y>FeA:Z>HeA8Z>JdA7[>JeA6\\>fNU_Oc0_2h0]>cNX_Ob0Z2l0_>_Na_O=P2T1`>]Nk_O5d1_1b>ZNm_O4b1b1e?\\NZ@e1g?YNZ@g1f?XN[@h1Yb001O000000iKZN`Ce1`K5L4BdMo_Oa2i?a0O1O1N2O1N2M3N1O2I7O100O100O10000O100000O010000O10000O1000000000O1000O0100O100O1000000O100000000O1000000O100O10000O10000O100000000O1000000O10000O10000O100O1O100O1O100O2O0O1000O010000O100O100O100O100O100000000O100000000O10000O100O1000000O1000000O10000000000O1000000O100O100O10000O100000000O10000O100O1O10000O10000O2O00000O2O0O2O2M2O1N2O001N10001O0O2O1O0O5K`0@4M2M3N1N2O1N101O1N2N3M6J\\O2O1O10O01O1O1O1O001O001O1O1O0O2O001O1N101O1O1O1O1O1O100O001O100O001O00100O1O01O010O010O01O0010O001O10O01O010O010O1O00010O00100O01O010O000100O010O01O010O01O10O0100O100O10O0101O1OO01O100O3O0O00O10O003M9F3MUh9NnWF4L1N3N001N2O001N101N100O1O100L5N1O100O100O1O1O1O10000O10000001O00000000000000001N103M1N`0]ObnU5"}}, {"image_id": 91, "category_id": 1, "bbox": [559.3385009765625, 337.22674560546875, 23.46380615234375, 115.77325439453125], "score": 0.18683794140815735, "association_id": 0, "segmentation": {"size": [453, 640], "counts": "QUh7?\\\\g0;H5Ji0WO5M4M2N0O1iLXNU@k1f?_NT@a1l?eNn_O\\1Q`0lNg_OT1Z`0SO[_OP1e`0^OS^O\\1na0Y22O1O001O100O11O1O1O1O1O1O1O1O001O0000000000000000000000O10000000000000000001O1O1O1O1O1O2N1O2N1O1O1O1O1O1O1O1O001O1O1O2N2N2N2N2N2N3M2N1O00001O0000000000000000O1O1O1L5L3L4H8F:L4N2O1O10000O11O001O1O001O001O010O1O001O10O001O1O2VKS^O\\3Pb0`LU^O]3ma0]LY^Oa3la0SL^^Oi3Vc0F4K5K5J7I:gM[[Oe0Qnm;"}}, {"image_id": 92, "category_id": 2, "bbox": [844.280029296875, 596.2447509765625, 165.00030517578125, 37.15606689453125], "score": 0.999998927116394, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "kZmc01mg02O3N1N2O001O1O1O1O00001O010O0O101O001O0000001O0000001O01O00000001O00000001O01O00000000000001O0000000001O00000000000000000O10010O000000000000000000001O0001O000000001O10O01O001O001O1O0010O02N1O001O00100O2N001O001O2N1O001O1ORhe00mWZO1O100O1000000O100O10000000000001N1Obd:"}}, {"image_id": 92, "category_id": 2, "bbox": [611.433349609375, 577.1104125976562, 100.7381591796875, 25.82305908203125], "score": 0.9999986886978149, "association_id": 2, "segmentation": {"size": [768, 1024], "counts": "\\Ze>3mg01N1GLfXO5Yg0KgXO5Yg0LfXO4Zg0LfXO5Yg0KfXO6Zg0KeXO5[g0LdXO4[g0NcXO3]g0801O0001O0000000000100O001O001O001O001O00100O1O001O1O1O2M3NP`c00P`\\O0O100COkXO1Tg01;200000000000000001O1N2OlmZ7"}}, {"image_id": 92, "category_id": 2, "bbox": [51.47351837158203, 585.671630859375, 237.86309814453125, 72.358154296875], "score": 0.999997615814209, "association_id": 5, "segmentation": {"size": [768, 1024], "counts": "YSb12ig0OWQA1fg08J5L101O1O1O1O0100000001N4J[eVa0"}}, {"image_id": 92, "category_id": 2, "bbox": [733.1008911132812, 545.8584594726562, 129.03875732421875, 25.69244384765625], "score": 0.9999960660934448, "association_id": 1, "segmentation": {"size": [768, 1024], "counts": "ZiWa01ng01O2O1N1000001O00001O0000001O0000001O00000000000000001O0000000000001O000001O0001O000000001O000001O0001O0000000000000000001O0O100001O00001O0000001O010O0000000000001O00010O0000001O00001O0000001O00000010O00000001O00001O00001O00000000001O00001O1N10Xnk3"}}, {"image_id": 92, "category_id": 2, "bbox": [384.54119873046875, 571.9820556640625, 100.88247680664062, 30.791259765625], "score": 0.9999706745147705, "association_id": 4, "segmentation": {"size": [768, 1024], "counts": "mYT91ng02O1O000000001O0000001O000bXOKQg05lXO0Rg00nXO1Qg0OnXO2Rg0OmXO1Sg0OmXO1Sg0OmXO1Sg0OlXO2Tg0NlXO1Ug00iXO1Wg0OiXO1Wg0OiXOOYg01gXONZg02fXONZg02fXONZg03eXOM[g03dXOM]g03cXOM]g03bXON^g02bXON^g0:000001O001O00001O00000000001O00001O01O010O1O00010O001O01O02^OcXOO1;dg0M2H^XO0VmZ="}}, {"image_id": 92, "category_id": 2, "bbox": [525.0784912109375, 440.0428771972656, 51.2152099609375, 7.702056884765625], "score": 0.9999395608901978, "association_id": 3, "segmentation": {"size": [768, 1024], "counts": "imZ<2mg011O00010O01O0001O0000000000O2O00000000000000001O00000000000000000000O10000000000000000000001NVRa:"}}, {"image_id": 92, "category_id": 2, "bbox": [562.3251953125, 465.574462890625, 52.906982421875, 28.06591796875], "score": 0.9995126724243164, "association_id": 6, "segmentation": {"size": [768, 1024], "counts": "inX=2mg02O2N1N2O100O1O1N101O001N1010O1O010O00100O1O100O10O1O0O101N1O1O101N1000000001O0O2O2KaXOEeg03QQf9"}}, {"image_id": 92, "category_id": 1, "bbox": [580.1782836914062, 375.01751708984375, 86.4212646484375, 124.89053344726562], "score": 0.6729169487953186, "association_id": 6, "segmentation": {"size": [768, 1024], "counts": "Z]c=180]f0Z2mN5L4L3N2N100O1O2M3N1O1OkNZ[OQOfd0o0\\[OPOdd0h0V[O_N7i0cd0`0W[OeN213k0dd0NU[OZOO1>JJl0ed0Ma[OWO\\\\OHbc09[\\OIec0:X\\OFhc0]]OEab0;_]OF`b09a]OH^b08a]OI_b07_]OL`b05T]O8jb0Hl\\Oc0Sc0]Ok\\Of0Sc0[Ol\\Og0Sc0YOk\\Oi0Uc0WOj\\Ok0Vc0TOh\\Oo0Wc0QOg\\OR1Xc0nNg\\OT1Xc0lNh\\OT1Xc0kNh\\OV1Xc0jNg\\OX1Xc0gNh\\OZ1Xc0fNg\\O[1Yc0eNf\\O\\1Zc0cNg\\O]1Yc0cNf\\O^1Zc0aNg\\O`1Xc0`Ng\\Oa1Yc0^Nh\\Ob1Xc0]Nh\\Od1Xc0[Ni\\Oe1Wc0ZNj\\Og1Uc0YNk\\Og1Uc0XNk\\Oi1Uc0VNl\\Ok1Sc0TNn\\Ol1Rc0SNo\\On1Pc0RNP]Oo1ob0PNR]OP2nb0PNR]OP2nb0oMR]OS2mb0mMS]OS2mb0mMS]OT2lb0lMS]OV2lb0jMT]OW2kb0iMT]OY2kb0gMU]OZ2jb0fMU]O[2kb0eMU]O\\2jb0dMU]O^2jb0bMV]O_2ib0aMW]O`2hb0`MW]Oa2ib0_MW]Oa2ib0_MW]Oa2ib0_MW]Oa2ib0_MV]Oc2ib0]MW]Oc2ib0]MW]Oc2ib0]MW]Oc2ib0]MV]Od2jb0\\MV]Od2jb0\\MV]Od2jb0\\MV]Od2jb0\\MV]Od2jb0\\MV]Od2jb0\\MV]Od2jb0\\MV]Od2jb0\\MV]Od2jb0\\MV]Od2jb0\\MU]Oe2lb0ZMT]Of2lb0ZMS]Og2nb0XMQ]Oi2ob0nLh\\OF9]3ob0kLm\\OD4b3nb0iL]]OW3cb0gL^]OZ3bb0dL_]O]3ab0aLa]O_3`b0^Lb]Ob3^c00000000000000O100000000000000000000000000001O1O1O001O00001O001O1O1N3N1O3M;PMP[OY2_e0Lc0ZOff1"}}, {"image_id": 93, "category_id": 1, "bbox": [1261.6923828125, 916.9313354492188, 161.5718994140625, 131.91094970703125], "score": 1.0, "association_id": 1, "segmentation": {"size": [1536, 2048], "counts": "e_Wk11f_10_`N5]_1:``NDP_1l0C=CI7G8G8I8I6L3M3N1N3N1N2N3M2L4SNaLSgNe3eX1[MXfNP3dY1i1M2M3N2N2N2O1N2M2K6J6M3M3N2M2I8L4N1O1O10O0001M3N2N1L5A>M31O1001O00O2O001N1O2O00001O101N100O10000O2O000O1010O10O100O1O2N2N100O1O1O1O100O1O1O2N2N2M2O1O1O1O1N3N2cKggNo0ZX1kNngNR1SX1fNXhNU1iW1fNahNT1aW1jNghNo0ZW1oNlhNk0UW1UOnhNf0UW1XOnhNe0TW1ZOnhNb0UW1]OnhN=VW1AmhN;VW1DlhN7XW1HihN4\\W1LchN0bW1O_hNJhW15ZhN@QX1>UhNTOTX1j0RhNmNUX1P1ngNiNYX1S1mgNdN\\X1W1^3H4L2O0O2N100O2O0O2N2N2O1N1O2N2M4L3L4M3M2MX_V`1"}}, {"image_id": 93, "category_id": 1, "bbox": [539.6461181640625, 898.8899536132812, 114.70159912109375, 151.82440185546875], "score": 0.9999998807907104, "association_id": 4, "segmentation": {"size": [1536, 2048], "counts": "kn]i07e_1:YNJ\\bNH8i0V]1FYbNM5c0^]1[1N3J6K6I6L3N4L7I3O2M7I1O1O010O0001O0001OYOQdN\\MQ\\1a2RdN^Mo[1`2TdN^Mm[1P2kcNmM<2k[1o1ddNoM^[1P2bdNPN`[1n1`dNRNa[1n1^dNRNc[1m1]dNRNe[1m1[dNSNf[1l1ZdNTNg[1j1ZdNUNh[1j1XdNVNk[1i1SdNWNP\\1g1ocNXNW\\1e1fcN[N^\\1c1acN]N_\\1c1acN\\N_\\1e1bcNYN^\\1i1bcNUN^\\1l1ecNPNY\\1T2f04H9L7K1O00O0101N3M2N3N2N2N2M3N1O1O2N1O010O010O010000O100O2N1O1O0010001N2N2N1O2N101N101N1O9XMhbNV2g]1J4L2N101N5K2N1O1O2N1O2N2N1N2N3M3M3M3L^_14K6J6L3M4L3N2N3M2N2000000O10000000000000000000000000000002N2N2N3L4M4K4M4K5L2M2O2HbVZ="}}, {"image_id": 94, "category_id": 1, "bbox": [521.681640625, 51.67573547363281, 572.0240478515625, 785.1101684570312], "score": 1.0, "association_id": 1, "segmentation": {"size": [855, 1280], "counts": "]Th>:Uj09F:K5N2N2N2N2O00001O0000010O00001O0001O01O000010O0000010O100O2O000O10000000O101O0O2O0O100O010O1O010O1O00100O1O00100O1O1]^O6W8LhFZ1R9fNjFc1P9^NkFk1P9WNlFo1P9SNkFS2R9nMkFV2T9kMhFX2W9kMdFY2Z9iMcFY2[9kM`FY2^9jM]FY2b9jMYFZ2e9jMTF[2i9jMPF[2n9jMjE[2T:lMaEZ2\\:QNWEU2f:WNiDQ2T;ZN]Dm1_;^NnCm1P<]NTBW3j=l4N3N1O1N2O1O1N2O0O2N1O2N1O2M2O2M3N1N3M3N1O2N2N2N2N2N2N2N1O2N1O1O1N2N3M2N2M3L4L4L5K4N2M3M3N2N3N1N2O1N2O0O2N2O1N2M3N1O2M3M3M3N1O2N2O1N2O1O001O00001N100O2O0O1O2M2N3M2O2N1O2N2N101N101O0O101N1N2O1M3N2M2N3L4L300000010O10O1000O101O0O10O01N2O1M2O2N1O1O100O01000001O01O1O001O000O1O1N1O1UOl0L4N2N2N3N1O2O1N200O1001O00001O001N101N1O2N101N101O1O001O10O01O10000000000O100000O1000000000O1000000000000O1O100O1O1O1O1O1N2O1N2N2O1N2O1O1O1O1O1O100O10000O10000O101O0O10000O10000O10000O101N1O2N2N2N2M3M3N2M3M4L4M3M3M2N3M2N2N2O1N2O2M2O1O2M2O2M3N3L3N3L3N2M3N2M3M2O1N2N2N2N3M2N2M4M3M3M5K6J5K6J6K5J3M3N1N3N1N2O1N2O1O1O001O1O2N1O1O2N1N3N2N2N2N2N1O2N1O1O1O1O001O001O001O1O001O1O001O1N2O001O1O1O1O1O1O1O2N1O1N3N1O1O1O001N2O1O001O001N101O001N1O1O1O1O1O1O1N2O1N2N2O1O1O1O1O1O1O1O100O2N1O2N1O2N2N2M2N3M3M3K5J7J5ZIR@^2R`0_MZ@S2l?iMW@T2l?iMW@S2m?kMU@R2o?jMT@S2o?kMS@R2P`0lMR@Q2Q`0lMR@Q2Q`0lMS@P2Q`0mMQ@P2R`0mMQ@o1T`0mMP@o1T`0lMP@P2U`0lMo_Oo1V`0lMo_Oo1V`0kMP@o1W`0jMo_Ol1^`0kMh_Ol1g`0iM__Ol1Pa0iMY_Ok1Ta0jMW_Ol1Qe0F;G9F=D;E]_1:B;E;E:ROZNXcNo1Z\\1R1J7L3M4L5M3L5L4L3L6jeNYLiW1o3hgN^LRX1i3agNbLZX1f5L4L2N3M1000000O1O2N1N2N2N2N2O2M2O2L4J6K6K5J6J6K5K5K6K5K5L3N2N:FT1lN2N1O000O1000000000O1O1N2L4J6H8I7J6M3O2N100O1001O1O1O01001O01O2O1N3M3L3N2M4L4L3M2N1O2N2M4\\NaiN_IdV1T4XiN^Lj0POUV1\\4PjN[K?OfU1b4SlNWKRT1e4h3G9I8I6J5K5G9F;I6J8A?E:I8DfNY1^Ob0H8L5J6H9I7I6L3M4L4L4L5K6I7J5L3M5J9Gl0TOj0VOc0nNebhf1"}}, {"image_id": 95, "category_id": 1, "bbox": [1285.3179931640625, 881.1209716796875, 67.9019775390625, 180.982421875], "score": 0.9999998807907104, "association_id": 0, "segmentation": {"size": [1536, 2048], "counts": "Vnel1`0V_1>G8C=DE;E9G8H6K4L3N2N2O00000000001OO10000O10000O1O100O1O1O1O11O0000001OO1O1M3N2N2M3N2L4G9F:I7K5M4M3M3K6K5K7J4M4L6K9F9H3L3M3M3L5J5K6K4M2VNPiNaJRW1W5_iN]JdV1Y4QkNXKRU1R4UlNZKoS1]4o3L4N3L4M5J4M3L4N1O3M3M4L2M3N3K5L6J9G6J7I8H7I7H7I8H8CQRY^1"}}, {"image_id": 95, "category_id": 1, "bbox": [154.07652282714844, 849.5879516601562, 161.33473205566406, 441.05767822265625], "score": 0.9999997615814209, "association_id": 2, "segmentation": {"size": [1536, 2048], "counts": "cn]7;__1?@:J5K5L3M3L4L4M3M3O2M2O2M2O1N2N2M2N3M3L3O2N3N2mdNSMnX1Q3TfNoMgY1Y2geNTNUZ1n3N2N3M4L3L4M2N3L5L5J6K5J4K6J8HT1kNc0^O:F7I7H:dNa2`N=D5L3L4M2O2M2O101N10000O100000000000000000000000000000000000000001O0000001O1O1N2O1O2N2N2N3M2M3N2M=Cg0YO3L3M3M3M3M3L3M4L3M4M2M3SMPlNfIUT1l5olNPI^S1k6n2M4K4L5J5K6K5M2M4SMffNmN`Y1j0YgN]NPY1^1]gNSNjX1i1_gNlMfX1T2d2N2O0O2O001O001O001O1O1O1O2N3M2M3N2N3L5L5J4L4K6Ia0VOiQ^a2"}}, {"image_id": 95, "category_id": 1, "bbox": [406.450439453125, 835.9827880859375, 169.2236328125, 391.378173828125], "score": 0.9999997615814209, "association_id": 1, "segmentation": {"size": [1536, 2048], "counts": "Y]Yc0c0R_1=K5L4M2N2O1M4M2N3L3M4M2N3M2O2M3N3L6K;ET1SeNbLPW1d3ghNaLWW1b3chNcLZW1a3`hNbL`W1b3XhNcLgW1c3ogNaLQX1e3cgNaL]X1b5N1O1O2M2N2N3N1O2O1N2O1N2O1O2N3L4M;[hNmHgU1P9E4M1M3N2L3N3N1O2O0O10000O100O100O100O1O1O1M3N2O1N200N2O1O1N2M3O1N1000O2N1O1O0100O1N20000010O001O1O10O010000O10000000000001OO1O1O1O1N2O1O1N2N2K5H8_Oa0K5J6J6J6H8I7K5G9^Ob0_Oa0F:M3N2N2N2O1M3N2N3N1O2N1O2iJgfNe3ZY1QLUgNh3mX1TL\\gNe3hX1UL_gNe3jX1PL^gNj3aZ1I6J5L4K5K6EG\\kNbNfT1X1lkNZNVT1_1YlNWNiS1`1`lN^NaS1Y1hlNeN\\S1@ohNEZ4h0mR1mNonNm0[X1FH3M7J1O1O0O101O00000O1O1000000O1000000O100000000000000001O00001O002N2N1N2O1N3M4L3ITgi2"}}, {"image_id": 96, "category_id": 1, "bbox": [183.3777618408203, 55.19865417480469, 33.786407470703125, 25.323654174804688], "score": 0.9999960660934448, "association_id": 3, "segmentation": {"size": [400, 431], "counts": "cZX25U<:K3M2N2N1O10000O100000001O00000001O0O101O001O1O0O2N2N2N2MSZd2"}}, {"image_id": 96, "category_id": 1, "bbox": [59.407405853271484, 145.02923583984375, 68.08714294433594, 60.00823974609375], "score": 0.9999862909317017, "association_id": 0, "segmentation": {"size": [400, 431], "counts": "cVg07V<6L3L3N2M3N2M3N2N2N2N2O001O1N2O1N2O1O1O1O1O1O1O1O001O001O00001O000001O00001O000000001O001O00001O00001O0000001N101N1O2K5N2N2N2K6I6L8ClC0b[g3"}}, {"image_id": 96, "category_id": 2, "bbox": [194.17991638183594, 137.66334533691406, 22.303314208984375, 11.6695556640625], "score": 0.9999661445617676, "association_id": 5, "segmentation": {"size": [400, 431], "counts": "mk]233OR<900000O1000000O100O100O101N1O3MTkc2"}}, {"image_id": 96, "category_id": 1, "bbox": [309.12115478515625, 64.66596984863281, 31.870849609375, 30.177047729492188], "score": 0.9999611377716064, "association_id": 0, "segmentation": {"size": [400, 431], "counts": "iZj37V<6K4M2N3M100000O10000001O1O00000001O001N101N2N2O1M4KZ_S1"}}, {"image_id": 96, "category_id": 1, "bbox": [74.57259368896484, 62.250816345214844, 34.84037780761719, 25.355545043945312], "score": 0.9999476671218872, "association_id": 0, "segmentation": {"size": [400, 431], "counts": "[hm04Z<6G7L2O2N1O2O0O101O0000000000000000000000000001O0O2O1O1N2N3M3L6FhC0QSn3"}}, {"image_id": 96, "category_id": 1, "bbox": [157.2089080810547, 28.027971267700195, 35.937652587890625, 36.0980224609375], "score": 0.9999344348907471, "association_id": 0, "segmentation": {"size": [400, 431], "counts": "i[m1=R<2N2N3N2M2M3N100O101O0000000000O01O1O1O01O1O100O1O010N2K5O2N0O2N3I6L5MTnl2"}}, {"image_id": 96, "category_id": 1, "bbox": [124.22957611083984, 73.66885375976562, 55.21373748779297, 51.39149475097656], "score": 0.9999310970306396, "association_id": 0, "segmentation": {"size": [400, 431], "counts": "```1?o;3N2N2N2N2O1O1O1O001O1O2N3M2N1O3M1O1O1O1O001O0001O001O1O001O001O001O1O1O1L3N2O2N1O2O1O1N2O2M2N2M5GgYT3"}}, {"image_id": 96, "category_id": 1, "bbox": [399.5053405761719, 97.86788177490234, 31.494659423828125, 33.063270568847656], "score": 0.999875545501709, "association_id": 0, "segmentation": {"size": [400, 431], "counts": "a[l45V<9I6K3N2N1O2N1O2O0000001O00000000001O00000000000001N102M3M6GhL"}}, {"image_id": 96, "category_id": 2, "bbox": [330.0085754394531, 117.26908874511719, 20.82159423828125, 9.328475952148438], "score": 0.9998277425765991, "association_id": 8, "segmentation": {"size": [400, 431], "counts": "kbR43Z<3O1O1000000000O10001O0O1O2NYmo0"}}, {"image_id": 96, "category_id": 1, "bbox": [352.28564453125, 60.35091781616211, 32.60382080078125, 36.104312896728516], "score": 0.9997925162315369, "association_id": 7, "segmentation": {"size": [400, 431], "counts": "`bY44Y<7J3N2M3M4K4N2L3N2O100000000000000000000000O100O1O1O1\\OeD2\\;KiD2X;Ki0MUfb0"}}, {"image_id": 96, "category_id": 2, "bbox": [202.4305877685547, 75.20559692382812, 23.690185546875, 7.5879669189453125], "score": 0.9963496923446655, "association_id": 3, "segmentation": {"size": [400, 431], "counts": "`a`21_<1O0O1O1O100O100000O100000001N100O10c\\`2"}}, {"image_id": 96, "category_id": 2, "bbox": [301.99542236328125, 161.7443389892578, 24.73974609375, 13.6746826171875], "score": 0.9944895505905151, "association_id": 6, "segmentation": {"size": [400, 431], "counts": "^fg31]<2O0O2M3N2N20000000O100O10000O1O101N2N]kX1"}}, {"image_id": 96, "category_id": 2, "bbox": [361.6542663574219, 75.8857650756836, 26.09454345703125, 19.308639526367188], "score": 0.7865585684776306, "association_id": 7, "segmentation": {"size": [400, 431], "counts": "mnb42]<1O1O1O10000001O0O2OUSa0"}}, {"image_id": 96, "category_id": 2, "bbox": [142.03834533691406, 185.83119201660156, 71.81655883789062, 29.438201904296875], "score": 0.3332970440387726, "association_id": 0, "segmentation": {"size": [400, 431], "counts": "dgU22]<10O01O1O00100N200N1O2O1J501O1O0100O2O0O10000O2O0O10000O1O100O100O101N_bd2"}}, {"image_id": 96, "category_id": 1, "bbox": [353.87567138671875, 50.58484649658203, 31.45501708984375, 32.69189453125], "score": 0.22642850875854492, "association_id": 0, "segmentation": {"size": [400, 431], "counts": "[[Z48W<1N2N2M3G9L4O1N200000000000000000000000000001O001CdDD^;8gDEZ;8iDFZ;6gfb0"}}, {"image_id": 96, "category_id": 2, "bbox": [289.1419677734375, 158.3328399658203, 34.92449951171875, 17.924835205078125], "score": 0.1668722778558731, "association_id": 0, "segmentation": {"size": [400, 431], "counts": "^fg31]<2O1M2N3O1O1O1000O10000O10000O1O2O]dY1"}}, {"image_id": 96, "category_id": 2, "bbox": [376.31768798828125, 68.65253448486328, 14.0845947265625, 6.9476776123046875], "score": 0.16643327474594116, "association_id": 0, "segmentation": {"size": [400, 431], "counts": "gSd43]<0O1O101O0000000001N[n?"}}, {"image_id": 96, "category_id": 2, "bbox": [370.2494812011719, 83.42232513427734, 18.06378173828125, 12.288955688476562], "score": 0.16511698067188263, "association_id": 0, "segmentation": {"size": [400, 431], "counts": "^bb41^<100N2O2N10O10001O0O2O0Off`0"}}, {"image_id": 96, "category_id": 2, "bbox": [320.8762512207031, 83.79053497314453, 24.2779541015625, 8.135406494140625], "score": 0.09971107542514801, "association_id": 0, "segmentation": {"size": [400, 431], "counts": "hhQ42^<00O01O100O01000000O10klQ1"}}, {"image_id": 97, "category_id": 1, "bbox": [0.0, 388.02471923828125, 713.4043579101562, 400.16876220703125], "score": 1.0, "association_id": 2, "segmentation": {"size": [1617, 2048], "counts": "ba0i5X\\1Z1PO>C6L4L4M2N3M2O2O0O1O2O0O1O1O100O1O1O1N2O1O1L4M3M4M2M3O1O100O100O100O100O10000O10000O10000O100O100O10000O1O100O100O1O100O100O100O100O100O100O1O100O100O100O100O1O100O100O1O100O1O100O100O1O1O1O100O1O1O1O1N2N2N2N2O1N2O1O1O1O1O1O1O1O1O1O100O1O1O1O1O1O1O1O1O100O100O100O10000O10000O1000000O100000000O100000000O100000000O100000000O1000000O10O0100O100O100O100O01000O10000O0100000O1000O1000000O1000O0100O100O1O100O1O100O1O100O1O100O100O100O1O100O1O0O2M3N2M3M3N2M3N2M3M3M3O100O1O010O100O10000O100O10O10O1O100O1O001O1O1O1N2O001N2O1O001O100O0010O01O010O1O010O00100O10O0100O00100O100O010O100O100O100O1O100O100O100O010O100O100O100O100O100O100O100O100O100O100O1O100O100O10000O100O10000O10000O10000O10000O10000O100O100O1O100O1N2O1O1O1O1O1O1O1O1O100O1O1O100O100O100O10000O100O100O10000O10000O10000O10000O1000000O10000O1000000O10000O100O10000O100O100O10000O100O1000000O10000O10000O1000000O1000000O100000000O10000000000O10000000000O10000000000O100000000000000O10000000000000000000000000000000000000000000000000000O10000000000000000000000O10000000000000000000000O100000000000000O1000000000000O100000000000000O1000000O10000O10000O2O0O100O100O1O1O1O1O1N2O1O1O1O1O1O1O1O1O2O0O100O100O1O100O2O0O1O100O100O2N100O1O100O2N100O1O1O101N1O1O1O1O2N1O1N2O2N1O1O1O1O2N1O100O101N100O1O2O0O1O1O2N1O1N2O1N3N1N2O1O1N3N1O1N2O1O2N1N2O1O1O2N1O1O2N1N2O2M2N3M2N3M3M2M4M3L4M3M2N3L4L3M4M3M2N3N1O2M3N2M3M3M3M5C=E;I7HQUSS2"}}, {"image_id": 97, "category_id": 2, "bbox": [9.470832824707031, 808.9403686523438, 233.78012084960938, 134.349609375], "score": 0.9999998807907104, "association_id": 2, "segmentation": {"size": [1617, 2048], "counts": "mQ?43X1S`1]1^O6M2N2O00000000001O000000O1000000O101O000O100000000O100000001O000000000O1000001O000000000000000000000000000000000000000000000O10000O10000O1000O100000O10O1000000000000O1000000000000O0100000O10000O01000O100000O010000O0100000O100O00100O10000O100O100O100O01000O100000000O10O10O100O0100O0100000O10O100000000O10O01000O010O1000O010000000O100000O10O10000O10O10O10O1000000O10O100000O10000000000O10000000001N10000O10000O2O000O3N1O1O1N2O2N3L5Lc0\\O:F4L4M3L3N2M3M8G4^OV^N6Vb1KnYYi2"}}, {"image_id": 97, "category_id": 1, "bbox": [98.68263244628906, 264.6192932128906, 1786.0738525390625, 1046.092529296875], "score": 0.9999997615814209, "association_id": 1, "segmentation": {"size": [1617, 2048], "counts": "P]m71]b15K5K4L5K4L5K5L3L5L4K5L3M4L4N2M3M3N2M3N2M3M4M2M4M2M4M2M3N2N2M3N2M3N2M3N2N2M3N1N2O1N2O2N1N2O2M2O2M2O2M2O2N2M3N2M3N2M3N2M4M3L6K5J6K5J6K6I6K4K4L4M3L4M3L4M3L3N3L3M4M2M6K5J6K5J5K6K4K5K3M4M2M3M3M3N2M3N2M3N2M3N2N2M3N2N3L3N1N2O2N1N3N1N3N1O2M3N2M3N2N2M3N2M4M2M4M3M2M3N2M4M2M3N1N3N2M3N1O2M3N1N3N1N2O2M2O1N2O2M101N2O0O2O1N1O2O0O2O0O2O001N10001N10001O001N10001O0O2O00001O0O2O001O0O2O00001N101O001N101O001N101O001N101O0O2O1O001N101O001N2O001N101O1O0O2O1O0O2O1O0O2O1O00001O0O2O00001O001O0O101O00001O0O2O00001O001O0O101O001O00001N101O00001O001N10001O001O001O0O101O001O00001N101O00001O001O0O101O0000000000000000001N10000000000000000000000O10001O000000000000000O100000000000001O000O1000000000000000000O100000001O0000000O10000O2O0O101N10001N100O2N100O2O0O2N100O2O0O1O2O0O2N100O2N100O101N1O101N1O101N1O100O2N100O1O2O0O1O1O2O0O1O101N1O100O2N1O100O1O2O0O1O100O1O2N1N2N2M3M3M3N3L3WN]\\OaTOfc0^k0`\\OZTOcc0ek0d\\ORTO_c0mk0g\\OlSO[c0Sl0l\\OdSOWc0[l0Q]O[SOSc0cl0^1O1O1O1O1O1O2N1O1O1N2O1O1XNoYOnVOTf0Pi0QZOkVOPf0Ui0TZOfVOme0Yi0XZOaVOje0^i0ZZO^VOge0bi0]ZOXVOee0gi0_ZOTVOde0ki0_ZOQVObe0ni0bZOmUO`e0Rj0cZOjUO_e0Vj0^1O100O2O0O100O100O2O000O100O10001N10000O100O2O000O2O0O2O0O101N101N100O2O0O2N101N1O2O0O2N1O2O0O2N2N1O2N1O2N2N101N1O2N2O0O2N101N1O2O0O2O0O2O0O101N101O0O101N101O0O101O0O101O0O101O0O101N10000O2O000O2O0O100O2O0O101N100O2O0O101N1O101N1O101N1O2N100O2N1O1O2N100O2N1O2O0O1O2O0O2O0O2O0O101N101N101N101O0O101N101O001O000O2O001O00001N101O00001O0O101O00001O0O101O00001O0O10001O000O101O00001O0O10001O00000O101O0000001O0O1000001O000O101O00000O101O00000O101O000O101O000O101O000O2O000O101O000O2O000O2O000O2O0O101O0O2O0O101O0O2O0O2O0O101N101O0O2O0O2O001N101O0O2O000O2O00001O0O100000001O0O1000000000001O0O1000000000001O0O100000000000001N10000000000000000O2O00000000000000000O2O0000000000000000000O2O0000000001O000O1000000000000000000000000000000000000000000000001O000000000O1000000000000000000000000000000000001O00000000000000000O100000000000O10O100000000000000O1000000000000O10000000O1000O10000000000O10000000000O100000000O10000000O0100000000O100000000O10000O10000O10000O10000O1000000O101O0O1000000O10000O1000000O1000000O1000000O1000000O100000000O10001O000O100000000O100000000O100000000000000001O0000000000000000001O00000000000000001O00000000000000001O000000000000001O000000000000001O000000000000001O00000000001O00001O010O001O1O010O001O10O01O001O10O01O010O001O010O00010O001O01O01O01O010O00010O0010O0001O010O001O010O000010O01O00010O00001O000000001O0000000000001O00000000001O0000000000001O000000000000001O000000000000001O00000000000000001O00000000000000001O000000000000000O10000O101N10000O100O100O100O100O100O1O100O1O2N100O1O1N2J6K5J6J6J6J6N2N2O1O1N2O1O2N1O1O1O100O1O1O1O100O1O100O1O100O100O100O101N100O100O1O100O1O100O1O1O1O100O1O1O1N2M3M3M3L4M3L4L4L4L4K5H8I7H8I7I8N1O1N2O1O1O1O1O1O1O1O1O1O100O1O1O100O1O100O100O100O100O100O101N100O100O100O1O100O1O1O100O2N1O1O1O1O1N2N2O1N2O1N2N3N1N2O1N2N2O1N2O1N2O1N2N3N1N2O1N200O1O1O100O2N100O100O1O100O10001N100O10001N10000O2O000O2O000O2O001N10001N101N10001N101N101O0O2O0O2O1N101N101N101N2O0O101N101N101N1O2O0O101N1O101N1O101N1O101N100O2O0O101N100O2O0O2O000O2O0O2O001N101N101O1N101N101O1N101N2O1O0O2O1O1N2O1N2O1O1N2O2N1N2O1O1N3N1O1N2O001N2O1O1N2O001N2O1O0O2O001N2O001N101O1N101N2O0O2N2O1N101N2N2O1N2N2N3M3L5L3L5L4K4M4K5L4K6K4K6K6I:F9H8G9G7I3N2M3M4L3N2O1N1O2N2N2O1N1O2O1N2O0O2O0O2O1N101N101N101O0O2O001N101N101O0O2O0O2O1O1N101N2O1N101N2N2O1N3N1N3M3N2M2N3M2N3N1N3M2N3M2N2N3L3N2N3L3N2N2N3M2N2N2N2N2N2N1O2N2N101N2N101N1O2O0O2O0O2O0O2N101N1O2O0O2N2O0O2N1O2N2N1O2N2N1N3M3N2M3M2N3M3M3M3M3M3M3L4M3M3L4M4K4M4L3M4L4L3M3M4M2M4L3N2M3N2N3L3N2N2N2M3N2N2N2N1O2M3N2N2M3N2M2O2M3M3N3L3M4L3M4L4L3M4K5L4K5K5J6J6J7I6I8H8Hjh[8"}}, {"image_id": 97, "category_id": 2, "bbox": [417.7973327636719, 903.4050903320312, 1630.20263671875, 670.9420776367188], "score": 0.9999996423721313, "association_id": 1, "segmentation": {"size": [1617, 2048], "counts": "kmgi02]b13M3L4M3M3L4M3L4L4M3N2O2M2N2N2N2O1N2N2O1N2O1N101N101N100O2O0O100O2O000O2O0O10001N1000010O0000001O0001O01O00000010O000001O00001O01O01O00001O000010O0001O00001O001O01O01O001O001O001O0010O01O001O001O1O001O001O010O001O1O001O1O001O1O1O001O100O1O1O1O1O1O1O1O1O2N1O1O1O100O1O1O1O001O1O1O1O1O1O010O1O1O1O001O1O001O1O1O00100O001O00100O00100O00100O1O10O01O100O100O100O100O2N100O100O00100O1O100O001O100O00100O1O00100O001O010O1O001O010O001O1O010O001O001O001O0010O01O001O001O001O0010O01O001O001O001O010O001O001O001O0010O01O001O001O001O010O00001O001O00010O00001O000010O000010O01O01O01O0010O01O0010O01O0010O00010O01O00010O000010O0001O01O01O0001O01O0001O01O0000010O000001O01O0001O0000010O000010O0001O010O0010O0001O010O01O01O010O01O010O001O010O0010O01O0010O01O000010O0001O00010O00001O01O0001O00000010O000000001O000000001O0000001O0000010O00001O00001O00001O001O00001O001O001O010O001O1O001O00001O001O00001O00001O01O01O00001O000O101O00001O00001O00001O00001O001O00001O001N101O1O001O001O1O001O1O001O1O001O001O001O001O0O101O00001O00001O00001O00000O1000001O0O1000001O000O1000001O0O1000001N1000000O2O000O10001O0O10001N10000O2O0O10001N10000O2O000O101O0O101O00001N10001O00001O0O2O001O00001O001N10001O00001O00000O2O00001O0000001O0O10001O000000001O000O10001O00000000001O000O1000010O000000010O0001O01O0001O01O01O01O01O0010O00010O010O01O010O010O2O0O2O0O100O2N100O100O1O2O0O1O100O1O10O01O0010O01O000010O0001O001O00001O0010O0001O001O00001O001O010O001O001O001O001O0010O01O001O001O1O001O00100O001O001O001O00001O01O01O000000001O00000001O0001O00000000000010O000000000001O000001O00000001O00000001O0001O0000000000010O000000000000010O00000000O10000O100O10000O100O100O100O100O100O10O01O100O1O1O1O100O1O1O100O1O100O100O100O100O100O100O10000O100O10000O10000O1000O0100O100O100O100O100O100O001N2N2O1N2N2N2M3N2M3N2K5G9G8TOm0K5K5K5K5M3M3N2M3N2N2N2N2O1N1O2O1O1O1O100O100O1O100O100O1000O0100O1O100O100O1O010O1O1O100O1O1O001O1O1N2N2L4L4L4K4L5K5K5L4K5L4N200O00100O100O1O10000O010O100O10000O1000O01000000O10000O10O10O10000O100O100O010O100O100O1O10O01O1O1N2L4N2M3M2N3M3M3O1O1O010O1O100O10O010000O100O01000O1000O01000000O0100000O10000O10000O10000O10O0100O100O100O100O1O100O1O1O1O1O1O001O100O1O100O1O100O100O1O10000O100O10O010000O10000O10000O1000O010000O10O0100O100O10O01O100O1O1O001O1O1O1O1O001O1O1O1N2O001O1O1O1O1O1O00100O1O100O10O0100O100O1000O010000O10000O01000O10O1000O1000O0100O01000O10O10O10O0100O010O10O010O010O0100O0010O01O0010O01O10O01O10O0100O010O10O0100O10O0100O010O10O0100O010O010O10O01O01O010O01O0010O001O01O01O001O001O001O001O010O001O010O1O010O010O10O010O0100O01000O010O1000O010000O100O10O0100O100O100O0O2O1O1O1N2O0O2O1N2N2N2N1O2N2M3L4M2N3M3N2M2O2N2O1O100O00100O1O100O10O0100O100O100O01000O101N10000O101N100O100O101N100O1O2N100O2N1O1N3N1N2O2M2N2O2M2O1N3M2O1N3M2O1O2O0O1O2O0O101N100O101N100O2O0O101O0O10001N10000O10000O100O2O000O100O100O100O1O2O0O1O100O1O1O1N3N1N2O1N2N2O1N3N1N2O1O1N2O2M2O1O100O2N100O1O101N100O101N100O101N101O0O2O000O101N100O2O0O100O2O0O1O2O0O1O2O0O1O2N1O2N1N2N3N1N2O2N1N3N1N3N1N2O2N1N3N1O2M2O2N1O2N1O2N1O2N1O2N2N1O2N1O2N2O1N3M4L3M3M4L4K4L5K5J7J6I7J7H7Ic0]O`0_O8G9G9G:F9Dc0^Oe0UOc1iMce3"}}, {"image_id": 97, "category_id": 1, "bbox": [410.30401611328125, 1194.7232666015625, 51.71490478515625, 53.6697998046875], "score": 0.7329941987991333, "association_id": 0, "segmentation": {"size": [1617, 2048], "counts": "acXd0:Rb19K3L2O2N3M2O1N2O2N001O1O1O1O001O1O1O1O1O1O2N2N1O1O1O000000000001O001O2N5K1O1O2lNR_Na0`a1O3M3M3M2N2N1N2O0O1Me]N0e\\Z^2"}}, {"image_id": 97, "category_id": 1, "bbox": [228.8681640625, 479.2129821777344, 1074.6639404296875, 919.6820068359375], "score": 0.529293417930603, "association_id": 0, "segmentation": {"size": [1617, 2048], "counts": "Zmc;;]`1R2C=C;E=De0ZOa0@6J6J5L5J5L4M3L4M3M4K4M4L3MV1jN5K5K5K5K6J6J7I7I8H7I7I7I4M2M4L3M4M2M3M3M3N2M2N3N2M2N3M2O1N2N2O1N2N2O0O2N2N2O0O2N2N2O1N1O2N2N2N2O0O2N2N2N2N1O2N2N2N2O0O2N2N2N2N101N2O1N2O0O2O1O001N2O001O0O2O1O001O0O2O001O00001N101O001O0O101O00001O0O101O00001O0O101O00001O00001O000O2O001O001O001O001O0O2O001O001O1O1O001N2O1O002N1O1O1O001N2O1O1O000000001O00000000001O00000000001O00000000001O000000001O0000001O000000001O0O101O001N2O001O0O2O1O0O2O001N2O001N2O0O2O1O0O2O1N101N2O0O3N1N2O1N2N2O1N1O2O1N2O0O100O101N100O10000O100O101N100O10000O100O10000O100O10001N10000O10000O10000O1O100O1O1O100O1O1O1O1O100O1O1O1N101O1O1O1O1O1O100O1O1O100O1O100O1O100O1O100O100000001N1000000000000O101O0000000O1000000000001N1000000000000O1000001O00000O100O100O100O2O0O100O100O100O2O0O100O1O100O101N1O100O1L4L4L4L5K4L4L4L4O1O1O2N1O1O2N1O1O2N1N2O2M2N2M4M2M4K4L4J7J5L5K4M4L3N3M2N3M3N101O0O2O001N101O0O2O001N101O000O2O00001N10001O0O101O000O2O00001O0O10001O000O101O00000O2O0000001O000O1000001O00000000000O10001O000000000000001O000O10000000001O000000000000001O0O10000001O0001O000000000000001O000000000000001O0000000000001O0000000000001O0001O01O001O001O001O1O001O1O1O001O001O1O001O001OT[OlUO[a0Tj0`^ORVO_a0ni0]^OWVOca0hi0Y^O\\VOga0di0U^OaVOka0^i0R^OfVOma0Zi0P^OjVOPb0Ui0m]OoVORb0Qi0k]ORWOUb0nh0k]OSWOUb0lh0j]OVWOUb0jh0k]OVWOUb0jh0j]OXWOVb0gh0j]OZWOUb0fh0j]O[WOVb0eh0j]O\\WOUb0dh0j]O^WOVb0ah0j]O_WOVb0ah0j]O_WOVb0ah0j]O^WOWb0bh0i]O^WOWb0bh0i]O^WOWb0bh0i]O^WOWb0bh0h]O_WOYb0`h0g]O`WOYb0`h0g]O`WOYb0`h0g]O`WOYb0`h0g]O`WOYb0`h0g]O`WOYb0`h0f]O`WO[b0`h0e]O`WO[b0`h0e]O`WO[b0ah0d]O_WO]b0`h0c]O`WO]b0`h0c]O`WO]b0`h0b]OaWO^b0_h0b]OaWO^b0_h0b]OaWO^b0_h0b]OaWO^b0_h0b]OaWO^b0_h0a]OaWO`b0_h0`]OaWO`b0_h0`]OaWOab0^h0_]ObWOab0^h0^]OcWObb0]h0^]OcWObb0^h0]]ObWOcb0^h0]]ObWOcb0^h0\\]OcWOdb0]h0\\]OcWOdb0]h0\\]OcWOdb0]h0[]OdWOeb0\\h0[]OcWOfb0]h0Z]OcWOgb0\\h0X]OeWOhb0[h0X]OeWOhb0[h0W]OgWOhb0Yh0X]OgWOhb0Zh0V]OgWOjb0Yh0V]OgWOjb0Yh0U]OiWOkb0Vh0T]OkWOlb0Uh0T]OkWOlb0Uh0S]OmWOlb0Sh0T]OmWOlb0Sh0S]OnWOnb0Qh0R]OoWOnb0Qh0Q]OQXOnb0Ph0Q]OPXOob0Ph0P]OQXOPc0og0o\\OSXOQc0lg0o\\OTXOQc0lg0n\\OUXORc0kg0n\\OUXORc0kg0n\\OVXOQc0jg0n\\OWXOSc0ig0l\\OWXOTc0ig0k\\OXXOUc0hg0k\\OYXOTc0gg0k\\OZXOVc0eg0j\\O[XOVc0eg0i\\O\\XOWc0dg0i\\O]XOVc0cg0i\\O^XOXc0ag0h\\O_XOXc0bg0g\\O_XOXc0ag0g\\O`XOYc0`g0g\\O`XOZc0_g0e\\ObXO[c0^g0e\\OcXOZc0]g0f\\OcXO[c0\\g0d\\OeXO\\c0\\g0c\\OdXO]c0\\g0b\\OfXO^c0Yg0c\\OeXO^c0Zg0d\\OeXO]c0Zg0d\\OdXO]c0\\g0d\\OcXO]c0\\g0d\\ObXO]c0^g0d\\OaXO]c0^g0d\\OaXO]c0^g0d\\O`XO]c0`g0d\\O_XO]c0`g0d\\O^XO^c0ag0c\\O^XO]c0bg0d\\O\\XO^c0bg0d\\O]XO]c0bg0d\\O\\XO^c0cg0c\\O\\XO]c0dg0d\\OZXO^c0eg0c\\OYXO_c0fg0b\\OYXO^c0gg0c\\OWXO_c0hg0b\\OWXO_c0hg0b\\OVXO_c0jg0c\\OSXO_c0lg0b\\OSXO^c0mg0c\\OQXO_c0mg0c\\OQXO^c0og0c\\OPXO^c0og0d\\OnWO]c0Rh0d\\OlWO]c0Th0e\\OiWO]c0Vh0k\\ObWOUc0^h0S]OYWOob0fh0Y]OQWOhb0oh0]301O00001N100000000000000000010O00000000000000000000000000T_OlVO[8Ti0dGmVO\\8Si0cGoVO\\8Qi0dGPWO[8Pi0dGRWO[8nh0cBlVOe17h;mh0bBnVOd17i;kh0bBoVOe17h;jh0bBPWOe18h;hh0bBQWOe18i;gh0aBRWOe19j;dh0`BTWOf19i;ch0`BVWOe19j;ah0`BWWOe19k;`h0_BXWOf19j;_h0_BYWOf1:j;]h0^B[WOg1:j;[h0^B]WOf19k;[h0]B^WOg19k;Yh0\\B`WOh19k;Wh0[BbWOi18l;Wh0XBdWOj17m;Uh0WBfWOj18n;Rh0VBhWOk17o;Qh0TBkWOk16o;Ph0SBmWOl16PR`0cg0SBRXO9h1c=Vf0SBSXO8i1e=Uf0RBRXO7l1f=Rf0SBSXO4n1h=oe0SBTXO3o1i=ne0TBTXOOR2l=je0TBUXONS2n=he0TBVXOJV2Q>ee0TBUXOG[2T>`e0TBWXOD\\2W>^e0UBWXO@_2Z>Ze0VBWXO^Oa2\\>Xe0UBYXO[Oc2_>Ue0UBXXOZOe2a>Se0UBYXOWOg2b>Qe0VBZXOUOg2e>od0VB[XOROi2g>ld0WB[XOPOk2i>kd0UB\\XOPOk2j>id0VB]XOmNl2l>hd0WB]XOkNm2m>fd0WB_XOjNl2o>ed0WB`XOhNm2P?dd0WB`XOhNm2o>dd0XB`XOiNl2o>dd0XBaXOgNm2o>cd0ZBaXOfNm2o>bd0[BaXOfNm2n>cd0[BbXOeNm2o>bd0[BbXOeNm2n>bd0]BaXOdNn2o>ad0\\BcXOdNm2n>ad0^BbXOdNn2l>ad0`BbXObNn2n>ad0_BaXOcNo2l>ad0`BbXObNo2l>`d0bBaXObNo2l>`d0bBbXO`NP3l>_d0cBbXOaNP3j>`d0dBaXO`NP3l>_d0dBaXO`NQ3j>`d0eBS^OZ=na0dBS^O[=na0eBS^OY=oa0fBR^OY=na0gBR^OX=Pb0fBR^OY=oa0fBR^OY=na0gBR^OX=Pb0gBQ^OX=oa0gBS^OW=oa0hBQ^OX=oa0hBR^OV=Pb0iBQ^OV=oa0iBR^OW=oa0hBR^OV=oa0jBR^OU=oa0jBQ^OV=oa0jBR^OT=Pb0jBR^OU=na0kBR^OU=oa0jBQ^OU=Pb0jBQ^OV=Pb0iBP^OW=Pb0iBP^OW=Qb0gBP^OY=Pb0gBP^OY=Qb0fBn]OZ=Tb0dBm]O\\=Sb0dBm]O\\=Tb0cBl]O]=Ub0aBl]O_=Tb0aBl]O_=Ub0`Bj]O`=Xb0^Bi]Ob=Wb0^Bi]Ob=Xb0\\Bi]Od=Xb0[Bh]Oe=Yb0YBh]Og=Xb0YBg]Og=[b0WBf]Oi=[b0VBe]Oj=\\b0UBd]Ok=]b0SBc]On=]b0QBd]Oo=]b0PBc]Oo=_b0oAb]OQ>_b0nA`]OS>ab0kA`]OU>ab0jA_]OV>]k0100O10O10O100O1001O2M3N2N2N3M3L3N1O2N2N2M3N3M2N2N3L4M2N3M4KS1nN4L4K5L5K4L5J6K2N2M3N2N2M2O2N2M2O1O0O10000000000000000O2O0000000000000O1000000000001OYJYFdROf9[m0_FbROa9]m0bFaRO^9]m0fFaROZ9^m0jF_ROV9`m0lF_ROT9_m0PG_ROo8am0TG]ROl8bm0VG]ROj8lk0[FcPOn0_3g8mk0]FbPOn0`3e8mk0`F`POn0a3b8nk0bF_POn0b3`8ok0cF^POm0c3`8nk0eF]POm0d3^8ok0fF[POn0e3\\8ok0hF[POm0e3[8Pl0jFXPOm0f3Z8Ql0kFWPOl0h3Y8Ql0lFUPOm0i3W8Ql0nFUPOl0i3V8Rl0oFSPOm0j3T8Rl0RGQPOl0l3R8Sl0SGooNl0n3Q8Rl0UGnoNl0n3P8Tl0VGkoNP1l3j7Xl0XGjoNT1i3d7]l0YGioNX1e3`7al0ZGgoN]1b3Y7fl0\\GfoNc1]3Q7ml0^GcoNg1[3k6Qm0aGaoNg1\\3h6Sm0bG_oNh1]3f6Tm0jJkROV5Tm0mJjROS5Vm0nJhROS5Xm0mJhROS5Wm0oJWQOWKGj9Ro0PKTQOYKIg9So0QKRQOZKJf9Ro0QKRQO\\KKc9So0RKPQO]KLa9To0RKoPO_KL_9To0TKnPO^KN^9To0TKmPO`KN\\9Uo0UKkPOaKOZ9Uo0VKkPOaK0Y9Uo0WKjPOaK0X9Vo0WKiPObK1X9To0WKkPObK0W9Uo0XKiPObK2V9Uo0XKiPObK2W9To0VKlPObK0Y9So0UKmPObK0Z9Ro0TKnPOaK1\\9Po0RKQQOaKO^9on0QKRQOaKO_9on0oJRQObKO`9nn0mJUQOaKNd9kn0kJWQOaKNe9jn0jJYQO`KMg9in0hJ[QO`KMi9gn0gJ]QO_KLk9fn0eJ_QO`KLk9dn0eJaQO^KLn9bn0cJdQO^KJQ:`n0aJfQO]KKS:^n0_JiQO]KIU:]n0^JkQO[KIX:[n0\\JmQO\\KHY:Zn0ZJPRO[KG]:Wn0WJTRO[KE_:Vn0VJVROYKEb:Tn0TJYROXKEd:Qn0SJnSOn5Ql0QJPTOQ6nk0nISTOS6mk0kITTOW6jk0fIYTO\\6ek0aI_TO`6_k0^IcTOc6\\k0ZIgTOh6Wk0VIkTOl6Sk0RIoTOo6Pk0oHSUOR7Sg0UETXOg3k0V7if0^EWXOZ3R1Z7_f0fE[XOn2Y1\\7Vf0oE]XOc2_1`7Qf0oE_XOa2`1a7Qf0lE`XOe2]1`7Sf0iEaXOj2Y1^7Vf0fEbXOn2V1\\7Yf0dEcXOQ3R1\\7[f0aEdXOU3o0[7\\f0`EeXOW3m0Y7_f0^EeXO[3k0W7`f0]EeXO^3i0V7bf0ZEfXOb3f0T7df0YEgXOf3b0R7gf0WEgXOi3`0P7if0WEhXOj3=P7kf0TEiXOm3;o6lf0TEiXOn3;n6lf0REjXOQ49m6mf0REjXOS47l6of0PEjXOU47j6Xe0_DjXOa0h1W46i6We0`DjXO`0i1X45h6Xe0aDjXO>i1Z46e6We0cDjXO>j1Z46c6Ve0fDiXOje0j@\\[Oo0jNW>ie0k@`[Ok0hNY>ge0m@e[Of0dN]>fe0o@g[Ob0cN_>ee0PAi[O`0bN`>de0QAj[O?bN`>de0QAk[O>aNa>ce0RAl[Oae0SAm[O;cNa>_e0UAo[O9bNb>^e0VAP\\O8bNb>]e0WAR\\O6aNb>^e0YAP\\O5bNb>]e0ZAR\\O3bNb>[e0\\AS\\O2bNb>Ze0]AT\\O1bNb>Ye0^AV\\OOaNc>Xe0_AW\\ONbNb>Ve0aAY\\OLaNc>Ve0aAY\\OLaNc>Ue0bAZ\\OJcNc>Re0dA\\\\OHbNd>Qe0eA]\\OGbNd>Pe0fA_\\OEbNd>od0gA_\\OEbNd>Pe0eAa\\ODaNe>Pe0eAa\\ODaNf>od0dAc\\OBaNi>md0cAe\\OA_Nl>md0aAf\\O@`Nn>kd0`Ah\\O^O`NQ?id0_Aj\\O\\O`NT?gd0^Al\\OYO`NY?ed0\\Am\\OWObN[?cd0\\AY^Od>ia0YAY^Of>ha0WA[^Oh>ga0UAZ^Ok>ga0SA[^Ol>ga0QAZ^Oo>ga0o@[^Oo>ha0m@Z^OS?ha0j@Z^OU?ga0i@Z^OW?^f0O000O2O001O1O001N2O1O2N1O2N3M3L5L6J1O2N1O1O2M2O2N1O1O1OO10O010000O01000O100O10O10O100O10O0100O100O100O010O100O1O1O001N2O1O1O1O100O00100O100O1O100000O2O00001O0O10001O00000O10001O000O1000000O10001O000O1000000O10000O1000000O10000O2O000O10000O100O2O0O2O0O101N101N100O2O0O2O000O2O0O2O001N2O1O1N2O1O1N2O001O1N2O001O1N101O001N2O001O001N101O1O1O1N2O1O2N001N101O001O0O2O001O0O2O001O0O2O001O0O101O0O2O001N10001N10001N101N10001N100O2O0O101N100O100O2O000O101N10000O2O0O10001N100O2O000O2O000O2O001N2O2M2O1O0O2O1O1N2O001N2O001O0O2O002M2O2M3N1O2M3N2M2O2M3M2O2M3N1M4M3M3M2M4M3M3M4L3M4L3M3M4L3M4M2M4L3M4L3N2M4L3N2M3M2O2M3K5J5K5J6K5K5L4M3M3M4K4M3M3M3L4M3M3M3N2N2N2N2N2N2N2N3M6K5`NRiNXOTW1b0nhN\\OXW1=lhN@YW1;ihNCZW1:hhND[W18hhNGYW17jhNFYW17ihNGZW15ihNIYW15ihNJYW13jhNJXW13khNKXW12jhNLXW12jhNMXW10jhNNXW1OkhNOXW1NjhN1WW1MkhN1XW1LjhN2XW1LjhN3hX1Nlhoh0"}}, {"image_id": 98, "category_id": 2, "bbox": [1176.906982421875, 730.9932861328125, 686.2689208984375, 199.8531494140625], "score": 0.9999969005584717, "association_id": 2, "segmentation": {"size": [1355, 1943], "counts": "dffd13SZ15M3N3I6L5N1N200O1O2N1O100O100O1O1O100O1N3M2N2M3M3L4O1O100O1O100O100O10000O2O000O1000001O0O1000001O0O10000000001N1000000000000000000000001O00000000000000000000000000000000000O10000000000000000000000000000O100000000000000000000O100000001O000O100000000000000O100000000000000000000O10000000000000000000000000000O1000000000000000000001O0000000000000000000000000000000000001O0O1000000000000000000000001O000000000000000000001O0000001O00000O10001O000000000000001O000O1000000000000O100000000O10000000000O10000000000000000O1000000000O1000000000000000000O1000000000000O100000O1000O10000000O1000O1000O1000000O1000O01000000O10000000000000000O100000O1000000000000000000000O100000000000000O100000000O1000000O10000O10000O10O1000000000O10000000O1000000000O01000000O100000000O10O100000000O1000000O100O01000O1000000O1000000000000O10O1000000000O1000000O1000000O100O10000O100000O1000O10000000000000O10000000O1000O10000000000O100000O100000000O01000O100O10000O10000O0100000O1000000000000000001O0O100000000000000000000O2O000000000O2O00001N101N101O0O101O0O2O001N101O0O2O00000O2O00001N100O2O0O2O0O2N2N3M5GWaX5"}}, {"image_id": 98, "category_id": 1, "bbox": [659.3248291015625, 255.4942169189453, 1250.928466796875, 589.3428955078125], "score": 0.9999054670333862, "association_id": 2, "segmentation": {"size": [1355, 1943], "counts": "X_VS17gY1>L4M3M3M3N2M3N2M3N1O1N2O2M2N2O1N3M2O1N2N2N3M2N2M3O1N3N1O1O1O1O1O2N1O1O1O1O1O1O1O2O0O1O1O1O1O1O101N1O100O100O101O0O1000001N10000O101O000O101O0O102N1O3L3N2N3M2M4M3M1N101O000O2O00001N100XoNcKbk0]4\\TOfKck0[4ZTOhKdk0Y4YTOjKgk0V4WTOmKhk0T4UTOoKjk0Q4TTORLkk0n3TTOSLkk0n3TTOSLlk0m3STOULlk0k3STOVLmk0j3RTOWLmk0j3RTOXLmk0h3QTOZLok0g3nSO[LRl0e3lSO^LRl0c3mSO^LSl0b3kSOaLTl0_3kSObLUl0^3jSOcLUl0^3jSOdLUl0\\3iSOfLWl0Z3hSOhLWl0X3iSOhLVl0Y3iSOiLVl0W3iSOjLWl0V3hSOlLVl0V3hSOlLWl0T3iSOlLVl0U3iSOmLVl0S3jSOnLUl0R3jSOoLUl0R3kSOoLTl0Q3lSOPMSl0P3lSORMRl0o2nSORMQl0n2oSOSMPl0m2oSOWMmk0k2RTOWMlk0i2TTOYMjk0g2UTO\\Mhk0e2XTO]Mfk0c2YTO`Mdk0a2\\TO`Mck0`2]TObMak0^2^TOeM_k0\\2aTOfM]k0Z2bTOgM^k0Y2bTOhM\\k0Z2cTOfM]k0Z2bTOhM]k0X2cTOhM]k0X2bTOjM\\k0X2cTOhM]k0X2bTOjM]k0W2aTOjM_k0V2aTOkM^k0V2`TOlM_k0T2`TOnM_k0S2`TOmM`k0S2_TOoM`k0R2^TOPNak0P2^TORNak0o1^TORNak0n1^TOTNak0m1]TOUNbk0l1\\TOWNbk0i1\\RObJX1g3[l0h1XROfJ[1d3[l0h1UROhJ_1c3Zl0e1RROnJb1_3[l0d1nQORKe1^3Zl0Z2eSOjMWl0W2gSOnMUl0S2iSORNSl0n1mSOUNPl0l1nSOYNnk0h1PTO\\Nmk0e1RTO_Njk0a1UTOcNhk0^1VTOeNhk0\\1WTOgNfk0Y1YTOkNck0W1[TOlNck0U1\\TOmNQ2]JXf0g6eWOnNQ2\\JZf0f6dWOQOo1ZJ]f0f6cWOQOn1ZJ_f0e6bWOSOm1YJaf0e6`WOTOm1YJbf0d6`WOTOl1YJdf0c6_WOVOl1WJef0d6^WOVOk1WJgf0d6\\WOWOk1WJhf0b6]WOWOj1XJhf0c6\\WOWOj1WJjf0b6[WOYOj1UJkf0d6YWOWOl1UJkf0j6RWOROS2TJkf0o6mVOmNX2TJjf0U7hVOhN^2SJjf0c=VYO]Bjf0c=WYO\\Bif0d=WYO\\Bhf0e=XYO[Bhf0e=XYO[Bhf0e=XYO[Bhf0e=XYO[Bgf0f=YYOZBgf0f=ZYOYBff0g=ZYOYBef0h=[YOXBef0h=[YOXBef0h=[YOXBdf0i=\\YOWBdf0j=[YOVBdf0k=\\YOUBdf0k=\\YOUBdf0k=]YOTBbf0m=^YOSBbf0m=^YOSBaf0n=_YORBaf0n=_YORBaf0n=_YORBaf0n=_YORB`f0o=`YOQB`f0o=`YOQB`f0o=`YOQB`f0o=aYOPB_f0P>aYOPB_f0P>aYOPB^f0R>aYOnA_f0R>aYOnA_f0R>aYOnA_f0R>aYOnA_f0R>aYOnA_f0R>aYOnA_f0R>aYOnA^f0S>bYOmA^f0S>bYOmA^f0S>bYOmA^f0S>cYOkA^f0U>cYOjA]f0V>cYOjA]f0U>eYOjA[f0V>eYOiA\\f0W>eYOhA[f0X>fYOgAZf0X>hYOgAWf0Z>m20000O1000000O1000000O0100000O1000000O100000O010000O1000000O10000O0100000000000001O00000000001O000000001O0000000O101O000000001O000000001O000000001O000000001O0000001O000000001O000000001O000000001O000000001O0000001O00000nTO`AYj0`>dUOdA[j0]>aUOhA]j0X>aUOkA^j0U>`UOnA_j0R>`UOPB_j0P>`UOSB^j0n=`UOTB_j0l=`UOVB`j0i=_UOYB`j0\\<_UOnC0H`j0XjS1a4doNVK^P1a4ooNYKSP1`4UPO\\Koo0^4WPO_KPP1W4VPOeKWP1k3RPOoKTP1i3TPORLoo0h3WPOSLlo0k3XPOPLlo0l3V6N3L;GA7H8I6I7H>]O[nde1"}}, {"image_id": 99, "category_id": 2, "bbox": [1083.4835205078125, 1011.291748046875, 471.5164794921875, 201.3675537109375], "score": 0.9999997615814209, "association_id": 0, "segmentation": {"size": [1536, 1555], "counts": "^Pkb1h0U_17J5L2M4M2O1N2O1N101O1O2M101O1O1O1N101O1O001O1N10001O001N101O1N101O1N2O001N10001O000000001O0O10001O00001O00001O00001O00001O00001O000000001O0001O0001O0000001O001O001O001O00010O0000001O0001O0000001O01O0001O00000000010O00000001O00001O00000010O000001O000000000001O000000001O00001O001O0000001O01O000001O000000000000001O0000000O10001O000O2O00001N101O0O2O000O101O000000000O2O0000000000001O0O1000001O00001O001O001O001O00001O0000001O0000001O001O0010O01O001O00001O01O010O00100O2N101O0O10O010O01O00010O001O001O101N3M2N1O1O0010O01O000010O0001O100O3N3L1O100O1O10O01O001O1O1O1O1O2N2N5K5K4L2N2N1O2N001O00001O001O001O001O010O001O001O000000001OWMQdNa1o[1^NUdN_1k[1`NYdN]1g[1bN_dNY1a[1fNcdNW1][1hNedNW1[[1gNhdNX1Y[1fNidNY1W[1fNkdNY1U[1gNldNX1T[1gNmdNY1S[1fNodNY1Q[1gNPeNX1P[1gNQeNY1oZ1gNReNX1nZ1hNReNX1nZ1hNSeNV1nZ1jNReNV1nZ1jNReNV1nZ1jNSeNT1nZ1lNReNT1nZ1lNSeNR1nZ1mNSeNS1mZ1mNSeNS1mZ1mNTeNQ1nZ1nNReNR1nZ1nNSeNQ1mZ1oNSeNP1nZ1POReNP1nZ1POSeNo0mZ1QOSeNo0mZ1QOSeNo0mZ1QOSeNo0mZ1POUeNo0kZ1QOUeNn0lZ1ROTeNn0lZ1ROTeNn0lZ1ROTeNn0lZ1ROTeNn0lZ1QOUeNo0kZ1QOVeNn0jZ1ROVeNn0jZ1ROVeNn0jZ1ROVeNn0jZ1QOWeNo0iZ1QOWeNo0iZ1QOWeNo0iZ1QOWeNo0iZ1POXeNP1hZ1POYeNP1fZ1POZeNP1fZ1POZeNP1fZ1POZeNQ1eZ1nN\\eNR1dZ1nN\\eNS1cZ1mN]eNT1bZ1lN^eNT1bZ1lN^eNU1aZ1kN_eNU1aZ1jN`eNV1`Z1jNaeNV1^Z1jNbeNV1^Z1jNbeNV1^Z1jNbeNW1]Z1iNceNW1]Z1iNceNW1\\Z1jNdeNV1[Z1kNeeNV1YZ1kNfeNV1YZ1kNgeNU1XZ1lNheNU1VZ1kNkeNU1TZ1lNleNT1SZ1mNmeNT1QZ1mNoeNS1oY1oNQfNR1mY1oNRfNS1lY1nNTfNR1kY1oNUfNR1jY1nNVfNR1iY1oNWfNQ1iY1oNWfNR1gY1POWfNQ1iY1oNWfNQ1hY1QOVfNQ1iY1oNVfNR1iY1POUfNR1iY1POUfNR1iY1oNVfNR1iY1oNUfNT1iY1nNUfNT1iY1mNVfNT1iY1nNTfNU1kY1kNTfNV1kY1lNTfNT1lY1lNSfNV1lY1kNRfNV1mY1lNQfNU1oY1lNPfNT1PZ1lNmeNW1SZ1jNieNY1WZ1hNfeNZ1ZZ1gNdeNZ1\\Z1gNbeNZ1^Z1gN`eNZ1`Z1gN^eNZ1bZ1hN[eNY1eZ1Q200O10000000000000000000000000000000000000000001O001O001O1O001O1O8H2N1O1O2N1`KgdNV4d[1N1O1QLYdNc3h[1ZL[dNe3f[1WL^dNh3o[1M3[LlcNZ3`\\1L3Lf0YOn0gN[lN"}}, {"image_id": 99, "category_id": 2, "bbox": [97.48886108398438, 791.124267578125, 245.6373291015625, 70.43292236328125], "score": 0.9999997615814209, "association_id": 2, "segmentation": {"size": [1536, 1555], "counts": "Tii42n_11N2N3M2O001N10001N10000O1000000O10000000000000000000O10000000000O10001O01O00000000001O00001O0O101O001O0000001O001O001O00000O2O00001O0000001O0000001O00001O0000001O001O001O00001O001O001O001O001O00001O1O1O1O1O000010O01O1O001O001O01O01O0010O01O0001O01O01O010O01O01O000001O01O000000001O000010O01O0000001O000000000000001O0000000000000000001O0000000010O00000001O001O001O0000001O1O1O1O1O1O001O00001O001O00001O0000001O00001O00001O1O3M8H5K2N1Nbeki1"}}, {"image_id": 99, "category_id": 1, "bbox": [662.386474609375, 409.4927978515625, 134.443603515625, 346.93414306640625], "score": 0.9999996423721313, "association_id": 1, "segmentation": {"size": [1536, 1555], "counts": "PWno03b_1=J6J5G:@?ZOg0I6lLTNogNP2hW1[NPhNi1jW1aNogNc1iW1iNngN\\1lW1mNngNV1WV1h0ciN\\OnU1U1liNoNlU1`1eiNhNPV1i5I8G8J6M3M3N3N1N2N2N200O2O00000O100O0100dNnjNjGRU1T8VkNfGjT1W8]kNeGcT1X8ckNeG]T1X8hkNeGXT1Z8lkNdGTT1[8PlNaGQT1^8YlNWGiS1i8g1O1O1O100O1O1O1O1O1N2O100O1O100O100O10000O1O1O2M2N2oH\\hNe5fW1WJ`hNe5aW1YJihN^5XW1_JohN]5RW1aJSiNZ5nV1dJViNZ5kV1aJ_iNX5nX1G3L3dLjeNj0WZ1SOoeNh0SZ1VORfNe0PZ1YOYfNbW1g1hkNXNZT1\\OdgNj1[4gNcT1l0ekNPO_T1h0jkNTOWT1c0SlN[OoS1=XlNAmS13]lNIZe[>"}}, {"image_id": 99, "category_id": 2, "bbox": [1057.72021484375, 862.1170654296875, 363.7568359375, 81.94525146484375], "score": 0.9999967813491821, "association_id": 4, "segmentation": {"size": [1536, 1555], "counts": "^[ha16i_12O0O10001O0O101O0000001O0O100000001O0000000000001O000000000O10001O00000000000000000000001O00000000000000000000001O00001O001O001O001O00000010O0001O001O000010O000001O01O0001O0001O01O0000001O01O0000001O01O000001O00000000001O00001O01O0001O000000000001O000001O000001O000001O0000000000001O000000000000001O000000001O000000000000001O0000000000001O000001O01O0000000001O0001O0000000001O01O0000001O01O0000000010O00000010O000001O01O0000001O0001O01O00001O01O000001O01O0000010O00001O0000010O0001O01O010O00010O0000010O00001O2O0O001O01O01O01O0001O1O001O1O1O1O10O01O001O0O2O1N2MUSm9"}}, {"image_id": 99, "category_id": 1, "bbox": [932.5507202148438, 392.6613464355469, 106.35479736328125, 214.65127563476562], "score": 0.999994158744812, "association_id": 5, "segmentation": {"size": [1536, 1555], "counts": "caX\\15]_12e`N>Q_1:iLTOZgNh0bX1BXgN>eX10QgNOPX1XOVfNm0i1IQX1ZOTfNQ1k1CQX1\\OQfNV1m1]ORX1^OneNY1P2WOQX1CmeNX1P2ROUX1HieN1Ao0_2UOXX1M`eN1NP1X2nN\\X12ZeN60l0Y2fNaX1d2Y25L2N2N2O1N2N2N3M5K5L5J6K5TeNTLZY1n3cfN]LRY1e3kfNmLeX1T3XgNQMeX1P3XgNUMeX1l2WgNXMhX1V3ffNnLZY1k410O101O001O0000O1000000O100O2N1M3M3I7G9M4M2M4M3N2M3M3J5M6K5I6J5L5K>@9I7J6K4M2M3N3M4K3M7K5K9RNnaN[1^^1O0Mb0_O4L2N2M4L6K5Jdo\\h0"}}, {"image_id": 99, "category_id": 2, "bbox": [1296.1707763671875, 645.5621948242188, 69.1026611328125, 22.4647216796875], "score": 0.9998434782028198, "association_id": 0, "segmentation": {"size": [1536, 1555], "counts": "YdQm11n_12O1N101O001O00001O0000010O0000001O01O00000001O00000010O0001O00000010O01O00001O00010O001O01O0000010O0O2O2N1N_[X9"}}, {"image_id": 99, "category_id": 2, "bbox": [881.3692626953125, 580.9677124023438, 99.819091796875, 27.82965087890625], "score": 0.9996966123580933, "association_id": 5, "segmentation": {"size": [1536, 1555], "counts": "\\b[Y15j_12O1O000O1000000O1000001N10000000000N2O2O00000000001O1O001O001O00001O001O0000001O00000000000000000000001O00000000@i`N7W_1Gm`N7T_1Dh`N0600O10000O100O10000O1O1O1N2O1O1O1O100O10000O1000001O0O10000000000O10000000000000000000000O100000000000000000000000000000000000000000000O10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000O10000000000000000000000O1000000000000000000O1000000O10000O100000000O100000000O100000000O100000000000000O100000000000000O1000000000000O100000000O1000000O1000000O100000000O10000000000O100000000000000000000O10000000000000000O100000000000000O10000000000O10000000000O1000000000000O10000000000O10000000000O100000000O100000000O100000000O1000000000000000000000000O100000000000000000000000000000000000000000000000000O100000000O10000O10000O1000000O1000000O100000000O100000000O100000000O10000000000000000O1000000000000000000000000O1000000000000000000000000000000O10000000000001O00000000000000000000000000000000001O0000000000000000000000000000000000000000000000000000000000O10000000000000000O1000000000000O10000000000O1000000000000000000000000000000O10000000001O0000000O1000000000000O1000000001O1O001O2N1O1O1O001O001O001O1O001SJWfNa5iY1\\J[fNc5fY1[J\\fNd5dY1ZJ_fNe5bY1YJ_fNg5nY1O1O1O0dJheNP5YZ1mJjeNR5WZ1kJkeNU5UZ1iJneNV5^Z101O001O00001O0000000000O10000000000O10000000000O100DjJneNV5RZ1kJmeNU5SZ1kJmeNU5SZ1lJleNT5SZ1nJkeNS5UZ1mJkeNS5UZ1nJjeNR5VZ1nJjeNR5VZ1oJieNQ5VZ1PKieNQ5WZ1PKheNP5XZ1PKheNP5XZ1QKgeNo4YZ1QKgeNo4YZ1B;D3N3M4M6J5K5gaNcN8In\\1i1ebNaNh]1d1YbNVNg]1j1\\bNTNc]1n1[bNTNb]1V2O2N2N1O1O2N101N10N2N2L4001O1O00L4M3O1001O0000O1O1O1N2M300000000O10000001O2NO2M200O101O0O2O0O100O2M2N3O0O2O2C=H;YOTTe2"}}, {"image_id": 99, "category_id": 1, "bbox": [980.4418334960938, 1150.2691650390625, 66.04534912109375, 280.58642578125], "score": 0.16229195892810822, "association_id": 0, "segmentation": {"size": [1536, 1555], "counts": "QiV^1e0P_1`0PNJXcNR1X\\1b1J7J6I7G?C8J4L4K5I6L4M3M4J2O111O4afNWJ_X1k5^gNWJaX1j5\\gNXJcX1i5YgN[JhX1_600O0O10001O0001O0O2O004L3L3N4L2fLdfNK`Y1\\OcgNdNK\\OiX1e1S4K5H:Cb0kN]aN2PXbh0"}}, {"image_id": 99, "category_id": 1, "bbox": [1353.1275634765625, 411.18359375, 94.6920166015625, 307.72113037109375], "score": 0.11768306791782379, "association_id": 0, "segmentation": {"size": [1536, 1555], "counts": "aTdo16g_19F?_O:G8G8F;H7K4L4M2M4M2L4M3M3L5K4N2N2O0N3K5J5L4hL_LQjNb3mU1eLliN]3PV1PMYiN^3dV1mLPiNX3nV1oLihNR3XW1VM^hNk2cW1[MVhN`12mLiW1g1RhNX1X1PZ11meNHI7^Z1LWfNlNWO88l0ZZ1MlfNTOmNk0YZ1NofNTOlNj0VZ1OUgNPOlNl0PZ1O]hNLdW11bhNK_W13ehNJ\\W15ihNDYW1DU<4K;G6I8bDjNP;_1N1O001OO100O1CVEoNk:o0ZElNh:R1>O1O101O000001O00001O00000001O00000O10000O100001O1O003M5eDhNo:b1M1O1O0O100O10000000O1O1A?N2O1L4M3K6Mfij6"}}, {"image_id": 100, "category_id": 2, "bbox": [234.06564331054688, 225.948974609375, 105.1055908203125, 11.649520874023438], "score": 0.9999998807907104, "association_id": 5, "segmentation": {"size": [404, 639], "counts": "eZm22b<1N2O00001N1000000000001O00000000000O1000000000000000001O0000000000001O00000000000000000000000000000000000000000000000000O2O00000000000O2O0O2N1Ocg4N_XK2O1N2O00000000O100000000000000O2OZTf3"}}, {"image_id": 100, "category_id": 1, "bbox": [127.52275848388672, 164.26528930664062, 34.76331329345703, 43.15098571777344], "score": 0.9999997615814209, "association_id": 4, "segmentation": {"size": [404, 639], "counts": "URc12]<>E6SD[Ob;R1I2N10O0O2L4N2003M5K1O0O10FlDSOU;m091O3\\DTOZ;S1O1000000000010O00O2CnDUO];>b0GePl5"}}, {"image_id": 100, "category_id": 2, "bbox": [1.1578482389450073, 215.29458618164062, 64.09584045410156, 7.2476348876953125], "score": 0.9999982118606567, "association_id": 1, "segmentation": {"size": [404, 639], "counts": "SP11b<2O00000O10000000O11O000000000O100000000001O003MZh22bWM110000000O100001O0000000000000000000001O00000000000001O1NcdR7"}}, {"image_id": 100, "category_id": 2, "bbox": [174.57469177246094, 197.4468536376953, 59.966461181640625, 4.165863037109375], "score": 0.9999141693115234, "association_id": 3, "segmentation": {"size": [404, 639], "counts": "kPV21c<000000001O00000000000O10000000000000000000000000000001O0Oab10`]N0O10000000000001O000000000000Y[R5"}}, {"image_id": 100, "category_id": 1, "bbox": [470.0401611328125, 155.869873046875, 54.43109130859375, 51.817962646484375], "score": 0.9992443323135376, "association_id": 0, "segmentation": {"size": [404, 639], "counts": "hbi5:Y<2O00001N2O3M1O2N010O1O1O10O02N1O00001O01O0000000000000002N1O?A1O0000O1O1001O1O0000_OSEZOm:b0e0O0N3O0N3O1O1O100O10nV]1"}}, {"image_id": 100, "category_id": 2, "bbox": [322.6537170410156, 227.91943359375, 101.10635375976562, 9.025741577148438], "score": 0.9980260133743286, "association_id": 2, "segmentation": {"size": [404, 639], "counts": "Seo33`<10000O1000000000001O000000000000000001O1Odf6MmlH1^<3O1000000O100000000000000000001O0000000000000000000000001O000001O000000000000000000000000001OnSj2"}}, {"image_id": 100, "category_id": 1, "bbox": [293.2900390625, 158.90249633789062, 29.85162353515625, 78.09591674804688], "score": 0.9837781190872192, "association_id": 5, "segmentation": {"size": [404, 639], "counts": "SUd32a<2O1M5L4I:RDAZ;o0M3N3M3M2N3M3M5LcNjEg0i9VO[Fj0f9RO]Fm0e9PO]Fo0e9kN`FT1a:O1O2XO_DN2Ma;1mDOV;O]D=e;_O^Da0a;_O_Da0l;NEBZD002N7_Eg0]O9G9FSci5"}}, {"image_id": 101, "category_id": 1, "bbox": [841.464599609375, 619.0872802734375, 51.89404296875, 96.4573974609375], "score": 1.0, "association_id": 6, "segmentation": {"size": [768, 1024], "counts": "Q\\jc0j0Qg0^1dN8I3N1O1O2OO00010000O10000O10001N1000001O000000000O10000O10O10O0100O101N1O3M3M2K6J6_Oa0iNfYOD49NFhbT3"}}, {"image_id": 101, "category_id": 1, "bbox": [451.149169921875, 425.40631103515625, 88.073486328125, 272.6978759765625], "score": 1.0, "association_id": 4, "segmentation": {"size": [768, 1024], "counts": "lPe:b0Vg0;[Oc0^Ob0K5M4I6K5M3L4M2b]OXMc?j2Y@`M^?c2]@cM_?a2o_OSNk?P2a_OeN\\`0b1S_OjNk`0W4N101N10000O100O001N2O1O100O2N100O2M2J7G8L5K5M3O0O100O101O1OO100O100000000O10000O100000000O101N100O1N2N3K5H9C=K4H8G:J6G>mNQ1H5K6J8I9F8H7F>CPY[;"}}, {"image_id": 101, "category_id": 1, "bbox": [293.861328125, 625.0145874023438, 52.46063232421875, 92.243896484375], "score": 1.0, "association_id": 2, "segmentation": {"size": [768, 1024], "counts": "V\\o6b0_1CRd0[2M2O1O1O100O1O1O1O10000O100O10000O10000000000000000000000001O001O1O0000001O0O2O1N2M4K6F>mNnYOSOejn?"}}, {"image_id": 101, "category_id": 2, "bbox": [942.2615356445312, 684.2945556640625, 81.121826171875, 19.37164306640625], "score": 0.9999998807907104, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "b]Uf04kg010001O0000000O10001O000000000000001O000O100001O00000001O00001O00001O00001O00000000001O00000000000O100000001O000O10000000000001O000010O000001N10000000;DUj0"}}, {"image_id": 101, "category_id": 1, "bbox": [811.8316040039062, 431.534912109375, 81.5181884765625, 202.88409423828125], "score": 0.9999998807907104, "association_id": 3, "segmentation": {"size": [768, 1024], "counts": "_[Rc03kg07H4M2N3M2N2N2N2N2M2N2O1K4L5L3G8M300O02O1O0N3OPNgNT\\O:7m0cc05V\\OKlb0oNS]O_1IBTc0R3011N2N3M3N2N2O1O1O1N2001O1O1O1O1O103M1O2O1O0O1100O1N4N1N1N30N0O10g0ZOhMS]OXOob0=a]OZOcb0=k]O[OWb0`0o]O\\OTb0VOU]O5m0c0oa0QO_]O1j0l0Rc0iNW]OU1od0K7H5L6I8DflV3"}}, {"image_id": 101, "category_id": 1, "bbox": [945.9089965820312, 463.656982421875, 69.15533447265625, 180.41253662109375], "score": 0.9999992847442627, "association_id": 5, "segmentation": {"size": [768, 1024], "counts": "_kVf0a1Zf0=F5K5J7K5J5K5L>A6J5L1O00L2O1001N4M4[\\OXLob0j3i\\ObLPc0c3k\\OaLRc0W4N3O1N3N0000001OO1001OO1N2N2VOj0K5F;J6J8I;G9H5K5J6K5J8I7I4M5K4L3K7HaiS8"}}, {"image_id": 101, "category_id": 2, "bbox": [189.1905059814453, 579.740234375, 200.8250274658203, 15.08721923828125], "score": 0.9976913928985596, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "^je41ng02O0O1O2N100O10000000000000000000000000000000000000001O0000000000O2O00000000000000001O00O1000000000000O100000000O10000000000000000O100000000000000000000O1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001O001N10001O0000001O1O001O0000001O0O2O00bmb?"}}, {"image_id": 101, "category_id": 2, "bbox": [873.9302978515625, 578.1658935546875, 67.531494140625, 7.8365478515625], "score": 0.982315182685852, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "Sjcd03mg01O000000000000001O00000000000000000000000000000000000000000000000000000000000001O00O1001O000001O0000000000MomR2"}}, {"image_id": 101, "category_id": 1, "bbox": [570.6818237304688, 619.7634887695312, 54.09234619140625, 100.5224609375], "score": 0.8809082508087158, "association_id": 7, "segmentation": {"size": [768, 1024], "counts": "ol\\=`1^f03N1N2O1N2N2N2L4_Oa0M3O100N2O1O1N2O1O10000O1000000O1001OO100000000O11O000000001O1O001O003M1O4_MV[Od1ge0L2N2N2N1O2N2MnbZ9"}}, {"image_id": 101, "category_id": 1, "bbox": [43.8681755065918, 309.0262451171875, 206.08074951171875, 176.27224731445312], "score": 0.32904377579689026, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "nYQ1S4kc0:G5K3M101N100O10000O10O100O1O1O1O0O2000000O1000000O100O1O1Fb\\ORL^c0k3h\\OQLYc0m3k\\OPLVc0m3`0N2N2M3M3L4N2O1N2O1N2O1O1O1O1O100O100O1O100O1N2O1N2O1O1O1O100O1N2N2N2O1N200O1O1N2O100O1O100O10000O100000000000000O10001O01O000001O001O1O001OR\\OSNia0m1U^OUNla0j1P^OZNPb0e1P^O]NPb0c1o]O\\NRb0d1Q^OYNoa0g1S^OWNna0h1S^OWNna0h1R^OXNoa0g1R^OXNna0h1V2O001O0O10001N10001O000O101O001N2O001N101O000O2N1O1O1O2N101N101N1O2O0O101O00001O0000001O0O10001N1000001N101O000010O00000001O0001O01O0000001O001O1O0010O010O001O010O000000000001O001LUeUb0"}}, {"image_id": 101, "category_id": 1, "bbox": [924.9247436523438, 406.4245910644531, 45.73699951171875, 213.69253540039062], "score": 0.12256059795618057, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "`ege03fg0:K5N2L10N3MO2M4TYOAUf0g0aYOBXf0V1M2N1000N3N2N3N1N12O0O0OhNcYOP1Zf0QOjYOl0Vf0?0fNgYOm0a4lNn<8S_O7hAJX>5iAK^>NaA3_>N`A2[>7bAHb>2`AMi>F[A;_>LaA3Vc00N20O1O2MUmW1"}}, {"image_id": 102, "category_id": 1, "bbox": [190.4459991455078, 750.2996826171875, 72.51481628417969, 156.256591796875], "score": 1.0, "association_id": 4, "segmentation": {"size": [1371, 2048], "counts": "[le88bZ12eeN0b0OTX14VgNV1f0[OXV1Y1_iNmN_V1V1UiNUOjV1`2OO01O02N2N000O2N1O2O00O101[iN_LnU1e3hiNbLWV1Q4O2OO0100O0100O2O0O1O101N2N2M3N2M3N3M2WN`iNTObV1g0iiNPOZV1l0QjNjNSV1Q1RjNkNRV1k0ZjNoNjU1g0`jNSOfU1d0_2@fUQ[2"}}, {"image_id": 102, "category_id": 1, "bbox": [1049.19677734375, 679.255615234375, 173.22509765625, 425.4708251953125], "score": 1.0, "association_id": 3, "segmentation": {"size": [1371, 2048], "counts": "mQ\\\\1;ZZ1`0@9K4YMWOVkNm0\\T1D]kN?ZT1N`kN5[T12`kN2[T14`kNO[T17akNL[T18bkNKZT1:bkNG[T1`0^kND_T1b0WkNDgT1b0PkNCoT1V3N1O2O1O2N3L4SmNVKco0m4SPO^Kio0c4RPOdKjo0`4ooNgKno0\\4hoNoKTP1`7K3N3M2N2N3M4L4L4L3M4L4L6J4K3N2N001N10000O101O000O1000000O1O1O100O100O10000O10000N101O1N2N2N2N1O0001N1O2N100O1J5D>L3O2N3M2O1O1O101N1100O01O010O03M3M2N2O1N2000O10001O001O01N2O00000001N2N3M2O1N2N1O1O2N2N2N2N3L3N3M3mIcoNa1aP1XNhoNc1ZP1YNloNc1VP1[NnoN_1UP1`NooN[1TP1dNooNV1UP1hNQPOo0SP1POQPOk0RP1TOPPOg0TP1WOooNe0UP1XOooNb0UP1\\ORPO:TP1CUPO0PP1OUPOHQP16QPODUP1:moNBXP1;koN^OaP1:doNnN[Q1f0`oNeMdQ1Q2j3I5J7I7H;D:C:EaSeR1"}}, {"image_id": 102, "category_id": 1, "bbox": [526.1403198242188, 740.4656372070312, 67.8597412109375, 107.65106201171875], "score": 1.0, "association_id": 5, "segmentation": {"size": [1371, 2048], "counts": "nQaf0>c1EQW1`0ihNESW1c0fhN_OWW1g0bhN\\O]W1h0_hNZO`W1l0WhNWOhW1o0ngNWOPX1l1M2N2N3M2O2N2N1000000000000000O100O100000000O1000000000000O100O1O1N2L4L4L5J6L4J7J5K6J6I7DB001O000000001N1000000000001O01O0002N3M1O3M=C5K:F8iiNQLRU1n4N2N100O0010O1O011M2O2N3L6J3M3N2N2M2M3M3M4I6A?\\Oc0F;G:F9J7I6M3N3M4L4K4L4J5M6K7J2M5Jli_h0"}}, {"image_id": 102, "category_id": 2, "bbox": [154.47633361816406, 901.3245849609375, 76.06277465820312, 14.109130859375], "score": 0.9999734163284302, "association_id": 4, "segmentation": {"size": [1371, 2048], "counts": "X^h63hZ10O101O0O10000000000000O1000O100000000000000O1000O100000000000O10O1000000000O1000O10000000O1000O10000000001N10O10000000000001N10SaV\\2"}}, {"image_id": 102, "category_id": 2, "bbox": [1857.3460693359375, 892.8594360351562, 73.98876953125, 16.7293701171875], "score": 0.9997441172599792, "association_id": 1, "segmentation": {"size": [1371, 2048], "counts": "k_h]25fZ11O0O2O000000001O0000000O1000000O10000O10000O10000000000001O000000000O2O0000000O2O001O000000001N10000000O100000O10O100001O001N10Z_V5"}}, {"image_id": 102, "category_id": 2, "bbox": [1232.39111328125, 925.6837768554688, 250.1171875, 49.83203125], "score": 0.9980708956718445, "association_id": 0, "segmentation": {"size": [1371, 2048], "counts": "PTic12iZ100000O10000O100000000000000O2O0000O1000000000000000000000000O1000000000000000000000000000000O010000000000000O1000000000000000000000000O10O100000O100000000O100000llj10TSUN000O101O0O100000O0100000O0100000O1000O0100000O10000PTP1MSloN1OO100000hZ11WeN0O2O00O1O101Onjki0"}}, {"image_id": 102, "category_id": 2, "bbox": [504.1309814453125, 839.6655883789062, 53.51654052734375, 12.141845703125], "score": 0.995887815952301, "association_id": 5, "segmentation": {"size": [1371, 2048], "counts": "UdWe03gZ11000001O000O100000000000000000000O100O10000000000000001O00O1001OO10000000000O1000000000001N10002Mg][n1"}}, {"image_id": 102, "category_id": 2, "bbox": [1376.3536376953125, 887.8003540039062, 54.93212890625, 11.57659912109375], "score": 0.9817744493484497, "association_id": 0, "segmentation": {"size": [1371, 2048], "counts": "j`li11jZ11N1O1000000O10001O000O1000000000000O1000000000000000000000000000000001O001O1O1O1OhWQj0"}}, {"image_id": 102, "category_id": 2, "bbox": [1443.3541259765625, 809.143310546875, 54.069091796875, 28.3232421875], "score": 0.9692940711975098, "association_id": 6, "segmentation": {"size": [1371, 2048], "counts": "ljhl13eZ13O1O1O100O1O1O1O100O010NDeeN<[Z1200000O10000000000000O10001O001O3M1O010O1O001O01O00000O101N2N`mPg0"}}, {"image_id": 102, "category_id": 2, "bbox": [1466.462646484375, 873.8192138671875, 66.0819091796875, 29.9061279296875], "score": 0.5276219248771667, "association_id": 0, "segmentation": {"size": [1371, 2048], "counts": "fZbm15dZ14N1MGbeN<\\Z10100O10O02O00001O000000000010O10O1O02OO02N001O0O10000O10O100O010O1O1O01000O101N1000001N100000000O10000O100O10aede0"}}, {"image_id": 102, "category_id": 2, "bbox": [1473.6968994140625, 858.9769897460938, 224.591796875, 63.54351806640625], "score": 0.3927166163921356, "association_id": 0, "segmentation": {"size": [1371, 2048], "counts": "bQmm15fZ10O2O0O2O0O20O00001O00000000000000O010O1O100O10000O01000O1000000001N100000000O100000O100000O10O10000O1O1O1O1000000O10001O0O110O001O100O1O001O000O2O0O1N3O00001O001O001O1O001O0O10001O000000001O00000000001O0000000000UO[fN`0eY1@]fN>dY1@]fN`0cY1_O_fN`0aY1@_fN`0aY1A]fN`0cY1@]fN`0cY1AZfNa0eY1McA;W>:M3M3N2O0O2N100O2O0000000000000000000000001O000000000000000000000000000000000000000001O001O1N2O1N2N3KchV4"}}, {"image_id": 103, "category_id": 1, "bbox": [491.330078125, 257.5763854980469, 75.57073974609375, 46.04791259765625], "score": 0.9999997615814209, "association_id": 2, "segmentation": {"size": [480, 640], "counts": "ajW711=[>:I8H4N2N2O0O1O101N10000000O1000000000000000000001O0000000000000000000000000000001O0000000000000000000000000000000000O100000000O10000O100O1O1O3MmnQ1"}}, {"image_id": 103, "category_id": 2, "bbox": [29.928363800048828, 343.7335205078125, 105.25825500488281, 12.552459716796875], "score": 0.9999996423721313, "association_id": 3, "segmentation": {"size": [480, 640], "counts": "j\\>2m>2N2O00001O00000000000000001O000000000000000000001O0000000000001O000000000000000000000000000000000000001O000000000000000000000000000000000000000001O0000000000000001O000000000000000000000000000000000001O00000OW\\\\7"}}, {"image_id": 103, "category_id": 2, "bbox": [410.9363098144531, 292.84283447265625, 92.97393798828125, 9.765899658203125], "score": 0.9999895095825195, "association_id": 2, "segmentation": {"size": [480, 640], "counts": "U]Q62n>001O000000001O00000000000000000000000001O0000000000000001O000001O0000000000000000000001O00000000000000000000000000001O00000000000000001O00000000001O0001O000000001O1N2O1OdXR2"}}, {"image_id": 103, "category_id": 2, "bbox": [266.523193359375, 261.8103332519531, 43.540130615234375, 6.369476318359375], "score": 0.9998517036437988, "association_id": 1, "segmentation": {"size": [480, 640], "counts": "W[n31o>000000000O2O000000000000000000001O000000000000001O0000000001O00001O1O1OfYl4"}}, {"image_id": 103, "category_id": 1, "bbox": [130.3877410888672, 265.86181640625, 140.5601348876953, 101.54678344726562], "score": 0.8984933495521545, "association_id": 3, "segmentation": {"size": [480, 640], "counts": "jco15U>i0K3N1K6[Od0L5O0O1O1L4L4O101N1N2O00100O1N2O1O100O1000000O10000000000000000000001O0O2O00001O00000000000000001O00000000001O000000001O0000001O000000000O100000000000000000000O0100000000O1O100O10000O100O1O1FPDcMQ<]2PDbMP<]2RDaMo;^2:0000O100001O001O001O001O1O1O01N2N2O1N1O2O2L7I4L2O2N3M5H6L3N2M5Ine\\5"}}, {"image_id": 104, "category_id": 1, "bbox": [546.9259033203125, 507.3783874511719, 69.33282470703125, 183.33505249023438], "score": 1.0, "association_id": 2, "segmentation": {"size": [768, 892], "counts": "\\bQ=3ig09I3N1O2M3M3nYO_Obd0b0Y[OHIDic0e0U\\O=[OYO]d0i6XAYIe>j6ZAVId>m6ZATId>o6ZARIe>o6\\APIb>R7^AnHa>T7_AkH`>V7aAhH`>X7`AhH_>Y7T10O101O000O101O0000N2O1N2N2M3mMW_OTL2^Oj`0\\4X_ORLba0l3b^OaKF1ia0\\4e^O]KH4da0^4g^OXKK6`a0W4a_OfK``0Y4c_OdK^`0[4d1O10001O010O1O004M3L5L6I100O100O001N2O1N2M4L4L3M4L4L3N2M4L3M4K4H9J6J=_OPRP;"}}, {"image_id": 104, "category_id": 2, "bbox": [662.513427734375, 661.0299072265625, 51.46978759765625, 11.33001708984375], "score": 0.999891996383667, "association_id": 3, "segmentation": {"size": [768, 892], "counts": "kdb?1ng02O1N100000000O1000000000000O1000001O0000000O10000000000010O1O1O001O00000O1000001O0O101O0OUkW4"}}, {"image_id": 104, "category_id": 1, "bbox": [677.640380859375, 517.4634399414062, 76.26007080078125, 148.22210693359375], "score": 0.9995219707489014, "association_id": 3, "segmentation": {"size": [768, 892], "counts": "WXU`07ig01O001N2O;S[O>f`0LW^On0ha02h\\O>Xc0U201O0O100000000000000000000000000000000000000000000000000000000000000000000000000000000001N10000N3^L_]O8RO0cc0@o]O\\O`N8:f0RS\\3"}}, {"image_id": 104, "category_id": 1, "bbox": [301.9971618652344, 378.0814514160156, 122.90087890625, 311.2752990722656], "score": 0.9994145631790161, "association_id": 5, "segmentation": {"size": [768, 892], "counts": "Zfe7:]g0d0B8H5L3`_OeNU:`1gEeNU:^1hEeNV:]1fEgNX:[1eEgNY:[1eEgNY:[1fEfNX:]1fEdNX:_1fEbNY:`1dEbN\\:a1WBjMV1h0bP3[A_Md>e2QAcMn>g2c@^M\\?d5N1O000OOC>N1110N3K5H9M3M2L5L4M3O1O1O1N2O11O1O1O1O2O1N3M3M201N4N;D5KUMQAcLQ?U3\\AcLk>Q3[AmLk>i2\\AUMe>g2_AWMb>g2dATM]>k2jAoLV>P3mAmLT>R3nAlLS>S3PBjLP>V3TBfLm=]3TB^Lm=S3[@oKg1j0P>k2f@[LZ1e0S>e2PAiLj0=Z>e2SAlLd0:[>h2TAoLb04]>k2RARMc0N^>P3n@SMg0G^>U3j@WM]a0i2b^OZM]a0e2b^O]M`a0_2c^O^M`a0_2c^O_M_a0_2b^O_Maa0^2a^O`Maa0^2b^O\\Mda0b2R2J6K3K6I7G;G6J7G^an:"}}, {"image_id": 104, "category_id": 2, "bbox": [791.644287109375, 681.1090698242188, 40.87042236328125, 10.6322021484375], "score": 0.9965110421180725, "association_id": 4, "segmentation": {"size": [768, 892], "counts": "^Udb03mg00O10000O101O00000O100000000000000O101O00000000000001O1O001O1O1O1O00000OaR]1"}}, {"image_id": 104, "category_id": 1, "bbox": [603.6599731445312, 508.70904541015625, 52.2158203125, 140.533935546875], "score": 0.06230230629444122, "association_id": 0, "segmentation": {"size": [768, 892], "counts": "TPZ>1kg0:I3M2O2M3N1O2N6J7]ZOKmb09V\\Of0dc0m1N4L2N1O1O2N00001O000000001O000000000000O10000000000O1]M[\\Ok0ec0cN\\]On0eb0hNX_O@l`0<_3M4ITPb5"}}, {"image_id": 105, "category_id": 1, "bbox": [203.55447387695312, 806.3938598632812, 202.29702758789062, 113.60516357421875], "score": 1.0, "association_id": 2, "segmentation": {"size": [1145, 1565], "counts": "akP81dS14O2jlNKeR17RmN2lR10RmN1nR1>N2O000O101O00000O2O2N1N2O0O2O1O1O1O1O001O1O001N101O2N2N8H7I2N2N3M3M3M3M9G2N2N2N5K1O1O1O001O0000001O0000000000000000000000O10000O10000O100O1O1O100O10000000000000000000000O10001O0000001O0000001O0O100000000O1000010O001O001O00100O1O1O1O001O1O1O001O001O010O001O1O001O0010O0000010O01O01O01O00100O001O001O1O001O1O001O1O1O2N1O001O1N101O1O001N2O1N2N4JkS_X1"}}, {"image_id": 105, "category_id": 1, "bbox": [807.986083984375, 765.9952392578125, 291.4744873046875, 261.8128662109375], "score": 1.0, "association_id": 1, "segmentation": {"size": [1145, 1565], "counts": "ZbZl0=YS19G9H7J6I8H9F=C`1aN6K3L4M3M2N2N2N3M4L4L4K3N3M2N2N2N2N2N2M3H8I7L3N3M3M2N2N3M2L4L4M4N1O1O101N00100O00100O1O001O10O0100O010O0100O010O010O01O000010O0100O01000O10O100000O10O100000O100O100O1O100O010O10000000000O10000000000000000000O100000O10000000O10001O0000000000000O10000O10000O1000000O1000001O0000001N100000000000000O1000001O00001O001O00001O000000001O000000000000000000001O00000000000000000000000000000000001O0000000001O01O0000001O001O001O001O1O00001O01O01O01O010O00100O0100O1O2O1N100O1O1O100O2O1O1N2O10O01N010O1O1O2N2N4L4L2N1O2N1O1O1O2N4K6K9G6I5L1N2O1N2N3N2M8H:Fb0^O7I4L4L3M3M3L6I:lNonNoNoUY`0"}}, {"image_id": 105, "category_id": 2, "bbox": [753.6386108398438, 968.2631225585938, 328.35028076171875, 75.00640869140625], "score": 0.9999998807907104, "association_id": 1, "segmentation": {"size": [1145, 1565], "counts": "VS\\j06bS14L1O2N101N100O100O2N1O1O1O100O1O100O2O0O1N2L4N2O1O100O10000O100O100O1O1O1O100O10000O100O1O1N2O1N2O100O100000000001O00000000MZNSnNf1mQ1ZNSnNf1QR1O001O4_NimNX1bR1J2N1O1O001O00001O001O1O1O1O1O001O001O000000000000001O00000000000001O000000000O100000000000000O100000000O10000000000O100000000O100000000O101O00000000000O1000000000000000000O100000000000000000000O100000000000000000000000000O1000000000000000000O1000000000000000000O1000000000000000000O10O1000000000000000O1000000000000000O10000000000000O1000000000000000O10000000000000000O1000001O000000000O1000001O000000000O2O000000001N10001O00001O000O101O0000000O2O000O2O00001N1000001O0O1O2N100O2O0O101N100O2N2N2NT\\Wa0"}}, {"image_id": 105, "category_id": 1, "bbox": [165.20565795898438, 817.5594482421875, 110.22665405273438, 177.30096435546875], "score": 0.9999998807907104, "association_id": 3, "segmentation": {"size": [1145, 1565], "counts": "dmm51gS15K3L2N2N3N100O2N100nLCfRO?Xm0DeRO>Ym0EeROXS14N1N2O2O0O1M3O1O1O1O100O100O2O0O100O10000O100O10000O1000000000O10000O1O10000O100O100000000000000O100001O01O000100O1O00100O0010O0000001O00000O2O0H[mN\\OeR1b0_mNZOcR1d0;N1O1O1O2O0O1O2N101N3M]h`a1"}}, {"image_id": 105, "category_id": 2, "bbox": [124.99240112304688, 982.3408203125, 128.03070068359375, 13.49517822265625], "score": 0.999911904335022, "association_id": 3, "segmentation": {"size": [1145, 1565], "counts": "Vo^41gS1101O0O10000000000000001O0000000O1000000000000000000000000000000000000O1001O0000000000001O0000001O00000000000000O100000O0100O1000000O1000O100000000000000O1000000O1000000O10000O101O`VQ_1"}}, {"image_id": 105, "category_id": 2, "bbox": [56.23470687866211, 836.9912109375, 103.39060974121094, 9.5213623046875], "score": 0.998526930809021, "association_id": 4, "segmentation": {"size": [1145, 1565], "counts": "Tbc21gS11001O00cY<1\\fC00000O10000O2O00000O100000000000000000000000000001O01O01O001O00001O00001O00O10000O100O10000O1000000000000000000000O2O00001O1OPmXa1"}}, {"image_id": 105, "category_id": 2, "bbox": [1289.0208740234375, 897.4515380859375, 206.2684326171875, 10.97845458984375], "score": 0.8833901882171631, "association_id": 0, "segmentation": {"size": [1145, 1565], "counts": "ci]^11gS11000000000000000000000000000000000000000000001Oncn10R\\QN1O000O101O00000O1000000000000000000O1000000000000001O00000000000000000000000000000000000000001O00000000000000000000000000000000000000000000000000001O000000000000001O0OV`^2"}}, {"image_id": 105, "category_id": 2, "bbox": [1297.0484619140625, 896.1871948242188, 173.73974609375, 8.37451171875], "score": 0.4953448474407196, "association_id": 0, "segmentation": {"size": [1145, 1565], "counts": "ci]^11gS110000000000O10000000000000000000000001O0000000O10neX20RZgM0000000000001O000000000000000000000000000000000000000001O0000000000_Wk3"}}, {"image_id": 105, "category_id": 2, "bbox": [140.44024658203125, 897.7755126953125, 128.346435546875, 92.70660400390625], "score": 0.4855527877807617, "association_id": 0, "segmentation": {"size": [1145, 1565], "counts": "jYW71`h]11U[cN3O1O2N1O1N10001O0000000100O001N2O1N2Nd_Z]1"}}, {"image_id": 105, "category_id": 1, "bbox": [231.509765625, 801.5303955078125, 104.66000366210938, 127.1729736328125], "score": 0.053315117955207825, "association_id": 0, "segmentation": {"size": [1145, 1565], "counts": "Tda82`02cR1OZmN:_R1a0O1O0O1O2O0O2N3M3N1O1O1N100O3M3M3N7I2N3M3L6Kd0[O6K2N1O1N2O2N1N2O2N00001O000000O10000O10000O1O100O2O0O1O1O1000000000001N1000O11O000000000000O11O0O101N100O100000000000000001O01O010O3Jm]mZ1"}}, {"image_id": 105, "category_id": 1, "bbox": [32.94330978393555, 808.0944213867188, 200.13143920898438, 34.80303955078125], "score": 0.051965221762657166, "association_id": 0, "segmentation": {"size": [1145, 1565], "counts": "nlS21]S1>I4O2N1O2O0O1O2N100O1O10000O100O100O1000000000000000000000O100000000O100000000O10000O100O100O100001O00000000000000001O000000000UmNTOiR1l0WmNTOiR1l0WmNTOiR1i0WmNXO0OiR1h0XmNXO00hR1h0[mNXOeR1h06N2O2N1O1000000000000000001O00002N002N001O00mlNDjR1;VmNEjR1A6I5J5K6J5mNhBPKf=i4k0I7[Od0C>C>C=oL`@X1\\a0E9K6J7GS`^<"}}, {"image_id": 106, "category_id": 1, "bbox": [181.75350952148438, 113.03704071044922, 110.84176635742188, 331.02386474609375], "score": 0.9999997615814209, "association_id": 5, "segmentation": {"size": [639, 735], "counts": "jZd3f0ob0`0C;]Oc0^Ob0_Oa0J5L5K5i_OaLe?o3L3M4L4M4J5J6K5K4K3O1O1O100N3M3N110O01O0100O10000O0O10001000100O1N3M3M3M2O1O2O2`NUJfDP6T;RJkDV6l:lISEZ6g0VIY8a0PGd6DUICOh99PGP8o8QHPGo7o8SHPGn7o8SHPGm7P9SHPGm7P9THnFm7R9SHmFo7R9RHlFo7T9QHlFP8S9PHnFY2JT2X9cKnFh1>b2d8fKnFd1d0d2^8hKnFa1j0d2Y8kKkF_1Q1c2U8PLgF[1Z1b2o7ULdFW1d1`2h7YLdFT1k1_2b7XLgFS1o1c2[7VLjFQ1Q2h2V7SLmFc0`2S1\\MYO^9gNjFd0f2o0fM]Om9D_Hd0YN\\OX90cH=dNWOf8?jHD[LE_22b8=jHDYOLW85eHIYOOX80dHMXO1PhT9"}}, {"image_id": 106, "category_id": 1, "bbox": [518.4848022460938, 147.9786376953125, 173.863525390625, 367.88458251953125], "score": 0.9999995231628418, "association_id": 2, "segmentation": {"size": [639, 735], "counts": "dfV:3jc03N2m\\OI[b09`]OM^b03a]O0]b00d]ON^b0Oe]OOaa0Oc^O0ONd`0n0]_OROYa0T1d05L4M3M3L4M3L5L3N[1dN=e_O`L_?V4I7J8F9F7J5K4L5_O`0M4K3M4H8F:M3M3O1O001O00001N1O1N2O1N2M3N210O10O0100O1M4K6K5J5J7SOYGXFm8f9VGTFP9h9h0L5K5K2M3N2N1O2M3N3M3M1O2N1O1O1N2O1O1O1O1O1O001O01O0000000O1000001O000O101M3J6TOl0J;F9I5K5J4L4I7]Oc0G9H7_Ob0_O`0F;I6L6J7G8G9K5L4L3O4K3N3L3N2N2M4M3L3N3L3M3N3L4L6J7J4K4M3M3M3M4L2M3N1O1N2N2N2N2N3L6I9Ea0XO`]Q1"}}, {"image_id": 106, "category_id": 2, "bbox": [29.41819190979004, 401.6120300292969, 71.9155502319336, 28.450958251953125], "score": 0.9999986886978149, "association_id": 1, "segmentation": {"size": [639, 735], "counts": "STc05ic01O2O000O1O2L3O1O2N100000001O000000010O0001O0000100O000001N1O1O1O100O2O0000000O100000000O100000000000000001O001O1O1O1O1N2O1O001O1N2N1O2O1M3NUW[<"}}, {"image_id": 106, "category_id": 2, "bbox": [408.5962829589844, 452.7307434082031, 150.35604858398438, 52.660064697265625], "score": 0.9999984502792358, "association_id": 0, "segmentation": {"size": [639, 735], "counts": "cYP81jc05O1O001O1d\\OMjb04T]OOkb00U]O1kb0OS]O3lb0Oo\\O4Rc0=O0000010O0000010O1O0010O01O0010O0001O00001O0000001O000O2O00000O1000001O000000001O0IkNd]OU1[b0lNf]OS1Yb0oNf]OQ1Zb0oNf]OQ1Zb0oNf]OQ1Zb0oNf]OQ1Zb0oNg]OP1Yb0POg]OP1Yb0POg]OP1Yb0POg]OP1Yb0POg]OP1Yb0POg]OP1Yb0POg]OP1Yb0POg]OP1Yb0POh]Oo0Xb0QOh]Oo0Xb0QOh]Oo0Xb0QOi]On0Wb0ROi]On0Wb0ROi]On0Wb0ROi]Oo0Vb0QOj]Oo0Vb0QOk]On0Ub0ROk]On0Ub0ROk]On0Ub0ROk]On0Ub0SOk]Ol0Ub0UOj]Ol0Ub0TOk]Ol0Ub0TOl]Ok0Tb0VOk]Oj0Ub0VOk]Oj0Ub0WOk]Oh0Ub0YOj]Og0Vb0YOj]Og0Vb0YOj]Oh0Ub0YOk]Of0Vb0YOj]Og0Vb0YOk]Of0Ub0ZOk]Of0Ub0ZOl]Oe0Tb0[Ol]Oe0Tb0\\Ok]Od0Ub0\\Ok]Od0Ub0]Oj]Oc0Vb0]Oj]Od0Ub0\\Ok]Od0Ub0]Oj]Oc0Vb0]Oj]Oc0Wb0]Oi]Ob0Wb0^Oi]Ob0Wb0^Oi]Ob0Wb0SOd]O85e0[b0ZOe]Of0[b0ZOf]Oe0[b0ZOe]Of0[b0ZOe]Of0[b0ZOf]Oe0Zb0[Of]Oe0Zb0[Of]Oe0[b0ZOe]Of0[b0[Oe]Od0[b0\\Oe]Od0\\b0[Od]Oe0\\b0[Oe]Oc0]b0\\Oc]Od0^b0[Oc]Od0]b0\\Oc]Od0^b0ZOd]Od0^b0[Ob]Oe0mb0O0O100O2O1N2O0O2O001N2O000O2O1O1NmNM^^O0ca00V101O0000Ul_3"}}, {"image_id": 106, "category_id": 2, "bbox": [201.40603637695312, 434.5367126464844, 104.10513305664062, 48.24139404296875], "score": 0.9999983310699463, "association_id": 5, "segmentation": {"size": [639, 735], "counts": "XPQ42lc02N1O2O000O100O10000O1000000O2O0O1O1O1^OCb]O>\\b0Da]O>^b0D`]O=`b0C_]O>bb0A^]O?Qc00O101O000O100O101M21O0000001O000000O101O0000000000000000O10000000O100000O10O10000O1O1000000O101N1O1O10001N100O100O2O000O1O1001O000N2BX]ODjb03f0N1M4H[\\O0]\\^8"}}, {"image_id": 106, "category_id": 1, "bbox": [339.4096984863281, 137.2775421142578, 207.20138549804688, 316.14947509765625], "score": 0.9999977350234985, "association_id": 6, "segmentation": {"size": [639, 735], "counts": "fb[71c03bb05S]O2d>HWEl0f:VOXEm0e:TOZEo0c:SO\\En0c:SO[EP1a:TO\\EP1_:WO[El0`:_OWEc0g:ASEc0l:]OVE>m:CSE8P;IRE3P;MQE0Q;1PEKQ;6PEHQ;8QEDQ;=aCkNYOi0V=<`C]OfN:k=8^CJXN3Y>5\\CS1dL@]5m9WKeF_OB0n0Y5k8YKdF^ODNn0\\5h8ZKfFZOFOm0\\5g8]KdFXOHOm0\\5g8_KbFUOLNm0^5d8`KcFSOLNO18^5Z9bK^FTO2JN28^5Z9cKYFXO6EO27_5[9cKTF\\O:@025a5]9bKnEAT1\\O@b5^9\\LSGQN]Oe5`9[LRGPN\\Og5b9YLRGoMYOl5e9VLQGoMXOm5f9TL\\FnM241d5a9ZL[FoM254_5_9^LZFoM159[5\\9aLYFPN15>V5X9eLYFPN15d0P5R9lLWFQN14m0h4k8SMVFRN23n0g4j8UMRFVN3OQ1f4j8WMmEYN5KS1f4k8jMQF`MQ1i4n8iMnE`Mo0j4T9WNjFk1V9UNhFm1X9SNfFn1[9RNcFP2^9oM`FQ2b9PN\\Fk1k9TNTFd1V:eKWEm1c0T2a:iKTEP2:n1i;PNWDm1m;RNSDm1o;SNPDk1TD`0TLe@W2m`0Cc0]O9G:C=BdVk3"}}, {"image_id": 106, "category_id": 1, "bbox": [77.54034423828125, 120.60894775390625, 120.91410827636719, 349.6290588378906], "score": 0.9999957084655762, "association_id": 4, "segmentation": {"size": [639, 735], "counts": "Yhg17_c0k0oNe0G`MSB[2Q>aMTBm1FQMX>n0YBm1DoLU>6eA=h0Y2CPMQ>2nA?e0Z2`>`MgA0nNh1^?SNiANROl1X?oM`BP2j?J3N1N2N2O1O1O1O1000000000O1000O1001O0O10000000000000000000000O10001O00O10O10000O10000O10000Em\\OJSc05n\\OKRc05o\\OIRc06o\\OJQc05P]OJQc06P]OHQc08o\\OHQc07Q]OGQc08;O3M4J`cl9"}}, {"image_id": 106, "category_id": 2, "bbox": [46.222373962402344, 368.456787109375, 56.521141052246094, 36.257659912109375], "score": 0.960213303565979, "association_id": 0, "segmentation": {"size": [639, 735], "counts": "Tid18dc06]\\OC]c0c0L4L1000000000000O10O2O002M3M3N2L`PZ<"}}, {"image_id": 106, "category_id": 1, "bbox": [30.39198875427246, 126.57569122314453, 231.75022888183594, 322.44830322265625], "score": 0.9439724087715149, "association_id": 0, "segmentation": {"size": [639, 735], "counts": "Yfi1`0dc0J6Ik\\28`bMa0M2N1O1O100S@SOgl0kCKS<6lCLVOGT:S^OBna0>Q^OBoa0>Q^OBPb0>c]ODNN_b0>c]ODNN_b0?b]OCON_b0`0a]OBOO`b0?a]OBOO`b0?a]OB0N_b0`0b]OAON`b0b0a]O_Ohb0a0Y]O^Ogb0b0:1J^Oo\\Oc0Pc0^On\\Oc0Rc0^Om\\Ob0Rc060001O001N1000000000001O000000000001O01O01O1O1O2N0010O01O001O1O1O000000001O01O0001O010O001O1O1O001O00g\\O_OUc0`0j\\OAVc0`0h\\OAYc0c01^Of\\OM1:ec0H\\\\ONfc00ado2"}}, {"image_id": 106, "category_id": 2, "bbox": [193.0583953857422, 368.0992126464844, 43.625457763671875, 13.11492919921875], "score": 0.8690177798271179, "association_id": 0, "segmentation": {"size": [639, 735], "counts": "bih35ic02N1O100000001O000000001O000000000001O000001O01O00000001O000001O000OcPl9"}}, {"image_id": 106, "category_id": 2, "bbox": [326.1557922363281, 474.78387451171875, 89.30572509765625, 34.461212158203125], "score": 0.731048047542572, "association_id": 0, "segmentation": {"size": [639, 735], "counts": "lSl6=ac04M7I3M1O0000000001O01O00010O0001O0001O01O0000001O001O00000000000000000O100000000O00100O1O2O000O100000001O001N101O1N2O2M3HY\\O1_^X6"}}, {"image_id": 106, "category_id": 2, "bbox": [69.01560974121094, 369.6012268066406, 34.788230895996094, 26.88818359375], "score": 0.6481780409812927, "association_id": 0, "segmentation": {"size": [639, 735], "counts": "Tid18ec05L8H3M10000O10000001O0O2O1N102M101N2Na\\Y<"}}, {"image_id": 106, "category_id": 2, "bbox": [623.8387451171875, 375.014404296875, 79.63372802734375, 32.5247802734375], "score": 0.5700833201408386, "association_id": 2, "segmentation": {"size": [639, 735], "counts": "hXX<112gc05K5M2L4N101L301000O1000000000000001O00000000]Om\\O:Tc0El\\O;Tc0Dn\\O;Rc0En\\O;Sc0Bo\\O>Yc00001O01O01O00010O00001O01O01O00001O000000000000O10000O10000000000000O2O00001N101O001N100O2N2Nebc0"}}, {"image_id": 106, "category_id": 1, "bbox": [682.1752319335938, 235.60328674316406, 42.3983154296875, 140.1981658935547], "score": 0.5172083973884583, "association_id": 0, "segmentation": {"size": [639, 735], "counts": "gi[=7^c0=[Oc0J7L3nMlNUAW1g>mNWAT1f>QOWAP1i>@d@c0[?A`@b0_?A\\@b0f?^OV@d0h?]OW@d0h?^OU@c0l?i1OO0010D;010000000000000100O1OcMa@:c?B]@?W`0mNh_OS1\\`0hNe_OX1]`0T13MM3002cM__OX1Qa0QN`_Oe1WS7"}}, {"image_id": 106, "category_id": 2, "bbox": [434.358642578125, 444.3570861816406, 178.78411865234375, 55.6702880859375], "score": 0.38936394453048706, "association_id": 0, "segmentation": {"size": [639, 735], "counts": "WY_8a0Vc0:M2N2O0000001O00001O00001N10001O000000001O000HmNd]OS1[b0nNf]OQ1Yb0POg]OP1Xb0QOi]On0Wb0ROi]On0Vb0SOj]Om0Vb0SOk]Ol0Ub0TOk]Ol0Ub0TOk]Ol0Tb0UOm]Oj0Sb0VOm]Oj0Sb0VOm]Ok0Rb0UOn]Oj0Sb0VOn]Oi0Rb0WOn]Oi0Rb0WOn]Oi0Rb0WOo]Oh0Qb0XOo]Oh0Pb0YOP^Og0Pb0YOP^Og0Pb0YOP^Og0Pb0YOP^Og0Pb0YOQ^Of0oa0ZOQ^Of0oa0ZOQ^Of0oa0ZOQ^Of0oa0ZOQ^Of0oa0ZOR^Oe0na0\\OQ^Od0na0]OR^Oc0na0]OR^Oc0na0]OR^Oc0oa0\\OQ^Od0oa0\\OQ^Od0oa0\\OR^Od0na0[OR^Oe0na0[OR^Oe0oa0ZOQ^Of0oa0[OP^Oe0Qb0ZOP^Oe0Sb0XOm]Oh0Sb0XOm]Oh0Sb0XOn]Og0Rb0YOn]Og0Sb0XOm]Oh0Sb0XOm]Oh0Tb0WOl]Oi0Ub0VOk]Oj0Ub0WOj]Oi0Vb0WOi]Oj0Xb0VOg]Oj0Zb0UOg]Oj0Yb0VOg]Oj0Yb0VOg]Oj0Yb0VOg]Oj0Yb0VOg]Oj0gb0000001O00000000001N1000000O2O001N2O0O101O1N2O1OBEY]O:fb0HY]O8fb0I[]O5_b0GW]O0O5;3_b0HV]O9U1`AmN^>S1bAnN]>Q1dAQOZ>o0fASOX>l0iAUOW>j0iAWOW>g0jAZOW>c0iA^OY>?hAA[>7jAIY>0kA0Ra00000001O000000000O100O1O1O1O1O1O1O12M3L6F]Yj8"}}, {"image_id": 106, "category_id": 2, "bbox": [538.9344482421875, 363.0436096191406, 162.35247802734375, 65.46157836914062], "score": 0.05124688893556595, "association_id": 0, "segmentation": {"size": [639, 735], "counts": "P[a:4ic06L00O2O2M2N1O^jc13lT\\NMk\\Of0nb09KPOX]OQ1gb04L4O1M3O]Oe]OD[b0;g]ODYb0;i]ODWb0;j]ODWb0l]OAUb0>m]O_OUb0`0f0O0O2O103L2N0010O01O1O10O01O000010O0001O01O000000001O0000000000000000O100000000O1000000O2O000O2Mbff0"}}, {"image_id": 107, "category_id": 1, "bbox": [386.4233703613281, 86.48715209960938, 71.324462890625, 204.65179443359375], "score": 0.9999997615814209, "association_id": 0, "segmentation": {"size": [384, 592], "counts": "`Tc47b;=E8J5K6J5L3UFdNh8f1QGfNb8c1UGfNd8_2L6K4Ki0VO=F5J5L2M4L3M2M4M4L2O1O3M5K3M4L3M2N001O01O001O2N1O1nNYJiKh5R4dJeK^5V4jJfKX5V4nJfKT5V4SKdKP5W4`1L5J6J5L5J4M3L4L5L5K3N1O2O2L4M3L4N4L4TNYFi0U;YO>@h^b1"}}, {"image_id": 107, "category_id": 1, "bbox": [326.6506042480469, 65.31743621826172, 52.297576904296875, 137.6842041015625], "score": 0.9999997615814209, "association_id": 0, "segmentation": {"size": [384, 592], "counts": "Ygj3U1i:3M2N1O010O1O3M200N2N2_FbN_8`1]GgN_8\\1ZGlNa8^2I6L2M2J6N2N2O1O10001O001O1000O4K8G4L3I7K5K5M3L5K4K6K5\\Od0J5ZObEDe:6f0KnPb2"}}, {"image_id": 107, "category_id": 1, "bbox": [20.037065505981445, 129.33677673339844, 82.1885757446289, 254.66322326660156], "score": 0.9999997615814209, "association_id": 0, "segmentation": {"size": [384, 592], "counts": "Ub9>`;[a0Cc^O>^a0B`^O>aa0C^^O;ea0D[^O;fa0FY^O9ha0HW^O9ga0IW^O9ga0IU^O:ja0GT^OSb0Bj]O`0Wb0@f]Ob0[b0]Od]Oe0\\b0[Od]Oe0[b0\\Od]Oe0\\b0[Oc]Od0_b0]O]]Od0eb0\\OZ]Od0gb0]OX]Oc0hb0^OV]Od0hb0^OV]Od0gb0_OV]Oc0ib0@R]Od0lb0^OR]Oc0nb0_Oo\\Ob0Pc0Bj\\O`0Sc0W2iMnK_@U4_?TLY@n3e?XLV@i3i?ZLS@h3m?[Ln_Of3S`0]Lg_Oe3Z`0]Lc_Oc3^`0`L^_O`3d`0bLY_O^3h`0fLR_O\\3n`0hLg^O^3Za0c11N2N2N2N2O1O1O1N2N2N2O1O100O1O1O1O2O000O2O002N7iJd]O\\4Wc0I2M2O_\\O^Leb0a3Z]OdLbb0\\3^]OhL_b0`4M2O0O00001O2N2M2O0O2O3L2O1OTNU^ObMla0P2b^OPN^a0f1l^O[NSa0a1Q_OQO]`0k0g_OTOY`0i0k_OVOU`0g0m_OYOU`0b0o_O^OT`0;P@ER`05S@Jn?0Z@Mj?K^@0i?E`@6jc0K3M3M3M4L4L4L3M2N3L8H7I5Kej_;"}}, {"image_id": 108, "category_id": 2, "bbox": [167.98764038085938, 346.1837158203125, 225.04183959960938, 54.568511962890625], "score": 0.9999997615814209, "association_id": 1, "segmentation": {"size": [768, 1024], "counts": "gko36gg04KG`XO<^g04K401O0O101N100O1O2O0000000O1000001O0O100000000000000001O01O00000001O0001O00000001O0001O000010O0000001O01O0001O0001O000000000000001O0001O01O0000000000001O000000000001O0001O0000000000000000000001O000000000000000000000001O0000000000000O100000000O10000000000O100000000000000000O10000000000000001O0000000000001O000000000000000000001O0000000O2O000000001N100000001O0000001O00000O10001O000O10001O000O101N1000000O2O0O2N101O0O10001N1O2M4LUdl>"}}, {"image_id": 108, "category_id": 2, "bbox": [325.03863525390625, 303.435791015625, 63.9400634765625, 20.855377197265625], "score": 0.9999980926513672, "association_id": 3, "segmentation": {"size": [768, 1024], "counts": "aQd71ng02O1O2N1N4M3M4L1O0000000001O01O000000000001O00000000000010O00O1000001O000000001O000O101O0000000O2O00000000000O2O00000O2O0O2NXfl>"}}, {"image_id": 108, "category_id": 2, "bbox": [544.23974609375, 396.6148986816406, 246.33563232421875, 52.414764404296875], "score": 0.9999938011169434, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "eTd=1og01O001O1O001O001O2N000010O000001O001O000010O000000000001O0001O00000010O0000000000001O0000000001O0001O00000000001O01O000001O0001O0001O01O01O001O01O0000010O000001O01O00001O010O00010O0000001O00010O0000001O01O01O000000010O0000001O01O0001O000010O0000010O000001O01O0000001O0001O0001O0001O0001O0001O0001O0001O01O000001O01O00000001O0001O000000000010O0000000000000000000000001O0000000O10001O0O100000001N101NYje5"}}, {"image_id": 108, "category_id": 2, "bbox": [400.8140869140625, 429.23040771484375, 450.17376708984375, 101.541015625], "score": 0.9999464750289917, "association_id": 2, "segmentation": {"size": [768, 1024], "counts": "mmU:1og0001N101O1O00001O0000000000000000001O0000000000000000001O0001O0001O00001O0001O0000000001O01O000000000001O01O000001O0001O0000001O01O000001O00000000000000000000001O000000000000000000000000001O0O101OBOnXO0Pg03PYOLPg04PYOLPg05=0000000000000eXOKkf05UYOKlf04SYONlf02TYONlf02TYONmf01SYOOmf01SYOOmf02RYOOmf01SYOOmf01SYOOnf00RYO1mf0ORYO2nf0MSYO4Sg0JgXO7Yg0JeXO7Zg0KdXO6\\g0KbXO7]g0600000001N1000001O01O100O1O010O01O010O001O01O0001O01O001O001O010O00001O0001O01O00000001O01O0001O01O01O00001O01O000001O0001O0000010O00010O000001O0001O000001O01O0010O010O0001O01O01O0000001O01O01O000010O0001O01O01O0000001O00001O100O001O001O001O1O001O001N3NWP?0ho@1O2O0O2O1O0000001O000O2O00001O001O0000001O0000000000001O00000010O000001O0000000010O00001O0001O01O0001O01O0001O0001O0010O01O10O010O000010O000000010O00000100O010O1O10O0001O01O0000001O01O0001O0000010O000001O01O00001O00010O00001O00001O01O0001O0000000000001N100000001O0000001N2O0N3NhWT4"}}, {"image_id": 108, "category_id": 1, "bbox": [753.0447998046875, 328.45269775390625, 28.7042236328125, 86.9974365234375], "score": 0.9813358783721924, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "fRea0]1`f04M3M201N011XZOYNTe0h1eZOaNYe0W2K101N100O10000001O9G3M3M3M1O002N1O2N2N3FoTe5"}}, {"image_id": 108, "category_id": 2, "bbox": [158.38540649414062, 560.163330078125, 57.03153991699219, 23.46435546875], "score": 0.979993462562561, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "eQg38eg05M101N10001O00001O001O00010O001O00010O01O010O001O001O00001O01O00O2O01O01N11O01O001O001O001O001O1O001O0O2O1O2Mmmnb0"}}, {"image_id": 108, "category_id": 2, "bbox": [833.382080078125, 445.1294250488281, 100.59173583984375, 24.083648681640625], "score": 0.9682335257530212, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "oUgc02ng00O2O1O00001O000000010O00000000010O0000001O01O0000010O0000000010O000001O000001O01O000001O01O0001O000001O0001O0001O0000010O0000001O01O00010O000001O0000001O00ca]2"}}, {"image_id": 108, "category_id": 1, "bbox": [527.2059326171875, 197.38589477539062, 42.06689453125, 162.841552734375], "score": 0.89564049243927, "association_id": 2, "segmentation": {"size": [768, 1024], "counts": "RP]<;P`1FgWO;DFnXO8Pg0LoXO4nf00mXO4jf02^YOEie0V1ZZOgN_e0a1>1O2i[O^Noa0c1P^O_NZNLVc0f1`^O_NVN2Vc0_1b^ObNWN0Vc0^1c^OPO`a0R1]^OaNQb0a1m]O_NSb0j1a]OYN^b0h1d]OWN[b0i1f]OUN[b0m1d]OQN]b0P2d]OmM]b0T2d]OgM_b0Z2c1100U\\OgMma0[2P^OfMPb0X2m1O2O00mZOkM[d0h0W[O;>nN\\d0b0`[O84UO_d0?f[O\\OTOl02gb07^]O6`f0A__f:"}}, {"image_id": 108, "category_id": 1, "bbox": [525.9775390625, 292.7801513671875, 39.019287109375, 107.40164184570312], "score": 0.8670139312744141, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "Zj`<9bg07L4L5L4L3nYOYOfd0l0Q[O[Omd0m1N2N1O10O10N210O0O20O000gNY[OYOkd0`0\\[O[O`d0EeZOn0P1ZO[d0GgZOm0R1YO]d0=`ZOBU1N^d07[ZOH8NPg04c0M10WXO0cg0?JMdeh:"}}, {"image_id": 108, "category_id": 1, "bbox": [817.2685546875, 372.19207763671875, 30.73114013671875, 75.054443359375], "score": 0.35617828369140625, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "h]Wc01ag0c0G4I8L3M3N2L4L4K5L4H8N200O100O1001O00000O2N1C=J7ROjYOJ\\f00P]T4"}}, {"image_id": 108, "category_id": 1, "bbox": [777.7946166992188, 281.9329528808594, 39.9332275390625, 101.35214233398438], "score": 0.3316429555416107, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "ViWb0151bg09K6J7Id0^O2O1N3N3M1O1O002N001O2N4L2N1O4L1O1O1O8H1O1O0000FeZOoM[e0P2jZOkMWe0U2:00O10000O1L4K5J7H\\Wj4"}}, {"image_id": 108, "category_id": 2, "bbox": [486.1359558105469, 403.8760986328125, 327.1097717285156, 84.16946411132812], "score": 0.3199433386325836, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "Uf];3lg02O0O101O0000000000000O1000000001O0000001O0001O00000001O0001O000000001O000000000001O001O010O0000AKTYO5jf0MUYO3kf0MUYO3kf0NTYO2lf0NUYO1kf0OUYO1kf00TYO0lf00TYO0lf00TYO0lf00UYOOkf02TYONlf02TYONlf02TYONlf02TYONlf03SYOMmf03SYOMmf03SYOMmf03SYOMnf02RYONnf03QYOMof03QYOMPg03oXOMRg03mXOMSg04lXOLTg04mXOLSg04lXOLTg04lXOLTg05jXOMVg02jXONVg02jXOOVg01iXOOWg01hXO0Xg01gXO0Yg00eXO1[g0OeXO2Zg0;O000002N1O100O0010O0010O0000010O001O01O01O01O01O0001O000000000001O000001O000000010O00000bN_O^[Oa0ad0_O_[Oa0ad0_O_[Oa0`d0A_[O?ad0A_[O?ad0A_[O?bd0A^[O>bd0B^[O?ad0A_[O?ad0B_[O=ad0C_[O=bd0B^[O?ad0A`[O>`d0B`[O>`d0B`[O>`d0B`[O?_d0Aa[O?`d0@a[O?_d0Aa[O?_d0B`[O>`d0Ba[O=_d0Ca[O=_d0Cb[O<^d0Db[O=]d0Cc[O=]d0Cd[O<\\d0Dd[O<\\d0Ec[O;]d0Ed[O;[d0Ee[O;[d0Ee[O;[d0Ef[O:[d0Fd[O:\\d0Fd[O:\\d0Gd[O8\\d0Hd[O8]d0Hb[O8^d0Hc[O7]d0Jb[O7]d0Ic[O7^d0Hc[O7]d0Ic[O6^d0Ka[O5_d0Kb[O4_d0Kb[O4^d0Ld[O2\\d0Nf[OO[d01f[OM\\d03c[OL^d04g1000010O00000001O00010O00001O000001O0000001O0000001O01O0001O0010O001O01O00000000001O00001O00000001O01O000001O1O00001O001O01O01O0001O000001O000000000010O0001O000001O01O00000001O000000000000010O0000000O10000000000000001O001O00000O2O000000Wbc5"}}, {"image_id": 108, "category_id": 2, "bbox": [780.0050048828125, 414.39544677734375, 38.95947265625, 8.4371337890625], "score": 0.2918998599052429, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "od[b01og0001O0000001O00001O000000001O01O0000010O00000000001O000000001O0000mjj4"}}, {"image_id": 108, "category_id": 1, "bbox": [466.4383544921875, 318.44525146484375, 75.8419189453125, 107.78970336914062], "score": 0.1374628096818924, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "Vk_;T:ClE;U:GkE6V:LjE1W:2hELX:6iEFY::hECY:?fE_O[:c0dEZO^:g0bEWNeMoMjB2N101N2N;E4L2N1O3M3M3L4nChLa:Y3\\ElLa:V3YERMc:o2VEYMh:j2oD]Mo:h2iD]MV;f2eD]MY;P4N2M3N2N2O1N2K5L4N2O001O0001N10O1O10O10001N2M3K5YOf0L5N1O00O1eNdK`F[4a9hK\\FX4d9kKYFV4g9nKTFS4l9YLfEi3Y:Z1000O1O1O1O100O100000000O2O1N3NRF`Jl8Z5QGmJP9n4oFWKV9a4iF`Kc9U4ZFnKh9P4TFSLn9l3lEYLU:i3eEZL]:o40O2O0O001O1N3L4M3L3N101O0O10001N3M3L4L4L3N2N4J<]M]2I6K5K6I`0XOVa[5"}}, {"image_id": 109, "category_id": 2, "bbox": [242.75662231445312, 289.06640625, 184.43753051757812, 137.20513916015625], "score": 0.9999853372573853, "association_id": 1, "segmentation": {"size": [533, 799], "counts": "\\bT41b`03M3N101O001N2O1O001O001O001O1O100O1O1N2O2N3M1O1O1O1O1O1O1O1O1N2O1N2N2N2N2O0O2O1M3N2N2N2N1O2M2M3YNoMhDT2T;PNiDR2V;QNgDQ2X;oMgDR2Y;oMdDS2[;oMYD]2f;cMoCh2Q_3VAcLj>_3RAbLP?^3l@dLU?`3e@bL[?Q41O001O1O002N1O3M2N1O10O01O00001O00000O10000000000000001O001O0O2O1O1O0O2O001O00000001O1O00100d@VL`>k3\\A]L_>c3_AaL_>`3^AcLa>^3]AdLb>]3\\AeLd>[3ZAfLf>[3XAgLh>Z3UAgLl>Z3PAhLQ?T40O0010O01O010O001N101O1O1O1N101O000O2O0O2N1O2N2M3jNQAUMT?h2T1M3N1O2N101N101O1N2O001N10001O0O2O00001O1O100O001O00001O00001O001O1O001O100O00001O00001O001O001O1O1O001O001O00001O001O1O1O001O1O001O001O001O2N1O1O001O001N11O01O001O001O1O1O001O000000010O0001O001O001O1O01O0001O01O000010O01O1O00001O0000001O01O000001O0000001O010O00100O0010O010O0001O00001O00001O001O001O1O1N2O1N2O2M2N3M2O1N2N2NYnZ3"}}, {"image_id": 110, "category_id": 2, "bbox": [9.3846435546875, 568.623291015625, 403.88665771484375, 67.9180908203125], "score": 0.9999996423721313, "association_id": 1, "segmentation": {"size": [640, 640], "counts": "Xj6a0_c01N100O2O000000001O001N101O1O0000001O000000001O00001O001O001O00000000001O000000001O001O1O00001O0000000000001O00001O000000001O0000000000001O0000001O000000000000001O0000000000001O00000000000000000000000000001O00000000000000000000000000001O0000000001O00000000000001O00000001O000000000000001O000000001O01O0000000001O000000000000001O0000000000000000000000000000000000000000001O0000000000000000001O001O001O001O010O00001O0000001O000000000000001O0000000000001O0000001O00000000001O00000000001O000000000001O000001O00000000001O1ZOU]O5lb0HW]O7Zc0O001N100000000000000000000000000000000000000000O100O1N2O1O1N2O100O10000O10000000001N100000000000000010O0000010O000000010O0000000001O0001O00000001O00000001O000000000000000000000000000000001O000000001O000O10001O000000001O0O2O002Ldhn4"}}, {"image_id": 110, "category_id": 2, "bbox": [72.49165344238281, 332.4353942871094, 271.48980712890625, 20.948638916015625], "score": 0.9999988079071045, "association_id": 3, "segmentation": {"size": [640, 640], "counts": "`n]12mc02O1O0O100000000000000000000000001O000000000000000000000000000000001O00000000001O00000000000000001O00000000000000000O1000001O00000000000000000000000000001O000000000000000000000001O000000000000000000000000000000000000000001O000001O0000000000000000000000000000000000001O00000000000001O0000000000000000000001O000000000000001O000000000000000000001O000000000000000000000000001O000000000000000000000000001O000000000000000000001O000000000000000000000000000000001O0000000000000000000000000000000000000001O0001O000000000000000O10000000001O000O10Wmi5"}}, {"image_id": 110, "category_id": 2, "bbox": [221.8938446044922, 239.5956268310547, 399.3778076171875, 64.12452697753906], "score": 0.998374342918396, "association_id": 0, "segmentation": {"size": [640, 640], "counts": "RTa52nc0001O0O10001O0000000O100000001O00000O10001N10001O00000`\\OFYc0Vc0Bj\\O>Vc0Bj\\O>Vc0Bi\\O?Wc0Ai\\O?Wc0500000000000001O0000000000000000000000000000000000000001O0000001O0000001ZOg\\Oc0Yc0]Og\\Oc0[c000O10000000001O00000000000000000000000000000000000O10O11O000000000000000O100000000000000000000O1000000000000000000O1000000000000000000000000000000000000000000O100000000000000000000001O00000001O000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000O1000000000000000000000000000000000000O2O000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Ga\\O1_c0Ob\\O0^c00c\\OO]c00d\\O0\\c00d\\O0\\c0Of\\O0Zc00f\\O0[c0Oe\\O1[c0Of\\O0Zc0Og\\O1Yc0Og\\O1Yc0Oh\\O0Xc0Oi\\O1Wc0Oi\\O1Wc0Oi\\O1Wc0Nj\\O2cc0Noh4"}}, {"image_id": 110, "category_id": 1, "bbox": [202.1602020263672, 206.8860321044922, 178.8246612548828, 138.3310089111328], "score": 0.9920613765716553, "association_id": 3, "segmentation": {"size": [640, 640], "counts": "lcV4?cb0ET^Oa0fa0FU^O>ga0DW^O>ga0DW^O>ha0CV^O`0ga0Q1K4M1N2O001O2N5K1O1O010O101O1O0O1000O2O000000001N5L2N1Oi^OjMc`0V2Z_OmMf`0T2X_OmMg`0T2W_OmMj`0e20O1O1O100O100O2O0O010O01001O0O010O001O2M101N2O0O2L4G9L4M3O0O2N2N2N2N2O0O2O1O2N1O1O1O10O01O1O10O01O1O2O1O000O010O1O2N3M2N010O1O1O2N1O1O100O2N1O2N10O010O010000001N1000010O0O100O10O001O10O01O001N101N101N3M3M`ia5"}}, {"image_id": 110, "category_id": 2, "bbox": [445.3407287597656, 89.22557067871094, 157.34011840820312, 9.49908447265625], "score": 0.9874173402786255, "association_id": 2, "segmentation": {"size": [640, 640], "counts": "njP91oc00O1000000000000000000000000O100000000000000000000000000O1000001O000000000O10001O000000001O00000O1000000000000000000000000000000000000000000000000000000000000000000000000000000001O1O001O000000000000000000000000O10000O10O10O100000000000000000000000O1000001O002N1O002NQ]k0"}}, {"image_id": 110, "category_id": 2, "bbox": [172.0583953857422, 206.51707458496094, 453.34173583984375, 122.31010437011719], "score": 0.9760921597480774, "association_id": 0, "segmentation": {"size": [640, 640], "counts": "VlS64kc01O101N100O2O000O10001O000000001O00000000001O01O0000000000000001O000000000000001O00000000001O000O1000001O000O1000001O0000000000001O000O10000000001O0000000000001O000000001O00000000000000000000000000000nNXOl^Oh0Ta0YOk^Og0Ta0[Ok^Oe0Ua0[Ok^Oe0Ua0\\Oj^Od0Ua0]Ok^Oc0Ua0]Ok^Oc0Ua0]Ok^Oc0Ta0_Ok^O`0Va0@j^O`0Va0@j^O`0Ua0Ak^O?Ua0Aj^O`0Va0Ai^O`0Va0@j^O`0Va0@j^O`0Va0@j^O`0Ua0Ak^O?Ua0Ak^O?Ua0Ak^O?Ua0Ak^O?Ua0Ak^O?Ua0Ak^O?Ua0Ak^O?Ua0Ak^O?Ua0Ak^O?Ua0Ak^O?Ua0Ak^O?Ua0Ak^O?Ua0Ak^O?Ua0Ak^O?Ua0Ak^O?Ua0Ak^O?Ua0Ak^O?Ua0Ak^O?Ua0Ak^O?Ua0@l^O`0Ta0@l^O`0Ta0@l^O`0Ta0@l^O`0Ta0@l^O`0Ta0@l^O`0Ta0@l^O`0Ta0_Ol^Ob0Ta0^Ol^Ob0Ta0^Ol^Ob0Ta0]Om^Oc0Sa0]Om^Oc0Sa0]Om^Oc0Sa0\\On^Od0Ra0\\On^Od0Ra0\\On^Od0Ra0[Oo^Oe0Qa0[Oo^Oe0Qa0[On^Of0Ra0YOo^Og0Qa0YOo^Og0Qa0YOo^Og0Qa0YOo^Og0Qa0YOo^Og0Qa0YOo^Og0Qa0YOo^Oh0Pa0XOP_Oh0Pa0XOP_Oh0Pa0XOP_Oh0Pa0XOP_Oh0Pa0YOo^Og0Qa0YOo^Og0Qa0YOo^Og0Qa0YOo^Og0Qa0YOo^Og0Qa0YOn^Oh0Sa0WOm^Oi0Sa0WOm^Oi0Sa0WOm^Oi0Sa0WOm^Oi0Sa0WOm^Oi0Ra0YOm^Og0Sa0YOm^Of0Ta0ZOl^Of0Ta0ZOl^Of0Ta0ZOl^Of0Ta0ZOl^Of0Ta0ZOl^Of0Ta0ZOl^Of0Ta0ZOl^Of0Ta0ZOl^Of0Ta0ZOl^Of0Ta0ZOl^Of0Ta0ZOl^Of0Ta0ZOl^Of0Ta0ZOl^Of0Ta0ZOl^Of0Ta0ZOl^Of0Ta0ZOl^Of0Ta0ZOl^Of0Ta0[Ok^Oe0Ua0[Ok^Oe0Ua0[Ok^Oe0Ua0[Ok^Oe0Ua0[Ok^Oe0Ua0[Ok^Oe0Ua0[Ok^Oe0Ua0[Ok^Oe0Ua0[Ok^Oe0Ua0[Ok^Oe0Ua0[Ok^Oe0Ua0[Ok^Oe0Ua0[Ok^Oe0Ua0[Ok^Oe0Ua0[Ok^Oe0Ua0[Ok^Oe0Ua0[Ok^Oe0Ta0\\Ol^Oe0Sa0[Om^Oe0Sa0[Om^Oe0Sa0[Om^Oe0Sa0[Om^Oe0Sa0\\Ol^Od0Ta0\\Ol^Od0Ta0\\Ol^Od0Ta0\\Ol^Od0Ta0\\Ol^Od0Ta0\\Ol^Od0Ta0\\Ol^Od0Ta0\\Ol^Od0Ta0\\Ol^Od0Ta0\\Ol^Od0Ta0\\Ol^Od0Ta0\\Om^Oc0Sa0]Om^Oc0Sa0]Om^Oc0Ra0^On^Ob0Ra0^On^Ob0Ra0^On^Ob0Ra0^On^Ob0Ra0^On^Ob0Ra0^On^Ob0Ra0^Oo^Oa0Qa0_Oo^Oa0Qa0_Oo^Oa0Qa0_Oo^O`0Ra0@n^O`0Ra0@n^O`0Ra0@n^O`0Ra0@n^O`0Ra0@n^O`0Ra0@n^O`0Ra0@n^O`0Ra0@n^O`0Ra0@n^O`0Ra0@n^O`0Ra0@n^O`0Ra0@n^O`0Ra0@n^O`0Ra0@n^O`0Ra0@n^O`0Ra0@n^O`0Ra0@n^O`0Ra0@n^O`0Ra0@n^O`0Ra0@n^O`0Ra0@n^O`0Ra0Am^O?Sa0Am^O`0Ra0@n^O`0Qa0Ao^O?Qa0Ao^O?Qa0Ao^O?Qa0Ao^O?Qa0Ao^O?Qa0An^O`0Ra0@n^O`0Ra0@n^O`0Ra0@n^O`0Ra0Am^O?Sa0Am^O?Sa0Al^O`0Ta0@l^O`0Ta0@l^Oa0Sa0_Om^Oa0Sa0_Om^Oa0Sa0_Om^Oa0Sa0_Om^Oa0Ra0@m^Oa0Sa0_Om^Oa0Sa0_Om^Oa0Sa0_Om^Ob0Ra0^On^Ob0Sa0]Om^Oc0Sa0]Om^Oc0Sa0]Om^Oc0Sa0]Om^Oc0Sa0]Om^Oc0Sa0]Om^Oc0Sa0]Om^Od0Ra0\\On^Od0Ra0\\On^Od0Ra0\\On^Od0Sa0[Om^Oe0Sa0[Om^Oe0Sa0[Om^Oe0Sa0[Om^Oe0Sa0[On^Od0Sa0ZOn^Of0Sa0WOP_Oh0Pa0TOT_Ok0Rb0O1N2M4MPT9"}}, {"image_id": 110, "category_id": 2, "bbox": [91.437255859375, 210.27403259277344, 548.562744140625, 63.39561462402344], "score": 0.5025287866592407, "association_id": 0, "segmentation": {"size": [640, 640], "counts": "RTn13mc01N2LK[\\O5ec04O00000O100000000O100000000O10000000000000001O000000000000000mNCc^O=]a0Cc^O=\\a0Dd^O<\\a0Dd^O<\\a0Ed]ONl0=`a0Ec]OOm0<`a0Ec]OOm0<`a0Ec]OOm0<`a0Ec]OOm0<`a0Ec]OOm0<`a0Ec]OOm0;aa0I_^O7aa0I_^O7aa0I`^O6`a0J`^O6`a0J`^O6`a0J`^O6`a0J`^O6`a0J`^O6`a0J`^O6`a0J`^O6aa0I`^O6`a0J`^O6`a0J`^O6`a0J`^O6`a0J`^O6`a0J`^O6`a0J`^O6`a0J`^O6ba0H^^O7fb001O00000000000000001O00000O101O0000001O00001O000O2ORXa2Oog^M1N101O00000hNMb^O5]a0Kc^O5]a0Kc^O6\\a0Jd^O6\\a0Kc^O5]a0Kc^O5]a0Kc^O5\\a0Ld^O4\\a0Ld^O5[a0Ke^O5[a0Ke^O5[a0Lc^O5]a0Kc^O5]a0Kc^O5]a0Kc^O5]a0Lb^O4^a0La^O5_a0Ka^O5_a0Ka^O6^a0Jb^O6^a0Ka^O5_a0Ka^O5_a0Ka^O5^a0Lb^O5]a0Kc^O5]a0Kb^O6^a0Jb^O6^a0Jb^O6^a0Jb^O6^a0Jb^O6^a0Jb^O6^a0Ka^O6^a0Jb^O6^a0Jb^O6^a0Jb^O6^a0Jb^O6^a0Jb^O6^a0Jb^O6^a0Jb^O6^a0Jb^O6^a0Jb^O7\\a0Jd^O6\\a0Jd^O6\\a0Jd^O6\\a0Jd^O7[a0Ie^O7[a0Ie^O7[a0Ie^O8Za0He^O9[a0Ge^O9[a0Ge^O9[a0Ge^O9[a0Ge^O9Za0Ie^O7[a0Ie^O7[a0Ie^O7[a0Ie^O7[a0Ie^O7[a0Ie^O7[a0Ie^O7[a0Ie^O7[a0Ie^O7[a0Ie^O7[a0Ie^O7[a0Ie^O7[a0Ie^O7[a0Ie^O7[a0Ie^O7[a0Ie^O7[a0Ie^O7[a0Jd^O6\\a0Jd^O6\\a0Jd^O6\\a0Jd^O6\\a0Jd^O6\\a0Jd^O6\\a0Jd^O6\\a0Jd^O6\\a0Jd^O6\\a0Kc^O5]a0Kc^O5]a0Kc^O5]a0Kc^O5]a0Kc^O5]a0Kc^O5]a0Kc^O5]a0Lb^O4^a0Lb^O4^a0Lb^O4^a0Lb^O4^a0Lb^O4^a0Lb^O4^a0Lb^O4^a0La^O5_a0Jb^O6^a0Jb^O6^a0Jb^O6^a0Jb^O6]a0Kc^O5]a0Kc^O5]a0Kc^O5]a0Kc^O5]a0Kc^O5]a0Kc^O5]a0Kc^O5]a0Kc^O5]a0Kc^O5]a0Kc^O5]a0Kc^O5]a0Kc^O5]a0Kc^O5]a0Kb^O6^a0Jb^O6^a0Jb^O6^a0Ic^O7]a0Ic^O7]a0Ic^O7]a0Ic^O7]a0Ic^O7]a0Ic^O7]a0Ic^O7]a0Ic^O7]a0Ic^O7]a0Ic^O7]a0Hd^O8\\a0Hd^O8\\a0Hd^O8\\a0Hc^O9]a0Gc^O9]a0Gc^O9]a0Gc^O9]a0Gc^O9]a0Gc^O9]a0Gc^O9]a0Gc^O9^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Ec^O;]a0Ec^O;]a0Ec^O;]a0Ec^O;]a0Ec^O;]a0Ec^O;]a0Ec^O;]a0Ec^O;]a0Ec^O;]a0Ec^O;]a0Ec^O;^a0Db^O<^a0Da^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=_a0Ca^O=^a0Db^O<^a0Db^O<^a0Db^O<^a0Db^O<^a0Db^O<^a0Db^O<^a0Db^O<^a0Db^O<^a0Db^O<^a0Db^O<^a0Db^O<^a0Db^O<^a0Db^O<^a0Ea^O;_a0Ea^O;_a0Ea^O;_a0Ea^O;_a0Ea^O;_a0Ea^O;_a0Ea^O;_a0Ea^O;_a0Ea^O;_a0Ea^O;_a0Ea^O;_a0Ea^O;_a0Ea^O;_a0Ea^O;_a0Ea^O;_a0Ea^O;_a0Ea^O;^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Fb^O:^a0Ga^O9_a0Ga^O9_a0Ga^O9_a0Ga^O9_a0Ga^O9_a0Ga^O9_a0Ga^O9_a0Ga^O9_a0Ga^O9_a0Ga^O9_a0H`^O8_a0Ia^O7_a0I`^O8`a0H`^O8`a0H`^O8`a0H`^O8`a0H`^O8`a0H`^O8`a0H`^O8`a0H`^O8`a0H`^O8`a0H`^O8`a0H`^O8`a0H`^O8`a0H`^O8`a0H`^O8`a0H`^O8`a0H`^O8`a0H`^O8`a0Ga^O9`a0F`^O:`a0F`^O:`a0F`^O:`a0F`^O:`a0F`^O:`a0Fa^O9_a0Ga^O9_a0Ga^O9_a0Ga^O9_a0Fb^O:^a0Fc^O9aa0B`^O>`a0Ba^O=`a0^Og]OOj0b0`a0^Od^Oa0_b0N3M4L7HiG"}}, {"image_id": 110, "category_id": 2, "bbox": [66.45074462890625, 220.10989379882812, 350.4375305175781, 124.03866577148438], "score": 0.13230600953102112, "association_id": 0, "segmentation": {"size": [640, 640], "counts": "aRf11oc00O2O000O10000000001O0bMLPA4o>NPA1P?0PA0n>3QAMo>4QAKo>5QAKn>7QAIo>7QAIo>8PAHP?8PAHP?8PAHo>9RAFn>;QAEo>;QAEo>;QAEo>;QAEo>;QAEo>;QAEo>;QAEo>;QAEo>;QAEo>;QAEo>;QAEo>;QAEo>;QAEo>;QAEo>;QAEo>;QAEo>;QAEo>;QAEo>;QAEo>:RAFn>:RAFn>:RAFn>:RAFn>:RAFn>:RAFn>:RAFo>9QAGo>9QAGo>9QAHn>8RAHn>8RAHn>8RAHn>8RAHn>8RAIm>7SAIm>7SAJl>6TAJl>6TAJl>6TAJl>6TAJl>6TAJl>6TAJl>6TAJl>5UAJl>6TAJl>6TAIm>7SAIm>7SAIm>7SAIm>6TAIm>7SAIm>7SAIm>7SAIm>7SAHn>8]2000000000000000i^OHg>7YAIg>7a200O2O1N2O1O0OUl\\21jScM1O2N1O2O1O00001O001N100000001O00000000001O000000001O00001O01O0O1000000O2O00001N1000000000001O00]^OH^?8a@I_?7`@K_?5_@Ma?3_@Ma?4^@Ma?3^@Nb?2^@Oa?1_@Oa?1_@Oa?1_@Nb?2_@Ma?4^@Lb?4^@Lb?4^@Lb?4^@Kc?6]@Ic?7]@Ic?7^@Hb?8_@Fb?:^@Fb?:R21O00000000000000000001O00000001O00000000001O01O0O2N101N2N1Ohcb4"}}, {"image_id": 110, "category_id": 2, "bbox": [496.5609436035156, 89.1240005493164, 123.60018920898438, 7.7095489501953125], "score": 0.05539294332265854, "association_id": 0, "segmentation": {"size": [640, 640], "counts": "lZg93mc00O2O00000O100O101O000000000000000000000000000000000000000000000000000000000000000000000000000000000001O1O001O001O000000000000O10000000000O1000000O010O1000000000000000000000000001N101O001O1O001O00Rij0"}}, {"image_id": 111, "category_id": 1, "bbox": [128.70802307128906, 284.3067626953125, 230.94908142089844, 329.7520751953125], "score": 1.0, "association_id": 1, "segmentation": {"size": [640, 418], "counts": "P\\l23P1h0a`06m^O0k`0>k^OFPa0h1I6L4K6eNZ1H8K6L3K4J7J5L5K4O101O0000O1O0O2O00001O2O00cMaJZF^5g9hJSFW5n9PKjEo4Y:TKcEk4^:XK^Eh4c:[KYEf4h:\\KUEd4l:]KREc4o:_KnDa4S;bKhD^4Z;eKaD\\4`;hKZDX4h;o1001O1O1O1N2O1O1O1N2O100O1O1O100O100O100nIaCb4`<\\KhC\\4Zi10000000000000O1000000O1O100O100O10000O1O1O1N2O1O1N2N2N2N2I7N2N2F:M3M3J6L4N2L4J6N2G9B>L4O1O100O2O0O11000O20O1O1O10b0_O1N03K>C6I9G9G2M6Ji0TOZe8"}}, {"image_id": 111, "category_id": 2, "bbox": [258.012451171875, 130.28929138183594, 74.49447631835938, 33.785400390625], "score": 0.9999992847442627, "association_id": 2, "segmentation": {"size": [640, 418], "counts": "TXS51nc02O1O001N10001O00001O001O00001O000000001O010O1O3M10O01O0010O0001O01O01O00001O000010O0001O001O001O010O00001O00010O1O001O0010O0000003An\\OIffh1"}}, {"image_id": 111, "category_id": 2, "bbox": [103.18479919433594, 421.230224609375, 198.4577178955078, 172.94415283203125], "score": 0.9998998641967773, "association_id": 1, "segmentation": {"size": [640, 418], "counts": "X]V27ic01N101O1O1N3Z]OOYa02e^O0Za00e^O2Za0Oe^O2Za0Ne^O4Za0Md^O5[a0Kc^O701N2N2M3Lh]9L\\bF4E:H9N1O1O2M2N2O1O1O101O010O0010O00001O100O1O001O1O1O1O1O0O2O1O1O1N3N1O0O3M3LeRQ2"}}, {"image_id": 112, "category_id": 1, "bbox": [278.443115234375, 832.611572265625, 184.2767333984375, 146.35009765625], "score": 1.0, "association_id": 2, "segmentation": {"size": [1372, 2047], "counts": "XRh;;^Z1>C6I4L5I7I6G9M2oNWNlhNm1SW1UNfhNP2YW1RNZhNH5W2aW1YN\\hNi1bW1YN\\hNh1`W1]N^hNd1`W1n0M2N2N2N3N1O100O1N2O1O1O2N1O100O100O10000O1O1O1O100O011O0O10000000000O1000000O10000O10000O1000000O1000000000000000000000000000000000000000000000000000001O000000000000000000O1000000O100000000O10000O1O1O100O100O100001O00000000000000000000000000000001O0000000O10001O0O2O0O101N10000000001O0000000O101O000O2O001O001O001O0000000O2O00002K5Kb0hMQhN7^gZR2"}}, {"image_id": 112, "category_id": 2, "bbox": [371.40728759765625, 952.9046630859375, 190.5440673828125, 23.4847412109375], "score": 0.9999953508377075, "association_id": 2, "segmentation": {"size": [1372, 2047], "counts": "Pk``01kZ11O001O00001O000O10001O00001O00000000000O100000000000000O10O10000000O1000000000O1000000000O10000000O10O10000000000O10000O01000O100N2O10000O010000000O01000000000000O100000000O10000000O10O1000000000000O1000000000000O10000000000O100000000O100000000000000O100000000O100000000000000000000000000O1000000000000000000000000O10000O100O10WhXn1"}}, {"image_id": 112, "category_id": 1, "bbox": [535.4780883789062, 81.01852416992188, 1473.572998046875, 1186.795166015625], "score": 0.9999740123748779, "association_id": 1, "segmentation": {"size": [1372, 2047], "counts": "Y`Xh0k0[Y1l0EC>A>A?B>B?QK^JmSOP6ek0iKcROb4Qm0TLZROU4\\m0`L^QO\\4Xn0Z4G9H7I8L3L5L3M3L4M3M3M3M2N3M3M5K5K5K5K5L4K4L5K5K6K3L3M3M4L3M4K5L4L4L4K5L5QWOh_OPg0^`0`XOS@Yg0S`0WXO_@bg0da0H9F:FP1QOQ1nN?B=CB>TO`^R3"}}, {"image_id": 112, "category_id": 2, "bbox": [714.420166015625, 923.8572387695312, 1332.579833984375, 448.14276123046875], "score": 0.9999113082885742, "association_id": 1, "segmentation": {"size": [1372, 2047], "counts": "\\TiQ11kZ11O2N4K6K3M1O00001O00001O000O2O00001O0000001O0000001O0000001O0O10001O00001O0000001O001O00001O00001O001O001O001O001O001O00001O001O00001O001O00001O00001O0010O0001O001O010O001O00100O001O010O001O010O001O00010O001O000010O0001O001O000010O000001O00001O000010O0001O00001O001O001O001O001O001O0010O01O001O001O001O001O001O001O001O0010O01O1O1O2N1O2N1O1O1O1O10O01O1O1O0010O01O000010O0001O01O01O0001O01O01O0001O01O010O000010O0001O01O0001O01O0001O01O000001O000001O0001O000001O000001O0001O00000001O01O00000000010O000000000001O01O0000000001O0000000000001O00000000001O0000001O000000001O0000001O00001O00001O00001O0000001O000000001O0000001O000000001O000001O01O0000001O00000010O000001O00001O0000001O01O01O001O00001O00001O00001O01O01O00001O0000000000000000000000000O100000000000001O00000000000000000000000000000000000O10000000000000000000000000000000000001O000000000O10000000000000000000000000000O101O000000000000000000000O10000000000O10000O10000O10000O1000000O10000O100000O01000000O100000000O100000000O100000000O100000000O10O1000000000000000000000000000000000O100000000000000000000000000000000000000O10000000000000000000000000000000000001O000O1000000000000000000O2O0000000000000O10000000001N100000000O1000000O10001O00O01000000O10000O10O10O10000O1000O0100O10000O010O100O100O010O100O10O0100O10O10O1000O0100O10O1000O100O010O10O0100O010O0010O01O1O001O000O2O001O000O2O00000000000001O001O10O01O00100O00100O10O0100O10O0100O010O10O010O01O0010O01O001O00000O2O000K5I7J6J6L4O2N1O1O2O0O101O001O001O00100O010O010O10O010O10O10O01O010O0010O01O001O010N1O1N3M2N2N3M2N2O1N2O1N3O0000001O010O00010O010O10O010O10O10O01000O01000O0100O010O010O0010O01O001O10O01O001O1O001O1O001O1O001O100O010O100O010O100O01000O1000O10O100000O1000O1000O100000O010000O10O10O10000O010O100O01000O10O10O10O10O1000O0100000O0100000O0100000O010000O01000O010O100O010O010O1O0010O01O1O010O0010O00010O010O00010O010O010O010O010O01O10O01O10O01O1O010O1O1O001O001O1O0O2O001N2O0O2O0O2O0O1O1I7I8O00000000001O0001O000010O01O00010O010O10O10O0100N101O0O2O1N101N1O2N101O001O001N10001O0O10000O10O10O01O100O10000O1000010O00010O010O010O010O1000O01000O0100O10O10O10O010000O010O100O010O1O010O1000O0100O010O100O01000O010O10O10O100O01000O010000O01000O10O01000O0100O10O10O10O0100O01O010O010O0010O01O001O010O00001O0O2O0010O010O010O0100O02O000O100O2O0O100O101N1O100O2N1O100O2M2N2N3N1N3M2O2M2N3M2M4L3N3M2N3M2K6J5K6L3M4M2O2N1N3O0O2N101Mhjl2"}}, {"image_id": 112, "category_id": 2, "bbox": [588.722412109375, 454.26397705078125, 1430.023681640625, 917.7360229492188], "score": 0.10889168083667755, "association_id": 0, "segmentation": {"size": [1372, 2047], "counts": "eShS11kZ11N3N1O1O2M2O2N1O2M3N2N2N2M4M2N3M3M1O1O010O1O1O1O001O100O1O1O1O00100O1O1O1O1O100O1O1O1O100O1O100O1O1O101N1O1O2N1O100O1O1O1O1O1O1O100O1O001O001O000010O01O00001O001O00010O00001O00001O000010O0001O00001O00001O00010O0000001O00001O0000001O01O0001O00000010O000001O0001O01O0000001O01O0001O000000010O00000000001O01O000001O00000001O0001O0000000000010O00000000000001O0000000000001O0000000000001O0000000000001O00000000001O00000000001O00000000001O000000001O00001O00001O001O00001O001O001O001O001O1O001O1O001O001O001O001O001O001O001O00001O00001O001O0000001O0000001O0000001O000000001N1000001O000000001O0000001N1000001O0000001O0000001N1000001O00001O0000001O0O10000001O0000000O1000001O000000000O1000001O000000000O100000001O00000000000O100000001O0000000000000O100000000000000001O000000000000000000000000000O100000001O000000000000000000000000000O101O00000000000000000000000000O10000000000O10000000001N100000000O10000000000O10000000000O100000001O0O10000000000O1000000000000000000000000000000000000000000000O10000000001O000000000000000000000000000000000000000O101O00000000000000000000O100000O1000000000000000000O1000O100000000000O10000000000000000O100000O10000000O1000000000000O10O1000O10O10O1000O10O01000O010O010O010O0010O0010O01O001O001O1O001O001O001O1O010O001O1O00100O001O10O01O10O000001O0000001O000O1O100O100O100O1O001O001O1O0O2N3N1N2N201N10001N101O001O001O1O00100O001O100O010O1O010O0010O00010O000001O0000000O1O1O001O001O1O0O2O1N2O1N2N11000O2O000001O000001O01O00010O0010O01O010O010O00100O010O00010O010O01O010O001O001O1O001O001O001O1O001O010O1O00100O010O10O0100O010O100O01000O01000O10O10O10O100O010O10O0100O010O010O1O010O001O010O00001O010O0001O01O01O001O0010O01O010O10O01O010O10O01000O01000000O01000000O0100000O10O1000O10O1000O1000O010000O01000O10O10O1000O010000O010O100O10O010000O00100O010O1O0010O01O001O001O00001N10001O0O100O100O1O2O0O1O1O1O2O0O100O2O00001O00001O00001O010O00010O0010O010O01O01O010O01O00010O00001O00000000001O00000010O000001O01O00010O00010O00010O010O0010O01O010O010O010O10O01O010O01O01O010O00010O000001O00010O0010O00010O01O010O010O10O010O010O0100O01000O010O10O10O10O10O10O10O10000O010O100O100O100O10O01O100O1O1O10O01O1N2O1O1O001O1O1O1O001O1O1O00100O1O010O1O10O01O10O0100O010O010O2O0O101N100O2N101N101N1O2N1N3M3N2M2N3M3M3M3N3L3M3M4L4L4L4Lf`S3"}}, {"image_id": 112, "category_id": 2, "bbox": [1381.026123046875, 926.6226806640625, 614.6102294921875, 406.8443603515625], "score": 0.05069386214017868, "association_id": 0, "segmentation": {"size": [1372, 2047], "counts": "SYni1?[Z13L4N2M3M2O2N1O2N11O1O001O001O00001O0O101O000000001O00000000001O000000000O2O00000000001O00000O10001O00000000000O010000000000000000O10O100000000000O10O10O00010O001O001N2N1O2N2O1N1O2O1O1N200O1O010O1O1O010N2O001N2O0L5E;J5L5L301O0010O01O01O0100O010O001O001O1N1O2L4L3N3N2O1O001O100O010O10O01O010O00001O0O1O1N2O1N3N1O2O001O0010O0100O10O01O001O001O0O2O0O10000000010O01O010O0100O010O10O01O010O1N10001O010O0001O0010O0100O010O010O01O0010O01N10001O01O01O01O00100O0010O010O010O10O01O1O001O1O1O00100O1O010O100O01000O010O0010O01O000000000000010O010O010O01000O01000000O10O10O100O10O0100O10O01O10O01O100O10000O101O00000O101O00000O101O00000O1000001O0000000O101O00000000001O000O10001O000000001N01000000000000O100000000000000O1000000000001N100O100O1O1O1O1MSN`iND\\V1=iiNARV1a0SjN]OiU1e0[jNYObU1g0bjNXOZU1j0ijNUOUU1l0mjNSOPU1o0SkNoNkT1R1VkNnNiT1R1YkNmNfT1T1[kNkNdT1U1^kNjNbT1V1_kNiN`T1W1akNiN^T1X1ckNgN\\T1Y1ekNgN[T1Y1fkNeNZT1[1gkNeNXT1\\1hkNdNVT1]1lkNbNST1_1mkNaNQT1`1QlN_NkS1e1UlN[N_S1P2blNoMPS1_2RmN`MfR1g2[mNYM_R1l2bmNTM]R1l2dmNTMZR1m2hmNRMWR1o2imNPMWR1P3jmNPMUR1P3lmNPMTR1P3mmNoLRR1Q3omNoLPR1R3PnNmLQR1R3PnNnLoQ1S3RnNkLoQ1U3QnNkLnQ1V3SnNgLoQ1X3RnNgLnQ1Z3SnNcLnQ1^3RnNaLnQ1`3SnN]LnQ1d3SnNYLoQ1f3SnNVLoQ1k3`2100O1O01000O100O1000O01000O10000O00100O1O1O010O1O1O10O0100O10O01000000O100000000O1000O10O100000000O10000O10000O100O1O100O1O1O100O100O101N100O10000O10000O10000O10O01O100O1O001O1O1O1O010O100O01000O10O10O010O01O010O010O01O00001O000010O0010O01O001O0010O01O0O101O000O01000O1O1O100O2O000O2O1O010O01O010O1O001N2J6J5K6L4L4M2O2O1N2O1O001O100O2N1O1N2N2O1N3M2N2O1N2M4M2M3N2N3M2N2N3N1O2M3N4K6J5K]^[2"}}, {"image_id": 113, "category_id": 2, "bbox": [183.3209991455078, 794.589599609375, 566.308837890625, 61.75030517578125], "score": 1.0, "association_id": 1, "segmentation": {"size": [1553, 2048], "counts": "Y\\i82\\`17J3N101N101N100O2O001O0O101O0000001O0000000O10001O000000000000001O00000000000000000001O00000001O000000000001O0000000000001O00000000000000001O00000001O0000000000000001O000001O0000000000000000000000000000000001O000000000000O101O0000000000001O00000O10000000000000000000001O000000000O10000000001O00000O1000000000000000000000000000000000000000000O100000000000000000000O10000000001O00000000O01000000000000O100000000000000O100000000O100000000O1000000O100000000O1000000000000O1000000O10000O10000O1000000000000000000000000O10000000O100000000000000000001O000000001N100000001O000000001N100000000000001N100000000O100000001O0O1000000000000000000O100000O10000000O100000000O100000O10000O10O10O1O100O1N2O1O1O10O1000O100000000O1O1O1O1O1O1O01000O10000000000000O1000000000000000000000000000000O1000000000000000000O1000000O100000000O100000000000000O1000000000000000000O10000000000O10000000000000000O100000001O0000000000000000000O10001O000000000O10000000001O0O100000000000001O000O100000001O00000O10001O00000000000O10000000000O1000000000000O1000000000000000000000000O10000000001O0000000O100000000000000O100000000O1000000O10000O10001N100O2N2N5IoYdm1"}}, {"image_id": 113, "category_id": 2, "bbox": [1588.9737548828125, 1207.33251953125, 450.7025146484375, 306.1051025390625], "score": 1.0, "association_id": 3, "segmentation": {"size": [1553, 2048], "counts": "geb[21X`19K5N1O2N1O2N2M2O2N2N2N2N2O1N1O2O1N101O00001O00001N101O00001O001O001O001O001O001O001O001O00001O00001TgN[NjR1e1UmN]NjR1c1UmN`NiR1a1UmNaNjR1_1UmNcNjR1^1SmNeNlR1\\1RmNgNkR1Z1SmNiNlR1X1QmNkNnR1V1PmNkNPS1V1nlNlNQS1U1mlNlNRS1V1llNkNTS1U1llNlNSS1U1klNlNTS1V1jlNkNVS1U1jlNkNVS1V1hlNlNWS1T1hlNmNXS1S1hlNmNYS1S1elNnN[S1R1dlNnN^S1R1`lNoN`S1R1_lNnNaS1R1^lNoNbS1R1]lNnNdS1R1ZlNoNfS1R1XlNoNhS1Q1XlNoNhS1R1WlNnNjS1R1TlNoNlS1Q1TlNoNlS1R1RlNoNnS1Q1RlNoNoS1P1QlNPOoS1Q1PlNoNPT1Q1okNPOQT1P1okNPORT1o0nkNPOST1Q1lkNoNUT1P1jkNQOVT1o0jkNQOVT1P1ikNPOXT1o0gkNROZT1m0fkNSOZT1n0ekNRO]T1l0bkNUO`T1i0`kNVOcT1i0[kNXOgT1f0YkNZOhT1f0VkN[OkT1d0UkN\\OlT1d0SkN\\OnT1c0RkN]OnT1d0QkN[OQU1e0mjN\\OSU1d0mjN\\OTU1d0kjN\\OUU1e0jjN[OVU1f0ijNZOXU1f0fjNZO[U1f0ejNZO[U1g0djNYO\\U1h0cjNXO^U1h0ajNXO_U1h0ajNXO_U1i0`jNWO`U1j0_jNUObU1l0]jNTOcU1m0egNoMb1T1hV1P1_gNVNe1i0lV1S1YgNZNi1c0nV1U1RgN^No1=oV1^2ohNbMQW1_2nhN`MSW1a2mhN^MSW1d2khN\\MUW1e2jhN[MUW1g2jhNYMVW1h2jhNWMVW1j2ihNVMWW1j2ihNVMWW1k2hhNUMWW1m2hhNRMYW1n2ghNRMXW1P3hhNoLWW1R3ihNnLVW1T3ihNlLVW1V3ihNjLVW1W3jhNiLVW1X3ihNhLVW1Z3ihNeLWW1]3hhNcLWW1_3hhNaLXW1`3ghN`LXW1a3hhN_LWW1c3hhN]LXW1c3hhN]LWW1d3ihN\\LVW1f3ihNZLWW1f3ihNYLWW1h3ihNXLVW1i3jhNWLVW1j3hhNWLWW1j3ihNVLWW1j3ihNVLVW1k3jhNULVW1k3ihNVLWW1k3hhNULWW1l3ihNTLWW1l3ihNSLXW1m3hhNSLWW1n3hhNSLXW1n3ghNRLXW1o3hhNQLXW1o3hhNQLXW1o3hhNQLWW1Q4hhNnKXW1S4hhNmKXW1S4hhNmKWW1U4hhNjKXW1W4hhNiKXW1X4ghNhKXW1Z4ghNeKYW1\\4ghNdKYW1]4fhNbK[W1_4dhNaK[W1`4ehN_K\\W1b4chN^K]W1b4chN]K]W1e4bhN[K^W1e4bhN[K^W1f4ahNZK_W1f4ahNZK_W1g4`hNXKaW1h4_hNXKaW1i4^hNWKbW1i4^hNWKbW1j4^hNUKbW1l4]hNTKcW1l4]hNTKcW1m4\\hNRKeW1o4ZhNQKfW1o4ZhNQKfW1P5YhNPKgW1Q5YhNnJgW1R5YhNnJgW1S5XhNlJiW1T5XhNkJgW1W5YhNhJgW1X5YhNgJhW1Y5YhNfJgW1[5YhNcJhW1]5XhNcJhW1]5YhNbJgW1_5YhN_JhW1a5YhN^JgW1b5YhN]JhW1d5XhN[JhW1e5YhNZJgW1f5YhNYJhW1g5YhNXJgW1i5YhNTJiW1l5^100001O00001O00001O001O001O1O002N1O1O100O2N1O1O1O1O1O001O001O00100O1O1Ob0^O5K1O100O1O00100O001O001O1O00100O1O001O1O001O001O001O001N2O001O1N2O2N1O1N2O1O001O1O1N101O1O2N1O1O1O1O2N1O1O1O1O001O1O001O0000001O0000001O00000000001O0000001O001O01O01O001O001O01O01O0001O001O1O1O001O10O01O1O001O001O001O001O001O001O1O1O1O1O00100O1O1O1O001O001O001O001O000eHShNR6nW1lI^hNi5bW1UJbhNi5_W1UJdhNi5\\W1UJhhNi5XW1VJkhNh5VW1VJlhNi5TW1VJohNh5QW1WJQiNh5oV1lI^iNS6cV1kI_iNT6aV1kIaiNT6_V1kIdiNS6]V1kIeiNT6[V1kIgiNT6YV1kIjiNS6WV1kIkiNT6UV1lImiNR6SV1mIoiNR6RV1lIQjNR6oU1nISjNP6mU1oIUjNP6kU1PJVjNo5VX101O00001O001O00001O0O101O001O00001O000O2O001O0O2O001N2O2N5J6K4J8I5J8Hi0WO;D`0\\OnX<"}}, {"image_id": 113, "category_id": 1, "bbox": [578.5813598632812, 502.6149597167969, 254.1282958984375, 174.53573608398438], "score": 1.0, "association_id": 2, "segmentation": {"size": [1553, 2048], "counts": "cT`k0g0X_1e0K4L3O1O0O2O1O0O2O00001O001O1O00001O001O00000000001O0000001O000000000000001O0000001O00001O00001O00001O001O0TdNUNRY1l1ffN\\NYY1d1dfN`N[Y1a1bfNbN]Y1_1afNbN_Y1_1_fNaNbY1`1UfNhNkY1Y1RfNiNnY1Y1neNiNRZ1X1keNjNUZ1W1geNlNYZ1U1deNlN]Z1U1aeNlN_Z1T1`eNmN`Z1T1^eNkNdZ1W1YeNiNhZ1Z1SeNdNQ[1c1^dN_Nj[1n26O1O1O100O1N2M3L4N2N2O1O1O1O1O1N2O1O1O1O10000O100000000000000000000001O000000001O001O1O1O2N3M2N2N1acNULV\\1l3gcNWLX\\1R4O1O2mcNhKi[1c4M3M3M2N00O1PO`dNmLb[1m2ldNbL][1X3Q1L4O1O1O1O1O1O1O100O1O10000O1000000001O000000000000100O1O001O001O0001O0000001O01O0000O2O00000000000000000O1000000O101N11O001O00001N100010O01O001O2N1O1O2N1PcNfL22:OZ[1o3bdNTL][1m3`dNTL`[1o3YdNULh[1Y4100O010O10O02N1N2N2M3M3O1O1O1O1O1M3K6K4K5F:O1O1O2N101N1N3N1N3N1cN_bNIc]14bbNHf]1ZOPbN7?;f]1WOSbNNm0=[cfi1"}}, {"image_id": 113, "category_id": 1, "bbox": [30.999704360961914, 534.9515991210938, 529.54150390625, 299.94854736328125], "score": 1.0, "association_id": 1, "segmentation": {"size": [1553, 2048], "counts": "Qcb1i0b_18K4M4N1N2N2N2O1N3N1N3N2M3N3L6K6I8H?B5J7J9G2M2aeNULVX1l3ggNYLVX1h3ggN^LTX1d3igN`LUX1a3igNeLRX1]3jgNiLRX1X3`gNXM]X1o2UgNZMiX1Y5N1O2N1O1O2N2VhNkHTV1V7jiNmHSV1V7jiNlHUV1U7jiNlHUV1V7hiNmHVV1T7hiNnHWV1S7hiNnHWV1S7giNoHXV1R7giNoHXV1P7jiNlHYV1S7jiNiHXV1V7kiNdHYV1[7_1O100O100O10000O10000O1000000O10000000000000001N1000000000001O000O11O0010O01O001O1O010O1O1O1O10O01O1O1O001O0010O01O1O1O2N1O5K4L4L5K3M1O1O1O1O1O1O001O1O1O1O1O1O1O1O1O1O001O1O001O1O00000000000000O010eMnhNWKRW1f4XiNSKhV1i4_iNTKaV1j4ciNTK]V1k4fiNRK[V1n4giNPKYV1o4iiNPKWV1o4miNnJSV1R5QjNjJoU1U5UjNgJlU1Y5VjNeJjU1[5XjNbJhU1_5YjN_JhU1a5ZjN\\JgU1d5[jNYJfU1g5\\jNVJeU1j5a20000O1000O10000000000000000O100000000O100000001O0O1000000000000000000000000000001O00000000000000000000000O100000000000O100000000000000000000000000O1000000000000000000000000O100000000O10000O10000O1O100O100O10000O1000000000ZgNoIlV1Q6TiNQJjV1o5UiNTJiV1l5ViNVJiV1j5ViNWJjV1i5UiNYJjV1g5UiN[JjV1e5TiN]JlV1c5SiN^JmV1b5RiN`JmV1`5RiNaJnV1`5PiNaJPW1_5ohNbJQW1^5ohNcJPW1]5ohNdJQW1\\5ohNdJQW1\\5nhNeJRW1[5ohNcJRW1^5mhNaJTW1_5lhN_JVW1b5jhN\\JWW1e5ihNYJXW1g5hhNWJZW1j5jhNoIXW1R6c11O1O1O1O1O1O1O006K5J1O2N1O1O1O2N1O2N1O001O1O0010O01O001O00001O1O1O1O3M3N3L3M4L3M2N1O1O1O1O10O01O0010O00001O0010O0001O01O0001aNlgN`JSX1\\5RhNcJnW1Z5VhNeJjW1Z5XhNfJgW1Y5[hNfJfW1X5\\hNgJdW1X5^hNfJcW1Y5_hNeJbW1Z5ahNbJaW1]5bhN`J`W1]5dhN_J^W1`5ehN\\J]W1c5fhNYJ\\W1f5ghNPJaW1P6a1N100O101N100O101O0O2O0O2O1O1N2N3N1N3M2O2M2O0O2O1O0O2O000O2O001O001O1O1O1O2N2N1O1O2N1O1O0O2O1O010O10O010000O1010O5L3M1O000_dN\\KR[1e4fdNcKY[1l4O1O0ReNjJ`Z1W5ZeNnJeZ1`5000001O010O1035J9E1N100O1O00O01000O01O001O001O1O1O1O2N2N3M1O2N1O2N001O1O001O0O2O0O2O1O1N2O1N2O1N2O0O2_NdcNkN]\\1n0lcNnNU\\1n0RdNoNo[1n0VdNnNk[1P1XdNoNh[1o0\\dNmNg[1o0]dNlNg[1R1]dNhNh[1U1\\dNdNi[1Z1[dN_Nk[1]1g1B=L5K5XOW[[W2"}}, {"image_id": 113, "category_id": 1, "bbox": [962.0658569335938, 505.0049743652344, 732.9113159179688, 899.2008056640625], "score": 1.0, "association_id": 3, "segmentation": {"size": [1553, 2048], "counts": "a]]_13]`14K5L4K6J5K6J7H8I4K4L5K4K5L4M3L4M3M3M3M3N1N3N2N1O2N1O2M2O2N1O2M2O2L3L5K4L5K5J6SMYLihNl3kV1hLehNa3XW1jLngNh3PX1^2N2N2N2N3M2N2O1N2N2O1N001O1O001O001O00001N10001O001N10001O0O2M2O2M2O2M2O2O1O0O2O1O001N2O001N2O1N101O1O1O010O1O10O01O100O010O100O1O10O0100O100O100O100O10O0100O100O100O100O1000O0100O1000000O1000000O1000000O1000000O10000O1000000O10000001O001O0010O0001O001O00001O0000001O0000001O0000001O00O101O00000000001O00000000001O000O10001O000000001O001O00100O1O1O1O2O0O2N2N3M2N3N1N3M2N2N2N2N2O1N2N1O2N2N1O1O2N2N2N2N2N3M3M3M3M5K8H=C=C6J5K5K4L4L4L3M2N1O2N100O1O1O2N1O2N1O2N2N2N2N3M2N3N4K4L5K4L3M3M3M3M3M3M3M3M3M3M3M4L3M4L;Ek0UO4M3L5K5K5K6J3M3M2N2N2N2N1oXOS\\O\\a0oc0`^OU\\O^a0lc0`^OV\\O_a0lc0]^OW\\Oba0jc0\\^OX\\Oca0ic0[^OY\\Oda0hc0Z^OZ\\Oea0gc0Y^O[\\Ofa0gc0V^O[\\Oja0fc0T^O[\\Ola0gc0Q^O[\\Ona0fc0o]O\\\\OQb0fc0l]O\\\\OSb0fc0i]O\\\\OWb0gc0d]O[\\O\\b0hc0_]O[\\O`b0gc0[]O\\\\Oeb0gc0U]O\\\\Okb0gc0o\\O]\\OPc0fc0i\\O^\\OWc0ec0b\\O_\\O^c0dc0\\\\O_\\Odc0dc0V\\O`\\Oic0cc0Q\\O`\\Ooc0cc0k[O`\\OUd0ec0d[O]\\O\\d0hc0\\[O\\\\Ocd0hc0W[OZ\\Oid0jc0Q[OX\\Ood0kc0lZOW\\OTe0lc0fZOX\\OZe0jc0WZOb\\Oie0ac0iYOj\\OWf0Wc0cYOn\\O]f0cf000000000000000000000O10000000000000000000000000000000O10000O1000000`LdZOj[O]e0Td0jZOg[OVe0Wd0P[Oe[OPe0Yd0W[Oa[Ojd0^d0\\[O][Odd0ad0c[OZ[O]d0ed0h[OV[OYd0hd0m[OT[OSd0U`0dYOQC]2fLPd0V`0iYOPC[2gLlc0V`0oYOoBX2iLic0U`0UZOnBV2iLfc0V`0YZOnBT2jLcc0V`0^ZOlBR2kLac0W`0aZOkBP2mL_c0V`0eZOkBn1lL^c0X`0fZOjBn1mL\\c0W`0jZOiBm1mLZc0X`0mZOhBk1nLYc0X`0P[OgBj1nLWc0Y`0S[OfBh1oLVc0Y`0W[OcBg1PMTc0[`0Z[OaBdh0^=aWO]B`h0a=fWOYB\\h0f=jWOPB[h0n=lWOgAZh0X>mWO\\AYh0c>UXOi@Rh0V?cXOo_Odg0P`0_4O1O00100O1O100O1O100O100O11O0000001O000000001O000000001N10000000001O00000000001O1O0O2O1O1O1O1O1O1N3N1O2N2N2N2oXO]_Oo=f`0Q]O\\_Oe08Xb0^`0o\\Of_O84hb0W`0m\\OP@K2Vc0P`0k\\OW@B0bc0j?i\\O[@_OOgc0g?g\\O_@]OMjc0f?g\\O`@[OMmc0d?f\\Ob@XONQd0a?d\\Oe@XOLSd0`?c\\Og@VOKWd0_?a\\Oi@TOKZd0\\?a\\Ol@QOJ]d0\\?_\\On@POHad0[?]\\OPAnNGed0Z?Z\\OSAlNFjd0Y?W\\OUAiNEPe0W?T\\OYAfNDUe0T?R\\OkDnc0W;m[OlDSd0V;e[OPEZd0S;[[OVEed0l:oZO^EQe0Qc001O00000O100000001O0O1000000000000000000000000000000000000000000000000000000001O0O2O0O2O0O2O0O2N1O2O0O2dM_YOeZObf0Qc0b\\OT\\O`c0Qb0f^Ob]O\\a0oa0Z_Oh]Og`0ma0j_Ok]OY`0Qb0P@h]OQ`0Vb0V@c]Om?Zb0V7N3N1O2N2N1O2N1O1O2M2O1O2M2O1N3M2M3N3I6J6J7J5J6L4N3M2N2O2M2O1O2M2O3MR1nN2N3L3N2M4L3M4L3L5F9_Ob0WOh0[Of0K5J5M4K5L3M4L4M3L3N3M2M3N3M2N2M4L4L3L5K5L4J6K5J7I7I7J6K5K5L4K5L5K4L4L5K3M2N2N2O1N3M2N3M3L4M3L4M4K5J6H9E=DkV1HohNWW1FfhN:ZW1IchN6]W1N`hN2`W11]hNNcW17YhNHiW1=QhNBPX1b0lgN]OVX1f0fgNZO[X1h0bfNnL:0FZ2^Y1W1ffNVO[Y1m0_fNUObY1l31O001M3N2L4N2N2M3N1M4M3M300O100000000000000O100000000001O001O2N3M4L5K5K:F3hfNbIWX1_6egNhIWX1Z6egNiIZX1X6cgNjI]X1W6`gNlI_X1S70000000001O0000000000000000000000O1000000O10000YOcgNYI^X1b6igN\\IWX1a6mgN]ITX1a6PhNZISX1d6QhNWIRX1e6o0M3M3M3N2N2O1O100O1O1O1O1O1N2O1O1N2O1O1O100O100O0100000O100000000O100000000O10000000000O1000000O10000000000000000000000000000001O000000001O000000001O000000000001O00000001O00000000000000001O0000000O1000001O00O101O00000000000O1000000000000000000O10O10000000000000O100000001O000000000000000000000000000001O0000000000000000O1000000O100O100O1O1N2N2N2L4K5K5K5I8J5M3O1N2N2O1O2N1O1N3N1N2N3N1N3M2O1O2N1O1O2N1O1O1O2N1O1N3M2N2N3N1N2O2N2M2O2M3M3M2O2N2N2O0O2N100O2N1O2N1O2N1O2N101N2O001N2O1O1O1N2O1O1N2O1O1O1N2O1N2O2M4L3M3M6J5Kgn\\Y1"}}, {"image_id": 113, "category_id": 2, "bbox": [1727.0523681640625, 720.8770141601562, 306.5916748046875, 83.828857421875], "score": 0.9999990463256836, "association_id": 4, "segmentation": {"size": [1553, 2048], "counts": "Smka2;Q`18K3N2N101N100O2N1O2O0O100O2O0O100O1O2O0N2O1N2O1N2O1O2O000O1000000O2O000000000O2O0000000000001O0000000000000000001O0000000000000000010O0000000000000000000001O00000000000000001O00000000000000000000001O0000000000O1000000000000O1000000000000000000O10000000000000000O100000000000001O01O000000000000000010O000000010O000001O0001O01O000000010O00000010O0001O01O000001O01O000001O01O0001O01O0000000010O000001O0001O00000000000001O0000000000000000000O1000000000001O0O1000000000000000000O100000O1000000000000000001O0O10000000001O000O2O1O00001N10001O001O1O1O001O1O001O001O00001O1O2N1O1O001O4L1O001O1O2M2O1O1O1O1O001N3N2L4Fo_NM\\Pi0"}}, {"image_id": 113, "category_id": 1, "bbox": [1496.1806640625, 469.3450622558594, 259.5400390625, 249.44619750976562], "score": 0.9997084736824036, "association_id": 4, "segmentation": {"size": [1553, 2048], "counts": "`ZmV2\\1g^1g0D6K4M3M2O1N2N101N2O0O2O001N2O1N2O001N2O1O1N101N2O1N2O1N2O1N101O2N2N1O2O0O1O1O1O1O1O001N2O001O1O001O002N1O2N1O1O1O1O001O001O001O001O001O00100O1O2N101N1O100O1O00001O0000001O00001O2N1O2N1O2N1O2N1O1O1O1O1O1O1O001O1O1O1O1O1O1O1O1O1O1O1O000010O000000000000000001O0000000000000000000001O000000000000000000000000010O01O001O001O100O0O2O00001O001O00001O00100O1O1O1O1O1O001O1O1O2N5K8G8I3M2O1N1O100O001O01O010O1O1O3M2N3M2N2N1O1O2N2N3M4L3M1O1O1O1O1O1O1O6J5K2N2N2N1O1O2N2N3M9G3M2N1O1O1O2N7I7H>C3M3M2N2N1O1O2N2N2N2N2M2O1O1O2M4L4XOZ1eNfWj="}}, {"image_id": 113, "category_id": 2, "bbox": [630.625244140625, 657.126220703125, 153.1202392578125, 23.79559326171875], "score": 0.9679056406021118, "association_id": 2, "segmentation": {"size": [1553, 2048], "counts": "[gVn01``11N2N10O0100O1O1O1O1O2N100O10000O100001O00001O0000000001O0001O0000001O0000001O0000001O000000000000001OO1000000000000000O10001O0000001O001O002M1O_o[11aPdN1N10001O0O101O000000001N100000000000001O000O100000000001N1000001O0O2O0O101O1NVmSl1"}}, {"image_id": 114, "category_id": 1, "bbox": [245.34320068359375, 325.2181396484375, 474.3475341796875, 339.47705078125], "score": 1.0, "association_id": 1, "segmentation": {"size": [929, 1600], "counts": "d`c7>bl02N3M2N3M3L4M3L5K5G:EP1VO5K5K4L5L2M3N2M3N1N2O1N2O2M2N3M4L3M3M3M2N2O1N2O1O0O2O1O1O1O001O1O1N101O1O001O0O2O001O1N101N2N2O1N2N2N2O1N2O1O1N2O1N2O001O1O1O1O1O1O2N2N6JS1mN;D6K5K1O1O1O1O001O1O001O1n\\OeG\\a0\\8_^OiG`a0X8Z^OmGfa0U8S^OQHka0S8m]ORHSb0S8a]OUH^b0W901O00001O00000O10000000000000WN^]OSIab0X6_]OaH7T1Zb0Z6Z^OeIfa0Z6]^OdIca0[6_^OdIaa0[6a^OdI_a0[6c^OdI\\a0\\6e^OdI[a0\\6f^OcIZa0\\6i^ObIWa0]6k^ObIUa0^6l^OaITa0^6o^O`IQa0_6Q_O`Io`0_6T_O_Il`0`6W_O]Ij`0b6X_O]Ih`0c6Z_O[If`0d6\\_O[Id`0e6]_OZIc`0e6__OZI``0g6a_OWI``0h6a_OXI_`0h6b_OWI^`0i6b_OWI_`0h6b_OVI_`0k6a_OTI_`0l6b_ORI``0n6`_OQI``0P7`_OnHa`0R7g2100O2N1O2N100O2N1O1O1O001O1O100O2N2N2N4L7I4L1O1O1O1O1O00100O1O1O1Oj0VO1OYMS]O[Kmb0b4[]OYKdb0d4d]OXK[b0f4h]OYKXb0f4k]OYKTb0e4o]OZKQb0e4Q^O[Koa0c4R^O]Kna0b4T^O]Kla0c4U^O]Kka0a4W^O^Kia0b4X^O]Kia0b4X^O]Kia0a4Y^O^Kha0a4Z^O]Kga0b4Z^O]Kfa0c4[^O\\Kfa0b4[^O^Kea0b4\\^O]Kea0b4\\^O]Kda0c4\\^O]Kea0b4\\^O]Kda0b4^^O]Kba0c4^^O]Kca0b4^^O]Kba0c4^^O]Kba0c4^^O\\Kca0d4^^O[Kba0e4_^OZKaa0f4_^OYKba0h4^^OWKba0i4_^OUKba0k4`^OSKaa0l4`^ORKaa0o4_^OPKaa0P5a^OmJ`a0S5a^OlJ_a0T5b^OjJ_a0W5a^OhJ_a0X5b^OfJ_a0Z5b^OdJ_a0]5a^OaJ`a0_5a^O`J_a0a5a^O]Jaa0b5`^O\\Jaa0e5_^OYJba0h5_^OUJca0j5^^OTJda0l5\\^ORJea0n5]^OnIfa0R6[^OjIha0U6c200O1O10O01O0010O00000010O01O0000100O001O100O001O10O001O100O1O1O001O10O01O001O000010O0001O1O001N2O3M3M3M2N2N1O1O1O001O001O1O001O1O1O2N2N3M3L3N2N1O1O1O1O001N101N2O1N2O2M3N1N2N2O1N101N2O000O100O101N1O100O1O1O1O2N1O1O1O100O2O000O10000O2O0O100O101N1O101N1O1O100O1O100O1O100O1O1O100O1O1O1O1O100O2O000O100O2O00000O2O00000O10001O001N101O001O1O1N101O1O1O1O1N2O1O001O1O1O001O2M2O2N2N2N1O1O2N1O1O001O1O1N2O1O1O1O1O1N2O2N1O1N2O1N2O1O1N3L3M4KU]Ri0"}}, {"image_id": 114, "category_id": 1, "bbox": [677.0433959960938, 246.6441650390625, 814.1001586914062, 418.54150390625], "score": 0.999998927116394, "association_id": 2, "segmentation": {"size": [929, 1600], "counts": "mZjd0R1fj0]1XOg0H8I7J5L4M3M3M3N1N3M2O2M3M3N1N2O2M2N3N1N3M2N2N2M4M2N2N2M3N3M2M3N2N7I8H4L101N2O1N101N2O000O101N10000O100O100O2N100O1O1O1O100O1O100O2O0O100O10000O10O1O010O0010O01O001O01O@`001O00000000001O001O010O1O00100O001O10O01O001O1O00010O00000000001O0001O010O010O10O01000O01000O10O1000O0100O10O0100O1O001O100O00100O1O01000O010O1000O10O1000000O0100000O10000O10O010000O100O1O100O010O100O10000O1000000O1000Oj^OPI]i4mAXKS>i4kAXKU>h4jAYKV>h4hAYKX>h4fAYKZ>g4eAZK[>g4cAZK]>g4aAZK_>f4aAZK_>g4_AZK`>g4`AYK`>h4^AYKb>h4]AXKc>h4\\AYKd>h4ZAYKf>h4XAYKh>g4WAZKi>g4UAZKk>g4SAZKm>f4RA[Kn>f4PAZKQ?f4n@[KR?f4l@[KT?f4j@[KV?e4i@\\KW?e4g@\\KY?d4f@]KZ?d4d@]K\\?c4c@^K]?b4b@_K^?b4`@_K`?a4_@`Ka?a4]@_Kd?a4[@`Ke?a4Y@`Kg?`4X@aKh?_4X@aKh?^4Z@aKf?_4Z@`Kg?`4Z@_Kf?a4[@^Ke?a4\\@_Kd?a4]@]Kd?c4\\@]Kd?c4]@\\Kc?c4^@\\Kc?d4^@[Kb?e4^@ZKc?f4^@YKb?f4_@YKb?g4_@XKa?h4_@WKb?i4_@VKa?i4`@VKa?j4_@VKa?j4`@TKa?l4_@TKa?l4_@SKb?l4`@SK`?m4`@YJWORNZ`0e7_@UJ\\OUNU`0f7`@PJ@XNQ`0g7`@mID[Nl?h7`@kIG[Nj?j7`@hII]Ng?j7b@fIJ^Ne?k7c@eIJ_Nc?k7e@bILaN`?l7f@`INaN]?m7i@^IMcN[?n7j@\\IOcNX?o7m@YId`0f6__OVId`0g6a_OSIb`0l6b_OnHa`0Q7c_OiH``0U7e_O]Hf`0b7]2N200O100O100O100O10000O10000O2O000O10000O10000O100O100O101N100O100O1O100O100O101O0O100O1000001N10001O000O2O001O000O2O00001O0O10001O0O10001O000O1000001N10000O100O100O100O1O100O100O10000O100O1000000O2O00000O1000000O100O100O100O100O1O1O100N2O100O1O1O101N100O100O10000O10000O100O100O1O2O0O1O1O1O1O100O1O101N1O100O10000O100O2O000O101N101N101N1O2O0O2N1O2N101N100O2N101N100O101O0O100O2O000O100O101N1O100O1O2O0O1O101N1O101N100O101N101N100O2O0O2O001N101N1O101N100O2O0O101N100O2O0O10001N100O10001N1000000O2O00000O10000O10000O10000O100O100O100O100O100O100O10000O10000O10000O1000000O10000O10000O10000O10000O10000O10000O1000000O10001O000000000000000000000000000000000000000000000000001N10001O000O2O001O001O1N101O1O001O0O101O001O000O2O00001O00000O2O00000O2O00001N10001O0O101O0O2O001N3N2M3N1O2M3M2K5J7JfX_3"}}, {"image_id": 114, "category_id": 2, "bbox": [246.6239471435547, 631.8240966796875, 355.48468017578125, 60.4345703125], "score": 0.9999903440475464, "association_id": 1, "segmentation": {"size": [929, 1600], "counts": "cdQ79fl03O1N101O000O101N100O101N10000000000O100000001N100000000O1000000000000000000O100000000000O1000000000O100000000000000O10O100000000O1000O100000O1000000O100000000O10000000000000O1000000000000000000001O01O0001O00001O00001O001O2N1O3M1O1O1O1O001O1N2OWZj0KmeUO3N1N100O100O2O0O1O1O1YOK`TO7`k0NYTO4gk0MSTO8lk0?00000000000000000000000000001O00000000O100000000000000001O00000O2O00001O00001O00000O10000O100000000O100000000O1000O0100O0010O10O100O010O10O10O10O1O1O0O2O1O1000000O10000O100O10O010000000000001O0000001O0000003SOmSOf0Sl0ZOnSOe0Rl0[OnSOe0Sl0ZOnSOe0Rl0ZOPTOe0Pl0[OQTOd0Wl0O1O1O000000000000000O10O10000O100000000O100O100O100O1000O100000O1001O0000000000000000000000000000001O000O10001O00000000001O0000001O001O00001O0O101N1O3MheYl0"}}, {"image_id": 114, "category_id": 2, "bbox": [682.3458251953125, 631.2145385742188, 689.0045166015625, 59.509765625], "score": 0.9999624490737915, "association_id": 2, "segmentation": {"size": [929, 1600], "counts": "g]dc03nl00O2O00001O0000001O0O101O00001O000O2O000000000000001O0O100000000000001O00001O00001O0000001O000000000O110O000000001O00001O0010O01O001O1O00001O000001O00000001O00000000010O000000001O0001O01O000000000001O01O000000000000010O00001O00010O0000001O000001O0001O00000000001O01O0001O00001O001O0000001O000001O000000000000000001O00000O10000000001O000000000000000000000000000000000000000O1000000000000O100000000O11O000000000000000[OUTO4kk0KWTO4jk0IYTO6gk0G]TO8ck0H^TO7bk0H`TO7`k0I`TO6bk0GaTO8Tl00000000001O00000000000000001O00000000001O01O0000000000000001O000000000O1000000O2O0000000O10000000000O1000000000001N10jZn21TeQM2L4O0O2M2O101O0O10000O2O000000000000000000001O000000000000001O000000000001O0001O0000000000000000000000001O0000000000000000001O0000000001O00000001O0000000000000000001O0001O0000000000000000000000000000000001O000000000000000000000000000000000000000000000001O0000000O1000000000000000000000000000000000000O10000000000000000O1000000000000000000O1000000000O10O10000000000000000000000000000O100000000000O1000000000000000000000O10000000000000000000000000001O000000000000000000000000000000000000001O0000000000001O000000001O000000000O101O0000000000001O0000001O001N10001O001N101O1Ojik6"}}, {"image_id": 114, "category_id": 2, "bbox": [885.7000732421875, 642.48291015625, 484.4842529296875, 40.34356689453125], "score": 0.9475799798965454, "association_id": 0, "segmentation": {"size": [929, 1600], "counts": "e[Ui07gl04CGPTO:hk00RTO4lk0MQTOE0>ok0a0O101O00000000[OSTOD0?mk0MSTOD0?mk0MSTOC1`0lk0MVTO3jk0JSTOG4>jk0JRTOH5=ik0KRTOG7=gk0L[TO4ek0IRTOK99bk0HaTO8_k0HaTO8Ul0O001O001O001N2O1O1O0Oeme31WRZL5M4M1O1O1000001O00000O10000000000000000O2O0000000000000000000000001O01O000000000001O00000000000000001O00000000000000001O00000000001O00000000001O0000000000000000001O000000000000000001O01O000000000000000000000000000000000000000000000000000000000000000000O10000000000000000000000O1000000000001O000000O1000000000000000000000000000O100000000000000000000O1000000000000O100000O10000000O1000000000000O10000000000000000O10000000000000000000000000000000000000000000000000000000000000001O0000000000001O00000000000000001O000000001O000010O000001O000000001N101O001N2O1O1N1O2Oiik6"}}, {"image_id": 115, "category_id": 1, "bbox": [18.78205680847168, 91.70921325683594, 332.5877380371094, 483.83453369140625], "score": 1.0, "association_id": 1, "segmentation": {"size": [799, 533], "counts": "\\Qf06[h0h0_O>C8I7K5L4L3T[OYN\\b0j1^]O_N\\b0d1`]ObN[b0b1`]OeNZb0_1`]OjNYb0_1\\]OjN]b0R4J8H4L3M2N3M2O1O1N2O2N2N2N2M3N1O1O1O1N20O01O2N1O2O1N2N2N1O1O1O1O001O1O1O1O2N2N2N1O2M2O1O1O1N2O1O1N2O1N3N2M2O2M2N2M3N3M2O2M2N3N2M4M3L4M2N2N3M4L6I8I6J3M3M2N1O2M2O1O1O2M4RDXE_9k:PFjEi9Z:oEkEo9Z:iEkEV:^:]EgEb:\\U2W1G:I8H>@?@?Colc9"}}, {"image_id": 116, "category_id": 1, "bbox": [478.2345275878906, 79.07388305664062, 186.69772338867188, 421.9306945800781], "score": 0.9999998807907104, "association_id": 2, "segmentation": {"size": [608, 738], "counts": "lRY99ab0c0BLo]OFea0:_^OD`a0;a^OFd0Dm?g0__OG?LKOU?=b@I:m0P?ZOf@K6Q1o>UOk@L2S1P?SOk@M3R1o>0o@1n>4o@Mo>T2M2M3O10O1O1O1O1fMTA>n>@WAGXAG[AF]A>_>C`A?^>C`A`0]>T2M3M5K8G[LkAc3m>L4L6J6J7I6J4L3M4L9F9G8H:E9G9D=BPX\\1"}}, {"image_id": 116, "category_id": 2, "bbox": [303.7420349121094, 514.3583984375, 163.66473388671875, 28.832763671875], "score": 0.9999918937683105, "association_id": 0, "segmentation": {"size": [608, 738], "counts": "Tce51nb02O000000001O01O00000001O0001O0001O0000000000010O0000000000000000000000001O000000000000001O00001O000O10001O01O01\\]OH^b0=01O000010O0000001O0000001O00000010O0000000001O0000000000001O000000001O000O10001O000000001O000000010O00000000000001O01O00000001O0001O000001O000001O01O000001O01O000000010O0001O001O0000001O001O000O2NWnS5"}}, {"image_id": 116, "category_id": 1, "bbox": [351.938232421875, 99.67792510986328, 170.1822509765625, 354.492919921875], "score": 0.9999910593032837, "association_id": 0, "segmentation": {"size": [608, 738], "counts": "Pal64jb04M20O10O011O4L03KkY25SfMD^i30jVL6_MLmA8i=1TB3e=2ZB0c=2[B0b=2^BN`=5^BM^=7aBJ[=:cBG_7JeKk0kL\\O^7KcKo0jLXOb7KaKR1hLVOe7IiJ@aLe1l0UOi7HeJDbLb1l0UOl7FfI[OkMa0A\\1o0UOl7FdIAgMg2e0TNP8DcIU3[NYMQ8BcIX3XNYMT8_OcI\\3PN\\M[8YOdIf3`MZMj8POPHB9W6e7WJPHF8V6g7SJQHH5W6j7QJQHH4X6l7PJoGH3Y6o7oInGI1Y6R8mInGKLZ6W8jImGNIY6[8hIlGOHY6^8eIlG0HY6a8bIiG3HZ6i8VIcG?EY6R:dIoE\\6R:cIlE_6T:bIZFn5h9SJXFj5h9YJWFP4QOkLj:WOWFi3WOcLe:J[FX3WOeL[:;^Fm2[OcLU:e0`Fg2]OaLP:m0QFT3OnKn9P1PFV31jKn9R1nEX33fKl9T1PFX34cKk9V1lE]39]Ki9X1kE^3o3k0WMh7jNSG8n0f3;QM_8RO[Gl3d0ZLU:d3e2N2O1N2M3K5WMc@O3I3;\\?[ORA;h0JX?2m1O1O1N2Oj]OL`a04_^ON`a02_^O0ba0M_^O3Yb0M3LkRW4"}}, {"image_id": 116, "category_id": 2, "bbox": [20.203659057617188, 494.6642150878906, 267.903564453125, 46.243377685546875], "score": 0.9999889135360718, "association_id": 1, "segmentation": {"size": [608, 738], "counts": "kn<5jb02N10001O0000001O00000O2O01O00000001O000000001O00000000001O0O1000000O101O0O1O10000O2O0000000O1000000O2O00000000000000001O01O00000000001O0000000O10001O001O000O101O0000000000000001O00000000001O0000001O000000000000001O001OO1O1L4M3K6M2O3M10jU41UjK1O000010O0001O1O000001O000010O0001O0000000O2O00mN5R_OJl`0I76F2NN3M=B2M100O00ZOW^O7ia0JU^O7ja0`0O1NGX^O^Oea0d0`^OXO`a0h0`^OYO`a0f0]^O^Oca0o010000O10002020L3J4K4M2O2aLYNbEi1]:YN_Ei1a:YNVEo1h:UNlDU2R;PNfDU2Y;mMbDV2\\;mMbDT2];nMaDR2_;QN]DQ2a;TNZDn1e;TNYDl1g;VNXDj1h;VNXDi1h;YNWDg1h;ZNXDe1h;\\NXDb1i;^NWD`1k;`NVD_1j;`NiCnNTO`2T=ZNPDYOjN\\2V=[NQDYOiN[2V]OWX[4"}}, {"image_id": 116, "category_id": 2, "bbox": [622.7000732421875, 315.66046142578125, 110.4609375, 90.8792724609375], "score": 0.4867560863494873, "association_id": 0, "segmentation": {"size": [608, 738], "counts": "mjb;:eb02M3L3J7O1O1O1O0O2N1O2O0O2O0O2O1O0O2O001N2O0O2O001N101O001O001O00001O001N101O1N101O00001O000001O001O010O010O010O1O100O01000O00100O0100O0010O001O01O1O10O00001000O0100O1O1O2O0O0010O010N1O1M4XO[Ni_Oo1R`0WNk_Ok1T`0WNg_Om1Y`0=O2O00001O00O2gMg_O12V1X`0fNi_O25S1T`0gNj_OO9X1Wa0Igc2"}}, {"image_id": 116, "category_id": 1, "bbox": [228.7382049560547, 108.1387939453125, 341.86553955078125, 315.46051025390625], "score": 0.3592883050441742, "association_id": 0, "segmentation": {"size": [608, 738], "counts": "PY_41ma05j^O5Pa06c^O1Wa0o0M5K5L01oNl^ON]a0Hm^O0Xb0Hjd:Ia[E0O20N1000_a?2X^@7M4M3L4M2eM^OUBf0f=_OXBb0i=]OWBc0j=\\OWBc0k=ZOWBe0j=ZOVBe0l=ZOUBe0l=ZOTBf0T`0N2O001N102MnXk1B_gTN2O2N2fALe95ZF1a90^Fe0l8]ORGi0i8YOSGj0k8XOVFCbMW1W1N1O2N3bN0g_O2U`07d_OKX`0]GDb8;^GGW73mD6l3HT76mD3Y1_O?9Z98jD5Y1\\Oc06Y9>fD4X1\\Oi02W9b0dD3R1AS1KU9d0cD4m0DZ1CU9f0cD5k0F[1@T9g0fD4i0G\\1^OT9i0fD4e0K^1XOV9j0gD3c07V1lNa9f0mDLm0JQ=6fBZOl0NcT1kAkNW>R1jAmNS>U1PBjNV;IjE_1SOcNU;1iEX1RZNR1e3[7iMZG@G@b0B6K1d3^8lMXG_OBCa0C6LO]3h8nMVG@]OE`0D5NNV3Q9PNSG@ZOH?D5OMP3X9QNQGCVOI?D41Lk2_9QNoFDUOJ=E32Lh2c9QNPGDQOMRNnA:3MLe1W>RNjA=2OJa1]>PNiAa0NW2k>jMSAU2n>mMo@T2R?l01N5mLm@Q2Z?eMSAKJg00]O[?FoA2@Nige0`0YiZOg6P1TMdNPL?l6l0UMiNfK`0V7f0TMX1m2fNSM[1m2eNSM[1n2dNRM\\1o2bNRM^1n2bNRM^1o2aNQM_1o2`NRM`1o2_NRM`1n2_NSMa1n2]NTMb1l2]NVMeN_K_1\\7KgMoMXKMH[1[7g0lMfMUL[1o5n0NlN3R12jNOT16gNLW18fNILZH>P8DGIbH0ihA5L100O01O00101N2OO100O2N3M10O1N2O5KbZa6"}}, {"image_id": 116, "category_id": 2, "bbox": [659.7732543945312, 274.49139404296875, 40.97442626953125, 11.87188720703125], "score": 0.05358471721410751, "association_id": 0, "segmentation": {"size": [608, 738], "counts": "ggX<5kb01N2O00000O10000O1O100000O1O10000O10000O100O10000O1000000O10001N10\\Xi0"}}, {"image_id": 117, "category_id": 1, "bbox": [129.72640991210938, 490.4679870605469, 103.672119140625, 83.01248168945312], "score": 1.0, "association_id": 5, "segmentation": {"size": [768, 1024], "counts": "P`V36ig04L3M3L?Ai0O3JmPk2"}}, {"image_id": 117, "category_id": 1, "bbox": [554.2620849609375, 637.6264038085938, 165.22900390625, 130.37359619140625], "score": 1.0, "association_id": 1, "segmentation": {"size": [768, 1024], "counts": "[eT=T1if04N2N1O2L4ZOe0L5N2N100O1N2O1O100O100O1O100O2O0000001O00001O3M2N5K1O1O1O:F9G2N1O001O001O1O001O0000000000O100O10000O1000000000000O1000000O100000000O1000000O10000O100000000000000O2O1O1O001O00001O001O1O001O001N101O002N1O001O001O1O1O1O1O010O4L2O0O1O10003M1O0O010O1O1O10O0010O00001O001hMgZOg1[e0UNjZOg1je0N2M2O1O0O2O0O2O1N1O2N2O1N2N2N2N2L5AnQT7"}}, {"image_id": 117, "category_id": 1, "bbox": [800.7103271484375, 378.900146484375, 61.74945068359375, 39.2635498046875], "score": 1.0, "association_id": 6, "segmentation": {"size": [768, 1024], "counts": "Qlib0295Rg0`0M100O101O0O2O2N1O2N1O001O000000000000O100000000000000000000000000000000000000000001O001O001O1N20O01O2N001O1N4L3M3J6KeSi3"}}, {"image_id": 117, "category_id": 1, "bbox": [329.5439453125, 390.515869140625, 67.24600219726562, 51.142791748046875], "score": 1.0, "association_id": 3, "segmentation": {"size": [768, 1024], "counts": "fdh79bg0c0^O5M4M1O2N2O1N2O1O1O000000000000000000000001O00000O1000000000000O10000001O01O0000001O00001O1O1O3M1O2N001O001O001N2O2N9G3M2M4K4Mebf>"}}, {"image_id": 117, "category_id": 1, "bbox": [639.5061645507812, 388.2107849121094, 84.7645263671875, 77.60610961914062], "score": 1.0, "association_id": 2, "segmentation": {"size": [768, 1024], "counts": "ZmQ?9dg08J2N2N3M1O2N2O0N3N2N1M4G8N3M3M2O2N1N2O1O1O2O00000O10001O00000000001O0000000000000000000000000000001O0000000000001O0000000000000001O00001N3N1N2TOnYOGUf03RZOHQf05TZOFoe08SZOERf06o0K5K^kR7"}}, {"image_id": 117, "category_id": 1, "bbox": [234.10501098632812, 382.2258605957031, 60.133758544921875, 48.722747802734375], "score": 0.9999998807907104, "association_id": 7, "segmentation": {"size": [768, 1024], "counts": "^\\a5h0Ug04N3L4M1N2O1O0O2O2OO01000001O0O011O0000O100000000001O00000001O0000001O001O1O001O0O2O1O1O1O1O1O1O1O1N2O4VOmXO?\\g0N3M1O3JRkSa0"}}, {"image_id": 117, "category_id": 1, "bbox": [524.3457641601562, 329.343994140625, 51.12994384765625, 37.988739013671875], "score": 0.9999998807907104, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "fRZ<>_g04N2M3O0M3O1O2O1N2O1O0O2O00001O000000000000000000000000000000000010N11O01N10001O001O2M2O5H8B_eb:"}}, {"image_id": 117, "category_id": 1, "bbox": [153.30740356445312, 359.37310791015625, 58.95036315917969, 44.205108642578125], "score": 0.9999996423721313, "association_id": 8, "segmentation": {"size": [768, 1024], "counts": "P\\e33bg0a0H8I2L4M2O1O1O100O10O0100000000000O0100000000000000000000000000001O0000001O1O001O1N2O3M1O1O1N2N101N2O;D5KlSRc0"}}, {"image_id": 117, "category_id": 1, "bbox": [873.6727294921875, 459.1334533691406, 66.73687744140625, 60.692779541015625], "score": 0.9999949932098389, "association_id": 10, "segmentation": {"size": [768, 1024], "counts": "en_d03jg03O2N100O3M2O0O2O1N2O1O1O0O2O2N2N3M5K5WYOnNZf0]1O1O010O1O1O000000001O00001O0000000000000000000000000001O00000001O0000O2O00001O001N2O1O1O4LYan1"}}, {"image_id": 117, "category_id": 2, "bbox": [819.7991333007812, 529.734619140625, 97.34173583984375, 26.04888916015625], "score": 0.9999939203262329, "association_id": 4, "segmentation": {"size": [768, 1024], "counts": "hXXc01og0001O1O0O3N4L1O0010O01O001O00010O00001O00001O000000001O00000000000000001O0001O00000000001O0000000O11O01O001O001O1O1O001O1O001O000000010O0000O10000O1N1L5N2O100O11O001O000O2O00001O00000O101O0OUg_2"}}, {"image_id": 117, "category_id": 2, "bbox": [665.3744506835938, 451.9518127441406, 68.0977783203125, 14.630859375], "score": 0.9999663829803467, "association_id": 2, "segmentation": {"size": [768, 1024], "counts": "YVc?2lg03O00001N1001O0001O00010O00000000001O0000000000001O0001O000000000000000000000001O0000000O10O1000O10000000000001O000O2O001N10001NfQl6"}}, {"image_id": 117, "category_id": 2, "bbox": [239.28863525390625, 422.6950988769531, 61.635009765625, 9.709320068359375], "score": 0.9998937845230103, "association_id": 7, "segmentation": {"size": [768, 1024], "counts": "\\Ue51ng02O000000001O000000000000000000000001O00000000000001O00000000000000000O100000000000000000O10000000O100O100O001000O103Khjm`0"}}, {"image_id": 117, "category_id": 2, "bbox": [167.05084228515625, 391.44366455078125, 57.35552978515625, 14.27288818359375], "score": 0.9995741248130798, "association_id": 8, "segmentation": {"size": [768, 1024], "counts": "b\\n31og01N1000000000000000000000000000001O000O11O0O1000000000O10001N1000000O1O100O10O01O100O1000000O11N100O1O2N2NfSib0"}}, {"image_id": 117, "category_id": 2, "bbox": [469.3340148925781, 352.5643310546875, 52.020843505859375, 11.478759765625], "score": 0.9987049102783203, "association_id": 9, "segmentation": {"size": [768, 1024], "counts": "VSP;2mg02O1O001O00000000000000001O00000000000000000000000000O10001O00O100O1000000000000000000001N10001OjTk;"}}, {"image_id": 117, "category_id": 2, "bbox": [812.6298217773438, 408.942626953125, 58.42938232421875, 10.563385009765625], "score": 0.998458743095398, "association_id": 6, "segmentation": {"size": [768, 1024], "counts": "nlXc02ng00O1000001O00000000000000001O0000000000000000000000000000000000001O0O10000001O0O101O001O0O2OPkc3"}}, {"image_id": 117, "category_id": 1, "bbox": [251.19924926757812, 326.2054443359375, 43.0186767578125, 32.948486328125], "score": 0.9968403577804565, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "aRn5a0^g04L1N2O2N100O1O100O100000000000000001O000000000O10001O001O1O1O1O001O1O1O1O1O3L3LZUSa0"}}, {"image_id": 117, "category_id": 2, "bbox": [898.5999145507812, 511.0973205566406, 43.27716064453125, 11.818817138671875], "score": 0.9947550296783447, "association_id": 10, "segmentation": {"size": [768, 1024], "counts": "RXTe01ng06K1O0010O002N001O000001O0000000000000001O0000000000000000O1000000000O2Ojoo1"}}, {"image_id": 117, "category_id": 1, "bbox": [764.2319946289062, 342.4320068359375, 46.772216796875, 47.1517333984375], "score": 0.9925227761268616, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "kjna05gg09]XOCO0Vg0m0I3L2O4L2N1O1O1O000000000000000000000000O10000001O000010O0001O01O2N1N2lN[YOk0Rg0H6L4M3L4H`lP5"}}, {"image_id": 117, "category_id": 2, "bbox": [348.1075439453125, 432.3746032714844, 57.538543701171875, 9.657318115234375], "score": 0.961330771446228, "association_id": 3, "segmentation": {"size": [768, 1024], "counts": "gmV81og0000O1000000000000000000000001O0000000000000000000000000000000O10000000000000000O1000O01O1O100O1001N100O1O`b`>"}}, {"image_id": 117, "category_id": 2, "bbox": [150.60995483398438, 545.4053955078125, 96.11398315429688, 25.98162841796875], "score": 0.9521000385284424, "association_id": 5, "segmentation": {"size": [768, 1024], "counts": "fid31og000001O00001O000000001O00000O1000000000000000001O00000000000000000000000001O0000000000000000001N1000000000001N1000og30QXL0O100O1N200_OMTYO4lf0MPYO6Pg0LiXO8Xg0800O010000O10000O1O2N1O1N2N2O6Hl^Xb0"}}, {"image_id": 117, "category_id": 1, "bbox": [193.64105224609375, 302.73944091796875, 27.45947265625, 22.18536376953125], "score": 0.9506617784500122, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "hYc4410bg0;M2N101N001O10001O0000000000000001N2M3O1O0O2J6M]nib0"}}, {"image_id": 117, "category_id": 2, "bbox": [703.52587890625, 738.5338134765625, 30.29620361328125, 27.4725341796875], "score": 0.8823862671852112, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "kob`02mg01I7N3O0O11O0000N1L5M3O100001O1O1N3N1O1N2O1N2MbPk6"}}, {"image_id": 117, "category_id": 1, "bbox": [461.03460693359375, 327.8712158203125, 43.554779052734375, 30.539703369140625], "score": 0.8345006108283997, "association_id": 9, "segmentation": {"size": [768, 1024], "counts": "^jj:5jg03M9G3N5J100000000000000O1000000000000001O000000000000000000000000001O100O1N2O1O3L5F_mT<"}}, {"image_id": 117, "category_id": 2, "bbox": [598.6007080078125, 743.1683959960938, 134.031494140625, 22.5599365234375], "score": 0.6495947241783142, "association_id": 1, "segmentation": {"size": [768, 1024], "counts": "jg^>3lg01O1O10000O1000001O0O100000000000000O100000000000000O1000000000000O1000000000000000000000000000000000000000000000000001O000000001O0000001O00001O001O0O2O1O1O1O1O0000000000O100O100N2N2N2M3O10000N2O100N200N200O10000001N102N1O000O2O1N5FYXOOYXj6"}}, {"image_id": 117, "category_id": 2, "bbox": [210.2303466796875, 539.8461303710938, 31.9486083984375, 28.0076904296875], "score": 0.24631507694721222, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "giT51ng010000O100XO2]YOObf04ZYONff04TYOOmf0b00000000O2N101N1O2O0N3N2M3MPoYb0"}}, {"image_id": 117, "category_id": 2, "bbox": [531.115966796875, 360.6203308105469, 41.38507080078125, 7.638153076171875], "score": 0.19610396027565002, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "Z[_<2ng00Rh3OPh00o_K00000P`10Ph60PhG001N1000O010Ofdb:"}}, {"image_id": 117, "category_id": 2, "bbox": [255.2752227783203, 351.3141174316406, 45.58482360839844, 9.589691162109375], "score": 0.12428076565265656, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "V[S61og00000000000001O00000000001O0O1000000000000O100000O2O0000000O1000O001000NolPa0"}}, {"image_id": 118, "category_id": 1, "bbox": [953.2904052734375, 491.6644287109375, 68.0333251953125, 62.84283447265625], "score": 1.0, "association_id": 1, "segmentation": {"size": [768, 1024], "counts": "ZX^f012"}}, {"image_id": 118, "category_id": 2, "bbox": [950.4072265625, 548.7345581054688, 67.4974365234375, 8.63720703125], "score": 0.9997612833976746, "association_id": 1, "segmentation": {"size": [768, 1024], "counts": "ViYf03lg01000001O000000010O000001O001O00000000000001N1O1O10000000000000001O0001O00001O1O001O00001O0000000000000000O1000000O10000O1000000001Nin3"}}, {"image_id": 118, "category_id": 1, "bbox": [126.1532974243164, 469.41632080078125, 42.635536193847656, 190.39544677734375], "score": 0.45090770721435547, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "UoQ33ng0NN5N0Q\\O8h?E__OW1X`0SO^_OX1\\`0mNX^O]2ga0eMc]OP3[b0RMf]O_O\\OT3nb0_Mo]O_2Rb0`Mo]O_2oa0bM]^OS2ba0nM_^OQ2ca0lM^^OT2`a0nMa^OQ2^a0PNb^OP2`a0nM`^OR2_a0oMa^OR2]a0PNc^Oo1^a0QN`^OP2_a0RN`^Oo1_a0RN`^On1ba0SNZ^OQ2ea0kM\\^OV2fa0fMZ^O]2ja0`MR^Oc2la0aMQ^O_2ma0eMP^O[2Tb0cMj]O_2Ub0aMk]O^2Vb0`Ml]O]2Zb0_Mf]Ob2fb0PM^]Ol2Yb0ZMQ^O`2Xe0nM\\YOC[\\Td0"}}, {"image_id": 119, "category_id": 2, "bbox": [644.0005493164062, 813.1437377929688, 123.99945068359375, 106.28729248046875], "score": 0.9999998807907104, "association_id": 2, "segmentation": {"size": [1024, 768], "counts": "eiTd07co09L2O2N1O1O001001O1N100O5K3N1O001N1000000O100O0100O1O1O0010O0100O001N1000001O00100O001O0000001O1O1O1O1N2N2O001N2O1O1O000O2O1N2N101N2O1N2O1N1O2O001N2O001O1O001O1O00001O001O1O100O1O100O100O100O1O1O2O0O101O1N1O100O1000O010O01O1O001O001O10O001N2O2M>]OYUO"}}, {"image_id": 119, "category_id": 1, "bbox": [381.4837646484375, 546.093017578125, 257.814697265625, 477.906982421875], "score": 0.9999998807907104, "association_id": 3, "segmentation": {"size": [1024, 768], "counts": "\\eY<:_o0:I6L2N3L4M3L3L5L4L3M4M1O2L3O2M2O2N101N1O2N2N1N3N2RWOfMTd0[2[[ODVc0>e\\OMSc05j\\O2Pc00m\\O6nb0KP]O:lb0HQ]O>kb0BS]Oe0gb0\\OV]Ol0eb0TOV]OX1bb0iN[]Oa1^b0^Nb]Oi1Xb0TMmZOoNm2R4dN]K_a0a1T]OiNk2^4]NdKYa0U1a]OhNh2b4[NbKZa0W1_]OlNg2^4\\NaK]a0X1[]OQOe2[4_N]K_a0`2m_OY2]NZKda0c2f_O]2^NSKja0f2Z_OQ3XN]J\\b0i2Q_OX4m`0lKm^OW4Ra0mKi^OU4Va0nKg^OS4Ya0oKc^OT4\\a0oK_^OS4`a0RLY^OR4fa0U5O001O00001N100O100O100O100O1O1O1N2N2O2M2O1O1O1O1N2N2M3M3N2O1N2O1000000000000O0100000000O100O100O100O10000001O00001O0000001O00001O000000001O0000000001O0001O000001O001O001O001O1O1O2N2N2N3M2N2N3M2N4L6J6J8H8H4L3M2N1O1O2M2O2N2N2M3N2N1N3N1M4L4I8hNZ1ZOh0D;F7J4M4L3N3M2M4M3M4K4M3ZORXOUIQh0i6oWOWISh0g6lWOZIVh0d6jWO\\IXh0U72N1O2N3M2N2000000101O00O0O100N2O1O2M6K8G5L2N1N2OO01N2O1O1O1O1PN[VOcMfi0Z2_VOcMoi0m1VVOoMQj0i1UVORNoi0i1XVOPNmi0j1^VOkMfi0P2jVOaM[i0e1m2PO\\RO[Omm0?m0K5K[W]4"}}, {"image_id": 119, "category_id": 1, "bbox": [214.46194458007812, 538.5863647460938, 153.17312622070312, 440.36529541015625], "score": 0.9999997615814209, "association_id": 1, "segmentation": {"size": [1024, 768], "counts": "_eW7Y1`0ZOol0P1fRO_Onl0Q2F9DfU4"}}, {"image_id": 119, "category_id": 2, "bbox": [220.01124572753906, 859.533447265625, 113.67008972167969, 74.0882568359375], "score": 0.9997163414955139, "association_id": 1, "segmentation": {"size": [1024, 768], "counts": "lkm68go02N1M3N3N1N1L5N01001N2O100PQOVOjn0U1J6J3N1O1N2O1O000O101N1O101N1O2O0O100O1001N1M3O1M4C>CkPO@Vo0`06OjPO@mn0?;O10O01O1O1O1O1O1O1O002MXTj="}}, {"image_id": 119, "category_id": 2, "bbox": [349.9884948730469, 714.11865234375, 29.38629150390625, 6.3975830078125], "score": 0.9784950613975525, "association_id": 3, "segmentation": {"size": [1024, 768], "counts": "\\fo:3mo01N100000000000000000000000000001N10000O10dYZ<"}}, {"image_id": 119, "category_id": 1, "bbox": [561.13818359375, 551.1696166992188, 95.218994140625, 197.74114990234375], "score": 0.6728553771972656, "association_id": 0, "segmentation": {"size": [1024, 768], "counts": "]bca0d0Yo06K6J5L1O01002N2N3M2M2VOeNmRO]1Pm0hNlROZ1Rm0gNmROa1jl0aNUSO`1jl0`NWSO`1hl0aNVSOa1il0bNSSO`1ll0cNPSO`1nl0bNoROa1nl0h01O1O11bSOSMgk0k3H6J2N3M2O0O1O2NRLcTOa30TLlj08XUOn3gj0lK_UOS4Wk0100O010O100O1O001O01N1NaTOhKZk0X4dTOjK\\k0V4aTOnK_k0Y40GdTOnK]k0P4eTOPL\\k0l3fTOTL[k0j3fTOWL2Mij0l3UUOWLZk0h3fTOXL7M`j0l3YUOVL7Naj0i3ZUOYL31bj0d3^UOYLM7ej0_3_UOZLI:hj0\\3_UO\\LE;lj0X3^UORMdj0m2ZUOTMhj0l2VUOTMjj0j2WUOWMjj0h2TUOZMlj0e2TUO\\Mmj0c2RUO^Mnj0b2TUO\\Mlj0e2SUO[Mmj0g2QUOYMPk0k31O1O2N1O1N2POjTOTMYk0m0cTO74iN^k0a0QUO=MeNVk0g0WUO?EgNXk0a0[UOe0^OiNXm0U1hROjNZm0T1j0O1M4L5J5N2M3NWZ`3"}}, {"image_id": 120, "category_id": 1, "bbox": [210.05291748046875, 9.38147258758545, 66.26260375976562, 132.02749633789062], "score": 1.0, "association_id": 2, "segmentation": {"size": [599, 506], "counts": "cWm34bb02N2M201OOj_OMi=4UBNk=1TB2l=LSB6m=JRB7m=IRB9n=ESBm=ASB`0l=ARB`0m=BRB?m=BRB?m=BPB?R>AjAb0U>AgAa0Y>@aAd0`>]O^Ac0c>_OXAc0R>PO^A>=b0S>XO[A8JT1m>hNUA7GT1T?iNQAP2P?h04N2M2O2N2O1O101O01O0101O1O;F0O1O0ZOR@bNo?[1T@dNl?Z1V@gNj?V1W@lNi?R1W@SOf?k0[@XOc?f0^@\\O`?c0a@]Ob?>`@Ao?0R@OQ`0NP@1S`0Kn_O4U`0Im_O5V`0Hm_O6V`0Em_O8[a0N5J]PW4"}}, {"image_id": 120, "category_id": 2, "bbox": [271.11602783203125, 195.10992431640625, 63.4505615234375, 83.12576293945312], "score": 1.0, "association_id": 4, "segmentation": {"size": [599, 506], "counts": "Shn45_b06K3M4[^OBk`0b0Q_OBb`0k0[_OWOc`0k0Z_OWOd`0`1O1N100O1O1O1000000O10O012M2N3M3M2N100O1O10000O100O0010O001O1N101O0O10[OT_O@l`0=Y_OAg`0?[_O@e`05f_OJZ`05g_OJZ`06g_OIY`07h_OHX`08i_OGX`07j_OIV`05k_OKV`04j_OMV`00l_O1T`0Mm_O3T`0Jn_O6S`0Go_O9Xa0O010O003LSoT3"}}, {"image_id": 120, "category_id": 1, "bbox": [293.2082824707031, 56.07792282104492, 68.36715698242188, 155.0182342529297], "score": 0.9999998807907104, "association_id": 4, "segmentation": {"size": [599, 506], "counts": "\\b[59[b08I1O20N2O0000O0101O01jM9\\AG_>b0]A^Oa>e0]A[O`>j0_AVO`>l0^ASOc>P1ZAPOg>Q1WAoNh>T1VAlNi>W1VAhNj>[1TAdNm>a1m@_NT?d1h@\\NY?g1a@\\N_?i1Y@ZNf?]2O2M3L5K5K2B?M3N1O2OO0O2O100@`AhLa>R3iAdL]>U3f0M3M3I8K5oMR@T1R`0jNR@R1P`0kNT@S1m?jNW@S1m?gNY@W1g`0L4L6J3N3M2N1O3M1N3M2N3L7IQ^f2"}}, {"image_id": 120, "category_id": 2, "bbox": [259.6142272949219, 468.55059814453125, 87.76678466796875, 96.6173095703125], "score": 0.9999997615814209, "association_id": 6, "segmentation": {"size": [599, 506], "counts": "cch4d0Rb04L4K3N2N2_OQOS_OU1i`0>00O1O1O1N2K5M3K5N2O1N2L4L4M3N2O10000O100O1O10O1N2O1N2M3N2mMn_O`1S`0ZNT@b1P`0[NS@b1o?]NS@a1n?_NS@]1P`0bNR@[1Q`0cNQ@[1Q`0cNQ@[1g`0M200N3N1O1O1N110O1O1O1O000O110O0E;O001O1000010OO10000000000000O2O001O1O1O1O1O1N6Ikfm2"}}, {"image_id": 120, "category_id": 2, "bbox": [329.4403076171875, 458.9969787597656, 111.1011962890625, 100.31118774414062], "score": 0.9999997615814209, "association_id": 5, "segmentation": {"size": [599, 506], "counts": "]XS64bb02O0O100O1O10O01e^O1n?NP@9l?GS@l3I5M2N2L3N[OmAjLQ>V3VBgLe=Z3^BfL_=[3cBeLZ=]3gBdLV=\\3lBdLR=]3oBcLP=\\3RCbLo<^3QC]LT=c3mBYLV=g3iBYLX=g3hBYLX=h3dB[L\\=d3l0L4N200OXAcLX>\\3hAiLT>W3kAjLU>W3iAfL[>\\3aAcLb>h3100aLbAe2_>VMgAh2Z>TMjAk2R?E^@_Me?N`@S2KnMe?Ii@V2EoMa?Mo@l1CVN]?OYA`1]O_NZ?2ZA\\1^ObNV?4^AW1]OgNQ?5dAo0]OVOd>LPBl0]OXOc>LPBj0^O\\Oa>JRBh0^O^O`>ITBg0]OAJBT>4gBf0]OFDCi?a0f@2ZO@P`08k@d0U?\\Ol@`0W?@j@;[?Df@9\\?Id@4]?Oa@0`?0`@Na?1a@M`?3b@Hb?6b@Db?9b@Ac?<_1L4Ig^m0"}}, {"image_id": 120, "category_id": 2, "bbox": [199.0960693359375, 481.4548645019531, 69.697998046875, 53.627105712890625], "score": 0.9999990463256836, "association_id": 1, "segmentation": {"size": [599, 506], "counts": "aWg35Yb0=K2N4L3N0O2N1O2O1O1N3M2O100O02O0O100O00100O00010O01O01O00001O00000000000O100O101N101O0O2O000O2O1O0O2N2O0O2N2O1N1O2O002N1O1N2N4KSgZ4"}}, {"image_id": 120, "category_id": 2, "bbox": [185.70877075195312, 130.51577758789062, 77.4248046875, 61.487457275390625], "score": 0.9999988079071045, "association_id": 2, "segmentation": {"size": [599, 506], "counts": "Va]32db02N2N10000[^OJi`06V_OMh`03V_O0i`00V_O1j`0OV_O2i`0NV_O3k`0LU_O5j`0KU_O6k`0KS_O6m`0JR_O7o`0Io^O7Ra0Il^O9Ta0Hj^O9Va0c0100O100O10000000O101N100O1N2O1O1M3O010000O010O1O101N001O1O1O1O001N2YO_^O7ba0H`^O6aa0Ia^O5_a0Kc^O3^a0Mb^O2_a0Mb^O2^a0Nc^O2]a0Nc^O1^a0Ob^O0_a00a^OO`a00c^OM^a03b0010O10000O10O010O10O12M`P^4"}}, {"image_id": 120, "category_id": 1, "bbox": [333.33721923828125, 153.91409301757812, 56.203643798828125, 144.2725830078125], "score": 0.9999988079071045, "association_id": 3, "segmentation": {"size": [599, 506], "counts": "X]U64Q`04UB4f=NVB5i=MSB7h=NUB4g=2VBOf=5WBMf=7WBLf=7WBLh=5VBLj=7PBKQ>7jALU>9dAKZ>:^AJb>?o@FR?n101O10O01O1O10O1000N2O00100010M3O1WOSAeMP?Z2g000O10000O1O1N2O1N2M3O1N3M3M4^N]_Oi0^a0J5G;[OeXT2"}}, {"image_id": 120, "category_id": 2, "bbox": [308.5776672363281, 292.6407775878906, 49.2783203125, 44.283905029296875], "score": 0.9999864101409912, "association_id": 3, "segmentation": {"size": [599, 506], "counts": "hif5145Vb0`0F3M2O2N1N2O1N102M1O2O0000001O0000O100O01O0100N2O1O1O100000000O11O1N101O001OPOc^Og0]a0UOi^Oh0fa0N1N2N7I3DbXf2"}}, {"image_id": 120, "category_id": 1, "bbox": [258.61993408203125, 332.01470947265625, 102.20053100585938, 154.3912353515625], "score": 0.9999334812164307, "association_id": 6, "segmentation": {"size": [599, 506], "counts": "PgP56`b02OM3O101MQY51[fJ1_^O3_a0c0O2N1M3O1N3N0O2YOXO\\_Oi0d`0e0OF[_OdNb`0^1651OQOdNe@]1W?Q11100O1000010N101O1O1O101N2N2M3O0N3M3N3N1N3N4L3M2N3M3M2N1O3M2N1O1O10O0kNmAgMR>T2[BdMe=X2cBdM]=Z2gBdMZ=Y2hBgMX=i0YB@c0FW=EiAb0b2Ig;AlA?b2O[?01O1O1O0000001O000O2N^nd2"}}, {"image_id": 120, "category_id": 1, "bbox": [397.43499755859375, 414.28662109375, 55.23626708984375, 72.08255004882812], "score": 0.9475911259651184, "association_id": 0, "segmentation": {"size": [599, 506], "counts": "oWY7e0Qb04L4L2O2N1O1N2O1M2I8N2N1O2O1N1O2O1N101N1000000O1000000001O1O1O1O1N10000O001O0N2N3N1O2M4N3L3M3K5L4M3M2N4L4JYUo0"}}, {"image_id": 120, "category_id": 2, "bbox": [449.6134033203125, 0.5076665282249451, 45.65576171875, 23.629161834716797], "score": 0.9234335422515869, "association_id": 7, "segmentation": {"size": [599, 506], "counts": "gWW88^b02O002N1O1O1OJk]OKTb04n]OKQb05P^OKoa06Q^OJna06S^OJma05T^OKka05U^OLja03X^OMha02Y^ONga01Z^OOfa00[^O0ea0M^^O3Qb01100O01O01OO1011M2O02XV?"}}, {"image_id": 120, "category_id": 1, "bbox": [453.3144836425781, 1.370643973350525, 44.59844970703125, 20.76555633544922], "score": 0.8691022396087646, "association_id": 7, "segmentation": {"size": [599, 506], "counts": "WhZ83db01O1O0O2OOKKi]O5Xb05O1LEk]O"}}, {"image_id": 121, "category_id": 2, "bbox": [86.75146484375, 476.955322265625, 46.50251770019531, 20.121063232421875], "score": 0.9999940395355225, "association_id": 1, "segmentation": {"size": [768, 782], "counts": "[gQ23lg02N1O010O01O01M2O2O10O002OO1000O100000000000O010000000O100000001O00001O0000O101N1O2N10QiW?"}}, {"image_id": 121, "category_id": 1, "bbox": [402.0332946777344, 291.2071228027344, 186.27676391601562, 379.0262145996094], "score": 0.9999778270721436, "association_id": 4, "segmentation": {"size": [768, 782], "counts": "oZc9`0^g04M2N1N3N1N3M2N2N3N1O1N2N2M4M2N2N2N2M3K5M2O2N2M3K5F9L5M3M2oLQMQAP3o>aM_@_2c?mMn_OS2T`0oMj_OP2W`0SNe_On1[`0TNc_Ol1]`0VNa_Oj1^`0XNa_Oh1_`0ZN__Oe1b`0]NZ_Oc1h`0_NU_O`1m`0aNQ_O^1Ra0cNl^O]1Sa0fNk^OZ1Sa0iNl^OV1Ta0mNj^OS1Ua0oNk^On0Va0UOh^Oj0Xa0YOf^Of0Za0\\Oe^Oc0Ya0Ae^Oa0Q>ZMWDZ2fM=S>\\MQD\\2iM9V>^MkC]2mM6X>`MaCb2UNO[>aMPCo2bNA^>cMjBR3eN[Ob>fMcBW3dNSOk>hM[BY6g=iISBY6n=jImAX6T>jIgAX6Z>iIcAX6^>jI^AW6c>nIVAS6k>UJk@l5V?]12M3N1O2N2N2L4M3N2N2N2O1O1N2N2N2O1O2O01O000000001O2N3M2N2N101N2O2M4M2N1O1002O3N5J4NM00O2O001O10O3L3M2O5J9H2N2N2ObHPAh5o>PJZAn5f>iIfAU6Z>dIoAY6R>cIVBY6j=cI]BY6d=dIaBV2^N\\1R?YLfB9QN\\1>o1l>ZLjCo0`Md2ab0\\Lo]Ob3\\c0K9G5K3N1N1O1O1O1O1O1O001O001O0O2O00O01O00000N2O2N2M3L4ROn0M3N2N2O2N1O1O1M4M3M8F9IZVf4"}}, {"image_id": 121, "category_id": 2, "bbox": [394.2860107421875, 528.2649536132812, 205.352294921875, 130.66168212890625], "score": 0.999958872795105, "association_id": 4, "segmentation": {"size": [768, 782], "counts": "VcY99eg03O1O00001O0001O00101N1O1O1O10O01O1N3LZgk09^XTO2N2N1O1O1N1L5M3N101O001N1O2N2N2O0O2O1O1O2M2O1N2O100O2O1N2O1O1O001O002N1O1O2N001O00100O1O1O0010O100O1oNSZONQf0LRZO3ne0KUZO4ke0KVZO4ke0KVZO5je0JVZO6ne0FSZO:Sf0_OmYOb0Wf0YOjYOh0Vf0WOiYOj0JSOVf06lYOi0IXOXf0OoYOR1_f000100O2O0O1O01O2O0O3WO[YO1if0I_YO2df0I_YO5df0G^YO9Tg001O1O1N101N101N1Ob\\13ZcN4L4M2N2O0O2O2N1O1O000000O2O0O2N2M4L6IUWU5"}}, {"image_id": 121, "category_id": 1, "bbox": [569.7214965820312, 318.8000793457031, 143.80615234375, 298.8018493652344], "score": 0.9997256398200989, "association_id": 0, "segmentation": {"size": [768, 782], "counts": "TQ\\=R1Qf0S1C9H5M3ZOfMd[O]2Wd0h0N20OVLeLj@9;o2m>QM_@<8^2_?ZMT@>7W2g?^MP@>5T2k?aMk_Oa05n1Q`0eMc_Oc09e1W`0lMT_Ol09l0Va0^34M4L3K5N2O2N010O1N2O2N111N100000h_O`JQ>_5nAcJQ>^5nAbJR>_5mAaJS>_5nA`JR>a5mA_JT>a5kA_JV>`5iAaJY>^5fAcJZ>\\5eAfJ[>Y5eAhJ[>X5dAhJ\\>[5bAbJa>a5m15L2M20O1O1fMl]OfNTb0S1U^OlNia0o0^^OPOaa0j0m^OoNSa0n0T_OnNl`0n0W_OSOj`0j0W_OXOh`0e0Z_O\\Of`0a0[_O@g`0g0Vg05L4L4M3N11N3N1NO3L3N3ChNmYO[1me0a0L5K4K5K5K6J4O0O010O0O100O10000cL]M]Ac2`>bM^A^2a>dM^A\\2`>gM`AX2]>lMbAT2\\>oMcAQ2[>RNeAm1Y>VNgAi1W>ZNjAd1T>^NmAa1Q>dNlA\\1S>gNjAZ1U>iNiAW1V>nNfAR1X>VOaAk0[>LQA5m>k2[A_Lo>b3g21N2O1N2M3M3N3M2O2N3M1O2M2O3L3M3K5L5L4L4M3M6I5KeM^^ObNZa0T1Z_OhN_`0U1h_OlNS`0Q1R@POl?>h@BV?1[ALc>3aAK_>2fALY>1mANR>0UBKk=3\\BHd=5eBE\\=]OiC;WM3M2O1O1O3M4L1O1O1JXXO6gg0Lgfe03YYZO5K3N2N2N1N3N1O001OO101O0O101O0O2L3O3IZYd0IWf[O7^YOK_f08_YOJ`f07_YOIaf07_YOIaf08]YOIcf08\\YOIcf07]YOIbf09\\YOHdf09[YOGff08[YOHdf07^YOHbf08_YOGaf09`YOG_f09bYOF^f0:bYOF^f0:cYOE]f0;cYOE^f09dYOF\\f0:eYOE\\f0:eYOE[f0;eYOE[f0:fYOF[f09eYOG[f09eYOHZf08fYOIZf06eYOMZf01fYO1Zf0NeYO4[f0KeYO5]f0IdYO7Sg000O01O001O1O001O1O001O01O01O100O1O10O010O00100O010O001O1O010O1O3L2M]]o2"}}, {"image_id": 121, "category_id": 2, "bbox": [475.943115234375, 521.9661254882812, 129.00225830078125, 196.666259765625], "score": 0.3219183087348938, "association_id": 0, "segmentation": {"size": [768, 782], "counts": "gaU;P1mf08I4N1N2N2O1O1O1O001O010O100O2O0O001O001O001O2NSOnYOMQf0OVZOOje0MZZO3fe0K\\ZO4fe0I\\ZO6ee0H]ZO8de0F\\ZO;de0D]ZO_OWA`0e>CZA>d>C]AC_A>^>CdA<[>CfA=Y>DgA;Y>DjA:W>EkA9U>GmA7S>InA7Q>HQB7P>GRB7P>GSB7n=GUB7m=DWB;ib0N2N6I5K^ce06[\\ZO3M3O0001N101N_fU4"}}, {"image_id": 121, "category_id": 1, "bbox": [295.08306884765625, 321.9877014160156, 36.459075927734375, 115.3787841796875], "score": 0.07522043585777283, "association_id": 0, "segmentation": {"size": [768, 782], "counts": "P[T7339Ug0>K4O0N8I5K4L=aYOZNle0m102N000100OjZOnMad0Q2Z[OTNfd0o1Q[OWNod0n0mZOUON9Ue0b0oZORO53md0g0T[OoN58id0e0l[OZOVd0c0k[O]OWd0>P\\O^OVd08o[OFXf0JeRd:"}}, {"image_id": 121, "category_id": 1, "bbox": [479.8101806640625, 287.86187744140625, 218.14306640625, 351.21282958984375], "score": 0.060181859880685806, "association_id": 0, "segmentation": {"size": [768, 782], "counts": "]iR<1bg0a0J9H6I6K4L4L3N1N2N3M3L4M9Gb0_O4M2N2O2ON1O2N1O1N1O00100O001O001O2N2N2N3M2N3M1O1O1O1O001N2O1O1O0O1O1N2H8F:G9D;M2O1O1M4NkNO_ZO2[e07bZOJZe0@m@c0P?Bk@>U?Eg@U@@l?`0U@]Ol?d0S@^Ol?b0Q@Bn?=P@Go?9n_OKQ`05h_O3W`0Mb_O;]`0E`_O?_`0@a_Ob0^`0^Ob_Ob0_`0]Oa_Od0_`0[Ob_Oe0^`0ZOb_Og0_`0VOb_Oj0``0TO`_Om0a`0QO`_On0b`0PO^_OQ1b`0mN`_OS1a`0kN`_OU1``0jNb_OV1]`0hNf_OX1Z`0eNh_O]1W`0aNj_Oa1W`0ZNj_Oh1Wc01N3L4M3M2N2N2N20N4L3N2M3N1N2N2OO010O1O2O1N4L2N1N001O00O100001O1P\\OgMYb0Y2d]OkM[b0V2b]OmM^b0R2`]OQN_b0Q2\\]OSNcb0o1X]OUNgb0m1U]OUNkb0m1Q]OVNob0DW\\Ok1e0bNec0`1U\\OaNmc0a1o[O_NTd0a1h[O`NZd0`1c[OaN^d0_1_[ObNed0[25K7iNP[OoN_e0`0lZOVO]e0`0\\1DYg_2"}}, {"image_id": 122, "category_id": 1, "bbox": [617.847900390625, 558.0972290039062, 165.5115966796875, 433.96649169921875], "score": 1.0, "association_id": 2, "segmentation": {"size": [1200, 1129], "counts": "QRff02YU1;H4L4L4K5K4M4L2N3M3M2M4M3N1O2N2N1bnNCQOjNWm0e1SSOm1Xm0n0bROfNom0Z1oQO[N]n0e1cQOTNcn0l1^QOoMgn0Q2YQOjMmn0U2RQOhMRo0d1fPOUM6V1Xo0l0cPOnM6MLU1bo0e1aPOiNho01UPOS1PP1hNSPOU1QP1SNmoNYO4a2aah;"}}, {"image_id": 122, "category_id": 1, "bbox": [452.53167724609375, 619.421875, 40.1077880859375, 112.73516845703125], "score": 0.1456715613603592, "association_id": 0, "segmentation": {"size": [1200, 1129], "counts": "a_c`0U1YT12N9I4VlNiNRS1X1olN`NJ4RS1`1QmNPO_R1Y1_mNiN\\R1X2M2O101N100000O100N3N1O2M4L2L7L4L2N2O1O002OO01N7J2M2N9G5K7WOkkNJZT1NokNLST1JgkNNdoZg0"}}, {"image_id": 122, "category_id": 1, "bbox": [472.4115295410156, 618.5206298828125, 25.869873046875, 106.73333740234375], "score": 0.08654049038887024, "association_id": 0, "segmentation": {"size": [1200, 1129], "counts": "eX]a0Z1ST1;G8B:K300O01OO2O000O11OO12M1O2N5J5Gk0QOcZVg0"}}, {"image_id": 123, "category_id": 1, "bbox": [530.8508911132812, 194.93408203125, 89.739990234375, 349.9918212890625], "score": 0.9999990463256836, "association_id": 1, "segmentation": {"size": [1200, 1600], "counts": "^ogc02WU1:G:J5J7J4K5J8I7I5J7H8I8dQO]M_i0i2SVOeMhi0`2QVOfMki0_2mUOhMoi0\\2bUORNZj0U2WUOXNej0n1TUOVNij0o1RUOTNlj0o1nTOVNoj0n1mTOUNPk0o1mTOSNQk0Q2lTOPNQk0U2kTOmMSk0W2hTOlMSk0\\2fTOhMQk0d2iTO_Moj0k2lTOXMlj0R3nTORMlj0W3kTOoLRk0i6001O1O001O0_NRUO`Hnj0[7ZUObHgj0Y7_UOeHaj0Y7cUOeH^j0X7fUOfHZj0[7eUOeH[j0[7eUOeH[j0[7fUOdHZj0]7dUOdH\\j0\\7dUOdH\\j0\\7dUOdH\\j0^7aUOcH_j0`7\\UObHdj0R3mTO5;jLhj0l2\\UOjMVOe0a0gNlj0e2cWOZN]MSOPk0_2PXOZNhLZOXk0Z2VXOBjg0lXO@Tg0>PYOAof0?RYO@nf0`0SYO_Olf0a0VYO^Ojf0b0XYO\\Oif0b0[YO[Off0b0_YO[Oaf0d0bYOZO^f0b0hYO[OYf0b0lYO\\OUf0`0RZO\\Ooe01bTO]Ng5^1he0IU[O3ld0F^[O6ed0Cb[O:ed0YOd[Od0gl0M4K4M3L4KemkS1"}}, {"image_id": 123, "category_id": 1, "bbox": [759.427001953125, 0.0, 304.9796142578125, 1018.5346069335938], "score": 0.9999985694885254, "association_id": 2, "segmentation": {"size": [1200, 1600], "counts": "ciZl02\\U16J6I7I6J7G8H9F9F:J5L4K5M2N101O0O2O001O001N101O001N101N2O0O2VGSMo^Om2W`0WN__Oj1W`0gN`_OZ1\\`0PO^_OQ1^`0XO\\_Oh0a`0@Z_O`0a`0I[_O7``04Z_OM_`0>\\_OB\\`0l0^_OTO]`0Y1[_OgNa`0d1X_O\\Ne`0l1V_OTNg`0S2U_OmMi`0X2T_OiMi`0\\2T_OdMj`0a2S_O_Mj`0g2S_OYMj`0o2R_OPMi`0Z3R_OfLi`0f3P_OZLf6[OgKe4_MoKe61YKW4nMhKe6b0mJl3[NbKe6j0iJh3aN^Kc6o0gJg3dNZKb6U1eJe3gNVKb6Z1bJd3kNQK_6c1`Ja3nNlJ_6k1[J_3SOfJ]6U2WJ]3XO^J]6`2oI\\3_OTJ^6j2gI]3FiI`6Q3bI]3KbIa6V3^I^3O[Ia6\\3ZI^33VIa6`3XI^35RIb6c3UI_37nHc6f3RI_3[HmA]7\\>aHeAQ7j>nHVAb6[?]Ie@m5R`0RJn_O[5f`0dJZ_OV5m`0iJS_OR5Sa0lJn^Oo4Xa0PKh^Ol4^a0RKb^Oh4ga0UKZ^Od4oa0XKR^O`4Yb0]Kg]O]4cb0_K]]O\\4kb0`KV]O[4Rc0bKn\\OZ4Xc0dKh\\OY4]c0dKd\\OY4ac0eK_\\OX4ec0gK\\\\OU4ic0gKY\\OU4mc0hKT\\OV4Pd0fKR\\OW4Td0dKo[OY4Vd0bKl[O\\4Yd0_Ki[O`4dj0N3N1O1N3N2N2M3M3M4K4L4K6I7K5K7J7I6J7I7I7H9H=C>A=Cmlic0"}}, {"image_id": 123, "category_id": 2, "bbox": [925.2705688476562, 816.8483276367188, 301.03021240234375, 238.13543701171875], "score": 0.9999985694885254, "association_id": 2, "segmentation": {"size": [1200, 1600], "counts": "QQYT1d1dS1N2L4O1O1O1000000000001OO1001O00001O001O00000000001O0000000000O1000000O2O1N2N2I8cNamN]OlR12cjm>"}}, {"image_id": 123, "category_id": 2, "bbox": [1152.3541259765625, 413.6571350097656, 50.4591064453125, 10.105316162109375], "score": 0.061350397765636444, "association_id": 0, "segmentation": {"size": [1200, 1600], "counts": "_mYZ12]U12O00000000001O00001O0000000010O001O001O001O1N11N100O101N10000000O1000O10000000O2O00000O101NPPb>"}}, {"image_id": 123, "category_id": 1, "bbox": [26.83175277709961, 34.63849639892578, 371.0574645996094, 358.5837097167969], "score": 0.058724116533994675, "association_id": 0, "segmentation": {"size": [1200, 1600], "counts": "ieo0S9[l0:G6J4L3N1N3N00001O001O00001O0000001O0000001O0000001O00001O00001O00001O00001O00001O0000001O00001O001O1O001O1O001O1O1O1O001O1O001O001O001O00001O00000000000000000000001O000000000000000000000000000000000000000000000000000000000000000000000000O10000000000000000O10000O100O100O100O1O100O100O1O10000O100O100O100O10000O100O100O10000O100O100O10000O100O10000O1000000O100000000O100000000O1000000000000000000O100000000000000O10000O10000O100O100O1O100000000O1000000O100000000O100O100O100O10000O10000O100O1O100O1O1N2N2N2N2N2M3O1O1O1O1O1O1O1O1O1O1\\O`SOWHal0f7fSOUH[l0h7h0M3M3O1N2O1O1O1O1O1O100O10000O10000O1000000O1000000O1000000O100O2O0O100O1O1O1O1O2ZJ`QOW4cn0gK`QOU4cn0iKaQOP4en0mK^QOn3gn0nK^QOj3in0QL]QOe3ln0RL^QOc3^P1K6J5K6J5K5M3L4M2N2M3N3L4L4K6J6J6J6J7J6J6JjK[OX4c0mKYOT4e0PLXOQ4h0RLSOP4n0SLlNo3U1ULcNn3FfHIa39k3LkHG\\38k3OoHEY38i32QIEV37j33RIGU31k35UIIV3Hh3o@CP?=QABo>>QACn>=SADk>;WADh>=XADf>>YACf>=ZADe><\\ACc>>]ABc>?\\ABc>>]ACb>>^ABa>>_AC_>>bAA^>`0bA@]>b0cA\\O]>e0cAZO]>f0dAYO\\>g0dAYO\\>h0gATOX>m0kAPOU>P1lAoNT>R1lAlNU>T1f01O00001O001O00001O001O001O0000100O0000100O00001O0000001O001N11O1BTAPOm>7X1K`1LePh2"}}, {"image_id": 124, "category_id": 1, "bbox": [99.51834106445312, 104.97064971923828, 222.45852661132812, 365.2761535644531], "score": 0.9999998807907104, "association_id": 1, "segmentation": {"size": [533, 651], "counts": "V_d1P1b?4L5M2M2O1O1O1O1O1O100000000O1000000000000O10000O100O1O0O2N2_JlN_KV1[4SOaKm0^4WO_Kj0`4XO^Ki0a4YO^Kf0c4[O[Ke0e4^OXKa0j4BRK=P5GjJ8X5LcJ4_5O\\J1f51VJ0j53TJKm57QJHo5hL^O\\3>lLZOW3c0`6M3M4L_V_5"}}, {"image_id": 124, "category_id": 1, "bbox": [326.8683776855469, 85.31805419921875, 151.09524536132812, 271.496826171875], "score": 0.9999997615814209, "association_id": 3, "segmentation": {"size": [533, 651], "counts": "VaZ54W`0`0G6K3M2N200O2N1O1O001N2RLPOVHP1g;0cJkN[KU1b4PO\\KQ1`4TO^Kl0b4VO]Ki0c4XO[Kj0e4VOZKk0f4VOUKm0l4SOQKP1n4QOPKP1R5oNlJS1T5mNjJS1Y5lNdJU1_5jN_JT1g5jNVJW1m5hNQJX1Q6hNnIW1U6hNjIW1Y6hNeIY1\\6fNcIZ1`6eN^I\\1d6cNZI^1g6aNYI^1k6^NVI`1P;O001O000000100O01OO1M4M3O10lLiNkFV1V9kNhFU1Z9lNbFT1a9mN\\FS1e9nNZFR1h9mNWFS1j9mNTFT1n9jNQFV1Q:iNnEV1h<10000O2dMnNRET1n:nNPER1Q;oNlDR1U;nNjDQ1Y;nNfDQ1\\;oNbDR1_;nN_DS1c;lN[DU1f;lNXDU1h;lNVDT1k;mNQDT1Q`0fnA:I3M2N1O1O1O1O1O100O10O01N20O0100O1O100N3O0O1O010N110O1O010O1O1O0O2O100O00000000001O01O01N100010O000100O010O10O10O0010O00100O10O0100O0010O010O0001O001O010M2H9M20100O100O100O1O10001O00000O2O01O001O10O0000000O1O1N2O1O2N3M4IZX^6"}}, {"image_id": 124, "category_id": 2, "bbox": [298.6781311035156, 307.9054260253906, 163.67800903320312, 61.1434326171875], "score": 0.9999984502792358, "association_id": 3, "segmentation": {"size": [533, 651], "counts": "mQn43a`02N101O0000001O000000000000001O0000001O01O01O0O1000000000000000O1000000O1O010O10O001O001O010O1N1O10100O010O00010O10O01O0DH\\@8d?KY@6f?<01O00000100O100000000O1000000000000000001O0O10010O01X@ZO_?g0_@ZOa?m0001O0O2O1N101O001O1N101O0O2O0O2N2O000O2O1N1O2N100O101O0O2O000000001O00001N101O002Nbb_3"}}, {"image_id": 124, "category_id": 1, "bbox": [367.6532287597656, 80.41571044921875, 204.76254272460938, 339.9873046875], "score": 0.5245128273963928, "association_id": 0, "segmentation": {"size": [533, 651], "counts": "hio5e0h?=I5L2N01N2O001O001O000O0O1O1O200O101N2M3N1O2N2N1O2O0OO2M2M4M3O2O001O0O2O0bNYOnBh0m<@`BIEf0l=EYBl0h=WORBl0n=m00001O1O002N3M4K7I6K5K4L3VN^L\\Ff3`9fLTF^3i9eLSFc3e9aLVFl3^9WL]FP4_9RL\\FU4`9mK\\FW4a9mKZFV4e9mKVFV4i9nKQFU4n9Z1O001N2O01O0010ORNlF[LU9^3VG]Lj8`3\\G^Ld8KTFi2\\1ZMa8IaF`2Q1gM`8CeFa2o0jMc8YOgFg2j0oMc9k1cFTN^9f1hF[N_NXOR:Y2cGaNQN]O]:n1fGWOY88]EgN\\2P1Y84_EkNZ2P1Y8oN\\E9=ER2P1m9nNYFl0i9RO[Fk0f9RO\\Fm0hi0L4M3N3M3M3M2N2N3M4L5[B\\NPPKWAo4i>oJYAR5g>kJ\\AT5h`001O0001Q_OPKl>P5n@VKR?k4l@WKR?j4m@XKR?i4l@XKT?h4j@[KU?f4i@[KW?f4f@\\KY?f4e@\\KZ?f4b@\\K^?e4`@\\K`?e4]@^Kb?b4]@_Kc?b4\\@^Kc?d4[@]Ke?c4Z@_Ke?b4Z@]Kg?c4X@^Kg?d4X@\\Kh?e4V@\\Kj?d4U@]Kj?e4T@\\Kl?f4P@\\KP`0Z6O1O100O100O1O01000O10O10OhNo_OcJQ`0[5X@]Ji?b5[@[Je?d5`@XJ_?h5e@TJ\\?k5i@QJW?o5n@lIR?S6QAjIP?V6RAhIn>W6^100O100O1O1O100O010O10000O10000000000000000000o_O^Jd=b5XBcJg=]5UBhJj=X5TBjJl=V5TBkJk=U5TBlJl=T5SBnJl=S5RBnJo=Q5PBPKP>Q5nAPKR>Q5kAQKU>P5iAQKW>Q5eAQK[>Q5aAQK_>Q5]AQKc>P5[AQKe>Q5WAQKi>P5UARKj>o4TARKl>P5QAQKo>S5l@nJT?U5i@kJW?Y5d@gJ]?n600000O10000O100O010O100N2N3L3N2L4N2N2N2M3N3L3N2N2N2O1N3N1O1N2O2L3N2M4M2N3M2O2N1O1O2N1O1O2O0O1O2O0O100O2O000O10000O100O2O0O1O1O1O1O1O1O100O100O1000000O100000000O1000000O10000O100O1O1O1O1O2O0O1O10000O10001N101O1O1O1O1O1O1O0O2O1O00001O0O2O0O2N1O2N2N2N2N2O1N2N2O001N100O101N1O101N1N2O2N1O1O2O0O101O1O1O1O2N1N2O1O1O1O1O1O1O1O1O1O1N2O1O1O1O1O2N1O1O2N001O1O001O1O1N2O2N1O2N2N1O1N101O1O001N101N2N2O2M3M3N2M3N2M2O2M2O1O1N2N3M3M3M9CoSV5"}}, {"image_id": 125, "category_id": 1, "bbox": [324.8216552734375, 23.06771469116211, 412.1341552734375, 537.4181518554688], "score": 0.9456055760383606, "association_id": 1, "segmentation": {"size": [768, 1024], "counts": "WhV81lg08H7I7I7H6J5M3M3N1N3N2OO01O000000000O1O1O001O1O1O1O001O0O10000O010O2O0O2N2O100O100000000O00001O0O110O100O011O01O01O1N101N2N1O2i]OaNk=a1iAUOk=l0TBZOg=g0XB\\Od=f0ZB]Od=c0\\B_Ob=b0]B@a=a0^BAa=>_BD_=Q=BmBb0Q=_OnBc0P=]OoBf0o<[OPCg0ng8BZG?e8@]G?b8A_G`0`8_OaGb0^8\\OdGe0[8ZOgGf0X8XOjGi0U8UOmGk0S8ROPHo0o7lNVHU1i7gN[HZ1d7cN_H^1`7^NdHb1\\7\\NfHe1Y7YNjHg1U7WNmHi1S7VNnHk1R7RNPIn1R7oMoHQ2R7lMoHU2R7hMPIX2R7cMQI]2P7`MRIa2o6XMVIh2k6RMZIn2h6kL]IU3e6dL`I\\3b6_LaIa3`6[LbIf3a6ULaIk3a6QLaIo3`6oKaIQ4a6kKaIU4b6fK`IZ4b6aKaI_4c6ZK`If4h6dJfI\\5_f1o@_Nn>a1QAcNl>]1TAeNk>[1SAhNk>X1TAlNh>T1XAQOd>n0ZAYOa>g0_A@Z>`0gAES>7PBLm=4TBNj=1VB1h=OXB3f=MZB6c=J\\B;`=D`Ba0\\=^OdBe0Y=[OgBh0W=XOhBk0U=VOkBl0S=TOmBn0R=ROmBo0R=QOnBP1Q=POoBQ1oO1B>N101N2O2O0O2N2O0O2N2N2O1N1C<0001O0000010O010O100O1O1O1O1N2I7L4M4M2O11O001O001O00001O00000O100000000000O101C>L4K9G[Wl9"}}, {"image_id": 126, "category_id": 2, "bbox": [396.6848449707031, 770.5930786132812, 136.96786499023438, 49.0048828125], "score": 1.0, "association_id": 3, "segmentation": {"size": [960, 1280], "counts": "fle;1nm02O1O1O001O001O100O1O00011N1O1O010O4L2N001O010O1O001O00001O00001O00001N1000001O000O1000000O10000O1000O10001O00001N101O000O01000O0100O010O100O001O001O1O1O1O00100O001O001000O10O10O100O101N10001N1O101N100O100O2O000O1000001N100000001O001O001O0O2O1O0O2O001O1N2O1N2M\\Yoe0"}}, {"image_id": 126, "category_id": 1, "bbox": [936.7381591796875, 476.8986511230469, 109.05517578125, 320.7835388183594], "score": 1.0, "association_id": 1, "segmentation": {"size": [960, 1280], "counts": "Rn_k0>\\m0b0@;D8G9G6M4L4M2L9H7J4M2L?A8lXOiLSc0a3\\\\OjL`c0]3U\\OkLic0b3eZOdMZe0b5O1O1O2N2N2N001N1000001O00000O01N2O0O01N10NUOQHk[Oj7Zd0dHX[OS7Re0TIeZOh6ae0g05K5E;F9K6L4J6M3N200O1O10010O000102NB;E:Hehk6"}}, {"image_id": 126, "category_id": 1, "bbox": [829.038818359375, 482.0425720214844, 110.73492431640625, 325.4235534667969], "score": 0.9999998807907104, "association_id": 2, "segmentation": {"size": [960, 1280], "counts": "W`]h0k0Pm0;G7H9F:G6K5K6K6J5K3K6J8I6L3L5J7J5L3M4M5J3M3M5J6J5UOjJbXO[5Rg0YK_XOQ5[g0P1I6L3M6I7J4L2N4L5K3M2N4L5K3M3Ma0V[OXGZc0i9N1O001O0000000001O001O001O2N4L7I:F5K3XNX[ORJjd0`5n[OTJTd0g5R\\OVJPd0d5X\\OXJjc0[5e\\OaJ\\c0V5n\\OhJSc0S5S]OkJnb0m4\\]OPKeb0j3d^ORL\\a0f3n^OWLTa0f3P_OXLPa0g3Q_OYLo`0g3R_OWLPa0h3P_OXLPa0h3Q_OVLRa0h3o^OVLUa0h3j^OXLYa0g3f^OWL\\a0i3_42O0000O002M2N3L4L4L3M2N1N3M2M5J6I8D;C>F=SOjmQ:"}}, {"image_id": 126, "category_id": 2, "bbox": [953.3153686523438, 779.9848022460938, 133.24456787109375, 79.48828125], "score": 0.9999998807907104, "association_id": 1, "segmentation": {"size": [960, 1280], "counts": "^jSl04km02O2N2N3M2N1O002N3M1O1O2WSO[OSl0b1H3L1O100O2N100O10O010O00010O2N001O101O2M00100O10O010O01O1O001O001O2N1bN`SO[1cl0O1O5K5K00001O0001O01O001O00001O00001O00001O0000010O00001O001O1O1O001O0000001O001O1O001O001O1O001O001O1O000O2O0O2O0O2NckV6"}}, {"image_id": 126, "category_id": 1, "bbox": [404.75531005859375, 533.5248413085938, 112.56396484375, 255.30072021484375], "score": 0.9999997615814209, "association_id": 3, "segmentation": {"size": [960, 1280], "counts": "_X[<a0Rm0T2mMd0gNW1DY@Bg?`0V@Aj?a0T@^Om?c0Q@^Oo?c0P@]On?g0o_O[Oj;aJTGW6oLZOn;_JnF\\6nLZOT<\\JhF`6oLWOZYOVCe0k1N2O000000O10000000000O100O10000O101O0000001O2N1O1O10O01O1O101N100O1O1O1O3M3M1O00100O2N2OO10O00001O2N1O10O01O001O1O001O001O1O1O1O001O010O10O01O10O01O001O001O00010O010O01O01O00001O010O000001O010O0000001O00000000000010O010O01O0001O0000000001O00001O00001N100O100O2O000O1O1O100O100O100N3N1O100O001O1O1O00100O0O1M2011O01O001J301101O001O1N2N2O002O0O1O2N2N1O2N2N2N4KQYX7"}}, {"image_id": 127, "category_id": 1, "bbox": [8.535550117492676, 214.83816528320312, 170.6560516357422, 136.27490234375], "score": 0.9999618530273438, "association_id": 1, "segmentation": {"size": [520, 644], "counts": "eZ51U`03N2M4K5M2N2O1O1N2O001O00001O001O1O1O001O1O2M4M1O1O001O1O1N2O1O001O1O2N1O001O001O2M3N1O1N2O1N2O1O1N2O1O1N3N1N101N1O1O2N101N1O2N2M2N3N1O101N1O2N2N2N2O0O1O2N101N2O1O000000001O000000000000001O001O1O1O0000000001O000000010O001O00001O0000000O10001O00000O1O1O101N10001N2O0O2O0O1O1O1O1O1O2N100O2M3M3N1O2N2N2M3L4M3N1O2M3M:E8H7J4L9G=_OXm^7"}}, {"image_id": 127, "category_id": 2, "bbox": [208.17294311523438, 28.605806350708008, 63.092254638671875, 120.30870056152344], "score": 0.6794257760047913, "association_id": 3, "segmentation": {"size": [520, 644], "counts": "QZ]33T`04M1N3O0O1O001N100O10000O1O100000000000000000000000000000000O100O10000N2000000O1O100O1N2N2N110O0N2N2O000002L6TOg@>\\im5"}}, {"image_id": 127, "category_id": 2, "bbox": [137.76556396484375, 291.2951965332031, 53.09922790527344, 70.62643432617188], "score": 0.05417988449335098, "association_id": 0, "segmentation": {"size": [520, 644], "counts": "n\\V2k0\\?1O2O000O1O1O100O1O1O1O1O100N2O1O1O1O1N2N2N2O1M3M3N1O1O2N1O02O002N1N3N1O2M2O2M3N1O2N2M3N3N1M4L4M2M3M4K:C^gU7"}}, {"image_id": 128, "category_id": 1, "bbox": [430.284423828125, 271.22930908203125, 148.5384521484375, 110.1824951171875], "score": 1.0, "association_id": 1, "segmentation": {"size": [600, 800], "counts": "fUo74bb04M2N2N1O1^_OHd>9SA0k>1l@9S?Hj@;U?Eh@>X?Ce@`0Z?@d@b0\\?^Ob@d0^?]O`@d0`?\\O_@d0a?^O]@b0d?_OZ@a0g?@V@4C@X`0>Q@2^`0O`_O1a`01[_O1d`0Q110O10O02O1a_OZNi?j1P@\\Nm?Z2M2O00000O1000nNX@TOh?j0\\@YNMe0g?m0l@nNT?m0TAoNm>P1VAnNj>Q1WAoNi>P1\\AjNf>U1^AfNd>Y1^1O1O10000000000001O001O00001O001O1O0000001O0000000000O1000000001N1000001V_OPOi?R1n_O[Ol?l1M1O1O000O010000O100mNm@`NT?^1PA]NS?c1Q1O1000000001O1O3M4K3N1O1N3N3LmNg_OKW`02n_ONo?OV@Nl?O\\@Kd?2d@I\\?7h@FW?:k@DV?9gAMU>7jAJS>9kAIT>:hAHW>;dAG]>;]AIb>:XAHj>:RAGn>b0i@^OU?m15N3O2O10O10O1000O101N2O2M8H4M1O1OfNUAhNj>R1bAhN]>X1fAgNY>X1jAgNU>X1PBcNQ>[1VB`Nj=_1[B\\Nf=c1^BYNc=g1_BWNa=i1bBRN`=m1f10000000001O01O00000000001O01O000O10000001O01O01O0O2O1O0`@UNS>l1hAYNW>h1QAQN7:g>g1o@VN35m>h1k@VN72m>[2QAeMo>R30001O\\Oo@`MR?[2VA`Ml>Y2cA^M^>S2Z1O2O1O1O100O101O0001O000100002M4M2N001O3M7H4M1O002N2N1O0O11N2O1N2N1O1O2N5K3M1O1N2O6I6J2N2N2O2MT1kNgQW7"}}, {"image_id": 128, "category_id": 1, "bbox": [195.79623413085938, 295.60546875, 95.21420288085938, 97.50375366210938], "score": 0.9999998807907104, "association_id": 4, "segmentation": {"size": [600, 800], "counts": "Wmd3b0na0V1PO8G:F6L3N0O1O1O1000O1N1VOV@aNQ`0V1l0N3O100O11O1O1O1N6K7I2N1O4L4L1O1O3M100O2N1O1O10PO[@lNd?S1_@lN`?T1b@jN^?U1e@iN[?W1f@iNY?W1j@bN[?]1P1000000001O000000001O000k_OaNQ?d1e@cNY?_2O2N001O0O101O0000O1N2N2O1O1K5O2J5M3N3N1O2M3M2[Oa_OPOa`0m0f_OmN\\`0Q1g0N3M2N2N3L4L5Kf`Z9"}}, {"image_id": 128, "category_id": 1, "bbox": [140.1146697998047, 305.95318603515625, 64.97372436523438, 120.02374267578125], "score": 0.9999992847442627, "association_id": 0, "segmentation": {"size": [600, 800], "counts": "f]b21ab0>D5H7I7\\Od0L3AXNi_Om1o?`0N20N32M5K4M2N2N3O2M010O1O2O0001Oj@nLf>T3SARMl>^30O1O000000000000000000001O000O1O1O2O0O2N2QOm@WNS?c1VAXNl>f1[ARNi>k1S1M3M4K6K3N3M3O1O1N1O1N5J6Gnll:"}}, {"image_id": 128, "category_id": 2, "bbox": [487.4102478027344, 342.0941162109375, 119.68649291992188, 30.04998779296875], "score": 0.999998927116394, "association_id": 1, "segmentation": {"size": [600, 800], "counts": "UmU91fb01O1M3M3O10O1O10O01N5KoP70nnH7M3N001O0O2O0000000001O001O2L3Nom2KURM4N0O1K40100O01000000000000000000O100000000O10O0100N110O100O10O1000O100O100O010O1000O10O10O10000000000000O100000001NiZa3"}}, {"image_id": 128, "category_id": 2, "bbox": [366.40435791015625, 387.2430725097656, 114.67953491210938, 38.590301513671875], "score": 0.9999842643737793, "association_id": 3, "segmentation": {"size": [600, 800], "counts": "Q^g6=Zb02O0000001OO2O00001O3M6J001OPl<0aaB2Sb02i]O0Vb08010000O1000O10000O010O1000O010000O1O01000O1O100O010O100000000O1000O100000O01000000O1000O10000000O010000O100O010O10O10O10O0100000000O100000001N10002LQaj5"}}, {"image_id": 128, "category_id": 2, "bbox": [73.51619720458984, 375.7032470703125, 78.34803009033203, 29.20733642578125], "score": 0.9981350898742676, "association_id": 2, "segmentation": {"size": [600, 800], "counts": "lR^13db02N2N1J6O1O10000O10000O0100O010O01000O10O10000000000000000000O10000000O10O1000000O10000O10000000O1000000000O10001N10000O1Fd]O8`b0L[hQ<"}}, {"image_id": 128, "category_id": 2, "bbox": [189.23541259765625, 382.0226745605469, 102.87576293945312, 27.144378662109375], "score": 0.9672003388404846, "association_id": 4, "segmentation": {"size": [600, 800], "counts": "mf_34cb0100O2O0O10000O10O1000O010000O1O100O1000O10001O000O10O10O1000000000000000000000001O00001O001O001O000O2O00000O101O0O100000000002N3M1O1O010O0001N10001N010O00100O001000O100O101O0O4M2M101L`a^9"}}, {"image_id": 128, "category_id": 1, "bbox": [148.93202209472656, 304.1228332519531, 301.72637939453125, 124.81973266601562], "score": 0.4676942825317383, "association_id": 0, "segmentation": {"size": [600, 800], "counts": "^XR31fb01N2O1O1O1O1N200001O3Jb\\=NbcB1O2N101JLe]O5Zb0Me]O3ab0O1N3M[\\`00fc_O0\\i80bVG4M4M1g]OIna09o]OJPb07o]OIQb07n]OKRb0=0001S_O]Oc?e0Y@^Of?c0S@Dm?;P@Io?8n_OKR`05l_OMS`03k_OOW`00f_O2Z`00Z_O:g`0j0100O101N1000000O20O0R@bNb>_1[AeNc>[1YAiNh>[1g@RN0g0X?X1g@TNKg0^?V1e@RO[?o0a@SO_?S2010OO10O1WOa@YN_?f1c@XN^?`1a@nM4`0\\?a1UATNl>k1YAnMj>Q2o00O10O2N1O1O1O100O10000O101O0000000000001O0001O0000001O0000001O0000XNW_Oa1i`0_NX_O`1h`0`NW_Ob1h`0_NW_Oa1i`07000001O00001O001O00000000001O00001O001O01N1000001O00001O0002O0000001N2O1O3M0O10O100Od_OkMW`0T2f_OoMZ`0X2O2O3MO010O010O002N1O2N3M;E4L2N1O1O1O1N102M4JWmU7"}}, {"image_id": 128, "category_id": 2, "bbox": [69.96349334716797, 372.1238708496094, 170.2822265625, 32.607513427734375], "score": 0.07737964391708374, "association_id": 0, "segmentation": {"size": [600, 800], "counts": "cZ\\12eb03M1N201O0N2L400O2O0O1000000O10O10O10O100O10O1000O10000000000O1000000000O1000O1000000O101O0O1000O1000O1000000O1000O1000O100000000O2M[\\j0LicUO3O001N100000000000O100O10000O100O2N1O100O10WS40ilK000O101O00000O10000000000001N2O000000o_Y:"}}, {"image_id": 129, "category_id": 1, "bbox": [106.20794677734375, 3.82605242729187, 321.16131591796875, 566.591796875], "score": 0.9999961853027344, "association_id": 1, "segmentation": {"size": [800, 616], "counts": "XSc2j4Pd0V1kN;F8I7J5L3M2N3M2O1N2N101N2O001N101O1O1O2N1O2M3N2N1O2N1O1O00001O0O101O0000001O0O101O001N2O001N2O001N2O1N101N2N2N2SJ]GZKd8c4bGYK`8c4fGYK\\8c4jGYKW8e4mGYKT8d4PHYKQ8e4SHYKn7d4VHZKk7d4XHYKi7f4ZHXKg7e4\\HZKd7f4]HYKd7e4^HZKc7d4_H[Ka7d4aHZK`7f4aHYK`7e4bHZK^7f4cHXK_7g4bHWK_7i4bHVK^7j4dHSK]7l4fHQK\\7n4gHnJZ7R5hHjJZ7V5gHhJ[7W5gHfJZ7Z5gHcJ[7]5fH`J\\7`5eH^J]7a5dH\\J_7c5bH[J_7e5bHXJa7g5aHUJb7j5`HRJd7l5_HoId7P6`HjIc7U6bHdIa7[6bH_Ib7`6aHPHm8o7UGgGS9X8QG^GV9b8d300000000000000000000O100O100O101N1O100O1O1O1O001O0010O000010O01O00100000O01000000O0100000O1O1N2O1N2N2N2N2M3N2O1N101N2N2M3M3L4L4L4N2M3N2N2N2M3M3M3L4M3L4M3N2O1N2O1O1O1O1O1O1N2O1N2O1N2O1O1O1O1O1O100O1O100O1000000O100000000000gGiBi4W=UKlBj4T=TKoBk4Q=TKPCl4P=TKPCl4P=SKRCl4n^N?XKPO\\6:dNb0TKROY67iNd0PKSOY65lNd0oJUOW63oNd0lJXOV60TOc0kJYOT6OXOc0nJTOd?f0g@PO_?h0VUV5"}}, {"image_id": 129, "category_id": 2, "bbox": [158.84254455566406, 484.6670227050781, 351.51641845703125, 224.71530151367188], "score": 0.9999948740005493, "association_id": 1, "segmentation": {"size": [800, 616], "counts": "i_X49fh03N3L3N1O1N2O2M3N4L5K1N3N001O1O001O00100O3M4L2N1O100O001O01O01O100O2O3L2O000O10O0001N101O1O1N2O1O1]OiM[ZOX2ce0kMZZOW2ee0jMZZOW2de0kMZZOV2ee0lMWZOW2ie0jMSZOZ2le0>N101N3N2M3N2M2O1N101N1O2N1N3M3M3L5K4N1O2N101N1O2O0O2N1N3M4K4M3N1N3N1O2N1O2N1N3N2L4M3M3M2N3N1O2N101N101O1O1N2O1O1O0O2O001O001O001O1O1O001O1O00001O0000[Kj]O`2Vb0^MQ^OUNKo3Sb0kM^^OT2ba0jM`^OW2_a0hMc^OW2]a0gMf^OY2Ya0fMh^OZ2Xa0eMj^O[2Ua0eMk^O\\2Ta0cMm^O]2Sa0bMo^O]2Qa0cMo^O^2Pa0aMR_O^2n`0aMS_O_2m`0aMT_O^2l`0aMU_O_2k`0_MX_O`2h`0^M[_Oa2e`0^M\\_Ob2d`0\\M__Oc2a`0\\M`_Od2``0[Mb_Od2^`0[Mc_Oe2]`0ZMd_Of2\\`0ZMe_Oe2[`0[Me_Oe2[`0ZMf_Of2Z`0ZMg_Oe2Y`0ZMh_Og2X`0XMh_Oh2X`0XMi_Og2W`0XMj_Oh2V`0XMk_Og2U`0YMk_Og2U`0XMm_Og2S`0YMn_Of2R`0ZMn_Of2S`0XMn_Oh2R`0XMn_Oh2R`0XMn_Oh2R`0XMn_Oh2R`0XMn_Oh2R`0WMP@h2Q`0WMo_Oi2Q`0WMo_Oi2Q`0VMP@j2P`0VMP@j2Q`0UMo_Ok2Q`0TMP@l2Q`0SMo_Om2Q`0SMo_Om2R`0RMn_On2S`0QMm_Oo2T`0oLm_OQ3T`0nLk_OS3V`0lLj_OT3X`0jLh_OV3X`0iLi_OW3X`0hLh_OX3Y`0fLh_OZ3X`0fLh_OZ3Y`0eLf_O\\3Z`0dLe_O]3[`0cLd_O]3^`0bLa_O_3_`0aL__Oa3a`0_L^_Ob3c`0]L[_Oe3e`0[LZ_Of3g`0YLX_Oh3i`0WLW_Oi3i`0WLV_Oi3m`0ULR_Ol3o`0SLQ_Om3o`0SLQ_Om3Pa0QLP_Oo3Qa0QLo^Oo3Ra0PLm^OP4Ua0oKj^OQ4Wa0oKi^OQ4Xa0mKh^OS4Za0kKe^OW4Qc010ObNjKS^OW4la0kKS^OU4ma0kKS^OT4Pb0jKo]OW4\\c0001O0N2O10000O101O001N101M2N2E;1O1O010O1O01000O2O0O2N101M3N2N1O2N1O2N1O2O0O2N2N2M3N2M2N3N1O2N100O2O1N1O2M4K8G7F8N2N2N2O0O2O1O0O3N1O2M4M2M101N2N101N101O001O1O2N1O1O001O001O001O01000O01000O010O0010O000001O001O001O010O1O1O001O0O2N2N2N3KZWb2"}}, {"image_id": 129, "category_id": 1, "bbox": [41.30678176879883, 250.47300720214844, 403.341796875, 408.86431884765625], "score": 0.42174282670021057, "association_id": 0, "segmentation": {"size": [800, 616], "counts": "Xk\\1P1mg08H6K5L4K4M3M3L5L4K6J6J7IZ1fN`0@7J5K3M3N1N2N2O2M2N3M4M4J5L5K4K4M2N2N2N101N2O0O2O0O2O1N2O0O2N2O1N2N2O1N2N2O1N101N2N2O1O1N2O0O2O1O1N2O1O1O1O0O2O1O001N101O00001N101O001O1O1O1O1O1O1N2O1O1O1O001O0O10001O001O0O101O000O2O001O1O010O1O1O1O001O001O0010O0001O000000000000001O000000000000000000000001O0001O0000000000000O1000000O10000O100O100O11O0000000O10000000000000000000000O0100000O01000O10O0100O100O101O0O100O2N1O1O1N3M2M4K4O1O0O2N2N1O2M3G9G8N3M3M3N2N2O1O1O1O1N2N3M2N2M3N2N3N1O^@bId<]6XCiIhBk@g1n0gNX>_Om@h1l0hNY>YNc@<9b2l0iNX>XNf@:8c2k0kNX>UNh@;6d2k0lNX>SNj@:5d2k0nNX>QNk@;3e2k0oNX>oMm@92h2j0POX>mMn@92i2h0QOY>kMPA80k2h0QOZ>iMRA15S3a0ROY>hMXBT3@SOZ>fMYBU3_OTO\\`0k0f_OSO]`0j0e_OUO\\`0h0g_OVO[`0h0f_OXO[`0e0h_OYOZ`0d0h_O[OZ`0b0i_O]OX`0a0i_O_OX`0?j_O_OW`0a0i_O_O\\=RNZC]2\\O_O[=TNZC[2\\OAZ=TNZCZ2^OAV`0>k_O@X`0=i_OCX`0:k_ODX`09j_OFY`05j_OJZ`0Ko_O2V`0@U@?o?VOY@i0o?jNX@S1lc0O1O1N2O1N3N1N2OjGPO^Hm0a7VOfHb0Y7@lH9S7JP92N2N2N101N2O0001O1O1N2O1N3M3Ld__4"}}, {"image_id": 129, "category_id": 2, "bbox": [149.28382873535156, 234.00973510742188, 348.3753662109375, 549.7911376953125], "score": 0.24342721700668335, "association_id": 0, "segmentation": {"size": [800, 616], "counts": "Q^c41lh05K4N3L3O1O2M2O2N2N3M3M2N2N1O1O1O1O1O1O1O1O1N3N2N2N1O2N1O1O1O2N100O2N2N2N3N1N2N1O2N1O001O001O1O1O001N2O1O1O002M2O2N2M2O1O1N2O1N2O1N101O0O2O1O1N2O1N3N1O2M3N1N2N2M2N3M2M3M4J5L5K4L4K5L5N1O1O2N1O2N1O2M2N3M2M4L4K5J6I7J7L3M3M3M3N2N1N3N2N1O100O101N100O1O1O1O1O10\\Kj^O^1Ua0aNm^O_1Ta0\\NR_Ob1o`0YNW_Oe1j`0WN[_Og1f`0UN__Oj1a`0iMn_OT2S`0`MZ@^2g?`M\\@^2e?`M^@^2c?`M`@^2a?aMa@]2_?bMc@]2^?bMd@\\2]?bMd@^2]?`Md@`2]?^Md@b2^?[Mc@e2_?XMb@h2`?UMa@l2`?PMc@o2b?kL_@U3f?dL\\@\\3i?^LX@b3l?XLV@h3ab00001O00001O00001O001O00001OO10000O100O10000O10000O1000O0100O100O100O1O00100O1O1O1O1O001N2O1N1O2M3N2M2010O2OhFeKkMZ4T2lKhMS4W2SLeMl3[2XLaE_OW7W4Y3]LSEL^7f3_3iMULV2l3lMSLR2m3PNRLo1o3RNPLm1P4VNnKi1R4YNXK[2h4gMWKX2i4kMUKU2j4mMUKR2k4QNSKn1m4UNQKk1n4XNoJh1Q5\\NlJc1T5`NjJ_1V5cNiJ]1W5dNhJ[1Y5fNfJZ1Z5gNeJX1]5gNbJY1`5gN_JX1c5gN]JX1f5fNZJY1h5gNWJW1m5hNQJX1Q6gNoIW1T6iNkIU1X6kNgIT1\\6jNdIU1^6kNaIT1a6lN^IS1d6kN^IS1c6mN]IR1e6mN\\IP1g6oNZIo0g6QOZIl0i6ROYIk0j6TOWIh0l6XOUIe0o6YORIe0P7ZOQIc0S7[OnHc0U7[OkHd0X7ZOiHe0X7ZOiHd0Z7ZOfHf0[7YOfHe0\\7ZOeHe0\\7ZOdHe0]7[OdHd0]7\\OcHc0]7]OcHb0_7]ObHb0^7^OcHa0^7^ObHa0_7_ObH`0_7^OcH`0_7_ObH`0_7^OdH?^7@cH?_7^OdH?^7@cH?^7_OdH?^7@cH>_7AaH?`7_ObH?`7@aH>a7A_H>a7BaH=]7EdH:[7GeH9Y7HiH7U7KlH4R7NoH0P71RINm63TILj66WIIh67[IGd6:]IEb6;aIC`6G4N2N2N2N101M3N2M4L4M2M3N1O2N1O2N1O2N2M4L5K3M3O1N1O2O0O2O0O2O1N3N1N2O1O1N101O001O001O001O001O00000000001O0000000000000000000000000000O1000000000000O10000000000O10000O10000O100O101N100O10000O10000O10000000000O100000000O1000000O010000000001O0O100000000O10000O100O101N10000O1000000O10000O10000O10000O100000000O1000000000O100000O10000000000000000O0100000O10000O011O001O000O2O0000001O00010O010O100O001O010O000010O0010O010O01O00010O0000001O0000000000000000000000000ZNTZOcNle0R1dYOQNc0l0ie0P1kYOnM?Q1fe0o0fZOQOZe0l0jZOSOVe0j0oZOSOQe0m0R[OQOnd0n0Y[OlNgd0R1b[OfN^d0Z1g[O`N[d0_1i[O\\NXd0d1\\201N2O00100O1O1O1M3I7G9O1O1O100O1O1O1N2N2L4L4M3N2O10000O101N10000O10febh0"}}, {"image_id": 130, "category_id": 1, "bbox": [716.5862426757812, 474.7649841308594, 499.67584228515625, 266.3624572753906], "score": 1.0, "association_id": 1, "segmentation": {"size": [853, 1280], "counts": "dffb02;8lh0f1jNg0I7J5L3M4M2M3N2N2N3M4L4K7J6kYOhKae0P5E5K5L2N3M2M3O0O2O0O2N101N2N1O2M3N1O2M3O0O2N1O101N100O100O100O1O1N2O1O1N2N2O1O100O100O10000O10000000O10O1000000O100000000O10O1000O1000O1000O10O1000O1000O1000O10000000O2O00000000000000001O000000000000000O10000000O1000000000000000000O10O1000000000O10O100000000O10O100000O100000000000O1000O10000000000000O0100000O01000O10O01O100O100O01000O1000000000000O0100000000000000000000000O10000000000000000000000000000000000000O10000000000000000000000000000000000001O0O10000000000000001O00000000000000001O000000001O0000001O00001O001O0000001O0000001O000001O01O00000000000000000000000000001O0000000000000001O0000000000000001O0001O00000000000001O000000000000001O00000000010O00000O2O00001O0000001O00000000001O00000000000000000001O00000000001O0001O01O001O1O001O1O1O2N1O1O1O1O1O001O001O00001O001O001O001O1O001O1O001O001O0000001O0000001O000000001O0000001O00001O001O001O001O001O001O00001O0000001O00001O001O001O1O1O1O001O001O00001O00001O001O001O1N3N4L4L3M2N1O2N1O5K4K3N2N1N3N3aLZZOh1ne0^MQZOG"}}, {"image_id": 130, "category_id": 2, "bbox": [732.0606079101562, 707.861328125, 452.02410888671875, 51.9927978515625], "score": 0.9989759922027588, "association_id": 1, "segmentation": {"size": [853, 1280], "counts": "RZSc06^j01O2O0O100O1010O000000001O0000000000000000001O01O00000001O00000000000001O01O0000000000000000000000001O00000000000000000001O0O10000000000000000000001N100000000O10000000000O2O00000000000O1000000O1000001O0O100000000000000O100000001N100000000000000O10000000000O2O00000000000O100000000000000O10000000000O100000000000001O00000O1000000000000000000O1000000000000O1000000000000O10000000000000001O00000O1000000000000000000000001O00000000000001O000000000001O000001O000000000000000010O0000000001O0000000000001O00000000000000000000001O000000000000000010O000001O00000000001O0000000000001O00001O00001O01O000001O000000001O0000001O0000001O0000000000001O000000001O00000000001O000000000000000000000000000000000000001O000000000000001O000000000000000000001O0000000000001O0000000000001O00001O001O00001O00000000001O001O001O0000001O0000001O00000000000O2O0000000000000000001O00000000001O000O10001O0OnQj2"}}, {"image_id": 130, "category_id": 1, "bbox": [99.70369720458984, 500.8666076660156, 441.7601013183594, 184.95956420898438], "score": 0.860161304473877, "association_id": 0, "segmentation": {"size": [853, 1280], "counts": "djc2`3Sg03M3N2N2N101N1000001O00000O10001O0000000000001OO1000000O1000000O2O00000000000O10000000000O1000O10O100000000O10000O10000O10001N100000000O1000000000O1000000000000000000O1000000000000O100000000O10001N10000O10000O10000O10000O10O10O10000O10000O100O1000000O10000000O010000000000000001O000001O00000000000001O01O01O010O01000O10O01O100O1O000001O00000000000O100000001O00000oN`YOmM_f0o1fYOQNZf0S1hYOZN5d0Rf0R1kYOUN6i0oe0Q1oYOPN6n0ke0R1eZOnN[e0Q1fZOoNZe0P1gZOPOYe0o0hZOQOXe0n0jZOROUe0l0mZOTOSe0k0nZOUOQe0k0Q[OTOod0k0R[OUOnd0k0R[OUOnd0j0S[OWOld0i0T[OWOld0h0T[OYOkd0h0T[OZOkd0f0U[OZOkd0f0T[O[Old0d0U[O]Oid0d0V[O]Ojd0b0V[O@id0`0W[O@id0?W[OBhd0>X[ODgd0;Z[OFdd0:\\[OGdd08][OIbd06^[OKad07][OKbd08U[ONkd06mZOORe02jZO2Ue0OhZO4Ve0OZZOSN1Q2de0NVZOb0ie0V2O001N2O001O1O001O00000O101O0000000000001O0000000000000O10000000000O10001O000O1000000000000O100000000000O1000O100000000000O10000O01000O100O10000O100000000O10000000O0100000000O10000000001N100000000O100000000000000000000001O0000000001O0001O00000000001O00000000000010O00000000000000000000001O000000000000000000000000000000000001N1000000000000000000000001O000000000000001O000O101O000000001O0O1000000000000000000000000001O0000000000001O1N1RMiZO>[e0XOnZOc0Xe0UOoZOf0\\e0hMcZO1c0P2UgWc0"}}, {"image_id": 131, "category_id": 2, "bbox": [52.24679946899414, 551.8626708984375, 359.9081726074219, 182.1451416015625], "score": 0.9999994039535522, "association_id": 2, "segmentation": {"size": [800, 600], "counts": "oXY19_h0?F6J5M1N3N1O2O0O2N1O101N1N3O1N1O2O0O2O0O2O0O2N1O2N2N2O0O2N2O0O101N101N101N2O1O1N2O1O0O2O001N101N2O0O2N10001N10000O2O0000000O1000000O100O10000O100O1000000O1000O01000000O10000O010O100O10O0100000O10O10O1000O010O01000O010O1000O010000000O10O10O100O11O1N2O001O1N101O0O2gZO`LPe0`3nZOcLPe0g301N10001O001N101O1O001N1000001O0O100O100O100O101N1000000O10000O1000000O100O10000O100O100O1000O010000O10000O10O010O0010O0100O010O10000O10O01O1N2N2N2O10O0100O0100O01O010O1O001O010O10000O10000O010O1O1O100O10000O2O001O1O1O1O1N2O001O1O0O101N101N2O1O1N2O1O001O1N101O00001O0000001O00000O101O00001N101N1O2O0O2O0O2O0000000O101O0000000O2O00000O2O000O1O100O10000O10000O0100000O1O100O001O1O1O100O1O010O10O01O000O101O001O010O100O10O01O1O1N2O1O1O001O1O101N2N2N2M7H]Yb4"}}, {"image_id": 131, "category_id": 1, "bbox": [113.32093811035156, 58.33974838256836, 236.8241424560547, 399.6275939941406], "score": 0.9998819828033447, "association_id": 0, "segmentation": {"size": [800, 600], "counts": "mS[33kh04c\\O;Z=HeAl1e=WNbAe2X>^M`Ak2]>WM^An2_>TM]AQ3a>QM[AS3c>nLZAV3d>lLWAZ3f>fLVAa3f>aLWAe3e>\\LXAh3f>XLYAk3e>VLYAl3f>TLYAn3e>SL[Am3e>SL[An3c>SL\\Ao3b>RL^Ao3a>RL^Ao3`>RL_AQ4^>PLbAQ4]>oKbAT4\\>mKbAU4]>mK`AV4^>lK^AW4b>jKYAZ4f>hKVA[4i>gKSA\\4l>eKRA]4m>dKRA]4l>eKQA]4n>eKPA^4m>eKo@^4P?dKl@`4Q?i2N2N2O1O1N10000000001O00001N101O1O1N3N2N1O2N2N2M4M4L4L2N2N1O2N2N5K6I6K2N2N1O1O001O001O1O1O1O100O1O2N1O1O001O1O0001O000000000000001O0000001O00001O1O2O1N3M2N3M2N2N3RG`BV6d=^IeBa6_=TIjBj6[=iHnBV7`?N1O1O100O10000O1001O00000O1O10O010O010O002N1O2N3M7I6J3M2N001O0010O01O1O001O1N2O001O001O0O2O000000000000001O00O01O1O1UNh]O\\L7POSb0_4[^OoKWb0i3S^OSLna0k3W^OQLka0m3Y^OPLha0Q4V^OPLja0Q4T^OPLla0S4P^OoKoa0Z4g]OgKYb0_4`]OcK_b0b4Z]O`Kfb0]501OO1N1ZOW]OVKjb0h4]]OPKfb0o4e001O10O04M2N3L4M2fLV\\OZ1mc0QNg\\Ol1bc0fMe\\OY2bc0\\Mc\\Ob2od0^OjYOVNYf0f1d0J7GVPS6"}}, {"image_id": 131, "category_id": 2, "bbox": [86.90064239501953, 419.88580322265625, 178.06231689453125, 49.674560546875], "score": 0.9998579025268555, "association_id": 1, "segmentation": {"size": [800, 600], "counts": "U]T2111ih08K2N1O2O0O2O0O10000O2O0O10001N1000000O100000000O10000000000000000O10O1000000O0100000000O0100000O10O10O1000000O010O1000000O10000O10000000001N100000000O100000000O10000000000O10000O100000000O10001O0O1000000O10000O100000000O1000000O01000001O00001O001O1O1O4K2O1O00001O2N1O1O0O101O0000001O00000000001O0O1000000000001N10000O1O1O2O000O2N1O101N101N10SoY8"}}, {"image_id": 131, "category_id": 1, "bbox": [136.71620178222656, 58.817665100097656, 324.48370361328125, 549.0750732421875], "score": 0.9988163709640503, "association_id": 1, "segmentation": {"size": [800, 600], "counts": "id]3;^h0h0YO`0]O>[Ob0G9E:G:F9I7M4L3M3N2M4M2cLSLcAQ4Z>RLbAR4[>QLaAR4]>QL^AT4_>PL[AT4c>oKYAT4f>oKUAT4i>PLRAS4l>QLo@R4P?PLm@R4Q?PLm@Q4S?QLj@Q4U?PLi@Q4W?QLf@P4Z?QLd@Q4Z?RLc@o3]?SL`@o3_?SL[@Q4e?PLT@W4j?mKk_O[4U`0Y2O1O0010O01O001O10O01O001O1O1O1O2N1O2N1O2N2N2M3N3M4L4L5K4L3M2N2N1O2N2N1O1O2N1O2N1O2M2O2N1O1O1O1O1O001O100O1O001O1O1O100O2N1O100O1O1O100O1O1O100001O10102N2kE`Bd8a=fFWCV9^>M3NM3N2M3M4L5K4K6K7I3M2N2M2O1O1N102N2N101N2O1N2O0O1O0O1O1O1O1O1O1O1O1O001O1O1O1N2N2O1N2N3M2M3N2N2N1O2M2N3N1M3M4L3[Oe0M3M4M2N2N3M2M3M3L4L5K4K5L5K4M3M3N2N2M3N2N2O1N2O1O1N2O1O1O2M2N2N2N2O2N1OSFlGP3S8gLYHW3f7gL^HY3a7fLaHY3_7gLbHX3]7hLeHV3\\7jLeHU3[7jLgHU3Y7kLhHT3X7kLjHT3V7lLkHR3V7nLkHQ3U7nLnHP3Q7QMPIn2P7QMRIn2n6RMSIm2m6SMTIk2m6UMSIk2m6UMTIj2l6UMUIk2l6TMUIk2k6UMUIk2k6UMVIi2k6WMUIi2k6VMVIj2j6VMWIi2i6WMWIi2i6WMWIh2j6XMUIi2k6WMUIi2k6WMUIi2k6XMTIh2l6XMSIh2n6XMRIh2o6WMQIi2o6WMQIi2o6WMPIj2P7VMPIi2Q7WMoHi2R7fIcGi0Z1b5S7bIjGi0R1e5T7^IPHk0l0f5V7[ISHm0f0i5W7^HcGXOd0_2b0k5X7XHQHQO9l2fI_O]6>fI_O]6?eI]O_6a0dIZO`6c0dIXO`6f0cIUOb6h0aIROe6k0]IROg6SMTDR3X5G^76dHGa75aHHe71_HKj7L[HOm7IYH1Q8CYH4j8bNgGd0We\\3"}}, {"image_id": 131, "category_id": 1, "bbox": [197.86322021484375, 263.5705261230469, 266.7005310058594, 338.5920104980469], "score": 0.9796765446662903, "association_id": 2, "segmentation": {"size": [800, 600], "counts": "WPk4R2^f0f0C;iNQMP\\OV3lc0oLm[OV3Rd0kLk[OX3Td0hLj[O[3Ud0fLg[O^3Yd0bLd[Ob3Zd0_Lc[Od3\\d0b0N2N2N2N1O1O2N2N2M3N1O1O1O1OWKY\\OY4hc0eKZ\\OZ4fc0eK\\\\O[4cc0cK`\\O\\4`c0cKa\\O]4`c0`Kc\\O`4\\c0^Kf\\Ob4Zc0\\Ki\\O`0_Ob3Zd0\\Li[Oc3Wd0]Li[Od3cc0PLi\\O=Bc3fc0TLc\\O;Fa3fc0XL_\\O]4ac0`00100O10O1bK[\\Oa3dc0n001O00001O001O001O001N101O00001O00001O1O1O1k]OgJa`0[5W_ORKb`0P5i^OjKPa0Y6J4L3M1O1O2N1O2N3M6J6J3M1O1O1O1O1O2N2N3M2N1O1O1O001O2N2N2N2N2N1O1O001O1O1O2N2N1O1O1O1O00001O001O001O001O001O1O001O001O001O001O000001O01O000001O1O1O1O3M4L4QFZA\\9V?O1O1O001O00001O000010O0000O10001O000000000000000O100000O10O10000O1O2N1O1O100O1O100O1000000O100000000O100O1O1O1O1N2O1O2N100O1000001N1000001O1N2N1O2N2N1N3N1O1O2N10000O2YIn_O^4R`0^KY@Z4h?cK]@[4c?bKa@]4`?aKb@]4_?bKc@]4^?`Ke@^4]?`Ke@^4^?^Ke@_4b?YKc@c4oa0M5L4L3M2O2M3M4K5K6G9G7K5M3M2N2N3L6J6J8C=D;I4L3N2N3M3L6JViY3"}}, {"image_id": 131, "category_id": 2, "bbox": [289.35260009765625, 524.4447021484375, 157.99905395507812, 112.93035888671875], "score": 0.09832057356834412, "association_id": 0, "segmentation": {"size": [800, 600], "counts": "\\[R79Xh0f0G4M2000000O1O10O1O3N1N1O010O00100O10O0100000O10O01O010O010O10O01O010O00100O0010O010O000100O0000000000000010O00001O001O00001O000000000000001O0000000000O1000000000000O100O100O100O1000000O1O2N100O100O1O1O100O10000O101O0O1O2N1O1O1O2O0O010O1O1O1O01_OlXOTOUg0k0?O00210N1N3YOXXOOng01a0O1O0O101N110O010O1O00001O4L\\[P4"}}, {"image_id": 132, "category_id": 1, "bbox": [121.49668884277344, 136.25856018066406, 145.67286682128906, 86.43403625488281], "score": 1.0, "association_id": 1, "segmentation": {"size": [428, 535], "counts": "[Uc1k0]<5N2N2O2M2L3O2O0O1O1N2N2O1O1N2N200O01O100O1000O10000O1O1N3I7N2O0O2O001N4M2N001N2O00001O0000000O1000O100000O1000O10O10O10000O1O100O100O100O100O10O10O1000000O1000000O1000000000000O100000000000000O101N10000000001O0010O0010O00010O21N3M0O1001O1N1O001O2N1O100N2O1O1N2N101N2M3I6O2N101N2N1O101N1OYk_3"}}, {"image_id": 132, "category_id": 2, "bbox": [69.6600341796875, 207.254638671875, 173.09095764160156, 25.871932983398438], "score": 0.9999997615814209, "association_id": 1, "segmentation": {"size": [428, 535], "counts": "h\\P13X=1O2O0O2N1O2O000O101N10000O101O00000O1000001O0000000O10001O00000000001N100000001O000000000001O001O001O000000001O000000O100000000O1000000O1001O00001O0O10001O4L2N1O00001O1O1O1O00000O1000001O00O1000000O1000000O100O100O1O100O100O10O1000O100000000O100000000000000000000001O000000001O00001O0000001O00000000001O0000000000001O0000000O2O2Maji3"}}, {"image_id": 132, "category_id": 1, "bbox": [70.76872253417969, 137.4821319580078, 84.23919677734375, 62.79777526855469], "score": 0.9999992847442627, "association_id": 4, "segmentation": {"size": [428, 535], "counts": "d`o06R=5M4M3L4L4M2O1O0O1O2N1O11oNgCm0c;WOoDi0P;YO^DJ?l0S;]OaDJNNOl0b;\\O`DLMN0j0c;]O^DP1b;>O001O001O00000000001O00O10000B`DPO`;P1aDoN_;Q1aDoN_;^11000000O1000000O10000O100O1N2_O[DoNO101g;n0a0N2N2N2N2M3N2N2O10000O1M3O100N2O1O10000O10001N2N3M_So4"}}, {"image_id": 132, "category_id": 2, "bbox": [37.66673278808594, 191.901123046875, 76.78233337402344, 11.619949340820312], "score": 0.9999990463256836, "association_id": 4, "segmentation": {"size": [428, 535], "counts": "i_`02Z=0O2O001N10001O0O100000000O1000001O0000000000000000000000000O1000000000000001O00001O001O001OO100000000O100001O001O1N101O00000000000000000000O11N101Oeh_5"}}, {"image_id": 132, "category_id": 1, "bbox": [31.96462631225586, 133.3946990966797, 78.19050598144531, 55.12042236328125], "score": 0.9999979734420776, "association_id": 3, "segmentation": {"size": [428, 535], "counts": "Wi>211U=6M0O1O2N3L3M3M4M2O1N101]OUObDm0];TOaDn0^;SO`Dn0`;SO\\DP1d;ROYDo0g;;000O10000000000O100CVDXOj;h0VDWOk;U100000ATDQO37j;g0ZDXOf;W100001O00000001O001O1TDbNh;e0[D2d;JcD4\\;GlD6U;IlD6T;JmDD\\O?g;MoD3Q;LWEMi:2]EId:6]EGe:8X100N2O1O2O000O2O00iee5"}}, {"image_id": 132, "category_id": 2, "bbox": [13.516432762145996, 179.06918334960938, 61.26203918457031, 9.806655883789062], "score": 0.9999606609344482, "association_id": 3, "segmentation": {"size": [428, 535], "counts": "nP63Y=1N1000000O10001O000000001O000000000000000000000000000001O1O2N001O001N10000000^P51`oJ2O0O100000O10V`P6"}}, {"image_id": 132, "category_id": 1, "bbox": [12.401753425598145, 131.45684814453125, 60.0075569152832, 42.92884826660156], "score": 0.9966290593147278, "association_id": 2, "segmentation": {"size": [428, 535], "counts": "Pb52Z=0000000[C7g;JVD:h;FXD=e;CZD?e;A[D>f;BZD>f;BXD`0h;@XD`0h;AkCM9b0l;ERD0O1UOkCF1b0XIAV<0QDe0o;ZOSD?HBUN0001O001O000001O00010O1N2O2M13N0O1N2N2N1O2N2N2MS^o5"}}, {"image_id": 132, "category_id": 1, "bbox": [50.667236328125, 132.996826171875, 161.0455780029297, 67.48881530761719], "score": 0.1618509441614151, "association_id": 0, "segmentation": {"size": [428, 535], "counts": "hjh01ce64aZILO1i<:UCIhT1Vd02N4L8_\\O_Nhb0[2G3N1N3M7I3M2O1Nd0]O3L2O1O001O00000O0100O100000000O010O100O100O1O1000000O100000000O10001O0000O10O100000000O1000000O1000000000001N1000000O10000O100000001O0000000000010O01O0010O01O1O2O0O2N100O1000O1O2O2M6J2L3M4B`0H6L6lNT]O\\O\\c0Cja`="}}, {"image_id": 133, "category_id": 2, "bbox": [1.1036012172698975, 443.5357971191406, 122.6036376953125, 30.5604248046875], "score": 1.0, "association_id": 2, "segmentation": {"size": [683, 782], "counts": "lh1=nd01N3N1O1N2O0000001N10000N2000000O01000000000O11O00001O1O7I1O1O00001O00000O1000O100000000O100O10O0100O1O1O1O1O1O1O1000O010000000000O100000O01000000000O10000000001O00000O1000000000001N10000000001O0O101O000O101O000O10001N10000O2O1O000O2O1NP^h="}}, {"image_id": 133, "category_id": 2, "bbox": [151.05950927734375, 421.6512451171875, 136.95138549804688, 27.919403076171875], "score": 1.0, "association_id": 1, "segmentation": {"size": [683, 782], "counts": "eiW32Xe02O1O00001O1O001O00001O001O00001N101O00001O001O001O001O00001O1O00001O010O0001O2O0O001O1O8H1O010O1O1O1O0000001O0000000000O10000O100O10000O100O100O1N2K5O100O1N20000O1000O0100000000001O0O10001O00000O2O0000000000001O000O101O0000001O000O2O00001O0O10001O00001N100O2Nj\\Z:"}}, {"image_id": 133, "category_id": 2, "bbox": [474.20428466796875, 480.5483703613281, 202.57073974609375, 60.393768310546875], "score": 1.0, "association_id": 4, "segmentation": {"size": [683, 782], "counts": "_dP:2Xe02N4L2M2O2O0O1O2O0O2O001O0O10001O0O10001O001O001O0O101O00001O1O0000001O010O1O001O00001O001O001O01O01O1O1O0010O001O10?@4MO010O01O1O2O0O1O01O00010O000010O00O2O000O2O0O101O0O1O2I6M3O2O0O101N1M3M301N10000O10001N1000000000000000000000000001O0000000000001O000O101O001O0O2O0000001O000O101O0000001N101O00001O0O2O001O001O000O10001O0O10000000O010000O1000000O10000O10001O001O00001O0O101O1O1N101O000O4L6Ho`U2"}}, {"image_id": 133, "category_id": 1, "bbox": [674.939208984375, 372.830810546875, 85.78021240234375, 123.92825317382812], "score": 0.9999997615814209, "association_id": 3, "segmentation": {"size": [683, 782], "counts": "QYS>2T21l`01R_O2k`02Q_O0n`03m^O1Ra0Ol^O4Sa0Lf]OHb0`0ia0E\\]O;=8Xb09b]OIja0ZOU^OW2ja0lMV^OS2ia0RNo]OR2oa0f0K50001O000O010O100000000000000000000000000000000000000000001O00001O1O2N3M3M1O1O0010O1O1N101O001O2N1O1N1O2N2N2M2N3N2K:G5L3SOe]OcNgb0U1i0hNS\\Oo0oc0oNS\\Oo0nc0POT\\Oo0lc0QOT\\Oo0lc0ROR\\Oo0nc062O5[Ok[OIYd0Fk[OO39jd0KoW>"}}, {"image_id": 133, "category_id": 2, "bbox": [669.482177734375, 480.65753173828125, 100.95172119140625, 23.82183837890625], "score": 0.9999997615814209, "association_id": 3, "segmentation": {"size": [683, 782], "counts": "e[Q>2Xe02O0000000O100000001O0O10000O10000O2O000O10001N10001O00001O000001O01O000000000000000010O00100O100O3N000O1O00000000000000000000O100O1000OMGT[O;kd03O10000001O00001O001O0O101O1O001O1O001N1000001O1M[k8"}}, {"image_id": 133, "category_id": 1, "bbox": [308.7117919921875, 349.9316101074219, 54.209808349609375, 94.04522705078125], "score": 0.9999727010726929, "association_id": 5, "segmentation": {"size": [683, 782], "counts": "o^^64Re0:J2N100O2N3M2N4L4M6I2O2M?B=B3M10hNS]O3kb0MZ]OOeb01\\]OOcb00W]O8hb0FZ]O;eb0FY]OK5M3L3N3M6JXh[6"}}, {"image_id": 133, "category_id": 2, "bbox": [299.3256530761719, 407.8459167480469, 16.805206298828125, 7.9630126953125], "score": 0.9385692477226257, "association_id": 0, "segmentation": {"size": [683, 782], "counts": "cjW62Xe02N2O00000000000000O10001O1N2OfRg9"}}, {"image_id": 133, "category_id": 2, "bbox": [130.87466430664062, 399.0621032714844, 34.85655212402344, 10.903594970703125], "score": 0.8989092707633972, "association_id": 7, "segmentation": {"size": [683, 782], "counts": "ahg27Se02O0000001O000000O1000000000000000000000000000000000001N3Mnim<"}}, {"image_id": 133, "category_id": 1, "bbox": [322.5816345214844, 342.82977294921875, 36.416168212890625, 58.0408935546875], "score": 0.1778963804244995, "association_id": 0, "segmentation": {"size": [683, 782], "counts": "big67Qe03O1ONR[OHmd0>io09G5L3M3M2M3L3I8M2N3N1O2N1O1M3J6K5J6RNWNlTOZ2oj0PNcTOX2[k0\\1N200O1O1N2N2N2N2N2O1O1O100N2M3L4M3N2O1O1O1O1O0O2M3K5M3O1O1O1O1O1O001L3K6N1O10001O001O1M3H8L3O2M3O1O1N2N1N3M3N2N2O1N2O1O100O1O100O01000O1000000000000000000000001O00000000000000000000000000000000000000000000000000000000000000000000O1000000000000000000000000000000O10000000000O1000000O10000O10000001O0000000000001O00001O0000001O00001O1O001O1O2N001O1O0001O01O00000000000001O000O2O00001N10000O2O000O100O10000O1000O1000O1000O11O001N2O1O001O1O001O001O2N1O8Hd0UIjWO[4[j0G4L3M3M2M5L7IR1mNb0_O4K2O1N2N2N3L3M:ET_Z?"}}, {"image_id": 134, "category_id": 2, "bbox": [11.567121505737305, 628.947021484375, 218.7196807861328, 101.10968017578125], "score": 0.9999994039535522, "association_id": 4, "segmentation": {"size": [1033, 1198], "counts": "oh<2510N[o0Y1cPOgNdn0b1N1O100O100N2O1O1O10000O2O000O1000000O10000O01000O10000O1000O0100O010O100O010000O01000O0100000O0100O010O01O1O0O2000000O1000000O1O1O1O0N3N2O010O10O010000O10000O010O10O01O010O01000O10000O100O10O0100O010O01O001O1000O0100O10O01O001N10100O010O010O01O100O10O010000O1000000O1000000O100O10000O1000000000000O1000000O2O0O10000O10000O2O00000O2O1O0O2O001O001O0O2O001O1N101O0O2O001O1O1N101O1O1O1N2O2N2N1N3M2O2L`PQo0"}}, {"image_id": 134, "category_id": 2, "bbox": [836.1307983398438, 646.609130859375, 289.56256103515625, 214.78765869140625], "score": 0.9999979734420776, "association_id": 1, "segmentation": {"size": [1033, 1198], "counts": "ZTgj06ho0?K3L5M1N3M2N3L3N2N3M2N2O1N2O001O1O1N2O1O3M4L3M1O100O2O1N5L9F4M1N2O0O100O001O2N1O3M2N2N1O1O10O010O1000O010O100O10O10010O02N3jSOeLXk0W4O010O000001O2N3M9G1O001N010O1O2N1O3M2N3M2N1O100O1N2O1O2N2M4M2M3N2N1N2O1O2M3N2ZNYROf0jm0ROdROe0dm0jNjROP1Yn0O1O000000O001O1N2M3N2_OiNoQOX1Pn0jNnQOW1dm0hNZRO3OW1gm0hNVRO50T1im0ZORROi0nm0i0O010O1000O010000O10000O100O100O100O100000O10O10O1000000O1000O10000000O100000000000000000O10O10000000O10000O100O1O0100000O10000000O100000000O10000O10000O10000O10000000000O2O000000001O0O2O001O00001O000000001O0000001O0001O01O001O1O1O101N1O1O2O0O00101N101N3eN^QOi0fn0nNfQOl0on0L3M1O2N001O1O1N2O1N2N2N1O2N2N2Nmmd2"}}, {"image_id": 134, "category_id": 1, "bbox": [835.4163818359375, 589.1477661132812, 329.36328125, 218.84259033203125], "score": 0.9999656677246094, "association_id": 1, "segmentation": {"size": [1033, 1198], "counts": "]n\\j09oo02N3M2O0O2O1O1N3N1N2O2N1N2O1N2O1O001N2O1O4Lf0ZO3M3M2N1N2O0000001O0000000000001O000000000000000000000000001O001O1O1O1N3N1O1O1O001O1O1O2N1N4M=C4L1O2N0O2O1O1O1O2M3N3M3L4M2N1O1N2O001O1O2M3N4L3M1O2N1O001O0O2O1O2N3M3M2N1O1O1O1O001O002N2M3N3M2N2N2N2N1O00O1O100O1O100O10000O101N1O1O1O2N1O1O2N1O2N1O2O0O2O0O101O000O101O00000O2O001O001O1O1O001O1O00001O001O1O1O1O1O1N101O00001O001N2O1O1N2O1N101N10001N101O001O1O1N2O001O001O00001O1O001O1O100O001O00001O001O00001O001O1O001O1N101O1O001O1O001O0O2O1O001N101O0O101O0O101N101N101N2O2N1O1N101O001O1O002N1O1N3N1O1O1O1O001O010O1O100O2N10YROPNSm0Q2hROUNWm0_2O100USOSMXl0e3KO010O100O1O1O100O001O001\\N[SOBfl0:^SOEcl07aSOH`l06bSOI_l05dSOI]l05eSOK[l04fSOK[l03hSOKXl05hSOKYl03iSOLXl03iSOLWl03jSOMWl02jSOMWl01kSONVl00lSOOUl0OnSOORl00PTOOQl0OQTO0Pl0OQTO0Pl0NRTO1ok0MRTO3nk0MSTO1ok0NQTO2Pl0LRTO3ok0KTTO2nk0LWTO0kk0K]TOOj^R1"}}, {"image_id": 134, "category_id": 2, "bbox": [1017.3074951171875, 492.4048767089844, 174.5643310546875, 21.140533447265625], "score": 0.9998792409896851, "association_id": 3, "segmentation": {"size": [1033, 1198], "counts": "`_YP14TP1101N101O001N2O00000000001O0000000000000000000000000000001O001N100001O01O0000000000000000001O0001O001O00000000000O10000000O100000O100000000000000000000O100001O000000000001O001O002N0O2O1O0O3N1ON2O2M200N3O0O1O100O100000000000000000000000O10000000001O00001O000000001O0000000000000000000000O1000001O00000XPOEbo0;]POFco0:]POFco0:\\POGdo09\\POGeo08ZPOIfo0=00001O0IYPOLho03ZPOKgo03ZPOMgo01ZPOOgo0OZPO1PP1OYb7"}}, {"image_id": 134, "category_id": 1, "bbox": [1060.1417236328125, 284.9732360839844, 79.3544921875, 217.58285522460938], "score": 0.9998294115066528, "association_id": 3, "segmentation": {"size": [1033, 1198], "counts": "^h^Q1`0go02O1O1M4M2O2N1N2N3M4K4K5I9H8G7E;DUOj0D;G9E;ZOe0@`0G9H8L4L4M3K6L3L4J6]Oc0E;D<[Oe0D1TP1?A4O00N11K6L3J7O1N2O0000L4N1N2M401O0L6M3M:AWdof0"}}, {"image_id": 134, "category_id": 1, "bbox": [0.0, 356.9320983886719, 293.88983154296875, 343.8246154785156], "score": 0.8799530267715454, "association_id": 4, "segmentation": {"size": [1033, 1198], "counts": "Sc1[1gn0h0\\O7J5K4L2N3L3L4L4N3M2O1O1O1O1OO100000O1001O00001O1O001O1O1N2O1O1O00100O100O100O1O100O1O100O10O01O100O10O10O100O01O1O1O1O1N2O100O1O100O1O1O1O001O1N2O001O100O001O1N2O1N1O2O1O1O001O000O100O2O0O20O01O100O1O100O1O1O1O1O1O0010O001O010O001O1O001O1O010O010O010O01O001O001O00010O000001O000001O1O001N2N1O2N2O0O2N2N2M3L3M4K5K5G9J6TNaJiXOd5Vg0aJbXOc5^g0aJ\\WOa6ch0c000O2O000O1000001O000O100000000000000000000000001O00000000001O010O2N2N4L4TXOoGXg0e8L3M4M0000O102N6J3L3N1O2ZMZXOdLgg0X3_XOdLdg0V3aXOiL`g0R3eXOmL]g0n2fXOSM\\g0g2gXOYM\\g0a2fXO`M]g0[2eXOeM]g0V2fXOjM\\g0XOPXOi0e00^g0PORXOm0b02_g0lNRXOP1`05ag0eNSXOR1?8bg0_NTXOV1;;eg0VNXXO[15?gg0hM^XOg1La0[i0^OfVOa0[i0]OfVOc0[i0[OgVOd0Yi0\\OgVOd0Zi0ZOhVOe0Yi0ZOgVOf0Yi0ZOgVOg0Xi0XOjVOf0Wi0ZOjVOe0Wi0YOkVOf0Ui0YOmVOf0Si0YOoVOf0Ri0YOoVOf0Qi0YOQWOf0oh0XOSWOh0nh0VOTWOi0lh0WOTWOi0mh0UOUWOj0kh0UOWWOi0jh0WOXWOg0ih0XOXWOf0ih0YOZWOe0gh0ZO\\WOb0eh0]O^WO`0ch0@_WO>bh0A`WOW`0c0F5K4M3L3^AaN`=a1]BbNb=`1YBdNe=_1UBfNi=_1nAhNP>U2N2O2M2O1N2nFTMn3m2nK\\Ml3e2QL^Mm3d2PL^MP4c2mK_MR4c2kK`MT4a2iKaMV4b2eKaMZ4h2ZK\\Me4Q3lJSMR5P3iJSMV5o2eJUM[5l2[J]Md5e2ZJ\\Mf5e2XJ\\Mh5e2VJ\\Mj5d2UJ]Mk5d2RJ^Mn5d2nI]MS6h2cI]M]6[3gGhMZ8_50O100O1O1O1O1O1N2N2N2YOg0K5H7L5M3N3M2L5E;L4I7E;N2M3N101N1000001O01O0001O01O01O0010O1001OO5LU1_EkIl7b6\\GiIc8[700O010O000001O00001O00001O001O000O100O1O1TLZJYLj5`3o3O1O1O1O1O2O0O2N1O1N3N1N2O2O0O1O10001O0000000000000O1001O010O1O2N1O3M3M2N2N2N1O1O1O2N2N5K:F=ZDgKk9b4jEbKT:f4bE]K]:g4]E\\Kb:b5O1N2O1O001N_NTFQLk93RFE6R12UOe92[FVOd0U1@D`9NbH_O]Nc0P9M]J4a5M_J3a5L`J4_5LcJ3]5MdJ2[5OgJNZ51hJNX52jJKV56mJFT5:nJDR5;PKBQ5?QK^OP5b0QK[OQ5e0PKYOQ5g0oJXOR5h0oJUOS5k0a50000000000O100000000000000000000000O100000O100000000000000000001N2N1O2M4Jko]1"}}, {"image_id": 135, "category_id": 1, "bbox": [59.46066665649414, 95.33409881591797, 314.2319030761719, 368.3032531738281], "score": 0.9999992847442627, "association_id": 0, "segmentation": {"size": [544, 800], "counts": "bjY13f`09I7L4M3M2N3M3M2N101O1N101O001O001O00001O0001O0001O01O00000010O00001O010O1O001_LcN]G^1`8nNVGR1h8TOUGl0i8WOUGj0i8ZOTGf0j8_OSGa0l8DQG^OeXS7"}}, {"image_id": 135, "category_id": 2, "bbox": [40.92845153808594, 412.9146423339844, 605.844970703125, 97.77423095703125], "score": 0.9999969005584717, "association_id": 1, "segmentation": {"size": [544, 800], "counts": "\\gf095H?9n>2_@H`0:o>4k@2S?0d@^O3c0X?6e@LZ?n0N100O101O0O1000000O100000001O0O1000000000000O2O000000000000POPA0P?0RANn>2SAMm>2TANm>1TANl>2UAMk>3VAMi>3WAMi>2XANh>2YAMg>3YAMg>3YAMg>3YAMg>3YAMg>3YAMg>3ZALf>3[AMe>3[AMe>3[AMf>2ZANf>2ZANf>2ZANg>0ZA1e>O[A1f>NZA2f>M[A3f>L[A3f>K[A5f>JZA7f>G[A9g>DZABZA>h>[O]Af0^?00001O01O000001O0O1000001O0000001N10001O00001O001O001N1010O01O001O0010O01O011O000O010O00001O00001O01O000000001O0000001O001O1O1O1O0000001O0000000000001N100000000O10001N100O1O2N1O101O0O100O1000000O010O1O100O10OO2N200O1000O100000O010000O101N10000O10000O101N100M3O10001N1000000O1000000O2O000O100O101N100O10001O0O100000001N10000O2O0O100O2O0O2N100O1O2O0O10000O101O0O1000000O100O2O000O100O101N100O10000O100O2O00000O0100000O10000000000O10000000000000O010000000000000O10O10000000O100000000000000000000O10O1000000000000000O1000000000000O1000O10000000000O1000000O10000O1000000O100000001N0100000000000000000000000O10000000000000O10000000000000O10000000O10000000000O10000000000000000O10000000000000000000000O2O0000000000000000000O1000000000000O1TOSAEm>9WAEj>9WAGi>9WAGi>8XAHh>8XAHh>8YAGg>8ZAGg>9YAGg>9YAGg>9YAGg>8ZAHf>8[AGe>9[AGf>8ZAHf>7[AIe>7\\AHd>8\\AHd>8\\AHd>8]AGc>9]AFe>8\\AHd>8\\AHd>8]AGc>9]AGc>9]AGc>9]AGc>9]AGc>9^AFc>9]AGc>9]AFd>9]AGc>9]AGc>9]AGc>9^AFb>:_AEb>9_AFb>9`AF`>:`AFa>8aAG`>7aAI`>5bAJ_>4bAKa>3_AMc>0_AOi?0001O0O10SSa4"}}, {"image_id": 135, "category_id": 2, "bbox": [20.519283294677734, 432.26959228515625, 284.0537109375, 79.38302612304688], "score": 0.9686620831489563, "association_id": 0, "segmentation": {"size": [544, 800], "counts": "bb;Z1e?3N1O1O0O10000000001O0000000000000000O100000000UOc@3]?Mf@0Z?Oh@0X?0h@0Y?Nh@2X?Mj@2V?Mk@3U?Lm@3S?Mm@3S?Ln@4R?KPA4P?LPA4P?KQA5o>KQA5o>KQA5o>JRA7m>ISA7m>IRA8n>HRA8n>HRA8n>HRA8n>GSA9m>GSA9m>GTA8l>HTA9k>GUA9k>GUA9k>FVA:j>CYA=g>CYA>g>AYA?g>@ZA`0f>@ZA`0f>@ZA`0e>A[A?e>A[A?e>A[A?e>A[A?e>A[A?e>A[A?e>A[A?e>A[A?e>A[A?e>A[A`0d>@\\A`0d>AZA`0f>@ZA`0f>@ZA`0f>@ZA`0f>@ZA`0f>@ZAa0e>_O[Aa0e>_O[Aa0e>_O[Aa0e>_OZAb0f>_OYAa0g>_OYAa0g>_OYAa0g>@XA`0h>@XA`0h>@WAb0h>_OWAa0i>_OWAa0i>_OWAa0i>@VA`0j>@VA`0j>@VA`0j>@VA`0j>AUA`0j>@VA`0j>@VA`0j>@VA`0j>AVA>j>BVA>j>BVA?j>AUA?l>@TA`0m>_OTA`0m>_OSAa0n>_OQAa0P?^OQAa0P?^OPAb0P?^OPAb0P?^OPAc0P?]Oo@c0Q?]Oo@c0R?\\On@e0Q?[Oo@f0P?ZOPAh0o>XOPAi0o>WOQAj0n>VORAj0n>VORAj0o>UOQAl0n>TORAm0m>SORAo0n>PORAQ1m>oNRAT1m>kNQAX1o>gNPA[1o>eNPA]1o>cNl@1O]1U?aNl@d1X?10O001O10O00001O01O001O0000001O000000001O00001O001O00001O001O001O001N101O0F[@XOg?c0^@\\Ob?d0^@[Od?c0^@\\Ob?d0^@[Od?d0\\@[Of?d0iT1a0E7J3N2N2O0O100O1O1O1N2N2M2O2O1O1O1O10O01O01O0000001O00001O00100O01000O010O01O010O0TnN_Nko0`1RPOiNho0X1WPOlNfo0S1ZPOQObo0o0^PORObo0m0^POUOao0k0^POVOao0k0_POUO`o0k0`POVO`o0i0_POZO_o0f0`PO\\O^o0e0`PO^O\\o0d0UPOMfo04WPO3eo0NYPO7bo0K^PO8[o0MePO5Wo0MiPO6To0KmPO5Ro0KnPO6Qo0KnPO5Ro0KoPO5on0MPQO4on0MPQO3on0NQQO3ln00SQO0ln02SQOOkn02TQONmn03QQONon02PQONRo02mPONSo02nPOMSo03lPOD^o0omNoN\\OOPS1n0hmNnNeR1g0STda0"}}, {"image_id": 136, "category_id": 2, "bbox": [277.48760986328125, 709.0021362304688, 248.8106689453125, 87.61346435546875], "score": 0.9999972581863403, "association_id": 2, "segmentation": {"size": [1200, 1600], "counts": "^kX:4ZU14N2M10000000001O0000000001O0000001N10001O1J^a30f^L3N10LPch0>o[WOFSlNb0gS1BUlNa0hS1BUlN?kS1BRlNa0lS1a01O1000O01000000O10000O1O1O1O1O01000O100O1O010O00100O10O0100O1O1O010O10O10O0100O100O01000O2O0000000O101O00001O1N2O1O1O001O001O000000001O000000000001O0000003M1O0O101O1O1O1N2O1OO01M2000ON31O001O10O0100O1O001O100O10O1000001O00000000000O101M2O2L3N3L3N3N2M3K5LPSe02olZO8H6K3N2M101O000000001O000O010O10O0100O010000O100O2O0O1O1O1O101N100O2N1O101N1O2O1N2MUR[W1"}}, {"image_id": 136, "category_id": 2, "bbox": [649.629638671875, 691.603759765625, 165.9891357421875, 86.9031982421875], "score": 0.9969887137413025, "association_id": 3, "segmentation": {"size": [1200, 1600], "counts": "bhgh02\\U13O00001O000001O0O1O101Nmj53kTJ9K4K4M3H7M3O1O1O10O0100O10O01O0100O010O010O001O0010O010O0100O1000O01000000O01000O010O100000O10O100000000000000O01000000000000000000O1000000O1000001O00000000O01O100O1001O001N2\\OhkNNYT10ikNOWT11ikNOXT10hkN0XT11fkNO\\T1b02N001N100N3N1N2O2O0O1O101N1000000O2O00000O2O0O2O1O0KUbil0"}}, {"image_id": 137, "category_id": 1, "bbox": [359.1248474121094, 474.97442626953125, 119.43197631835938, 126.94818115234375], "score": 1.0, "association_id": 1, "segmentation": {"size": [799, 547], "counts": "Sik86ch0n;IkC;Q[1gAhNX>[1cAgN\\>\\1bAeN\\>_1aAbN]>b1`A_N_>e1]A\\Nb>g1[AZNe>h1XAYNg>j1UAWNl>l1k@YNV?l4d@UH[?i7n@PHS?o7PAoGo>o7SARHl>l7WATHh>k7ZAVHc>j7_AVH`>j7aAVH^>i7eAUH\\>i7gAVHX>g7mAWHT>h7a1O20O0_@XHm=f7TB[Hl=d7UB]Hi=b7XB_Hh=_7[B`Hd=`7n1O0010N1O2O1O001000001O00001O0O10001O001O1O1O1e@VH_=l7[BYHd=g7ZB[Hf=f7VB]Hj=d7iAiHV>Q5_AgKODb>a4gAhKCJf>[4mAjKYOMj>U4TBmKnN0n>P4\\B_Md=_2eB[MZ=d2kBXMU=g2nBVMT=i2mBUMT=k2nBQMT=n2nB_Ld=a3]BTLm=^Oo_Oa3U2hLU>DP@[3k1oLY>CR@Y3f1RM\\>@R@\\3b1TMa>ZOQ@_3_1VMf?h2[@XMf?e2\\@XMj?b2Y@SMW`0f2l_OUM\\`0S1f]O^OQ2]O^`0k0n]O_Og1Db`0a0S^OAa1Mje0O101O0O3M^Sf3"}}, {"image_id": 137, "category_id": 2, "bbox": [17.828289031982422, 313.8961181640625, 255.85618591308594, 18.72210693359375], "score": 0.9998739957809448, "association_id": 0, "segmentation": {"size": [799, 547], "counts": "a[>8fh0100O1000000000000000000000000000000000000000000000O10O1000000000000000O100000000000O10000000000000000000000000000000000000000000000000000O1000000000000000000000000000000000000O100000000000O10000000000000000000000000000000000O1000000000000000000000000000O100000000000000000O1000O1000000000O10000000000O10000000000000000000000O01000000000000000000000000000000001O00001O0JYWO4ih000000001O000000000000O100N2N20000000000000000000000000000000O100000000000000O10000000000000000O10000000000000000000000O10000000000000001Nd_e6"}}, {"image_id": 138, "category_id": 1, "bbox": [1436.8759765625, 167.0560302734375, 159.1396484375, 246.01693725585938], "score": 1.0, "association_id": 3, "segmentation": {"size": [1067, 1600], "counts": "iW[_1:mP17TQOH]l0=kRO_OQOa0lm0B?A?Cj0VO7F9G:C>[Ol0ZO`hYY1"}}, {"image_id": 138, "category_id": 2, "bbox": [475.92620849609375, 899.131591796875, 669.5831909179688, 157.792236328125], "score": 1.0, "association_id": 6, "segmentation": {"size": [1067, 1600], "counts": "UnX`07RQ14M2O1N2O1O1N101O001N10001O00001O01O01O00001O0000001O000000001O000000000000001O0000000O100000000000000O101O0000000O100000000O1000000O10000O101O000O10000O10000O10000O1000001N10000O100O101N1O1O1O1N2O1O2N100O1O100O10000O2O0O10000O2O0O1O101N1O2N1O101N1O100O2O0O1000001O0O100000001N1000001O0O10001O000O10001O0O1000000O100000001N10000000000O10000000000O10000000000O1000000000000O1000000O1000000O1000000O100000000O1000000000O10O10000000O1000O10O1000000O10O1000O1000000O1000O010000O100O1O100O10O010000O1000000O10O100000O10O01000O010000O010O10000O01000O1000O10O100000000O10O100000O100000J\\MeQOc2[n0700O1FTMUROk2jm0WMVROi2hm0ZMVROg2im0[MVROd2km0\\MUROd2jm0^MTROc2lm0]MTROc2lm0]MTROc2km0^MUROb2km0_MSROb2mm0^MSROa2mm0`MSRO`2mm0?O100O1O1000000O010000000000000O100001N100000001N100_MSROd1Sn0TNQROi1Qn0TNTROi1lm0VNWROh1im0VN\\ROf1fm0XN]ROf1cm0YNbROb1_m0]NcROb1]m0^NdROa1]m0]NeROa1\\m0_NdROa1\\m0^NfROa1Zm0_NgRO`1Ym0`NgRO_1[m0`NfRO_1Zm0`NhRO_1Xm0aNiRO^1Wm0aNkRO]1Wm0bNjRO]1Vm0bNkRO^1bn0N2O0O100O1O2O0O1O1O101N100O101O0O10001OO010O10O01O1O001O1O0O2C=E:O2H8O00100O010O10O0100O10O01000O01000O010O100O010O1000O01000000O1000O10000000O10O1000O10000O1O10O10O100O1000000O1000O10O100000O0100O010O010O00010O1O0100O01000O1O010O100O100O010O1000O01000O100O10000O0100000O100000000O1000000O1000000O10000O10O100000O10000000000O10000000000O100000000O100000000O10000000000O1000000000001O000O100000000000000O1000000000000O10000000000O2O000000000O10000000001O000O101O00001O001O000O10001O000O10000O101N100O100O10001N10000O101O001N101N2O001N2O0O101N101N2N1O2M3N3L4KjjX?"}}, {"image_id": 138, "category_id": 1, "bbox": [1035.920166015625, 238.8645782470703, 207.7674560546875, 410.20257568359375], "score": 1.0, "association_id": 5, "segmentation": {"size": [1067, 1600], "counts": "]VgR1_1go09H5L5L3L4mROlMhj0[2RUOnM`j0]2ZUOjMZj0a2^UOhM]j0]2]UOgM`j0^2ZUOfMcj0^2XUOeMfj0_2UUOdMhj0c2iTOhMSk0Z4M3N3N1O1O1N2N2M3M3O1N2O1`LjIj[OW6Rd0nIl[OR6oc0VJm[Ol5oc0YJn[Oi5Qd0YJk[Oi5Td0ZJj[Og5Ud0ZJi[Og5Xd0ZJf[Of5[d0[Jb[Of5_d0ZJ_[Og5bd0ZJZ[Oh5fd0ZJV[Oh5kd0YJR[Oi5nd0XJoZOi5Re0YJkZOi5Te0ZJgZOh5Ye0[JaZOi5^e0[JUZOn5ke0WJZYO`6ef0T2O1O00000000000000002N1O2N1O001O1O00000000000000001O001O001O001O1O1O2N2N1O1O100000O101O1O1O001O1N3M5K9H5J2N2N3L5L6I6K5J3N2M3N1N3N3L3N3L3N1O1N3N2M3cNbWOiI`h0n5kWOmIYh0n5lWOnIVh0o5oWOmISh0o5YXOgIig0U6i1K4M4N1N3N2N2N3M3M4K4K4N2N1O1O100O2O0O100N2O1N2L4N2O1N3N2N3M3L5K4K5L3N1N3M3L4I7J6K6K5K7H9E`0WOjki;"}}, {"image_id": 138, "category_id": 1, "bbox": [1247.318359375, 22.89158058166504, 142.0716552734375, 188.29356384277344], "score": 1.0, "association_id": 2, "segmentation": {"size": [1067, 1600], "counts": "YSSY1b0bP1=G5M2M4K6J6K4N1M3M3M3M4M2M3K5J6M3M3M4K4H8J6L4L4`SOYLWk0n3XTOcL\\k0k4M2O2N1N2O2N1O1000000000000000000000000000000000000000000000000000000000000001O001O1O1O2N2Nh0XO1O1O1O3M1O1N2O2N1O2M2N2O1N3M2N2N2N1O2O0O2N2N2O1N2N101N101N2SO[RORNgm0i1_ROSNcm0j1aROSN`m0k1dRORN^m0l1eROPN]m0n1R1N1N3N2N3N1N2O001N2O2N2N1N3M5K4L4L3L8Hggk6"}}, {"image_id": 138, "category_id": 2, "bbox": [936.6337280273438, 587.7769165039062, 235.89093017578125, 112.75225830078125], "score": 1.0, "association_id": 5, "segmentation": {"size": [1067, 1600], "counts": "ScQo03VQ13N2O1O001O001N2O001O1O0000001O001O001O1O01O01O00001O010O1O00010O1O100O1O10O01O1O1joN]Obo0Y1N0O1O0010O01O1O2N2N1O1O001gQOVNol0k1PSOUNPm0l1oROUNPm0l1oROTNQm0n1lROSNTm0P2iROPNWm0Q2gROPNYm0Q2dROQN\\m0P2cROQN\\m0o1cRORN]m0o1bROQN^m0Q2_ROPNam0S2[ROnMem0l200000O11O00001O0O10001O00O100O1000000O10000000O10001O000000000000O100000000000000000000001O000000O2O00000000001O000000000000000O2O0000000O101O0O10000O100O10000O1O2O0N2N2N2N2N2O2N1O1O1M4M2O100O100O2O0O1N2N200O100O100O100O1O100O10000O1O1O1O1O100O100O2M2O2M3M2O2O0O2O0O2M2N3N1O2O0O101N2N2M3M5K4LXaQ>"}}, {"image_id": 138, "category_id": 2, "bbox": [22.925029754638672, 669.2191772460938, 230.2233428955078, 125.5089111328125], "score": 0.9999998807907104, "association_id": 1, "segmentation": {"size": [1067, 1600], "counts": "Wno03PQ1:M3M1O2N10000O101O0O1000000O10000O10000O100O10000O100O1000001N101O001N101O01O01O100O00100O00001O100O1O1O00100O0010O010O01O010O1O001O1O1O001O001O001O1O1O001O001O001N2O1O001O00001O001O1O1O0O2O00001N2O1O001N101O001O1N2O1O001N101O1O1N2O1O1O0O2O001O1O1O001O001O000000001O00000001O01O00001O010O0001O0000010O001O001O1N101O0O2O0O2N2M3L6K4D0k07SN:42]i02SWO^O87l0G_N=M6^i00RWO@3P2bNh:Q1jBT1R2nMT;o0\\Bi1U2YM`;o0RBV2W2lLf;o0mA`2W2bLl;o0jAe2U2]LQf9nA[FR>g9kAZFU>g9iAYFX>h9fAYFZ>h9dAYF\\>h9bAXF_>i9^AXFc>i9[AWFf>j9XAVFi>l9SAUFn>m9n@TFS?R:d@PF]?W:U@oEl?_:Y_OmEh`0Z=1O1O1O1O1O1O1O2N1N3N1M4L3M4K5L3M4M3M3N2M4M2O1N2O1N2N2O1N1O2O1N2O1N2O0O2N2O101N1O4L5L5J8H8I6I4L3M`\\OaDVa0^;^^OQE`a0m:\\^O[Eaa0d:[^OdEca0[:Y^OjEfa0V:U^OoEla0Q:n]OTFTb0j9f]O\\F\\b0c9]]ObFib0Z9P]OkFWc0b;6I3M2O2M1O2O0O1O1O1N2O2M4M4K5K6J6I4M3M2N2N2N2M3N2M3M3M4L3L6I7I8H7I7A>nNR1M3L4M2N3L3N3L5K5J6J7J5K5L3L3N2N3M2O0O2O1N3M2O2M3M3M2N3M2M3N2N1O2N2N20O0101N1O2O1N2O1N100O100O100O1O1N2O1O1O2M3N2N2M3N1O2M2O001O1N2O1O2M2O2N2N3L2O2N1O1N2O1O1O1O1O1O1O2N2N2N1O2N1O1O1O1O001O1N101O001O1O1O0O3N1O1O2N1O1O2M110O1O010O001O010O10O01O010O010O1O1O1O2N2N2N1O2N1O1N2O1O001O0100O101N101N100O10O1000000O100O1O001O1O001O1O00001O001O00001O000000001O000000001O0000001O001O1O1O1O1N3N2N1O2N1O2M2O1O1O1N101N3M2O1N3M8H9GVUX`0"}}, {"image_id": 138, "category_id": 2, "bbox": [1350.363037109375, 390.85546875, 245.124267578125, 57.6929931640625], "score": 0.9999996423721313, "association_id": 3, "segmentation": {"size": [1067, 1600], "counts": "n\\V\\12WQ13N2O0O101O0O10000O1O1O10000O10000O100O1O1O10000O100O1O1O100O1000O010000O10O01000000O10000O10O1000O10000O1000000O10O100000O2O000000000O100000001O0000000O100000001O000O10001O00001O00001N1000001O000O2O001O0000001O000000001O0000000000O01000000000000000O10000000000O100000000000O100000000000000000000000000000000000O100000O1000000000O2O000000000000000O101O000O10001O0000000O101O00001N1000000O10000O10000000000000O0100000000O1000000000000O1000001O000O10000000001O000O101O000O2O1NSj4"}}, {"image_id": 138, "category_id": 2, "bbox": [1197.6788330078125, 189.98399353027344, 149.9217529296875, 46.282318115234375], "score": 0.999998927116394, "association_id": 2, "segmentation": {"size": [1067, 1600], "counts": "XfTW15UQ1101N100O100O2O0O100N2J6O1O100O10O0100O10000O10O10O100000000O0100000O1000000O100000000O10000O10000O10000000000O1000000000O010000000000O1000000O100001O001O010O3L9H3M1O001O001O010O0O101O0000000000001O000000000O10000000000000000O100000000000000O10O1000000000000000O0100O1O010O01O1N2N2N11P`Y8"}}, {"image_id": 138, "category_id": 2, "bbox": [319.66986083984375, 556.1968383789062, 341.25921630859375, 102.39056396484375], "score": 0.9999464750289917, "association_id": 4, "segmentation": {"size": [1067, 1600], "counts": "[S`:9kP1JWoN9aP1FaoNa0]P1AaoN`0^P1BaoN>ZP1^OgoNk0oo0WORPOo0jo0gPO@Yo0a0gPO^OYo0b0hPO]OXo0d0g00O2O00001O00001O0010O01O001O0010O00100O100O010O1O00100O1O010O00100O1O010O01O01O001O10O00010O01O1O00XoNBdP1c0OJ]oNDcP1;_oNDbP1:_oNFaP1:`oNEaP19`oNG`P19`oNG`P19aoNF`P18:0001N2O00001O01O010O000000000001O0001O01O000000010O000001O00010O0000010O000001O1O001O001O010O1OhV50XiJ001O1O0000001O00001O01O0000001Ofch<"}}, {"image_id": 139, "category_id": 1, "bbox": [88.9266357421875, 193.65892028808594, 163.35455322265625, 183.0630340576172], "score": 1.0, "association_id": 3, "segmentation": {"size": [1066, 1600], "counts": "mnl2=fP1d0A8I3M3L4L2O2N2N1O1N2N2O1O1O001L4K5O1O1O1N2I7N2O1O1O2M2M3N2N200O1O1O1N2O1O1O1O1O1O1N200O1O1O100O1O1O1O1O10000O100000000O2O0O1O1O1O2O0O2O1O1O001N1O2N1N2O2O0O1O2N1N2N3N1O1O1I7G9N2O2M200O100O101OO10000000000001O0000000000O100O100O1000000O100O1N2N2N2O1O1N2N3L3N2O1O2M4M3I7K4M4M3M5J8H4M2O1N3L4L3M3M3M3O2M2N2N2N2N2N2L5L3L4M3M4L5JdQk[1"}}, {"image_id": 139, "category_id": 2, "bbox": [321.0020751953125, 452.2283630371094, 296.4354248046875, 70.55892944335938], "score": 1.0, "association_id": 2, "segmentation": {"size": [1066, 1600], "counts": "Wmd:1YQ11O000O100O10000O10000O100000000O1000000000000O10000O10000O100000O0100000O01000000O10000O1O10O0100O1000000O10000O1O010O10000O10O10O100O1O010O10000O10O10O100O100O10O10O10000O100O010O100O10O100000O1000000O10000000000O100O100O100O10000O100O100O00100O10000O1O10O01O100O1O10000O01000O100O0100000O01000000000000O0100000O1000O100000O010000000O10O10000000O1000000000O100000O1000O1000O10000000000O1000000000000O100000000O1000000000000O1000000O1000000O10000000000O1000000O1000000000000O1000000O10O1000000000O1000000000000O10000O10000O1000000O10000O10000O100O100O2O0N2N2O1M3N200O100O2O1NZmoo0"}}, {"image_id": 139, "category_id": 2, "bbox": [646.4703369140625, 842.248046875, 422.01416015625, 87.43817138671875], "score": 0.9999998807907104, "association_id": 1, "segmentation": {"size": [1066, 1600], "counts": "`Sde02XQ11O1N10000O2O0O1000000O101O0O1000000O101O0000000O2O000000001N10000000000O101O0O10001N100O10001N100000000O10001N100O101O0O100O101O000O1000000O1000000O2O00000O100000000O2O0000000O10000O1000000000000O10001O0000000000000000000000000001O00000000001O000000001O00001O010O1O001O1O001O010O00001O0O2O1O001O2N3M2M3N3M1O1O0O10000M3O2N1ORZ8NPfG9G2N2L5M3L2M3M4N100O2O0O10001O1N2O1N100O2M3M3N1O2N101O0O2O001O0O101O0O2O001O0O101O00001O00000000000000000000000000O100000000000000000000000000000000000O1000000000000000000000O10000000O1000000000000O1000000000000000000000O10000000O10O10000000000O1000000O10000O1000000O10001O0000000O101O000O10001O0O10000000001N100O10000O101O000O1000001O0O100O1O1O100O100O2O0000000O10000O100O101N100O100000001N100000000O10001N100O10000O100000001N100O101O0O100O2O000O10001O000O2O1O1LZoXa0"}}, {"image_id": 139, "category_id": 1, "bbox": [633.777099609375, 607.730224609375, 312.18707275390625, 322.89300537109375], "score": 0.9999998807907104, "association_id": 1, "segmentation": {"size": [1066, 1600], "counts": "hjdd0S1SP18I5L3N2N10001N10000O100000000O10000O10000O1O010O1O1O1O1O100O100O100O100O1000O01O1O1N2M3N2N1O2N2O1O1O001O001O1O001O001O001O1O001N2N1O2N2O1O1O00100O1O1O1O1N2N2O1O1O1O010O1O1N2O1N2N2O001O100O10O01O0O101N1000001O010O001O1O1N101N2O100O00100O1O1O1N2N2O1O1O1O100O1O1O1O1N2O1O1O1O1O100O100O1O100O1N2O1O1O1O10000O10001O0O1000000O101N1O101M3N1O2N2N2N2N2O1O1O1O1O2N2N2M3N2N1O2N1N2N3N3K6K5J3N3M2N3N1N101N1O2N1O2M2O2NmNiVOUJVi0f5UWOVJih0g5_WOUJ`h0k5cWOSJ]h0k5fWOTJYh0l5hWOTJWh0l5kWOTJRh0l5QXOSJng0m5TXORJjg0n5XXORJeg0o5^XOPJag0P6aXOoI^g0Q6cXOoI\\g0Q6fXOnIYg0R6hXOnIWg0S6jXOlIUg0T6mXOjISg0V6oXOhImf0]6i16Di6hAUIY>j6iAUIW>j6kAUIU>j6lAVIT>i6nAVIR>i6oAXIP>g6RBXIn=f6TBZIk=f6VBZIj=e6XBZIh=f6XBZIh=e6YB[Ig=e6ZBZIf=f6YB[Ig=e6YB\\If=d6ZB\\Ie=e6ZB]Ie=c6[B^Id=c6[B]Ie=c6ZB_Id=b6\\B_Ic=a6]B`Ia=a6_B`I`=a6^BaI`=`6`BaI^=b6_B_I`=d6^B]I`=e6^B\\Ia=g6\\B[Ic=h6YBYIf=b8N101N101O0000000000VN]BWIc=g6_BYIa=f6aBYI_=f6bBZI^=d6eB[IZ=e6gB[IY=c6jB\\IV=a6mB_IS=_6PC`IP=_6QCaIo<^6SC`In<^6TCbIl<]6VCbIj<]6WCcIi<\\6YCcIg<\\6ZCdIf<[6[CdIf<[6\\CdIdL3L4N2M3N2N2M3M4K5Jca\\9"}}, {"image_id": 140, "category_id": 2, "bbox": [378.9508972167969, 487.5520324707031, 297.9927673339844, 208.74270629882812], "score": 1.0, "association_id": 1, "segmentation": {"size": [768, 1024], "counts": "f\\n8:cg04M3N2N1O2N1O1O2N1O2M2O2N1O1O1O1N2L4K5I8M2N2O1N2O1O1O1N2J7QOn0kNU1L4N2O1O1O2N1O1N3M3N1N3N2O1N1O2O0O1O2N1N3N1N2O2N101N1O2N1O2N1O2N1O1O1O2O0O10000O100O100O10000000O100000001O0000000000000000000O100000000O101O000000000O100000000O10000O1000000O100000O10O10000O100O010O1O100O01000O10O100O0100000001O00001N1000001O000O2O0O101N101O0O2O1O001O1O1O100O001O1O10OO2O001O001O000O2O001O001O0O2O1O001O0O2O00000000000O10001O00000O101N1O2N2N2N2O0O2N100O2O0O1O1O101N1O10001N101O0O2O1O0O2N101N100O20O001000O100O010O1O00010O010O010O10O1000O010O1O010O1O100O1O010O1O00100O1O2O0O100O1O010N101O1O2N1O1N3N001O1N2N3M2M5KmeS8"}}, {"image_id": 141, "category_id": 1, "bbox": [1136.710693359375, 439.48187255859375, 375.81591796875, 589.9530639648438], "score": 1.0, "association_id": 2, "segmentation": {"size": [1102, 1600], "counts": "Wg^V1:nQ1A>@?C?DO2M2N2N2N2N2N2O1O1O1O100O100O1O100O1O1O1O1O1O001O1N2O1N2O1O1O100O1O100O100000000000000000001O000000000000000OmL[@_Ce?X]^^__`R`0XAl_Oh>S`0\\Aj_Od>U`0_Ai_Oa>V`0cAf_O^>Y`0fAd_OZ>[`0iAc_OW>\\`0lAb_OT>]`0oAa_OQ>]`0RBa_Oo=_`0SB__Om=``0UB^_Ol=a`0WB]_Oi=b`0ZB[_Og=e`0ZBY_Og=f`0Q2O1O100O1O100O100O11O0001O00000000000000Y@__Ob=Y2QAU;[1eBc=S2VAW;V1gBd=o1[AX;P1kBe=j1^A[;j0mBi=d1bA];d0QCj=]1hAa;;TCn=V1mAe;2WCS>m0SBk;F[CX>a0]BQJ\\BcWg0TOQZO?hN>Zk0CdTO?Zk0BfTO>Zk0BeTO`0Zk0AeTO`0Yk0AgTO?Yk0BeTO`0Zk0@fTOa0Yk0_OfTOc0Xk0_OgTOb0Xk0^OgTOd0Xk0]OgTOc0Xk0^OhTOc0Wk0^OgTOd0Xk0]OgTOe0Wk0[OhTOg0Vk0[OiTOf0Vk0[OhTOg0Wk0YOiTOh0Vk0YOiTOg0Wk0ZOhTOf0Xk0[OhTOd0Xk0]OhTOb0Yk0^OgTOa0Yk0@fTO`0Zk0AfTO>Zk0CfTO[TO^Ohk0b0ZTO[Ogk0f0YTOXOhk0h0ZTOUOgk0k0ZTOROhk0n0ZTOoNgk0Q1[TOlNfk0U1\\TOfNfk0Z1^TOaNck0_1bTOZN`k0f1eTOTN\\k0m1b20000001O0001O00000O101O00000O101O0000001N10001O0O2O0N3N2M4M2M4L4K5I8GnXd0Bcg[O7J6J5K4L3N2N1O2N101N10001N10000O2O00000O2O00001N1000001O0O101O10O01O1O1O1O2N1O1O2fQOPORk0Q1dTOYO[k0h0^TO@`k0a0ZTOEek0jIjSOY5gl0N2O1N2O0O100O2N2O1N1O2N2N2O1N2N1O2N3M3M>B7J4K1O1O1O1O1O1O001O00100O001O1O1O1O2N1O2N2N1O2N2N1O1O001O1O001O001O001O1O010O1O1O1O2N1O2N100O1O001O1O1O010O001O00101N1O2O1N2N2O4K5L4L4L4L1O10O000O2O001NO2N2M3M3M3L4K;CRQk;"}}, {"image_id": 141, "category_id": 2, "bbox": [50.06702423095703, 278.5232238769531, 869.1302490234375, 823.476806640625], "score": 0.7044169306755066, "association_id": 0, "segmentation": {"size": [1102, 1600], "counts": "PVm56TR17I7J5K6J6K4ooNjNdn0[1QQOPOjn0T1mPOVOnn0o0iPOYOTo0j0ePO^OWo0o1M3M3mEdLPE^3n:eLnD^3P;cLoD_3o:cLoD_3o:cLoD_3o:dLnD_3o:eLmD^3P;iLiDZ3T;mLdDX3X;iLgDZ3V;fLjD^3R;bLnDb3n:_LQEe3k:[LUEi3g:XLXEk3e:VLZEm3c:SL]EP4`:QL^ES4_:mKaEU4]:lKbEV4\\:kKcEX4Y:jKfEX4X:hKhEZ4V:gKiE[4U:fKjE\\4T:eKkE]4S:dKkE^4T:cKkE^4T:cKkE_4S:bKlE_4S:bKlE_4S:bKlE_4T:_KmEb4T:XKoEj4X:kJkEU5\\:aJfEa5a:SJcEm5^c02O001N101O0O2O001O0O2O001O0O101O001O0O101O00001O000O2O001O1O0O2O1O1O1N102N1O1N2O001O1N2O1O0O2O001O1N101N10001N101N100O1O2N1O1O100O2N1O100O2N100O1O2O0O100O2O0O100O2O000O2O0O10001O0O1000000O100fAiG]2W8`MYHS2g7kMeHj1\\7TNhHj1X7UNkHi1V7TNnHj1R7UNQIh1P7XNRIf1n6YNUIe1k6ZNXId1h6\\N[I`1f6_N]I_1c6aN_I]1a6bNcI[1]6eNfIW1[6iNgIU1Y6kNiIS1W6lNlIR1T6nNnIo0T6POnIn0R6ROoIm0Q6SOQJk0o5TOSJj0n5WORJh0n5XOTJe0m5\\OSJc0l5_OUJ>l5CTJ]MkAd2V>[MjAe2W>ZMhAf2Z>ZMeAf2[>ZMdAg2\\>YMdAg2]>WMcAj2]>VMbAj2_>VMaAj2_>VM`Ak2`>TMaAl2_>TM`Al2a>SM_An2a>QM_Ao2b>PM_AP3a>oL_AQ3b>nL^AS3b>lL^AT3c>lL\\AT3e>kL\\AU3e>iL[AW3f>hLZAX3h>fLXA[3h>dLYA[3i>cLWA]3k>aLUA`3l>^LTAb3n>\\LRAd3P?ZLQAf3P?XLPAh3R?VLn@j3T?TLl@m3T?RLm@m3U?QLk@o3W?oKi@R4W?mKi@S4X?lKi@S4Y?kKg@V4Y?iKg@W4Z?iKe@W4]?gKd@Y4\\?fKd@Z4]?eKc@[4^?dKc@[4^?dKb@]4_?`Kb@`4`?^K`@c4b?ZK_@e4c?YK]@g4f?VKZ@k4g?RK[@m4h?PKX@P5j?nJV@S5l?jJT@V5n?gJT@Y5m?eJS@[5P`0bJP@_5Q`0_Jo_Oa5S`0]Jn_Oc5R`0\\Jn_Oe5S`0XJn_Oh5S`0WJm_Oj5S`0UJm_Ok5T`0TJm_Ol5S`0SJm_On5S`0QJm_OP6S`0nIn_OR6R`0nIn_OS6R`0lIo_OT6Q`0kIo_OV6P`0jIP@V6Q`0iIo_OX6P`0gIQ@Y6P`0fIQ@Z6n?fIR@Z6o?dIQ@]6P`0aIQ@_6P`0_IP@c6P`0[IQ@e6P`0YIP@h6Q`0UIQ@k6P`0SIP@n6Q`0oHQ@Q7P`0mHP@T7Q`0iHQ@W7P`0fHQ@[7P`0bHQ@_7^e01O1N2O1O1O1O2N1O1O1O1O1O1O1O1O1O1O100N2O1O001N101N2M2O2N1O2N100O01VN`VOeJai0Y5hVO`JYi0\\5PWO^JQi0_5VWO[Jlh0b5[WOXJgh0d5aWOVJah0g5eWOTJ]h0l5fWOnI^h0P6P20001O00001O010O1O100O10O0100O100O100O100O1O10O01O100O1O100O1O1O00100O1O1O1O1O3M2O1N1O2N2O0O2N1O2O1N1O2O0O2N2O0O2O0O2N101N101N101N101N100O2O001O001O00001O0010O01O001O00001O001O0010O01O001O1O001O001O1O100O1O1O101N1O1O2O0O2N101N1O2O0O2O1N2O0O101N100O10000O1000UIjM]]OV2`b0lMa]OT2]b0mMd]OS2Yb0PNf]OP2Xb0RNi]Om1Ub0UNk]Ol1Rb0VNn]Oj1Pb0YNo]Oh1kLkLZb0_1l@f1hLnLXb0^1PAe1fLoLWb0^1SAd1cLQMWb0^1VAb1`LSMVb0]1ZAc1[LSMXb0\\1]Ac1XLSMXb0\\1`Ad1SLSMZb0\\1cAc1oKSM]b0Z1dAg1iKRMab0X1fAk1bKPMfb0W1hAm1[KoLlb0T1iAS2SKlLRc0R1kAX2kJiLYc0o0mA\\2cJhL^c0n0nA_2]JfLcc0l0PBd2TJcLlc0i0QBT4m=mKSBT4l=mKSBT4k=mKVBR4j=nKVBS4h=nKXBS4g=nKYBQ4g=oKYBR4e=oK[BR4d=nK]BQ4c=PL]BP4b=QL]BP4b=PL_Bo3b=QL^Bo3a=QL`Bn3`=SL`Bm3_=SLdBk3\\=ULfBh3Z=XLhBg3W=ZLkBc3V=\\LmBa3S=`LPC]3P=bLSC[3m_i0i4SWOWKmh0h4UWOVKmh0g4VWOXKjh0g4WWOYKih0e4ZWOYKgh0e4[WO[Keh0c4^WO\\Kch0a4_WO^Kbh0`4`WO`K`h0_4bWO`K^h0_4cWO`K^h0_4cWOaK]h0^4eWOaK[h0]4gWObK[h0\\4fWOdKZh0\\4fWOdKZh0[4hWOcKYh0\\4hWOdKXh0[4iWOeKWh0Z4jWOfKVh0Y4lWOeKVh0Z4jWOfKVh0Y4kWOgKUh0X4lWOhKTh0X4lWOgKUh0X4lWOhKTh0W4mWOjKRh0V4nWOjKRh0V4nWOjKRh0U4oWOlKPh0T4PXOlKQh0R4oWOPLPh0P4PXOPLPh0o3QXORLng0n3RXORLng0n3RXOSLmg0l3TXOTLlg0l3TXOULkg0j3UXOWLkg0i3UXOXLjg0h3VXOXLjg0g3WXOZLhg0f3XXO[Lhg0c3YXO^Lfg0b3ZXO^Lfg0b3YXO_Lgg0`3ZXO`Lfg0`3ZXO`Lfg0_3[XObLdg0^3\\XObLdg0^3\\XObLdg0]3\\XOdLdg0\\3\\XOdLdg0\\3\\XOdLdg0[3]XOfLbg0Z3^XOfLcg0X3^XOhLbg0X3]XOiLcg0W3]XOiLcg0V3^XOjLbg0V3^XOjLbg0V3^XOkLag0U3^XOlLbg0S3_XOmLag0S3_XOmLag0S3_XOmLag0S3_XOmLag0S3^XOnLcg0Q3]XOoLcg0P3]XOQMdg0n2\\XOSMcg0m2ZWOVLSOn0di0k2XWOYLROm0fi0j2WWO\\LQOj0ii0i2UWO_LPOi0ki0h2TWObLnNg0oi0f2RWOeLlNg0Rj0d2QWOhLhNg0Xj0`2oVOlLdNg0^j0\\2lVOQM`Ng0dj0X2kVOeNVi0Z1hVOhNYi0W1fVOjNZi0V1dVOlN]i0S1_VOQObi0n0[VOUOei0k0XVOXO]d0fMZ_OQ3WL[O_d0dM[_OP3SL@ad0aM[_On2iKMkd0VM]_Ol2cK3Pe0QM]_Ol2`K6Se0oL]_Oj2_K8Se0oL__Oh2]K:Te0oL^_Og2]K;Ue0nL__Of2[K=Ve0mL__Of2[K=Ue0oL`_Oc2ZK?Ve0nL`_Oc2ZK?Ve0nLa_Ob2YK`0Ve0nLa_Ob2XKa0Ve0oLb_O_2XKb0Ve0oLc_O]2XKd0Ue0oLc_O]2XKd0Ue0PMc_O[2XKe0Ue0PMd_OZ2VKg0Ve0oLe_OY2UKh0Ue0PMh_OV2SKj0Ue0QMh_OT2SKk0Ue0QMi_OS2RKl0Ue0QMj_OR2QKn0Te0PMl_OQ2PKo0Te0PMm_OQ2mJP1Ve0PMm_Oo1mJQ1Ve0PMn_Oo1kJQ1We0PMo_On1iJS1Xe0oLP@P1gJoN0R3Ye0oLQ@o0fJPO0R3Ye0oLR@n0eJQ3Ye0RLR@l0fJQ3Xe0SLR@k0gJR3We0SLS@j0fJS3We0SLT@i0fJS3Ve0TLT@i0fJS3Ve0ULT@f0gJU3Ue0ULU@e0fJV3Ue0ULV@d0eJW3Ue0ULV@c0gJW3Se0VLW@b0fJX3Se0WLW@`0fJY3Se0WLX@>fJ[3Re0WLX@C`J56Q4Re0WLY@@bJ73R4Re0XLY@\\OeJ81T4Qe0XLZ@YOgJ:OT4Pe0YLZ@WOjJ:MV4od0ZLZ@SOmJGX4od0ZLRA]OPJY4md0[LTA[OoIZ4md0\\LTAXOPJ\\4ld0\\LUAWOoI^4kd0[LVAVOPJ_4jd0\\LVATOQJ_4id0]LWAROQJa4hd0^LVAPOSJb4gd0_LVAnNSJc4gd0`LUAlNUJd4fd0`LVAjNUJf4ed0aLUAiNVJf4ed0bLjA^3V>cLiA]3W>cLiA]3W>dLhA\\3X>eLhAZ3X>gLgAY3Y>hLfAX3Z>iLfAV3Z>kLeAU3[>kLeAU3[>lLdAT3\\>mLdAR3\\>oLcAQ3]>PMbAP3^>PMcAo2]>RMbAn2^>SMaAm2_>TMaAk2_>UMaAk2_>VM`Aj2`>WM`Ah2`>YM_Ag2a>ZM^Af2b>[M^Ad2b>]M]Ac2c>_M[Aa2e>`M[A_2e>cMYA]2g>dMYA[2g>fMXAZ2h>fMYAY2g>hMXAX2h>iMXAV2h>jMXAV2h>kMWAU2i>lMWAS2i>mMWAS2i>nMWAQ2i>oMWAQ2h>QNWAo1i>QNWAo1i>RNWAm1i>SNWAm1i>TNVAl1j>TNVAl1j>TNWAk1i>VNVAj1j>VNVAj1j>VNVAj1j>VNVAj1j>WNUAi1k>WNUAi1l>VNTAj1l>WNSAi1m>WNSAi1m>XNRAh1n>XNRAh1n>XNRAh1n>YNQAg1o>YNQAg1o>ZNPAf1P?ZNPAf1P?[No@e1Q?[No@e1Q?\\Nn@d1R?\\Nn@d1R?]Nm@c1S?]Nm@c1S?^Nl@b1T?^Nl@b1T?_Nk@a1U?_Nk@a1U?`Nj@`1V?`Nj@`1V?aNi@_1W?aNi@_1W?bNh@^1X?bNh@^1X?cNg@]1Y?cNg@]1Y?cNg@]1Y?dNf@\\1Z?dNf@\\1Z?eNe@[1[?eNe@[1[?fNd@Z1\\?fNd@Z1\\?gNc@Y1]?gNc@Y1]?gNc@Y1^?gNb@X1^?hNb@X1^?hNb@X1^?hNb@X1^?iNb@V1^?jNb@V1^?jNb@V1^?kNb@T1^?lNb@T1^?lNb@T1^?mNb@R1_?mNa@S1_?nN`@R1`?nNa@Q1_?oNa@Q1_?PO`@P1`?POa@o0_?RO`@n0`?ROa@m0_?TO`@l0a?SO_@m0a?SO`@l0`?UO_@k0a?UO`@j0`?WO_@i0a?WO`@h0`?YO_@g0a?YO_@g0b?YO]@g0c?ZO]@e0c?[OP[OmLj4h3V`0\\OlZOPMm4d3W`0\\OiZOSMQ5`3V`0^OfZOUMS5]3X`0^OcZOWMT5[3Y`01g_OOY`02g_OMY`04f_OLZ`04f_OLZ`05e_OK\\`04d_OL\\`04e_OK[`06d_OJ\\`06d_OJ\\`06d_OJ\\`06d_OJ\\`07c_OH^`08b_OH^`08c_OG^`08b_OH^`09a_OG``08`_OH``08`_OH``09__OGb`08^_OHb`08__OGa`0:^_OFc`09]_OGc`0:\\_OFe`09[_OGe`0:Z_OFf`0:[_OEf`0;Y_OEg`0;Y_OEh`0;W_OEi`064F;b4[2Wa0gL\\ZO?61H>^4[2Ya0dL^ZOa03OKb0Z4Z2Za0cL_ZOb03IOi0T4Y2\\a0aL_ZOc04B4R1l3X2]a0`LaZOc03\\O9Y1g3W2]a0_LaZOe0Q1f0P3V2^a0^LbZOf0P1g0o2U2Rb0SMP[Oh0n2U2Sb0RMnZOk0n2S2Tb0RMnZOk0o2R2Sb0SMkZOo0Q3n1Tb0SMiZOQ1S3k1Ub0TMgZOS1T3h1Vb0TMdZOW1U3e1Wb0SMeZOY1S3d1Xb0SMdZOZ1U3b1Wb0TMcZO\\1U3`1Yb0SMbZO^1T3^1[b0SMaZOa1T3[1[b0TMaZOb1S3Z1]b0SM`ZOd1S3X1]b0SMaZOf1R3V1^b0SM_ZOj1R3Q1`b0UM^ZOk1Q3P1bb0SM^ZOm1Q3o0bb0SM]ZOo1Q3m0bb0SM^ZOQ2P3j0db0SM]ZOT2o2h0eb0RM\\ZOW2P3f0eb0QM\\ZOZ2o2d0fb0PM\\ZO]2n2a0Wd0_Oj[O`0Vd0Aj[O>Vd0Bk[OiMmAW2T>iMkAW2V>jMiAU2X>kMgAU2Z>kMeAU2\\>kMcAU2]>lMbAT2_>kMaAU2`>kM`AT2`>mM_AS2b>lM^AT2c>kM]AU2c>kM]AU2d>jM\\AV2e>hM\\AX2e>gM[AY2f>eM[A[2f>dM[A[2f>cM[A]2f>bMZA^2h>_MYAa2h>]MYAc2h>\\MXAd2j>YMWAg2j>XMVAh2l>[L[[OROj5c4l>YL_[OoNf5h4m>VLb[OnNa5l4o>SLe[OlN]5Q5P?oKh[OlNY5U5P?mKl[OiNV5Y5P?jKnAV4V>eKkA[4X>`KjA`4Z>ZKhAf4\\>TKfAl4]>oJeAQ5^>iJeAW5ie0000001O00000000000000001O0000O10000000000O10000000000O1000000000000O100000000000000O10000000000000000O1000000000000O100000000O100000000O1000000O100000O010000O10000O10000O10000O100O10000O100O1O10O010000O01000000O01000O100O01000O100O100O010O1N2L4hN\\SOaLil0^3^SOXLfl0g3`SOoKel0P4l001O100O1O1O100O100O10O02O0O1000000O2O000O100O101O0O100O10001N100O100O2O0O100O100O2O000O10001N10000O10001NaJiLi[OW3Vd0jLk[OU3Ud0lLj[OT3Ud0nLk[OQ3Td0QMk[Oo2Ud0QMl[On2Sd0TMl[Ol2Td0UMl[Oj2Sd0XMl[Oh2Sd0ZMm[Oe2Rd0]Mm[Oc2Sd0^Mm[Oa2Rd0bMl[O^2Sd0dMm[O[2Rd0gMm[OX2Td0iMl[OV2Sd0mMk[OS2Td0oMl[OP2Sd0SNk[Om1Td0UNl[Oj1Sd0YNk[Og1Td0[Nl[Od1Rd0^Nn[Ob1Qd0`No[O_1Pd0cNo[O]1Pd0eNP\\OZ1nc0hNR\\OW1mc0lNR\\OT1lc0oNT\\OP1jc0ROV\\On0hc0UOX\\Oj0fc0XOZ\\Oh0ec0ZO[\\Oe0cc0^O\\\\Ob0bc0@_\\O?`c0B`\\O=_c0Fa\\O9^c0Hb\\O8\\c0Kc\\O5\\c0Le\\O3[c0Nd\\O2[c0Of\\OO[c01e\\OO[c02d\\ON\\c02e\\OMZc05e\\OK[c05f\\OJZc07e\\OI[c07g\\OGYc0:g\\OEYc0;h\\ODWc0>i\\OAWc0?j\\O@Vc0a0k\\O\\OVc0e0j\\OZOVc0f0k\\OYOUc0h0l\\OVOTc0k0l\\OTOSc0m0o\\OQOQc0P1o\\OoNQc0R1P]OkNQc0U1P]OjN]LXNjd0o2j^OgN\\LZNjd0o2l^OeNZL]Nid0o2m^OcNZL_Ngd0o2P_O`NYLbNgd0o2P_O^NYLdNfd0n2R_O]NXLfNed0m2S_O\\NYLgNdd0n2S_OZNYLiNcd0m2U_OYNWLlNcd0l2V_OVNXLoNad0k2W_OUNYLQO_d0j2Y_OTNXLSO]d0k2[_OPNYLVO[d0j2\\_OoMYLYOZd0h2^_OmMYL\\OXd0h2^_OkM[L_OUd0f2a_OhM\\LCRd0e2b_OhM[LFQd0c2d_OeM\\LIoc0b2e_OeM\\LKmc0`2h_OcM\\LOjc0^2j_ObM\\L1jc0^2j_O_M]L3ic0^2k_O\\M]L8hc0\\2j_O[M^L:hc0[2k_OXM_L=fc0[2l_OUM_Lb0dc0Z2m_OQM`Lf0dc0X2m_OoLaLi0bc0Y2m_OkLbLn0`c0W2o_OgLcLS1^c0W2ZBjMg=U2YBkMg=V2WBlMh=U2VBlMj=T2UBmMl=S2SBmMm=T2QBnMn=R2QBoMP>Q2nAPNR>Q2lAPNT>Q2jAPNW>P2PAbLjI`1Ue0o1PAhNQ?X1n@hNR?Y1m@gNS?Y1m@gNT?Y1k@hNT?Y1j@hNV?X1j@hNW?X1h@hNX?Y1g@gNY?Y1g@gNY?Z1f@gNZ?X1f@hNZ?Y1e@gN[?Y1e@gN\\?Y1c@gN]?Y1c@gN]?Y1c@gN]?Z1b@gN]?Y1c@gN^?Y1a@gN_?Y1a@gN`?X1a@gN_?Z1`@fN`?Z1`@fNa?Z1_@eNa?[1`@dN`?]1_@cNb?\\1_@cNa?^1^@bNb?^1_@aNa?`1^@`Nc?_1^@`Nb?a1]@_Nc?b1]@]Nd?b1\\@^Nd?c1\\@\\Nd?e1[@[Nf?e1Y@[Ng?f1Y@YNg?h1X@XNi?g1W@YNi?h1W@WNi?j1V@VNj?k1U@UNl?j1T@VNl?k1T@TNl?l1T@TNm?l1R@TNn?m1Q@SNo?m1R@RNo?n1P@RNP`0n1P@RNP`0o1o_OQNQ`0o1o_OQNR`0o1n_OPNR`0P2n_OPNR`0Q2m_OoMS`0Q2m_OoMT`0Q2k_OoMU`0Q2l_OnMT`0R2l_OnMU`0R2j_OnMV`0R2j_OnMV`0S2i_OmMW`0S2i_OmMX`0S2g_OmMY`0S2h_OlMX`0U2g_OkMZ`0T2f_OlMZ`0U2e_OkM\\`0T2d_OlM\\`0U2c_OkM]`0V2b_OjM_`0V2a_OiM_`0W2a_OiM``0W2__OiMa`0Y2]_OgMd`0Y2[_OgMe`0Z2Z_OfMg`0Z2Y_OeMg`0\\2X_OdMh`0]2W_OcMj`0]2U_OcMk`0^2T_ObMl`0_2S_OaMn`0_2R_O`Mn`0a2Q_O_Mo`0b2P_O^MQa0b2n^O^MRa0c2m^O]MSa0d2l^O\\MTa0e2l^OZMUa0f2j^OZMVa0g2i^OYMWa0h2h^OXMYa0h2f^OXMZa0i2e^OWM[a0j2e^OUM[a0k2e^OUM[a0l2d^OTM]a0l2b^OTM^a0l2c^OSM]a0n2b^ORM^a0o2b^OPM^a0P3b^OoL`a0Q3`^OnL`a0S3_^OmLaa0S3`^OlL`a0U3`^OjL`a0W3`^OhLaa0X3^^OhLba0X3_^OgLaa0Z3_^OeLaa0\\3_^OcLaa0^3^^ObLba0_3^^O_Lda0a3\\^O^Lda0c3[^O]Lea0d3[^O[Lea0g3Z^OXLfa0i3Z^OVLga0j3X^OVLha0k3X^OTLha0n3W^OQLia0P4V^OoKka0R4U^OmKla0S4T^OlKla0U4S^OkKma0V4S^OiKma0X4S^OgKma0Z4S^OeKna0[4Q^OeKoa0\\4Q^ObKPb0_4P^O`KPb0a4o]O_KQb0b4o]O]KQb0c4o]O]KRb0c4n]O\\KRb0e4n]OZKRb0g4n]OWKSb0j4n]OTKRb0l4o]OSKRb0m4n]ORKRb0o4n]OPKSb0P5n]OmJSb0S5n]OlJRb0U5n]OjJSb0U5o]OhJRb0Y5n]OfJSb0Z5n]OdJRb0\\5o]ObJSb0^5m]OaJTb0_5m]O^JTb0b5m]O]JTb0c5\\500O10000O1000000O10000000O010000000O100000O010O10O10O01O00001O0000001O00001O00001O0O101O001O00001O00001O001N10001O001O001O00001O0O2O001O0010O010O010O10O10O10O0100O1O100O010O100O100O100O1O100O2Of0YO010O1O010O010O0010O01O010O001O001O1O1O001O1O1O100nK_ROU3bm0eLeROY3]m0`LiRO_3Xm0[LoROc3Pn0N2N2N2N3M2N2N4L5K4L4L3M3M1O1O1O001O001O1O001O0010O0001O001O1O001O001O1O1O001O1O1O1O1O2N1O2N2N1O2N1O2N1O1O1O2O0O1O1O1O1O001O2N1O1O2O0O1N2N2N3L3N3L3M4K5K5JkU[<"}}, {"image_id": 142, "category_id": 1, "bbox": [327.703125, 15.423477172851562, 39.8248291015625, 84.3184814453125], "score": 1.0, "association_id": 1, "segmentation": {"size": [300, 400], "counts": "YgP36S94L3N2N2L5M?A5L5^HgNh6^1nHiNP7j100O1OO00OM1320O2O002N1O00000000O2N1O3N6UOiHTOY7g0QIPOS7m0h0N2M3O2K`d9"}}, {"image_id": 142, "category_id": 1, "bbox": [104.16839599609375, 104.1822280883789, 173.524169921875, 164.35104370117188], "score": 1.0, "association_id": 2, "segmentation": {"size": [300, 400], "counts": "^eP11X99I2M3N2N4Le0[O4M2M1O1N3N1O1O1O1O1N2N1O2O1O1O0O1O1O101O001O101N100O101O1O0jJoMQ3R2lLRNR3o1kLTNT3l1kLVNT3k1jLVNU3l1iLVNU3m1gLUNY3n1bLUN\\3n1`LTN`3m1^LUNa3l1]LUNc3m1ZLTNf3o1VLRNj3g3100000000O10000O10000O1000000O11O00001O0000001O00001O0000001O0O10000000O100O100O1O1O0N3M3M2O2M3G9G8L5N2O001O0N3N2N2O0O2N2N2N2N2M3N2N2O1N2O1N2M3N2N2N2M3M3N200O10000O100001O1O001O001O2N2N3M5Ka0_O7I1O1O1O1O0000O1YOQJoMQ6`1eJYN]5l0QJoNa7j0d0M3O1N2N2O2N1O1O2N<_OYdS1"}}, {"image_id": 142, "category_id": 1, "bbox": [287.7491760253906, 11.312516212463379, 38.68157958984375, 83.64576721191406], "score": 0.9999997615814209, "association_id": 0, "segmentation": {"size": [300, 400], "counts": "fce2a0f87K5L3N3L2O1M4J5M2N3O1N1000O000O2OO01O2O2J4N3O01H71O2O1O1000001^OSHBn74Vfe0"}}, {"image_id": 142, "category_id": 2, "bbox": [83.86072540283203, 227.781982421875, 147.81146240234375, 71.0631103515625], "score": 0.9999996423721313, "association_id": 2, "segmentation": {"size": [300, 400], "counts": "Rak04V92O101N1O1O1O1O1O100N2M3O100O100M3O1O100O1O1O1O100O100O1O10000O1M3O100O1O1N2N2O100O1O1O1O1000000000cNVHX1k7fNXHX1o7O1O2N001O001O000000000000O1O10000O0010O010O10ON3N110O1O1O1M3O1O2O1M2NTO]OTIa0m6@XHOf0a0R7@XHNg0a0R7@SI>o6ARIVg0EfXO=Yg0f0O1O10000O02N101N6K1O1N5K1O2O1OO10O001000O001O00001O10O0100O10O000010O010O01O0000000O100O2N2M3N1O1O2N1O0O2N2N3K4N2M2O2N_YP4"}}, {"image_id": 143, "category_id": 1, "bbox": [92.07718658447266, 628.4334106445312, 76.33654022216797, 108.658203125], "score": 0.9999997615814209, "association_id": 4, "segmentation": {"size": [800, 691], "counts": "U^\\26ih05K3M2N2M3N3M4L2N2O2M5K3M2N8I:D4L4L3M2ZOf0N2N2000O1O1O100O10000O105QMPZO3NZ2gf0G3O3N02NO1N002O0O1O0O101N3M1O2N1O1O1N2O1O2N2N2M3N1O3M3M3M5I7I8HYjk<"}}, {"image_id": 143, "category_id": 1, "bbox": [34.89460372924805, 374.4600524902344, 102.9422607421875, 92.2525634765625], "score": 0.9999991655349731, "association_id": 0, "segmentation": {"size": [800, 691], "counts": "Qhk0T1jg04M2K4B>L4N3E:N2N200O100000001O001O00001O0O10000000000001O0000000000000000000000001O001O0000001O0O100001O0001N1001O0001O01O001O010O00001O001O1O00001O00000001O00000000001O000000001O0000001O1O1O0O2dNgYOO[f0_OnZOHTe0J[YO2j11Qg0Nb[`="}}, {"image_id": 143, "category_id": 1, "bbox": [197.45361328125, 605.0577392578125, 93.90420532226562, 106.9561767578125], "score": 0.9999982118606567, "association_id": 1, "segmentation": {"size": [800, 691], "counts": "noo4:bh0;G6K6SOPO^YOX1[f0nN_YOV1^f0mN^YOX1^f0iNZYOa1bf0`0O001O00001O1O001O0010O02N10O9H2M10010O0O100000O101O1N1000O10O01O001O1O1O1N3N2N1O1O2N2N001O2N1O001O2N001O0O2O1N101N1O101N1N2O1N2O2M2M3N3M4J5J;ch03M4L3C=O2M2O2N1O000001O9G1O2N1000O10O01O100O01O1O1O1O1N2O2N2N1O2M2O1O1N101O001O1NoWP1"}}, {"image_id": 143, "category_id": 1, "bbox": [50.33446502685547, 617.2096557617188, 48.43584442138672, 93.33349609375], "score": 0.999966025352478, "association_id": 7, "segmentation": {"size": [800, 691], "counts": "jfW1f0Vh07K6J:F4M2M4lN^NdZOd1[e0aNRZOK0g1me0n002O1O000000000000O2N1O7I7I4L3M3SNUYO`1\\g0J1N101N3N001N2M3M2O2N1N2O2N2N2N2AiWO1fh0Jnga>"}}, {"image_id": 143, "category_id": 2, "bbox": [271.16949462890625, 671.9201049804688, 53.000946044921875, 31.3692626953125], "score": 0.9999517202377319, "association_id": 1, "segmentation": {"size": [800, 691], "counts": "hUe66ih01O2N1O1M3O1N101O1O100O010O1000O010000O001O0010O1O0010000O100O10001N103L2O1N2O001O00001N10001N101Ncco8"}}, {"image_id": 143, "category_id": 1, "bbox": [144.9449462890625, 566.2371215820312, 45.3587646484375, 83.29986572265625], "score": 0.999919056892395, "association_id": 8, "segmentation": {"size": [800, 691], "counts": "n]c37fh09H6J4nN^O`YOf0^f0]O\\YOh0af0[OZYOj0df0j0O2N1O0010O011O2N;E3M1N20OO1O2N100O1O1O2N1O2M2O3L3M4M4K5K4K4L_fZ<"}}, {"image_id": 143, "category_id": 2, "bbox": [365.1879577636719, 648.8123779296875, 53.9066162109375, 31.74395751953125], "score": 0.9998468160629272, "association_id": 3, "segmentation": {"size": [800, 691], "counts": "SRT91lh04J5I7N2I7O1O10O10001O1[OkWO=\\h001O0O100000O10OO2O100O01000O10O1000000O101O0AeWO8bh0O2O0O100O1O2O1NZ]e6"}}, {"image_id": 143, "category_id": 1, "bbox": [569.676513671875, 586.7656860351562, 105.70489501953125, 80.71490478515625], "score": 0.9996392726898193, "association_id": 0, "segmentation": {"size": [800, 691], "counts": "Qmm=d1Xg06N11N2N010O8I2M1O101N1O1O1O2N001O001O001OcNQOjZOn0Ve0UOhZOj0Xe0VOiZOi0We0XOhZOh0Xe0YOhZOf0Xe0[OgZOe0Ye0\\OfZOd0Ye0^OgZOa0Ye0_OgZOa0Ye0@fZO`0Ze0CcZO=]e0EaYOIc0c0le07lYOJTf0a100000000000000001OZe0Z1kd0iNgZOL`0[1hd0jNgZOJd0Z1ed0oNdZOGh0Y1dd0YOZZO_OR1X1dd0^O][Ob0bd0^O^[Ob0bd0_O^[O`0dd0^O][Ob0dd0]O[[Oc0gd0[OZ[Oe0fd0[OZ[Od0gd0[OZ[Od0hd0[OW[Oe0kd0ZOU[Oe0nd0YOR[Of0od0ZOQ[Oe0od0\\OQ[Od0od0[OR[Od0nd0]OQ[Oc0Pe0\\OQ[Oc0od0^OP[Ob0Pe0O`ZO0`e02^ZONae0:oYOgN0Q1Qf0g1001O00001O001O1YNTZO8oe0CVZO:ne0^OXZO?Rf0XORZOd0Qf0XOQZOf0Rf0XOoYOe0Xg0HXOC\\YO;ff0D[YO:gf0E[YO8hg0NoNJZYO5ff03mXOGB5bg06iXOGD2dg07hXOHB1gg07gXOL\\g0MVXO0\\j_1"}}, {"image_id": 143, "category_id": 2, "bbox": [76.72412872314453, 683.9122314453125, 31.89788818359375, 32.228271484375], "score": 0.8467811942100525, "association_id": 7, "segmentation": {"size": [800, 691], "counts": "l`Q25gh05M3N2M3N3K\\OjWOd0Vh0\\OjWO2O>_h00N1O2O000O100001O1O1O1N3N2M3M3NPbW>"}}, {"image_id": 143, "category_id": 2, "bbox": [587.5387573242188, 609.0047607421875, 78.5560302734375, 58.1568603515625], "score": 0.8356890082359314, "association_id": 5, "segmentation": {"size": [800, 691], "counts": "fTX?4kh02N1O1O1000O2O0O1O1O1O1N]Re01fcN"}}, {"image_id": 143, "category_id": 2, "bbox": [488.022705078125, 621.4125366210938, 50.97705078125, 46.9207763671875], "score": 0.7097519040107727, "association_id": 2, "segmentation": {"size": [800, 691], "counts": "d_V<3mh01O1O001O001O0000000O1O1O1O1O1O1O100O1O001O010]OAeXO?Zg0CUXON>?\\g0GcXO8]g0HeXO7[g0GgXO8Yg0HhXO7Zg0FiXO9og000O100O101N1Nfeg3"}}, {"image_id": 143, "category_id": 2, "bbox": [96.11740112304688, 673.0316772460938, 97.11123657226562, 53.139892578125], "score": 0.5673344135284424, "association_id": 0, "segmentation": {"size": [800, 691], "counts": "he[29dh06M1O000002O1N1O004L4Ka\\R11^cmN1O1M3O100N2SOFRYOPg0BPYO=Qg0CoXO=Qg0CoXO=Pg0DPYO;Qg0EoXO;Qg0EoXO;Qg0EoXO:Rg0FnXO:Qg0GoXO9Qg0FPYO:Pg0FoXO:Qg0GoXO8Rg0HnXO8Rg0HnXO8Rg0GnXO:Rg0FnXO9Rg0HnXO8Rg0HnXO8Qg0HPYO8Pg0GQYO9of0GQYO9of0GQYO9Pg0FoXO;lg0Nn[T<"}}, {"image_id": 143, "category_id": 2, "bbox": [199.1387939453125, 643.06005859375, 109.46328735351562, 62.933349609375], "score": 0.21533656120300293, "association_id": 0, "segmentation": {"size": [800, 691], "counts": "j\\d64kh01N2N200O1M3N2O100XOCkXO?Tg0EhXOdg0@^XO?dg0@[XOa0eg0^O\\XOa0dg0@\\XO`0dg0_O]XO`0dg0@\\XO?eg0@\\XO?eg0@\\XO`0dg0@[XO`0fg0_O[XOa0gg0]OYXOb0Sh0O1O100O100O1O2NmaZ9"}}, {"image_id": 143, "category_id": 2, "bbox": [151.1339111328125, 671.8919067382812, 60.661773681640625, 58.42333984375], "score": 0.20936919748783112, "association_id": 0, "segmentation": {"size": [800, 691], "counts": "a^g37hh01N3O0O1O1O1N2O1O0010OXOAQYO?of0APYO?Pg0BPYO>Pg0BPYO>Pg0AQYO>Pg0BPYO=Rg0BnXO>Rg0BnXO>jg0O10000OWOEoXO;Qg0FnXO:Qg0GoXO8Rg0HnXO8Rg0HmXO9Rg0HnXO7Sg0ImXO7Sg0HmXO9Sg0GmXO9Rg0HnXO8Rg0GoXO9Pg0HPYO8Pg0HPYO8of0HRYO8nf0HRYO8mf0HTYO7mf0ISYO7nf0GSYO9lf0GUYO8lf0HTYO7nf0GSYO9jg000O1000O10O10O0100O10O02N1OPZf;"}}, {"image_id": 143, "category_id": 2, "bbox": [119.903564453125, 649.6293334960938, 89.81236267089844, 74.9974365234375], "score": 0.06911987066268921, "association_id": 0, "segmentation": {"size": [800, 691], "counts": "aPi33jh03O1O1N2O1TOFQYO;of0FoXO;Qg0EoXO;Qg0EnXOP1VAnNj>S1<0010O100001O0001N1N2Ne@TOR?Ne@f0:^OW?=k@BX?9j@FZ?3j@Mbjc6"}}, {"image_id": 144, "category_id": 1, "bbox": [457.445556640625, 230.27200317382812, 51.14337158203125, 56.186614990234375], "score": 0.9999995231628418, "association_id": 5, "segmentation": {"size": [535, 800], "counts": "`a_73d`00O1O100O100O1O1O2M2O1N2N101O2N1V@_O]?c0`@A^?a0]@Ca?j000OBe@A[??g@@Y??j@^OW?b0k@[OT?f0>1L4N2O1O1O100000N2O1O1O2M2N3M3LZ`l4"}}, {"image_id": 144, "category_id": 1, "bbox": [484.8775329589844, 192.95396423339844, 70.45211791992188, 69.77583312988281], "score": 0.9999994039535522, "association_id": 6, "segmentation": {"size": [535, 800], "counts": "eTn73d`00O2O000__OM]`0700000M4N2Ncc2O^\\M2O1O001N100O1O100O1O1O101N1YOGo@:j>0SA1j>1UA0MAa>b0_AONAb>a0_ANOAb>a0_AN0_Ob>d0\\ANo>2QAMP?4n@MR?4j@OV?h02O003M1O1O2O0O21N2M10Ai@^OU?a0n@^OQ?b0RA\\On>a0UA_Oj>`0YA^Og>`0[A_Og>?i0DN2O3M2M5L101O2N1O1O3K7Jj]S8"}}, {"image_id": 144, "category_id": 1, "bbox": [555.806396484375, 229.23275756835938, 46.6561279296875, 57.57958984375], "score": 0.9999990463256836, "association_id": 4, "segmentation": {"size": [535, 800], "counts": "fjT91f`01N1O10001O0O2O0N3N1O3k_OHf?9X@Jf?e0L5M1OO2Ce@[Om>1YAc0S?\\Ok@f0T?[Ok@g0S?[Ol@e0T?]Og@g0X?[Oe@g0Z?YOf@Q1P?f0WAWOj>h0XAUOk>i0c0M2M4N1AV@NnXY3"}}, {"image_id": 144, "category_id": 2, "bbox": [459.0621337890625, 283.617431640625, 42.444061279296875, 14.24102783203125], "score": 0.9999970197677612, "association_id": 5, "segmentation": {"size": [535, 800], "counts": "dfb75b`00O100O1O100O00100O1000O0100O1000O100000000000000O10000000000O100O2O0O2NPnk4"}}, {"image_id": 144, "category_id": 2, "bbox": [174.4015655517578, 235.9443817138672, 23.4996337890625, 6.7639007568359375], "score": 0.9999932050704956, "association_id": 3, "segmentation": {"size": [535, 800], "counts": "oUl21e`02O1N100000000O10000000O2O001O0000000O2Onij9"}}, {"image_id": 144, "category_id": 2, "bbox": [562.3320922851562, 284.822998046875, 40.694091796875, 13.838409423828125], "score": 0.9999864101409912, "association_id": 4, "segmentation": {"size": [535, 800], "counts": "enV91e`01O2N1N2O1O1N101000O010000O010000000000O100000000O1000000O1000000O2N100NUfW3"}}, {"image_id": 144, "category_id": 2, "bbox": [504.5165100097656, 255.98114013671875, 44.027618408203125, 7.354095458984375], "score": 0.9999576807022095, "association_id": 6, "segmentation": {"size": [535, 800], "counts": "RSX83d`01O0O0100000O100000000O10000000000000000000000000000000000000000000000000O10001Nb^T4"}}, {"image_id": 144, "category_id": 1, "bbox": [256.24176025390625, 199.4889678955078, 49.86669921875, 43.452178955078125], "score": 0.9996707439422607, "association_id": 0, "segmentation": {"size": [535, 800], "counts": "abX41e`03M101O0O1O1O1O2N100O2N1N2O1N3N0O2O1O100O2N101O0O1000001O0O10000000002NI8N1N2O1O1O1L4G:MklQ8"}}, {"image_id": 144, "category_id": 1, "bbox": [566.8699340820312, 208.42205810546875, 25.49310302734375, 37.811920166015625], "score": 0.9978087544441223, "association_id": 0, "segmentation": {"size": [535, 800], "counts": "WoX9:1IV`0=N2O100O0O2N2N2N200O10000001O001O4L2N1O1O12ONc^\\3"}}, {"image_id": 144, "category_id": 1, "bbox": [562.9188842773438, 208.8020782470703, 32.642578125, 66.56968688964844], "score": 0.07319187372922897, "association_id": 0, "segmentation": {"size": [535, 800], "counts": "X^W93c`0101kNOaA2]>8[AIa>;[AId>6\\ALb>4]AOa>2]A3_>N`A3^>0`ANE]Oi>g0aALa>7]AJb>6_AJa>7]AJc>5^ALa>4^ANa>3]AOb>0_A1a>O]A3c>L\\A6f>HYA9h>j01O1ISAaNo>]17M3iNl@i0b?M3N7GU[Z3"}}, {"image_id": 145, "category_id": 1, "bbox": [1420.466552734375, 121.09798431396484, 166.429931640625, 149.30801391601562], "score": 1.0, "association_id": 2, "segmentation": {"size": [1060, 1600], "counts": "i[V^19iP13L5J6H;E8VOoN[QOT1cn0POXQOS1gn0oNTQOU1jn0e0N1O1N2O1O1O2N3M1O1RRO[M[m0f2YRO_MMNjm0d2VROfMjm0j20O10000O1O1N3N100O101O1O1O1O001O011O0O100O10O02O0O1O10O100000O1000O0100010N10O0101O100N3N001N200O;E0O10O0O2O2N1N101O001O0O2N2O1O00001O00000O101O0000001L4N2N101N1O1O2N2M2O2N2N2N2O0O2O1N2O1O0O2O1N101N2O100O1O10O01O10000O010O10003M1N010O100O101N10O0100O101N1O002N3M3L3N1N2M9G]X>"}}, {"image_id": 145, "category_id": 2, "bbox": [3.3683371543884277, 473.3489990234375, 93.36787414550781, 50.30621337890625], "score": 0.9999998807907104, "association_id": 6, "segmentation": {"size": [1060, 1600], "counts": "cc4:iP12N3N1O1N101O0010O10O0O2O00001000O01O1O100O100O1O1O1O10O0001O01O01O00000000000000001O000000O2O00000000000000O100000000O10O11O0000O100O100O2O0O100O100O2N1HfoND\\P1;7N2O101N2M3Nbdk`1"}}, {"image_id": 145, "category_id": 1, "bbox": [662.9135131835938, 256.7046203613281, 192.39703369140625, 212.22488403320312], "score": 0.9999998807907104, "association_id": 7, "segmentation": {"size": [1060, 1600], "counts": "oe[f03iP1n0SO1bA2[>1bA0^>1`A1_>1]A1c>0[A1d>2XA0h>2SA1m>1n@3Q?Ok@3U?Nh@4X?Mf@4Z?Ke@7[?Ib@:^?E_@?a?@X@h0h?WOm_OU1S`0jNi_O[1W`0eNf_O_1Y`0`Nf_Ob1Z`0_Nd_Ob1\\`0_Nb_Ob1^`0_N__Oc1a`0_N[_Oc1e`0^NV_Of1j`0[NR_Oh1n`0YNo^Oi1Qa0XNlYOTOj3e2Zb0XNaYO^OS4[2\\b0WNeYOZOn3`2]b0TNPZOROb3l2^b0PNj^OR2Va0lMh^OX2Xa0eMf^O`2Za0_Mc^Oe2]a0ZMa^Oi2_a0VMa^Ok2_a0TM`^On2`a0QM`^OP3`a0PM^^OR3ca0mLZ^OV3fa0iLX^OY3ia0gLR^O^3na0bLP^O`3Pb0_Lo]Oc3Rb0\\LT[O@Y1N2O100O2N1O3MSoU:"}}, {"image_id": 145, "category_id": 1, "bbox": [1034.5771484375, 244.02127075195312, 368.026123046875, 474.5900573730469], "score": 0.9999980926513672, "association_id": 1, "segmentation": {"size": [1060, 1600], "counts": "eVfQ12QQ18H7I4L2N2N2N1O2N2N1O2O0O1O2N1N2O1N2O1O1O2N100O100O1O100O1O1O1N2O1N2N2N2O1O1O100O1O1N2O1N2M3O1N2O1O1O1O100O10O0100O100O10O01O1O100N10001O000000O2O001O001O010O01O1O1O1O001N2N2N2O1O001O100O1O1N2O1N2N2N2N2O1O1O1O10000O1000000O10000O10000O001O1O1O1N2N2O1O1O1O1O100O1kHjK[AW4c>lK\\AT4c>oKZAR4d>QLZAP4e>RLYAn3g>TLVAn3h>ULUAm3j>ULSAm3l>ULQAm3n>ULPAl3o>ULo@m3P?ULn@l3Q?VLn@i3S?WLl@j3S?XLk@j3S?XLk@i3U?XLh@j3W?XLg@i3Y?XLd@j3[?XLP_OInK`4Re0gKj^Ob5Va0_Je^Oe5Za0]Ja^Og5_a0YJ^^Oj5ba0WJ\\^Oj5da0VJZ^Ol5ea0VJY^Ok5ga0VJW^Ok5ia0WJS^Ol5la0UJR^Ol5na0VJn]Ol5Rb0VJi]Om5Wb0VJc]Om5]b0UJ[]OR6db0oIT]OX6lb0jIm\\O[6Sc0fIj\\O\\6Vc0eIh\\O\\6Xc0eIf\\O]6Yc0dIe\\O]6[c0dIc\\O^6\\c0dI`\\O_6^c0cI`\\O_6_c0cI]\\O`6bc0cIX\\Ob6fc0`3N2N3M1O2N1N3N1O002N1O104K5K5\\\\OoBkb0f=O1O1O1O1O1O0O0100000000O1000O1000O1000000000000000000000000O10000000000000000000000000000O100O10000O1]No\\ORERc0l:Y]OjDib0S;_]OfDbb0Y;b]OcD_b0\\;d]OaD]b0^;f]O_D[b0`;h]O]DYb0b;i]O\\DXb0c;j]OZDYb0d;i]OYDYb0g;h]OWDYb0h;j]OTDYb0j;a1O1O2M2O2O0O2N101O1O1O1O1O1O001O1O1O010O001O01O010O10O010O10O0100O10O01O1O010O1O10O01O1O1O100O1O000O1000000bMbZOVI^e0f6iZOWIWe0e6oZOXISe0d6R[OZInd0d6U[O[Ikd0c6X[O\\Ihd0c6Z[O\\Ifd0b6][O\\Ied0a6_[O\\Ibd0b6a[O\\Iad0a6c[O\\I^d0a6j[OYIXd0a6R\\OTIUd0X6c\\O[Iec0\\6g3J6M2O2M3N1O2N1N3N1N3M2N3M3M2N3M2O2N1N3N2M3M2N3M3L4M3M3M4L3L5M4K7I7I6I8H;^O_d\\6"}}, {"image_id": 145, "category_id": 2, "bbox": [1426.1805419921875, 259.122802734375, 166.5333251953125, 13.1458740234375], "score": 0.9999920129776001, "association_id": 2, "segmentation": {"size": [1060, 1600], "counts": "RSi^11SQ100000000001O000O1000000000000000000000000000001O00000O1000000000000000000000000000000000000000000001O000O100000000000O1000000000000000O100000001O0Oa]<0_bC1O101OO10O100000000000000000000000O100000000O1000000O1000000000000000fjo0"}}, {"image_id": 145, "category_id": 1, "bbox": [0.0, 256.2538757324219, 111.86620330810547, 250.93841552734375], "score": 0.9999897480010986, "association_id": 6, "segmentation": {"size": [1060, 1600], "counts": "T8;i0l3nj0cL^TOQ4>cKei0b6L2N2N2N0O100000O100O100O100O100O10000O1001O000000001O00001O1O1O1O001O0100O2N3M1O2N3M3M1O3M3M3M1O1O100O2N2N1O1O1O2M4M2N001O0000000000001O1N2O2N2N001O1O000O101N1O3O2M2N0O2N1fN[TOTMfk0g2gTOPM[k0m2jTOnLYk0n2mTOmLVk0n2e1K3M3L3N3M3N3K7G7J5L5IaX\\`1"}}, {"image_id": 145, "category_id": 1, "bbox": [488.6742858886719, 102.61451721191406, 178.14523315429688, 170.38121032714844], "score": 0.9999845027923584, "association_id": 0, "segmentation": {"size": [1060, 1600], "counts": "o]k?4nP16K2N1N2O2O0O100O10O0100O00100O010O10O010O01N101O001O100O1N2O100O1O010N2O0O10100O1O1O1O1O100O101O0O1O1O2O0O2O001UQOaNnm0`1fQOaNJ3^n0]1fQOcNI1an0\\1eQOeNH1bn0[1eQOdNI0cn0]1bQOeNIOen0]1aQOmN^n0U1`QOkNan0W1\\QOjNdn0k10O0100OJ]QOmMcn0S2_QOkM`n0V2`QOjM_n0W2cQOgM]n0X280O100000000O010000000000O1O1H7O2N200001N100^NRNnSOn1lk0YNRTOh1nk0ZNPTOe1Pl0^NmSOb1Tl0bNgSOW1al0nNZSOQ1fl0TOUSOl0ll0WOPSOi0Qm0YOlROh0Tm0[OeROi0[m0ZO\\ROl0dm0Z10[OZROmMem0S2\\RObMN0fm0]2^ROaMN0em0_2]ROaMN0em0_2]RO`M1Ncm0b2\\RO`M3Kbm0e2[RO_Mom0a2QRO_Mom0a2QRO_MPn0a2nQO`MRn0j20O1O1O10oQOTMim0j2:EhQOfM\\n0V2jQOeMZn0n1cQOSNjn0j1;L3N2O1N2I7O1N2O001O0O2O001O001O2O2M2O11N3MO2GmoN]OXP1>:M2N1O0005K1O001O00000O101O000000N3N101N1O2N4IRgWn0"}}, {"image_id": 145, "category_id": 2, "bbox": [1016.890869140625, 655.8394775390625, 261.361328125, 85.98858642578125], "score": 0.999980092048645, "association_id": 1, "segmentation": {"size": [1060, 1600], "counts": "h^mP19iP14M2N2O001N100O10000O2O00000O10000O1000000O2O0000000O100O10000O10O10O10000O10000O10O10O100O1O010O100O01000O1O100O100O0100000O10O01O001O100O10O1000O100O1000O0100O010O1O010O10O1000O010O100O01000O01000O010O100O010O10000O100O01000O1000O010000O100O100O10O100000O10000O100000000O010000O10000000O01000000000O100000O1000000O100000000O100000000000000O10000000000000000O10001O0000000000001O0O10000000000^O]POCco0;`POD`o0;bPOD^o0;dPOD\\o0;ePOE[o0;fPOC[o0"}}, {"image_id": 145, "category_id": 1, "bbox": [285.4359130859375, 158.09274291992188, 108.3951416015625, 143.08917236328125], "score": 0.9942240118980408, "association_id": 0, "segmentation": {"size": [1060, 1600], "counts": "bhf93PQ14QoNNdP1;M2M4M2O2M2O2N1O105J2O0O2N1O1N2O2N1O1O1O2N1O1N3O0O2O001O0O1O101N1O00100O2M2O2N1O1O1O2N1O2M4L4M3M0O1O2O1O1N2O2N0O101O001000O1O1O1O100O1O1O1O1O1O1O1O1N2O1N2N2O1N2L4N2N2O1L4L4M3VOoPO[OWo0:o0N3N3IlWPW1"}}, {"image_id": 145, "category_id": 2, "bbox": [443.8020935058594, 425.9079284667969, 100.18154907226562, 16.639404296875], "score": 0.9907733201980591, "association_id": 8, "segmentation": {"size": [1060, 1600], "counts": "^^h>1RQ110001O0O100000000000000001OO100000001O00000000001O000000001O00001O0O10001O0000001O000000001O0O1000001O0000000000000000000000001OO100O101N1O3K4M`WdR1"}}, {"image_id": 145, "category_id": 1, "bbox": [276.5506286621094, 74.537841796875, 74.42803955078125, 75.43693542480469], "score": 0.9607856273651123, "association_id": 0, "segmentation": {"size": [1060, 1600], "counts": "ajn8h0ZP14L4M3M2K6M1N4M2N2M3N101O001O001O001O1O001O00001O1O0106RNgPOb1`o0N2M3M102N1O2N1O0O2O1O1O002N001O1O1O1O1N2O2O0O2N1O1O2N1O1O3M1O2MjWjX1"}}, {"image_id": 145, "category_id": 2, "bbox": [469.3965759277344, 415.2380676269531, 227.48062133789062, 166.82009887695312], "score": 0.9183478355407715, "association_id": 5, "segmentation": {"size": [1060, 1600], "counts": "VRX`03PQ14M1N100000000000000000000000O2N1N3MeXQ12ZgnN1O2N1O1O1O1O1O1O1O1O100O100O100O1000000O10000O100000000000O10000000O010000O10000O0100000O100000000O1000000O10000O100O100O101O0O1000001N102N1N2O1Nod^o0"}}, {"image_id": 145, "category_id": 2, "bbox": [676.314453125, 441.122802734375, 133.69677734375, 30.4371337890625], "score": 0.8495500683784485, "association_id": 7, "segmentation": {"size": [1060, 1600], "counts": "YaUf01QQ13N1O100O1N2N2O1001O0000000O102N000O01O100000O100000O01000000O2O0000000O10000000000O1000000000O010000000000000O01000O10000O1O1O1IM\\oN4cP16O200O10000O010000000O1000000000000000000000000000O100000000000001O000O1000001N101HZoN0fP1L`oN1jP101N[joi0"}}, {"image_id": 145, "category_id": 2, "bbox": [421.88543701171875, 478.790771484375, 69.44683837890625, 10.749267578125], "score": 0.7602599263191223, "association_id": 0, "segmentation": {"size": [1060, 1600], "counts": "mYe=2QQ1101N10000000000000000O10000000000000O100000O1000000000000000000000000000O10000000000000000000O10000001O000000001O000OgjTT1"}}, {"image_id": 145, "category_id": 1, "bbox": [463.2852783203125, 259.3684997558594, 218.9986572265625, 203.86141967773438], "score": 0.51548171043396, "association_id": 8, "segmentation": {"size": [1060, 1600], "counts": "aao>1eP1f0G3M2N2O1O1O1O1O1O001O001O001O1O2N4L2N2M3N2cPOcNon0S2F6J3M2N1O100O2N2N3M2N1O1O1O1O1O2N2N3M1O100O1O100O10000O10000000O1000000O100O2O3L3N2oMWROb0im0[OZROSOLW1im0E\\ROROLZ1hm0B]ROTOK[1im0_O]ROTOK]1jm0\\O]ROTOL`1gm0YOiROg0Xm0XOhROi0Xm0UOkROi0Vm0VOnROg0Qm0YOPSOf0Pm0ZOPSOf0Pm0ZOQSOe0Pm0ZOPSOf0Pm0[OPSOd0Pm0\\OPSOe0ol0[O^RO[O4Z1]m0[O_RO[O4]1Zm0XObRO[O4]1Zm0YOaROZO5]1Zm0ZOTSOf0ll0[ORSOf0ol0ZOPSOf0Pm0\\OmRO5XO]Okm0a0jRO1\\O_Oim0a0_RORONn0K^Ogm0d0kROL@^Ofm0f0kROIC_Obm0i0lRODjm0<\\ROQOPn0P1R1000000001O00001O1O3MO1M3O2ORROnNjk0Q1UTOQOlk0n0STOTOlk0l0STOUOnk0j0RTOVOok0i0PTOYOPl0e0QTO[OPl0d0PTO\\ORl0a0nSO@Sl0?mSOAUl03mQOKn13Vl00oQOKj16Xl0MRROIf1;Yl0JPTO8Pl0FQTO;Pl0CoSO?[n0000O1000000O1000000O100O10000O10O10O10000O100O100aMXObTOh0]k0ZObTOf0^k0ZObTOf0]k0[OcTO4eM7hm0EcTO1jM7cm0IdTOMmM8^m0LTUOLnj07h28N2N2O1N2N3N1N2O1O1O2O00O1000iROROXj0n0gUOTOXj0l0^TOPO[O1^O6fl0i0aTOROYO1^O6gl0f0cTOTOiNN04K6hl0d0dTOTOiNN04K6hl0e0cTOSOjNN04K5hl0g0cTOROjNN13I7il0g0bTOQOkNN13I7il0g0bTOPOlNO04H6jl0g0bTOPOlNO13F8jl0g0cTOoNlN00b0al0`0aTOPOlNO1c0al0`0_TOPOmN1Mc0fl0>]TOQOlNQ1gl0:oSO6Pl09_SOIal0^2O1O1O1O0001gMZSO2fl0M`SOO_l01cSOM]l02eSON[l01fSONZl03dSO0Zl0_2O1O2M3O1O1O00O0O1QNoSOiNRl0R1VTOjNlk0Q1YTOmNik0o0[TOoNfk0m0`TOPOak09eSOiNP1l0_k0oN`SOf0l16Tn0I^mfm0"}}, {"image_id": 145, "category_id": 2, "bbox": [0.0, 536.0315551757812, 36.487388610839844, 12.24444580078125], "score": 0.4711763262748718, "association_id": 0, "segmentation": {"size": [1060, 1600], "counts": "Rb14oP12O0000001O0000000000000O10O100000000O011OO10O2OO11N1000\\ehb1"}}, {"image_id": 145, "category_id": 2, "bbox": [111.18588256835938, 326.95318603515625, 193.1358642578125, 223.34771728515625], "score": 0.1540309339761734, "association_id": 0, "segmentation": {"size": [1060, 1600], "counts": "ZWX51SQ10SZ91keF2M2O2O00OFKgoN5XP1OdoN2[P11coNO]P12boNN]P13boNM^P1>O0O1O2N1O1O10000O1000000O100000000000000O10000000000000000000000000000O100000000000O1000O100001N1O1M4L4L4K5HXVS1MQjlN3N3L8I3L2O1O0000000000001O0000000O100001O0O101O1N1O2O2L4L5JjQmY1"}}, {"image_id": 145, "category_id": 2, "bbox": [1000.4912109375, 204.6900634765625, 164.5811767578125, 32.10520935058594], "score": 0.06828732043504715, "association_id": 0, "segmentation": {"size": [1060, 1600], "counts": "TidQ13QQ1000O101O0000000O1000000000000O10000000000000000000000000000001O0O10001O0O2O\\ec01bZ\\O100O10001OO100000000000000O100000000O1000001N1000]`\\?"}}, {"image_id": 145, "category_id": 2, "bbox": [520.4398193359375, 530.3577880859375, 114.14080810546875, 60.25152587890625], "score": 0.06639561802148819, "association_id": 0, "segmentation": {"size": [1060, 1600], "counts": "ahea03PQ11O1M201N2N2M2O2O1N1N3N101O1O1000O0100O100000000000000000O10001O0O100O2O00000O101N10O10000O010O01000O1000O100000O010001N10001N2O1O1N2O1O001N1000001O0O2O001N2OQf_o0"}}, {"image_id": 145, "category_id": 2, "bbox": [1416.9010009765625, 222.93426513671875, 49.761962890625, 9.110671997070312], "score": 0.06231611967086792, "association_id": 0, "segmentation": {"size": [1060, 1600], "counts": "[[T^12RQ100000O2O00000000000000000O1000000001O0000001O000000000O1001O01N0100000O10ma\\4"}}, {"image_id": 146, "category_id": 1, "bbox": [515.62939453125, 104.13467407226562, 122.87579345703125, 299.0652770996094], "score": 1.0, "association_id": 3, "segmentation": {"size": [422, 656], "counts": "ajd6U1m;9H6I8H9I5K4K5K7J5L3jH]Md3f2VLbMd3d2mKlMl3[2gJQOR5V1eJQOX5T1`JQO_5U1UJQOk5U4O100000O10000O0O2N2N1001M4M2N3N3L4K4L5L3K6J7K5L2N2O0O1O2N1N3M2O2N2O1O1O1O1OO1N2N3M2N2M3eMYLgJX4k4]KQJ`0?e4]5nJSJ>;j4a5eJVJd01n4h5YJ\\Ji6Q60002N\\OXIlJe6Q5_IoJ`6n4cIRK^6j4dIWK_6d4cI\\Kd6\\4\\IdKg6X4[IgKg6V4ZIkKg6S4YImKj6Q4UIoKn6n3RIRLo6m3PITLQ7j3QITLP7l3QIRLQ7l3RIPLP7P4QImKR7S4S10gGdKd7]4WHfKj7[4PHiKP8f41O010O1O2N3L4K5DB8_O`0E]:CbE>]:CcE>\\:CbE>`:@`Ea0`:]O`Ee0`:ZO_Eh0a:WO_Ej0a:UO^En0`:RO_EP1Z;1O2N1O2]OjNTEV1^;010O01O010000000O00100O1O101N6K`0@2M1000O010O01O1N3MZR2LjmM2O1O1O1O1O4L2N1O1O1O001N2O001O0O2O0O101N101N1000001N10000O100O100O10000000000000000000000000001O0001O0000000000001O00000000001O0000000000000000000000000000000000O1000000O10000O1000000O10000000000000000O100000000000000O100000000000000001O0000000000000000000000000000000000000000000000001O000000000000000000000O010000000000001O0000000000000000000000000000O101O01O00000000000000000000001O00001O000O2O00001O000000001O00001O00001O001O001O001O0O2O1O001N101O000O101O001O0O2O1O1O1O1O1N2O1O1N2OfXd3"}}, {"image_id": 146, "category_id": 1, "bbox": [526.1785278320312, 238.0642852783203, 77.7449951171875, 172.6913604736328], "score": 0.2952742576599121, "association_id": 0, "segmentation": {"size": [422, 656], "counts": "XSi6P1Q9_OaIj0Z6XO`Im0_6WOYHn1e7UNWHn1h7UNRHn1n7f1O0000001O001O00O1001O001O1O001O00001O3M2N1O1O1O1OYLlG\\2T8aMWHVOGb2Q8WNkHg1U7XNmHg1S7XNoHh1P7WNRIi1m6VNUIk1i6RNZIQ2c6gMeI^2V6`MlIa2S6\\MSIELo2Q7[MSIIJl2S7ZMTIKIk2S7YMUIJIm2R7XMWIJTOO;n2Z7YMXIGTO4:k2Z7ZMXIGUO3:k2Z7ZMWIHUO3XDXOT;f0kD\\OX;a0gD_O];=cDC];=cDC_;;aDE_;<`DE_;<`DDa;;_DF`;IZD86O`;I\\D721c;F\\D:O2e;A_DQ1k;000001Oc0^O2N3M3M10N102M2N2N2N001O00O1O2MZoQ7"}}, {"image_id": 146, "category_id": 2, "bbox": [51.2874641418457, 211.14247131347656, 34.3879508972168, 26.80169677734375], "score": 0.19076259434223175, "association_id": 0, "segmentation": {"size": [422, 656], "counts": "VWe02S=3N1O1O2N1O1O1O001O000000000001ObCER<:nCFT<8lCHV<6iCLV<4jCLW<4gCMY<4fCLZ<5eCK[<9_CIb^DBb;1TD3:Lc;NUD77Kc;OWD65Ke;MWD84Ke;MXD73Le;MXD91Jg;MYD9NKj;KXDh0i;VOYDi0R<00@kCOiU_OhAl`0W>Y_OdAh`0[>^_O_Ad`0_>b_OZA``0e>f_OUA[`0i>W1RO]]OmBeb0Q=j]OaBWb0\\=P1N1N3M2N3^Oa0K5N2O1N3M2N2N3K4M4L4L400O0100001O000000001O00001O1O001O001O1O001N2N2N1O2N2N1O2M3N2M2N3O1O1O1O001O1O1O010O1O100O10O0100O100O10001N10001N100O2O0O101N101N101N1O2O0O2O0O2N2O0O2O1O0O2O0O2O1O0O101O0O2O00001O001O001O001O001O001O1O001O1O1O1O1O1O1O1N2O1O1O1O1O001O1O001O1O001O00001O010O00010O00010O010O010O10O010O010000000O1000O1000000O01000O0100O010O0010O01O001O010O1O001O1O001O1O1O1O100O2N2N1O2N1O2N1O1O2N1O2N1O1dXOhF^f0Y9UYOXGef0o9K5Kj0VO1O2N1O1O2N1O1O1O1O1O1O1O1O1O2N1O1O1O1O1O001O001O001O1O001O001O001O1O001O001O001O1N101O001O1N101O1N2O001N2O1N2O1N2O1NYLW\\OiIhc0U6\\\\OjIbc0T6d\\OjIZc0U6j\\OjITc0T6Q]OjIob0R6W]OmIgb0Q6^]OnI`b0o5f]OPJXb0P6j]OPJTb0P6o]OoIoa0R6S^OnIka0Q6W^OoIga0Q6\\^OnIca0R6^^OnI`a0R6b^OnI\\a0R6f^OnIYa0R6h^OnIVa0R6l^OnISa0R6n^OnIQa0Q6Q_OoIm`0R6S_OoIl`0P6V_OPJh`0Q6Y_OnIg`0R6Z_OmIf`0R6\\_OmId`0S6]_OlIb`0T6`_OjIa`0V6`_OiI``0V6c_OhI\\`0X6f_OgIZ`0Y6g_OeIZ`0Z6i_OdIV`0\\6l_ObIU`0^6l_OaIT`0^6n_O`IR`0`6P@^IQ`0a6Q@^Io?a6S@]Im?c6U@\\Ik?c6W@[Ii?e6Y@ZIg?d6\\@[Ic?e6^@ZIc?e6_@ZI`?g6a@WI`?h6b@WI]?i6d@VI\\?j6f@UIZ?k6g@TIX?l6i@SIW?m6k@RIU?n6l@PIT?P7m@PIR?Q7o@nHP?R7RAlHn>U7RAkHn>U7SAjHl>V7UAiHk>X7VAgHj>Y7VAgHi>Y7YAeHg>\\7ZAcHf>]7ZAbHf>^7\\A`He>`7bAXH^>h7kAoGU>R8SBeGn=[8WB_Gi=a8]BYGc=h8bBRG^=n8hBlFX=U9a5000O2O000O1O2E:G9M3O1N2O100O2N101N10001N2O0010O0100O010O10O10O10O1000O0100O01000O1O10O0100O1O10O01O1O1O1O010O1O100O1O10O0100O10000O100O100O2O0O100O1O1O101N1O1O1O1O1O2M2O1N2N2O2N1O1O1O1O2N1O1O101N1O101N1O101N101N101N1O2O1N2M3N2M3M3M3M3M3L5K4L4L4K5L5K4L4L5L3L4N2M3N2M3N2N2N2N1O2N2N1O2O1N1O2N2N2N2N2M3N2K5J7I6J:D=@`0@d0hNP2aNZdP?"}}, {"image_id": 149, "category_id": 2, "bbox": [23.12898063659668, 771.348876953125, 596.525390625, 128.826171875], "score": 0.999194324016571, "association_id": 1, "segmentation": {"size": [1073, 1599], "counts": "okh0:RQ1:J3M2N2O0O2O0O101O0000001O0000001O0000001O0O100000001O0000000000000000000001O0001O0000000000000000000000000000001O00000000001O0000001O000001O000000O2O0000000000000O100000001O00000000000O10001O000000001O0000001O000000000O101O000000000000001O000000001O00001O0000001O00000000001O01O000001O00001O1O1O1O2N001O1O001O001O01O0001O00001O01O01O1O00100O2N010O001O000001O01O000000001O00001O00001O1O1O010O001O001O00001O00001O00001O1O1O2N2N2N2OO01O0000001O00000000010O00000010O01O1O001O0010O01O00001O00000001O01O000001O01O01O0001O00010O0000001O000001O000000001O0000010O00001O00000000001O000000000000001O000000001O0000001O01O00000001O000O10001O0000001O00001O00001O000000000O2O000000000000000000001O0000000O10000000001O0O10001N100O2O000O2N100O2O000O2O000O101O0O10001O0O101N100O2O1N2O2M2O1N10000O2O0000000O101O0000001N10001O001N2O001O001N101O0000001O0O10001O001O001O3M2N2N1O1N2O0000001O000000001O000O2O00001O001O001O00001O0O1000001O00000O10001O001O000O2O00001O0O1000001Olkc02QT\\O100JMmnN4XQ101O1O1NY^QS1"}}, {"image_id": 149, "category_id": 2, "bbox": [604.6474609375, 741.8146362304688, 261.52130126953125, 59.87603759765625], "score": 0.9970704317092896, "association_id": 0, "segmentation": {"size": [1073, 1599], "counts": "da]d0e0jP14M2N1O2N100001O00000000000000001O0000000000000001N100O1000000O10001O0000001O0O1000001O00000000001O000000000000000000001O0000000000000001O00O100000000O100O10000O10000O10000O10O10000000000000000000000000O1000000000000000000001O0000000000000000001O000000010O00000010O0001O0001O010O001O010O0000000001O000HjoNUOVP1k0koNUOTP1k0loNUOTP1j0noNUORP1k0noNUORP1j0ooNVOQP1j0PPOUOPP1j0QPOVOPP1i0PPOWOPP1h0RPOWOno0i0RPOWOno0i0RPOWOno0h0TPOWOlo0i0TPOVOmo0j0SPOVOmo0j0=00000001O000O10001O00001N101O00001O00000O1000000O2O1O1N3N2N1N2O1O0000001N10000000000O1000000000000000010O00O100000001O00000000000001N101N10acUh0"}}, {"image_id": 149, "category_id": 1, "bbox": [261.1226501464844, 647.7169189453125, 60.31939697265625, 27.6004638671875], "score": 0.8958747386932373, "association_id": 0, "segmentation": {"size": [1073, 1599], "counts": "l[g87XQ14M2N1N3O1N2N1O2O0O2O00001O000000000000000000001O000000000000000000000000000000000001O00001O1O1O00001O1O001O_`jY1"}}, {"image_id": 149, "category_id": 2, "bbox": [278.942138671875, 717.2009887695312, 610.2890625, 95.41326904296875], "score": 0.2654532194137573, "association_id": 0, "segmentation": {"size": [1073, 1599], "counts": "gUe<1_Q12N3M101O0O1000000O2O0000000O10001O000000001O0O2O001O001O0000001O0000000000001O000000001O00001O000O101O000000001O00000000001O001O001O001O001O000000001O000000000000001O0000001O0000001O00000000001O0000000000001O000000001O00001O00001O00001O00000000000001O01O0000000000000000000000001O000000000001O00000001O00010O00YOkoN3TP1JSPO2no0GioNL<WLo@o3l>RLRAS4j>nKTAV4i>lKUAW4h>jKVAY4h>hKWA[4f>fKYA\\4f>eKXA^4d>eKWAa4f>aKTAg4h>[KRAo4f>UKVAS58]I_=Q:B:F8QDZEW:k:_E]E^:g:\\E]Eb:g:XE]Ef:f:UE^Ei:e:SE]El:l;O1O1N3M2O1N2O1O100O1O100O100O001O1O001NbLSFlHl9P7_FkH`9R7hFiHX9V7nF^GPOFQ:l8SGWGROJk9o8VGPGUOOf9P9YGhFYO5_9R9]G]F_O:X9W9lH`FY7`9kHWF[7g9`3N2M3N101N2O1O1000000O1000000000O10000000O1000000000000001O0000000000000001O00000001O00000000001O1O002O0O2N6K6I5K2O0O2O0O10O101O000001O1O2N2M2O1TCdEQ<]:hCPFPdd0B][O>bd0B^[O>cd0B\\[O>dd0B\\[O>dd0B][O=dd0A][O?cd0A][O?dd0@][O?dd0@\\[O`0dd0@][O?dd0@\\[O`0dd0@][O?dd0@\\[O`0dd0_O^[O`0cd0_O][Oa0cd0_O^[O`0Qf00001O001O00001O001O1O001O001O0O101O00001O0000_Vd0Ldi[O5K1O2O0O101N101N10001O00001N100000001O00000000001O000000000000001O000O1000000000001O01O00000001O000000001O01O01O00001O000010O000001O0001O0000010O001O0010O01O1O010O0100O010O1O100O0010O0000002N2N2N1O1O0O2O1O001O1N3KU_V7"}}, {"image_id": 150, "category_id": 2, "bbox": [576.0939331054688, 502.9196472167969, 180.828857421875, 66.52218627929688], "score": 0.922468364238739, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "XXj=6jg0001O000000000001O000001O01O01O00010O000010O0001O01O01O00001O01O000001O0O10000000000O1000001N100000000O101O0000001O00001O000010O01O010O0000001O000O100O1O1O2N1O1O101O1O1O2N1O1O1O1O102MYOXYO6hf0F^YO8cf0F_YO9bf0DbYO:Sg00O01O001O2N001N101O001O1O001N2O000O3MYh<2gWCOL0XXO0hg00XXO0hg00XXO0Sg00]YO1@OSg02[YOOCNRg04VYOMG2ONTg06SYOJJ5Sg02RYOJJ4Tg03PYO3Pg00lXO0Tg0>000GlXOEUg0:mXOCUg09jXOD^g0<30000O100O101O0O10000O100O100O5LQWY6"}}, {"image_id": 151, "category_id": 1, "bbox": [154.7798309326172, 222.94595336914062, 372.30340576171875, 155.93310546875], "score": 1.0, "association_id": 1, "segmentation": {"size": [768, 1024], "counts": "hZe3f0of0>ZOe0J5J6L4N1N2XOgMh[OZ2Xd0gM\\[ONO]2dd0fM\\[O1K[2hd0fMZ[Od2fd0^MW[Oc2hd0;O001J6O1O100O000I8N1O2N1O2N2O001O1O1O001000O010O00100O010O010O10O10001O000O10001O000000000O2O00001O001O001O00001O00000000001O00000000001O0000001OO100000000000000O1000O1001O000O10000O10000O10000O10000O1000000O10000000000O10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001O000000000000000000000000000000000000000000000000000000000000001O000000O100000000000000000000000000000O10000000000000001O0000O10001O00000000000000001O01O01O001O010O1O001O000010O0001O001O001O001O01O0001O00000001O000000001O00001O000O2O001N10000O2O0O101N10000O2O001N2O1N1O2O1N2O0O2O001N101O001O1O0O2O1O1O1N101O001O1N2O1O1O1N4M4L1O1O001O1N101O3M4L3L:G;E:F3L8I2N1N2O1N2N5K4L3L]mn;"}}, {"image_id": 151, "category_id": 1, "bbox": [538.3433837890625, 254.7857208251953, 103.9537353515625, 229.50779724121094], "score": 1.0, "association_id": 2, "segmentation": {"size": [768, 1024], "counts": "`Rf<9`g0=G5L3M4M4L2d[OmNha0V1U^OmNha0V1T^OnNga0W1U^OmNha0W1T^OjNka0X1X^O^Nma0e1U24L2L2O2O1O1O1M3N3O5J9H7H5K6I7I5K5L6I9G6H8Cg0]O>E7I4K4N3M2O2N1N2O1O001O001O001O001O1O1O1O0010gMY_OWMg`0j2W_OXMi`0i2U_OWMl`0h2S_OYMn`0l42N2N1O2N4L5K3M2N2M4M2N001O1O1O2N1O1N2N2N2L3XOi]OdK\\b0i3i]OiK52_b0Z3i1_O>L4aNjZOK_e0Fg1F9KmUT9"}}, {"image_id": 151, "category_id": 2, "bbox": [596.4871215820312, 461.21063232421875, 178.276123046875, 33.475006103515625], "score": 0.999996542930603, "association_id": 2, "segmentation": {"size": [768, 1024], "counts": "RW_>1og00O2O0O1O2N2O0O1O1O100O100O100001O0000000000001O0000000000001O00000001O000000001O0O100LDdXO=Zg0DfXOTg0BlXO>Tg0BlXO>Tg0BlXO=\\g0000O100O100O100O100O1000000001O00000O101O00000000000000001N10001O0O3MVYj5"}}, {"image_id": 151, "category_id": 2, "bbox": [159.44647216796875, 359.6733703613281, 396.097412109375, 21.1708984375], "score": 0.9999924898147583, "association_id": 1, "segmentation": {"size": [768, 1024], "counts": "c[f42mg02O1N10001O0O100000000000000000000000001O000000000000000000000000000001O00000000000000001O00000000000000000000O100O10000O100O1000O10000000O10000000000O1000000000000000O1000000000000000000000000000000000000000000000000000001O0000000000000000000000000000000000000000000000000000000001O0001O0000000000000000000000000O1000000000000000000000O2O000000000000000000000000000000001N10000000000000000001O00000010O01O0000001O000000001O001O1O001O0000000000000000001O00000000000000000000000000O10000O10000000000000000O10000O1O100O10000O1000000000000000000000000O10000000000000000000000000000000000000000001O0000000000000000000000000000000000000000000000000000000000000000000000O1001O0000001O001O0O4M002N0O2O00ZlS;"}}, {"image_id": 151, "category_id": 1, "bbox": [138.42568969726562, 275.37518310546875, 42.56298828125, 102.65789794921875], "score": 0.32186752557754517, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "^iZ3c0Zg07VZOZOQd0i0k[OYOTd0k0f[OYOXd0R1][OoNbd0X1V[OjNid0a1gZOeNXe0R2O100O11O001O001O00000000000000O1000000002N4L5TO_ZOnNee0d0lZOVOWe0=U[OAnd00a[OM[f0M\\ljc0"}}, {"image_id": 152, "category_id": 1, "bbox": [1232.2840576171875, 707.1939697265625, 336.88623046875, 680.00830078125], "score": 1.0, "association_id": 1, "segmentation": {"size": [1536, 2048], "counts": "kjki1>\\_1=E:F8I5M1N2N2O1N3N1N2O1O1O1O1O101O000000001O0000001O000O10000O101O0O100O10000O2N1O1O2M2O1N2O2N1O1O2N100O2O000O2O001N2O0O2O001O1N2O2M3N3L4M3L4M3L4L3N3Lm0SO5L3L6J6J7I4L3M3M3M3M3N1N2WlN]ISn0e6hQOaITn0b6gQOdIVn0_6dQOhIWn0^6`QOlIZn0Y6\\QOSJ]n0R6ZQO[JWNdN[m0W7VTOaJ^MSOYn0`6RTOVMkk0P3nSOTMPl0P3jSOTMSl0Q3gSOSMVl0R3dSOQMZl0T3_SOPM_l0W3WSOnLfl0_3iROiLTm0f3RROgLkm0j:L3M4K4L4L4M3L4L3M4K4M3N2N3M2N2O2M2O1O1O2N1O1O1N2N2O1N3N1O1N20000O10000O10000O10O1000000O1N2O1O1N2N2M4L3N2N2N2N2N2N2M3L4E;D`nNo0c0UNQQ1g0_nNR1o0hMhP1P1[nNV1W1`MdP1S1XnNZ1_1XM`P1X1SnN^1m1iLUP1e1PnN`1\\V1^NeiN`1_V1\\NbiNc1`V1[NbiNc1aV1ZNaiNd1aV1ZNciNb1`V1ZNdiNd1_V1WNeiNf1^V1UNgiNh1_V1QNeiNl1dV1iM`iNU2hV1bM\\iN[2mV1ZMWiNe2SZ1N2N2N2N3K5K5I8Hj0kNa\\]f0"}}, {"image_id": 152, "category_id": 1, "bbox": [0.0, 763.1681518554688, 160.58502197265625, 76.7225341796875], "score": 1.0, "association_id": 2, "segmentation": {"size": [1536, 2048], "counts": "Yh0321O0[_1f0H5J4N2O4Kl0UO1O1O001O1N2O1O000000000000000000000000O1000000000000O1000000000000O10000O1000000O1000000O100000000O100000000001O00000000O10000000000O10000O10000O100000000O1000000O2O0001O01O1O00001O0O2O00001O001N10001O001O00001O01O0010O01O01O0000010O0010O01O0000100O002N2N1O001O1O001O001O00001N101O001N2N101N2N2N4L2K7H7L5IlV_h2"}}, {"image_id": 152, "category_id": 2, "bbox": [947.130615234375, 988.7593383789062, 114.7120361328125, 68.18438720703125], "score": 0.9999998807907104, "association_id": 4, "segmentation": {"size": [1536, 2048], "counts": "^Pk\\1220c_1?E7D;J5N2O1N2O1N2O010O1O0100O010O100O1O1O010O1O100O001O1O10O010O0100O1O010O10O0010O0010O01O1O001N2O1O1N1O2O1O100O100O100O100O2O001N102N1N2O000O2O1O001N2O001N100000001O0O3N2McPQ_1"}}, {"image_id": 152, "category_id": 1, "bbox": [529.8488159179688, 713.5035400390625, 118.39178466796875, 80.5255126953125], "score": 0.9999997615814209, "association_id": 3, "segmentation": {"size": [1536, 2048], "counts": "\\gkh0n0P_15L10000000000000000000001O0O1O1N2O100O2N1O2N1N2O1N200O1O1O001O1N1O110O1O1000000O10001O0O1000000M4O00001O0O100000001O00000000000000001O000001O001O0001O000010O001O001O001O10OO2O1O1N101O1O1O001O1N3N1O1N3N3M2N1N2N3M2M3N2N4J4M3MG8J5oM]eNnM[[1l1`1L4L5K6K6K4L4L4L2N3M3M2O1M4M4K5L3N1O1OfeWa1"}}, {"image_id": 152, "category_id": 1, "bbox": [294.20928955078125, 750.1854248046875, 137.7459716796875, 61.2515869140625], "score": 0.9999788999557495, "association_id": 5, "segmentation": {"size": [1536, 2048], "counts": "nWk=c0[_16K3N2M3N2M2O1N3N2M3M2O1O0O100000001O000O10000O1000O0100O1000O010O010000000O100000O10O100000000000000000000001O00001O0000001O0000001O000000000000000000000000000000O1000000000001O00000O100000001O0O10001O0O10001O00001O001O001N101O001O0O2O001N1O2N1ZO[aNNi^1M_aNJg^12e0OUXV\\2"}}, {"image_id": 152, "category_id": 2, "bbox": [0.0, 826.209716796875, 175.3900909423828, 16.28662109375], "score": 0.9999366998672485, "association_id": 2, "segmentation": {"size": [1536, 2048], "counts": "VZ23m_11N10000000000000000001O00000000000000000000000000000000O1000000000000O100000000O100000000O10000000O1000000000000000O100000000000O1000000000O100000O10O100000000O10O1000000000O1000000000000000000O10O1000000000000000000O1000001O0000001O000O101O000000001O0000001O0O1000o_:1P`E0O100O1000000O100O1O0100000000000000000O101O0001N10000000001N2NTfhg2"}}, {"image_id": 152, "category_id": 2, "bbox": [538.2606811523438, 778.794189453125, 110.78094482421875, 18.06256103515625], "score": 0.9998693466186523, "association_id": 3, "segmentation": {"size": [1536, 2048], "counts": "ehoi01o_11O0O2O001O0O10001N100O1N200010O0000001O00001O001O0000001O000000000000000000000000001O0000000000000000001O000000000000000000O010000000000000O1000O1000O1000O01000O100O2O0O^WoQ2"}}, {"image_id": 152, "category_id": 2, "bbox": [1273.0340576171875, 1149.521240234375, 81.7203369140625, 83.5274658203125], "score": 0.992195725440979, "association_id": 0, "segmentation": {"size": [1536, 2048], "counts": "mTkk18f_14M2N2N2N1O2O0O2O1N1O1O1O10001O0O10000O2O1O0N200O]OVaN3i^1LZaN2f^1L]aN4b^1K_aN5`^1JcaN6\\^1IeaN7Z^1JfaN7Y^1GiaN:U^1FlaN;R^1EPbN:o]1FRbN;l]1FTbN;j]1FWbN:h]1FXbN;f]1FZbN;c]1G]bN;`]1FabN;\\]1FdbN;[]1EfbN:Z]1HibNAXO80Jn]1?TcN_OQOOl]1c0[11O001N11O0000000001OO101N10001O1N4J5MjkQQ1"}}, {"image_id": 152, "category_id": 2, "bbox": [1374.1533203125, 1190.76953125, 232.9739990234375, 144.3377685546875], "score": 0.9846373200416565, "association_id": 1, "segmentation": {"size": [1536, 2048], "counts": "[gfQ22d_1=K5I8G7K4M4L3N2M3N2O1N2O2M2O2M2O1N2O1O1O2M2O2N2M2O1O10001O010OO10000O101N200O1O1O2N1O0O2N5KV1kN3L3N2M101N1N5Jh]T3NUbkL:L6J2N2N2N2N3M4M4K9G2O1N2O1O1O4L2N001O001O00O010O100O100O100O100O01000O100O100O1O1O001N2O100O10000O100O1O100O100O1O1O0O200O002O0O2N1N3M2O2M2O2N3L4K5I9Ghind0"}}, {"image_id": 152, "category_id": 2, "bbox": [1481.9930419921875, 1203.19677734375, 125.433837890625, 108.2713623046875], "score": 0.9579361081123352, "association_id": 0, "segmentation": {"size": [1536, 2048], "counts": "_VbW27e_1a0B5K3M3M4L4M2M3N1N3N2N2N3M2N2N00001O0000O2O0O1O1000O01000O01O1N2O00100O10O10O001O00100O10O01O1O100O1O00100O010O1O100O1O1O100O2N100O2M3M3L3O2K6J5M3M4Mjikd0"}}, {"image_id": 152, "category_id": 2, "bbox": [326.3454284667969, 796.8676147460938, 105.553466796875, 14.69952392578125], "score": 0.8264955282211304, "association_id": 5, "segmentation": {"size": [1536, 2048], "counts": "UYg?2n_10O10001O00000000000001O0001O000001O0000001O000000001O0000000000000000000000O100000000O10000000000000O0100000000O100000O010000O100000000O100000O1000O10000O0010000O1000O100O10001O1N2NQgn[2"}}, {"image_id": 152, "category_id": 1, "bbox": [1072.5726318359375, 733.3594360351562, 39.4744873046875, 65.63128662109375], "score": 0.23952485620975494, "association_id": 0, "segmentation": {"size": [1536, 2048], "counts": "aWZb1=b_13M10O03M00102M101N11O001O010N1100OO12O0NNj`N\\OV_1g00O1N22NN3N102K3O1O3J4O10]XQ\\1"}}, {"image_id": 152, "category_id": 2, "bbox": [1305.2366943359375, 1163.895751953125, 254.7054443359375, 138.369140625], "score": 0.1688448041677475, "association_id": 0, "segmentation": {"size": [1536, 2048], "counts": "QUXm1?__16D@n`Ne0m^19O1O1O1O2N3M2N1O1N24K2N4K7H;YOlai3`0m]VL:I3N2N2M3M4M4L3M3M2N2N2N10001O01O0001O00001O010O010O001O010O0010N2O4L3M3L7J2M3hN\\aNP1l^1ROXaN?mmd3]ORR[L3^_1:M2O6I2N1O3L3N7I5K6J3L3O1O101O1N100O00100O01O001O00001O0O101O1M5L4K5J`ijf0"}}, {"image_id": 152, "category_id": 2, "bbox": [1271.5426025390625, 1156.9986572265625, 184.2315673828125, 93.2061767578125], "score": 0.15240813791751862, "association_id": 0, "segmentation": {"size": [1536, 2048], "counts": "QUkk11m_14J8K2N101N1O101N2N100O101N100O1O100O2O001O001N101O0O1O2N2M2O2O00VO\\aN9d^1F]aN:b^1E`aN<^^1BfaN=Y^1BjaN=V^1AlaN?R^1BnaN>Q^1BQbN>n]1ASbNa0k]1_OVbNd0e]1WOkaNOb0k0a]1VOmaNOd0k0]]1VOoaNOe0j0\\]1WOPbNNf0g0]]1YOoaNNf00ZO>V^1Dd1Ngbc30S]\\L7I7N3N1O1N2O1O1O100001O000000000000O1000000O10000000000O11N101O1O2N1O2N2N2N2N1N4KYYWl0"}}, {"image_id": 153, "category_id": 1, "bbox": [779.9989624023438, 666.11865234375, 275.90423583984375, 101.90106201171875], "score": 1.0, "association_id": 3, "segmentation": {"size": [853, 1280], "counts": "UY`d05\\j06J:F8J4M2O1N101O0O2N2N2N2N1O2O1N101O0O2O0O2O0O2O0O2O00001O000O10000000000O1000000000O01000O1000000O100O100O101N10000000000000000000O1000000000000000000O100000000000000O1000000O100O10000O10000O100O1O1O1O1O10000O101N100O2N1O100O2O0O100O2O0O2N2O1N2O1N10001O00001N10001N1000001O0O1000000000000000O100O10000O1000O0100O100O1O100O1O100O100000000O100000000O101O000000000000000000001O01O01O001O000000001O000000001O0000100O002N1O001O1O001O00100O0010000O0010O01O010O1O1000O01O01OO2O001O1O001O001O001O001N1O2M3M2N3N2N1O2N2L5VOQWOBYi0:e0Fi\\Q6"}}, {"image_id": 153, "category_id": 1, "bbox": [344.8204345703125, 647.3338623046875, 435.20880126953125, 137.10577392578125], "score": 1.0, "association_id": 2, "segmentation": {"size": [853, 1280], "counts": "lg[9175L1gi0o0A5L4O1N2N101N101N10001N2O001N2O001O001N10001O000O101O001N2O0O2O1O0O2O1O000O2O00001O0O101N101O1N10001N10001O00000O1000000000000O1000001N1000000000O100000000000000000000000O10O10000000O100000O100000O0100000000001O00000000000000000O2O0000001O00001O0O2O1O00001O000O2O0000001O001O00001O00001O00000000000000000000000O100000000000000000000000000000000O1000000000000000O10O1000O10O01O1O10O01O1O1O100O1O001O100O100O100O100O1000O01000000000000O101O00000000000O1001O0O10000000000000001O00000001O00000000001O000000001O0000001O0O10000000000000001N100000000000000O1000000O10O1000O10000000000000O10000O1000001O0O100000001O0000001O0O1000001O000000001O0000001O001O00100O1O1O001O001O00000010O0000001O00010O0000001O00000000001O0O100000001N100000000O2O000O2N1O1O1N3N100O1O1O101N1O1O1O1O2N1O1O2M2L5L3M4N1N3N1O2O0O101N101N2N2O1M3M8G7I6J8IUoX="}}, {"image_id": 153, "category_id": 1, "bbox": [100.68344116210938, 657.2543334960938, 271.731201171875, 85.27410888671875], "score": 1.0, "association_id": 1, "segmentation": {"size": [853, 1280], "counts": "hid2j0ji04L2O001N10001O001N2O1O1O0O2O00001O1O1O2N001O00001O000O2O001O00001O0O101O000O101O000000000000000O100000000000001O00000000000000000000O10O1000000000O100O1O1O1O1O1000O01000000O1000000O100000O100000001O000O10000O101N10000O2O000O100O1O1O100O10000O100O100O100O100O100000000O10000000000O100000000O10000000000000000000000000000000000001O000000000000001O0000000000000010O0001O00010O0001O0001O01O01O010O0001O0001O00001O0010O000001O001O1O1O001O0O2O00001N1O2O0O2O0O101O0O2N1O2N1N2O2O0O10001O001N2O001O000O2M2O2O1N2O2M2N2N2O0O2N2N2N5I5KW[jg0"}}, {"image_id": 153, "category_id": 1, "bbox": [1026.999755859375, 679.5194091796875, 163.7803955078125, 87.48858642578125], "score": 1.0, "association_id": 4, "segmentation": {"size": [853, 1280], "counts": "SVRk01cj08H3TVOFD1\\i0=nVOIQi09mVOIQi0;kVOFTi0o0O0O101N2O1O0O2O001O001O1O0O101O0O100000001N1000000O100N2O1O1O002N1M3O1O1O101N100O101O0O101O0O2O000000001O0000000000001O0000000000001O00O101O0000000O1000001N100O1O101N100O1O100O2O0O101O00001O00001O010O001O001O001O001N101N2O1N101O001O1O000010O1000000O10O0100O10O010O1O001O001N2O001O1N2N2N2M5EW^Y2"}}, {"image_id": 153, "category_id": 2, "bbox": [347.8250732421875, 763.8949584960938, 378.73748779296875, 28.11376953125], "score": 0.9999994039535522, "association_id": 2, "segmentation": {"size": [853, 1280], "counts": "ed\\92cj0001N10001O000O100000000000001N100000000000001O00000000001N100000001O00000O1000000000000O10001O0000000001O00001O000000000000000000001O000000000000000000000O010000O10000O10000000000000000O100000000000000000000000000000000000000000000000000001O001O1O1O001O0000001O0000001O2N2N1O0O100000001O0000]Zb00ce]O0000000000000O1M300O100O10000000O10O1O1N2M30000O100000000000000O010000000O100000O10000000000000000000000O010000000000000000O10O1000000000000000000O1000O100000000000000000O0100000000000000O1000000000O1000000000000000000000000000000O10000000000000000000000O10000000000000001O000O10001O00000000001O0000000O101O00001N2O1Nha[?"}}, {"image_id": 153, "category_id": 2, "bbox": [1038.1751708984375, 754.6253051757812, 135.8187255859375, 10.7359619140625], "score": 0.9999921321868896, "association_id": 4, "segmentation": {"size": [853, 1280], "counts": "i\\Vk02bj02O00000O10001O000000000001O0001O0000000000000000000000000000000000000000000000000001O00001O001O1O001O00Ree00nZZO0O2N1O10000O100O1O10000000000001O1O0000000000001O001O0O2O000000000000000000faQ3"}}, {"image_id": 153, "category_id": 2, "bbox": [790.5421142578125, 753.8029174804688, 256.7362060546875, 14.16778564453125], "score": 0.9999802112579346, "association_id": 3, "segmentation": {"size": [853, 1280], "counts": "kYce01dj0001O0O1000001N100O100O100O10000O2O000000000O1000000O10000000000001O00000000000000000000000000001O000000001O00001O00O100000000000000001O0000001O0000001O0000001O1O001O00000O2OTe`00kZ_O1O2O0000000O100O1O1O1O10000O1000000000000000000000000000000000000000000000000001O000000000O100000000000001O0000000000001O001O0000001O000000001O001O00001OQPl6"}}, {"image_id": 153, "category_id": 2, "bbox": [87.17877197265625, 726.1028442382812, 271.4084167480469, 14.50408935546875], "score": 0.9999206066131592, "association_id": 1, "segmentation": {"size": [853, 1280], "counts": "_Pn21dj000000O100000001O000000000000000001O0O1000hT\\10XkcN00001O000000000000000000000000000000000000000000000000000000000000000O10000000000000000000001O000000000000000000000O100000000000000000000000000000000000000000000001O0000000000000000000000000000001O00000000000000001O0000000000000000001OO10000000000000000O100000000O1000000O1000000000000000000000000001O0O101O0000ZoZh0"}}, {"image_id": 153, "category_id": 1, "bbox": [412.5743408203125, 472.65264892578125, 20.0096435546875, 16.93402099609375], "score": 0.7380703091621399, "association_id": 0, "segmentation": {"size": [853, 1280], "counts": "k_h:6^j03N1O1O1O001O000010O001O1N110N2O1NWhRf0"}}, {"image_id": 153, "category_id": 2, "bbox": [1042.6719970703125, 754.9571533203125, 70.655029296875, 9.10247802734375], "score": 0.05093022435903549, "association_id": 0, "segmentation": {"size": [853, 1280], "counts": "hlXk02bj0101O00001O000000000000000000000000000000001O000000000000000000000000000000000001O001O1O1O1O00d[i4"}}, {"image_id": 154, "category_id": 1, "bbox": [107.70735931396484, 80.91690826416016, 270.7548522949219, 296.685791015625], "score": 0.9999996423721313, "association_id": 1, "segmentation": {"size": [566, 849], "counts": "Skk1a0o`07N3M2N2O001N2O2N1O2N1N101O1O00001O00001O001O001O1O010O1O001O001O0001O1O1O2O1N1O1O1O1O1O1O2NcDmN\\6n0bIWOd6`0ZIEk63SI1m6MQI6P7HnH;R7DmH=T7BlH>U7@lHa0T7]OmHc0U7YOmHg0Q<010O00000[KYO[Hh0d7YO[Hf0f7ZOYHg0f7\\OWHe0i7]OUHc0k7BoG?P8DmGSFMR4F_5S2aJmMY5Y2fJhMV5\\2jJdMT5^2lJbMR5a2lJ`MP5d2oJ]Ml4i2RKXMf4Q3QIeLJ;m6X3nHnLMLn6^3QInLJFQ7`3SIoLFDU7a3RIPMBBZ7b3PIRM_O_O^7f3mHRM[O]Od7j3dHhNU7P6K5L4M3O1N2O1O1O1O1O1O1O1N2M3N2N2O1O1O0010^FcIj7]6mG\\Jc7e5VHoJ]7P5bHUKY7l4fHXKW7h4hH[KU7e4lH]KQ7c4PI^Km6c4SI`Kh6b4WIaKb6d4]I`K`5`5_JcJ[5a5fJ`JV5b5kJ`JQ5b5nJaJo4`5QKbJk4`5TKcJg4`5WKeJY4i5eK[Jg3V6YLmIb3V6\\LmIa3T6_LnI^3T6bLlI]3U6cLkI[3W6dLkIX3X6hLhIT3\\6lLeIP3^6oLcIn2`6RM`Im2a6RMaIk2b6SM`Ik2b6SMaIi2b6TMbIg2b6kLYJe2g:E7I4L3M3M4L6J7H7I6G:H7I9Ghc=2W\\B5M4K4L3N1N2O1O0O2O001O0O101O0000001N100O100O100O1O1O2N2N2N2N3M3M3N2M100000001O000002L5K8E\\Xh1"}}, {"image_id": 154, "category_id": 2, "bbox": [407.5341491699219, 409.359375, 206.30661010742188, 128.65771484375], "score": 0.9999995231628418, "association_id": 2, "segmentation": {"size": [566, 849], "counts": "lRS74b?5TB0g=2XB0e=3YBNe=4YBMf=7VBJi=9UBHj=:SBGm=9RBHn=9QBGn=;QBEo=>nABR>c0iA]OW>h0cAYO]>i0aAWO_>k0_AUOa>l0^ATOb>n0[ASOe>o0YAQOg>R1UAnNl>n1000O100O100O10000O1Dl@VNT?V2000RNi@]1W?bNRAV1n>jNSAU1m>jNUAU1k>kNUAU1k>kNUAU1k>kNVAT1j>lNVAT1j>lNVAT1j>lNWAS1i>nNVAS1i>mNXAR1h>nNXAR1h>nNXAS1g>mNZAR1f>nNZAS1e>mN[AT1d>lN\\AT1d>lN\\AU1c>lN\\AT1d>lN\\AT1d>lN\\AT1d>mN[AS1e>mN[AT1d>lN\\AT1d>lN\\AT1d>mN[AS1e>mN[AS1e>mN[AS1e>mN[AT1d>lN\\AT1d>lN\\AT1d>lN\\AT1d>lN[AU1d>lN\\AU1c>kN]AT1d>lN\\AT1d>mN[AR1f>nN[AQ1e>oN[AP1f>POZAP1f>POZAP1f>POZAP1f>POZAo0g>QOYAo0g>QOYAn0h>ROYAl0h>TOXAk0i>UOWAk0i>UOWAj0k>UOUAk0k>UOVAj0j>VOVAj0j>VOVAi0k>WOUAi0k>WOVAh0j>XOVAh0j>XOVAh0j>XOWAg0i>YOWAg0i>YOXAg0g>YOYAg0g>YOZAf0f>ZOZAf0f>ZOZAg0e>YO[Ag0e>YO\\Ag0c>YO]Ah0b>XO^Ah0b>XO_Ah0a>WO_Ai0a>WO_Aj0`>VOaAi0_>VObAk0^>SOcAn0]>QOdAo0\\>nNfAU1W>jNkAV1U>iNkAX1U>fNlAZ1Y?000O002OO01O010O00100O10O010O01O010O1O1O010O0010O02O0O100O10001O2N1N100O10O010O100O010O010O1O1O100lN\\@4e?J]@5c?J`@4a?Ja@5`?Ge@7\\?Ei@9X?Dk@;V?Bm@=W`0O00001O001O001O00001O00001O1O00001N10001O001O0O101LbiU4"}}, {"image_id": 154, "category_id": 1, "bbox": [137.91497802734375, 343.76116943359375, 53.06916809082031, 41.002777099609375], "score": 0.999345600605011, "association_id": 3, "segmentation": {"size": [566, 849], "counts": "mc\\29\\a02N2N2O1O1N2O1O1N2O1O1O1O1O1O1O1O1O001O00010O0010O01O01O00000010O0001O010O0000002N2N001O0O101O001N1O4K:DlZ[;"}}, {"image_id": 154, "category_id": 2, "bbox": [8.970306396484375, 288.19903564453125, 247.9085693359375, 81.9996337890625], "score": 0.996177077293396, "association_id": 0, "segmentation": {"size": [566, 849], "counts": "aj57^a02N2O001O001O001O1O00001O0001O01O0001O01O00010O01O001O01O01O001O001O10O01O001O0010O02N1O001O010O001O010O00000010O0001O2M10jN3R12O1c_OJW?8h@HX?8h@HX?8R12O0000000O2i_ODR?:PAGo>9QAHn>8RAIm>8RAHn>8RAIm>7SAIm>7SAIm>8RAHn>8SAHl>9SAGm>;QAEo>i0c@XO\\?i0c@WO^?i0a@WO_?i0a@WO_?i0a@WO_?i0a@WO_?j0`@VO`?k0_@UOa?l0^@TOb?n0\\@ROd?n0[@SOe?n0Z@ROf?n0Z@ROf?n0Y@SOg?n0X@ROh?n0W@SOj?\\1000O10000O2O01O000000001O0001O0001O00010O00001O01O0000000O10000000001O00000000001O0001O0001O00000000001O001O1O1O1O001O00001O0dNj_OX1[`0O1O1O2N1O1^O__OBO2ONf`08e_OHGOkk30feL0J1d^O0[a06O2N1O1O2O000001O000000001O0000000001O01O0000001O001O1O1O01O0001O00001O1O1O0010O0001O1O01O01O01O0010O0O2N10oj[:"}}, {"image_id": 154, "category_id": 2, "bbox": [123.34817504882812, 373.23883056640625, 43.17762756347656, 14.379730224609375], "score": 0.9953863024711609, "association_id": 3, "segmentation": {"size": [566, 849], "counts": "g^U21da02O001O001O001O0O2O001O00001O0000001O01O000010O0001O001O001O001O00001O00001O0000cTi;"}}, {"image_id": 154, "category_id": 2, "bbox": [39.81892776489258, 264.75238037109375, 316.73388671875, 121.002685546875], "score": 0.8907505869865417, "association_id": 0, "segmentation": {"size": [566, 849], "counts": "_]f01ba08I4N1N2N11O001O001N101O001O001O0O2N3MXc6Mj\\I3M3N2O1N2O001N101O1O1O0O2O00001O0O20O00010O01O00100O001O00010O1O01001N6J6K2d_OiNS`0_1N2N4M0O00000010O00001O0010O01O00010O01O1O1O010O00001O01O01O00000010O000000000000001O00000000001N1000001N1O101N100O100O2O0O100O2N101N2J6F[_O@f`0?\\_O_Of`0?\\_O_Og`08V_OI5Nf`07d0JPW77khH1N3M2O0O2O00000000001O000000000001O01O01O0010O010O01O01O0001O00001O000010O0001O00nMBlB>S=DmBk0]AUOc>l0\\ATOd>l0\\ATOd>l0\\ATOd>l0\\AUOc>k0]AUOc>k0]AUOc>k0]AUOc>k0]AUOc>k0]AUOc>k0]AUOc>k0]AUOc>k0]AUOc>k0]AUOc>k0]AUOc>k0]AUOc>k0]ATOd>l0]ASOc>m0^AROb>n0S10000000000001O0000001O0O11O00000000000000001N2O1M5]OWW7IPXHO[a07L4M3M201N100001O000001O000001O010O1O001O0001O000010O0000010O001O001O0010O0000010O01O1O1O00001O01O01O01O0001O01O01O00001O0000001O01O01O01O00000000000000010O0000000001O00000000010O000001O000000000001O00010O00000001O000010O00000000010O000010OO100O10000O101O000000001O01O0000001O1O001O001O001O00001O1O001O01O0000001O000010OO2O1N4LS_^8"}}, {"image_id": 154, "category_id": 1, "bbox": [585.8656616210938, 22.702505111694336, 13.49005126953125, 11.578378677368164], "score": 0.762496829032898, "association_id": 0, "segmentation": {"size": [566, 849], "counts": "emS:3ca02L3O1O1O00000000O102MjfZ4"}}, {"image_id": 154, "category_id": 2, "bbox": [127.50254821777344, 201.91860961914062, 247.32408142089844, 187.5953369140625], "score": 0.10063160955905914, "association_id": 0, "segmentation": {"size": [566, 849], "counts": "VcW27Ya0o0VO5L1O00000000001O0O101O010O001O00001O00O100O101N1000001N101O10O01O0000001O0O1O101N101N101N101N2N2N2N3D>Ij]90VbF4N2N2N1O101N101N101O0010O0010O0000010O000001O0000001O0000100O001O010O00PNBhB?V=BkB=U=DjBoNT1UOQV`Y1"}}, {"image_id": 155, "category_id": 2, "bbox": [619.8195190429688, 1218.208740234375, 243.9122314453125, 94.537109375], "score": 1.0, "association_id": 3, "segmentation": {"size": [1536, 1883], "counts": "]hTm01l_15M2N2O0O101O0O100000001O0O10000000000000000001O0000000001O0001O0000010O0000000000000001O000000000O2WOAoaN?Q^1BnaN>R^1GhaN;W^1FhaN:W^1GiaN9W^1HgaN9Y^1GgaN9Y^1HeaN:Z^1K`aN6`^1e00000000001O0O10000O2O000O100O2O0O1O1O1O1O100N2O2K4G9O1O1O100000000001O01O0000000000O10001O000000001O001O000000001O00000000001O0O101O000000001O00000000001O00001O0O101O00001O0O2O1O000O101O00001O00001O000O2O000O101O0O10001O001O1O001O001O000O2O001O001O0O1000TOiNobNW1n\\1POnbNo0R]1VOjbNj0U]1YOjbNf0U]1]OibNc0W]1^OhbNb0W]1@hbN?Y]1AgbN?Y]1BebN?[]1BdbN>\\]1CbbN>^]1Q1100O10001N101O000O2O000O2O001N2O1N3M2N2O1N10001N2N4K3N2N2N1O2O1N3M3L4K7I4M2O2JiXm_1"}}, {"image_id": 155, "category_id": 1, "bbox": [545.9840087890625, 769.9006958007812, 206.720458984375, 497.69415283203125], "score": 1.0, "association_id": 3, "segmentation": {"size": [1536, 1883], "counts": "m^ni0f0T_1:G8I6L3L6J5I8H8J4L5L3M2N3K5K5L4M3M3M3M3L5J5L4M3M3M3M1O1L5M2M3O2N1N1O2N2N2O1N2O1O2M201N2O1O1O1O1N3N1M5K4L4M4M3M3N3M2M5L3M4K4M2M4K5L6I>A;F5K4M3M3N4K6J4M3L3M2N3L5K8F:G9G7J4L5J7G:H:F8I7I5K6J6J9Gb0^O:G5K4L3N2N3M4L2M4M1O2N2N3M2N2N2N1O1O0000001O00000001O000000001O001O1O2N1O3L4M2N2N2M4M4L6I7J4K4L3`MUnNfFmQ1T9`nNbFdQ1T9PoNZFWQ1`9]oNiElP1S:c2M3M3M2N3L3H9H7J7K5L5J6H8E:G:K4M2N3M2N3M2L4L5L3N3N1M4L4C=\\Oe0SNl1G:I6M4L3N2N1O2O1N2N2N2N2N2N2N3N2L6J8Gb0QOcTnd1"}}, {"image_id": 155, "category_id": 2, "bbox": [927.384765625, 1039.760498046875, 149.80224609375, 47.9730224609375], "score": 0.9999998807907104, "association_id": 4, "segmentation": {"size": [1536, 1883], "counts": "g`b[12m_12O1N2O1O0O2O001O001O00001O10O01O00001O1O00001O001O001O000O1O2O0000001O001O00001O00010O0000100O001O001O1O10O01O00100O001O00000000010O000001O00000010O0001O001O0000000O10001O000000001O000000001O00000001O01O00000001O01O000001O000001O0001O00000000001O01O00000000001O000000001N1O2N3M3@a`N010O3VnSV1"}}, {"image_id": 155, "category_id": 1, "bbox": [1122.0748291015625, 690.3267822265625, 100.2581787109375, 83.8560791015625], "score": 0.9999998807907104, "association_id": 5, "segmentation": {"size": [1536, 1883], "counts": "[fld12l_1k0UO:G7I6K5J2O1O001N100O100O1O101N10O010O10O101O00O01000O010O010O10O10O10000001O000000000000001O010N010000000010O0000O1001O1O001O010O00001O00001O1O100O1O1O1O1O2N1O2N1O1O1O8H4L8H6I7J5K2M7HWhnn0"}}, {"image_id": 155, "category_id": 2, "bbox": [1370.8046875, 836.4485473632812, 193.5426025390625, 27.618896484375], "score": 0.9999992847442627, "association_id": 2, "segmentation": {"size": [1536, 1883], "counts": "djXQ22n_11N2O0O101N10001N100O1N3N1O100O1O1000000O101O00000000000000000O101O00000000000000001O00000000000000000000000000001O0001O00000O10000001O000000000000000000000001O00000000001O0O2O1O1O001O1O001O001O00001N1000000O2O000000000000001O0O10000000000O100000000000000000O100000000O100O1O010O100O100000O01000000000000000000000000000000000O2O00000O10001N2Lcem>"}}, {"image_id": 155, "category_id": 2, "bbox": [1554.287109375, 809.8389892578125, 209.4998779296875, 23.12176513671875], "score": 0.9999936819076538, "association_id": 1, "segmentation": {"size": [1536, 1883], "counts": "[YmX29f_12O001O0000000000001O00000001O0001O0001O00010O1O1O00100O1O1O001O01O01O00001O01O0000000000001O00000O10001O0000000O10000000000000000000001O000O100000000000000000000O10000000000O100O10000O100000000O10000000000000000000000000000000O100000000000001O00000000001O000000001N1000001O00001O0000001O0000001O0000001O0000001O0000000O1000000000000000O10000O1000000O1000O100000O10000000000O100000000000000000000000000000O101O1O0N^Vc5"}}, {"image_id": 155, "category_id": 2, "bbox": [1053.0335693359375, 793.6410522460938, 263.82666015625, 94.49688720703125], "score": 0.999612033367157, "association_id": 5, "segmentation": {"size": [1536, 1883], "counts": "UY]b11l_1301N10001O001N101O000UbNJl[16TdNJl[16TdNJk[17UdNIk[17TdNJl[16TdNJl[16TdNKj[16VdNJj[16VdNJj[16UdNKk[15UdNKk[15UdNKk[14VdNMi[13WdNMi[13WdNMi[12XdNNh[12XdNOg[10YdN1g[1OYdN1f[10ZdN0f[10ZdN1e[1OZdN3e[1M[dN4d[1L\\dN4d[1L\\dN8_[1IadN8^[1HbdN8^[1HadN:^[1FbdN:^[1EcdN;][1EcdN;][1EcdN;][1EcdN;][1EcdN<][1@fdN`0Z[1_OgdNa0Y[1^OhdNb0X[1^OgdNd0X[1\\OhdNd0W[1]OidNc0W[1]OidNc0W[1]OhdNd0W[1]OidNc0W[1]OidNc0W[1^OhdNb0X[1^OhdNb0X[1^OgdNc0Y[1]OgdNc0Y[1]OgdNc0Y[1]OgdNc0Y[1]OfdNd0Z[1]OedNc0[[1]OedNc0[[1]OddNd0\\[1\\OddNd0\\[1]ObdNd0^[1\\OadNe0_[1\\O[dNHdNl0Q]1]OYdNi0g[1WOXdNj0h[1WOVdNj0j[1VOUdNk0k[1VOSdNj0n[1WOPdNj0P\\1WOncNj0S\\1VOlcNj0T\\1VOlcNj0U\\1VOjcNj0W\\1VOhcNj0X\\1VOhcNj0Y\\1VOfcNj0Z\\1VOecNk0[\\1VOdcNj0\\\\1VOdcNj0]\\1VObcNj0^\\1VObcNj0^\\1WOacNi0`\\1VO_cNk0a\\1VO^cNj0c\\1UO]cNj0d\\1WO[cNi0f\\1VOYcNk0g\\1VOXcNj0i\\1UOWcNk0i\\1VOUcNk0k\\1VOTcNj0l\\1WOScNi0n\\1VORcNj0o\\1VOPcNj0Q]1UOobNk0Q]1VOnbNj0S]1VOlbNj0U]1UOkbNk0U]1VOjbNj0W]1UOhbNl0X]1TOhbNl0Y]1TOebNm0[]1SOebNm0[]1TOcbNm0^]1RObbNn0^]1SO`bNn0`]1SO^bNn0c]1RO[bNo0e]1f0001O0O2O1O1O001O001O001O1O001O001N101O00001O0O2O1O001O001O001O0O10001O000000001O00001O00001O0000001O0O2O001O00001O000O2O001O001O00001O0O101O1O1O001O001O00001O00001O001O00001O00001O00001O00001O00001O00000O2O00001O00001O000000001O00001O0O101O000O101O0O2O3KPU`j0"}}, {"image_id": 155, "category_id": 2, "bbox": [753.2446899414062, 933.213134765625, 139.0330810546875, 19.16131591796875], "score": 0.9947924017906189, "association_id": 0, "segmentation": {"size": [1536, 1883], "counts": "\\]iS15h_14N1N201O00000O100000001O00000001O00000000001O000000001O00000O1000001O000000000O1000000000000000000000000000000001O0000000000000000001O0000000000000000O1000001O00000O100000000000000O100000001O000000O1001O000000000000000O2O00000000000O2Ocbl^1"}}, {"image_id": 155, "category_id": 2, "bbox": [1145.5257568359375, 761.494873046875, 83.02685546875, 13.84417724609375], "score": 0.08648130297660828, "association_id": 0, "segmentation": {"size": [1536, 1883], "counts": "PX^f12n_1000000001O0O10000001O00000001O00O10000000000000000000001O0O100000oWWP1"}}, {"image_id": 156, "category_id": 1, "bbox": [147.24728393554688, 35.24049377441406, 205.8394775390625, 484.41253662109375], "score": 0.9999996423721313, "association_id": 2, "segmentation": {"size": [533, 665], "counts": "gn_2:n?c0E;F8I6J5M4K5L4L5K4L3eCfMV:]2^EQN^:Q2\\EUNa:o1WEWNh:l1oD[No:g3N2N2N2M2M2gKhJXK;TOR5S5iK`J2OZ4_5b4O2N2O001N101N1N2O2N2O0010O01RNZElMg:Q2cEhM\\:X2jEbMW:]2oE]MQ:c2RFZMo9f2RFXMn9h2UFUMk9l2WFPMk9o2WFoLi9R3YFhLj9Y3WFbLl9_3WFZLk9h3WFPLn9Q4Y12O0PNoK]GR4_8VL\\Gk3`8]L[Gd3b8bLYG`3d8fLXG[3d8QMRGQ3l8XMkFj2S9]2N2O1O1O1O1N2N2O1N2O10000000000001O1O2N4L4L4L5K4M2M4L5KN2N3N100O100O1O1O1O1001O0TL^OeGb0X8FcG:[8JcG6\\8LcG5\\8LcG4^8LaG4_8M`G3a8N]G2d8OZG1f81XG0h80WG0i81VGOl80SG0o8OPG1S9NkF3W9MfF3\\9LcF4^9M`F3a9M^F4b9K^F5d9JZF8f9HXF;>QOU6e0ZI<2E]60]Ia0B0Q7AYIc0_O1X7]OUIf0^O1\\7[OSIT1POCm7]OmHU1fNK]8XOZG\\O:i1BKj8]500000000O10O10O0100O000O0O1N3K5L5M2O2N2M3G9kNU1N2O002N1N2M3M3M3N2N3N2M4L5J:C:H7J4M4K5F:mNS1E:K5L4M2N2N2L4M3N2O1O0O2O0N200O100000000O1O2O0010O00100N101N2O010OO2N2O001O1O100O001O1N2N1O2O0000N20O1N2010O1O100O1O001N200000000O100001N4L6Ijaa0"}}, {"image_id": 156, "category_id": 2, "bbox": [410.8359375, 373.2018737792969, 96.57757568359375, 40.51971435546875], "score": 0.9999878406524658, "association_id": 1, "segmentation": {"size": [533, 665], "counts": "T^i64]`04O1O100O2O00000000000@Ef@;Z?Ef@;Z?Fe@:[?Gd@9\\?Gd@9\\?Hc@8]?Hc@8]?Ib@7_?Ha@8_?I`@7`?I`@7a?H_@8a?H_@8a?I^@7b?I^@7c?I\\@7d?I[@8f?GZ@8g?IX@7i?HW@8i?IU@5o?62000001O00001O01O01O00001O00010O010O00010O00010O00010O01O010O00001O1O01O01O01O0001O01O01O00O2O0N201N2M3O1MW]c2"}}, {"image_id": 156, "category_id": 2, "bbox": [165.32443237304688, 427.0738525390625, 122.19378662109375, 82.46170043945312], "score": 0.9999825954437256, "association_id": 2, "segmentation": {"size": [533, 665], "counts": "mjf2;Y`06K01O00m_OCn?>Q@Cn?c0O000O2O00O100O0BV@3j?LY@1h?Ma0O100000000000000000000010O000000001O001O000O10001O000000001N101O0O2O001N2O0O2M3]@]OP?g0h@EQ?Q1M3N4K3N1O2N2O2N1O001O2N001O001O1O1O0000100O0100O1O010O2N4M2M2N5K8H5J3N2M4J5K302M4K8B\\f^6"}}, {"image_id": 156, "category_id": 1, "bbox": [297.74853515625, 149.50595092773438, 76.82855224609375, 227.94528198242188], "score": 0.9995695948600769, "association_id": 3, "segmentation": {"size": [533, 665], "counts": "\\`Q56\\`05L4M6J8H4M3[DSO\\7Y1RHUOf7W1kEYNk0k0T9S1]EbNa0_OHS1W:S2cEoNX:j3M4Lj0VO1O1O00000000000002N2N2N3Me0]MfEaM[:^2kE\\MV:b2RFWMn9i2VFSMj9n2YFnLh9Q3[FlLe9T3_FhLa9Z3eF]L]9d3jFSLW9m3lFnKW9Q4h1OO3N0O2OO101001O0OiNhCQNWJ^nA1O1O000000000000000000000000000000000000000000000001NSRf4"}}, {"image_id": 156, "category_id": 2, "bbox": [287.9075012207031, 365.452392578125, 49.46136474609375, 19.03985595703125], "score": 0.9109537601470947, "association_id": 0, "segmentation": {"size": [533, 665], "counts": "bXf42b`04L4M1O1O000000001O1O001O1O0000000000000000000000000000N201N1O1M6IcUb5"}}, {"image_id": 156, "category_id": 2, "bbox": [340.0400695800781, 369.1468200683594, 37.864990234375, 6.997833251953125], "score": 0.5633296966552734, "association_id": 0, "segmentation": {"size": [533, 665], "counts": "n_e54a`01O00000000000000000000000000000000000000000000000001O00]ae4"}}, {"image_id": 156, "category_id": 2, "bbox": [308.3076171875, 367.25531005859375, 67.78512573242188, 9.643768310546875], "score": 0.11158136278390884, "association_id": 0, "segmentation": {"size": [533, 665], "counts": "eeP57]`02O000000000001O0000000N3KbP=0aoB2O1O1O000000000000000000000000000000000000000000000001ORRf4"}}, {"image_id": 157, "category_id": 1, "bbox": [2025.5062255859375, 751.7357788085938, 269.5709228515625, 115.24334716796875], "score": 1.0, "association_id": 1, "segmentation": {"size": [1728, 2304], "counts": "ihU[33ie16[ZNH[e1c0J9I4L4L3M2O1J6O1N3M3M3N1N2N2O0O101N101N2O2M2O1N101O001N2O1N3N2M2O1O001O0O101O001O001O000O10000O10O10O1000O1000O1000O100000000O10000O1O100O100O100000000O100000000O100000000001O000000000000001O00000000000000000000001O0000000000010O00001O1O00010O00001O1O1O001O1O00010O001O001O001O010O000000001O0000000O100000000000O100000000O10000O10000O1000000O1000000O100000001O0O10000000001O0O100000010O0000001O0000O10000000000O10001O01O01O01O01O0000010O00001O1O001O001O00000001O001O00001O00000000001O0000001O1O1O1O1N4M4L1O1N2O1O2M3M3M:ES]>"}}, {"image_id": 157, "category_id": 1, "bbox": [536.3091430664062, 1052.4306640625, 324.75531005859375, 402.816162109375], "score": 1.0, "association_id": 3, "segmentation": {"size": [1728, 2304], "counts": "^h^l0_1_d17J4L5J5L4K5K6I6U`N[MR\\1i2kcNYMS\\1j2kcNXMR\\1k2lcNVMR\\1m2lcNTMS\\1n2lcNSMQ\\1P3mcNQMR\\1P3QdNlLo[1V3UdNdLk[1]3[32N2N2O1N2N2O1N2O1N2N1N3N2M2N3N1N3N1O2O0O2N2M4M2M6I:G=C?A9G6K4K5L3M4K4L4M2M4K4M3M4M2N2N101N2N1O2O2M2N2N2M3N2dcN`GU[1b8ddNeGZ[1\\8idN`GW[1`8QeNXGoZ1h8U1O010O0010O01O10O01O001O00010O0001N2O001O10O01O100O100O10000O010O1O1O1N2N3L3M3N2N2N2O1N2O1O1N1O2N2N2M3O1N2O001O100O010O010O0010O010O00010O01O1O001O10O0100O0100000001O00000000000000000000000O1000000O1000001N2O1N102M2N2N2N1O2N1O2O1N101O1N2O1O1O1N3N1O2N1O2N2N2N4aG`cNV7m]1G3N2N1O1O1O001O1O1O1N3N1O2N1O0O2O1O0000000O10001O0000000000000O1000000O10000O100O11O01O01O001O001O01O01O0100O11O1O4L3N4K8GWNgaNTLQ^1c3\\bN[Lb]1b3bbN_L\\]1^3hbNaLW]1]3mbNcLR]1Z3RcNgLm\\1S3YcNmLf\\1n2`cNRM`\\1g2gcNYMY\\1`2ncN_MS\\1\\2RdNdMm[1Y2VdNhMi[1V2ZdNjMe[1T2]dNmMb[1Q2`dNPN_[1n1cdNoM`[1o1cdNnM^[1Q2fdNkM][1R2fdNdL_Mf0n]1c2YeNWMjZ1e2]eNTMhZ1h2^eNQMgZ1l2X4N2N2N2N2N101M2O2M3M3L4M3M3N2N3M2M4L4J7G9@\\^d\\2"}}, {"image_id": 157, "category_id": 2, "bbox": [616.8422241210938, 1390.3458251953125, 462.18243408203125, 136.433349609375], "score": 1.0, "association_id": 3, "segmentation": {"size": [1728, 2304], "counts": "mojP13je14N2N2O0000000O2O0000000O10001O000O100000001O0000001O00000T]NBV`1>e_NHZ`18d_NK[`15d_NM[`14d_NM[`13e_NMZ`14e_NNZ`12f_NNZ`12f_NM\\`12d_NN\\`12e_NL\\`15c_NK]`15c_NJ^`16b_NI_`17a_NI_`18`_NGa`19__NFb`1:n]N]Og08\\a1;l]N@f04_a1Z`1\\2]`NeMb_1Z2^`NhMa_1X2]`NkMa_1Y2\\`NiMa_1Y2S`NSNm_1n1Q`NSNn_1n1Q`NSNo_1m1Q`NQMYOi0f`1W2P`NoL\\Oh0e`1[2n_NkL^Oj0d`1\\2X`NbMg_1b2W`N\\Mj_1m2`_N^L0c0a`1R3Z_N^L5>b`1a3\\_N`Ld`1]41O100001O0000001O001O001O001O0010O00001O1O100O2N2N3M4L2N002N1O1O001O2N2N2N1O2N1O2N001O2N2N1O1O1O1O1O1SOS^NeMna1W2V^NgMla1S1Z^NjNO2ga1R1_^NeN06da1R1`_NhNd`1U1U2N2O1N3M3L5H8Kggmi1"}}, {"image_id": 157, "category_id": 1, "bbox": [1821.4375, 947.1533813476562, 220.731689453125, 260.83502197265625], "score": 0.9990227222442627, "association_id": 0, "segmentation": {"size": [1728, 2304], "counts": "YkXP32nab01nS_O3M3N2M2O1N1000000O10000O1O2K4E;jNXO`\\N\\1Pc1R1N2M4N10OO2O1M3N1N3O1N2N2\\LfLXbN`0>l2Z]1bN]bNc1b]1jNkaN]1T^1iN`aN^1`^1Q3O10O10O1000O010000O1N2O2M2O100O2N100O2O0O2N1O1O1O2N10O0100O1O100O10000O1O2O0O1O100000000O10000000000000001O0O10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001O00000000000000001O00001O00001O001O0O2O00001O0O10000O2O000UMebNPM\\]1g2PcNVMQ]1b2YcNZMi\\1b2]cNZMd\\1X2ncNcMT\\1V2VdNeMl[1f1mdNTNV[1]1[eN^NiZ14eaNJh3MhZ1JWbNKW37gZ1HQgNNXY1KPhl="}}, {"image_id": 157, "category_id": 1, "bbox": [1312.5277099609375, 812.5801391601562, 100.3184814453125, 136.240966796875], "score": 0.9987919926643372, "association_id": 0, "segmentation": {"size": [1728, 2304], "counts": "j`XU21e0`0=@Wb1a0i\\NP1;hNfb18o\\No0W[N@jd1?<00O1O100O10000O1O10000O1O1O100O101N1000000O10000O1O10000O100O2OkXe`3"}}, {"image_id": 157, "category_id": 2, "bbox": [944.9281616210938, 940.1427001953125, 342.27862548828125, 22.31201171875], "score": 0.11868377029895782, "association_id": 0, "segmentation": {"size": [1728, 2304], "counts": "dYma111100ee1:N00000NE_ZN<`e12000000000000000000000000001O00000000001O00000001O0000000001O00000000001O001O001O1O001O1O00000000001O001O001O00001O00000000000000000000O1000000000001N1000000O1O100000000O100O100O100N200O1O100000000O10000O10000O100000000000000000000O10000000000000000001O000000000000000000001O001O00001O001O0000001N1000001O00001O00000000001O000000000000001O00O1000000O10O01000000O10000O10000O10000O100O1000000000000000001O0000000001O000000001O001O0000001O0000000O1000001O0000000000000000O1000O1000O100000000O1000000O01000MEaZN;_e1EaZN;_e1E`ZN<`e1D`ZN<`e120000000000O01000000000000000000000000000000000000000000000000E`ZN5ae1JbZN4^e1LcZN3]e1McZNNL3ae1OfZNNI0ae12fZNN\\e1290000000001O0000001O00blUg1"}}, {"image_id": 157, "category_id": 1, "bbox": [916.1583251953125, 850.8192749023438, 51.56024169921875, 97.64801025390625], "score": 0.11673988401889801, "association_id": 0, "segmentation": {"size": [1728, 2304], "counts": "hQc`18ce1;G8D?F8E9G=B9M3c\\N^MUc1h2N101O1O0000010OO2N2O2N2M2N3M5J5K4SNZ\\N[1kc1_NY\\N^1Vd1N3M4L2L4L9E7G;JeUPW2"}}, {"image_id": 157, "category_id": 2, "bbox": [938.5022583007812, 942.8829956054688, 198.27789306640625, 18.9149169921875], "score": 0.061046164482831955, "association_id": 0, "segmentation": {"size": [1728, 2304], "counts": "gmia12ke1OWZN2he14N101O000000000N20000000000O10000000001O000O101O000000000000000001O01O00000001O001O1O001O00001O1O1O1O00001O001O001O1O00001O00001O0000000000000001O0O100O100O10000O10000O100O10000O1O100N200O10000O10000O10001N1000000O1000000000000000000000000000000000O100000000000000000001N100000001O0000001O000000001O00001N100000000000001O0000001O00001O0000000O2O001O001O1NVZVn1"}}, {"image_id": 157, "category_id": 2, "bbox": [1041.074951171875, 944.3167114257812, 198.1920166015625, 18.32257080078125], "score": 0.06052294373512268, "association_id": 0, "segmentation": {"size": [1728, 2304], "counts": "fcmf18fe13N2N10000000000O2O000000O10000000000000O1000000000000000000001N10000000000000000000001O0000000000001O000000000000000000001O0000000000001O1O00001O00001N1000001O000000O100000000O100O1O1O1O100O100O2O000O10000000000000000000000000000001O000000000000001O001O002N00001O00001O001O0000001O000O100000O1O1O100O100O100O00100O1000O10000000000O100000000000O01010O000000000000O100HZZN6fe1JZZN6fe1JZZN6ee1K\\ZN0O0ge1OZZN1O0ge1OZZN010ee107000_f\\h1"}}, {"image_id": 158, "category_id": 1, "bbox": [457.51861572265625, 431.6331481933594, 190.746337890625, 183.57632446289062], "score": 0.9999998807907104, "association_id": 2, "segmentation": {"size": [768, 1024], "counts": "oog:i2Re09J4N1O1O1O2N1O0O20O010O000010O0001O001O001O00O100O100O1O100O10O01O1O1O010O01N1O101N012N2N2N2N2M3O0O2O001O0000001OO101O0O2O001N101O0O101O000O2O0O101O1O0O2O001O00001N10000O1O1O1O100O10O00000001N110O001N2O0O2O010O0O100O2O00100O1N2O1O1O100O1O1N2O1O1O1N2L5L3N3M3M3N1O2O1O1O1O2N1O1O100001O2^MW]OHmb02Z]OHjb02Y]ONgb01Z]ONib0NY]O1jb0JY]O5lb0DW]O;nb0^OU]Oa0nb0[OT]Od0mb0ZOU]Oe0lb0YOU]Oh0kb0VOW]Oi0kb0UOU]Ok0Qc0nNP]OR1Sc0kNm\\OU1Tc0iNm\\OW1Tc0hNl\\OX1Tc0gNm\\OY1Tc0fNl\\OZ1Vc0dNj\\O\\1Xc0bNh\\O^1Zc0_Ng\\Oa1Zc0^Nf\\Ob1[c0\\Nf\\Od1\\c0YNf\\Of1]c0SNg\\Om1fd001O00001O1O1O1O1O1O1O001N3N2N3M3L3N2M4Fa0@l]i8"}}, {"image_id": 158, "category_id": 1, "bbox": [664.724365234375, 419.51934814453125, 227.10943603515625, 180.093017578125], "score": 0.9999998807907104, "association_id": 1, "segmentation": {"size": [768, 1024], "counts": "cYi?4ig08I3N2N2M2O3oNDVZOa0ee0P1L3N3N1O2O0O2O1N2O1O0O2O001N2O1O2M3N1O1N2O1O001N101O000O1000000O1000000O11O001O00001O001O000O2N2M2L5M2O1O2O000O1000000O10000001O00000O10001N100O2N100O2O1O0O2O001O0O101O0O100O1M3M3N2N2O1O0O2N2M2M4M2gNaLQ^Oa3ka0eLQ^O\\3oa0fLo]O[3Qb0fLl]O[3Tb0hLh]OY3Xb0jLd]OX3Zb0lL^]OY3bb0R11N110O1O2O0O2N2N2N1O2O1O1O8I7H100O1O100O2O002N1O1O010N1000001O100O000O10001N2O1N1gMe[Ol0[d0QOi[Om0Xd0QOk[Om0Vd0ROk[On0Td0QOn[On0Td0nNo[OQ1Sd0jNQ\\OU1Qd0fNS\\OY1oc0cNU\\O[1mc0aNV\\O^1lc0_NV\\O`1lc0\\NV\\Od1Se001O00000000001O00000000000000000000001O01O000001N2O1O001O001O001O001N2O1O2M2N2L4M3K6H8Ff^X3"}}, {"image_id": 158, "category_id": 2, "bbox": [177.74232482910156, 606.6630249023438, 288.57684326171875, 24.199951171875], "score": 0.9999619722366333, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "_SQ51og0000N4L2M4N1O1O2O0O1O100N2000000O1000000000000000000O100000000000000000000000000001O0000001O0O101O00000000000000000000001O00000000000O1000001O0000000000000000000000000000001O000000000000000000001O00000000000000000000000000000000000000000000001O00000000000O10000000000000000000000000000000000000000O10000000000000000000000000000000000000001O0O1000000000000000000000000000000000001O000000000000000000000000000000000000000000000O100000000000000000000000000000000000000000000O10000000001O00000O2O0000eTT="}}, {"image_id": 158, "category_id": 1, "bbox": [144.5557403564453, 398.6746826171875, 167.7925262451172, 214.4140625], "score": 0.9999431371688843, "association_id": 3, "segmentation": {"size": [768, 1024], "counts": "\\Qa31Xg0R1SOe0G8I6I6K6M3M3M4M2O1N2O0O2O1N2O1O2M2O0O2O0O1O1O100O1O1O1O0O2M2O1O4K4J7\\\\OTLka0d5C=N2M2M3O1O100O10000000000000000000000000O100lNW_OPKj`0j4i_OhJX`0V5Z1O100O1O1N2O1O1000001O000001O1N2O2N001O1O1O2O1N1O1O1O2M5L4L1O2N0001O01O00000000000000O101N2lJk]O[4Xb0YKX^O_4la0[KY^Ob4ja0ZKZ^Oc4cb0N2O2N1N2O1O1O2N3N1N1O2O001O2N2N1N1000002N2O0O001N3M3N;fLk[OQ2Se0O100O1O1O2N1O010O000001O01O001N3N2M2O1O1N3Lo^e`0"}}, {"image_id": 158, "category_id": 2, "bbox": [472.6575622558594, 604.6875610351562, 171.15652465820312, 15.77227783203125], "score": 0.9998049139976501, "association_id": 2, "segmentation": {"size": [768, 1024], "counts": "SSf;3mg0000O10000000000O2O000000000000000O100000000000001O000000000000000000000000000010O00000000000000O10000000000O10000000000O100000000000000000000000001O00000000000000000000000000000001O00000000100O001O00001O001O001O00000O2O1Oile9"}}, {"image_id": 158, "category_id": 2, "bbox": [620.0040893554688, 599.2055053710938, 400.53375244140625, 27.41217041015625], "score": 0.9991825222969055, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "WcS?1mg00TXO0lg02N200000000O101O00000000000000000000000000000000000000001O000000001O000000000000001O0000000000001O00000000000000000000000000000000000000000000001O00000000000FGmXO9Sg0GnXO8Rg0HnXO8Rg0HnXO8Rg0HnXO8Rg0HnXO8Rg0HnXO8Rg0HnXO9Qg0GPYO8Pg0HPYO8Pg0HPYO8of0IRYO6nf0KQYO5of0KQYO5of0KQYO5of0KQYO5of0KQYO5of0KQYO5of0KRYO4nf0LRYO4nf0LRYO4nf0LRYO4nf0LRYO5mf0KSYO5mf0KTYO4lf0MSYO3mf0MSYO3mf0MSYO3mf0MSYO3mf0MSYO3mf0MSYO3mf0MSYO3mf0MSYO3mf0MSYO3mf0MSYO3mf0MSYO3mf0MSYO3mf0MTYO2lf0NTYO2lf0NTYO2lf0NTYO2lf0NTYO2lf0NTYO2lf0NTYO2lf0NUYO2jf0NVYO2jf0NVYO2jf0NVYO2jf0NVYO2jf0NVYO2jf0NVYO2jf0NVYO2jf0NVYO2jf0NVYO2jf0NVYO2jf0NVYO2jf0NVYO2jf0NVYO2jf0NVYO2jf0NVYO2jf0NVYO2jf0NVYO2jf0NWYO1if0OWYO1if0OWYO1if0OWYO1if0NXYO2hf0NXYO2hf0NXYO2hf0NXYO2hf0NXYO2hf0NXYO2hf0NYYO1gf0OYYO1gf0OYYO1gf0OYYO1gf0OYYO1gf0OYYO1gf0OYYO1gf0OYYO1gf0OYYO1gf0OYYO1gf0OYYO1gf0OYYO1gf0OYYO1gf0OYYO1gf0OYYO1gf0OYYO1gf0OYYO1hf0NXYO2hf0NXYO2hf0NXYO2hf0NXYO2hf0NXYO2if0MWYO3if0MWYO3if0LXYO4[g0O0000000000000000000000000000000000000000000000000000001O000000000000000000000000000000000000000000000000001O]O0VYO0gf04XYOLhf04XYOLhf04XYOKif05WYOKhf06XYOJhf06XYOJhf06XYOJhf06XYOJhf06XYOJhf06a0000000000000000000000000000000000000001O000000000000000000000000000000000000000000000000000000001O0000000000000000000000000001O000000000000000000000000010O00000000000000001O0000000000000000000000000000000000001O0000000000000000000000000000000000001O0000000O2O0O2OR]2"}}, {"image_id": 158, "category_id": 2, "bbox": [657.7098388671875, 593.8565673828125, 360.61712646484375, 22.132568359375], "score": 0.9961466789245605, "association_id": 1, "segmentation": {"size": [768, 1024], "counts": "Tka?1ng010000000000O1000000000001O00000000002N0000000000000000000000000000000000000001O0000000000000000000000000000000000001O00EMiXO3Wg0MiXO3Wg0NhXO2Xg0NhXO2Wg0OiXO1Wg0OiXO1Wg0OiXO1Vg00kXONVg03iXOMWg03iXOMVg04jXOLUg05kXOKUg05lXOJSg07;0O1000001O000O1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000O100000000000000000000000000000000000000000001O0000000000000000001O0O105KShT1OmWkN2J500O100000001N10000000000000000000000000000000000000000000001O00000000000001O000000000000000000000000000000000001O0000000000000000000000000001O000000000000000001O01O00000000001O0000000000001O000000000000001O0000000000000000000000000000001O000000000000000000000000000000001O000O2O0OTm3"}}, {"image_id": 158, "category_id": 2, "bbox": [238.84275817871094, 587.1688232421875, 230.07859802246094, 17.37176513671875], "score": 0.9949349761009216, "association_id": 3, "segmentation": {"size": [768, 1024], "counts": "_Ri52mg01O2O000O100000000000O100000000001O000000000001O001O0010O0002MSPh01moWO0O1L4O100O100000000O100000000000001O000000000000000000000000000000000000000000001O000000000001O00000000000000000000000000000001O000001O00000000000000001O00000000001O000000000000001O0000001O0000001O000000001O0000000000001O00000000000000000001O00000000000000000000000001O0O1000001O0O[]\\="}}, {"image_id": 158, "category_id": 2, "bbox": [480.999267578125, 496.84979248046875, 181.7978515625, 122.7357177734375], "score": 0.18828992545604706, "association_id": 0, "segmentation": {"size": [768, 1024], "counts": "PSU<1og0001N10000000001O00000000000000010O001O000000001OO1000000O2MQh02oWO1O1O0O100001N100O1OQPb[OFZd0;e[OIWd09\\[O^OnM;cf09_[O^OkM[d0K][O9`d0H^[O<^d0E`[O>_d0C_[O>`d0C_[O?_d0C_[O>ad0C^[O>`d0C_[O>`d0D][O>cd0BZ[Oa0ed0AX[Oa0gd0@nZOl0od0^2O1N2N2O1O1O100O1O1O1O1O1O100O10000O10000O10O0100O100O10O0100000O1O1N2L4N1O2N2O1O1O1O1O100O1O100O100O1000000O100000000000000000000000000001O00001O0000000000001O0000000000000000001O00000000O1000000O100O1O1N2M3Dlf0_OXYO?hf0BVYO?kf0e1001PNRYO7of0HQYO8of0GSYO8nf0GRYO9of0FQYO:Qg0DoXO= buffer_size: frame = frame_data.popleft() predictions = self.predictor.get() yield process_predictions(frame, predictions) while len(frame_data): frame = frame_data.popleft() predictions = self.predictor.get() yield process_predictions(frame, predictions) else: for frame in frame_gen: yield process_predictions(frame, self.predictor(frame)) class AsyncPredictor: """ A predictor that runs the model asynchronously, possibly on >1 GPUs. Because rendering the visualization takes considerably amount of time, this helps improve throughput when rendering videos. """ class _StopToken: pass class _PredictWorker(mp.Process): def __init__(self, cfg, task_queue, result_queue): self.cfg = cfg self.task_queue = task_queue self.result_queue = result_queue super().__init__() def run(self): predictor = DefaultPredictor(self.cfg) while True: task = self.task_queue.get() if isinstance(task, AsyncPredictor._StopToken): break idx, data = task result = predictor(data) self.result_queue.put((idx, result)) def __init__(self, cfg, num_gpus: int = 1): """ Args: cfg (CfgNode): num_gpus (int): if 0, will run on CPU """ num_workers = max(num_gpus, 1) self.task_queue = mp.Queue(maxsize=num_workers * 3) self.result_queue = mp.Queue(maxsize=num_workers * 3) self.procs = [] for gpuid in range(max(num_gpus, 1)): cfg = cfg.clone() cfg.defrost() cfg.MODEL.DEVICE = "cuda:{}".format(gpuid) if num_gpus > 0 else "cpu" self.procs.append( AsyncPredictor._PredictWorker(cfg, self.task_queue, self.result_queue) ) self.put_idx = 0 self.get_idx = 0 self.result_rank = [] self.result_data = [] for p in self.procs: p.start() atexit.register(self.shutdown) def put(self, image): self.put_idx += 1 self.task_queue.put((self.put_idx, image)) def get(self): self.get_idx += 1 # the index needed for this request if len(self.result_rank) and self.result_rank[0] == self.get_idx: res = self.result_data[0] del self.result_data[0], self.result_rank[0] return res while True: # make sure the results are returned in the correct order idx, res = self.result_queue.get() if idx == self.get_idx: return res insert = bisect.bisect(self.result_rank, idx) self.result_rank.insert(insert, idx) self.result_data.insert(insert, res) def __len__(self): return self.put_idx - self.get_idx def __call__(self, image): self.put(image) return self.get() def shutdown(self): for _ in self.procs: self.task_queue.put(AsyncPredictor._StopToken()) @property def default_buffer_size(self): return len(self.procs) * 5 ================================================ FILE: projects/LISA/train_net.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ Detection Training Script. This scripts reads a given config file and runs the training or evaluation. It is an entry point that is made to train standard models in detectron2. In order to let one script support training of many models, this script contains logic that are specific to these built-in models and therefore may not be suitable for your own project. For example, your research project perhaps only needs a single "evaluator". Therefore, we recommend you to use detectron2 as an library and take this file as an example of how to use the library. You may want to write your own script with your datasets and other customizations. """ import logging import os from collections import OrderedDict import torch import detectron2.utils.comm as comm from detectron2.checkpoint import DetectionCheckpointer from detectron2.config import get_cfg from detectron2.data import MetadataCatalog from detectron2.engine import DefaultTrainer, default_argument_parser, default_setup, hooks, launch from detectron2.evaluation import ( CityscapesEvaluator, SOBAEvaluator, DatasetEvaluators, LVISEvaluator, PascalVOCDetectionEvaluator, SemSegEvaluator, verify_results, ) from detectron2.modeling import GeneralizedRCNNWithTTA import os os.environ['CUDA_LAUNCH_BLOCKING'] = "1" from detectron2.data.datasets import register_soba_instances register_soba_instances("soba_cast_shadow_train_full", {}, "../../../dataset/SOBA/annotations/SOBA_train_relation.json", "../../../dataset/SOBA/SOBA/") register_soba_instances("soba_cast_shadow_val_full",{},"../../../dataset/SOBA/annotations/SOBA_val_v2.json","../../../dataset/SOBA/SOBA/") from LISA import add_lisa_config class Trainer(DefaultTrainer): """ We use the "DefaultTrainer" which contains a number pre-defined logic for standard training workflow. They may not work for you, especially if you are working on a new research project. In that case you can use the cleaner "SimpleTrainer", or write your own training loop. """ @classmethod def build_evaluator(cls, cfg, dataset_name, output_folder=None): """ Create evaluator(s) for a given dataset. This uses the special metadata "evaluator_type" associated with each builtin dataset. For your own dataset, you can simply create an evaluator manually in your script and do not have to worry about the hacky if-else logic here. """ if output_folder is None: output_folder = os.path.join(cfg.OUTPUT_DIR, "inference") evaluator_list = [] evaluator_type = MetadataCatalog.get(dataset_name).evaluator_type if evaluator_type in ["sem_seg", "soba_panoptic_seg"]: evaluator_list.append( SemSegEvaluator( dataset_name, distributed=True, num_classes=cfg.MODEL.SEM_SEG_HEAD.NUM_CLASSES, ignore_label=cfg.MODEL.SEM_SEG_HEAD.IGNORE_VALUE, output_dir=output_folder, ) ) if evaluator_type in ["soba", "soba_panoptic_seg"]: evaluator_list.append(SOBAEvaluator(dataset_name, cfg, True, output_folder)) if evaluator_type == "soba_panoptic_seg": evaluator_list.append(SOBAPanopticEvaluator(dataset_name, output_folder)) if evaluator_type == "cityscapes": assert ( torch.cuda.device_count() >= comm.get_rank() ), "CityscapesEvaluator currently do not work with multiple machines." return CityscapesEvaluator(dataset_name) if evaluator_type == "pascal_voc": return PascalVOCDetectionEvaluator(dataset_name) if evaluator_type == "lvis": return LVISEvaluator(dataset_name, cfg, True, output_folder) if len(evaluator_list) == 0: raise NotImplementedError( "no Evaluator for the dataset {} with the type {}".format( dataset_name, evaluator_type ) ) if len(evaluator_list) == 1: return evaluator_list[0] return DatasetEvaluators(evaluator_list) @classmethod def test_with_TTA(cls, cfg, model): logger = logging.getLogger("detectron2.trainer") # In the end of training, run an evaluation with TTA # Only support some R-CNN models. logger.info("Running inference with test-time augmentation ...") model = GeneralizedRCNNWithTTA(cfg, model) evaluators = [ cls.build_evaluator( cfg, name, output_folder=os.path.join(cfg.OUTPUT_DIR, "inference_TTA") ) for name in cfg.DATASETS.TEST ] res = cls.test(cfg, model, evaluators) res = OrderedDict({k + "_TTA": v for k, v in res.items()}) return res def setup(args): """ Create configs and perform basic setups. """ cfg = get_cfg() cfg.merge_from_file(args.config_file) cfg.merge_from_list(args.opts) cfg.freeze() default_setup(cfg, args) return cfg def main(args): cfg = setup(args) if args.eval_only: model = Trainer.build_model(cfg) print(model.state_dict().keys()) DetectionCheckpointer(model, save_dir=cfg.OUTPUT_DIR).resume_or_load( cfg.MODEL.WEIGHTS, resume=args.resume ) res,rela = Trainer.test(cfg, model) # add rela if comm.is_main_process(): verify_results(cfg, res) if cfg.TEST.AUG.ENABLED: res.update(Trainer.test_with_TTA(cfg, model)) return res,rela """ If you'd like to do anything fancier than the standard training logic, consider writing your own training loop or subclassing the trainer. """ trainer = Trainer(cfg) trainer.resume_or_load(resume=args.resume) if cfg.TEST.AUG.ENABLED: trainer.register_hooks( [hooks.EvalHook(0, lambda: trainer.test_with_TTA(cfg, trainer.model))] ) return trainer.train() if __name__ == "__main__": args = default_argument_parser().parse_args() print("Command Line Args:", args) launch( main, args.num_gpus, num_machines=args.num_machines, machine_rank=args.machine_rank, dist_url=args.dist_url, args=(args,), ) ================================================ FILE: projects/LISA/utils.py ================================================ """ Mask R-CNN Common utility functions and classes. Copyright (c) 2017 Matterport, Inc. Licensed under the MIT License (see LICENSE for details) Written by Waleed Abdulla """ import sys import os import logging import math import random import numpy as np # import tensorflow as tf import scipy import skimage.color import skimage.io import skimage.transform import urllib.request import shutil import warnings from distutils.version import LooseVersion # URL from which to download the latest COCO trained weights COCO_MODEL_URL = "https://github.com/matterport/Mask_RCNN/releases/download/v2.0/mask_rcnn_coco.h5" ############################################################ # Bounding Boxes ############################################################ def extract_bboxes(mask): """Compute bounding boxes from masks. mask: [height, width, num_instances]. Mask pixels are either 1 or 0. Returns: bbox array [num_instances, (y1, x1, y2, x2)]. """ boxes = np.zeros([mask.shape[-1], 4], dtype=np.int32) for i in range(mask.shape[-1]): m = mask[:, :, i] # Bounding box. horizontal_indicies = np.where(np.any(m, axis=0))[0] vertical_indicies = np.where(np.any(m, axis=1))[0] if horizontal_indicies.shape[0]: x1, x2 = horizontal_indicies[[0, -1]] y1, y2 = vertical_indicies[[0, -1]] # x2 and y2 should not be part of the box. Increment by 1. x2 += 1 y2 += 1 else: # No mask for this instance. Might happen due to # resizing or cropping. Set bbox to zeros x1, x2, y1, y2 = 0, 0, 0, 0 boxes[i] = np.array([y1, x1, y2, x2]) return boxes.astype(np.int32) def compute_iou(box, boxes, box_area, boxes_area): """Calculates IoU of the given box with the array of the given boxes. box: 1D vector [y1, x1, y2, x2] boxes: [boxes_count, (y1, x1, y2, x2)] box_area: float. the area of 'box' boxes_area: array of length boxes_count. Note: the areas are passed in rather than calculated here for efficiency. Calculate once in the caller to avoid duplicate work. """ # Calculate intersection areas y1 = np.maximum(box[0], boxes[:, 0]) y2 = np.minimum(box[2], boxes[:, 2]) x1 = np.maximum(box[1], boxes[:, 1]) x2 = np.minimum(box[3], boxes[:, 3]) intersection = np.maximum(x2 - x1, 0) * np.maximum(y2 - y1, 0) union = box_area + boxes_area[:] - intersection[:] iou = intersection / union return iou def compute_overlaps(boxes1, boxes2): """Computes IoU overlaps between two sets of boxes. boxes1, boxes2: [N, (y1, x1, y2, x2)]. For better performance, pass the largest set first and the smaller second. """ # Areas of anchors and GT boxes area1 = (boxes1[:, 2] - boxes1[:, 0]) * (boxes1[:, 3] - boxes1[:, 1]) area2 = (boxes2[:, 2] - boxes2[:, 0]) * (boxes2[:, 3] - boxes2[:, 1]) # Compute overlaps to generate matrix [boxes1 count, boxes2 count] # Each cell contains the IoU value. overlaps = np.zeros((boxes1.shape[0], boxes2.shape[0])) for i in range(overlaps.shape[1]): box2 = boxes2[i] overlaps[:, i] = compute_iou(box2, boxes1, area2[i], area1) return overlaps def compute_overlaps_masks(masks1, masks2): """Computes IoU overlaps between two sets of masks. masks1, masks2: [Height, Width, instances] """ # If either set of masks is empty return empty result if masks1.shape[-1] == 0 or masks2.shape[-1] == 0: return np.zeros((masks1.shape[-1], masks2.shape[-1])) # flatten masks and compute their areas masks1 = np.reshape(masks1 > .5, (-1, masks1.shape[-1])).astype(np.float32) masks2 = np.reshape(masks2 > .5, (-1, masks2.shape[-1])).astype(np.float32) area1 = np.sum(masks1, axis=0) area2 = np.sum(masks2, axis=0) # intersections and union intersections = np.dot(masks1.T, masks2) union = area1[:, None] + area2[None, :] - intersections overlaps = intersections / union return overlaps def non_max_suppression(boxes, scores, threshold): """Performs non-maximum suppression and returns indices of kept boxes. boxes: [N, (y1, x1, y2, x2)]. Notice that (y2, x2) lays outside the box. scores: 1-D array of box scores. threshold: Float. IoU threshold to use for filtering. """ assert boxes.shape[0] > 0 if boxes.dtype.kind != "f": boxes = boxes.astype(np.float32) # Compute box areas y1 = boxes[:, 0] x1 = boxes[:, 1] y2 = boxes[:, 2] x2 = boxes[:, 3] area = (y2 - y1) * (x2 - x1) # Get indicies of boxes sorted by scores (highest first) ixs = scores.argsort()[::-1] pick = [] while len(ixs) > 0: # Pick top box and add its index to the list i = ixs[0] pick.append(i) # Compute IoU of the picked box with the rest iou = compute_iou(boxes[i], boxes[ixs[1:]], area[i], area[ixs[1:]]) # Identify boxes with IoU over the threshold. This # returns indices into ixs[1:], so add 1 to get # indices into ixs. remove_ixs = np.where(iou > threshold)[0] + 1 # Remove indices of the picked and overlapped boxes. ixs = np.delete(ixs, remove_ixs) ixs = np.delete(ixs, 0) return np.array(pick, dtype=np.int32) def apply_box_deltas(boxes, deltas): """Applies the given deltas to the given boxes. boxes: [N, (y1, x1, y2, x2)]. Note that (y2, x2) is outside the box. deltas: [N, (dy, dx, log(dh), log(dw))] """ boxes = boxes.astype(np.float32) # Convert to y, x, h, w height = boxes[:, 2] - boxes[:, 0] width = boxes[:, 3] - boxes[:, 1] center_y = boxes[:, 0] + 0.5 * height center_x = boxes[:, 1] + 0.5 * width # Apply deltas center_y += deltas[:, 0] * height center_x += deltas[:, 1] * width height *= np.exp(deltas[:, 2]) width *= np.exp(deltas[:, 3]) # Convert back to y1, x1, y2, x2 y1 = center_y - 0.5 * height x1 = center_x - 0.5 * width y2 = y1 + height x2 = x1 + width return np.stack([y1, x1, y2, x2], axis=1) # def box_refinement_graph(box, gt_box): # """Compute refinement needed to transform box to gt_box. # box and gt_box are [N, (y1, x1, y2, x2)] # """ # box = tf.cast(box, tf.float32) # gt_box = tf.cast(gt_box, tf.float32) # height = box[:, 2] - box[:, 0] # width = box[:, 3] - box[:, 1] # center_y = box[:, 0] + 0.5 * height # center_x = box[:, 1] + 0.5 * width # gt_height = gt_box[:, 2] - gt_box[:, 0] # gt_width = gt_box[:, 3] - gt_box[:, 1] # gt_center_y = gt_box[:, 0] + 0.5 * gt_height # gt_center_x = gt_box[:, 1] + 0.5 * gt_width # dy = (gt_center_y - center_y) / height # dx = (gt_center_x - center_x) / width # dh = tf.log(gt_height / height) # dw = tf.log(gt_width / width) # result = tf.stack([dy, dx, dh, dw], axis=1) # return result def box_refinement(box, gt_box): """Compute refinement needed to transform box to gt_box. box and gt_box are [N, (y1, x1, y2, x2)]. (y2, x2) is assumed to be outside the box. """ box = box.astype(np.float32) gt_box = gt_box.astype(np.float32) height = box[:, 2] - box[:, 0] width = box[:, 3] - box[:, 1] center_y = box[:, 0] + 0.5 * height center_x = box[:, 1] + 0.5 * width gt_height = gt_box[:, 2] - gt_box[:, 0] gt_width = gt_box[:, 3] - gt_box[:, 1] gt_center_y = gt_box[:, 0] + 0.5 * gt_height gt_center_x = gt_box[:, 1] + 0.5 * gt_width dy = (gt_center_y - center_y) / height dx = (gt_center_x - center_x) / width dh = np.log(gt_height / height) dw = np.log(gt_width / width) return np.stack([dy, dx, dh, dw], axis=1) ############################################################ # Dataset ############################################################ class Dataset(object): """The base class for dataset classes. To use it, create a new class that adds functions specific to the dataset you want to use. For example: class CatsAndDogsDataset(Dataset): def load_cats_and_dogs(self): ... def load_mask(self, image_id): ... def image_reference(self, image_id): ... See COCODataset and ShapesDataset as examples. """ def __init__(self, class_map=None): self._image_ids = [] self.image_info = [] # Background is always the first class self.class_info = [{"source": "", "id": 0, "name": "BG"}] self.source_class_ids = {} def add_class(self, source, class_id, class_name): assert "." not in source, "Source name cannot contain a dot" # Does the class exist already? for info in self.class_info: if info['source'] == source and info["id"] == class_id: # source.class_id combination already available, skip return # Add the class self.class_info.append({ "source": source, "id": class_id, "name": class_name, }) def add_image(self, source, image_id, path, **kwargs): image_info = { "id": image_id, "source": source, "path": path, } image_info.update(kwargs) self.image_info.append(image_info) def image_reference(self, image_id): """Return a link to the image in its source Website or details about the image that help looking it up or debugging it. Override for your dataset, but pass to this function if you encounter images not in your dataset. """ return "" def prepare(self, class_map=None): """Prepares the Dataset class for use. TODO: class map is not supported yet. When done, it should handle mapping classes from different datasets to the same class ID. """ def clean_name(name): """Returns a shorter version of object names for cleaner display.""" return ",".join(name.split(",")[:1]) # Build (or rebuild) everything else from the info dicts. self.num_classes = len(self.class_info) self.class_ids = np.arange(self.num_classes) self.class_names = [clean_name(c["name"]) for c in self.class_info] self.num_images = len(self.image_info) self._image_ids = np.arange(self.num_images) # Mapping from source class and image IDs to internal IDs self.class_from_source_map = {"{}.{}".format(info['source'], info['id']): id for info, id in zip(self.class_info, self.class_ids)} self.image_from_source_map = {"{}.{}".format(info['source'], info['id']): id for info, id in zip(self.image_info, self.image_ids)} # Map sources to class_ids they support self.sources = list(set([i['source'] for i in self.class_info])) self.source_class_ids = {} # Loop over datasets for source in self.sources: self.source_class_ids[source] = [] # Find classes that belong to this dataset for i, info in enumerate(self.class_info): # Include BG class in all datasets if i == 0 or source == info['source']: self.source_class_ids[source].append(i) def map_source_class_id(self, source_class_id): """Takes a source class ID and returns the int class ID assigned to it. For example: dataset.map_source_class_id("coco.12") -> 23 """ return self.class_from_source_map[source_class_id] def get_source_class_id(self, class_id, source): """Map an internal class ID to the corresponding class ID in the source dataset.""" info = self.class_info[class_id] assert info['source'] == source return info['id'] @property def image_ids(self): return self._image_ids def source_image_link(self, image_id): """Returns the path or URL to the image. Override this to return a URL to the image if it's available online for easy debugging. """ return self.image_info[image_id]["path"] def load_image(self, image_id): """Load the specified image and return a [H,W,3] Numpy array. """ # Load image image = skimage.io.imread(self.image_info[image_id]['path']) # If grayscale. Convert to RGB for consistency. if image.ndim != 3: image = skimage.color.gray2rgb(image) # If has an alpha channel, remove it for consistency if image.shape[-1] == 4: image = image[..., :3] return image def load_mask(self, image_id): """Load instance masks for the given image. Different datasets use different ways to store masks. Override this method to load instance masks and return them in the form of am array of binary masks of shape [height, width, instances]. Returns: masks: A bool array of shape [height, width, instance count] with a binary mask per instance. class_ids: a 1D array of class IDs of the instance masks. """ # Override this function to load a mask from your dataset. # Otherwise, it returns an empty mask. logging.warning("You are using the default load_mask(), maybe you need to define your own one.") mask = np.empty([0, 0, 0]) class_ids = np.empty([0], np.int32) return mask, class_ids def resize_image(image, min_dim=None, max_dim=None, min_scale=None, mode="square"): """Resizes an image keeping the aspect ratio unchanged. min_dim: if provided, resizes the image such that it's smaller dimension == min_dim max_dim: if provided, ensures that the image longest side doesn't exceed this value. min_scale: if provided, ensure that the image is scaled up by at least this percent even if min_dim doesn't require it. mode: Resizing mode. none: No resizing. Return the image unchanged. square: Resize and pad with zeros to get a square image of size [max_dim, max_dim]. pad64: Pads width and height with zeros to make them multiples of 64. If min_dim or min_scale are provided, it scales the image up before padding. max_dim is ignored in this mode. The multiple of 64 is needed to ensure smooth scaling of feature maps up and down the 6 levels of the FPN pyramid (2**6=64). crop: Picks random crops from the image. First, scales the image based on min_dim and min_scale, then picks a random crop of size min_dim x min_dim. Can be used in training only. max_dim is not used in this mode. Returns: image: the resized image window: (y1, x1, y2, x2). If max_dim is provided, padding might be inserted in the returned image. If so, this window is the coordinates of the image part of the full image (excluding the padding). The x2, y2 pixels are not included. scale: The scale factor used to resize the image padding: Padding added to the image [(top, bottom), (left, right), (0, 0)] """ # Keep track of image dtype and return results in the same dtype image_dtype = image.dtype # Default window (y1, x1, y2, x2) and default scale == 1. h, w = image.shape[:2] window = (0, 0, h, w) scale = 1 padding = [(0, 0), (0, 0), (0, 0)] crop = None if mode == "none": return image, window, scale, padding, crop # Scale? if min_dim: # Scale up but not down scale = max(1, min_dim / min(h, w)) if min_scale and scale < min_scale: scale = min_scale # Does it exceed max dim? if max_dim and mode == "square": image_max = max(h, w) if round(image_max * scale) > max_dim: scale = max_dim / image_max # Resize image using bilinear interpolation if scale != 1: image = resize(image, (round(h * scale), round(w * scale)), preserve_range=True) # Need padding or cropping? if mode == "square": # Get new height and width h, w = image.shape[:2] top_pad = (max_dim - h) // 2 bottom_pad = max_dim - h - top_pad left_pad = (max_dim - w) // 2 right_pad = max_dim - w - left_pad padding = [(top_pad, bottom_pad), (left_pad, right_pad), (0, 0)] image = np.pad(image, padding, mode='constant', constant_values=0) window = (top_pad, left_pad, h + top_pad, w + left_pad) elif mode == "pad64": h, w = image.shape[:2] # Both sides must be divisible by 64 assert min_dim % 64 == 0, "Minimum dimension must be a multiple of 64" # Height if h % 64 > 0: max_h = h - (h % 64) + 64 top_pad = (max_h - h) // 2 bottom_pad = max_h - h - top_pad else: top_pad = bottom_pad = 0 # Width if w % 64 > 0: max_w = w - (w % 64) + 64 left_pad = (max_w - w) // 2 right_pad = max_w - w - left_pad else: left_pad = right_pad = 0 padding = [(top_pad, bottom_pad), (left_pad, right_pad), (0, 0)] image = np.pad(image, padding, mode='constant', constant_values=0) window = (top_pad, left_pad, h + top_pad, w + left_pad) elif mode == "crop": # Pick a random crop h, w = image.shape[:2] y = random.randint(0, (h - min_dim)) x = random.randint(0, (w - min_dim)) crop = (y, x, min_dim, min_dim) image = image[y:y + min_dim, x:x + min_dim] window = (0, 0, min_dim, min_dim) else: raise Exception("Mode {} not supported".format(mode)) return image.astype(image_dtype), window, scale, padding, crop def resize_mask(mask, scale, padding, crop=None): """Resizes a mask using the given scale and padding. Typically, you get the scale and padding from resize_image() to ensure both, the image and the mask, are resized consistently. scale: mask scaling factor padding: Padding to add to the mask in the form [(top, bottom), (left, right), (0, 0)] """ # Suppress warning from scipy 0.13.0, the output shape of zoom() is # calculated with round() instead of int() with warnings.catch_warnings(): warnings.simplefilter("ignore") mask = scipy.ndimage.zoom(mask, zoom=[scale, scale, 1], order=0) if crop is not None: y, x, h, w = crop mask = mask[y:y + h, x:x + w] else: mask = np.pad(mask, padding, mode='constant', constant_values=0) return mask def minimize_mask(bbox, mask, mini_shape): """Resize masks to a smaller version to reduce memory load. Mini-masks can be resized back to image scale using expand_masks() See inspect_data.ipynb notebook for more details. """ mini_mask = np.zeros(mini_shape + (mask.shape[-1],), dtype=bool) for i in range(mask.shape[-1]): # Pick slice and cast to bool in case load_mask() returned wrong dtype m = mask[:, :, i].astype(bool) y1, x1, y2, x2 = bbox[i][:4] m = m[y1:y2, x1:x2] if m.size == 0: raise Exception("Invalid bounding box with area of zero") # Resize with bilinear interpolation m = resize(m, mini_shape) mini_mask[:, :, i] = np.around(m).astype(np.bool) return mini_mask def expand_mask(bbox, mini_mask, image_shape): """Resizes mini masks back to image size. Reverses the change of minimize_mask(). See inspect_data.ipynb notebook for more details. """ mask = np.zeros(image_shape[:2] + (mini_mask.shape[-1],), dtype=bool) for i in range(mask.shape[-1]): m = mini_mask[:, :, i] y1, x1, y2, x2 = bbox[i][:4] h = y2 - y1 w = x2 - x1 # Resize with bilinear interpolation m = resize(m, (h, w)) mask[y1:y2, x1:x2, i] = np.around(m).astype(np.bool) return mask # TODO: Build and use this function to reduce code duplication def mold_mask(mask, config): pass def unmold_mask(mask, bbox, image_shape): """Converts a mask generated by the neural network to a format similar to its original shape. mask: [height, width] of type float. A small, typically 28x28 mask. bbox: [y1, x1, y2, x2]. The box to fit the mask in. Returns a binary mask with the same size as the original image. """ threshold = 0.5 y1, x1, y2, x2 = bbox mask = resize(mask, (y2 - y1, x2 - x1)) mask = np.where(mask >= threshold, 1, 0).astype(np.bool) # Put the mask in the right location. full_mask = np.zeros(image_shape[:2], dtype=np.bool) full_mask[y1:y2, x1:x2] = mask return full_mask ############################################################ # Anchors ############################################################ def generate_anchors(scales, ratios, shape, feature_stride, anchor_stride): """ scales: 1D array of anchor sizes in pixels. Example: [32, 64, 128] ratios: 1D array of anchor ratios of width/height. Example: [0.5, 1, 2] shape: [height, width] spatial shape of the feature map over which to generate anchors. feature_stride: Stride of the feature map relative to the image in pixels. anchor_stride: Stride of anchors on the feature map. For example, if the value is 2 then generate anchors for every other feature map pixel. """ # Get all combinations of scales and ratios scales, ratios = np.meshgrid(np.array(scales), np.array(ratios)) scales = scales.flatten() ratios = ratios.flatten() # Enumerate heights and widths from scales and ratios heights = scales / np.sqrt(ratios) widths = scales * np.sqrt(ratios) # Enumerate shifts in feature space shifts_y = np.arange(0, shape[0], anchor_stride) * feature_stride shifts_x = np.arange(0, shape[1], anchor_stride) * feature_stride shifts_x, shifts_y = np.meshgrid(shifts_x, shifts_y) # Enumerate combinations of shifts, widths, and heights box_widths, box_centers_x = np.meshgrid(widths, shifts_x) box_heights, box_centers_y = np.meshgrid(heights, shifts_y) # Reshape to get a list of (y, x) and a list of (h, w) box_centers = np.stack( [box_centers_y, box_centers_x], axis=2).reshape([-1, 2]) box_sizes = np.stack([box_heights, box_widths], axis=2).reshape([-1, 2]) # Convert to corner coordinates (y1, x1, y2, x2) boxes = np.concatenate([box_centers - 0.5 * box_sizes, box_centers + 0.5 * box_sizes], axis=1) return boxes def generate_pyramid_anchors(scales, ratios, feature_shapes, feature_strides, anchor_stride): """Generate anchors at different levels of a feature pyramid. Each scale is associated with a level of the pyramid, but each ratio is used in all levels of the pyramid. Returns: anchors: [N, (y1, x1, y2, x2)]. All generated anchors in one array. Sorted with the same order of the given scales. So, anchors of scale[0] come first, then anchors of scale[1], and so on. """ # Anchors # [anchor_count, (y1, x1, y2, x2)] anchors = [] for i in range(len(scales)): anchors.append(generate_anchors(scales[i], ratios, feature_shapes[i], feature_strides[i], anchor_stride)) return np.concatenate(anchors, axis=0) ############################################################ # Miscellaneous ############################################################ def trim_zeros(x): """It's common to have tensors larger than the available data and pad with zeros. This function removes rows that are all zeros. x: [rows, columns]. """ assert len(x.shape) == 2 return x[~np.all(x == 0, axis=1)] def compute_matches(gt_boxes, gt_class_ids, gt_masks, pred_boxes, pred_class_ids, pred_scores, pred_masks, iou_threshold=0.5, score_threshold=0.0): """Finds matches between prediction and ground truth instances. Returns: gt_match: 1-D array. For each GT box it has the index of the matched predicted box. pred_match: 1-D array. For each predicted box, it has the index of the matched ground truth box. overlaps: [pred_boxes, gt_boxes] IoU overlaps. """ # Trim zero padding # TODO: cleaner to do zero unpadding upstream gt_boxes = trim_zeros(gt_boxes) gt_masks = gt_masks[..., :gt_boxes.shape[0]] pred_boxes = trim_zeros(pred_boxes) pred_scores = pred_scores[:pred_boxes.shape[0]] # Sort predictions by score from high to low indices = np.argsort(pred_scores)[::-1] pred_boxes = pred_boxes[indices] pred_class_ids = pred_class_ids[indices] pred_scores = pred_scores[indices] pred_masks = pred_masks[..., indices] # Compute IoU overlaps [pred_masks, gt_masks] overlaps = compute_overlaps_masks(pred_masks, gt_masks) # Loop through predictions and find matching ground truth boxes match_count = 0 pred_match = -1 * np.ones([pred_boxes.shape[0]]) gt_match = -1 * np.ones([gt_boxes.shape[0]]) for i in range(len(pred_boxes)): # Find best matching ground truth box # 1. Sort matches by score sorted_ixs = np.argsort(overlaps[i])[::-1] # 2. Remove low scores low_score_idx = np.where(overlaps[i, sorted_ixs] < score_threshold)[0] if low_score_idx.size > 0: sorted_ixs = sorted_ixs[:low_score_idx[0]] # 3. Find the match for j in sorted_ixs: # If ground truth box is already matched, go to next one if gt_match[j] > -1: continue # If we reach IoU smaller than the threshold, end the loop iou = overlaps[i, j] if iou < iou_threshold: break # Do we have a match? if pred_class_ids[i] == gt_class_ids[j]: match_count += 1 gt_match[j] = i pred_match[i] = j break return gt_match, pred_match, overlaps def compute_ap(gt_boxes, gt_class_ids, gt_masks, pred_boxes, pred_class_ids, pred_scores, pred_masks, iou_threshold=0.5): """Compute Average Precision at a set IoU threshold (default 0.5). Returns: mAP: Mean Average Precision precisions: List of precisions at different class score thresholds. recalls: List of recall values at different class score thresholds. overlaps: [pred_boxes, gt_boxes] IoU overlaps. """ # Get matches and overlaps gt_match, pred_match, overlaps = compute_matches( gt_boxes, gt_class_ids, gt_masks, pred_boxes, pred_class_ids, pred_scores, pred_masks, iou_threshold) # Compute precision and recall at each prediction box step precisions = np.cumsum(pred_match > -1) / (np.arange(len(pred_match)) + 1) recalls = np.cumsum(pred_match > -1).astype(np.float32) / len(gt_match) # Pad with start and end values to simplify the math precisions = np.concatenate([[0], precisions, [0]]) recalls = np.concatenate([[0], recalls, [1]]) # Ensure precision values decrease but don't increase. This way, the # precision value at each recall threshold is the maximum it can be # for all following recall thresholds, as specified by the VOC paper. for i in range(len(precisions) - 2, -1, -1): precisions[i] = np.maximum(precisions[i], precisions[i + 1]) # Compute mean AP over recall range indices = np.where(recalls[:-1] != recalls[1:])[0] + 1 mAP = np.sum((recalls[indices] - recalls[indices - 1]) * precisions[indices]) return mAP, precisions, recalls, overlaps def compute_ap_range(gt_box, gt_class_id, gt_mask, pred_box, pred_class_id, pred_score, pred_mask, iou_thresholds=None, verbose=1): """Compute AP over a range or IoU thresholds. Default range is 0.5-0.95.""" # Default is 0.5 to 0.95 with increments of 0.05 iou_thresholds = iou_thresholds or np.arange(0.5, 1.0, 0.05) # Compute AP over range of IoU thresholds AP = [] for iou_threshold in iou_thresholds: ap, precisions, recalls, overlaps =\ compute_ap(gt_box, gt_class_id, gt_mask, pred_box, pred_class_id, pred_score, pred_mask, iou_threshold=iou_threshold) if verbose: print("AP @{:.2f}:\t {:.3f}".format(iou_threshold, ap)) AP.append(ap) AP = np.array(AP).mean() if verbose: print("AP @{:.2f}-{:.2f}:\t {:.3f}".format( iou_thresholds[0], iou_thresholds[-1], AP)) return AP def compute_recall(pred_boxes, gt_boxes, iou): """Compute the recall at the given IoU threshold. It's an indication of how many GT boxes were found by the given prediction boxes. pred_boxes: [N, (y1, x1, y2, x2)] in image coordinates gt_boxes: [N, (y1, x1, y2, x2)] in image coordinates """ # Measure overlaps overlaps = compute_overlaps(pred_boxes, gt_boxes) iou_max = np.max(overlaps, axis=1) iou_argmax = np.argmax(overlaps, axis=1) positive_ids = np.where(iou_max >= iou)[0] matched_gt_boxes = iou_argmax[positive_ids] recall = len(set(matched_gt_boxes)) / gt_boxes.shape[0] return recall, positive_ids # ## Batch Slicing # Some custom layers support a batch size of 1 only, and require a lot of work # to support batches greater than 1. This function slices an input tensor # across the batch dimension and feeds batches of size 1. Effectively, # an easy way to support batches > 1 quickly with little code modification. # In the long run, it's more efficient to modify the code to support large # batches and getting rid of this function. Consider this a temporary solution # def batch_slice(inputs, graph_fn, batch_size, names=None): # """Splits inputs into slices and feeds each slice to a copy of the given # computation graph and then combines the results. It allows you to run a # graph on a batch of inputs even if the graph is written to support one # instance only. # inputs: list of tensors. All must have the same first dimension length # graph_fn: A function that returns a TF tensor that's part of a graph. # batch_size: number of slices to divide the data into. # names: If provided, assigns names to the resulting tensors. # """ # if not isinstance(inputs, list): # inputs = [inputs] # outputs = [] # for i in range(batch_size): # inputs_slice = [x[i] for x in inputs] # output_slice = graph_fn(*inputs_slice) # if not isinstance(output_slice, (tuple, list)): # output_slice = [output_slice] # outputs.append(output_slice) # # Change outputs from a list of slices where each is # # a list of outputs to a list of outputs and each has # # a list of slices # outputs = list(zip(*outputs)) # if names is None: # names = [None] * len(outputs) # result = [tf.stack(o, axis=0, name=n) # for o, n in zip(outputs, names)] # if len(result) == 1: # result = result[0] # return result def download_trained_weights(coco_model_path, verbose=1): """Download COCO trained weights from Releases. coco_model_path: local path of COCO trained weights """ if verbose > 0: print("Downloading pretrained model to " + coco_model_path + " ...") with urllib.request.urlopen(COCO_MODEL_URL) as resp, open(coco_model_path, 'wb') as out: shutil.copyfileobj(resp, out) if verbose > 0: print("... done downloading pretrained model!") def norm_boxes(boxes, shape): """Converts boxes from pixel coordinates to normalized coordinates. boxes: [N, (y1, x1, y2, x2)] in pixel coordinates shape: [..., (height, width)] in pixels Note: In pixel coordinates (y2, x2) is outside the box. But in normalized coordinates it's inside the box. Returns: [N, (y1, x1, y2, x2)] in normalized coordinates """ h, w = shape scale = np.array([h - 1, w - 1, h - 1, w - 1]) shift = np.array([0, 0, 1, 1]) return np.divide((boxes - shift), scale).astype(np.float32) def denorm_boxes(boxes, shape): """Converts boxes from normalized coordinates to pixel coordinates. boxes: [N, (y1, x1, y2, x2)] in normalized coordinates shape: [..., (height, width)] in pixels Note: In pixel coordinates (y2, x2) is outside the box. But in normalized coordinates it's inside the box. Returns: [N, (y1, x1, y2, x2)] in pixel coordinates """ h, w = shape scale = np.array([h - 1, w - 1, h - 1, w - 1]) shift = np.array([0, 0, 1, 1]) return np.around(np.multiply(boxes, scale) + shift).astype(np.int32) def resize(image, output_shape, order=1, mode='constant', cval=0, clip=True, preserve_range=False, anti_aliasing=False, anti_aliasing_sigma=None): """A wrapper for Scikit-Image resize(). Scikit-Image generates warnings on every call to resize() if it doesn't receive the right parameters. The right parameters depend on the version of skimage. This solves the problem by using different parameters per version. And it provides a central place to control resizing defaults. """ if LooseVersion(skimage.__version__) >= LooseVersion("0.14"): # New in 0.14: anti_aliasing. Default it to False for backward # compatibility with skimage 0.13. return skimage.transform.resize( image, output_shape, order=order, mode=mode, cval=cval, clip=clip, preserve_range=preserve_range, anti_aliasing=anti_aliasing, anti_aliasing_sigma=anti_aliasing_sigma) else: return skimage.transform.resize( image, output_shape, order=order, mode=mode, cval=cval, clip=clip, preserve_range=preserve_range) def __main__(): pass ================================================ FILE: projects/LISA/visualize_data.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import argparse import numpy as np import os from itertools import chain import cv2 from PIL import Image from detectron2.config import get_cfg from detectron2.data import DatasetCatalog, MetadataCatalog, build_detection_train_loader from detectron2.data import detection_utils as utils from detectron2.data.build import filter_images_with_few_keypoints from detectron2.utils.logger import setup_logger from detectron2.utils.visualizer import Visualizer from detectron2.data.datasets import register_soba_instances register_soba_instances("soba_cast_shadow_train_full", {}, "../../../SOBA/annotations/SOBA_train.json", "../..././SOBA/SOBA/") register_soba_instances("soba_cast_shadow_val_full",{},"../../../SOBA/annotations/SOBA_val.json","../../../SOBA/SOBA/") def setup(args): cfg = get_cfg() if args.config_file: cfg.merge_from_file(args.config_file) cfg.merge_from_list(args.opts) cfg.freeze() return cfg def parse_args(in_args=None): parser = argparse.ArgumentParser(description="Visualize ground-truth data") parser.add_argument( "--source", choices=["annotation", "dataloader"], required=True, help="visualize the annotations or the data loader (with pre-processing)", ) parser.add_argument("--config-file", default="", metavar="FILE", help="path to config file") parser.add_argument("--output-dir", default="./", help="path to output directory") parser.add_argument("--show", action="store_true", help="show output in a window") parser.add_argument( "opts", help="Modify config options using the command-line", default=None, nargs=argparse.REMAINDER, ) return parser.parse_args(in_args) if __name__ == "__main__": args = parse_args() logger = setup_logger() logger.info("Arguments: " + str(args)) cfg = setup(args) dirname = args.output_dir os.makedirs(dirname, exist_ok=True) metadata = MetadataCatalog.get(cfg.DATASETS.TRAIN[0]) def output(vis, fname): if args.show: print(fname) cv2.imshow("window", vis.get_image()[:, :, ::-1]) cv2.waitKey() else: filepath = os.path.join(dirname, fname) print("Saving to {} ...".format(filepath)) vis.save(filepath) scale = 2.0 if args.show else 1.0 if args.source == "dataloader": train_data_loader = build_detection_train_loader(cfg) for batch in train_data_loader: for per_image in batch: # Pytorch tensor is in (C, H, W) format img = per_image["image"].permute(1, 2, 0) if cfg.INPUT.FORMAT == "BGR": img = img[:, :, [2, 1, 0]] else: img = np.asarray(Image.fromarray(img, mode=cfg.INPUT.FORMAT).convert("RGB")) visualizer = Visualizer(img, metadata=metadata, scale=scale) target_fields = per_image["instances"].get_fields() labels = [metadata.thing_classes[i] for i in target_fields["gt_classes"]] vis = visualizer.overlay_instances( labels=labels, boxes=target_fields.get("gt_boxes", None), masks=target_fields.get("gt_masks", None), keypoints=target_fields.get("gt_keypoints", None), ) output(vis, str(per_image["image_id"]) + ".jpg") else: dicts = list(chain.from_iterable([DatasetCatalog.get(k) for k in cfg.DATASETS.TRAIN])) if cfg.MODEL.KEYPOINT_ON: dicts = filter_images_with_few_keypoints(dicts, 1) for dic in dicts: img = utils.read_image(dic["file_name"], "RGB") visualizer = Visualizer(img, metadata=metadata, scale=scale) vis = visualizer.draw_dataset_dict(dic) utput(vis, os.path.basename(dic["file_name"])) ================================================ FILE: projects/LISA/visualize_json_results.py ================================================ #!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import argparse import json import numpy as np import os from collections import defaultdict import cv2 import tqdm from fvcore.common.file_io import PathManager from LISA.matchor import matchor from detectron2.data import DatasetCatalog, MetadataCatalog from detectron2.structures import Boxes, BoxMode, Instances from detectron2.utils.logger import setup_logger from detectron2.utils.visualizer import Visualizer from detectron2.data.datasets import register_soba_instances register_soba_instances("soba_cast_shadow_train_full", {}, "../../../SOBA/annotations/SOBA_train.json", "../..././SOBA/SOBA/") register_soba_instances("soba_cast_shadow_val_full",{},"../../../SOBA/annotations/SOBA_val.json","../../../SOBA/SOBA/") def create_instances(ins_predictions, ass_predictions,image_size): ret = Instances(image_size) ins_score = np.asarray([x["score"] for x in ins_predictions]) ins_association = np.asarray([x["association_id"] for x in ins_predictions]) chosen = (ins_score > args.conf_threshold).nonzero()[0] ins_score = ins_score[chosen] ins_association = ins_association[chosen] bbox = np.asarray([ins_predictions[i]["bbox"] for i in chosen]) bbox = BoxMode.convert(bbox, BoxMode.XYWH_ABS, BoxMode.XYXY_ABS) labels = np.asarray([dataset_id_map(ins_predictions[i]["category_id"]) for i in chosen]) ret.scores = ins_score ret.pred_boxes = Boxes(bbox) ret.pred_classes = labels ret.pred_associations = ins_association try: ret.pred_masks = [ins_predictions[i]["segmentation"] for i in chosen] except KeyError: pass ass_ret = Instances(image_size) ass_score = np.asarray([x["score"] for x in ass_predictions]) ass_ass = np.asarray([x["association_id"] for x in ass_predictions]) chosen = (ass_score > args.conf_threshold).nonzero()[0] ass_score = ass_score[chosen] ass_ass = ass_ass[chosen] bbox = np.asarray([ass_predictions[i]["bbox"] for i in chosen]) bbox = BoxMode.convert(bbox, BoxMode.XYWH_ABS, BoxMode.XYXY_ABS) labels = np.asarray([dataset_ass_id_map(ass_predictions[i]["category_id"]) for i in chosen]) ass_ret.scores = ass_score ass_ret.pred_boxes = Boxes(bbox) ass_ret.pred_classes = labels ass_ret.pred_associations = ass_ass return ret,ass_ret if __name__ == "__main__": parser = argparse.ArgumentParser( description="A script that visualizes the json predictions from COCO or LVIS dataset." ) parser.add_argument("--ins_input", required=True, help="JSON file produced by the model") parser.add_argument("--ass_input", required=True) parser.add_argument("--output", required=True, help="output directory") parser.add_argument("--dataset", help="name of the dataset", default="coco_2017_val") parser.add_argument("--conf-threshold", default=0.5, type=float, help="confidence threshold") args = parser.parse_args() logger = setup_logger() with PathManager.open(args.ins_input, "r") as f: ins_predictions = json.load(f) with PathManager.open(args.ass_input,'r') as f: ass_predictions = json.load(f) ins_pred_by_image = defaultdict(list) ass_pred_by_image = defaultdict(list) for p in ins_predictions: ins_pred_by_image[p["image_id"]].append(p) for p in ass_predictions: ass_pred_by_image[p["image_id"]].append(p) dicts = list(DatasetCatalog.get(args.dataset)) metadata = MetadataCatalog.get(args.dataset) if hasattr(metadata, "thing_dataset_id_to_contiguous_id"): def dataset_id_map(ds_id): return metadata.thing_dataset_id_to_contiguous_id[ds_id] def dataset_ass_id_map(ds_id): return metadata.association_dataset_id_to_contiguous_id[ds_id] elif "lvis" in args.dataset: # LVIS results are in the same format as COCO results, but have a different # mapping from dataset category id to contiguous category id in [0, #categories - 1] def dataset_id_map(ds_id): return ds_id - 1 else: raise ValueError("Unsupported dataset: {}".format(args.dataset)) os.makedirs(args.output, exist_ok=True) for dic in tqdm.tqdm(dicts): img = cv2.imread(dic["file_name"], cv2.IMREAD_COLOR)[:, :, ::-1] basename = os.path.basename(dic["file_name"]) ins_predictions,ass_predictions = create_instances(ins_pred_by_image[dic["image_id"]], ass_pred_by_image[dic["image_id"]],img.shape[:2]) # ins_predictions,ass_predictions = matchor(ins_predictions,ass_predictions) if ins_predictions == None: continue vis = Visualizer(img, metadata) # vis = Visualizer(img,metadata) vis_assa = vis.draw_instance_predictions(ass_predictions,True,labels_align='right').get_image() # cv2.imwrite(os.path.join(args.output, 'ass_'+basename), vis_assa[:,:,::-1]) vis_pred = vis.draw_instance_predictions(ins_predictions).get_image() vis = Visualizer(img, metadata) vis_gt = vis.draw_dataset_dict(dic).get_image() h,_,_ = img.shape white = np.ones((h,20,3),dtype=('uint8'))*255 concat = np.concatenate((img,white,vis_gt,white,white,vis_pred), axis=1) cv2.imwrite(os.path.join(args.output, basename), concat[:, :, ::-1]) ================================================ FILE: setup.cfg ================================================ [isort] line_length=100 multi_line_output=3 include_trailing_comma=True known_standard_library=numpy,setuptools,mock skip=datasets,docs skip_glob=*/__init__.py known_myself=detectron2 known_third_party=fvcore,matplotlib,cv2,torch,torchvision,PIL,pycocotools,yacs,termcolor,cityscapesscripts,tabulate,tqdm,scipy,lvis,psutil,pkg_resources,caffe2,onnx no_lines_before=STDLIB,THIRDPARTY sections=FUTURE,STDLIB,THIRDPARTY,myself,FIRSTPARTY,LOCALFOLDER default_section=FIRSTPARTY [mypy] python_version=3.6 ignore_missing_imports = True warn_unused_configs = True disallow_untyped_defs = True check_untyped_defs = True warn_unused_ignores = True warn_redundant_casts = True show_column_numbers = True follow_imports = silent allow_redefinition = True ; Require all functions to be annotated disallow_incomplete_defs = True ================================================ FILE: setup.py ================================================ #!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import glob import os import shutil from os import path from setuptools import find_packages, setup from typing import List import torch from torch.utils.cpp_extension import CUDA_HOME, CppExtension, CUDAExtension torch_ver = [int(x) for x in torch.__version__.split(".")[:2]] assert torch_ver >= [1, 3], "Requires PyTorch >= 1.3" def get_version(): init_py_path = path.join(path.abspath(path.dirname(__file__)), "detectron2", "__init__.py") init_py = open(init_py_path, "r").readlines() version_line = [l.strip() for l in init_py if l.startswith("__version__")][0] version = version_line.split("=")[-1].strip().strip("'\"") # The following is used to build release packages. # Users should never use it. suffix = os.getenv("D2_VERSION_SUFFIX", "") version = version + suffix if os.getenv("BUILD_NIGHTLY", "0") == "1": from datetime import datetime date_str = datetime.today().strftime("%y%m%d") version = version + ".dev" + date_str new_init_py = [l for l in init_py if not l.startswith("__version__")] new_init_py.append('__version__ = "{}"\n'.format(version)) with open(init_py_path, "w") as f: f.write("".join(new_init_py)) return version def get_extensions(): this_dir = path.dirname(path.abspath(__file__)) extensions_dir = path.join(this_dir, "detectron2", "layers", "csrc") main_source = path.join(extensions_dir, "vision.cpp") sources = glob.glob(path.join(extensions_dir, "**", "*.cpp")) source_cuda = glob.glob(path.join(extensions_dir, "**", "*.cu")) + glob.glob( path.join(extensions_dir, "*.cu") ) sources = [main_source] + sources extension = CppExtension extra_compile_args = {"cxx": []} define_macros = [] if ( torch.cuda.is_available() and CUDA_HOME is not None and os.path.isdir(CUDA_HOME) ) or os.getenv("FORCE_CUDA", "0") == "1": extension = CUDAExtension sources += source_cuda define_macros += [("WITH_CUDA", None)] extra_compile_args["nvcc"] = [ "-DCUDA_HAS_FP16=1", "-D__CUDA_NO_HALF_OPERATORS__", "-D__CUDA_NO_HALF_CONVERSIONS__", "-D__CUDA_NO_HALF2_OPERATORS__", ] # It's better if pytorch can do this by default .. CC = os.environ.get("CC", None) if CC is not None: extra_compile_args["nvcc"].append("-ccbin={}".format(CC)) include_dirs = [extensions_dir] ext_modules = [ extension( "detectron2._C", sources, include_dirs=include_dirs, define_macros=define_macros, extra_compile_args=extra_compile_args, ) ] return ext_modules def get_model_zoo_configs() -> List[str]: """ Return a list of configs to include in package for model zoo. Copy over these configs inside detectron2/model_zoo. """ # Use absolute paths while symlinking. source_configs_dir = path.join(path.dirname(path.realpath(__file__)), "configs") destination = path.join( path.dirname(path.realpath(__file__)), "detectron2", "model_zoo", "configs" ) # Symlink the config directory inside package to have a cleaner pip install. # Remove stale symlink/directory from a previous build. if path.exists(source_configs_dir): if path.islink(destination): os.unlink(destination) elif path.isdir(destination): shutil.rmtree(destination) if not path.exists(destination): try: os.symlink(source_configs_dir, destination) except OSError: # Fall back to copying if symlink fails: ex. on Windows. shutil.copytree(source_configs_dir, destination) config_paths = glob.glob("configs/**/*.yaml", recursive=True) return config_paths setup( name="detectron2", version=get_version(), author="FAIR", url="https://github.com/facebookresearch/detectron2", description="Detectron2 is FAIR's next-generation research " "platform for object detection and segmentation.", packages=find_packages(exclude=("configs", "tests")), package_data={"detectron2.model_zoo": get_model_zoo_configs()}, python_requires=">=3.6", install_requires=[ "termcolor>=1.1", "Pillow", # you can also use pillow-simd for better performance "yacs>=0.1.6", "tabulate", "cloudpickle", "matplotlib", "tqdm>4.29.0", "tensorboard", "fvcore", "future", # used by caffe2 "pydot", # used to save caffe2 SVGs ], extras_require={ "all": ["shapely", "psutil"], "dev": ["flake8", "isort", "black==19.3b0", "flake8-bugbear", "flake8-comprehensions"], }, ext_modules=get_extensions(), cmdclass={"build_ext": torch.utils.cpp_extension.BuildExtension}, ) ================================================ FILE: tests/README.md ================================================ ## Unit Tests To run the unittests, do: ``` python -m unittest discover -v -s tests ``` There are also end-to-end inference & training tests, in [dev/run_*_tests.sh](../dev). ================================================ FILE: tests/__init__.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved ================================================ FILE: tests/test_anchor_generator.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import unittest import torch from detectron2.config import get_cfg from detectron2.layers import ShapeSpec from detectron2.modeling.anchor_generator import DefaultAnchorGenerator, RotatedAnchorGenerator logger = logging.getLogger(__name__) class TestAnchorGenerator(unittest.TestCase): def test_default_anchor_generator(self): cfg = get_cfg() cfg.MODEL.ANCHOR_GENERATOR.SIZES = [[32, 64]] cfg.MODEL.ANCHOR_GENERATOR.ASPECT_RATIOS = [[0.25, 1, 4]] anchor_generator = DefaultAnchorGenerator(cfg, [ShapeSpec(stride=4)]) # only the last two dimensions of features matter here num_images = 2 features = {"stage3": torch.rand(num_images, 96, 1, 2)} anchors = anchor_generator([features["stage3"]]) expected_anchor_tensor = torch.tensor( [ [-32.0, -8.0, 32.0, 8.0], [-16.0, -16.0, 16.0, 16.0], [-8.0, -32.0, 8.0, 32.0], [-64.0, -16.0, 64.0, 16.0], [-32.0, -32.0, 32.0, 32.0], [-16.0, -64.0, 16.0, 64.0], [-28.0, -8.0, 36.0, 8.0], # -28.0 == -32.0 + STRIDE (4) [-12.0, -16.0, 20.0, 16.0], [-4.0, -32.0, 12.0, 32.0], [-60.0, -16.0, 68.0, 16.0], [-28.0, -32.0, 36.0, 32.0], [-12.0, -64.0, 20.0, 64.0], ] ) for i in range(num_images): assert torch.allclose(anchors[i][0].tensor, expected_anchor_tensor) def test_default_anchor_generator_centered(self): cfg = get_cfg() cfg.MODEL.ANCHOR_GENERATOR.SIZES = [[32, 64]] cfg.MODEL.ANCHOR_GENERATOR.ASPECT_RATIOS = [[0.25, 1, 4]] cfg.MODEL.ANCHOR_GENERATOR.OFFSET = 0.5 anchor_generator = DefaultAnchorGenerator(cfg, [ShapeSpec(stride=4)]) # only the last two dimensions of features matter here num_images = 2 features = {"stage3": torch.rand(num_images, 96, 1, 2)} anchors = anchor_generator([features["stage3"]]) expected_anchor_tensor = torch.tensor( [ [-30.0, -6.0, 34.0, 10.0], [-14.0, -14.0, 18.0, 18.0], [-6.0, -30.0, 10.0, 34.0], [-62.0, -14.0, 66.0, 18.0], [-30.0, -30.0, 34.0, 34.0], [-14.0, -62.0, 18.0, 66.0], [-26.0, -6.0, 38.0, 10.0], [-10.0, -14.0, 22.0, 18.0], [-2.0, -30.0, 14.0, 34.0], [-58.0, -14.0, 70.0, 18.0], [-26.0, -30.0, 38.0, 34.0], [-10.0, -62.0, 22.0, 66.0], ] ) for i in range(num_images): assert torch.allclose(anchors[i][0].tensor, expected_anchor_tensor) def test_rrpn_anchor_generator(self): cfg = get_cfg() cfg.MODEL.ANCHOR_GENERATOR.SIZES = [[32, 64]] cfg.MODEL.ANCHOR_GENERATOR.ASPECT_RATIOS = [[0.25, 1, 4]] cfg.MODEL.ANCHOR_GENERATOR.ANGLES = [[0, 45]] anchor_generator = RotatedAnchorGenerator(cfg, [ShapeSpec(stride=4)]) # only the last two dimensions of features matter here num_images = 2 features = {"stage3": torch.rand(num_images, 96, 1, 2)} anchors = anchor_generator([features["stage3"]]) expected_anchor_tensor = torch.tensor( [ [0.0, 0.0, 64.0, 16.0, 0.0], [0.0, 0.0, 64.0, 16.0, 45.0], [0.0, 0.0, 32.0, 32.0, 0.0], [0.0, 0.0, 32.0, 32.0, 45.0], [0.0, 0.0, 16.0, 64.0, 0.0], [0.0, 0.0, 16.0, 64.0, 45.0], [0.0, 0.0, 128.0, 32.0, 0.0], [0.0, 0.0, 128.0, 32.0, 45.0], [0.0, 0.0, 64.0, 64.0, 0.0], [0.0, 0.0, 64.0, 64.0, 45.0], [0.0, 0.0, 32.0, 128.0, 0.0], [0.0, 0.0, 32.0, 128.0, 45.0], [4.0, 0.0, 64.0, 16.0, 0.0], # 4.0 == 0.0 + STRIDE (4) [4.0, 0.0, 64.0, 16.0, 45.0], [4.0, 0.0, 32.0, 32.0, 0.0], [4.0, 0.0, 32.0, 32.0, 45.0], [4.0, 0.0, 16.0, 64.0, 0.0], [4.0, 0.0, 16.0, 64.0, 45.0], [4.0, 0.0, 128.0, 32.0, 0.0], [4.0, 0.0, 128.0, 32.0, 45.0], [4.0, 0.0, 64.0, 64.0, 0.0], [4.0, 0.0, 64.0, 64.0, 45.0], [4.0, 0.0, 32.0, 128.0, 0.0], [4.0, 0.0, 32.0, 128.0, 45.0], ] ) for i in range(num_images): assert torch.allclose(anchors[i][0].tensor, expected_anchor_tensor) if __name__ == "__main__": unittest.main() ================================================ FILE: tests/test_box2box_transform.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import unittest import torch from detectron2.modeling.box_regression import Box2BoxTransform, Box2BoxTransformRotated logger = logging.getLogger(__name__) def random_boxes(mean_box, stdev, N): return torch.rand(N, 4) * stdev + torch.tensor(mean_box, dtype=torch.float) class TestBox2BoxTransform(unittest.TestCase): def test_reconstruction(self): weights = (5, 5, 10, 10) b2b_tfm = Box2BoxTransform(weights=weights) src_boxes = random_boxes([10, 10, 20, 20], 1, 10) dst_boxes = random_boxes([10, 10, 20, 20], 1, 10) devices = [torch.device("cpu")] if torch.cuda.is_available(): devices.append(torch.device("cuda")) for device in devices: src_boxes = src_boxes.to(device=device) dst_boxes = dst_boxes.to(device=device) deltas = b2b_tfm.get_deltas(src_boxes, dst_boxes) dst_boxes_reconstructed = b2b_tfm.apply_deltas(deltas, src_boxes) assert torch.allclose(dst_boxes, dst_boxes_reconstructed) def random_rotated_boxes(mean_box, std_length, std_angle, N): return torch.cat( [torch.rand(N, 4) * std_length, torch.rand(N, 1) * std_angle], dim=1 ) + torch.tensor(mean_box, dtype=torch.float) class TestBox2BoxTransformRotated(unittest.TestCase): def test_reconstruction(self): weights = (5, 5, 10, 10, 1) b2b_transform = Box2BoxTransformRotated(weights=weights) src_boxes = random_rotated_boxes([10, 10, 20, 20, -30], 5, 60.0, 10) dst_boxes = random_rotated_boxes([10, 10, 20, 20, -30], 5, 60.0, 10) devices = [torch.device("cpu")] if torch.cuda.is_available(): devices.append(torch.device("cuda")) for device in devices: src_boxes = src_boxes.to(device=device) dst_boxes = dst_boxes.to(device=device) deltas = b2b_transform.get_deltas(src_boxes, dst_boxes) dst_boxes_reconstructed = b2b_transform.apply_deltas(deltas, src_boxes) assert torch.allclose(dst_boxes[:, :4], dst_boxes_reconstructed[:, :4], atol=1e-5) # angle difference has to be normalized assert torch.allclose( (dst_boxes[:, 4] - dst_boxes_reconstructed[:, 4] + 180.0) % 360.0 - 180.0, torch.zeros_like(dst_boxes[:, 4]), atol=1e-4, ) if __name__ == "__main__": unittest.main() ================================================ FILE: tests/test_boxes.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import json import math import numpy as np import unittest import torch from detectron2.structures import Boxes, BoxMode, pairwise_iou class TestBoxMode(unittest.TestCase): def _convert_xy_to_wh(self, x): return BoxMode.convert(x, BoxMode.XYXY_ABS, BoxMode.XYWH_ABS) def _convert_xywha_to_xyxy(self, x): return BoxMode.convert(x, BoxMode.XYWHA_ABS, BoxMode.XYXY_ABS) def _convert_xywh_to_xywha(self, x): return BoxMode.convert(x, BoxMode.XYWH_ABS, BoxMode.XYWHA_ABS) def test_box_convert_list(self): for tp in [list, tuple]: box = tp([5, 5, 10, 10]) output = self._convert_xy_to_wh(box) self.assertIsInstance(output, tp) self.assertEqual(output, tp([5, 5, 5, 5])) with self.assertRaises(Exception): self._convert_xy_to_wh([box]) def test_box_convert_array(self): box = np.asarray([[5, 5, 10, 10], [1, 1, 2, 3]]) output = self._convert_xy_to_wh(box) self.assertEqual(output.dtype, box.dtype) self.assertEqual(output.shape, box.shape) self.assertTrue((output[0] == [5, 5, 5, 5]).all()) self.assertTrue((output[1] == [1, 1, 1, 2]).all()) def test_box_convert_cpu_tensor(self): box = torch.tensor([[5, 5, 10, 10], [1, 1, 2, 3]]) output = self._convert_xy_to_wh(box) self.assertEqual(output.dtype, box.dtype) self.assertEqual(output.shape, box.shape) output = output.numpy() self.assertTrue((output[0] == [5, 5, 5, 5]).all()) self.assertTrue((output[1] == [1, 1, 1, 2]).all()) @unittest.skipIf(not torch.cuda.is_available(), "CUDA unavailable") def test_box_convert_cuda_tensor(self): box = torch.tensor([[5, 5, 10, 10], [1, 1, 2, 3]]).cuda() output = self._convert_xy_to_wh(box) self.assertEqual(output.dtype, box.dtype) self.assertEqual(output.shape, box.shape) self.assertEqual(output.device, box.device) output = output.cpu().numpy() self.assertTrue((output[0] == [5, 5, 5, 5]).all()) self.assertTrue((output[1] == [1, 1, 1, 2]).all()) def test_box_convert_xywha_to_xyxy_list(self): for tp in [list, tuple]: box = tp([50, 50, 30, 20, 0]) output = self._convert_xywha_to_xyxy(box) self.assertIsInstance(output, tp) self.assertEqual(output, tp([35, 40, 65, 60])) with self.assertRaises(Exception): self._convert_xywha_to_xyxy([box]) def test_box_convert_xywha_to_xyxy_array(self): for dtype in [np.float64, np.float32]: box = np.asarray( [ [50, 50, 30, 20, 0], [50, 50, 30, 20, 90], [1, 1, math.sqrt(2), math.sqrt(2), -45], ], dtype=dtype, ) output = self._convert_xywha_to_xyxy(box) self.assertEqual(output.dtype, box.dtype) expected = np.asarray([[35, 40, 65, 60], [40, 35, 60, 65], [0, 0, 2, 2]], dtype=dtype) self.assertTrue(np.allclose(output, expected, atol=1e-6), "output={}".format(output)) def test_box_convert_xywha_to_xyxy_tensor(self): for dtype in [torch.float32, torch.float64]: box = torch.tensor( [ [50, 50, 30, 20, 0], [50, 50, 30, 20, 90], [1, 1, math.sqrt(2), math.sqrt(2), -45], ], dtype=dtype, ) output = self._convert_xywha_to_xyxy(box) self.assertEqual(output.dtype, box.dtype) expected = torch.tensor([[35, 40, 65, 60], [40, 35, 60, 65], [0, 0, 2, 2]], dtype=dtype) self.assertTrue(torch.allclose(output, expected, atol=1e-6), "output={}".format(output)) def test_box_convert_xywh_to_xywha_list(self): for tp in [list, tuple]: box = tp([50, 50, 30, 20]) output = self._convert_xywh_to_xywha(box) self.assertIsInstance(output, tp) self.assertEqual(output, tp([65, 60, 30, 20, 0])) with self.assertRaises(Exception): self._convert_xywh_to_xywha([box]) def test_box_convert_xywh_to_xywha_array(self): for dtype in [np.float64, np.float32]: box = np.asarray([[30, 40, 70, 60], [30, 40, 60, 70], [-1, -1, 2, 2]], dtype=dtype) output = self._convert_xywh_to_xywha(box) self.assertEqual(output.dtype, box.dtype) expected = np.asarray( [[65, 70, 70, 60, 0], [60, 75, 60, 70, 0], [0, 0, 2, 2, 0]], dtype=dtype ) self.assertTrue(np.allclose(output, expected, atol=1e-6), "output={}".format(output)) def test_box_convert_xywh_to_xywha_tensor(self): for dtype in [torch.float32, torch.float64]: box = torch.tensor([[30, 40, 70, 60], [30, 40, 60, 70], [-1, -1, 2, 2]], dtype=dtype) output = self._convert_xywh_to_xywha(box) self.assertEqual(output.dtype, box.dtype) expected = torch.tensor( [[65, 70, 70, 60, 0], [60, 75, 60, 70, 0], [0, 0, 2, 2, 0]], dtype=dtype ) self.assertTrue(torch.allclose(output, expected, atol=1e-6), "output={}".format(output)) def test_json_serializable(self): payload = {"box_mode": BoxMode.XYWH_REL} try: json.dumps(payload) except Exception: self.fail("JSON serialization failed") def test_json_deserializable(self): payload = '{"box_mode": 2}' obj = json.loads(payload) try: obj["box_mode"] = BoxMode(obj["box_mode"]) except Exception: self.fail("JSON deserialization failed") class TestBoxIOU(unittest.TestCase): def test_pairwise_iou(self): boxes1 = torch.tensor([[0.0, 0.0, 1.0, 1.0], [0.0, 0.0, 1.0, 1.0]]) boxes2 = torch.tensor( [ [0.0, 0.0, 1.0, 1.0], [0.0, 0.0, 0.5, 1.0], [0.0, 0.0, 1.0, 0.5], [0.0, 0.0, 0.5, 0.5], [0.5, 0.5, 1.0, 1.0], [0.5, 0.5, 1.5, 1.5], ] ) expected_ious = torch.tensor( [ [1.0, 0.5, 0.5, 0.25, 0.25, 0.25 / (2 - 0.25)], [1.0, 0.5, 0.5, 0.25, 0.25, 0.25 / (2 - 0.25)], ] ) ious = pairwise_iou(Boxes(boxes1), Boxes(boxes2)) self.assertTrue(torch.allclose(ious, expected_ious)) if __name__ == "__main__": unittest.main() ================================================ FILE: tests/test_checkpoint.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import unittest from collections import OrderedDict import torch from torch import nn from detectron2.checkpoint.c2_model_loading import align_and_update_state_dicts from detectron2.utils.logger import setup_logger class TestCheckpointer(unittest.TestCase): def setUp(self): setup_logger() def create_complex_model(self): m = nn.Module() m.block1 = nn.Module() m.block1.layer1 = nn.Linear(2, 3) m.layer2 = nn.Linear(3, 2) m.res = nn.Module() m.res.layer2 = nn.Linear(3, 2) state_dict = OrderedDict() state_dict["layer1.weight"] = torch.rand(3, 2) state_dict["layer1.bias"] = torch.rand(3) state_dict["layer2.weight"] = torch.rand(2, 3) state_dict["layer2.bias"] = torch.rand(2) state_dict["res.layer2.weight"] = torch.rand(2, 3) state_dict["res.layer2.bias"] = torch.rand(2) return m, state_dict def test_complex_model_loaded(self): for add_data_parallel in [False, True]: model, state_dict = self.create_complex_model() if add_data_parallel: model = nn.DataParallel(model) model_sd = model.state_dict() align_and_update_state_dicts(model_sd, state_dict) for loaded, stored in zip(model_sd.values(), state_dict.values()): # different tensor references self.assertFalse(id(loaded) == id(stored)) # same content self.assertTrue(loaded.equal(stored)) if __name__ == "__main__": unittest.main() ================================================ FILE: tests/test_config.py ================================================ #!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import os import tempfile import unittest from detectron2.config import downgrade_config, get_cfg, upgrade_config _V0_CFG = """ MODEL: RPN_HEAD: NAME: "TEST" VERSION: 0 """ _V1_CFG = """ MODEL: WEIGHT: "/path/to/weight" """ class TestConfigVersioning(unittest.TestCase): def test_upgrade_downgrade_consistency(self): cfg = get_cfg() # check that custom is preserved cfg.USER_CUSTOM = 1 down = downgrade_config(cfg, to_version=0) up = upgrade_config(down) self.assertTrue(up == cfg) def _merge_cfg_str(self, cfg, merge_str): f = tempfile.NamedTemporaryFile(mode="w", suffix=".yaml", delete=False) try: f.write(merge_str) f.close() cfg.merge_from_file(f.name) finally: os.remove(f.name) return cfg def test_auto_upgrade(self): cfg = get_cfg() latest_ver = cfg.VERSION cfg.USER_CUSTOM = 1 self._merge_cfg_str(cfg, _V0_CFG) self.assertEqual(cfg.MODEL.RPN.HEAD_NAME, "TEST") self.assertEqual(cfg.VERSION, latest_ver) def test_guess_v1(self): cfg = get_cfg() latest_ver = cfg.VERSION self._merge_cfg_str(cfg, _V1_CFG) self.assertEqual(cfg.VERSION, latest_ver) ================================================ FILE: tests/test_data_loader.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import copy import numpy as np import unittest import pycocotools.mask as mask_util from detectron2.data import detection_utils from detectron2.data import transforms as T from detectron2.structures import BitMasks, BoxMode class TestTransformAnnotations(unittest.TestCase): def test_transform_simple_annotation(self): transforms = T.TransformList([T.HFlipTransform(400)]) anno = { "bbox": np.asarray([10, 10, 200, 300]), "bbox_mode": BoxMode.XYXY_ABS, "category_id": 3, "segmentation": [[10, 10, 100, 100, 100, 10], [150, 150, 200, 150, 200, 200]], } output = detection_utils.transform_instance_annotations(anno, transforms, (400, 400)) self.assertTrue(np.allclose(output["bbox"], [200, 10, 390, 300])) self.assertEqual(len(output["segmentation"]), len(anno["segmentation"])) self.assertTrue(np.allclose(output["segmentation"][0], [390, 10, 300, 100, 300, 10])) detection_utils.annotations_to_instances([output, output], (400, 400)) def test_flip_keypoints(self): transforms = T.TransformList([T.HFlipTransform(400)]) anno = { "bbox": np.asarray([10, 10, 200, 300]), "bbox_mode": BoxMode.XYXY_ABS, "keypoints": np.random.rand(17, 3) * 50 + 15, } output = detection_utils.transform_instance_annotations( copy.deepcopy(anno), transforms, (400, 400), keypoint_hflip_indices=detection_utils.create_keypoint_hflip_indices( ["keypoints_coco_2017_train"] ), ) # The first keypoint is nose self.assertTrue(np.allclose(output["keypoints"][0, 0], 400 - anno["keypoints"][0, 0])) # The last 16 keypoints are 8 left-right pairs self.assertTrue( np.allclose( output["keypoints"][1:, 0].reshape(-1, 2)[:, ::-1], 400 - anno["keypoints"][1:, 0].reshape(-1, 2), ) ) self.assertTrue( np.allclose( output["keypoints"][1:, 1:].reshape(-1, 2, 2)[:, ::-1, :], anno["keypoints"][1:, 1:].reshape(-1, 2, 2), ) ) def test_transform_RLE(self): transforms = T.TransformList([T.HFlipTransform(400)]) mask = np.zeros((300, 400), order="F").astype("uint8") mask[:, :200] = 1 anno = { "bbox": np.asarray([10, 10, 200, 300]), "bbox_mode": BoxMode.XYXY_ABS, "segmentation": mask_util.encode(mask[:, :, None])[0], "category_id": 3, } output = detection_utils.transform_instance_annotations( copy.deepcopy(anno), transforms, (300, 400) ) mask = output["segmentation"] self.assertTrue((mask[:, 200:] == 1).all()) self.assertTrue((mask[:, :200] == 0).all()) inst = detection_utils.annotations_to_instances( [output, output], (400, 400), mask_format="bitmask" ) self.assertTrue(isinstance(inst.gt_masks, BitMasks)) def test_transform_RLE_resize(self): transforms = T.TransformList( [T.HFlipTransform(400), T.ScaleTransform(300, 400, 400, 400, "bilinear")] ) mask = np.zeros((300, 400), order="F").astype("uint8") mask[:, :200] = 1 anno = { "bbox": np.asarray([10, 10, 200, 300]), "bbox_mode": BoxMode.XYXY_ABS, "segmentation": mask_util.encode(mask[:, :, None])[0], "category_id": 3, } output = detection_utils.transform_instance_annotations( copy.deepcopy(anno), transforms, (400, 400) ) inst = detection_utils.annotations_to_instances( [output, output], (400, 400), mask_format="bitmask" ) self.assertTrue(isinstance(inst.gt_masks, BitMasks)) def test_gen_crop(self): instance = {"bbox": [10, 10, 100, 100], "bbox_mode": BoxMode.XYXY_ABS} t = detection_utils.gen_crop_transform_with_instance((10, 10), (150, 150), instance) # the box center must fall into the cropped region self.assertTrue(t.x0 <= 55 <= t.x0 + t.w) def test_gen_crop_outside_boxes(self): instance = {"bbox": [10, 10, 100, 100], "bbox_mode": BoxMode.XYXY_ABS} with self.assertRaises(AssertionError): detection_utils.gen_crop_transform_with_instance((10, 10), (15, 15), instance) ================================================ FILE: tests/test_data_transform.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import numpy as np import unittest from detectron2.config import get_cfg from detectron2.data import detection_utils from detectron2.data import transforms as T from detectron2.utils.logger import setup_logger logger = logging.getLogger(__name__) class TestTransforms(unittest.TestCase): def setUp(self): setup_logger() def test_apply_rotated_boxes(self): np.random.seed(125) cfg = get_cfg() is_train = True transform_gen = detection_utils.build_transform_gen(cfg, is_train) image = np.random.rand(200, 300) image, transforms = T.apply_transform_gens(transform_gen, image) image_shape = image.shape[:2] # h, w assert image_shape == (800, 1200) annotation = {"bbox": [179, 97, 62, 40, -56]} boxes = np.array([annotation["bbox"]], dtype=np.float64) # boxes.shape = (1, 5) transformed_bbox = transforms.apply_rotated_box(boxes)[0] expected_bbox = np.array([484, 388, 248, 160, 56], dtype=np.float64) err_msg = "transformed_bbox = {}, expected {}".format(transformed_bbox, expected_bbox) assert np.allclose(transformed_bbox, expected_bbox), err_msg def test_apply_rotated_boxes_unequal_scaling_factor(self): np.random.seed(125) h, w = 400, 200 newh, neww = 800, 800 image = np.random.rand(h, w) transform_gen = [] transform_gen.append(T.Resize(shape=(newh, neww))) image, transforms = T.apply_transform_gens(transform_gen, image) image_shape = image.shape[:2] # h, w assert image_shape == (newh, neww) boxes = np.array( [ [150, 100, 40, 20, 0], [150, 100, 40, 20, 30], [150, 100, 40, 20, 90], [150, 100, 40, 20, -90], ], dtype=np.float64, ) transformed_boxes = transforms.apply_rotated_box(boxes) expected_bboxes = np.array( [ [600, 200, 160, 40, 0], [600, 200, 144.22205102, 52.91502622, 49.10660535], [600, 200, 80, 80, 90], [600, 200, 80, 80, -90], ], dtype=np.float64, ) err_msg = "transformed_boxes = {}, expected {}".format(transformed_boxes, expected_bboxes) assert np.allclose(transformed_boxes, expected_bboxes), err_msg def test_print_transform_gen(self): t = T.RandomCrop("relative", (100, 100)) self.assertTrue(str(t) == "RandomCrop(crop_type='relative', crop_size=(100, 100))") t = T.RandomFlip(prob=0.5) self.assertTrue(str(t) == "RandomFlip(prob=0.5)") t = T.RandomFlip() self.assertTrue(str(t) == "RandomFlip()") ================================================ FILE: tests/test_fast_rcnn.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import unittest import torch from detectron2.config import get_cfg from detectron2.modeling.box_regression import Box2BoxTransform, Box2BoxTransformRotated from detectron2.modeling.roi_heads.fast_rcnn import FastRCNNOutputLayers, FastRCNNOutputs from detectron2.modeling.roi_heads.rotated_fast_rcnn import RotatedFastRCNNOutputs from detectron2.structures import Boxes, Instances, RotatedBoxes from detectron2.utils.events import EventStorage logger = logging.getLogger(__name__) class FastRCNNTest(unittest.TestCase): def test_fast_rcnn(self): torch.manual_seed(132) cfg = get_cfg() cfg.MODEL.ROI_BOX_HEAD.BBOX_REG_WEIGHTS = (10, 10, 5, 5) box2box_transform = Box2BoxTransform(weights=cfg.MODEL.ROI_BOX_HEAD.BBOX_REG_WEIGHTS) box_head_output_size = 8 num_classes = 5 cls_agnostic_bbox_reg = False box_predictor = FastRCNNOutputLayers( box_head_output_size, num_classes, cls_agnostic_bbox_reg, box_dim=4 ) feature_pooled = torch.rand(2, box_head_output_size) pred_class_logits, pred_proposal_deltas = box_predictor(feature_pooled) image_shape = (10, 10) proposal_boxes = torch.tensor([[0.8, 1.1, 3.2, 2.8], [2.3, 2.5, 7, 8]], dtype=torch.float32) gt_boxes = torch.tensor([[1, 1, 3, 3], [2, 2, 6, 6]], dtype=torch.float32) result = Instances(image_shape) result.proposal_boxes = Boxes(proposal_boxes) result.gt_boxes = Boxes(gt_boxes) result.gt_classes = torch.tensor([1, 2]) proposals = [] proposals.append(result) smooth_l1_beta = cfg.MODEL.ROI_BOX_HEAD.SMOOTH_L1_BETA outputs = FastRCNNOutputs( box2box_transform, pred_class_logits, pred_proposal_deltas, proposals, smooth_l1_beta ) with EventStorage(): # capture events in a new storage to discard them losses = outputs.losses() expected_losses = { "loss_cls": torch.tensor(1.7951188087), "loss_box_reg": torch.tensor(4.0357131958), } for name in expected_losses.keys(): assert torch.allclose(losses[name], expected_losses[name]) def test_fast_rcnn_rotated(self): torch.manual_seed(132) cfg = get_cfg() cfg.MODEL.ROI_BOX_HEAD.BBOX_REG_WEIGHTS = (10, 10, 5, 5, 1) box2box_transform = Box2BoxTransformRotated(weights=cfg.MODEL.ROI_BOX_HEAD.BBOX_REG_WEIGHTS) box_head_output_size = 8 num_classes = 5 cls_agnostic_bbox_reg = False box_predictor = FastRCNNOutputLayers( box_head_output_size, num_classes, cls_agnostic_bbox_reg, box_dim=5 ) feature_pooled = torch.rand(2, box_head_output_size) pred_class_logits, pred_proposal_deltas = box_predictor(feature_pooled) image_shape = (10, 10) proposal_boxes = torch.tensor( [[2, 1.95, 2.4, 1.7, 0], [4.65, 5.25, 4.7, 5.5, 0]], dtype=torch.float32 ) gt_boxes = torch.tensor([[2, 2, 2, 2, 0], [4, 4, 4, 4, 0]], dtype=torch.float32) result = Instances(image_shape) result.proposal_boxes = RotatedBoxes(proposal_boxes) result.gt_boxes = RotatedBoxes(gt_boxes) result.gt_classes = torch.tensor([1, 2]) proposals = [] proposals.append(result) smooth_l1_beta = cfg.MODEL.ROI_BOX_HEAD.SMOOTH_L1_BETA outputs = RotatedFastRCNNOutputs( box2box_transform, pred_class_logits, pred_proposal_deltas, proposals, smooth_l1_beta ) with EventStorage(): # capture events in a new storage to discard them losses = outputs.losses() # Note: the expected losses are slightly different even if # the boxes are essentially the same as in the FastRCNNOutput test, because # bbox_pred in FastRCNNOutputLayers have different Linear layers/initialization # between the two cases. expected_losses = { "loss_cls": torch.tensor(1.7920907736), "loss_box_reg": torch.tensor(4.0410838127), } for name in expected_losses.keys(): assert torch.allclose(losses[name], expected_losses[name]) if __name__ == "__main__": unittest.main() ================================================ FILE: tests/test_mask_ops.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import contextlib import io import numpy as np import os import unittest from collections import defaultdict import torch import tqdm from fvcore.common.benchmark import benchmark from pycocotools.coco import COCO from tabulate import tabulate from torch.nn import functional as F from detectron2.data import MetadataCatalog from detectron2.layers.mask_ops import ( pad_masks, paste_mask_in_image_old, paste_masks_in_image, scale_boxes, ) from detectron2.structures import BitMasks, Boxes, BoxMode, PolygonMasks from detectron2.structures.masks import polygons_to_bitmask def iou_between_full_image_bit_masks(a, b): intersect = (a & b).sum() union = (a | b).sum() return intersect / union def rasterize_polygons_with_grid_sample(full_image_bit_mask, box, mask_size, threshold=0.5): x0, y0, x1, y1 = box[0], box[1], box[2], box[3] img_h, img_w = full_image_bit_mask.shape mask_y = np.arange(0.0, mask_size) + 0.5 # mask y sample coords in [0.5, mask_size - 0.5] mask_x = np.arange(0.0, mask_size) + 0.5 # mask x sample coords in [0.5, mask_size - 0.5] mask_y = (mask_y) / (mask_size) * (y1 - y0) + y0 mask_x = (mask_x) / (mask_size) * (x1 - x0) + x0 mask_x = (mask_x - 0.5) / (img_w - 1) * 2 + -1 mask_y = (mask_y - 0.5) / (img_h - 1) * 2 + -1 gy, gx = torch.meshgrid(torch.from_numpy(mask_y), torch.from_numpy(mask_x)) ind = torch.stack([gx, gy], dim=-1).to(dtype=torch.float32) full_image_bit_mask = torch.from_numpy(full_image_bit_mask) mask = F.grid_sample( full_image_bit_mask[None, None, :, :].to(dtype=torch.float32), ind[None, :, :, :], align_corners=True, ) return mask[0, 0] >= threshold class TestMaskCropPaste(unittest.TestCase): def setUp(self): json_file = MetadataCatalog.get("coco_2017_val_100").json_file if not os.path.isfile(json_file): raise unittest.SkipTest("{} not found".format(json_file)) with contextlib.redirect_stdout(io.StringIO()): self.coco = COCO(json_file) def test_crop_paste_consistency(self): """ rasterize_polygons_within_box (used in training) and paste_masks_in_image (used in inference) should be inverse operations to each other. This function runs several implementation of the above two operations and prints the reconstruction error. """ anns = self.coco.loadAnns(self.coco.getAnnIds(iscrowd=False)) # avoid crowd annotations selected_anns = anns[:100] ious = [] for ann in tqdm.tqdm(selected_anns): results = self.process_annotation(ann) ious.append([k[2] for k in results]) ious = np.array(ious) mean_ious = ious.mean(axis=0) table = [] res_dic = defaultdict(dict) for row, iou in zip(results, mean_ious): table.append((row[0], row[1], iou)) res_dic[row[0]][row[1]] = iou print(tabulate(table, headers=["rasterize", "paste", "iou"], tablefmt="simple")) # assert that the reconstruction is good: self.assertTrue(res_dic["polygon"]["aligned"] > 0.94) self.assertTrue(res_dic["roialign"]["aligned"] > 0.95) def process_annotation(self, ann, mask_side_len=28): # Parse annotation data img_info = self.coco.loadImgs(ids=[ann["image_id"]])[0] height, width = img_info["height"], img_info["width"] gt_polygons = [np.array(p, dtype=np.float64) for p in ann["segmentation"]] gt_bbox = BoxMode.convert(np.array(ann["bbox"]), BoxMode.XYWH_ABS, BoxMode.XYXY_ABS) gt_bit_mask = polygons_to_bitmask(gt_polygons, height, width) # Run rasterize .. torch_gt_bbox = torch.from_numpy(gt_bbox[None, :]).to(dtype=torch.float32) box_bitmasks = { "polygon": PolygonMasks([gt_polygons]).crop_and_resize(torch_gt_bbox, mask_side_len)[0], "gridsample": rasterize_polygons_with_grid_sample(gt_bit_mask, gt_bbox, mask_side_len), "roialign": BitMasks(torch.from_numpy(gt_bit_mask[None, :, :])).crop_and_resize( torch_gt_bbox, mask_side_len )[0], } # Run paste .. results = defaultdict(dict) for k, box_bitmask in box_bitmasks.items(): padded_bitmask, scale = pad_masks(box_bitmask[None, :, :], 1) scaled_boxes = scale_boxes(torch_gt_bbox, scale) r = results[k] r["old"] = paste_mask_in_image_old( padded_bitmask[0], scaled_boxes[0], height, width, threshold=0.5 ) r["aligned"] = paste_masks_in_image( box_bitmask[None, :, :], Boxes(gt_bbox[None, :]), (height, width) )[0] table = [] for rasterize_method, r in results.items(): for paste_method, mask in r.items(): mask = np.asarray(mask) iou = iou_between_full_image_bit_masks(gt_bit_mask.astype("uint8"), mask) table.append((rasterize_method, paste_method, iou)) return table def test_polygon_area(self): # Draw polygon boxes for d in [5.0, 10.0, 1000.0]: polygon = PolygonMasks([[[0, 0, 0, d, d, d, d, 0]]]) area = polygon.area()[0] target = d ** 2 self.assertEqual(area, target) # Draw polygon triangles for d in [5.0, 10.0, 1000.0]: polygon = PolygonMasks([[[0, 0, 0, d, d, d]]]) area = polygon.area()[0] target = d ** 2 / 2 self.assertEqual(area, target) def benchmark_paste(): S = 800 H, W = image_shape = (S, S) N = 64 torch.manual_seed(42) masks = torch.rand(N, 28, 28) center = torch.rand(N, 2) * 600 + 100 wh = torch.clamp(torch.randn(N, 2) * 40 + 200, min=50) x0y0 = torch.clamp(center - wh * 0.5, min=0.0) x1y1 = torch.clamp(center + wh * 0.5, max=S) boxes = Boxes(torch.cat([x0y0, x1y1], axis=1)) def func(device, n=3): m = masks.to(device=device) b = boxes.to(device=device) def bench(): for _ in range(n): paste_masks_in_image(m, b, image_shape) if device.type == "cuda": torch.cuda.synchronize() return bench specs = [{"device": torch.device("cpu"), "n": 3}] if torch.cuda.is_available(): specs.append({"device": torch.device("cuda"), "n": 3}) benchmark(func, "paste_masks", specs, num_iters=10, warmup_iters=2) if __name__ == "__main__": benchmark_paste() unittest.main() ================================================ FILE: tests/test_model_e2e.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import unittest import torch import detectron2.model_zoo as model_zoo from detectron2.config import get_cfg from detectron2.modeling import build_model from detectron2.structures import BitMasks, Boxes, Instances from detectron2.utils.events import EventStorage def get_model_zoo(config_path): """ Like model_zoo.get, but do not load any weights (even pretrained) """ cfg_file = model_zoo.get_config_file(config_path) cfg = get_cfg() cfg.merge_from_file(cfg_file) if not torch.cuda.is_available(): cfg.MODEL.DEVICE = "cpu" return build_model(cfg) def create_model_input(img, inst=None): if inst is not None: return {"image": img, "instances": inst} else: return {"image": img} def get_empty_instance(h, w): inst = Instances((h, w)) inst.gt_boxes = Boxes(torch.rand(0, 4)) inst.gt_classes = torch.tensor([]).to(dtype=torch.int64) inst.gt_masks = BitMasks(torch.rand(0, h, w)) return inst def get_regular_bitmask_instances(h, w): inst = Instances((h, w)) inst.gt_boxes = Boxes(torch.rand(3, 4)) inst.gt_boxes.tensor[:, 2:] += inst.gt_boxes.tensor[:, :2] inst.gt_classes = torch.tensor([3, 4, 5]).to(dtype=torch.int64) inst.gt_masks = BitMasks((torch.rand(3, h, w) > 0.5)) return inst class ModelE2ETest(unittest.TestCase): def setUp(self): self.model = get_model_zoo(self.CONFIG_PATH) def _test_eval(self, input_sizes): inputs = [create_model_input(torch.rand(3, s[0], s[1])) for s in input_sizes] self.model.eval() self.model(inputs) def _test_train(self, input_sizes, instances): assert len(input_sizes) == len(instances) inputs = [ create_model_input(torch.rand(3, s[0], s[1]), inst) for s, inst in zip(input_sizes, instances) ] self.model.train() with EventStorage(): losses = self.model(inputs) sum(losses.values()).backward() del losses class MaskRCNNE2ETest(ModelE2ETest): CONFIG_PATH = "COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml" def test_empty_data(self): instances = [get_empty_instance(200, 250), get_empty_instance(200, 249)] self._test_eval([(200, 250), (200, 249)]) self._test_train([(200, 250), (200, 249)], instances) def test_half_empty_data(self): instances = [get_empty_instance(200, 250), get_regular_bitmask_instances(200, 249)] self._test_train([(200, 250), (200, 249)], instances) class RetinaNetE2ETest(ModelE2ETest): CONFIG_PATH = "COCO-Detection/retinanet_R_50_FPN_1x.yaml" def test_empty_data(self): instances = [get_empty_instance(200, 250), get_empty_instance(200, 249)] self._test_eval([(200, 250), (200, 249)]) self._test_train([(200, 250), (200, 249)], instances) ================================================ FILE: tests/test_model_zoo.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import unittest from detectron2 import model_zoo from detectron2.modeling import FPN, GeneralizedRCNN logger = logging.getLogger(__name__) class TestModelZoo(unittest.TestCase): def test_get_returns_model(self): model = model_zoo.get("Misc/scratch_mask_rcnn_R_50_FPN_3x_gn.yaml", trained=False) self.assertIsInstance(model, GeneralizedRCNN) self.assertIsInstance(model.backbone, FPN) def test_get_invalid_model(self): self.assertRaises(RuntimeError, model_zoo.get, "Invalid/config.yaml") def test_get_url(self): url = model_zoo.get_checkpoint_url("Misc/scratch_mask_rcnn_R_50_FPN_3x_gn.yaml") self.assertEqual( url, "https://dl.fbaipublicfiles.com/detectron2/Misc/scratch_mask_rcnn_R_50_FPN_3x_gn/138602908/model_final_01ca85.pkl", # noqa ) if __name__ == "__main__": unittest.main() ================================================ FILE: tests/test_nms_rotated.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from __future__ import absolute_import, division, print_function, unicode_literals import unittest import torch from torchvision import ops from detectron2.layers import batched_nms, batched_nms_rotated, nms_rotated class TestNMSRotated(unittest.TestCase): def reference_horizontal_nms(self, boxes, scores, iou_threshold): """ Args: box_scores (N, 5): boxes in corner-form and probabilities. (Note here 5 == 4 + 1, i.e., 4-dim horizontal box + 1-dim prob) iou_threshold: intersection over union threshold. Returns: picked: a list of indexes of the kept boxes """ picked = [] _, indexes = scores.sort(descending=True) while len(indexes) > 0: current = indexes[0] picked.append(current.item()) if len(indexes) == 1: break current_box = boxes[current, :] indexes = indexes[1:] rest_boxes = boxes[indexes, :] iou = ops.box_iou(rest_boxes, current_box.unsqueeze(0)).squeeze(1) indexes = indexes[iou <= iou_threshold] return torch.as_tensor(picked) def _create_tensors(self, N): boxes = torch.rand(N, 4) * 100 # Note: the implementation of this function in torchvision is: # boxes[:, 2:] += torch.rand(N, 2) * 100 # but it does not guarantee non-negative widths/heights constraints: # boxes[:, 2] >= boxes[:, 0] and boxes[:, 3] >= boxes[:, 1]: boxes[:, 2:] += boxes[:, :2] scores = torch.rand(N) return boxes, scores def test_batched_nms_rotated_0_degree_cpu(self): # torch.manual_seed(0) N = 2000 num_classes = 50 boxes, scores = self._create_tensors(N) idxs = torch.randint(0, num_classes, (N,)) rotated_boxes = torch.zeros(N, 5) rotated_boxes[:, 0] = (boxes[:, 0] + boxes[:, 2]) / 2.0 rotated_boxes[:, 1] = (boxes[:, 1] + boxes[:, 3]) / 2.0 rotated_boxes[:, 2] = boxes[:, 2] - boxes[:, 0] rotated_boxes[:, 3] = boxes[:, 3] - boxes[:, 1] err_msg = "Rotated NMS with 0 degree is incompatible with horizontal NMS for IoU={}" for iou in [0.2, 0.5, 0.8]: backup = boxes.clone() keep_ref = batched_nms(boxes, scores, idxs, iou) assert torch.allclose(boxes, backup), "boxes modified by batched_nms" backup = rotated_boxes.clone() keep = batched_nms_rotated(rotated_boxes, scores, idxs, iou) assert torch.allclose( rotated_boxes, backup ), "rotated_boxes modified by batched_nms_rotated" assert torch.equal(keep, keep_ref), err_msg.format(iou) @unittest.skipIf(not torch.cuda.is_available(), "CUDA unavailable") def test_batched_nms_rotated_0_degree_cuda(self): # torch.manual_seed(0) N = 2000 num_classes = 50 boxes, scores = self._create_tensors(N) idxs = torch.randint(0, num_classes, (N,)) rotated_boxes = torch.zeros(N, 5) rotated_boxes[:, 0] = (boxes[:, 0] + boxes[:, 2]) / 2.0 rotated_boxes[:, 1] = (boxes[:, 1] + boxes[:, 3]) / 2.0 rotated_boxes[:, 2] = boxes[:, 2] - boxes[:, 0] rotated_boxes[:, 3] = boxes[:, 3] - boxes[:, 1] err_msg = "Rotated NMS with 0 degree is incompatible with horizontal NMS for IoU={}" for iou in [0.2, 0.5, 0.8]: backup = boxes.clone() keep_ref = batched_nms(boxes.cuda(), scores.cuda(), idxs, iou) assert torch.allclose(boxes, backup), "boxes modified by batched_nms" backup = rotated_boxes.clone() keep = batched_nms_rotated(rotated_boxes.cuda(), scores.cuda(), idxs, iou) assert torch.allclose( rotated_boxes, backup ), "rotated_boxes modified by batched_nms_rotated" assert torch.equal(keep, keep_ref), err_msg.format(iou) def test_nms_rotated_0_degree_cpu(self): N = 1000 boxes, scores = self._create_tensors(N) rotated_boxes = torch.zeros(N, 5) rotated_boxes[:, 0] = (boxes[:, 0] + boxes[:, 2]) / 2.0 rotated_boxes[:, 1] = (boxes[:, 1] + boxes[:, 3]) / 2.0 rotated_boxes[:, 2] = boxes[:, 2] - boxes[:, 0] rotated_boxes[:, 3] = boxes[:, 3] - boxes[:, 1] err_msg = "Rotated NMS incompatible between CPU and reference implementation for IoU={}" for iou in [0.5]: keep_ref = self.reference_horizontal_nms(boxes, scores, iou) keep = nms_rotated(rotated_boxes, scores, iou) assert torch.equal(keep, keep_ref), err_msg.format(iou) def test_nms_rotated_90_degrees_cpu(self): N = 1000 boxes, scores = self._create_tensors(N) rotated_boxes = torch.zeros(N, 5) rotated_boxes[:, 0] = (boxes[:, 0] + boxes[:, 2]) / 2.0 rotated_boxes[:, 1] = (boxes[:, 1] + boxes[:, 3]) / 2.0 # Note for rotated_boxes[:, 2] and rotated_boxes[:, 3]: # widths and heights are intentionally swapped here for 90 degrees case # so that the reference horizontal nms could be used rotated_boxes[:, 2] = boxes[:, 3] - boxes[:, 1] rotated_boxes[:, 3] = boxes[:, 2] - boxes[:, 0] rotated_boxes[:, 4] = torch.ones(N) * 90 err_msg = "Rotated NMS incompatible between CPU and reference implementation for IoU={}" for iou in [0.2, 0.5, 0.8]: keep_ref = self.reference_horizontal_nms(boxes, scores, iou) keep = nms_rotated(rotated_boxes, scores, iou) assert torch.equal(keep, keep_ref), err_msg.format(iou) def test_nms_rotated_180_degrees_cpu(self): N = 1000 boxes, scores = self._create_tensors(N) rotated_boxes = torch.zeros(N, 5) rotated_boxes[:, 0] = (boxes[:, 0] + boxes[:, 2]) / 2.0 rotated_boxes[:, 1] = (boxes[:, 1] + boxes[:, 3]) / 2.0 rotated_boxes[:, 2] = boxes[:, 2] - boxes[:, 0] rotated_boxes[:, 3] = boxes[:, 3] - boxes[:, 1] rotated_boxes[:, 4] = torch.ones(N) * 180 err_msg = "Rotated NMS incompatible between CPU and reference implementation for IoU={}" for iou in [0.2, 0.5, 0.8]: keep_ref = self.reference_horizontal_nms(boxes, scores, iou) keep = nms_rotated(rotated_boxes, scores, iou) assert torch.equal(keep, keep_ref), err_msg.format(iou) @unittest.skipIf(not torch.cuda.is_available(), "CUDA unavailable") def test_nms_rotated_0_degree_cuda(self): N = 1000 boxes, scores = self._create_tensors(N) rotated_boxes = torch.zeros(N, 5) rotated_boxes[:, 0] = (boxes[:, 0] + boxes[:, 2]) / 2.0 rotated_boxes[:, 1] = (boxes[:, 1] + boxes[:, 3]) / 2.0 rotated_boxes[:, 2] = boxes[:, 2] - boxes[:, 0] rotated_boxes[:, 3] = boxes[:, 3] - boxes[:, 1] err_msg = "Rotated NMS incompatible between CPU and CUDA for IoU={}" for iou in [0.2, 0.5, 0.8]: r_cpu = nms_rotated(rotated_boxes, scores, iou) r_cuda = nms_rotated(rotated_boxes.cuda(), scores.cuda(), iou) assert torch.equal(r_cpu, r_cuda.cpu()), err_msg.format(iou) if __name__ == "__main__": unittest.main() ================================================ FILE: tests/test_roi_align.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import numpy as np import unittest import cv2 import torch from detectron2.layers.roi_align import ROIAlign class ROIAlignTest(unittest.TestCase): def test_forward_output(self): input = np.arange(25).reshape(5, 5).astype("float32") """ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 """ output = self._simple_roialign(input, [1, 1, 3, 3], (4, 4), aligned=False) output_correct = self._simple_roialign(input, [1, 1, 3, 3], (4, 4), aligned=True) # without correction: old_results = [ [7.5, 8, 8.5, 9], [10, 10.5, 11, 11.5], [12.5, 13, 13.5, 14], [15, 15.5, 16, 16.5], ] # with 0.5 correction: correct_results = [ [4.5, 5.0, 5.5, 6.0], [7.0, 7.5, 8.0, 8.5], [9.5, 10.0, 10.5, 11.0], [12.0, 12.5, 13.0, 13.5], ] # This is an upsampled version of [[6, 7], [11, 12]] self.assertTrue(np.allclose(output.flatten(), np.asarray(old_results).flatten())) self.assertTrue( np.allclose(output_correct.flatten(), np.asarray(correct_results).flatten()) ) # Also see similar issues in tensorflow at # https://github.com/tensorflow/tensorflow/issues/26278 def test_resize(self): H, W = 30, 30 input = np.random.rand(H, W).astype("float32") * 100 box = [10, 10, 20, 20] output = self._simple_roialign(input, box, (5, 5), aligned=True) input2x = cv2.resize(input, (W // 2, H // 2), interpolation=cv2.INTER_LINEAR) box2x = [x / 2 for x in box] output2x = self._simple_roialign(input2x, box2x, (5, 5), aligned=True) diff = np.abs(output2x - output) self.assertTrue(diff.max() < 1e-4) def _simple_roialign(self, img, box, resolution, aligned=True): """ RoiAlign with scale 1.0 and 0 sample ratio. """ if isinstance(resolution, int): resolution = (resolution, resolution) op = ROIAlign(resolution, 1.0, 0, aligned=aligned) input = torch.from_numpy(img[None, None, :, :].astype("float32")) rois = [0] + list(box) rois = torch.from_numpy(np.asarray(rois)[None, :].astype("float32")) output = op.forward(input, rois) if torch.cuda.is_available(): output_cuda = op.forward(input.cuda(), rois.cuda()).cpu() self.assertTrue(torch.allclose(output, output_cuda)) return output[0, 0] def _simple_roialign_with_grad(self, img, box, resolution, device): if isinstance(resolution, int): resolution = (resolution, resolution) op = ROIAlign(resolution, 1.0, 0, aligned=True) input = torch.from_numpy(img[None, None, :, :].astype("float32")) rois = [0] + list(box) rois = torch.from_numpy(np.asarray(rois)[None, :].astype("float32")) input = input.to(device=device) rois = rois.to(device=device) input.requires_grad = True output = op.forward(input, rois) return input, output def test_empty_box(self): img = np.random.rand(5, 5) box = [3, 4, 5, 4] o = self._simple_roialign(img, box, 7) self.assertTrue(o.shape == (7, 7)) self.assertTrue((o == 0).all()) for dev in ["cpu"] + ["cuda"] if torch.cuda.is_available() else []: input, output = self._simple_roialign_with_grad(img, box, 7, torch.device(dev)) output.sum().backward() self.assertTrue(torch.allclose(input.grad, torch.zeros_like(input))) def test_empty_batch(self): input = torch.zeros(0, 3, 10, 10, dtype=torch.float32) rois = torch.zeros(0, 5, dtype=torch.float32) op = ROIAlign((7, 7), 1.0, 0, aligned=True) output = op.forward(input, rois) self.assertTrue(output.shape == (0, 3, 7, 7)) if __name__ == "__main__": unittest.main() ================================================ FILE: tests/test_roi_align_rotated.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import unittest import cv2 import torch from torch.autograd import Variable, gradcheck from detectron2.layers.roi_align import ROIAlign from detectron2.layers.roi_align_rotated import ROIAlignRotated logger = logging.getLogger(__name__) class ROIAlignRotatedTest(unittest.TestCase): def _box_to_rotated_box(self, box, angle): return [ (box[0] + box[2]) / 2.0, (box[1] + box[3]) / 2.0, box[2] - box[0], box[3] - box[1], angle, ] def _rot90(self, img, num): num = num % 4 # note: -1 % 4 == 3 for _ in range(num): img = img.transpose(0, 1).flip(0) return img def test_forward_output_0_90_180_270(self): for i in range(4): # i = 0, 1, 2, 3 corresponding to 0, 90, 180, 270 degrees img = torch.arange(25, dtype=torch.float32).reshape(5, 5) """ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 """ box = [1, 1, 3, 3] rotated_box = self._box_to_rotated_box(box=box, angle=90 * i) result = self._simple_roi_align_rotated(img=img, box=rotated_box, resolution=(4, 4)) # Here's an explanation for 0 degree case: # point 0 in the original input lies at [0.5, 0.5] # (the center of bin [0, 1] x [0, 1]) # point 1 in the original input lies at [1.5, 0.5], etc. # since the resolution is (4, 4) that divides [1, 3] x [1, 3] # into 4 x 4 equal bins, # the top-left bin is [1, 1.5] x [1, 1.5], and its center # (1.25, 1.25) lies at the 3/4 position # between point 0 and point 1, point 5 and point 6, # point 0 and point 5, point 1 and point 6, so it can be calculated as # 0.25*(0*0.25+1*0.75)+(5*0.25+6*0.75)*0.75 = 4.5 result_expected = torch.tensor( [ [4.5, 5.0, 5.5, 6.0], [7.0, 7.5, 8.0, 8.5], [9.5, 10.0, 10.5, 11.0], [12.0, 12.5, 13.0, 13.5], ] ) # This is also an upsampled version of [[6, 7], [11, 12]] # When the box is rotated by 90 degrees CCW, # the result would be rotated by 90 degrees CW, thus it's -i here result_expected = self._rot90(result_expected, -i) assert torch.allclose(result, result_expected) def test_resize(self): H, W = 30, 30 input = torch.rand(H, W) * 100 box = [10, 10, 20, 20] rotated_box = self._box_to_rotated_box(box, angle=0) output = self._simple_roi_align_rotated(img=input, box=rotated_box, resolution=(5, 5)) input2x = cv2.resize(input.numpy(), (W // 2, H // 2), interpolation=cv2.INTER_LINEAR) input2x = torch.from_numpy(input2x) box2x = [x / 2 for x in box] rotated_box2x = self._box_to_rotated_box(box2x, angle=0) output2x = self._simple_roi_align_rotated(img=input2x, box=rotated_box2x, resolution=(5, 5)) assert torch.allclose(output2x, output) def _simple_roi_align_rotated(self, img, box, resolution): """ RoiAlignRotated with scale 1.0 and 0 sample ratio. """ op = ROIAlignRotated(output_size=resolution, spatial_scale=1.0, sampling_ratio=0) input = img[None, None, :, :] rois = [0] + list(box) rois = torch.tensor(rois, dtype=torch.float32)[None, :] result_cpu = op.forward(input, rois) if torch.cuda.is_available(): result_cuda = op.forward(input.cuda(), rois.cuda()) assert torch.allclose(result_cpu, result_cuda.cpu()) return result_cpu[0, 0] def test_empty_box(self): img = torch.rand(5, 5) out = self._simple_roi_align_rotated(img, [2, 3, 0, 0, 0], (7, 7)) self.assertTrue((out == 0).all()) def test_roi_align_rotated_gradcheck_cpu(self): dtype = torch.float64 device = torch.device("cpu") roi_align_rotated_op = ROIAlignRotated( output_size=(5, 5), spatial_scale=0.5, sampling_ratio=1 ).to(dtype=dtype, device=device) x = torch.rand(1, 1, 10, 10, dtype=dtype, device=device, requires_grad=True) # roi format is (batch index, x_center, y_center, width, height, angle) rois = torch.tensor( [[0, 4.5, 4.5, 9, 9, 0], [0, 2, 7, 4, 4, 0], [0, 7, 7, 4, 4, 0]], dtype=dtype, device=device, ) def func(input): return roi_align_rotated_op(input, rois) assert gradcheck(func, (x,)), "gradcheck failed for RoIAlignRotated CPU" assert gradcheck(func, (x.transpose(2, 3),)), "gradcheck failed for RoIAlignRotated CPU" @unittest.skipIf(not torch.cuda.is_available(), "CUDA unavailable") def test_roi_align_rotated_gradient_cuda(self): """ Compute gradients for ROIAlignRotated with multiple bounding boxes on the GPU, and compare the result with ROIAlign """ # torch.manual_seed(123) dtype = torch.float64 device = torch.device("cuda") pool_h, pool_w = (5, 5) roi_align = ROIAlign(output_size=(pool_h, pool_w), spatial_scale=1, sampling_ratio=2).to( device=device ) roi_align_rotated = ROIAlignRotated( output_size=(pool_h, pool_w), spatial_scale=1, sampling_ratio=2 ).to(device=device) x = torch.rand(1, 1, 10, 10, dtype=dtype, device=device, requires_grad=True) # x_rotated = x.clone() won't work (will lead to grad_fun=CloneBackward)! x_rotated = Variable(x.data.clone(), requires_grad=True) # roi_rotated format is (batch index, x_center, y_center, width, height, angle) rois_rotated = torch.tensor( [[0, 4.5, 4.5, 9, 9, 0], [0, 2, 7, 4, 4, 0], [0, 7, 7, 4, 4, 0]], dtype=dtype, device=device, ) y_rotated = roi_align_rotated(x_rotated, rois_rotated) s_rotated = y_rotated.sum() s_rotated.backward() # roi format is (batch index, x1, y1, x2, y2) rois = torch.tensor( [[0, 0, 0, 9, 9], [0, 0, 5, 4, 9], [0, 5, 5, 9, 9]], dtype=dtype, device=device ) y = roi_align(x, rois) s = y.sum() s.backward() assert torch.allclose( x.grad, x_rotated.grad ), "gradients for ROIAlign and ROIAlignRotated mismatch on CUDA" if __name__ == "__main__": unittest.main() ================================================ FILE: tests/test_roi_heads.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import unittest import torch from detectron2.config import get_cfg from detectron2.modeling.backbone import build_backbone from detectron2.modeling.proposal_generator.build import build_proposal_generator from detectron2.modeling.roi_heads import build_roi_heads from detectron2.structures import Boxes, ImageList, Instances, RotatedBoxes from detectron2.utils.events import EventStorage logger = logging.getLogger(__name__) class ROIHeadsTest(unittest.TestCase): def test_roi_heads(self): torch.manual_seed(121) cfg = get_cfg() cfg.MODEL.ROI_HEADS.NAME = "StandardROIHeads" cfg.MODEL.ROI_BOX_HEAD.NAME = "FastRCNNConvFCHead" cfg.MODEL.ROI_BOX_HEAD.NUM_FC = 2 cfg.MODEL.ROI_BOX_HEAD.POOLER_TYPE = "ROIAlignV2" cfg.MODEL.ROI_BOX_HEAD.BBOX_REG_WEIGHTS = (10, 10, 5, 5) backbone = build_backbone(cfg) num_images = 2 images_tensor = torch.rand(num_images, 20, 30) image_sizes = [(10, 10), (20, 30)] images = ImageList(images_tensor, image_sizes) num_channels = 1024 features = {"res4": torch.rand(num_images, num_channels, 1, 2)} image_shape = (15, 15) gt_boxes0 = torch.tensor([[1, 1, 3, 3], [2, 2, 6, 6]], dtype=torch.float32) gt_instance0 = Instances(image_shape) gt_instance0.gt_boxes = Boxes(gt_boxes0) gt_instance0.gt_classes = torch.tensor([2, 1]) gt_boxes1 = torch.tensor([[1, 5, 2, 8], [7, 3, 10, 5]], dtype=torch.float32) gt_instance1 = Instances(image_shape) gt_instance1.gt_boxes = Boxes(gt_boxes1) gt_instance1.gt_classes = torch.tensor([1, 2]) gt_instances = [gt_instance0, gt_instance1] proposal_generator = build_proposal_generator(cfg, backbone.output_shape()) roi_heads = build_roi_heads(cfg, backbone.output_shape()) with EventStorage(): # capture events in a new storage to discard them proposals, proposal_losses = proposal_generator(images, features, gt_instances) _, detector_losses = roi_heads(images, features, proposals, gt_instances) expected_losses = { "loss_cls": torch.tensor(4.4236516953), "loss_box_reg": torch.tensor(0.0091214813), } for name in expected_losses.keys(): assert torch.allclose(detector_losses[name], expected_losses[name]) def test_rroi_heads(self): torch.manual_seed(121) cfg = get_cfg() cfg.MODEL.PROPOSAL_GENERATOR.NAME = "RRPN" cfg.MODEL.ANCHOR_GENERATOR.NAME = "RotatedAnchorGenerator" cfg.MODEL.ROI_HEADS.NAME = "RROIHeads" cfg.MODEL.ROI_BOX_HEAD.NAME = "FastRCNNConvFCHead" cfg.MODEL.ROI_BOX_HEAD.NUM_FC = 2 cfg.MODEL.RPN.BBOX_REG_WEIGHTS = (1, 1, 1, 1, 1) cfg.MODEL.RPN.HEAD_NAME = "StandardRPNHead" cfg.MODEL.ROI_BOX_HEAD.POOLER_TYPE = "ROIAlignRotated" cfg.MODEL.ROI_BOX_HEAD.BBOX_REG_WEIGHTS = (10, 10, 5, 5, 1) backbone = build_backbone(cfg) num_images = 2 images_tensor = torch.rand(num_images, 20, 30) image_sizes = [(10, 10), (20, 30)] images = ImageList(images_tensor, image_sizes) num_channels = 1024 features = {"res4": torch.rand(num_images, num_channels, 1, 2)} image_shape = (15, 15) gt_boxes0 = torch.tensor([[2, 2, 2, 2, 30], [4, 4, 4, 4, 0]], dtype=torch.float32) gt_instance0 = Instances(image_shape) gt_instance0.gt_boxes = RotatedBoxes(gt_boxes0) gt_instance0.gt_classes = torch.tensor([2, 1]) gt_boxes1 = torch.tensor([[1.5, 5.5, 1, 3, 0], [8.5, 4, 3, 2, -50]], dtype=torch.float32) gt_instance1 = Instances(image_shape) gt_instance1.gt_boxes = RotatedBoxes(gt_boxes1) gt_instance1.gt_classes = torch.tensor([1, 2]) gt_instances = [gt_instance0, gt_instance1] proposal_generator = build_proposal_generator(cfg, backbone.output_shape()) roi_heads = build_roi_heads(cfg, backbone.output_shape()) with EventStorage(): # capture events in a new storage to discard them proposals, proposal_losses = proposal_generator(images, features, gt_instances) _, detector_losses = roi_heads(images, features, proposals, gt_instances) expected_losses = { "loss_cls": torch.tensor(4.381443977355957), "loss_box_reg": torch.tensor(0.0011560433777049184), } for name in expected_losses.keys(): err_msg = "detector_losses[{}] = {}, expected losses = {}".format( name, detector_losses[name], expected_losses[name] ) assert torch.allclose(detector_losses[name], expected_losses[name]), err_msg if __name__ == "__main__": unittest.main() ================================================ FILE: tests/test_roi_pooler.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import unittest import torch from detectron2.modeling.poolers import ROIPooler from detectron2.structures import Boxes, RotatedBoxes logger = logging.getLogger(__name__) class TestROIPooler(unittest.TestCase): def _rand_boxes(self, num_boxes, x_max, y_max): coords = torch.rand(num_boxes, 4) coords[:, 0] *= x_max coords[:, 1] *= y_max coords[:, 2] *= x_max coords[:, 3] *= y_max boxes = torch.zeros(num_boxes, 4) boxes[:, 0] = torch.min(coords[:, 0], coords[:, 2]) boxes[:, 1] = torch.min(coords[:, 1], coords[:, 3]) boxes[:, 2] = torch.max(coords[:, 0], coords[:, 2]) boxes[:, 3] = torch.max(coords[:, 1], coords[:, 3]) return boxes def _test_roialignv2_roialignrotated_match(self, device): pooler_resolution = 14 canonical_level = 4 canonical_scale_factor = 2 ** canonical_level pooler_scales = (1.0 / canonical_scale_factor,) sampling_ratio = 0 N, C, H, W = 2, 4, 10, 8 N_rois = 10 std = 11 mean = 0 feature = (torch.rand(N, C, H, W) - 0.5) * 2 * std + mean features = [feature.to(device)] rois = [] rois_rotated = [] for _ in range(N): boxes = self._rand_boxes( num_boxes=N_rois, x_max=W * canonical_scale_factor, y_max=H * canonical_scale_factor ) rotated_boxes = torch.zeros(N_rois, 5) rotated_boxes[:, 0] = (boxes[:, 0] + boxes[:, 2]) / 2.0 rotated_boxes[:, 1] = (boxes[:, 1] + boxes[:, 3]) / 2.0 rotated_boxes[:, 2] = boxes[:, 2] - boxes[:, 0] rotated_boxes[:, 3] = boxes[:, 3] - boxes[:, 1] rois.append(Boxes(boxes).to(device)) rois_rotated.append(RotatedBoxes(rotated_boxes).to(device)) roialignv2_pooler = ROIPooler( output_size=pooler_resolution, scales=pooler_scales, sampling_ratio=sampling_ratio, pooler_type="ROIAlignV2", ) roialignv2_out = roialignv2_pooler(features, rois) roialignrotated_pooler = ROIPooler( output_size=pooler_resolution, scales=pooler_scales, sampling_ratio=sampling_ratio, pooler_type="ROIAlignRotated", ) roialignrotated_out = roialignrotated_pooler(features, rois_rotated) assert torch.allclose(roialignv2_out, roialignrotated_out, atol=1e-4) def test_roialignv2_roialignrotated_match_cpu(self): self._test_roialignv2_roialignrotated_match(device="cpu") @unittest.skipIf(not torch.cuda.is_available(), "CUDA unavailable") def test_roialignv2_roialignrotated_match_cuda(self): self._test_roialignv2_roialignrotated_match(device="cuda") if __name__ == "__main__": unittest.main() ================================================ FILE: tests/test_rotated_boxes.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from __future__ import absolute_import, division, print_function, unicode_literals import logging import math import random import unittest import torch from fvcore.common.benchmark import benchmark from detectron2.layers.rotated_boxes import pairwise_iou_rotated from detectron2.structures.boxes import Boxes from detectron2.structures.rotated_boxes import RotatedBoxes, pairwise_iou logger = logging.getLogger(__name__) class TestRotatedBoxesLayer(unittest.TestCase): def test_iou_0_dim_cpu(self): boxes1 = torch.rand(0, 5, dtype=torch.float32) boxes2 = torch.rand(10, 5, dtype=torch.float32) expected_ious = torch.zeros(0, 10, dtype=torch.float32) ious = pairwise_iou_rotated(boxes1, boxes2) assert torch.allclose(ious, expected_ious) boxes1 = torch.rand(10, 5, dtype=torch.float32) boxes2 = torch.rand(0, 5, dtype=torch.float32) expected_ious = torch.zeros(10, 0, dtype=torch.float32) ious = pairwise_iou_rotated(boxes1, boxes2) assert torch.allclose(ious, expected_ious) @unittest.skipIf(not torch.cuda.is_available(), "CUDA not available") def test_iou_0_dim_cuda(self): boxes1 = torch.rand(0, 5, dtype=torch.float32) boxes2 = torch.rand(10, 5, dtype=torch.float32) expected_ious = torch.zeros(0, 10, dtype=torch.float32) ious_cuda = pairwise_iou_rotated(boxes1.cuda(), boxes2.cuda()) assert torch.allclose(ious_cuda.cpu(), expected_ious) boxes1 = torch.rand(10, 5, dtype=torch.float32) boxes2 = torch.rand(0, 5, dtype=torch.float32) expected_ious = torch.zeros(10, 0, dtype=torch.float32) ious_cuda = pairwise_iou_rotated(boxes1.cuda(), boxes2.cuda()) assert torch.allclose(ious_cuda.cpu(), expected_ious) def test_iou_half_overlap_cpu(self): boxes1 = torch.tensor([[0.5, 0.5, 1.0, 1.0, 0.0]], dtype=torch.float32) boxes2 = torch.tensor([[0.25, 0.5, 0.5, 1.0, 0.0]], dtype=torch.float32) expected_ious = torch.tensor([[0.5]], dtype=torch.float32) ious = pairwise_iou_rotated(boxes1, boxes2) assert torch.allclose(ious, expected_ious) @unittest.skipIf(not torch.cuda.is_available(), "CUDA not available") def test_iou_half_overlap_cuda(self): boxes1 = torch.tensor([[0.5, 0.5, 1.0, 1.0, 0.0]], dtype=torch.float32) boxes2 = torch.tensor([[0.25, 0.5, 0.5, 1.0, 0.0]], dtype=torch.float32) expected_ious = torch.tensor([[0.5]], dtype=torch.float32) ious_cuda = pairwise_iou_rotated(boxes1.cuda(), boxes2.cuda()) assert torch.allclose(ious_cuda.cpu(), expected_ious) def test_iou_0_degree_cpu(self): boxes1 = torch.tensor( [[0.5, 0.5, 1.0, 1.0, 0.0], [0.5, 0.5, 1.0, 1.0, 0.0]], dtype=torch.float32 ) boxes2 = torch.tensor( [ [0.5, 0.5, 1.0, 1.0, 0.0], [0.25, 0.5, 0.5, 1.0, 0.0], [0.5, 0.25, 1.0, 0.5, 0.0], [0.25, 0.25, 0.5, 0.5, 0.0], [0.75, 0.75, 0.5, 0.5, 0.0], [1.0, 1.0, 1.0, 1.0, 0.0], ], dtype=torch.float32, ) expected_ious = torch.tensor( [ [1.0, 0.5, 0.5, 0.25, 0.25, 0.25 / (2 - 0.25)], [1.0, 0.5, 0.5, 0.25, 0.25, 0.25 / (2 - 0.25)], ], dtype=torch.float32, ) ious = pairwise_iou_rotated(boxes1, boxes2) assert torch.allclose(ious, expected_ious) @unittest.skipIf(not torch.cuda.is_available(), "CUDA not available") def test_iou_0_degree_cuda(self): boxes1 = torch.tensor( [[0.5, 0.5, 1.0, 1.0, 0.0], [0.5, 0.5, 1.0, 1.0, 0.0]], dtype=torch.float32 ) boxes2 = torch.tensor( [ [0.5, 0.5, 1.0, 1.0, 0.0], [0.25, 0.5, 0.5, 1.0, 0.0], [0.5, 0.25, 1.0, 0.5, 0.0], [0.25, 0.25, 0.5, 0.5, 0.0], [0.75, 0.75, 0.5, 0.5, 0.0], [1.0, 1.0, 1.0, 1.0, 0.0], ], dtype=torch.float32, ) expected_ious = torch.tensor( [ [1.0, 0.5, 0.5, 0.25, 0.25, 0.25 / (2 - 0.25)], [1.0, 0.5, 0.5, 0.25, 0.25, 0.25 / (2 - 0.25)], ], dtype=torch.float32, ) ious_cuda = pairwise_iou_rotated(boxes1.cuda(), boxes2.cuda()) assert torch.allclose(ious_cuda.cpu(), expected_ious) def test_iou_45_degrees_cpu(self): boxes1 = torch.tensor( [ [1, 1, math.sqrt(2), math.sqrt(2), 45], [1, 1, 2 * math.sqrt(2), 2 * math.sqrt(2), -45], ], dtype=torch.float32, ) boxes2 = torch.tensor([[1, 1, 2, 2, 0]], dtype=torch.float32) expected_ious = torch.tensor([[0.5], [0.5]], dtype=torch.float32) ious = pairwise_iou_rotated(boxes1, boxes2) assert torch.allclose(ious, expected_ious) @unittest.skipIf(not torch.cuda.is_available(), "CUDA not available") def test_iou_45_degrees_cuda(self): boxes1 = torch.tensor( [ [1, 1, math.sqrt(2), math.sqrt(2), 45], [1, 1, 2 * math.sqrt(2), 2 * math.sqrt(2), -45], ], dtype=torch.float32, ) boxes2 = torch.tensor([[1, 1, 2, 2, 0]], dtype=torch.float32) expected_ious = torch.tensor([[0.5], [0.5]], dtype=torch.float32) ious_cuda = pairwise_iou_rotated(boxes1.cuda(), boxes2.cuda()) assert torch.allclose(ious_cuda.cpu(), expected_ious) def test_iou_perpendicular_cpu(self): boxes1 = torch.tensor([[5, 5, 10.0, 6, 55]], dtype=torch.float32) boxes2 = torch.tensor([[5, 5, 10.0, 6, -35]], dtype=torch.float32) iou = (6.0 * 6.0) / (6.0 * 6.0 + 4.0 * 6.0 + 4.0 * 6.0) expected_ious = torch.tensor([[iou]], dtype=torch.float32) ious = pairwise_iou_rotated(boxes1, boxes2) assert torch.allclose(ious, expected_ious) @unittest.skipIf(not torch.cuda.is_available(), "CUDA unavailable") def test_iou_perpendicular_cuda(self): boxes1 = torch.tensor([[5, 5, 10.0, 6, 55]], dtype=torch.float32) boxes2 = torch.tensor([[5, 5, 10.0, 6, -35]], dtype=torch.float32) iou = (6.0 * 6.0) / (6.0 * 6.0 + 4.0 * 6.0 + 4.0 * 6.0) expected_ious = torch.tensor([[iou]], dtype=torch.float32) ious_cuda = pairwise_iou_rotated(boxes1.cuda(), boxes2.cuda()) assert torch.allclose(ious_cuda.cpu(), expected_ious) def test_iou_large_close_boxes_cpu(self): boxes1 = torch.tensor( [[299.500000, 417.370422, 600.000000, 364.259186, 27.1828]], dtype=torch.float32 ) boxes2 = torch.tensor( [[299.500000, 417.370422, 600.000000, 364.259155, 27.1828]], dtype=torch.float32 ) iou = 364.259155 / 364.259186 expected_ious = torch.tensor([[iou]], dtype=torch.float32) ious = pairwise_iou_rotated(boxes1, boxes2) assert torch.allclose(ious, expected_ious) @unittest.skipIf(not torch.cuda.is_available(), "CUDA not available") def test_iou_large_close_boxes_cuda(self): boxes1 = torch.tensor( [[299.500000, 417.370422, 600.000000, 364.259186, 27.1828]], dtype=torch.float32 ) boxes2 = torch.tensor( [[299.500000, 417.370422, 600.000000, 364.259155, 27.1828]], dtype=torch.float32 ) iou = 364.259155 / 364.259186 expected_ious = torch.tensor([[iou]], dtype=torch.float32) ious_cuda = pairwise_iou_rotated(boxes1.cuda(), boxes2.cuda()) assert torch.allclose(ious_cuda.cpu(), expected_ious) def test_iou_precision_cpu(self): boxes1 = torch.tensor([[565, 565, 10, 10, 0]], dtype=torch.float32) boxes2 = torch.tensor([[565, 565, 10, 8.3, 0]], dtype=torch.float32) iou = 8.3 / 10.0 expected_ious = torch.tensor([[iou]], dtype=torch.float32) ious = pairwise_iou_rotated(boxes1, boxes2) assert torch.allclose(ious, expected_ious) @unittest.skipIf(not torch.cuda.is_available(), "CUDA not available") def test_iou_precision_cuda(self): boxes1 = torch.tensor([[565, 565, 10, 10, 0]], dtype=torch.float32) boxes2 = torch.tensor([[565, 565, 10, 8.3, 0]], dtype=torch.float32) iou = 8.3 / 10.0 expected_ious = torch.tensor([[iou]], dtype=torch.float32) ious_cuda = pairwise_iou_rotated(boxes1.cuda(), boxes2.cuda()) assert torch.allclose(ious_cuda.cpu(), expected_ious) def test_iou_many_boxes_cpu(self): num_boxes1 = 100 num_boxes2 = 200 boxes1 = torch.stack( [ torch.tensor([5 + 20 * i, 5 + 20 * i, 10, 10, 0], dtype=torch.float32) for i in range(num_boxes1) ] ) boxes2 = torch.stack( [ torch.tensor( [5 + 20 * i, 5 + 20 * i, 10, 1 + 9 * i / num_boxes2, 0], dtype=torch.float32 ) for i in range(num_boxes2) ] ) expected_ious = torch.zeros(num_boxes1, num_boxes2, dtype=torch.float32) for i in range(min(num_boxes1, num_boxes2)): expected_ious[i][i] = (1 + 9 * i / num_boxes2) / 10.0 ious = pairwise_iou_rotated(boxes1, boxes2) assert torch.allclose(ious, expected_ious) @unittest.skipIf(not torch.cuda.is_available(), "CUDA not available") def test_iou_many_boxes_cuda(self): num_boxes1 = 100 num_boxes2 = 200 boxes1 = torch.stack( [ torch.tensor([5 + 20 * i, 5 + 20 * i, 10, 10, 0], dtype=torch.float32) for i in range(num_boxes1) ] ) boxes2 = torch.stack( [ torch.tensor( [5 + 20 * i, 5 + 20 * i, 10, 1 + 9 * i / num_boxes2, 0], dtype=torch.float32 ) for i in range(num_boxes2) ] ) expected_ious = torch.zeros(num_boxes1, num_boxes2, dtype=torch.float32) for i in range(min(num_boxes1, num_boxes2)): expected_ious[i][i] = (1 + 9 * i / num_boxes2) / 10.0 ious_cuda = pairwise_iou_rotated(boxes1.cuda(), boxes2.cuda()) assert torch.allclose(ious_cuda.cpu(), expected_ious) @unittest.skipIf(not torch.cuda.is_available(), "CUDA not available") def test_iou_too_many_boxes_cuda(self): s1, s2 = 5, 1289035 boxes1 = torch.zeros(s1, 5) boxes2 = torch.zeros(s2, 5) ious_cuda = pairwise_iou_rotated(boxes1.cuda(), boxes2.cuda()) self.assertTrue(tuple(ious_cuda.shape), (s1, s2)) class TestRotatedBoxesStructure(unittest.TestCase): def test_clip_area_0_degree(self): for _ in range(50): num_boxes = 100 boxes_5d = torch.zeros(num_boxes, 5) boxes_5d[:, 0] = torch.FloatTensor(num_boxes).uniform_(-100, 500) boxes_5d[:, 1] = torch.FloatTensor(num_boxes).uniform_(-100, 500) boxes_5d[:, 2] = torch.FloatTensor(num_boxes).uniform_(0, 500) boxes_5d[:, 3] = torch.FloatTensor(num_boxes).uniform_(0, 500) # Convert from (x_ctr, y_ctr, w, h, 0) to (x1, y1, x2, y2) boxes_4d = torch.zeros(num_boxes, 4) boxes_4d[:, 0] = boxes_5d[:, 0] - boxes_5d[:, 2] / 2.0 boxes_4d[:, 1] = boxes_5d[:, 1] - boxes_5d[:, 3] / 2.0 boxes_4d[:, 2] = boxes_5d[:, 0] + boxes_5d[:, 2] / 2.0 boxes_4d[:, 3] = boxes_5d[:, 1] + boxes_5d[:, 3] / 2.0 image_size = (500, 600) test_boxes_4d = Boxes(boxes_4d) test_boxes_5d = RotatedBoxes(boxes_5d) # Before clip areas_4d = test_boxes_4d.area() areas_5d = test_boxes_5d.area() assert torch.allclose(areas_4d, areas_5d, atol=1e-1, rtol=1e-5) # After clip test_boxes_4d.clip(image_size) test_boxes_5d.clip(image_size) areas_4d = test_boxes_4d.area() areas_5d = test_boxes_5d.area() assert torch.allclose(areas_4d, areas_5d, atol=1e-1, rtol=1e-5) def test_clip_area_arbitrary_angle(self): num_boxes = 100 boxes_5d = torch.zeros(num_boxes, 5) boxes_5d[:, 0] = torch.FloatTensor(num_boxes).uniform_(-100, 500) boxes_5d[:, 1] = torch.FloatTensor(num_boxes).uniform_(-100, 500) boxes_5d[:, 2] = torch.FloatTensor(num_boxes).uniform_(0, 500) boxes_5d[:, 3] = torch.FloatTensor(num_boxes).uniform_(0, 500) boxes_5d[:, 4] = torch.FloatTensor(num_boxes).uniform_(-1800, 1800) clip_angle_threshold = random.uniform(0, 180) image_size = (500, 600) test_boxes_5d = RotatedBoxes(boxes_5d) # Before clip areas_before = test_boxes_5d.area() # After clip test_boxes_5d.clip(image_size, clip_angle_threshold) areas_diff = test_boxes_5d.area() - areas_before # the areas should only decrease after clipping assert torch.all(areas_diff <= 0) # whenever the box is clipped (thus the area shrinks), # the angle for the box must be within the clip_angle_threshold # Note that the clip function will normalize the angle range # to be within (-180, 180] assert torch.all( torch.abs(boxes_5d[:, 4][torch.where(areas_diff < 0)]) < clip_angle_threshold ) def test_normalize_angles(self): # torch.manual_seed(0) for _ in range(50): num_boxes = 100 boxes_5d = torch.zeros(num_boxes, 5) boxes_5d[:, 0] = torch.FloatTensor(num_boxes).uniform_(-100, 500) boxes_5d[:, 1] = torch.FloatTensor(num_boxes).uniform_(-100, 500) boxes_5d[:, 2] = torch.FloatTensor(num_boxes).uniform_(0, 500) boxes_5d[:, 3] = torch.FloatTensor(num_boxes).uniform_(0, 500) boxes_5d[:, 4] = torch.FloatTensor(num_boxes).uniform_(-1800, 1800) rotated_boxes = RotatedBoxes(boxes_5d) normalized_boxes = rotated_boxes.clone() normalized_boxes.normalize_angles() assert torch.all(normalized_boxes.tensor[:, 4] >= -180) assert torch.all(normalized_boxes.tensor[:, 4] < 180) # x, y, w, h should not change assert torch.allclose(boxes_5d[:, :4], normalized_boxes.tensor[:, :4]) # the cos/sin values of the angles should stay the same assert torch.allclose( torch.cos(boxes_5d[:, 4] * math.pi / 180), torch.cos(normalized_boxes.tensor[:, 4] * math.pi / 180), atol=1e-5, ) assert torch.allclose( torch.sin(boxes_5d[:, 4] * math.pi / 180), torch.sin(normalized_boxes.tensor[:, 4] * math.pi / 180), atol=1e-5, ) def test_pairwise_iou_0_degree_cpu(self): device = torch.device("cpu") boxes1 = torch.tensor( [[0.5, 0.5, 1.0, 1.0, 0.0], [0.5, 0.5, 1.0, 1.0, 0.0]], dtype=torch.float32, device=device, ) boxes2 = torch.tensor( [ [0.5, 0.5, 1.0, 1.0, 0.0], [0.25, 0.5, 0.5, 1.0, 0.0], [0.5, 0.25, 1.0, 0.5, 0.0], [0.25, 0.25, 0.5, 0.5, 0.0], [0.75, 0.75, 0.5, 0.5, 0.0], [1.0, 1.0, 1.0, 1.0, 0.0], ], dtype=torch.float32, device=device, ) expected_ious = torch.tensor( [ [1.0, 0.5, 0.5, 0.25, 0.25, 0.25 / (2 - 0.25)], [1.0, 0.5, 0.5, 0.25, 0.25, 0.25 / (2 - 0.25)], ], dtype=torch.float32, device=device, ) ious = pairwise_iou(RotatedBoxes(boxes1), RotatedBoxes(boxes2)) assert torch.allclose(ious, expected_ious) @unittest.skipIf(not torch.cuda.is_available(), "CUDA not available") def test_pairwise_iou_0_degree_cuda(self): device = torch.device("cuda") boxes1 = torch.tensor( [[0.5, 0.5, 1.0, 1.0, 0.0], [0.5, 0.5, 1.0, 1.0, 0.0]], dtype=torch.float32, device=device, ) boxes2 = torch.tensor( [ [0.5, 0.5, 1.0, 1.0, 0.0], [0.25, 0.5, 0.5, 1.0, 0.0], [0.5, 0.25, 1.0, 0.5, 0.0], [0.25, 0.25, 0.5, 0.5, 0.0], [0.75, 0.75, 0.5, 0.5, 0.0], [1.0, 1.0, 1.0, 1.0, 0.0], ], dtype=torch.float32, device=device, ) expected_ious = torch.tensor( [ [1.0, 0.5, 0.5, 0.25, 0.25, 0.25 / (2 - 0.25)], [1.0, 0.5, 0.5, 0.25, 0.25, 0.25 / (2 - 0.25)], ], dtype=torch.float32, device=device, ) ious = pairwise_iou(RotatedBoxes(boxes1), RotatedBoxes(boxes2)) assert torch.allclose(ious, expected_ious) def test_pairwise_iou_45_degrees_cpu(self): device = torch.device("cpu") boxes1 = torch.tensor( [ [1, 1, math.sqrt(2), math.sqrt(2), 45], [1, 1, 2 * math.sqrt(2), 2 * math.sqrt(2), -45], ], dtype=torch.float32, device=device, ) boxes2 = torch.tensor([[1, 1, 2, 2, 0]], dtype=torch.float32, device=device) expected_ious = torch.tensor([[0.5], [0.5]], dtype=torch.float32, device=device) ious = pairwise_iou(RotatedBoxes(boxes1), RotatedBoxes(boxes2)) assert torch.allclose(ious, expected_ious) @unittest.skipIf(not torch.cuda.is_available(), "CUDA not available") def test_pairwise_iou_45_degrees_cuda(self): device = torch.device("cuda") boxes1 = torch.tensor( [ [1, 1, math.sqrt(2), math.sqrt(2), 45], [1, 1, 2 * math.sqrt(2), 2 * math.sqrt(2), -45], ], dtype=torch.float32, device=device, ) boxes2 = torch.tensor([[1, 1, 2, 2, 0]], dtype=torch.float32, device=device) expected_ious = torch.tensor([[0.5], [0.5]], dtype=torch.float32, device=device) ious = pairwise_iou(RotatedBoxes(boxes1), RotatedBoxes(boxes2)) assert torch.allclose(ious, expected_ious) def test_pairwise_iou_orthogonal_cpu(self): device = torch.device("cpu") boxes1 = torch.tensor([[5, 5, 10, 6, 55]], dtype=torch.float32, device=device) boxes2 = torch.tensor([[5, 5, 10, 6, -35]], dtype=torch.float32, device=device) iou = (6.0 * 6.0) / (6.0 * 6.0 + 4.0 * 6.0 + 4.0 * 6.0) expected_ious = torch.tensor([[iou]], dtype=torch.float32, device=device) ious = pairwise_iou(RotatedBoxes(boxes1), RotatedBoxes(boxes2)) assert torch.allclose(ious, expected_ious) @unittest.skipIf(not torch.cuda.is_available(), "CUDA not available") def test_pairwise_iou_orthogonal_cuda(self): device = torch.device("cuda") boxes1 = torch.tensor([[5, 5, 10, 6, 55]], dtype=torch.float32, device=device) boxes2 = torch.tensor([[5, 5, 10, 6, -35]], dtype=torch.float32, device=device) iou = (6.0 * 6.0) / (6.0 * 6.0 + 4.0 * 6.0 + 4.0 * 6.0) expected_ious = torch.tensor([[iou]], dtype=torch.float32, device=device) ious = pairwise_iou(RotatedBoxes(boxes1), RotatedBoxes(boxes2)) assert torch.allclose(ious, expected_ious) def test_pairwise_iou_large_close_boxes_cpu(self): device = torch.device("cpu") boxes1 = torch.tensor( [[299.500000, 417.370422, 600.000000, 364.259186, 27.1828]], dtype=torch.float32, device=device, ) boxes2 = torch.tensor( [[299.500000, 417.370422, 600.000000, 364.259155, 27.1828]], dtype=torch.float32, device=device, ) iou = 364.259155 / 364.259186 expected_ious = torch.tensor([[iou]], dtype=torch.float32, device=device) ious = pairwise_iou(RotatedBoxes(boxes1), RotatedBoxes(boxes2)) assert torch.allclose(ious, expected_ious) @unittest.skipIf(not torch.cuda.is_available(), "CUDA not available") def test_pairwise_iou_large_close_boxes_cuda(self): device = torch.device("cuda") boxes1 = torch.tensor( [[299.500000, 417.370422, 600.000000, 364.259186, 27.1828]], dtype=torch.float32, device=device, ) boxes2 = torch.tensor( [[299.500000, 417.370422, 600.000000, 364.259155, 27.1828]], dtype=torch.float32, device=device, ) iou = 364.259155 / 364.259186 expected_ious = torch.tensor([[iou]], dtype=torch.float32, device=device) ious = pairwise_iou(RotatedBoxes(boxes1), RotatedBoxes(boxes2)) assert torch.allclose(ious, expected_ious) def test_pairwise_iou_many_boxes_cpu(self): device = torch.device("cpu") num_boxes1 = 100 num_boxes2 = 200 boxes1 = torch.stack( [ torch.tensor( [5 + 20 * i, 5 + 20 * i, 10, 10, 0], dtype=torch.float32, device=device ) for i in range(num_boxes1) ] ) boxes2 = torch.stack( [ torch.tensor( [5 + 20 * i, 5 + 20 * i, 10, 1 + 9 * i / num_boxes2, 0], dtype=torch.float32, device=device, ) for i in range(num_boxes2) ] ) expected_ious = torch.zeros(num_boxes1, num_boxes2, dtype=torch.float32, device=device) for i in range(min(num_boxes1, num_boxes2)): expected_ious[i][i] = (1 + 9 * i / num_boxes2) / 10.0 ious = pairwise_iou(RotatedBoxes(boxes1), RotatedBoxes(boxes2)) assert torch.allclose(ious, expected_ious) @unittest.skipIf(not torch.cuda.is_available(), "CUDA not available") def test_pairwise_iou_many_boxes_cuda(self): device = torch.device("cuda") num_boxes1 = 100 num_boxes2 = 200 boxes1 = torch.stack( [ torch.tensor( [5 + 20 * i, 5 + 20 * i, 10, 10, 0], dtype=torch.float32, device=device ) for i in range(num_boxes1) ] ) boxes2 = torch.stack( [ torch.tensor( [5 + 20 * i, 5 + 20 * i, 10, 1 + 9 * i / num_boxes2, 0], dtype=torch.float32, device=device, ) for i in range(num_boxes2) ] ) expected_ious = torch.zeros(num_boxes1, num_boxes2, dtype=torch.float32, device=device) for i in range(min(num_boxes1, num_boxes2)): expected_ious[i][i] = (1 + 9 * i / num_boxes2) / 10.0 ious = pairwise_iou(RotatedBoxes(boxes1), RotatedBoxes(boxes2)) assert torch.allclose(ious, expected_ious) def benchmark_rotated_iou(): num_boxes1 = 200 num_boxes2 = 500 boxes1 = torch.stack( [ torch.tensor([5 + 20 * i, 5 + 20 * i, 10, 10, 0], dtype=torch.float32) for i in range(num_boxes1) ] ) boxes2 = torch.stack( [ torch.tensor( [5 + 20 * i, 5 + 20 * i, 10, 1 + 9 * i / num_boxes2, 0], dtype=torch.float32 ) for i in range(num_boxes2) ] ) def func(dev, n=1): b1 = boxes1.to(device=dev) b2 = boxes2.to(device=dev) def bench(): for _ in range(n): pairwise_iou_rotated(b1, b2) if dev.type == "cuda": torch.cuda.synchronize() return bench # only run it once per timed loop, since it's slow args = [{"dev": torch.device("cpu"), "n": 1}] if torch.cuda.is_available(): args.append({"dev": torch.device("cuda"), "n": 10}) benchmark(func, "rotated_iou", args, warmup_iters=3) if __name__ == "__main__": unittest.main() benchmark_rotated_iou() ================================================ FILE: tests/test_rpn.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import unittest import torch from detectron2.config import get_cfg from detectron2.modeling.backbone import build_backbone from detectron2.modeling.proposal_generator.build import build_proposal_generator from detectron2.structures import Boxes, ImageList, Instances, RotatedBoxes from detectron2.utils.events import EventStorage logger = logging.getLogger(__name__) class RPNTest(unittest.TestCase): def test_rpn(self): torch.manual_seed(121) cfg = get_cfg() cfg.MODEL.PROPOSAL_GENERATOR.NAME = "RPN" cfg.MODEL.ANCHOR_GENERATOR.NAME = "DefaultAnchorGenerator" cfg.MODEL.RPN.BBOX_REG_WEIGHTS = (1, 1, 1, 1) backbone = build_backbone(cfg) proposal_generator = build_proposal_generator(cfg, backbone.output_shape()) num_images = 2 images_tensor = torch.rand(num_images, 20, 30) image_sizes = [(10, 10), (20, 30)] images = ImageList(images_tensor, image_sizes) image_shape = (15, 15) num_channels = 1024 features = {"res4": torch.rand(num_images, num_channels, 1, 2)} gt_boxes = torch.tensor([[1, 1, 3, 3], [2, 2, 6, 6]], dtype=torch.float32) gt_instances = Instances(image_shape) gt_instances.gt_boxes = Boxes(gt_boxes) with EventStorage(): # capture events in a new storage to discard them proposals, proposal_losses = proposal_generator( images, features, [gt_instances[0], gt_instances[1]] ) expected_losses = { "loss_rpn_cls": torch.tensor(0.0804563984), "loss_rpn_loc": torch.tensor(0.0990132466), } for name in expected_losses.keys(): self.assertTrue(torch.allclose(proposal_losses[name], expected_losses[name])) expected_proposal_boxes = [ Boxes(torch.tensor([[0, 0, 10, 10], [7.3365392685, 0, 10, 10]])), Boxes( torch.tensor( [ [0, 0, 30, 20], [0, 0, 16.7862777710, 13.1362524033], [0, 0, 30, 13.3173446655], [0, 0, 10.8602609634, 20], [7.7165775299, 0, 27.3875980377, 20], ] ) ), ] expected_objectness_logits = [ torch.tensor([0.1225359365, -0.0133192837]), torch.tensor([0.1415634006, 0.0989848152, 0.0565387346, -0.0072308783, -0.0428492837]), ] for proposal, expected_proposal_box, im_size, expected_objectness_logit in zip( proposals, expected_proposal_boxes, image_sizes, expected_objectness_logits ): self.assertEqual(len(proposal), len(expected_proposal_box)) self.assertEqual(proposal.image_size, im_size) self.assertTrue( torch.allclose(proposal.proposal_boxes.tensor, expected_proposal_box.tensor) ) self.assertTrue(torch.allclose(proposal.objectness_logits, expected_objectness_logit)) def test_rrpn(self): torch.manual_seed(121) cfg = get_cfg() cfg.MODEL.PROPOSAL_GENERATOR.NAME = "RRPN" cfg.MODEL.ANCHOR_GENERATOR.NAME = "RotatedAnchorGenerator" cfg.MODEL.ANCHOR_GENERATOR.SIZES = [[32, 64]] cfg.MODEL.ANCHOR_GENERATOR.ASPECT_RATIOS = [[0.25, 1]] cfg.MODEL.ANCHOR_GENERATOR.ANGLES = [[0, 60]] cfg.MODEL.RPN.BBOX_REG_WEIGHTS = (1, 1, 1, 1, 1) cfg.MODEL.RPN.HEAD_NAME = "StandardRPNHead" backbone = build_backbone(cfg) proposal_generator = build_proposal_generator(cfg, backbone.output_shape()) num_images = 2 images_tensor = torch.rand(num_images, 20, 30) image_sizes = [(10, 10), (20, 30)] images = ImageList(images_tensor, image_sizes) image_shape = (15, 15) num_channels = 1024 features = {"res4": torch.rand(num_images, num_channels, 1, 2)} gt_boxes = torch.tensor([[2, 2, 2, 2, 0], [4, 4, 4, 4, 0]], dtype=torch.float32) gt_instances = Instances(image_shape) gt_instances.gt_boxes = RotatedBoxes(gt_boxes) with EventStorage(): # capture events in a new storage to discard them proposals, proposal_losses = proposal_generator( images, features, [gt_instances[0], gt_instances[1]] ) expected_losses = { "loss_rpn_cls": torch.tensor(0.0432923734), "loss_rpn_loc": torch.tensor(0.1552739739), } for name in expected_losses.keys(): self.assertTrue(torch.allclose(proposal_losses[name], expected_losses[name])) expected_proposal_boxes = [ RotatedBoxes( torch.tensor( [ [0.60189795, 1.24095452, 61.98131943, 18.03621292, -4.07244873], [15.64940453, 1.69624567, 59.59749603, 16.34339333, 2.62692475], [-3.02982378, -2.69752932, 67.90952301, 59.62455750, 59.97010040], [16.71863365, 1.98309708, 35.61507797, 32.81484985, 62.92267227], [0.49432933, -7.92979717, 67.77606201, 62.93098450, -1.85656738], [8.00880814, 1.36017394, 121.81007385, 32.74150467, 50.44297409], [16.44299889, -4.82221127, 63.39775848, 61.22503662, 54.12270737], [5.00000000, 5.00000000, 10.00000000, 10.00000000, -0.76943970], [17.64130402, -0.98095351, 61.40377808, 16.28918839, 55.53118134], [0.13016054, 4.60568953, 35.80157471, 32.30180359, 62.52872086], [-4.26460743, 0.39604485, 124.30079651, 31.84611320, -1.58203125], [7.52815342, -0.91636634, 62.39784622, 15.45565224, 60.79549789], ] ) ), RotatedBoxes( torch.tensor( [ [0.07734215, 0.81635046, 65.33510590, 17.34688377, -1.51821899], [-3.41833067, -3.11320257, 64.17595673, 60.55617905, 58.27033234], [20.67383385, -6.16561556, 63.60531998, 62.52315903, 54.85546494], [15.00000000, 10.00000000, 30.00000000, 20.00000000, -0.18218994], [9.22646523, -6.84775209, 62.09895706, 65.46472931, -2.74307251], [15.00000000, 4.93451595, 30.00000000, 9.86903191, -0.60272217], [8.88342094, 2.65560246, 120.95362854, 32.45022202, 55.75970078], [16.39088631, 2.33887148, 34.78761292, 35.61492920, 60.81977463], [9.78298569, 10.00000000, 19.56597137, 20.00000000, -0.86660767], [1.28576660, 5.49873352, 34.93610382, 33.22600174, 60.51599884], [17.58912468, -1.63270092, 62.96052551, 16.45713997, 52.91245270], [5.64749718, -1.90428460, 62.37649155, 16.19474792, 61.09543991], [0.82255805, 2.34931135, 118.83985901, 32.83671188, 56.50753784], [-5.33874989, 1.64404404, 125.28501892, 33.35424042, -2.80731201], ] ) ), ] expected_objectness_logits = [ torch.tensor( [ 0.10111768, 0.09112845, 0.08466332, 0.07589971, 0.06650183, 0.06350251, 0.04299347, 0.01864817, 0.00986163, 0.00078543, -0.04573630, -0.04799230, ] ), torch.tensor( [ 0.11373727, 0.09377633, 0.05281663, 0.05143715, 0.04040275, 0.03250912, 0.01307789, 0.01177734, 0.00038105, -0.00540255, -0.01194804, -0.01461012, -0.03061717, -0.03599222, ] ), ] torch.set_printoptions(precision=8, sci_mode=False) for proposal, expected_proposal_box, im_size, expected_objectness_logit in zip( proposals, expected_proposal_boxes, image_sizes, expected_objectness_logits ): self.assertEqual(len(proposal), len(expected_proposal_box)) self.assertEqual(proposal.image_size, im_size) # It seems that there's some randomness in the result across different machines: # This test can be run on a local machine for 100 times with exactly the same result, # However, a different machine might produce slightly different results, # thus the atol here. err_msg = "computed proposal boxes = {}, expected {}".format( proposal.proposal_boxes.tensor, expected_proposal_box.tensor ) self.assertTrue( torch.allclose( proposal.proposal_boxes.tensor, expected_proposal_box.tensor, atol=1e-5 ), err_msg, ) err_msg = "computed objectness logits = {}, expected {}".format( proposal.objectness_logits, expected_objectness_logit ) self.assertTrue( torch.allclose(proposal.objectness_logits, expected_objectness_logit, atol=1e-5), err_msg, ) if __name__ == "__main__": unittest.main() ================================================ FILE: tests/test_sampler.py ================================================ # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import unittest from torch.utils.data.sampler import SequentialSampler from detectron2.data.samplers import GroupedBatchSampler class TestGroupedBatchSampler(unittest.TestCase): def test_missing_group_id(self): sampler = SequentialSampler(list(range(100))) group_ids = [1] * 100 s = GroupedBatchSampler(sampler, group_ids, 2) for k in s: self.assertEqual(len(k), 2) def test_groups(self): sampler = SequentialSampler(list(range(100))) group_ids = [1, 0] * 50 s = GroupedBatchSampler(sampler, group_ids, 2) for k in s: self.assertTrue((k[0] + k[1]) % 2 == 0) ================================================ FILE: tests/test_visualizer.py ================================================ # -*- coding: utf-8 -*- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # File: import numpy as np import unittest import torch from detectron2.data import MetadataCatalog from detectron2.structures import BoxMode, Instances, RotatedBoxes from detectron2.utils.visualizer import Visualizer class TestVisualizer(unittest.TestCase): def _random_data(self): H, W = 100, 100 N = 10 img = np.random.rand(H, W, 3) * 255 boxxy = np.random.rand(N, 2) * (H // 2) boxes = np.concatenate((boxxy, boxxy + H // 2), axis=1) def _rand_poly(): return np.random.rand(3, 2).flatten() * H polygons = [[_rand_poly() for _ in range(np.random.randint(1, 5))] for _ in range(N)] mask = np.zeros_like(img[:, :, 0], dtype=np.bool) mask[:10, 10:20] = 1 labels = [str(i) for i in range(N)] return img, boxes, labels, polygons, [mask] * N @property def metadata(self): return MetadataCatalog.get("coco_2017_train") def test_draw_dataset_dict(self): img = np.random.rand(512, 512, 3) * 255 dic = { "annotations": [ { "bbox": [ 368.9946492271106, 330.891438763377, 13.148537455410235, 13.644708680142685, ], "bbox_mode": BoxMode.XYWH_ABS, "category_id": 0, "iscrowd": 1, "segmentation": { "counts": "_jh52m?2N2N2N2O100O10O001N1O2MceP2", "size": [512, 512], }, } ], "height": 512, "image_id": 1, "width": 512, } v = Visualizer(img, self.metadata) v.draw_dataset_dict(dic) def test_overlay_instances(self): img, boxes, labels, polygons, masks = self._random_data() v = Visualizer(img, self.metadata) output = v.overlay_instances(masks=polygons, boxes=boxes, labels=labels).get_image() self.assertEqual(output.shape, img.shape) # Test 2x scaling v = Visualizer(img, self.metadata, scale=2.0) output = v.overlay_instances(masks=polygons, boxes=boxes, labels=labels).get_image() self.assertEqual(output.shape[0], img.shape[0] * 2) # Test overlay masks v = Visualizer(img, self.metadata) output = v.overlay_instances(masks=masks, boxes=boxes, labels=labels).get_image() self.assertEqual(output.shape, img.shape) def test_overlay_instances_no_boxes(self): img, boxes, labels, polygons, _ = self._random_data() v = Visualizer(img, self.metadata) v.overlay_instances(masks=polygons, boxes=None, labels=labels).get_image() def test_draw_instance_predictions(self): img, boxes, _, _, masks = self._random_data() num_inst = len(boxes) inst = Instances((img.shape[0], img.shape[1])) inst.pred_classes = torch.randint(0, 80, size=(num_inst,)) inst.scores = torch.rand(num_inst) inst.pred_boxes = torch.from_numpy(boxes) inst.pred_masks = torch.from_numpy(np.asarray(masks)) v = Visualizer(img, self.metadata) v.draw_instance_predictions(inst) def test_draw_empty_mask_predictions(self): img, boxes, _, _, masks = self._random_data() num_inst = len(boxes) inst = Instances((img.shape[0], img.shape[1])) inst.pred_classes = torch.randint(0, 80, size=(num_inst,)) inst.scores = torch.rand(num_inst) inst.pred_boxes = torch.from_numpy(boxes) inst.pred_masks = torch.from_numpy(np.zeros_like(np.asarray(masks))) v = Visualizer(img, self.metadata) v.draw_instance_predictions(inst) def test_correct_output_shape(self): img = np.random.rand(928, 928, 3) * 255 v = Visualizer(img, self.metadata) out = v.output.get_image() self.assertEqual(out.shape, img.shape) def test_overlay_rotated_instances(self): H, W = 100, 150 img = np.random.rand(H, W, 3) * 255 num_boxes = 50 boxes_5d = torch.zeros(num_boxes, 5) boxes_5d[:, 0] = torch.FloatTensor(num_boxes).uniform_(-0.1 * W, 1.1 * W) boxes_5d[:, 1] = torch.FloatTensor(num_boxes).uniform_(-0.1 * H, 1.1 * H) boxes_5d[:, 2] = torch.FloatTensor(num_boxes).uniform_(0, max(W, H)) boxes_5d[:, 3] = torch.FloatTensor(num_boxes).uniform_(0, max(W, H)) boxes_5d[:, 4] = torch.FloatTensor(num_boxes).uniform_(-1800, 1800) rotated_boxes = RotatedBoxes(boxes_5d) labels = [str(i) for i in range(num_boxes)] v = Visualizer(img, self.metadata) output = v.overlay_instances(boxes=rotated_boxes, labels=labels).get_image() self.assertEqual(output.shape, img.shape) def test_draw_no_metadata(self): img, boxes, _, _, masks = self._random_data() num_inst = len(boxes) inst = Instances((img.shape[0], img.shape[1])) inst.pred_classes = torch.randint(0, 80, size=(num_inst,)) inst.scores = torch.rand(num_inst) inst.pred_boxes = torch.from_numpy(boxes) inst.pred_masks = torch.from_numpy(np.asarray(masks)) v = Visualizer(img, MetadataCatalog.get("asdfasdf")) v.draw_instance_predictions(inst)