Showing preview only (5,106K chars total). Download the full file or copy to clipboard to get everything.
Repository: open-mmlab/mmcv
Branch: main
Commit: a8073c74bf83
Files: 857
Total size: 4.7 MB
Directory structure:
gitextract_pswz5bz1/
├── .dev_scripts/
│ └── check_installation.py
├── .dockerignore
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── 1-bug-report.yml
│ │ ├── 2-feature_request.yml
│ │ ├── 3-documentation.yml
│ │ └── config.yml
│ ├── pull_request_template.md
│ └── workflows/
│ ├── build_macos_wheel.yml
│ ├── lint.yml
│ ├── merge_stage_test.yml
│ ├── pr_stage_test.yml
│ └── publish-to-pypi.yml
├── .gitignore
├── .pre-commit-config-zh-cn.yaml
├── .pre-commit-config.yaml
├── .readthedocs.yml
├── CITATION.cff
├── CONTRIBUTING.md
├── CONTRIBUTING_zh-CN.md
├── LICENSE
├── LICENSES.md
├── MANIFEST.in
├── README.md
├── README_zh-CN.md
├── TERMINOLOGY.md
├── docker/
│ ├── README.md
│ ├── dev/
│ │ └── Dockerfile
│ └── release/
│ └── Dockerfile
├── docs/
│ ├── en/
│ │ ├── Makefile
│ │ ├── _static/
│ │ │ ├── css/
│ │ │ │ └── readthedocs.css
│ │ │ └── version.json
│ │ ├── _templates/
│ │ │ └── classtemplate.rst
│ │ ├── api/
│ │ │ ├── arraymisc.rst
│ │ │ ├── cnn.rst
│ │ │ ├── image.rst
│ │ │ ├── ops.rst
│ │ │ ├── transforms.rst
│ │ │ ├── utils.rst
│ │ │ ├── video.rst
│ │ │ └── visualization.rst
│ │ ├── community/
│ │ │ ├── contributing.md
│ │ │ └── pr.md
│ │ ├── compatibility.md
│ │ ├── conf.py
│ │ ├── deployment/
│ │ │ └── mmcv_ops_definition.md
│ │ ├── docutils.conf
│ │ ├── faq.md
│ │ ├── get_started/
│ │ │ ├── api_reference.md
│ │ │ ├── build.md
│ │ │ ├── installation.md
│ │ │ ├── introduction.md
│ │ │ └── previous_versions.md
│ │ ├── index.rst
│ │ ├── make.bat
│ │ ├── switch_language.md
│ │ └── understand_mmcv/
│ │ ├── cnn.md
│ │ ├── data_process.md
│ │ ├── data_transform.md
│ │ ├── ops.md
│ │ └── visualization.md
│ └── zh_cn/
│ ├── Makefile
│ ├── _static/
│ │ ├── css/
│ │ │ └── readthedocs.css
│ │ └── version.json
│ ├── _templates/
│ │ └── classtemplate.rst
│ ├── api/
│ │ ├── arraymisc.rst
│ │ ├── cnn.rst
│ │ ├── image.rst
│ │ ├── ops.rst
│ │ ├── transforms.rst
│ │ ├── utils.rst
│ │ ├── video.rst
│ │ └── visualization.rst
│ ├── community/
│ │ ├── code_style.md
│ │ ├── contributing.md
│ │ └── pr.md
│ ├── compatibility.md
│ ├── conf.py
│ ├── docutils.conf
│ ├── faq.md
│ ├── get_started/
│ │ ├── api_reference.md
│ │ ├── article.md
│ │ ├── build.md
│ │ ├── installation.md
│ │ ├── introduction.md
│ │ └── previous_versions.md
│ ├── index.rst
│ ├── make.bat
│ ├── switch_language.md
│ └── understand_mmcv/
│ ├── cnn.md
│ ├── data_process.md
│ ├── data_transform.md
│ ├── ops.md
│ └── visualization.md
├── mmcv/
│ ├── __init__.py
│ ├── arraymisc/
│ │ ├── __init__.py
│ │ └── quantization.py
│ ├── cnn/
│ │ ├── __init__.py
│ │ ├── alexnet.py
│ │ ├── bricks/
│ │ │ ├── __init__.py
│ │ │ ├── activation.py
│ │ │ ├── context_block.py
│ │ │ ├── conv.py
│ │ │ ├── conv2d_adaptive_padding.py
│ │ │ ├── conv_module.py
│ │ │ ├── conv_ws.py
│ │ │ ├── depthwise_separable_conv_module.py
│ │ │ ├── drop.py
│ │ │ ├── generalized_attention.py
│ │ │ ├── hsigmoid.py
│ │ │ ├── hswish.py
│ │ │ ├── non_local.py
│ │ │ ├── norm.py
│ │ │ ├── padding.py
│ │ │ ├── plugin.py
│ │ │ ├── scale.py
│ │ │ ├── swish.py
│ │ │ ├── transformer.py
│ │ │ ├── upsample.py
│ │ │ └── wrappers.py
│ │ ├── resnet.py
│ │ ├── rfsearch/
│ │ │ ├── __init__.py
│ │ │ ├── operator.py
│ │ │ ├── search.py
│ │ │ └── utils.py
│ │ ├── utils/
│ │ │ ├── __init__.py
│ │ │ ├── flops_counter.py
│ │ │ └── fuse_conv_bn.py
│ │ └── vgg.py
│ ├── image/
│ │ ├── __init__.py
│ │ ├── colorspace.py
│ │ ├── geometric.py
│ │ ├── io.py
│ │ ├── misc.py
│ │ └── photometric.py
│ ├── ops/
│ │ ├── __init__.py
│ │ ├── active_rotated_filter.py
│ │ ├── assign_score_withk.py
│ │ ├── ball_query.py
│ │ ├── bbox.py
│ │ ├── bezier_align.py
│ │ ├── bias_act.py
│ │ ├── border_align.py
│ │ ├── box_iou_quadri.py
│ │ ├── box_iou_rotated.py
│ │ ├── carafe.py
│ │ ├── cc_attention.py
│ │ ├── chamfer_distance.py
│ │ ├── contour_expand.py
│ │ ├── conv2d_gradfix.py
│ │ ├── convex_iou.py
│ │ ├── corner_pool.py
│ │ ├── correlation.py
│ │ ├── csrc/
│ │ │ ├── README.md
│ │ │ ├── common/
│ │ │ │ ├── box_iou_rotated_utils.hpp
│ │ │ │ ├── cuda/
│ │ │ │ │ ├── active_rotated_filter_cuda_kernel.cuh
│ │ │ │ │ ├── assign_score_withk_cuda_kernel.cuh
│ │ │ │ │ ├── ball_query_cuda_kernel.cuh
│ │ │ │ │ ├── bbox_overlaps_cuda_kernel.cuh
│ │ │ │ │ ├── bezier_align_cuda_kernel.cuh
│ │ │ │ │ ├── border_align_cuda_kernel.cuh
│ │ │ │ │ ├── box_iou_quadri_cuda.cuh
│ │ │ │ │ ├── box_iou_rotated_cuda.cuh
│ │ │ │ │ ├── carafe_cuda_kernel.cuh
│ │ │ │ │ ├── carafe_naive_cuda_kernel.cuh
│ │ │ │ │ ├── chamfer_distance_cuda_kernel.cuh
│ │ │ │ │ ├── common_cuda_helper.hpp
│ │ │ │ │ ├── convex_iou_cuda_kernel.cuh
│ │ │ │ │ ├── correlation_cuda.cuh
│ │ │ │ │ ├── deform_conv_cuda_kernel.cuh
│ │ │ │ │ ├── deform_roi_pool_cuda_kernel.cuh
│ │ │ │ │ ├── diff_iou_rotated_cuda_kernel.cuh
│ │ │ │ │ ├── furthest_point_sample_cuda_kernel.cuh
│ │ │ │ │ ├── gather_points_cuda_kernel.cuh
│ │ │ │ │ ├── group_points_cuda_kernel.cuh
│ │ │ │ │ ├── iou3d_cuda_kernel.cuh
│ │ │ │ │ ├── knn_cuda_kernel.cuh
│ │ │ │ │ ├── masked_conv2d_cuda_kernel.cuh
│ │ │ │ │ ├── min_area_polygons_cuda.cuh
│ │ │ │ │ ├── modulated_deform_conv_cuda_kernel.cuh
│ │ │ │ │ ├── ms_deform_attn_cuda_kernel.cuh
│ │ │ │ │ ├── nms_cuda_kernel.cuh
│ │ │ │ │ ├── nms_quadri_cuda.cuh
│ │ │ │ │ ├── nms_rotated_cuda.cuh
│ │ │ │ │ ├── parrots_cudawarpfunction.cuh
│ │ │ │ │ ├── points_in_boxes_cuda_kernel.cuh
│ │ │ │ │ ├── points_in_polygons_cuda_kernel.cuh
│ │ │ │ │ ├── prroi_pool_cuda_kernel.cuh
│ │ │ │ │ ├── psamask_cuda_kernel.cuh
│ │ │ │ │ ├── riroi_align_rotated_cuda_kernel.cuh
│ │ │ │ │ ├── roi_align_cuda_kernel.cuh
│ │ │ │ │ ├── roi_align_rotated_cuda_kernel.cuh
│ │ │ │ │ ├── roi_pool_cuda_kernel.cuh
│ │ │ │ │ ├── roiaware_pool3d_cuda_kernel.cuh
│ │ │ │ │ ├── roipoint_pool3d_cuda_kernel.cuh
│ │ │ │ │ ├── rotated_feature_align_cuda_kernel.cuh
│ │ │ │ │ ├── scatter_points_cuda_kernel.cuh
│ │ │ │ │ ├── sigmoid_focal_loss_cuda_kernel.cuh
│ │ │ │ │ ├── softmax_focal_loss_cuda_kernel.cuh
│ │ │ │ │ ├── spconv/
│ │ │ │ │ │ ├── indice.cuh
│ │ │ │ │ │ └── reordering.cuh
│ │ │ │ │ ├── stack_ball_query_cuda_kernel.cuh
│ │ │ │ │ ├── stack_group_points_cuda_kernel.cuh
│ │ │ │ │ ├── sync_bn_cuda_kernel.cuh
│ │ │ │ │ ├── three_interpolate_cuda_kernel.cuh
│ │ │ │ │ ├── three_nn_cuda_kernel.cuh
│ │ │ │ │ ├── tin_shift_cuda_kernel.cuh
│ │ │ │ │ └── voxelization_cuda_kernel.cuh
│ │ │ │ ├── mlu/
│ │ │ │ │ ├── common_mlu_helper.hpp
│ │ │ │ │ ├── masked_conv2d_mlu_kernel.mlu
│ │ │ │ │ └── roi_pool_mlu_kernel.mlu
│ │ │ │ ├── mps/
│ │ │ │ │ ├── MPSDevice.h
│ │ │ │ │ ├── MPSLibrary.h
│ │ │ │ │ ├── MPSLibrary.mm
│ │ │ │ │ ├── MPSStream.h
│ │ │ │ │ └── MPSUtils.h
│ │ │ │ ├── musa/
│ │ │ │ │ ├── active_rotated_filter_musa_kernel.muh
│ │ │ │ │ ├── assign_score_withk_musa_kernel.muh
│ │ │ │ │ ├── ball_query_musa_kernel.muh
│ │ │ │ │ ├── bbox_overlaps_musa_kernel.muh
│ │ │ │ │ ├── bezier_align_musa_kernel.muh
│ │ │ │ │ ├── border_align_musa_kernel.muh
│ │ │ │ │ ├── box_iou_quadri_musa.muh
│ │ │ │ │ ├── box_iou_rotated_musa.muh
│ │ │ │ │ ├── carafe_musa_kernel.muh
│ │ │ │ │ ├── carafe_naive_musa_kernel.muh
│ │ │ │ │ ├── chamfer_distance_musa_kernel.muh
│ │ │ │ │ ├── common_musa_helper.hpp
│ │ │ │ │ ├── convex_iou_musa_kernel.muh
│ │ │ │ │ ├── correlation_musa.muh
│ │ │ │ │ ├── deform_conv_musa_kernel.muh
│ │ │ │ │ ├── deform_roi_pool_musa_kernel.muh
│ │ │ │ │ ├── diff_iou_rotated_musa_kernel.muh
│ │ │ │ │ ├── furthest_point_sample_musa_kernel.muh
│ │ │ │ │ ├── gather_points_musa_kernel.muh
│ │ │ │ │ ├── group_points_musa_kernel.muh
│ │ │ │ │ ├── iou3d_musa_kernel.muh
│ │ │ │ │ ├── knn_musa_kernel.muh
│ │ │ │ │ ├── masked_conv2d_musa_kernel.muh
│ │ │ │ │ ├── min_area_polygons_musa.muh
│ │ │ │ │ ├── modulated_deform_conv_musa_kernel.muh
│ │ │ │ │ ├── ms_deform_attn_musa_kernel.muh
│ │ │ │ │ ├── nms_musa_kernel.muh
│ │ │ │ │ ├── nms_quadri_musa.muh
│ │ │ │ │ ├── nms_rotated_musa.muh
│ │ │ │ │ ├── points_in_boxes_musa_kernel.muh
│ │ │ │ │ ├── points_in_polygons_musa_kernel.muh
│ │ │ │ │ ├── prroi_pool_musa_kernel.muh
│ │ │ │ │ ├── psamask_musa_kernel.muh
│ │ │ │ │ ├── riroi_align_rotated_musa_kernel.muh
│ │ │ │ │ ├── roi_align_musa_kernel.muh
│ │ │ │ │ ├── roi_align_rotated_musa_kernel.muh
│ │ │ │ │ ├── roi_pool_musa_kernel.muh
│ │ │ │ │ ├── roiaware_pool3d_musa_kernel.muh
│ │ │ │ │ ├── roipoint_pool3d_musa_kernel.muh
│ │ │ │ │ ├── rotated_feature_align_musa_kernel.muh
│ │ │ │ │ ├── scatter_points_musa_kernel.muh
│ │ │ │ │ ├── sigmoid_focal_loss_musa_kernel.muh
│ │ │ │ │ ├── softmax_focal_loss_musa_kernel.muh
│ │ │ │ │ ├── spconv/
│ │ │ │ │ │ ├── indice.muh
│ │ │ │ │ │ └── reordering.muh
│ │ │ │ │ ├── stack_ball_query_musa_kernel.muh
│ │ │ │ │ ├── stack_group_points_musa_kernel.muh
│ │ │ │ │ ├── sync_bn_musa_kernel.muh
│ │ │ │ │ ├── three_interpolate_musa_kernel.muh
│ │ │ │ │ ├── three_nn_musa_kernel.muh
│ │ │ │ │ ├── tin_shift_musa_kernel.muh
│ │ │ │ │ └── voxelization_musa_kernel.muh
│ │ │ │ ├── parrots_cpp_helper.hpp
│ │ │ │ ├── parrots_cuda_helper.hpp
│ │ │ │ ├── pytorch_cpp_helper.hpp
│ │ │ │ ├── pytorch_cuda_helper.hpp
│ │ │ │ ├── pytorch_device_registry.hpp
│ │ │ │ ├── pytorch_mlu_helper.hpp
│ │ │ │ ├── pytorch_musa_helper.hpp
│ │ │ │ ├── pytorch_npu_helper.hpp
│ │ │ │ ├── pytorch_npu_util.hpp
│ │ │ │ └── utils/
│ │ │ │ └── spconv/
│ │ │ │ ├── paramsgrid.h
│ │ │ │ ├── prettyprint.h
│ │ │ │ ├── pybind11_utils.h
│ │ │ │ ├── spconv/
│ │ │ │ │ ├── geometry.h
│ │ │ │ │ ├── indice.h
│ │ │ │ │ ├── maxpool.h
│ │ │ │ │ ├── mp_helper.h
│ │ │ │ │ ├── point2voxel.h
│ │ │ │ │ └── reordering.h
│ │ │ │ └── tensorview/
│ │ │ │ ├── helper_kernel.cuh
│ │ │ │ ├── helper_kernel.muh
│ │ │ │ ├── helper_launch.h
│ │ │ │ └── tensorview.h
│ │ │ ├── parrots/
│ │ │ │ ├── active_rotated_filter.cpp
│ │ │ │ ├── active_rotated_filter_parrots.cpp
│ │ │ │ ├── active_rotated_filter_pytorch.h
│ │ │ │ ├── assign_score_withk.cpp
│ │ │ │ ├── assign_score_withk_parrots.cpp
│ │ │ │ ├── assign_score_withk_pytorch.h
│ │ │ │ ├── ball_query._parrots.cpp
│ │ │ │ ├── ball_query.cpp
│ │ │ │ ├── ball_query_pytorch.h
│ │ │ │ ├── bbox_overlaps.cpp
│ │ │ │ ├── bbox_overlaps_parrots.cpp
│ │ │ │ ├── bbox_overlaps_pytorch.h
│ │ │ │ ├── border_align.cpp
│ │ │ │ ├── border_align_parrots.cpp
│ │ │ │ ├── border_align_pytorch.h
│ │ │ │ ├── box_iou_rotated.cpp
│ │ │ │ ├── box_iou_rotated_parrots.cpp
│ │ │ │ ├── box_iou_rotated_pytorch.h
│ │ │ │ ├── carafe.cpp
│ │ │ │ ├── carafe_naive.cpp
│ │ │ │ ├── carafe_naive_parrots.cpp
│ │ │ │ ├── carafe_naive_pytorch.h
│ │ │ │ ├── carafe_parrots.cpp
│ │ │ │ ├── carafe_pytorch.h
│ │ │ │ ├── chamfer_distance.cpp
│ │ │ │ ├── chamfer_distance_parrots.cpp
│ │ │ │ ├── chamfer_distance_pytorch.h
│ │ │ │ ├── contour_expand.cpp
│ │ │ │ ├── contour_expand_parrots.cpp
│ │ │ │ ├── contour_expand_pytorch.h
│ │ │ │ ├── convex_iou.cpp
│ │ │ │ ├── convex_iou_parrots.cpp
│ │ │ │ ├── convex_iou_pytorch.h
│ │ │ │ ├── correlation.cpp
│ │ │ │ ├── correlation_parrots.cpp
│ │ │ │ ├── correlation_pytorch.h
│ │ │ │ ├── cudabind.cpp
│ │ │ │ ├── deform_conv.cpp
│ │ │ │ ├── deform_conv_parrots.cpp
│ │ │ │ ├── deform_conv_pytorch.h
│ │ │ │ ├── deform_roi_pool.cpp
│ │ │ │ ├── deform_roi_pool_parrots.cpp
│ │ │ │ ├── deform_roi_pool_pytorch.h
│ │ │ │ ├── diff_iou_rotated.cpp
│ │ │ │ ├── diff_iou_rotated_parrots.cpp
│ │ │ │ ├── diff_iou_rotated_pytorch.h
│ │ │ │ ├── focal_loss.cpp
│ │ │ │ ├── focal_loss_parrots.cpp
│ │ │ │ ├── focal_loss_pytorch.h
│ │ │ │ ├── furthest_point_sample.cpp
│ │ │ │ ├── furthest_point_sample_parrots.cpp
│ │ │ │ ├── furthest_point_sample_pytorch.h
│ │ │ │ ├── fused_bias_leakyrelu.cpp
│ │ │ │ ├── fused_bias_parrots.cpp
│ │ │ │ ├── gather_points.cpp
│ │ │ │ ├── gather_points_parrots.cpp
│ │ │ │ ├── gather_points_pytorch.h
│ │ │ │ ├── group_points.cpp
│ │ │ │ ├── group_points_parrots.cpp
│ │ │ │ ├── group_points_pytorch.h
│ │ │ │ ├── info.cpp
│ │ │ │ ├── iou3d.cpp
│ │ │ │ ├── iou3d_parrots.cpp
│ │ │ │ ├── iou3d_pytorch.h
│ │ │ │ ├── knn.cpp
│ │ │ │ ├── knn_parrots.cpp
│ │ │ │ ├── knn_pytorch.h
│ │ │ │ ├── masked_conv2d.cpp
│ │ │ │ ├── masked_conv2d_parrots.cpp
│ │ │ │ ├── masked_conv2d_pytorch.h
│ │ │ │ ├── min_area_polygons.cpp
│ │ │ │ ├── min_area_polygons_parrots.cpp
│ │ │ │ ├── min_area_polygons_pytorch.h
│ │ │ │ ├── modulated_deform_conv.cpp
│ │ │ │ ├── modulated_deform_conv_parrots.cpp
│ │ │ │ ├── modulated_deform_conv_pytorch.h
│ │ │ │ ├── ms_deform_attn.cpp
│ │ │ │ ├── ms_deform_attn_parrots.cpp
│ │ │ │ ├── nms.cpp
│ │ │ │ ├── nms_parrots.cpp
│ │ │ │ ├── nms_pytorch.h
│ │ │ │ ├── nms_rotated.cpp
│ │ │ │ ├── pixel_group.cpp
│ │ │ │ ├── pixel_group_parrots.cpp
│ │ │ │ ├── pixel_group_pytorch.h
│ │ │ │ ├── points_in_boxes.cpp
│ │ │ │ ├── points_in_boxes_parrots.cpp
│ │ │ │ ├── points_in_boxes_pytorch.h
│ │ │ │ ├── points_in_polygons.cpp
│ │ │ │ ├── points_in_polygons_parrots.cpp
│ │ │ │ ├── points_in_polygons_pytorch.h
│ │ │ │ ├── prroi_pool.cpp
│ │ │ │ ├── prroi_pool_parrots.cpp
│ │ │ │ ├── prroi_pool_pytorch.h
│ │ │ │ ├── psamask.cpp
│ │ │ │ ├── psamask_parrots.cpp
│ │ │ │ ├── psamask_pytorch.h
│ │ │ │ ├── riroi_align_rotated.cpp
│ │ │ │ ├── riroi_align_rotated_parrots.cpp
│ │ │ │ ├── riroi_align_rotated_pytorch.h
│ │ │ │ ├── roi_align.cpp
│ │ │ │ ├── roi_align_parrots.cpp
│ │ │ │ ├── roi_align_pytorch.h
│ │ │ │ ├── roi_align_rotated.cpp
│ │ │ │ ├── roi_align_rotated_parrots.cpp
│ │ │ │ ├── roi_align_rotated_pytorch.h
│ │ │ │ ├── roi_pool.cpp
│ │ │ │ ├── roi_pool_parrots.cpp
│ │ │ │ ├── roi_pool_pytorch.h
│ │ │ │ ├── roiaware_pool3d.cpp
│ │ │ │ ├── roiaware_pool3d_parrots.cpp
│ │ │ │ ├── roiaware_pool3d_pytorch.h
│ │ │ │ ├── roipoint_pool3d.cpp
│ │ │ │ ├── roipoint_pool3d_parrots.cpp
│ │ │ │ ├── roipoint_pool3d_pytorch.h
│ │ │ │ ├── rotated_feature_align.cpp
│ │ │ │ ├── rotated_feature_align_parrots.cpp
│ │ │ │ ├── rotated_feature_align_pytorch.h
│ │ │ │ ├── sync_bn.cpp
│ │ │ │ ├── sync_bn_parrots.cpp
│ │ │ │ ├── sync_bn_pytorch.h
│ │ │ │ ├── three_interpolate.cpp
│ │ │ │ ├── three_interpolate_parrots.cpp
│ │ │ │ ├── three_interpolate_pytorch.h
│ │ │ │ ├── three_nn.cpp
│ │ │ │ ├── three_nn_parrots.cpp
│ │ │ │ ├── three_nn_pytorch.h
│ │ │ │ ├── tin_shift.cpp
│ │ │ │ ├── tin_shift_parrots.cpp
│ │ │ │ ├── tin_shift_pytorch.h
│ │ │ │ ├── upfirdn2d.cpp
│ │ │ │ ├── upfirdn2d_parrots.cpp
│ │ │ │ ├── voxelization.cpp
│ │ │ │ ├── voxelization_parrots.cpp
│ │ │ │ └── voxelization_pytorch.h
│ │ │ └── pytorch/
│ │ │ ├── active_rotated_filter.cpp
│ │ │ ├── assign_score_withk.cpp
│ │ │ ├── ball_query.cpp
│ │ │ ├── bbox_overlaps.cpp
│ │ │ ├── bezier_align.cpp
│ │ │ ├── bias_act.cpp
│ │ │ ├── border_align.cpp
│ │ │ ├── box_iou_quadri.cpp
│ │ │ ├── box_iou_rotated.cpp
│ │ │ ├── carafe.cpp
│ │ │ ├── carafe_naive.cpp
│ │ │ ├── chamfer_distance.cpp
│ │ │ ├── contour_expand.cpp
│ │ │ ├── convex_iou.cpp
│ │ │ ├── correlation.cpp
│ │ │ ├── cpu/
│ │ │ │ ├── active_rotated_filter.cpp
│ │ │ │ ├── bbox_overlaps_cpu.cpp
│ │ │ │ ├── bezier_align.cpp
│ │ │ │ ├── box_iou_quadri.cpp
│ │ │ │ ├── box_iou_rotated.cpp
│ │ │ │ ├── deform_conv.cpp
│ │ │ │ ├── modulated_deform_conv.cpp
│ │ │ │ ├── nms.cpp
│ │ │ │ ├── nms_quadri.cpp
│ │ │ │ ├── nms_rotated.cpp
│ │ │ │ ├── pixel_group.cpp
│ │ │ │ ├── points_in_boxes.cpp
│ │ │ │ ├── psamask.cpp
│ │ │ │ ├── roi_align.cpp
│ │ │ │ ├── roi_align_rotated.cpp
│ │ │ │ ├── rotated_feature_align.cpp
│ │ │ │ ├── sparse_indice.cpp
│ │ │ │ ├── sparse_maxpool.cpp
│ │ │ │ ├── sparse_reordering.cpp
│ │ │ │ └── voxelization.cpp
│ │ │ ├── cuda/
│ │ │ │ ├── active_rotated_filter_cuda.cu
│ │ │ │ ├── assign_score_withk_cuda.cu
│ │ │ │ ├── ball_query_cuda.cu
│ │ │ │ ├── bbox_overlaps_cuda.cu
│ │ │ │ ├── bezier_align_cuda.cu
│ │ │ │ ├── bias_act_cuda.cu
│ │ │ │ ├── border_align_cuda.cu
│ │ │ │ ├── box_iou_quadri_cuda.cu
│ │ │ │ ├── box_iou_rotated_cuda.cu
│ │ │ │ ├── carafe_cuda.cu
│ │ │ │ ├── carafe_naive_cuda.cu
│ │ │ │ ├── chamfer_distance_cuda.cu
│ │ │ │ ├── convex_iou.cu
│ │ │ │ ├── correlation_cuda.cu
│ │ │ │ ├── cudabind.cpp
│ │ │ │ ├── deform_conv_cuda.cu
│ │ │ │ ├── deform_roi_pool_cuda.cu
│ │ │ │ ├── diff_iou_rotated_cuda.cu
│ │ │ │ ├── filtered_lrelu.cu
│ │ │ │ ├── focal_loss_cuda.cu
│ │ │ │ ├── furthest_point_sample_cuda.cu
│ │ │ │ ├── fused_bias_leakyrelu_cuda.cu
│ │ │ │ ├── fused_spconv_ops_cuda.cu
│ │ │ │ ├── gather_points_cuda.cu
│ │ │ │ ├── group_points_cuda.cu
│ │ │ │ ├── iou3d_cuda.cu
│ │ │ │ ├── knn_cuda.cu
│ │ │ │ ├── masked_conv2d_cuda.cu
│ │ │ │ ├── min_area_polygons.cu
│ │ │ │ ├── modulated_deform_conv_cuda.cu
│ │ │ │ ├── ms_deform_attn_cuda.cu
│ │ │ │ ├── nms_cuda.cu
│ │ │ │ ├── nms_quadri_cuda.cu
│ │ │ │ ├── nms_rotated_cuda.cu
│ │ │ │ ├── points_in_boxes_cuda.cu
│ │ │ │ ├── points_in_polygons_cuda.cu
│ │ │ │ ├── prroi_pool_cuda.cu
│ │ │ │ ├── psamask_cuda.cu
│ │ │ │ ├── riroi_align_rotated_cuda.cu
│ │ │ │ ├── roi_align_cuda.cu
│ │ │ │ ├── roi_align_rotated_cuda.cu
│ │ │ │ ├── roi_pool_cuda.cu
│ │ │ │ ├── roiaware_pool3d_cuda.cu
│ │ │ │ ├── roipoint_pool3d_cuda.cu
│ │ │ │ ├── rotated_feature_align_cuda.cu
│ │ │ │ ├── scatter_points_cuda.cu
│ │ │ │ ├── sparse_indice.cu
│ │ │ │ ├── sparse_maxpool.cu
│ │ │ │ ├── sparse_pool_ops_cuda.cu
│ │ │ │ ├── sparse_reordering.cu
│ │ │ │ ├── spconv_ops_cuda.cu
│ │ │ │ ├── stack_ball_query_cuda.cu
│ │ │ │ ├── stack_group_points_cuda.cu
│ │ │ │ ├── sync_bn_cuda.cu
│ │ │ │ ├── three_interpolate_cuda.cu
│ │ │ │ ├── three_nn_cuda.cu
│ │ │ │ ├── tin_shift_cuda.cu
│ │ │ │ ├── upfirdn2d_kernel.cu
│ │ │ │ └── voxelization_cuda.cu
│ │ │ ├── deform_conv.cpp
│ │ │ ├── deform_roi_pool.cpp
│ │ │ ├── diff_iou_rotated.cpp
│ │ │ ├── filtered_lrelu.cpp
│ │ │ ├── focal_loss.cpp
│ │ │ ├── furthest_point_sample.cpp
│ │ │ ├── fused_bias_leakyrelu.cpp
│ │ │ ├── fused_spconv_ops.cpp
│ │ │ ├── gather_points.cpp
│ │ │ ├── group_points.cpp
│ │ │ ├── info.cpp
│ │ │ ├── iou3d.cpp
│ │ │ ├── knn.cpp
│ │ │ ├── masked_conv2d.cpp
│ │ │ ├── min_area_polygons.cpp
│ │ │ ├── mlu/
│ │ │ │ ├── ball_query_mlu.cpp
│ │ │ │ ├── bbox_overlaps_mlu.cpp
│ │ │ │ ├── box_iou_rotated.cpp
│ │ │ │ ├── carafe_mlu.cpp
│ │ │ │ ├── deform_roi_pool_mlu.cpp
│ │ │ │ ├── diff_iou_rotated_mlu.cpp
│ │ │ │ ├── focal_loss_sigmoid_mlu.cpp
│ │ │ │ ├── iou3d_mlu.cpp
│ │ │ │ ├── masked_conv2d_mlu.cpp
│ │ │ │ ├── mlu_common_helper.cpp
│ │ │ │ ├── mlu_common_helper.h
│ │ │ │ ├── ms_deform_attn_mlu.cpp
│ │ │ │ ├── nms_mlu.cpp
│ │ │ │ ├── nms_rotated_mlu.cpp
│ │ │ │ ├── psamask_mlu.cpp
│ │ │ │ ├── roi_align_mlu.cpp
│ │ │ │ ├── roi_align_rotated_mlu.cpp
│ │ │ │ ├── roi_pool_mlu.cpp
│ │ │ │ ├── roiaware_pool3d_mlu.cpp
│ │ │ │ ├── roipoint_pool3d_mlu.cpp
│ │ │ │ ├── rotated_feature_align_mlu.cpp
│ │ │ │ ├── scatter_points_mlu.cpp
│ │ │ │ ├── sparse_conv_mlu.cpp
│ │ │ │ ├── three_nn_mlu.cpp
│ │ │ │ ├── tin_shift_mlu.cpp
│ │ │ │ └── voxelization_mlu.cpp
│ │ │ ├── modulated_deform_conv.cpp
│ │ │ ├── mps/
│ │ │ │ └── bbox_overlaps_mps.mm
│ │ │ ├── ms_deform_attn.cpp
│ │ │ ├── musa/
│ │ │ │ ├── active_rotated_filter_musa.mu
│ │ │ │ ├── assign_score_withk_musa.mu
│ │ │ │ ├── ball_query_musa.mu
│ │ │ │ ├── bbox_overlaps_musa.mu
│ │ │ │ ├── bezier_align_musa.mu
│ │ │ │ ├── bias_act_musa.mu
│ │ │ │ ├── border_align_musa.mu
│ │ │ │ ├── box_iou_quadri_musa.mu
│ │ │ │ ├── box_iou_rotated_musa.mu
│ │ │ │ ├── carafe_musa.mu
│ │ │ │ ├── carafe_naive_musa.mu
│ │ │ │ ├── chamfer_distance_musa.mu
│ │ │ │ ├── convex_iou.mu
│ │ │ │ ├── correlation_musa.mu
│ │ │ │ ├── deform_conv_musa.mu
│ │ │ │ ├── deform_roi_pool_musa.mu
│ │ │ │ ├── diff_iou_rotated_musa.mu
│ │ │ │ ├── filtered_lrelu.mu
│ │ │ │ ├── focal_loss_musa.mu
│ │ │ │ ├── furthest_point_sample_musa.mu
│ │ │ │ ├── fused_bias_leakyrelu_musa.mu
│ │ │ │ ├── fused_spconv_ops_musa.mu
│ │ │ │ ├── gather_points_musa.mu
│ │ │ │ ├── group_points_musa.mu
│ │ │ │ ├── iou3d_musa.mu
│ │ │ │ ├── knn_musa.mu
│ │ │ │ ├── masked_conv2d_musa.mu
│ │ │ │ ├── min_area_polygons.mu
│ │ │ │ ├── modulated_deform_conv_musa.mu
│ │ │ │ ├── ms_deform_attn_musa.mu
│ │ │ │ ├── musabind.cpp
│ │ │ │ ├── nms_musa.mu
│ │ │ │ ├── nms_quadri_musa.mu
│ │ │ │ ├── nms_rotated_musa.mu
│ │ │ │ ├── points_in_boxes_musa.mu
│ │ │ │ ├── points_in_polygons_musa.mu
│ │ │ │ ├── prroi_pool_musa.mu
│ │ │ │ ├── psamask_musa.mu
│ │ │ │ ├── riroi_align_rotated_musa.mu
│ │ │ │ ├── roi_align_musa.mu
│ │ │ │ ├── roi_align_rotated_musa.mu
│ │ │ │ ├── roi_pool_musa.mu
│ │ │ │ ├── roiaware_pool3d_musa.mu
│ │ │ │ ├── roipoint_pool3d_musa.mu
│ │ │ │ ├── rotated_feature_align_musa.mu
│ │ │ │ ├── scatter_points_musa.mu
│ │ │ │ ├── sparse_indice.mu
│ │ │ │ ├── sparse_maxpool.mu
│ │ │ │ ├── sparse_pool_ops_musa.mu
│ │ │ │ ├── sparse_reordering.mu
│ │ │ │ ├── spconv_ops_musa.mu
│ │ │ │ ├── stack_ball_query_musa.mu
│ │ │ │ ├── stack_group_points_musa.mu
│ │ │ │ ├── sync_bn_musa.mu
│ │ │ │ ├── three_interpolate_musa.mu
│ │ │ │ ├── three_nn_musa.mu
│ │ │ │ ├── tin_shift_musa.mu
│ │ │ │ ├── upfirdn2d_kernel.mu
│ │ │ │ └── voxelization_musa.mu
│ │ │ ├── nms.cpp
│ │ │ ├── nms_quadri.cpp
│ │ │ ├── nms_rotated.cpp
│ │ │ ├── npu/
│ │ │ │ ├── active_rotated_filter_npu.cpp
│ │ │ │ ├── assign_score_withk_npu.cpp
│ │ │ │ ├── ball_query_npu.cpp
│ │ │ │ ├── bbox_overlaps_npu.cpp
│ │ │ │ ├── border_align_npu.cpp
│ │ │ │ ├── box_iou_quadri_npu.cpp
│ │ │ │ ├── box_iou_rotated_npu.cpp
│ │ │ │ ├── boxes_overlap_bev_npu.cpp
│ │ │ │ ├── chamfer_distance_npu.cpp
│ │ │ │ ├── common_util.h
│ │ │ │ ├── deform_roi_pool.cpp
│ │ │ │ ├── diff_iou_rotated_npu.cpp
│ │ │ │ ├── focal_loss_npu.cpp
│ │ │ │ ├── furthest_point_sample_npu.cpp
│ │ │ │ ├── furthest_point_sampling_with_dist_npu.cpp
│ │ │ │ ├── fused_bias_leakyrelu_npu.cpp
│ │ │ │ ├── gather_points_npu.cpp
│ │ │ │ ├── group_points_npu.cpp
│ │ │ │ ├── knn_npu.cpp
│ │ │ │ ├── ms_deform_attn_npu.cpp
│ │ │ │ ├── nms3d_normal_npu.cpp
│ │ │ │ ├── nms3d_npu.cpp
│ │ │ │ ├── nms_npu.cpp
│ │ │ │ ├── nms_rotated_npu.cpp
│ │ │ │ ├── points_in_box_npu.cpp
│ │ │ │ ├── points_in_box_npu_all.cpp
│ │ │ │ ├── points_in_polygons_npu.cpp
│ │ │ │ ├── psa_mask_npu.cpp
│ │ │ │ ├── roi_align_npu.cpp
│ │ │ │ ├── roi_align_rotated_npu.cpp
│ │ │ │ ├── roi_pool_npu.cpp
│ │ │ │ ├── roiaware_pool3d_npu.cpp
│ │ │ │ ├── roipoint_pool3d_forward.cpp
│ │ │ │ ├── rotated_feature_align_npu.cpp
│ │ │ │ ├── stack_ball_query_npu.cpp
│ │ │ │ ├── stack_group_points_npu.cpp
│ │ │ │ ├── three_interpolate_npu.cpp
│ │ │ │ ├── three_nn_npu.cpp
│ │ │ │ └── voxelization_npu.cpp
│ │ │ ├── pixel_group.cpp
│ │ │ ├── points_in_boxes.cpp
│ │ │ ├── points_in_polygons.cpp
│ │ │ ├── prroi_pool.cpp
│ │ │ ├── psamask.cpp
│ │ │ ├── pybind.cpp
│ │ │ ├── riroi_align_rotated.cpp
│ │ │ ├── roi_align.cpp
│ │ │ ├── roi_align_rotated.cpp
│ │ │ ├── roi_pool.cpp
│ │ │ ├── roiaware_pool3d.cpp
│ │ │ ├── roipoint_pool3d.cpp
│ │ │ ├── rotated_feature_align.cpp
│ │ │ ├── scatter_points.cpp
│ │ │ ├── sparse_pool_ops.cpp
│ │ │ ├── spconv_ops.cpp
│ │ │ ├── spconv_utils.h
│ │ │ ├── sync_bn.cpp
│ │ │ ├── three_interpolate.cpp
│ │ │ ├── three_nn.cpp
│ │ │ ├── tin_shift.cpp
│ │ │ ├── upfirdn2d.cpp
│ │ │ └── voxelization.cpp
│ │ ├── deform_conv.py
│ │ ├── deform_roi_pool.py
│ │ ├── deprecated_wrappers.py
│ │ ├── diff_iou_rotated.py
│ │ ├── filtered_lrelu.py
│ │ ├── focal_loss.py
│ │ ├── furthest_point_sample.py
│ │ ├── fused_bias_leakyrelu.py
│ │ ├── gather_points.py
│ │ ├── group_points.py
│ │ ├── info.py
│ │ ├── iou3d.py
│ │ ├── knn.py
│ │ ├── masked_conv.py
│ │ ├── merge_cells.py
│ │ ├── min_area_polygons.py
│ │ ├── modulated_deform_conv.py
│ │ ├── multi_scale_deform_attn.py
│ │ ├── nms.py
│ │ ├── pixel_group.py
│ │ ├── point_sample.py
│ │ ├── points_in_boxes.py
│ │ ├── points_in_polygons.py
│ │ ├── points_sampler.py
│ │ ├── prroi_pool.py
│ │ ├── psa_mask.py
│ │ ├── riroi_align_rotated.py
│ │ ├── roi_align.py
│ │ ├── roi_align_rotated.py
│ │ ├── roi_pool.py
│ │ ├── roiaware_pool3d.py
│ │ ├── roipoint_pool3d.py
│ │ ├── rotated_feature_align.py
│ │ ├── saconv.py
│ │ ├── scatter_points.py
│ │ ├── sparse_conv.py
│ │ ├── sparse_functional.py
│ │ ├── sparse_modules.py
│ │ ├── sparse_ops.py
│ │ ├── sparse_pool.py
│ │ ├── sparse_structure.py
│ │ ├── sync_bn.py
│ │ ├── three_interpolate.py
│ │ ├── three_nn.py
│ │ ├── tin_shift.py
│ │ ├── upfirdn2d.py
│ │ └── voxelize.py
│ ├── transforms/
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── builder.py
│ │ ├── formatting.py
│ │ ├── loading.py
│ │ ├── processing.py
│ │ ├── utils.py
│ │ └── wrappers.py
│ ├── utils/
│ │ ├── __init__.py
│ │ ├── device_type.py
│ │ ├── env.py
│ │ ├── ext_loader.py
│ │ └── parrots_jit.py
│ ├── version.py
│ ├── video/
│ │ ├── __init__.py
│ │ ├── io.py
│ │ ├── optflow.py
│ │ └── processing.py
│ └── visualization/
│ ├── __init__.py
│ ├── color.py
│ ├── image.py
│ └── optflow.py
├── requirements/
│ ├── build.txt
│ ├── docs.txt
│ ├── optional.txt
│ ├── runtime.txt
│ └── test.txt
├── requirements.txt
├── setup.cfg
├── setup.py
└── tests/
├── test_arraymisc.py
├── test_cnn/
│ ├── test_build_layers.py
│ ├── test_context_block.py
│ ├── test_conv2d_adaptive_padding.py
│ ├── test_conv_module.py
│ ├── test_depthwise_seperable_conv_module.py
│ ├── test_flops_counter.py
│ ├── test_fuse_conv_bn.py
│ ├── test_generalized_attention.py
│ ├── test_hsigmoid.py
│ ├── test_hswish.py
│ ├── test_non_local.py
│ ├── test_rfsearch/
│ │ ├── test_operator.py
│ │ └── test_search.py
│ ├── test_scale.py
│ ├── test_silu.py
│ ├── test_swish.py
│ ├── test_transformer.py
│ └── test_wrappers.py
├── test_image/
│ ├── test_colorspace.py
│ ├── test_geometric.py
│ ├── test_image_misc.py
│ ├── test_io.py
│ └── test_photometric.py
├── test_ops/
│ ├── output.pkl
│ ├── test_active_rotated_filter.py
│ ├── test_assign_score_withk.py
│ ├── test_ball_query.py
│ ├── test_bbox.py
│ ├── test_bezier_align.py
│ ├── test_bias_act.py
│ ├── test_bilinear_grid_sample.py
│ ├── test_border_align.py
│ ├── test_box_iou_quadri.py
│ ├── test_box_iou_rotated.py
│ ├── test_carafe.py
│ ├── test_cc_attention.py
│ ├── test_chamfer_distance.py
│ ├── test_contour_expand.py
│ ├── test_conv_gradfix.py
│ ├── test_convex_iou.py
│ ├── test_corner_pool.py
│ ├── test_correlation.py
│ ├── test_deform_conv.py
│ ├── test_deform_roi_pool.py
│ ├── test_diff_iou_rotated.py
│ ├── test_filtered_lrelu.py
│ ├── test_focal_loss.py
│ ├── test_furthest_point_sample.py
│ ├── test_fused_bias_leakyrelu.py
│ ├── test_gather_points.py
│ ├── test_group_points.py
│ ├── test_info.py
│ ├── test_iou3d.py
│ ├── test_knn.py
│ ├── test_masked_conv2d.py
│ ├── test_merge_cells.py
│ ├── test_min_area_polygons.py
│ ├── test_modulated_deform_conv.py
│ ├── test_ms_deformable_attn.py
│ ├── test_nms.py
│ ├── test_nms_quadri.py
│ ├── test_nms_rotated.py
│ ├── test_onnx.py
│ ├── test_pixel_group.py
│ ├── test_points_in_polygons.py
│ ├── test_prroi_pool.py
│ ├── test_psa_mask.py
│ ├── test_riroi_align_rotated.py
│ ├── test_roi_align.py
│ ├── test_roi_align_rotated.py
│ ├── test_roi_pool.py
│ ├── test_roiaware_pool3d.py
│ ├── test_roipoint_pool3d.py
│ ├── test_rotated_feature_align.py
│ ├── test_saconv.py
│ ├── test_scatter_points.py
│ ├── test_spconv.py
│ ├── test_syncbn.py
│ ├── test_three_interpolate.py
│ ├── test_three_nn.py
│ ├── test_tin_shift.py
│ ├── test_upfirdn2d.py
│ └── test_voxelization.py
├── test_transforms/
│ ├── test_transforms_formatting.py
│ ├── test_transforms_loading.py
│ ├── test_transforms_processing.py
│ └── test_transforms_wrapper.py
├── test_utils/
│ ├── test_env.py
│ └── test_parrots_jit.py
├── test_video/
│ ├── test_optflow.py
│ ├── test_processing.py
│ └── test_reader.py
└── test_visualization.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .dev_scripts/check_installation.py
================================================
import numpy as np
import torch
from mmcv.ops import box_iou_rotated
from mmcv.utils import collect_env
def check_installation():
"""Check whether mmcv has been installed successfully."""
np_boxes1 = np.asarray(
[[1.0, 1.0, 3.0, 4.0, 0.5], [2.0, 2.0, 3.0, 4.0, 0.6],
[7.0, 7.0, 8.0, 8.0, 0.4]],
dtype=np.float32)
np_boxes2 = np.asarray(
[[0.0, 2.0, 2.0, 5.0, 0.3], [2.0, 1.0, 3.0, 3.0, 0.5],
[5.0, 5.0, 6.0, 7.0, 0.4]],
dtype=np.float32)
boxes1 = torch.from_numpy(np_boxes1)
boxes2 = torch.from_numpy(np_boxes2)
# test mmcv with CPU ops
box_iou_rotated(boxes1, boxes2)
print('CPU ops were compiled successfully.')
# test mmcv with both CPU and CUDA ops
if torch.cuda.is_available():
boxes1 = boxes1.cuda()
boxes2 = boxes2.cuda()
box_iou_rotated(boxes1, boxes2)
print('CUDA ops were compiled successfully.')
else:
print('No CUDA runtime is found, skipping the checking of CUDA ops.')
if __name__ == '__main__':
print('Start checking the installation of mmcv ...')
check_installation()
print('mmcv has been installed successfully.\n')
env_info_dict = collect_env()
env_info = '\n'.join([(f'{k}: {v}') for k, v in env_info_dict.items()])
dash_line = '-' * 60 + '\n'
print('Environment information:')
print(dash_line + env_info + '\n' + dash_line)
================================================
FILE: .dockerignore
================================================
.git
.gitignore
*.egg-info
.eggs/
.mypy-cache
pip-wheel-metadata
================================================
FILE: .github/ISSUE_TEMPLATE/1-bug-report.yml
================================================
name: "🐞 Bug report"
description: "Create a report to help us reproduce and fix the bug"
labels: bug
title: "[Bug] "
body:
- type: markdown
attributes:
value: |
## Note
For general usage questions or idea discussions, please post it to our [**Forum**](https://github.com/open-mmlab/mmcv/discussions)
Please fill in as **much** of the following form as you're able to. **The clearer the description, the shorter it will take to solve it.**
- type: checkboxes
attributes:
label: Prerequisite
description: Please check the following items before creating a new issue.
options:
- label: I have searched [Issues](https://github.com/open-mmlab/mmcv/issues) and [Discussions](https://github.com/open-mmlab/mmcv/discussions) but cannot get the expected help.
required: true
- label: The bug has not been fixed in the latest version(https://github.com/open-mmlab/mmcv).
required: true
- type: textarea
attributes:
label: Environment
description: |
Please run `python -c "from mmcv.utils import collect_env; print(collect_env())"` to collect necessary environment information and copy-paste it here.
You may add additional information that may be helpful for locating the problem, such as
- How you installed PyTorch \[e.g., pip, conda, source\]
- Other environment variables that may be related (such as `$PATH`, `$LD_LIBRARY_PATH`, `$PYTHONPATH`, etc.)
validations:
required: true
- type: textarea
attributes:
label: Reproduces the problem - code sample
description: |
Please provide a code sample that reproduces the problem you ran into. It can be a Colab link or just a code snippet.
placeholder: |
```python
# Sample code to reproduce the problem
```
validations:
required: true
- type: textarea
attributes:
label: Reproduces the problem - command or script
description: |
What command or script did you run?
placeholder: |
```shell
The command or script you run.
```
validations:
required: true
- type: textarea
attributes:
label: Reproduces the problem - error message
description: |
Please provide the error message or logs you got, with the full traceback.
Tip: You can attach images or log files by dragging them into the text area..
placeholder: |
```
The error message or logs you got, with the full traceback.
```
validations:
required: true
- type: textarea
attributes:
label: Additional information
description: |
Tell us anything else you think we should know.
Tip: You can attach images or log files by dragging them into the text area.
placeholder: |
1. What's your expected result?
2. What dataset did you use?
3. What do you think might be the reason?
- type: markdown
attributes:
value: |
## Acknowledgement
Thanks for taking the time to fill out this report.
If you have already identified the reason, we strongly appreciate you creating a new PR to fix it [**Here**](https://github.com/open-mmlab/mmcv/pulls)!
Please refer to [**Contribution Guide**](https://mmcv.readthedocs.io/en/latest/community/contributing.html) for contributing.
Welcome to join our [**Community (TODO)**](https://mmcv.readthedocs.io/en/latest/contact.html) to discuss together. 👬
================================================
FILE: .github/ISSUE_TEMPLATE/2-feature_request.yml
================================================
name: 🚀 Feature request
description: Suggest an idea for this project
labels: [feature-request]
title: "[Feature] "
body:
- type: markdown
attributes:
value: |
## Note
For general usage questions or idea discussions, please post it to our [**Forum**](https://github.com/open-mmlab/mmcv/discussions)
Please fill in as **much** of the following form as you're able to. **The clearer the description, the shorter it will take to solve it.**
- type: textarea
attributes:
label: What is the feature?
description: Tell us more about the feature and how this feature can help.
placeholder: |
E.g., It is inconvenient when \[....\].
validations:
required: true
- type: textarea
attributes:
label: Any other context?
description: |
Have you considered any alternative solutions or features? If so, what are they? Also, feel free to add any other context or screenshots about the feature request here.
- type: markdown
attributes:
value: |
## Acknowledgement
Thanks for taking the time to fill out this report.
We strongly appreciate you creating a new PR to implement it [**Here**](https://github.com/open-mmlab/mmcv/pulls)!
Please refer to [**Contribution Guide**](https://mmcv.readthedocs.io/en/latest/community/contributing.html) for contributing.
Welcome to join our [**Community (TODO)**](https://mmcv.readthedocs.io/en/latest/contact.html) to discuss together. 👬
================================================
FILE: .github/ISSUE_TEMPLATE/3-documentation.yml
================================================
name: 📚 Documentation
description: Report an issue related to the documentation.
labels: "docs"
title: "[Docs] "
body:
- type: markdown
attributes:
value: |
## Note
For general usage questions or idea discussions, please post it to our [**Forum**](https://github.com/open-mmlab/mmcv/discussions)
Please fill in as **much** of the following form as you're able to. **The clearer the description, the shorter it will take to solve it.**
- type: textarea
attributes:
label: 📚 The doc issue
description: >
A clear and concise description the issue.
validations:
required: true
- type: textarea
attributes:
label: Suggest a potential alternative/fix
description: >
Tell us how we could improve the documentation in this regard.
- type: markdown
attributes:
value: |
## Acknowledgement
Thanks for taking the time to fill out this report.
If you have already identified the reason, we strongly appreciate you creating a new PR to fix it [**here**](https://github.com/open-mmlab/mmcv/pulls)!
Please refer to [**Contribution Guide**](https://mmcv.readthedocs.io/en/latest/community/contributing.html) for contributing.
Welcome to join our [**Community(TODO)**](https://mmcv.readthedocs.io/en/latest/contact.html) to discuss together. 👬
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
- name: 💬 Forum
url: https://github.com/open-mmlab/mmcv/discussions
about: Ask general usage questions and discuss with other mmcv community members
- name: MMCV Documentation
url: https://mmcv.readthedocs.io/en/latest/
about: Check if your question is answered in docs
- name: 🌐 Explore OpenMMLab
url: https://openmmlab.com/
about: Get know more about OpenMMLab
================================================
FILE: .github/pull_request_template.md
================================================
Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.
## Motivation
Please describe the motivation of this PR and the goal you want to achieve through this PR.
## Modification
Please briefly describe what modification is made in this PR.
## BC-breaking (Optional)
Does the modification introduce changes that break the backward-compatibility of the downstream repositories?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.
## Use cases (Optional)
If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.
## Checklist
**Before PR**:
- [ ] I have read and followed the workflow indicated in the [CONTRIBUTING.md](https://github.com/open-mmlab/mmcv/blob/master/CONTRIBUTING.md) to create this PR.
- [ ] Pre-commit or linting tools indicated in [CONTRIBUTING.md](https://github.com/open-mmlab/mmcv/blob/master/CONTRIBUTING.md) are used to fix the potential lint issues.
- [ ] Bug fixes are covered by unit tests, the case that causes the bug should be added in the unit tests.
- [ ] New functionalities are covered by complete unit tests. If not, please add more unit test to ensure the correctness.
- [ ] The documentation has been modified accordingly, including docstring or example tutorials.
**After PR**:
- [ ] If the modification has potential influence on downstream or other related projects, this PR should be tested with some of those projects, like MMDet or MMCls.
- [ ] CLA has been signed and all committers have signed the CLA in this PR.
================================================
FILE: .github/workflows/build_macos_wheel.yml
================================================
name: build macos wheel
on: push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_macos10_wheel:
runs-on: macos-latest
if: contains(github.event.head_commit.message, 'Bump version to')
strategy:
matrix:
torch: [1.8.0, 1.9.0, 1.10.0, 1.11.0, 1.12.0, 1.13.0, 2.0.0, 2.1.0]
python-version: [3.7, 3.8, 3.9, '3.10', '3.11']
include:
- torch: 1.8.0
torchvision: 0.9.0
- torch: 1.9.0
torchvision: 0.10.0
- torch: 1.10.0
torchvision: 0.11.0
- torch: 1.11.0
torchvision: 0.12.0
- torch: 1.12.0
torchvision: 0.13.0
- torch: 1.13.0
torchvision: 0.14.0
- torch: 2.0.0
torchvision: 0.15.1
- torch: 2.1.0
torchvision: 0.16.0
exclude:
- torch: 1.8.0
python-version: '3.10'
- torch: 1.9.0
python-version: '3.10'
- torch: 1.10.0
python-version: '3.10'
- torch: 1.8.0
python-version: '3.11'
- torch: 1.9.0
python-version: '3.11'
- torch: 1.10.0
python-version: '3.11'
- torch: 1.10.0
python-version: '3.11'
- torch: 1.11.0
python-version: '3.11'
- torch: 1.12.0
python-version: '3.11'
- torch: 1.13.0
python-version: '3.11'
- torch: 2.0.0
python-version: 3.7
- torch: 2.1.0
python-version: 3.7
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install psutil
run: pip install psutil
- name: Install PyTorch
run: pip install torch==${{matrix.torch}} torchvision==${{matrix.torchvision}} --no-cache-dir
- name: Build and install
run: |
pip install wheel
python setup.py bdist_wheel
- uses: actions/upload-artifact@v3
with:
name: ${{matrix.torch}}
path: dist/
================================================
FILE: .github/workflows/lint.yml
================================================
name: lint
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10.15
uses: actions/setup-python@v2
with:
python-version: '3.10.15'
- name: Install pre-commit hook
run: |
pip install pre-commit
pre-commit install
- name: Linting
run: pre-commit run --all-files
- name: Format c/cuda codes with clang-format
uses: DoozyX/clang-format-lint-action@v0.18
with:
source: mmcv/ops/csrc
extensions: h,c,cpp,hpp,cu,cuh
style: google
================================================
FILE: .github/workflows/merge_stage_test.yml
================================================
name: merge_stage_test
on:
push:
paths-ignore:
- ".github/**.md"
- "docker/**"
- "docs/**"
- 'examples/**'
- '.dev_scripts/**'
- "README.md"
- "README_zh-CN.md"
- "CONTRIBUTING.md"
- ".pre-commit-config.yaml"
- ".pre-commit-config-zh-cn.yaml"
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_without_torch:
runs-on: ubuntu-22.04
env:
MMCV_WITH_OPS: 0
strategy:
matrix:
python-version: [3.7]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y ffmpeg libturbojpeg
- name: Install MMEngine from main branch
run: pip install git+https://github.com/open-mmlab/mmengine.git@main
- name: Build MMCV from source
run: pip install -e . -v
- name: Install unit tests dependencies
run: pip install -r requirements/test.txt
- name: Run unit tests
run: pytest tests/test_image tests/test_transforms tests/test_video tests/test_arraymisc.py tests/test_visualization.py tests/test_utils/test_env.py --ignore=tests/test_image/test_io.py
build_without_ops:
runs-on: ubuntu-22.04
env:
MMCV_WITH_OPS: 0
strategy:
matrix:
python-version: [3.7]
torch: [1.8.1, 1.9.1]
include:
- torch: 1.8.1
torchvision: 0.9.1
- torch: 1.9.1
torchvision: 0.10.1
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y ffmpeg libturbojpeg
- name: Install PyTorch
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
- name: Install MMEngine from main branch
run: pip install git+https://github.com/open-mmlab/mmengine.git@main
- name: Build MMCV from source
run: pip install -e . -v
- name: Install unit tests dependencies
run: pip install -r requirements/test.txt
- name: Run unit tests
run: pytest tests --ignore=tests/test_ops
build_cpu_py:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.8, 3.9, '3.10']
torch: [1.13.0]
include:
- torch: 1.13.0
torchvision: 0.14.0
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y ffmpeg libturbojpeg
- name: Upgrade pip and wheel
run: pip install pip wheel --upgrade
- name: Install PyTorch
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
- name: Install MMEngine from main branch
run: pip install git+https://github.com/open-mmlab/mmengine.git@main
- name: Install ninja to speed the compilation
run: pip install ninja psutil
- name: Build MMCV from source
run: pip install -e . -v
- name: Install unit tests dependencies
run: pip install -r requirements/test.txt
- name: Run unit tests and generate coverage report
run: |
coverage run --branch --source mmcv -m pytest tests/
coverage xml
coverage report -m
build_cpu_pt:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.7]
torch: [1.8.1, 1.9.1, 1.10.1, 1.11.0, 1.12.0, 1.13.0, 2.0.0, 2.1.0]
include:
- torch: 1.8.1
torchvision: 0.9.1
- torch: 1.9.1
torchvision: 0.10.1
- torch: 1.10.1
torchvision: 0.11.2
- torch: 1.11.0
torchvision: 0.12.0
- torch: 1.12.0
torchvision: 0.13.0
- torch: 1.13.0
torchvision: 0.14.0
- torch: 2.0.0
torchvision: 0.15.1
python-version: 3.8
- torch: 2.1.0
torchvision: 0.16.0
python-version: 3.8
exclude:
- torch: 2.0.0
python-version: 3.7
- torch: 2.1.0
python-version: 3.7
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y ffmpeg libturbojpeg
- name: Upgrade pip and wheel
run: pip install pip wheel --upgrade
- name: Install PyTorch
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
- name: Install MMEngine from main branch
run: pip install git+https://github.com/open-mmlab/mmengine.git@main
- name: Install ninja to speed the compilation
run: pip install ninja psutil
- name: Build MMCV from source
run: pip install -e . -v
- name: Install unit tests dependencies
run: pip install -r requirements/test.txt
- name: Run unit tests and generate coverage report
run: |
coverage run --branch --source mmcv -m pytest tests/
coverage xml
coverage report -m
# Only upload coverage report for python3.7 && pytorch1.8.1 cpu
- name: Upload coverage to Codecov
if: ${{matrix.torch == '1.8.1' && matrix.python-version == '3.8'}}
uses: codecov/codecov-action@v1.0.14
with:
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false
build_cu102:
runs-on: ubuntu-22.04
container:
image: pytorch/pytorch:1.8.1-cuda10.2-cudnn7-devel
env:
FORCE_CUDA: 1
MMCV_CUDA_ARGS: -gencode=arch=compute_61,code=sm_61
strategy:
matrix:
python-version: [3.7]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and wheel
run: pip install pip wheel --upgrade
- name: Fetch GPG keys
run: |
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
- name: Install system dependencies
run: apt-get update && apt-get install -y git ffmpeg libturbojpeg
- name: Install MMEngine from main branch
run: pip install git+https://github.com/open-mmlab/mmengine.git@main
- name: Install ninja to speed the compilation
run: pip install ninja psutil
- name: Build MMCV from source
run: pip install -e . -v
- name: Install unit tests dependencies
run: pip install -r requirements/test.txt
- name: Run unit tests and generate coverage report
run: |
coverage run --branch --source mmcv -m pytest tests/
coverage xml
coverage report -m
build_cu111:
runs-on: ubuntu-22.04
container:
image: pytorch/pytorch:1.8.1-cuda11.1-cudnn8-devel
env:
FORCE_CUDA: 1
MMCV_CUDA_ARGS: -gencode=arch=compute_61,code=sm_61
strategy:
matrix:
python-version: [3.7]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and wheel
run: pip install pip wheel --upgrade
- name: Fetch GPG keys
run: |
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
- name: Install system dependencies
run: apt-get update && apt-get install -y git ffmpeg libturbojpeg
- name: Install MMEngine from main branch
run: pip install git+https://github.com/open-mmlab/mmengine.git@main
- name: Install ninja to speed the compilation
run: pip install ninja psutil
- name: Build MMCV from source
run: pip install -e . -v
- name: Install unit tests dependencies
run: pip install -r requirements/test.txt
- name: Run unit tests and generate coverage report
run: |
coverage run --branch --source mmcv -m pytest tests/
coverage xml
coverage report -m
build_cu116:
runs-on: ubuntu-22.04
container:
image: pytorch/pytorch:1.13.0-cuda11.6-cudnn8-devel
env:
FORCE_CUDA: 1
MMCV_CUDA_ARGS: -gencode=arch=compute_61,code=sm_61
strategy:
matrix:
python-version: [3.7]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and wheel
run: pip install pip wheel --upgrade
- name: Fetch GPG keys
run: |
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
- name: Install system dependencies
run: apt-get update && apt-get install -y git ffmpeg libturbojpeg
- name: Install MMEngine from main branch
run: pip install git+https://github.com/open-mmlab/mmengine.git@main
- name: Install ninja to speed the compilation
run: pip install ninja psutil
- name: Build MMCV from source
run: pip install -e . -v
- name: Install unit tests dependencies
run: pip install -r requirements/test.txt
- name: Run unit tests and generate coverage report
run: |
coverage run --branch --source mmcv -m pytest tests
coverage xml
coverage report -m
build_windows_without_ops:
runs-on: windows-2019
env:
MMCV_WITH_OPS: 0
strategy:
matrix:
python-version: [3.7]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and wheel
run: python -m pip install pip wheel --upgrade
- name: Install PyTorch
run: pip install torch==1.8.1+cpu torchvision==0.9.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
- name: Install MMEngine from main branch
run: pip install git+https://github.com/open-mmlab/mmengine.git@main
- name: Install ninja to speed the compilation
run: pip install ninja psutil
- name: Build MMCV from source
run: pip install -e . -v
- name: Install unit tests dependencies
run: pip install -r requirements/test.txt
- name: Run unit tests
run: pytest tests --ignore=tests/test_ops --ignore tests/test_image/test_io.py
build_windows:
runs-on: windows-2019
strategy:
matrix:
torch: [1.8.1, 2.1.0]
include:
- torch: 1.8.1
torchvision: 0.9.1
python-version: 3.7
- torch: 2.1.0
torchvision: 0.16.0
python-version: 3.8
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and wheel
run: python -m pip install pip wheel --upgrade
- name: Install PyTorch
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
- name: Install MMEngine from main branch
run: pip install git+https://github.com/open-mmlab/mmengine.git@main
- name: Install ninja to speed the compilation
run: pip install ninja psutil
- name: Build MMCV from source
run: pip install -e . -v
- name: Install unit tests dependencies
run: pip install -r requirements/test.txt
- name: Run unit tests
run: pytest tests/ --ignore tests/test_image/test_io.py
build_macos:
runs-on: macos-latest
strategy:
matrix:
torch: [1.8.1, 2.1.0]
include:
- torch: 1.8.1
torchvision: 0.9.1
python-version: 3.7
- torch: 2.1.0
torchvision: 0.16.0
python-version: 3.8
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: brew install ffmpeg jpeg-turbo
- name: Upgrade pip and wheel
run: pip install pip wheel --upgrade
- name: Install PyTorch
run: pip install torch==${{ matrix.torch }} torchvision==${{ matrix.torchvision }}
- name: Install MMEngine from main branch
run: pip install git+https://github.com/open-mmlab/mmengine.git@main
- name: Install ninja to speed the compilation
run: pip install ninja psutil
- name: Build MMCV from source
run: pip install -e . -v
- name: Install unit tests dependencies
run: pip install -r requirements/test.txt
- name: Run unit tests
run: pytest tests/
================================================
FILE: .github/workflows/pr_stage_test.yml
================================================
name: pr_stage_test
on:
pull_request:
paths-ignore:
- ".github/**.md"
- "docker/**"
- "docs/**"
- 'examples/**'
- '.dev_scripts/**'
- "README.md"
- "README_zh-CN.md"
- "CONTRIBUTING.md"
- ".pre-commit-config.yaml"
- ".pre-commit-config-zh-cn.yaml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_cu121:
runs-on: ubuntu-22.04
container:
image: nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04
strategy:
matrix:
python-version: ["3.10"]
torch: ["2.5.1"]
steps:
- uses: actions/checkout@v3
- name: Install basic tools
run: |
apt-get update
apt-get install -y wget build-essential git software-properties-common
# 安装特定版本的 Python
- name: Install Python ${{ matrix.python-version }}
run: |
add-apt-repository ppa:deadsnakes/ppa -y
apt-get update
apt-get install -y python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-distutils
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${{ matrix.python-version }} 1
update-alternatives --install /usr/bin/python python /usr/bin/python${{ matrix.python-version }} 1
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
# 安装 PyTorch
- name: Install PyTorch
run: |
pip install torch==${{ matrix.torch }} torchvision --index-url https://download.pytorch.org/whl/cu121
- name: Fetch GPG keys
run: |
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
- name: Install system dependencies
run: apt-get update && apt-get install -y git ffmpeg libturbojpeg
- name: Install MMEngine from main branch
run: pip install git+https://github.com/open-mmlab/mmengine.git@main
- name: Install ninja to speed the compilation
run: pip install ninja psutil
- name: Build MMEngine from source
run: pip install -e . -v
- name: Install unit tests dependencies
run: |
pip install -r requirements/test.txt
# Distributed related unit test may randomly error in PyTorch 1.13.0
- name: Run unittests and generate coverage report
run: |
coverage run --branch --source mmengine -m pytest tests/ --ignore tests/test_dist/
coverage xml
coverage report -m
build_cu118:
runs-on: ubuntu-22.04
container:
image: nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
strategy:
matrix:
python-version: ["3.10"]
torch: ["2.0.0", "2.1.0","2.3.1"]
steps:
- uses: actions/checkout@v3
- name: Install basic tools
run: |
apt-get update
apt-get install -y wget build-essential git software-properties-common
# 安装特定版本的 Python
- name: Install Python ${{ matrix.python-version }}
run: |
add-apt-repository ppa:deadsnakes/ppa -y
apt-get update
apt-get install -y python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-distutils
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${{ matrix.python-version }} 1
update-alternatives --install /usr/bin/python python /usr/bin/python${{ matrix.python-version }} 1
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
# 安装 PyTorch
- name: Install PyTorch
run: |
pip install torch==${{ matrix.torch }} torchvision --index-url https://download.pytorch.org/whl/cu118
- name: Fetch GPG keys
run: |
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
- name: Install system dependencies
run: apt-get update && apt-get install -y git ffmpeg libturbojpeg
- name: Install MMEngine from main branch
run: pip install git+https://github.com/open-mmlab/mmengine.git@main
- name: Install ninja to speed the compilation
run: pip install ninja psutil
- name: Build MMEngine from source
run: pip install -e . -v
- name: Install unit tests dependencies
run: |
pip install -r requirements/test.txt
pip install numpy==1.24.3
# Distributed related unit test may randomly error in PyTorch 1.13.0
- name: Run unittests and generate coverage report
run: |
coverage run --branch --source mmengine -m pytest tests/ --ignore tests/test_dist/
coverage xml
coverage report -m
build_windows_without_ops:
runs-on: windows-2019
env:
MMCV_WITH_OPS: 0
strategy:
matrix:
python-version: [3.7]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and wheel
run: python -m pip install pip wheel --upgrade
- name: Install PyTorch
run: pip install torch==1.8.1+cpu torchvision==0.9.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
- name: Install MMEngine from main branch
run: pip install git+https://github.com/open-mmlab/mmengine.git@main
- name: Install ninja to speed the compilation
run: pip install ninja psutil
- name: Build MMCV from source
run: pip install -e . -v
- name: Install unit tests dependencies
run: pip install -r requirements/test.txt
- name: Run unit tests
run: pytest tests --ignore=tests/test_ops --ignore tests/test_image/test_io.py
build_windows:
runs-on: windows-2019
strategy:
matrix:
torch: [1.8.1, 2.1.0]
include:
- torch: 1.8.1
torchvision: 0.9.1
python-version: 3.7
- torch: 2.1.0
torchvision: 0.16.0
python-version: 3.8
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip and wheel
run: python -m pip install pip wheel --upgrade
- name: Install PyTorch
run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
- name: Install MMEngine from main branch
run: pip install git+https://github.com/open-mmlab/mmengine.git@main
- name: Install ninja to speed the compilation
run: pip install ninja psutil
- name: Build MMCV from source
run: pip install -e . -v
- name: Install unit tests dependencies
run: pip install -r requirements/test.txt
- name: Run unit tests
run: pytest tests/ --ignore tests/test_image/test_io.py
# build_macos:
# runs-on: macos-latest
# strategy:
# matrix:
# torch: [1.8.1, 2.1.0]
# include:
# - torch: 1.8.1
# torchvision: 0.9.1
# python-version: 3.7.1
# - torch: 2.1.0
# torchvision: 0.16.0
# python-version: 3.8.1
# steps:
# - uses: actions/checkout@v2
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install system dependencies
# run: brew install ffmpeg jpeg-turbo
# - name: Upgrade pip and wheel
# run: pip install pip wheel --upgrade
# - name: Install PyTorch
# run: pip install torch==${{ matrix.torch }} torchvision==${{ matrix.torchvision }}
# - name: Install MMEngine from main branch
# run: pip install git+https://github.com/open-mmlab/mmengine.git@main
# - name: Install ninja to speed the compilation
# run: pip install ninja psutil
# - name: Build MMCV from source
# run: pip install -e . -v
# - name: Install unit tests dependencies
# run: pip install -r requirements/test.txt
# - name: Run unit tests
# run: pytest tests/
================================================
FILE: .github/workflows/publish-to-pypi.yml
================================================
name: deploy
on: push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-n-publish_without_ops:
runs-on: ubuntu-22.04
if: startsWith(github.event.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Upgrade Setuptools
run: pip install setuptools wheel --upgrade
- name: Build MMCV
run: |
sed -i "s/os.getenv('MMCV_WITH_OPS', '1')/os.getenv('MMCV_WITH_OPS', '0')/g" setup.py
python setup.py sdist bdist_wheel
- name: Publish distribution to PyPI
run: |
pip install twine
twine upload dist/* -u __token__ -p ${{ secrets.pypi_password }}
build-n-publish_with_ops:
runs-on: ubuntu-22.04
if: startsWith(github.event.ref, 'refs/tags')
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Upgrade Setuptools
run: pip install setuptools --upgrade
- name: Build MMCV with ops
run: python setup.py sdist
- name: Publish distribution to PyPI
run: |
pip install twine
twine upload dist/* -u __token__ -p ${{ secrets.pypi_password }}
================================================
FILE: .gitignore
================================================
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# PyTorch checkpoint
*.pth
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
mlu-ops/
mlu-ops.*
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/en/_build/
docs/en/api/generated/
docs/zh_cn/_build/
docs/zh_cn/api/generated/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
# editors and IDEs
.idea/
.vscode/
# custom
.DS_Store
# datasets and logs and checkpoints
data/
work_dir/
src/
================================================
FILE: .pre-commit-config-zh-cn.yaml
================================================
exclude: ^tests/data/
repos:
- repo: https://github.com/pre-commit/pre-commit
rev: v4.0.0
hooks:
- id: validate_manifest
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
- repo: https://gitee.com/openmmlab/mirrors-isort
rev: 5.11.5
hooks:
- id: isort
- repo: https://gitee.com/openmmlab/mirrors-yapf
rev: v0.32.0
hooks:
- id: yapf
- repo: https://gitee.com/openmmlab/mirrors-pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: check-yaml
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: double-quote-string-fixer
- id: check-merge-conflict
- id: fix-encoding-pragma
args: ["--remove"]
- id: mixed-line-ending
args: ["--fix=lf"]
- repo: https://gitee.com/openmmlab/mirrors-codespell
rev: v2.2.1
hooks:
- id: codespell
- repo: https://gitee.com/openmmlab/mirrors-mdformat
rev: 0.7.9
hooks:
- id: mdformat
args: ["--number"]
additional_dependencies:
- mdformat-openmmlab
- mdformat_frontmatter
- linkify-it-py
- repo: https://gitee.com/openmmlab/mirrors-docformatter
# TODO:https://github.com/PyCQA/docformatter/issues/289
rev: v1.3.1
hooks:
- id: docformatter
args: ["--in-place", "--wrap-descriptions", "79"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.0.0
hooks:
- id: pyupgrade
args: ["--py36-plus"]
- repo: https://gitee.com/openmmlab/pre-commit-hooks
rev: v0.2.0 # Use the ref you want to point at
hooks:
- id: check-copyright
args: ["mmcv", "tests", "--excludes", "mmcv/ops"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.2.0
hooks:
- id: mypy
exclude: |-
(?x)(
^test
| ^docs
)
additional_dependencies: ["types-setuptools", "types-requests"]
# - repo: local
# hooks:
# - id: clang-format
# name: clang-format
# description: Format files with ClangFormat
# entry: clang-format -style=google -i
# language: system
# files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|cuh|proto)$
================================================
FILE: .pre-commit-config.yaml
================================================
exclude: ^tests/data/
repos:
- repo: https://github.com/pre-commit/pre-commit
rev: v4.0.0
hooks:
- id: validate_manifest
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
- repo: https://github.com/PyCQA/isort
rev: 5.11.5
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.32.0
hooks:
- id: yapf
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: check-yaml
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: double-quote-string-fixer
- id: check-merge-conflict
- id: fix-encoding-pragma
args: ["--remove"]
- id: mixed-line-ending
args: ["--fix=lf"]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.1
hooks:
- id: codespell
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.9
hooks:
- id: mdformat
args: ["--number"]
additional_dependencies:
- mdformat-openmmlab
- mdformat_frontmatter
- linkify-it-py
- repo: https://github.com/myint/docformatter
rev: 06907d0
hooks:
- id: docformatter
args: ["--in-place", "--wrap-descriptions", "79"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.0.0
hooks:
- id: pyupgrade
args: ["--py36-plus"]
- repo: https://github.com/open-mmlab/pre-commit-hooks
rev: v0.2.0 # Use the ref you want to point at
hooks:
- id: check-copyright
args: ["mmcv", "tests", "--excludes", "mmcv/ops"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.2.0
hooks:
- id: mypy
exclude: |-
(?x)(
^test
| ^docs
)
additional_dependencies: ["types-setuptools", "types-requests"]
# - repo: local
# hooks:
# - id: clang-format
# name: clang-format
# description: Format files with ClangFormat
# entry: clang-format -style=google -i
# language: system
# files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|cuh|proto)$
================================================
FILE: .readthedocs.yml
================================================
version: 2
formats: all
build:
os: ubuntu-22.04
tools:
python: "3.7"
python:
install:
- requirements: requirements/runtime.txt
- requirements: requirements/docs.txt
================================================
FILE: CITATION.cff
================================================
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- name: "MMCV Contributors"
title: "OpenMMLab Computer Vision Foundation"
date-released: 2018-08-22
url: "https://github.com/open-mmlab/mmcv"
license: Apache-2.0
================================================
FILE: CONTRIBUTING.md
================================================
## Contributing to OpenMMLab
Welcome to the MMCV community, we are committed to building a cutting-edge computer vision foundational library and all kinds of contributions are welcomed, including but not limited to
**Fix bug**
You can directly post a Pull Request to fix typo in code or documents
The steps to fix the bug of code implementation are as follows.
1. If the modification involve significant changes, you should create an issue first and describe the error information and how to trigger the bug. Other developers will discuss with you and propose an proper solution.
2. Posting a pull request after fixing the bug and adding corresponding unit test.
**New Feature or Enhancement**
1. If the modification involve significant changes, you should create an issue to discuss with our developers to propose an proper design.
2. Post a Pull Request after implementing the new feature or enhancement and add corresponding unit test.
**Document**
You can directly post a pull request to fix documents. If you want to add a document, you should first create an issue to check if it is reasonable.
### Pull Request Workflow
If you're not familiar with Pull Request, don't worry! The following guidance will tell you how to create a Pull Request step by step. If you want to dive into the develop mode of Pull Request, you can refer to the [official documents](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests)
#### 1. Fork and clone
If you are posting a pull request for the first time, you should fork the OpenMMLab repositories by clicking the **Fork** button in the top right corner of the GitHub page, and the forked repositories will appear under your GitHub profile.
<img src="https://user-images.githubusercontent.com/57566630/167305749-43c7f4e9-449b-4e98-ade5-0c9276d5c9ce.png" width="1200">
Then, you can clone the repositories to local:
```shell
git clone git@github.com:{username}/mmcv.git
```
After that, you should ddd official repository as the upstream repository
```bash
git remote add upstream git@github.com:open-mmlab/mmcv
```
Check whether remote repository has been added successfully by `git remote -v`
```bash
origin git@github.com:{username}/mmcv.git (fetch)
origin git@github.com:{username}/mmcv.git (push)
upstream git@github.com:open-mmlab/mmcv (fetch)
upstream git@github.com:open-mmlab/mmcv (push)
```
> Here's a brief introduction to origin and upstream. When we use "git clone", we create an "origin" remote by default, which points to the repository cloned from. As for "upstream", we add it ourselves to point to the target repository. Of course, if you don't like the name "upstream", you could name it as you wish. Usually, we'll push the code to "origin". If the pushed code conflicts with the latest code in official("upstream"), we should pull the latest code from upstream to resolve the conflicts, and then push to "origin" again. The posted Pull Request will be updated automatically.
#### 2. Configure pre-commit
You should configure [pre-commit](https://pre-commit.com/#intro) in the local development environment to make sure the code style matches that of OpenMMLab. **Note**: The following code should be executed under the MMCV directory.
```shell
pip install -U pre-commit
pre-commit install
```
Check that pre-commit is configured successfully, and install the hooks defined in `.pre-commit-config.yaml`.
```shell
pre-commit run --all-files
```
<img src="https://user-images.githubusercontent.com/57566630/173660750-3df20a63-cb66-4d33-a986-1f643f1d8aaf.png" width="1200">
<img src="https://user-images.githubusercontent.com/57566630/202368856-0465a90d-8fce-4345-918e-67b8b9c82614.png" width="1200">
If the installation process is interrupted, you can repeatedly run `pre-commit run ... ` to continue the installation.
If the code does not conform to the code style specification, pre-commit will raise a warning and fixes some of the errors automatically.
<img src="https://user-images.githubusercontent.com/57566630/202369176-67642454-0025-4023-a095-263529107aa3.png" width="1200">
If we want to commit our code bypassing the pre-commit hook, we can use the `--no-verify` option(**only for temporarily commit**).
```shell
git commit -m "xxx" --no-verify
```
#### 3. Create a development branch
After configuring the pre-commit, we should create a branch based on the master branch to develop the new feature or fix the bug. The proposed branch name is `username/pr_name`
```shell
git checkout -b yhc/refactor_contributing_doc
```
In subsequent development, if the master branch of the local repository is behind the master branch of "upstream", we need to pull the upstream for synchronization, and then execute the above command:
```shell
git pull upstream master
```
#### 4. Commit the code and pass the unit test
- MMCV introduces mypy to do static type checking to increase the robustness of the code. Therefore, we need to add Type Hints to our code and pass the mypy check. If you are not familiar with Type Hints, you can refer to [this tutorial](https://docs.python.org/3/library/typing.html).
- The committed code should pass through the unit test
```shell
# Pass all unit tests
pytest tests
# Pass the unit test of runner
pytest tests/test_runner/test_runner.py
```
If the unit test fails for lack of dependencies, you can install the dependencies referring to the [guidance](#unit-test)
- If the documents are modified/added, we should check the rendering result referring to [guidance](#document-rendering)
#### 5. Push the code to remote
We could push the local commits to remote after passing through the check of unit test and pre-commit. You can associate the local branch with remote branch by adding `-u` option.
```shell
git push -u origin {branch_name}
```
This will allow you to use the `git push` command to push code directly next time, without having to specify a branch or the remote repository.
#### 6. Create a Pull Request
(1) Create a pull request in GitHub's Pull request interface
<img src="https://user-images.githubusercontent.com/57566630/201533288-516f7ac4-0b14-4dc8-afbd-912475c368b5.png" width="1200">
(2) Modify the PR description according to the guidelines so that other developers can better understand your changes
<img src="https://user-images.githubusercontent.com/57566630/202242953-c91a18ff-e388-4ff9-8591-5fae0ead6c1e.png" width="1200">
Find more details about Pull Request description in [pull request guidelines](#pr-specs).
**note**
(a) The Pull Request description should contain the reason for the change, the content of the change, and the impact of the change, and be associated with the relevant Issue (see [documentation](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
(b) If it is your first contribution, please sign the CLA
<img src="https://user-images.githubusercontent.com/57566630/167307569-a794b967-6e28-4eac-a942-00deb657815f.png" width="1200">
(c) Check whether the Pull Request pass through the CI
<img src="https://user-images.githubusercontent.com/57566630/167307490-f9ebf9fa-63c0-4d83-8ba1-081ea169eb3a.png" width="1200">
MMCV will run unit test for the posted Pull Request on different platforms (Linux, Window, Mac), based on different versions of Python, PyTorch, CUDA to make sure the code is correct. We can see the specific test information by clicking `Details` in the above image so that we can modify the code.
(3) If the Pull Request passes the CI, then you can wait for the review from other developers. You'll modify the code based on the reviewer's comments, and repeat the steps [4](#4-commit-the-code-and-pass-the-unit-test)-[5](#5-push-the-code-to-remote) until all reviewers approve it. Then, we will merge it ASAP.
<img src="https://user-images.githubusercontent.com/57566630/202145400-cc2cd8c4-10b0-472f-ba37-07e6f50acc67.png" width="1200">
#### 7. Resolve conflicts
If your local branch conflicts with the latest master branch of "upstream", you'll need to resolove them. There are two ways to do this:
```shell
git fetch --all --prune
git rebase upstream/master
```
or
```shell
git fetch --all --prune
git merge upstream/master
```
If you are very good at handling conflicts, then you can use rebase to resolve conflicts, as this will keep your commit logs tidy. If you are not familiar with `rebase`, then you can use `merge` to resolve conflicts.
### Guidance
#### Unit test
If you cannot run the unit test of some modules for lacking of some dependencies, such as [video](https://github.com/open-mmlab/mmcv/tree/master/mmcv/video) module, you can try to install the following dependencies:
```shell
# Linux
sudo apt-get update -y
sudo apt-get install -y libturbojpeg
sudo apt-get install -y ffmpeg
# Windows
conda install ffmpeg
```
We should also make sure the committed code will not decrease the coverage of unit test, we could run the following command to check the coverage of unit test:
```shell
python -m coverage run -m pytest /path/to/test_file
python -m coverage html
# check file in htmlcov/index.html
```
#### Document rendering
If the documents are modified/added, we should check the rendering result. We could install the dependencies and run the following command to render the documents and check the results:
```shell
pip install -r requirements/docs.txt
cd docs/zh_cn/
# or docs/en
make html
# check file in ./docs/zh_cn/_build/html/index.html
```
### Code style
#### Python
We adopt [PEP8](https://www.python.org/dev/peps/pep-0008/) as the preferred code style.
We use the following tools for linting and formatting:
- [flake8](https://github.com/PyCQA/flake8): A wrapper around some linter tools.
- [isort](https://github.com/timothycrosley/isort): A Python utility to sort imports.
- [yapf](https://github.com/google/yapf): A formatter for Python files.
- [codespell](https://github.com/codespell-project/codespell): A Python utility to fix common misspellings in text files.
- [mdformat](https://github.com/executablebooks/mdformat): Mdformat is an opinionated Markdown formatter that can be used to enforce a consistent style in Markdown files.
- [docformatter](https://github.com/myint/docformatter): A formatter to format docstring.
Style configurations of yapf and isort can be found in [setup.cfg](./setup.cfg).
We use [pre-commit hook](https://pre-commit.com/) that checks and formats for `flake8`, `yapf`, `isort`, `trailing whitespaces`, `markdown files`,
fixes `end-of-files`, `double-quoted-strings`, `python-encoding-pragma`, `mixed-line-ending`, sorts `requirments.txt` automatically on every commit.
The config for a pre-commit hook is stored in [.pre-commit-config](./.pre-commit-config.yaml).
#### C++ and CUDA
We follow the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html).
### PR Specs
1. Use [pre-commit](https://pre-commit.com) hook to avoid issues of code style
2. One short-time branch should be matched with only one PR
3. Accomplish a detailed change in one PR. Avoid large PR
- Bad: Support Faster R-CNN
- Acceptable: Add a box head to Faster R-CNN
- Good: Add a parameter to box head to support custom conv-layer number
4. Provide clear and significant commit message
5. Provide clear and meaningful PR description
- Task name should be clarified in title. The general format is: \[Prefix\] Short description of the PR (Suffix)
- Prefix: add new feature \[Feature\], fix bug \[Fix\], related to documents \[Docs\], in developing \[WIP\] (which will not be reviewed temporarily)
- Introduce main changes, results and influences on other modules in short description
- Associate related issues and pull requests with a milestone
================================================
FILE: CONTRIBUTING_zh-CN.md
================================================
## 贡献代码
欢迎加入 MMCV 社区,我们致力于打造最前沿的计算机视觉基础库,我们欢迎任何类型的贡献,包括但不限于
**修复错误**
修复代码实现错误的步骤如下:
1. 如果提交的代码改动较大,建议先提交 issue,并正确描述 issue 的现象、原因和复现方式,讨论后确认修复方案。
2. 修复错误并补充相应的单元测试,提交拉取请求。
**新增功能或组件**
1. 如果新功能或模块涉及较大的代码改动,建议先提交 issue,确认功能的必要性。
2. 实现新增功能并添单元测试,提交拉取请求。
**文档补充**
修复文档可以直接提交拉取请求
添加文档或将文档翻译成其他语言步骤如下
1. 提交 issue,确认添加文档的必要性。
2. 添加文档,提交拉取请求。
### 拉取请求工作流
如果你对拉取请求不了解,没关系,接下来的内容将会从零开始,一步一步地指引你如何创建一个拉取请求。如果你想深入了解拉取请求的开发模式,可以参考 github [官方文档](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests)
#### 1. 复刻仓库
当你第一次提交拉取请求时,先复刻 OpenMMLab 原代码库,点击 GitHub 页面右上角的 **Fork** 按钮,复刻后的代码库将会出现在你的 GitHub 个人主页下。
<img src="https://user-images.githubusercontent.com/57566630/167305749-43c7f4e9-449b-4e98-ade5-0c9276d5c9ce.png" width="1200">
将代码克隆到本地
```shell
git clone git@github.com:{username}/mmcv.git
```
添加原代码库为上游代码库
```bash
git remote add upstream git@github.com:open-mmlab/mmcv
```
检查 remote 是否添加成功,在终端输入 `git remote -v`
```bash
origin git@github.com:{username}/mmcv.git (fetch)
origin git@github.com:{username}/mmcv.git (push)
upstream git@github.com:open-mmlab/mmcv (fetch)
upstream git@github.com:open-mmlab/mmcv (push)
```
> 这里对 origin 和 upstream 进行一个简单的介绍,当我们使用 git clone 来克隆代码时,会默认创建一个 origin 的 remote,它指向我们克隆的代码库地址,而 upstream 则是我们自己添加的,用来指向原始代码库地址。当然如果你不喜欢他叫 upstream,也可以自己修改,比如叫 open-mmlab。我们通常向 origin 提交代码(即 fork 下来的远程仓库),然后向 upstream 提交一个 pull request。如果提交的代码和最新的代码发生冲突,再从 upstream 拉取最新的代码,和本地分支解决冲突,再提交到 origin。
#### 2. 配置 pre-commit
在本地开发环境中,我们使用 [pre-commit](https://pre-commit.com/#intro) 来检查代码风格,以确保代码风格的统一。在提交代码,需要先安装 pre-commit(需要在 MMCV 目录下执行):
```shell
pip install -U pre-commit
pre-commit install
```
检查 pre-commit 是否配置成功,并安装 `.pre-commit-config.yaml` 中的钩子:
```shell
pre-commit run --all-files
```
<img src="https://user-images.githubusercontent.com/57566630/173660750-3df20a63-cb66-4d33-a986-1f643f1d8aaf.png" width="1200">
<img src="https://user-images.githubusercontent.com/57566630/202368856-0465a90d-8fce-4345-918e-67b8b9c82614.png" width="1200">
> 如果你是中国用户,由于网络原因,可能会出现安装失败的情况,这时可以使用国内源
> pre-commit install -c .pre-commit-config-zh-cn.yaml
> pre-commit run --all-files -c .pre-commit-config-zh-cn.yaml
如果安装过程被中断,可以重复执行 `pre-commit run ...` 继续安装。
如果提交的代码不符合代码风格规范,pre-commit 会发出警告,并自动修复部分错误。
<img src="https://user-images.githubusercontent.com/57566630/202369176-67642454-0025-4023-a095-263529107aa3.png" width="1200">
如果我们想临时绕开 pre-commit 的检查提交一次代码,可以在 `git commit` 时加上 `--no-verify`(需要保证最后推送至远程仓库的代码能够通过 pre-commit 检查)。
```shell
git commit -m "xxx" --no-verify
```
#### 3. 创建开发分支
安装完 pre-commit 之后,我们需要基于 master 创建开发分支,建议的分支命名规则为 `username/pr_name`。
```shell
git checkout -b yhc/refactor_contributing_doc
```
在后续的开发中,如果本地仓库的 master 分支落后于 upstream 的 master 分支,我们需要先拉取 upstream 的代码进行同步,再执行上面的命令
```shell
git pull upstream master
```
#### 4. 提交代码并在本地通过单元测试
- MMCV 引入了 mypy 来做静态类型检查,以增加代码的鲁棒性。因此我们在提交代码时,需要补充 Type Hints。具体规则可以参考[教程](https://zhuanlan.zhihu.com/p/519335398)。
- 提交的代码同样需要通过单元测试
```shell
# 通过全量单元测试
pytest tests
# 我们需要保证提交的代码能够通过修改模块的单元测试,以 runner 为例
pytest tests/test_runner/test_runner.py
```
如果你由于缺少依赖无法运行修改模块的单元测试,可以参考[指引-单元测试](#单元测试)
- 如果修改/添加了文档,参考[指引](#文档渲染)确认文档渲染正常。
#### 5. 推送代码到远程
代码通过单元测试和 pre-commit 检查后,将代码推送到远程仓库,如果是第一次推送,可以在 `git push` 后加上 `-u` 参数以关联远程分支
```shell
git push -u origin {branch_name}
```
这样下次就可以直接使用 `git push` 命令推送代码了,而无需指定分支和远程仓库。
#### 6. 提交拉取请求(PR)
(1) 在 GitHub 的 Pull request 界面创建拉取请求
<img src="https://user-images.githubusercontent.com/57566630/201533288-516f7ac4-0b14-4dc8-afbd-912475c368b5.png" width="1200">
(2) 根据指引修改 PR 描述,以便于其他开发者更好地理解你的修改
<img src="https://user-images.githubusercontent.com/57566630/202242953-c91a18ff-e388-4ff9-8591-5fae0ead6c1e.png" width="1200">
描述规范详见[拉取请求规范](#拉取请求规范)
 
**注意事项**
(a) PR 描述应该包含修改理由、修改内容以及修改后带来的影响,并关联相关 Issue(具体方式见[文档](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue))
(b) 如果是第一次为 OpenMMLab 做贡献,需要签署 CLA
<img src="https://user-images.githubusercontent.com/57566630/167307569-a794b967-6e28-4eac-a942-00deb657815f.png" width="1200">
(c) 检查提交的 PR 是否通过 CI(集成测试)
<img src="https://user-images.githubusercontent.com/57566630/167307490-f9ebf9fa-63c0-4d83-8ba1-081ea169eb3a.png" width="1200">
MMCV 会在不同的平台(Linux、Window、Mac),基于不同版本的 Python、PyTorch、CUDA 对提交的代码进行单元测试,以保证代码的正确性,如果有任何一个没有通过,我们可点击上图中的 `Details` 来查看具体的测试信息,以便于我们修改代码。
(3) 如果 PR 通过了 CI,那么就可以等待其他开发者的 review,并根据 reviewer 的意见,修改代码,并重复 [4](#4-提交代码并本地通过单元测试)-[5](#5-推送代码到远程) 步骤,直到 reviewer 同意合入 PR。
<img src="https://user-images.githubusercontent.com/57566630/202145400-cc2cd8c4-10b0-472f-ba37-07e6f50acc67.png" width="1200">
所有 reviewer 同意合入 PR 后,我们会尽快将 PR 合并到主分支。
#### 7. 解决冲突
随着时间的推移,我们的代码库会不断更新,这时候,如果你的 PR 与主分支存在冲突,你需要解决冲突,解决冲突的方式有两种:
```shell
git fetch --all --prune
git rebase upstream/master
```
或者
```shell
git fetch --all --prune
git merge upstream/master
```
如果你非常善于处理冲突,那么可以使用 rebase 的方式来解决冲突,因为这能够保证你的 commit log 的整洁。如果你不太熟悉 `rebase` 的使用,那么可以使用 `merge` 的方式来解决冲突。
### 指引
#### 单元测试
如果你无法正常执行部分模块的单元测试,例如 [video](https://github.com/open-mmlab/mmcv/tree/master/mmcv/video) 模块,可能是你的当前环境没有安装以下依赖
```shell
# Linux
sudo apt-get update -y
sudo apt-get install -y libturbojpeg
sudo apt-get install -y ffmpeg
# Windows
conda install ffmpeg
```
在提交修复代码错误或新增特性的拉取请求时,我们应该尽可能的让单元测试覆盖所有提交的代码,计算单元测试覆盖率的方法如下
```shell
python -m coverage run -m pytest /path/to/test_file
python -m coverage html
# check file in htmlcov/index.html
```
#### 文档渲染
在提交修复代码错误或新增特性的拉取请求时,可能会需要修改/新增模块的 docstring。我们需要确认渲染后的文档样式是正确的。
本地生成渲染后的文档的方法如下
```shell
pip install -r requirements/docs.txt
cd docs/zh_cn/
# or docs/en
make html
# check file in ./docs/zh_cn/_build/html/index.html
```
### 代码风格
#### Python
[PEP8](https://www.python.org/dev/peps/pep-0008/) 作为 OpenMMLab 算法库首选的代码规范,我们使用以下工具检查和格式化代码
- [flake8](https://github.com/PyCQA/flake8): Python 官方发布的代码规范检查工具,是多个检查工具的封装
- [isort](https://github.com/timothycrosley/isort): 自动调整模块导入顺序的工具
- [yapf](https://github.com/google/yapf): Google 发布的代码规范检查工具
- [codespell](https://github.com/codespell-project/codespell): 检查单词拼写是否有误
- [mdformat](https://github.com/executablebooks/mdformat): 检查 markdown 文件的工具
- [docformatter](https://github.com/myint/docformatter): 格式化 docstring 的工具
yapf 和 isort 的配置可以在 [setup.cfg](./setup.cfg) 找到
通过配置 [pre-commit hook](https://pre-commit.com/) ,我们可以在提交代码时自动检查和格式化 `flake8`、`yapf`、`isort`、`trailing whitespaces`、`markdown files`,
修复 `end-of-files`、`double-quoted-strings`、`python-encoding-pragma`、`mixed-line-ending`,调整 `requirments.txt` 的包顺序。
pre-commit 钩子的配置可以在 [.pre-commit-config](./.pre-commit-config.yaml) 找到。
pre-commit 具体的安装使用方式见[拉取请求](#2-配置-pre-commit)。
更具体的规范请参考 [OpenMMLab 代码规范](code_style.md)。
#### C++ and CUDA
C++ 和 CUDA 的代码规范遵从 [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html)
### 拉取请求规范
1. 使用 [pre-commit hook](https://pre-commit.com),尽量减少代码风格相关问题
2. 一个`拉取请求`对应一个短期分支
3. 粒度要细,一个`拉取请求`只做一件事情,避免超大的`拉取请求`
- Bad:实现 Faster R-CNN
- Acceptable:给 Faster R-CNN 添加一个 box head
- Good:给 box head 增加一个参数来支持自定义的 conv 层数
4. 每次 Commit 时需要提供清晰且有意义 commit 信息
5. 提供清晰且有意义的`拉取请求`描述
- 标题写明白任务名称,一般格式:\[Prefix\] Short description of the pull request (Suffix)
- prefix: 新增功能 \[Feature\], 修 bug \[Fix\], 文档相关 \[Docs\], 开发中 \[WIP\] (暂时不会被review)
- 描述里介绍`拉取请求`的主要修改内容,结果,以及对其他部分的影响, 参考`拉取请求`模板
- 关联相关的`议题` (issue) 和其他`拉取请求`
6. 如果引入了其他三方库,或借鉴了三方库的代码,请确认他们的许可证和 mmcv 兼容,并在借鉴的代码上补充 `This code is inspired from http://`
================================================
FILE: LICENSE
================================================
Copyright (c) OpenMMLab. All rights reserved
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 2018-2020 Open-MMLab. All rights reserved.
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: LICENSES.md
================================================
# Licenses for special operations
In this file, we list the operations with other licenses instead of Apache 2.0. Users should be careful about adopting these operations in any commercial matters.
| Operation | Files | License |
| :--------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------: |
| upfirdn2d | [mmcv/ops/csrc/pytorch/cuda/upfirdn2d_kernel.cu](https://github.com/open-mmlab/mmcv/tree/2.x/mmcv/ops/csrc/pytorch/cuda/upfirdn2d_kernel.cu) | NVIDIA License |
| fused_leaky_relu | [mmcv/ops/csrc/pytorch/cuda/fused_bias_leakyrelu_cuda.cu](https://github.com/open-mmlab/mmcv/tree/2.x/mmcv/ops/csrc/pytorch/cuda/fused_bias_leakyrelu_cuda.cu) | NVIDIA License |
| bias_act | [mmcv/ops/csrc/pytorch/cuda/bias_act_cuda.cu](https://github.com/open-mmlab/mmcv/tree/2.x/mmcv/ops/csrc/pytorch/cuda/bias_act_cuda.cu) | NVIDIA License |
| filtered_lrelu | [mmcv/ops/csrc/pytorch/cuda/filtered_lrelu.cu](https://github.com/open-mmlab/mmcv/tree/2.x/mmcv/ops/csrc/pytorch/cuda/filtered_lrelu.cu) | NVIDIA License |
| conv2d_gradfix | [mmcv/ops/conv2d_gradfix.py](https://github.com/open-mmlab/mmcv/tree/2.x/mmcv/ops/conv2d_gradfix.py) | NVIDIA License |
================================================
FILE: MANIFEST.in
================================================
include requirements/runtime.txt
include mmcv/ops/csrc/common/cuda/*.cuh mmcv/ops/csrc/common/cuda/*.hpp mmcv/ops/csrc/common/*.hpp
include mmcv/ops/csrc/pytorch/*.cpp mmcv/ops/csrc/pytorch/cuda/*.cu mmcv/ops/csrc/pytorch/cuda/*.cpp mmcv/ops/csrc/pytorch/cpu/*.cpp
include mmcv/ops/csrc/parrots/*.h mmcv/ops/csrc/parrots/*.cpp
include mmcv/ops/csrc/pytorch/mps/*.mm mmcv/ops/csrc/common/mps/*.h mmcv/ops/csrc/common/mps/*.mm
recursive-include mmcv/ops/csrc/ *.h *.hpp *.cpp *.cuh *.cu *.mm
================================================
FILE: README.md
================================================
<div align="center">
<img src="https://raw.githubusercontent.com/open-mmlab/mmcv/main/docs/en/mmcv-logo.png" width="300"/>
<div> </div>
<div align="center">
<b><font size="5">OpenMMLab website</font></b>
<sup>
<a href="https://openmmlab.com">
<i><font size="4">HOT</font></i>
</a>
</sup>
<b><font size="5">OpenMMLab platform</font></b>
<sup>
<a href="https://platform.openmmlab.com">
<i><font size="4">TRY IT OUT</font></i>
</a>
</sup>
</div>
<div> </div>
[](https://mmcv.readthedocs.io/en/latest/get_started/installation.html)
[](https://pypi.org/project/mmcv/)
[](https://pytorch.org/get-started/previous-versions/)
[](https://developer.nvidia.com/cuda-downloads)
[](https://pypi.org/project/mmcv)
[](https://github.com/open-mmlab/mmcv/actions)
[](https://codecov.io/gh/open-mmlab/mmcv)
[](https://github.com/open-mmlab/mmcv/blob/master/LICENSE)
[📘Documentation](https://mmcv.readthedocs.io/en/latest/) |
[🛠️Installation](https://mmcv.readthedocs.io/en/latest/get_started/installation.html) |
[🤔Reporting Issues](https://github.com/open-mmlab/mmcv/issues/new/choose)
</div>
<div align="center">
English | [简体中文](README_zh-CN.md)
</div>
## Highlights
The OpenMMLab team released a new generation of training engine [MMEngine](https://github.com/open-mmlab/mmengine) at the World Artificial Intelligence Conference on September 1, 2022. It is a foundational library for training deep learning models. Compared with MMCV, it provides a universal and powerful runner, an open architecture with a more unified interface, and a more customizable training process.
MMCV v2.0.0 official version was released on April 6, 2023. In version 2.x, it removed components related to the training process and added a data transformation module. Also, starting from 2.x, it renamed the package names **mmcv** to **mmcv-lite** and **mmcv-full** to **mmcv**. For details, see [Compatibility Documentation](docs/en/compatibility.md).
MMCV will maintain both [1.x](https://github.com/open-mmlab/mmcv/tree/1.x) (corresponding to the original [master](https://github.com/open-mmlab/mmcv/tree/master) branch) and **2.x** (corresponding to the **main** branch, now the default branch) versions simultaneously. For details, see [Branch Maintenance Plan](README.md#branch-maintenance-plan).
## Introduction
MMCV is a foundational library for computer vision research and it provides the following functionalities:
- [Image/Video processing](https://mmcv.readthedocs.io/en/latest/understand_mmcv/data_process.html)
- [Image and annotation visualization](https://mmcv.readthedocs.io/en/latest/understand_mmcv/visualization.html)
- [Image transformation](https://mmcv.readthedocs.io/en/latest/understand_mmcv/data_transform.html)
- [Various CNN architectures](https://mmcv.readthedocs.io/en/latest/understand_mmcv/cnn.html)
- [High-quality implementation of common CPU and CUDA ops](https://mmcv.readthedocs.io/en/latest/understand_mmcv/ops.html)
It supports the following systems:
- Linux
- Windows
- macOS
See the [documentation](http://mmcv.readthedocs.io/en/latest) for more features and usage.
Note: MMCV requires Python 3.7+.
## Installation
There are two versions of MMCV:
- **mmcv**: comprehensive, with full features and various CUDA ops out of the box. It takes longer time to build.
- **mmcv-lite**: lite, without CUDA ops but all other features, similar to mmcv\<1.0.0. It is useful when you do not need those CUDA ops.
**Note**: Do not install both versions in the same environment, otherwise you may encounter errors like `ModuleNotFound`. You need to uninstall one before installing the other. `Installing the full version is highly recommended if CUDA is available`.
### Install mmcv
Before installing mmcv, make sure that PyTorch has been successfully installed following the [PyTorch official installation guide](https://github.com/pytorch/pytorch#installation). For apple silicon users, please use PyTorch 1.13+.
The command to install mmcv:
```bash
pip install -U openmim
mim install mmcv
```
If you need to specify the version of mmcv, you can use the following command:
```bash
mim install mmcv==2.0.0
```
If you find that the above installation command does not use a pre-built package ending with `.whl` but a source package ending with `.tar.gz`, you may not have a pre-build package corresponding to the PyTorch or CUDA or mmcv version, in which case you can [build mmcv from source](https://mmcv.readthedocs.io/en/latest/get_started/build.html).
<details>
<summary>Installation log using pre-built packages</summary>
Looking in links: https://download.openmmlab.com/mmcv/dist/cu102/torch1.8.0/index.html<br />
Collecting mmcv<br />
<b>Downloading https://download.openmmlab.com/mmcv/dist/cu102/torch1.8.0/mmcv-2.0.0-cp38-cp38-manylinux1_x86_64.whl</b>
</details>
<details>
<summary>Installation log using source packages</summary>
Looking in links: https://download.openmmlab.com/mmcv/dist/cu102/torch1.8.0/index.html<br />
Collecting mmcv==2.0.0<br />
<b>Downloading mmcv-2.0.0.tar.gz</b>
</details>
For more installation methods, please refer to the [Installation documentation](https://mmcv.readthedocs.io/en/latest/get_started/installation.html).
### Install mmcv-lite
If you need to use PyTorch-related modules, make sure PyTorch has been successfully installed in your environment by referring to the [PyTorch official installation guide](https://github.com/pytorch/pytorch#installation).
```bash
pip install -U openmim
mim install mmcv-lite
```
## FAQ
If you face some installation issues, CUDA related issues or RuntimeErrors,
you may first refer to this [Frequently Asked Questions](https://mmcv.readthedocs.io/en/latest/faq.html).
If you face installation problems or runtime issues, you may first refer to this [Frequently Asked Questions](https://mmcv.readthedocs.io/en/latest/faq.html) to see if there is a solution. If the problem is still not solved, feel free to open an [issue](https://github.com/open-mmlab/mmcv/issues).
## Citation
If you find this project useful in your research, please consider cite:
```latex
@misc{mmcv,
title={{MMCV: OpenMMLab} Computer Vision Foundation},
author={MMCV Contributors},
howpublished = {\url{https://github.com/open-mmlab/mmcv}},
year={2018}
}
```
## Contributing
We appreciate all contributions to improve MMCV. Please refer to [CONTRIBUTING.md](CONTRIBUTING.md) for the contributing guideline.
## License
MMCV is released under the Apache 2.0 license, while some specific operations in this library are with other licenses. Please refer to [LICENSES.md](LICENSES.md) for the careful check, if you are using our code for commercial matters.
## Branch Maintenance Plan
MMCV currently has four branches, namely main, 1.x, master, and 2.x, where 2.x is an alias for the main branch, and master is an alias for the 1.x branch. The 2.x and master branches will be deleted in the future. MMCV's branches go through the following three stages:
| Phase | Time | Branch | description |
| -------------------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| RC Period | 2022.9.1 - 2023.4.5 | Release candidate code (2.x version) will be released on 2.x branch. Default master branch is still 1.x version | Master and 2.x branches iterate normally |
| Compatibility Period | 2023.4.6 - 2023.12.31 | **The 2.x branch has been renamed to the main branch and set as the default branch**, and 1.x branch will correspond to 1.x version | We still maintain the old version 1.x, respond to user needs, but try not to introduce changes that break compatibility; main branch iterates normally |
| Maintenance Period | From 2024/1/1 | Default main branch corresponds to 2.x version and 1.x branch is 1.x version | 1.x branch is in maintenance phase, no more new feature support; main branch is iterating normally |
## Projects in OpenMMLab
- [MMEngine](https://github.com/open-mmlab/mmengine): OpenMMLab foundational library for training deep learning models.
- [MMCV](https://github.com/open-mmlab/mmcv): OpenMMLab foundational library for computer vision.
- [MIM](https://github.com/open-mmlab/mim): MIM installs OpenMMLab packages.
- [MMClassification](https://github.com/open-mmlab/mmclassification): OpenMMLab image classification toolbox and benchmark.
- [MMDetection](https://github.com/open-mmlab/mmdetection): OpenMMLab detection toolbox and benchmark.
- [MMDetection3D](https://github.com/open-mmlab/mmdetection3d): OpenMMLab's next-generation platform for general 3D object detection.
- [MMRotate](https://github.com/open-mmlab/mmrotate): OpenMMLab rotated object detection toolbox and benchmark.
- [MMYOLO](https://github.com/open-mmlab/mmyolo): OpenMMLab YOLO series toolbox and benchmark.
- [MMSegmentation](https://github.com/open-mmlab/mmsegmentation): OpenMMLab semantic segmentation toolbox and benchmark.
- [MMOCR](https://github.com/open-mmlab/mmocr): OpenMMLab text detection, recognition, and understanding toolbox.
- [MMPose](https://github.com/open-mmlab/mmpose): OpenMMLab pose estimation toolbox and benchmark.
- [MMHuman3D](https://github.com/open-mmlab/mmhuman3d): OpenMMLab 3D human parametric model toolbox and benchmark.
- [MMSelfSup](https://github.com/open-mmlab/mmselfsup): OpenMMLab self-supervised learning toolbox and benchmark.
- [MMRazor](https://github.com/open-mmlab/mmrazor): OpenMMLab model compression toolbox and benchmark.
- [MMFewShot](https://github.com/open-mmlab/mmfewshot): OpenMMLab fewshot learning toolbox and benchmark.
- [MMAction2](https://github.com/open-mmlab/mmaction2): OpenMMLab's next-generation action understanding toolbox and benchmark.
- [MMTracking](https://github.com/open-mmlab/mmtracking): OpenMMLab video perception toolbox and benchmark.
- [MMFlow](https://github.com/open-mmlab/mmflow): OpenMMLab optical flow toolbox and benchmark.
- [MMEditing](https://github.com/open-mmlab/mmediting): OpenMMLab image and video editing toolbox.
- [MMGeneration](https://github.com/open-mmlab/mmgeneration): OpenMMLab image and video generative models toolbox.
- [MMDeploy](https://github.com/open-mmlab/mmdeploy): OpenMMLab model deployment framework.
================================================
FILE: README_zh-CN.md
================================================
<div align="center">
<img src="https://raw.githubusercontent.com/open-mmlab/mmcv/main/docs/en/mmcv-logo.png" width="300"/>
<div> </div>
<div align="center">
<b><font size="5">OpenMMLab 官网</font></b>
<sup>
<a href="https://openmmlab.com">
<i><font size="4">HOT</font></i>
</a>
</sup>
<b><font size="5">OpenMMLab 开放平台</font></b>
<sup>
<a href="https://platform.openmmlab.com">
<i><font size="4">TRY IT OUT</font></i>
</a>
</sup>
</div>
<div> </div>
[](https://mmcv.readthedocs.io/zh_CN/latest/get_started/installation.html)
[](https://pypi.org/project/mmcv/)
[](https://pytorch.org/get-started/previous-versions/)
[](https://developer.nvidia.com/cuda-downloads)
[](https://pypi.org/project/mmcv)
[](https://github.com/open-mmlab/mmcv/actions)
[](https://codecov.io/gh/open-mmlab/mmcv)
[](https://github.com/open-mmlab/mmcv/blob/master/LICENSE)
[📘使用文档](https://mmcv.readthedocs.io/zh_CN/latest/) |
[🛠️安装教程](https://mmcv.readthedocs.io/zh_CN/latest/get_started/installation.html) |
[🤔报告问题](https://github.com/open-mmlab/mmcv/issues/new/choose)
</div>
<div align="center">
[English](README.md) | 简体中文
</div>
<div align="center">
<a href="https://openmmlab.medium.com/" style="text-decoration:none;">
<img src="https://user-images.githubusercontent.com/25839884/219255827-67c1a27f-f8c5-46a9-811d-5e57448c61d1.png" width="3%" alt="" /></a>
<img src="https://user-images.githubusercontent.com/25839884/218346358-56cc8e2f-a2b8-487f-9088-32480cceabcf.png" width="3%" alt="" />
<a href="https://discord.gg/raweFPmdzG" style="text-decoration:none;">
<img src="https://user-images.githubusercontent.com/25839884/218347213-c080267f-cbb6-443e-8532-8e1ed9a58ea9.png" width="3%" alt="" /></a>
<img src="https://user-images.githubusercontent.com/25839884/218346358-56cc8e2f-a2b8-487f-9088-32480cceabcf.png" width="3%" alt="" />
<a href="https://twitter.com/OpenMMLab" style="text-decoration:none;">
<img src="https://user-images.githubusercontent.com/25839884/218346637-d30c8a0f-3eba-4699-8131-512fb06d46db.png" width="3%" alt="" /></a>
<img src="https://user-images.githubusercontent.com/25839884/218346358-56cc8e2f-a2b8-487f-9088-32480cceabcf.png" width="3%" alt="" />
<a href="https://www.youtube.com/openmmlab" style="text-decoration:none;">
<img src="https://user-images.githubusercontent.com/25839884/218346691-ceb2116a-465a-40af-8424-9f30d2348ca9.png" width="3%" alt="" /></a>
<img src="https://user-images.githubusercontent.com/25839884/218346358-56cc8e2f-a2b8-487f-9088-32480cceabcf.png" width="3%" alt="" />
<a href="https://space.bilibili.com/1293512903" style="text-decoration:none;">
<img src="https://user-images.githubusercontent.com/25839884/219026751-d7d14cce-a7c9-4e82-9942-8375fca65b99.png" width="3%" alt="" /></a>
<img src="https://user-images.githubusercontent.com/25839884/218346358-56cc8e2f-a2b8-487f-9088-32480cceabcf.png" width="3%" alt="" />
<a href="https://www.zhihu.com/people/openmmlab" style="text-decoration:none;">
<img src="https://user-images.githubusercontent.com/25839884/219026120-ba71e48b-6e94-4bd4-b4e9-b7d175b5e362.png" width="3%" alt="" /></a>
</div>
## Highlights
OpenMMLab 团队于 2022 年 9 月 1 日在世界人工智能大会发布了新一代训练引擎 [MMEngine](https://github.com/open-mmlab/mmengine),它是一个用于训练深度学习模型的基础库。相比于 MMCV,它提供了更高级且通用的训练器、接口更加统一的开放架构以及可定制化程度更高的训练流程。
MMCV v2.0.0 正式版本于 2023 年 4 月 6 日发布。在 2.x 版本中,它删除了和训练流程相关的组件,并新增了数据变换模块。另外,从 2.x 版本开始,重命名包名 **mmcv** 为 **mmcv-lite** 以及 **mmcv-full** 为 **mmcv**。详情见[兼容性文档](docs/zh_cn/compatibility.md)。
MMCV 会同时维护 [1.x](https://github.com/open-mmlab/mmcv/tree/1.x) (对应原 [master](https://github.com/open-mmlab/mmcv/tree/master) 分支) 和 **2.x**(对应 **main** 分支,现为默认分支)版本,详情见[分支维护计划](README_zh-CN.md#分支维护计划)。
## 简介
MMCV 是一个面向计算机视觉的基础库,它提供了以下功能:
- [图像和视频处理](https://mmcv.readthedocs.io/zh_CN/latest/understand_mmcv/data_process.html)
- [图像和标注结果可视化](https://mmcv.readthedocs.io/zh_CN/latest/understand_mmcv/visualization.html)
- [图像变换](https://mmcv.readthedocs.io/zh_CN/latest/understand_mmcv/data_transform.html)
- [多种 CNN 网络结构](https://mmcv.readthedocs.io/zh_CN/latest/understand_mmcv/cnn.html)
- [高质量实现的常见 CUDA 算子](https://mmcv.readthedocs.io/zh_CN/latest/understand_mmcv/ops.html)
MMCV 支持多种平台,包括:
- Linux
- Windows
- macOS
如想了解更多特性和使用,请参考[文档](http://mmcv.readthedocs.io/zh_CN/latest)。
提示: MMCV 需要 Python 3.7 以上版本。
## 安装
MMCV 有两个版本:
- **mmcv**: 完整版,包含所有的特性以及丰富的开箱即用的 CUDA 算子。注意完整版本可能需要更长时间来编译。
- **mmcv-lite**: 精简版,不包含 CUDA 算子但包含其余所有特性和功能,类似 MMCV 1.0 之前的版本。如果你不需要使用 CUDA 算子的话,精简版可以作为一个考虑选项。
**注意**: 请不要在同一个环境中安装两个版本,否则可能会遇到类似 `ModuleNotFound` 的错误。在安装一个版本之前,需要先卸载另一个。`如果 CUDA 可用,强烈推荐安装 mmcv`。
### 安装 mmcv
在安装 mmcv 之前,请确保 PyTorch 已经成功安装在环境中,可以参考 [PyTorch 官方安装文档](https://github.com/pytorch/pytorch#installation)。如果你使用的是搭载 apple silicon 的 mac 设备,请安装 PyTorch 1.13+ 的版本。
安装 mmcv 的命令如下:
```bash
pip install -U openmim
mim install mmcv
```
如果需要指定 mmcv 的版本,可以使用以下命令
```bash
mim install mmcv==2.0.0
```
如果发现上述的安装命令没有使用预编译包(以 `.whl` 结尾)而是使用源码包(以 `.tar.gz` 结尾)安装,则有可能是我们没有提供和当前环境的 PyTorch 版本、CUDA 版本相匹配的 mmcv 预编译包,此时,你可以[源码安装 mmcv](https://mmcv.readthedocs.io/zh_CN/latest/get_started/build.html)。
<details>
<summary>使用预编译包的安装日志</summary>
Looking in links: https://download.openmmlab.com/mmcv/dist/cu102/torch1.8.0/index.html<br />
Collecting mmcv<br />
<b>Downloading https://download.openmmlab.com/mmcv/dist/cu102/torch1.8.0/mmcv-2.0.0-cp38-cp38-manylinux1_x86_64.whl</b>
</details>
<details>
<summary>使用源码包的安装日志</summary>
Looking in links: https://download.openmmlab.com/mmcv/dist/cu102/torch1.8.0/index.html<br />
Collecting mmcv==2.0.0<br />
<b>Downloading mmcv-2.0.0.tar.gz</b>
</details>
更多安装方式请参考[安装文档](https://mmcv.readthedocs.io/zh_CN/latest/get_started/installation.html)。
### 安装 mmcv-lite
如果你需要使用和 PyTorch 相关的模块,请确保 PyTorch 已经成功安装在环境中,可以参考 [PyTorch 官方安装文档](https://github.com/pytorch/pytorch#installation)。
```bash
pip install -U openmim
mim install mmcv-lite
```
## FAQ
如果你遇到了安装问题或者运行时问题,请查看[问题解决页面](https://mmcv.readthedocs.io/zh_CN/latest/faq.html)是否已有解决方案。如果问题仍然没有解决,欢迎提 [issue](https://github.com/open-mmlab/mmcv/issues)。
## 贡献指南
我们感谢所有的贡献者为改进和提升 MMCV 所作出的努力。请参考[贡献指南](CONTRIBUTING.md)来了解参与项目贡献的相关指引。
## 许可证
`MMCV` 目前以 Apache 2.0 的许可证发布,但是其中有一部分功能并不是使用的 Apache2.0 许可证,我们在 [许可证](LICENSES.md) 中详细地列出了这些功能以及他们对应的许可证,如果您正在从事盈利性活动,请谨慎参考此文档。
## 分支维护计划
MMCV 目前有四个分支,分别是 main、1.x、master 和 2.x,其中 2.x 为 main 分支的别名,master 为 1.x 分支的别名,2.x 和 master 这两个分支在将来会被删除。MMCV 的分支经历以下三个阶段:
| 阶段 | 时间 | 分支 | 说明 |
| ------ | --------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| 公测期 | 2022.9.1 - 2023.4.5 | 公测版代码发布在 2.x 分支;默认主分支 master 仍对应 1.x 版本 | master 和 2.x 分支正常进行迭代 |
| 兼容期 | 2023.4.6 - 2023.12.31 | **2.x 分支重命名为 main 分支并设置为默认分支**;1.x 分支对应 1.x 版本 | 保持对旧版本 1.x 的维护和开发,响应用户需求,但尽量不引进破坏旧版本兼容性的改动;main 分支正常进行迭代 |
| 维护期 | 2024.1.1 - 待定 | 默认主分支 main 为 2.x 版本;1.x 分支对应 1.x 版本 | 1.x 分支进入维护阶段,不再进行新功能支持;main 分支正常进行迭代 |
## OpenMMLab 的其他项目
- [MMEngine](https://github.com/open-mmlab/mmengine): OpenMMLab 深度学习模型训练基础库
- [MMCV](https://github.com/open-mmlab/mmcv): OpenMMLab 计算机视觉基础库
- [MIM](https://github.com/open-mmlab/mim): MIM 是 OpenMMlab 项目、算法、模型的统一入口
- [MMClassification](https://github.com/open-mmlab/mmclassification): OpenMMLab 图像分类工具箱
- [MMDetection](https://github.com/open-mmlab/mmdetection): OpenMMLab 目标检测工具箱
- [MMDetection3D](https://github.com/open-mmlab/mmdetection3d): OpenMMLab 新一代通用 3D 目标检测平台
- [MMRotate](https://github.com/open-mmlab/mmrotate): OpenMMLab 旋转框检测工具箱与测试基准
- [MMYOLO](https://github.com/open-mmlab/mmyolo): OpenMMLab YOLO 系列工具箱与测试基准
- [MMSegmentation](https://github.com/open-mmlab/mmsegmentation): OpenMMLab 语义分割工具箱
- [MMOCR](https://github.com/open-mmlab/mmocr): OpenMMLab 全流程文字检测识别理解工具箱
- [MMPose](https://github.com/open-mmlab/mmpose): OpenMMLab 姿态估计工具箱
- [MMHuman3D](https://github.com/open-mmlab/mmhuman3d): OpenMMLab 人体参数化模型工具箱与测试基准
- [MMSelfSup](https://github.com/open-mmlab/mmselfsup): OpenMMLab 自监督学习工具箱与测试基准
- [MMRazor](https://github.com/open-mmlab/mmrazor): OpenMMLab 模型压缩工具箱与测试基准
- [MMFewShot](https://github.com/open-mmlab/mmfewshot): OpenMMLab 少样本学习工具箱与测试基准
- [MMAction2](https://github.com/open-mmlab/mmaction2): OpenMMLab 新一代视频理解工具箱
- [MMTracking](https://github.com/open-mmlab/mmtracking): OpenMMLab 一体化视频目标感知平台
- [MMFlow](https://github.com/open-mmlab/mmflow): OpenMMLab 光流估计工具箱与测试基准
- [MMEditing](https://github.com/open-mmlab/mmediting): OpenMMLab 图像视频编辑工具箱
- [MMGeneration](https://github.com/open-mmlab/mmgeneration): OpenMMLab 图片视频生成模型工具箱
- [MMDeploy](https://github.com/open-mmlab/mmdeploy): OpenMMLab 模型部署框架
## 欢迎加入 OpenMMLab 社区
扫描下方的二维码可关注 OpenMMLab 团队的 [知乎官方账号](https://www.zhihu.com/people/openmmlab),加入 OpenMMLab 团队的 [官方交流 QQ 群](https://jq.qq.com/?_wv=1027&k=K0QI8ByU),或添加微信小助手”OpenMMLabwx“加入官方交流微信群。
<div align="center">
<img src="https://user-images.githubusercontent.com/25839884/205870927-39f4946d-8751-4219-a4c0-740117558fd7.jpg" height="400" /> <img src="https://user-images.githubusercontent.com/25839884/203904835-62392033-02d4-4c73-a68c-c9e4c1e2b07f.jpg" height="400" /> <img src="https://user-images.githubusercontent.com/25839884/205872898-e2e6009d-c6bb-4d27-8d07-117e697a3da8.jpg" height="400" />
</div>
我们会在 OpenMMLab 社区为大家
- 📢 分享 AI 框架的前沿核心技术
- 💻 解读 PyTorch 常用模块源码
- 📰 发布 OpenMMLab 的相关新闻
- 🚀 介绍 OpenMMLab 开发的前沿算法
- 🏃 获取更高效的问题答疑和意见反馈
- 🔥 提供与各行各业开发者充分交流的平台
干货满满 📘,等你来撩 💗,OpenMMLab 社区期待您的加入 👬
================================================
FILE: TERMINOLOGY.md
================================================
# English-Chinese terminology comparison (英汉术语对照)
This document is used as a reference for English-Chinese terminology translation.
该文档用作中英文翻译对照参考。
| English | 中文 |
| :---------------: | :----------: |
| annotation | 标注 |
| backbone | 主干网络 |
| benchmark | 基准测试 |
| checkpoint | 模型权重文件 |
| classifier | 分类器 |
| cls_head | 分类头 |
| decoder | 解码器 |
| detector | 检测器 |
| encoder | 编码器 |
| finetune | 微调 |
| ground truth | 真实标签 |
| hook | 钩子 |
| localizer | 定位器 |
| neck | 模型颈部 |
| pipeline | 流水线 |
| recognizer | 识别器 |
| register | 注册器 |
| schedule | 调整 |
| scheduler | 调度器 |
| segmentor | 分割器 |
| tensor | 张量 |
| training schedule | 训练策略 |
================================================
FILE: docker/README.md
================================================
# Docker images
There are two `Dockerfile` files to build docker images, one to build an image with the mmcv pre-built package and the other with the mmcv development environment.
```text
.
|-- README.md
|-- dev # build with mmcv development environment
| `-- Dockerfile
`-- release # build with mmcv pre-built package
`-- Dockerfile
```
## Build docker images
### Build with mmcv pre-built package
Build with local repository
```bash
git clone https://github.com/open-mmlab/mmcv.git && cd mmcv
docker build -t mmcv -f docker/release/Dockerfile .
```
Or build with remote repository
```bash
docker build -t mmcv https://github.com/open-mmlab/mmcv.git#master:docker/release
```
The [Dockerfile](release/Dockerfile) installs latest released version of mmcv by default, but you can specify mmcv versions to install expected versions.
```bash
docker image build -t mmcv -f docker/release/Dockerfile --build-arg MMCV=2.0.0rc1 .
```
If you also want to use other versions of PyTorch and CUDA, you can also pass them when building docker images.
An example to build an image with PyTorch 1.11 and CUDA 11.3.
```bash
docker build -t mmcv -f docker/release/Dockerfile \
--build-arg PYTORCH=1.9.0 \
--build-arg CUDA=11.1 \
--build-arg CUDNN=8 \
--build-arg MMCV=2.0.0rc1 .
```
More available versions of PyTorch and CUDA can be found at [dockerhub/pytorch](https://hub.docker.com/r/pytorch/pytorch/tags).
### Build with mmcv development environment
If you want to build an docker image with the mmcv development environment, you can use the following command
```bash
git clone https://github.com/open-mmlab/mmcv.git && cd mmcv
docker build -t mmcv -f docker/dev/Dockerfile --build-arg CUDA_ARCH=7.5 .
```
Note that `CUDA_ARCH` is the cumpute capability of your GPU and you can find it at [Compute Capability](https://developer.nvidia.com/cuda-gpus#compute).
The building process may take 10 minutes or more.
## Run images
```bash
docker run --gpus all --shm-size=8g -it mmcv
```
See [docker run](https://docs.docker.com/engine/reference/commandline/run/) for more usages.
================================================
FILE: docker/dev/Dockerfile
================================================
ARG PYTORCH="1.8.1"
ARG CUDA="10.2"
ARG CUDNN="7"
FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel
# To fix GPG key error when running apt-get update
RUN rm /etc/apt/sources.list.d/cuda.list \
&& rm /etc/apt/sources.list.d/nvidia-ml.list \
&& apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub \
&& apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
# Install git and system dependencies for opencv-python
RUN apt-get update && apt-get install -y git \
&& apt-get update && apt-get install -y libgl1 libglib2.0-0
# Install system dependencies for unit tests
RUN apt-get install -y ffmpeg libturbojpeg \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# build mmcv from source with develop mode
ARG HTTPS_PROXY=""
ENV https_proxy=${HTTPS_PROXY}
ENV FORCE_CUDA="1"
ARG CUDA_ARCH=""
ENV TORCH_CUDA_ARCH_LIST=${CUDA_ARCH}
RUN git clone https://github.com/open-mmlab/mmcv.git /mmcv
WORKDIR /mmcv
RUN git checkout 2.x && git rev-parse --short HEAD
RUN pip install --no-cache-dir -e .[all] -v && pip install pre-commit && pre-commit install
================================================
FILE: docker/release/Dockerfile
================================================
ARG PYTORCH="1.8.1"
ARG CUDA="10.2"
ARG CUDNN="7"
FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel
# To fix GPG key error when running apt-get update
RUN rm /etc/apt/sources.list.d/cuda.list \
&& rm /etc/apt/sources.list.d/nvidia-ml.list \
&& apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub \
&& apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
# Install system dependencies for opencv-python
RUN apt-get update && apt-get install -y libgl1 libglib2.0-0 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install mmcv
ARG MMCV=""
RUN if [ "${MMCV}" = "" ]; then pip install -U openmim && mim install 'mmcv>=2.0.0rc1'; else pip install -U openmim && mim install mmcv==${MMCV}; fi
# Verify the installation
RUN python -c 'import mmcv;print(mmcv.__version__)'
================================================
FILE: docs/en/Makefile
================================================
# Minimal makefile for Sphinx documentation
#
# 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/en/_static/css/readthedocs.css
================================================
.header-logo {
background-image: url("../image/mmcv-logo.png");
background-size: 85px 40px;
height: 40px;
width: 85px;
}
table.colwidths-auto td {
width: 50%
}
================================================
FILE: docs/en/_static/version.json
================================================
{
"Linux": [
{
"cuda": "12.1",
"torch": "2.4.x",
"mmcv": [
"2.2.0"
]
},
{
"cuda": "12.1",
"torch": "2.3.x",
"mmcv": [
"2.2.0"
]
},
{
"cuda": "12.1",
"torch": "2.2.x",
"mmcv": [
"2.2.0"
]
},
{
"cuda": "12.1",
"torch": "2.1.x",
"mmcv": [
"2.2.0",
"2.1.0"
]
},
{
"cuda": "11.8",
"torch": "2.4.x",
"mmcv": [
"2.2.0"
]
},
{
"cuda": "11.8",
"torch": "2.3.x",
"mmcv": [
"2.2.0"
]
},
{
"cuda": "11.8",
"torch": "2.2.x",
"mmcv": [
"2.2.0"
]
},
{
"cuda": "11.8",
"torch": "2.1.x",
"mmcv": [
"2.2.0",
"2.1.0"
]
},
{
"cuda": "11.8",
"torch": "2.0.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0"
]
},
{
"cuda": "11.7",
"torch": "2.0.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0"
]
},
{
"cuda": "11.7",
"torch": "1.13.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0"
]
},
{
"cuda": "11.6",
"torch": "1.13.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0"
]
},
{
"cuda": "11.6",
"torch": "1.12.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "11.5",
"torch": "1.11.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "11.3",
"torch": "1.12.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "11.3",
"torch": "1.11.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "11.3",
"torch": "1.10.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "11.1",
"torch": "1.10.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "11.1",
"torch": "1.9.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "11.1",
"torch": "1.8.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "11.0",
"torch": "1.7.x",
"mmcv": [
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1"
]
},
{
"cuda": "10.2",
"torch": "1.12.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "10.2",
"torch": "1.11.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "10.2",
"torch": "1.10.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "10.2",
"torch": "1.9.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "10.2",
"torch": "1.8.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "10.2",
"torch": "1.7.x",
"mmcv": [
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1"
]
},
{
"cuda": "10.2",
"torch": "1.6.x",
"mmcv": [
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1"
]
},
{
"cuda": "10.2",
"torch": "1.5.x",
"mmcv": [
"2.0.0rc3"
]
},
{
"cuda": "10.1",
"torch": "1.8.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "10.1",
"torch": "1.7.x",
"mmcv": [
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1"
]
},
{
"cuda": "10.1",
"torch": "1.6.x",
"mmcv": [
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1"
]
},
{
"cuda": "10.1",
"torch": "1.5.x",
"mmcv": [
"2.0.0rc3"
]
},
{
"cuda": "9.2",
"torch": "1.7.x",
"mmcv": [
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1"
]
},
{
"cuda": "9.2",
"torch": "1.6.x",
"mmcv": [
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1"
]
},
{
"cuda": "9.2",
"torch": "1.5.x",
"mmcv": [
"2.0.0rc3",
"2.0.0rc2"
]
},
{
"cuda": "cpu",
"torch": "2.4.x",
"mmcv": [
"2.2.0"
]
},
{
"cuda": "cpu",
"torch": "2.3.x",
"mmcv": [
"2.2.0"
]
},
{
"cuda": "cpu",
"torch": "2.2.x",
"mmcv": [
"2.2.0"
]
},
{
"cuda": "cpu",
"torch": "2.1.x",
"mmcv": [
"2.2.0",
"2.1.0"
]
},
{
"cuda": "cpu",
"torch": "2.0.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0"
]
},
{
"cuda": "cpu",
"torch": "1.13.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0"
]
},
{
"cuda": "cpu",
"torch": "1.12.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "cpu",
"torch": "1.11.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "cpu",
"torch": "1.10.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "cpu",
"torch": "1.9.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "cpu",
"torch": "1.8.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "cpu",
"torch": "1.7.x",
"mmcv": [
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1"
]
},
{
"cuda": "cpu",
"torch": "1.6.x",
"mmcv": [
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1"
]
},
{
"cuda": "cpu",
"torch": "1.5.x",
"mmcv": [
"2.0.0rc3",
"2.0.0rc2"
]
}
],
"Windows": [
{
"cuda": "12.1",
"torch": "2.3.x",
"mmcv": [
"2.2.0"
]
},
{
"cuda": "12.1",
"torch": "2.2.x",
"mmcv": [
"2.2.0"
]
},
{
"cuda": "12.1",
"torch": "2.1.x",
"mmcv": [
"2.2.0",
"2.1.0"
]
},
{
"cuda": "11.8",
"torch": "2.3.x",
"mmcv": [
"2.2.0"
]
},
{
"cuda": "11.8",
"torch": "2.2.x",
"mmcv": [
"2.2.0"
]
},
{
"cuda": "11.8",
"torch": "2.1.x",
"mmcv": [
"2.2.0",
"2.1.0"
]
},
{
"cuda": "11.8",
"torch": "2.0.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0"
]
},
{
"cuda": "11.7",
"torch": "2.0.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0"
]
},
{
"cuda": "11.7",
"torch": "1.13.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0"
]
},
{
"cuda": "11.6",
"torch": "1.13.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0"
]
},
{
"cuda": "11.6",
"torch": "1.12.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "11.5",
"torch": "1.11.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "11.3",
"torch": "1.12.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "11.3",
"torch": "1.11.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "11.3",
"torch": "1.10.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "11.1",
"torch": "1.10.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "11.1",
"torch": "1.9.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "11.1",
"torch": "1.8.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "10.2",
"torch": "1.10.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "10.2",
"torch": "1.9.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "10.2",
"torch": "1.8.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "10.2",
"torch": "1.7.x",
"mmcv": [
"2.0.0rc4",
"2.0.0rc3"
]
},
{
"cuda": "10.2",
"torch": "1.6.x",
"mmcv": [
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1"
]
},
{
"cuda": "10.1",
"torch": "1.8.x",
"mmcv": [
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "10.1",
"torch": "1.7.x",
"mmcv": [
"2.0.0rc4",
"2.0.0rc3"
]
},
{
"cuda": "10.1",
"torch": "1.6.x",
"mmcv": [
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1"
]
},
{
"cuda": "cpu",
"torch": "2.3.x",
"mmcv": [
"2.2.0"
]
},
{
"cuda": "cpu",
"torch": "2.2.x",
"mmcv": [
"2.2.0"
]
},
{
"cuda": "cpu",
"torch": "2.1.x",
"mmcv": [
"2.2.0",
"2.1.0"
]
},
{
"cuda": "cpu",
"torch": "2.0.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0"
]
},
{
"cuda": "cpu",
"torch": "1.13.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0"
]
},
{
"cuda": "cpu",
"torch": "1.12.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "cpu",
"torch": "1.11.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "cpu",
"torch": "1.10.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "cpu",
"torch": "1.9.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "cpu",
"torch": "1.8.x",
"mmcv": [
"2.2.0",
"2.1.0",
"2.0.1",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1",
"2.0.0"
]
},
{
"cuda": "cpu",
"torch": "1.7.x",
"mmcv": [
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1"
]
},
{
"cuda": "cpu",
"torch": "1.6.x",
"mmcv": [
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0rc1"
]
}
],
"macOS": [
{
"cuda": "cpu",
"torch": "2.1.x",
"mmcv": [
"2.1.0"
]
},
{
"cuda": "cpu",
"torch": "2.0.x",
"mmcv": [
"2.1.0",
"2.0.0"
]
},
{
"cuda": "cpu",
"torch": "1.13.x",
"mmcv": [
"2.1.0",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0"
]
},
{
"cuda": "mps",
"torch": "1.13.x",
"mmcv": [
"2.0.0rc4",
"2.0.0rc3"
]
},
{
"cuda": "cpu",
"torch": "1.12.x",
"mmcv": [
"2.1.0",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0"
]
},
{
"cuda": "cpu",
"torch": "1.11.x",
"mmcv": [
"2.1.0",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0"
]
},
{
"cuda": "cpu",
"torch": "1.10.x",
"mmcv": [
"2.1.0",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0"
]
},
{
"cuda": "cpu",
"torch": "1.9.x",
"mmcv": [
"2.1.0",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0"
]
},
{
"cuda": "cpu",
"torch": "1.8.x",
"mmcv": [
"2.1.0",
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2",
"2.0.0"
]
},
{
"cuda": "cpu",
"torch": "1.7.x",
"mmcv": [
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2"
]
},
{
"cuda": "cpu",
"torch": "1.6.x",
"mmcv": [
"2.0.0rc4",
"2.0.0rc3",
"2.0.0rc2"
]
}
]
}
================================================
FILE: docs/en/_templates/classtemplate.rst
================================================
.. role:: hidden
:class: hidden-section
.. currentmodule:: {{ module }}
{{ name | underline}}
.. autoclass:: {{ name }}
:members:
..
autogenerated from source/_templates/classtemplate.rst
note it does not have :inherited-members:
================================================
FILE: docs/en/api/arraymisc.rst
================================================
.. role:: hidden
:class: hidden-section
mmcv.arraymisc
===================================
.. contents:: mmcv.arraymisc
:depth: 2
:local:
:backlinks: top
.. currentmodule:: mmcv.arraymisc
.. autosummary::
:toctree: generated
:nosignatures:
quantize
dequantize
================================================
FILE: docs/en/api/cnn.rst
================================================
.. role:: hidden
:class: hidden-section
mmcv.cnn
===================================
.. contents:: mmcv.cnn
:depth: 2
:local:
:backlinks: top
.. currentmodule:: mmcv.cnn
Module
----------------
.. autosummary::
:toctree: generated
:nosignatures:
:template: classtemplate.rst
ContextBlock
Conv2d
Conv3d
ConvAWS2d
ConvModule
ConvTranspose2d
ConvTranspose3d
ConvWS2d
DepthwiseSeparableConvModule
GeneralizedAttention
HSigmoid
HSwish
LayerScale
Linear
MaxPool2d
MaxPool3d
NonLocal1d
NonLocal2d
NonLocal3d
Scale
Swish
Conv2dRFSearchOp
Build Function
----------------
.. autosummary::
:toctree: generated
:nosignatures:
build_activation_layer
build_conv_layer
build_norm_layer
build_padding_layer
build_plugin_layer
build_upsample_layer
Miscellaneous
----------------
.. autosummary::
:toctree: generated
:nosignatures:
fuse_conv_bn
conv_ws_2d
is_norm
make_res_layer
make_vgg_layer
get_model_complexity_info
================================================
FILE: docs/en/api/image.rst
================================================
.. role:: hidden
:class: hidden-section
mmcv.image
===================================
.. contents:: mmcv.image
:depth: 2
:local:
:backlinks: top
.. currentmodule:: mmcv.image
IO
----------------
.. autosummary::
:toctree: generated
:nosignatures:
imfrombytes
imread
imwrite
use_backend
Color Space
----------------
.. autosummary::
:toctree: generated
:nosignatures:
bgr2gray
bgr2hls
bgr2hsv
bgr2rgb
bgr2ycbcr
gray2bgr
gray2rgb
hls2bgr
hsv2bgr
imconvert
rgb2bgr
rgb2gray
rgb2ycbcr
ycbcr2bgr
ycbcr2rgb
Geometric
----------------
.. autosummary::
:toctree: generated
:nosignatures:
cutout
imcrop
imflip
impad
impad_to_multiple
imrescale
imresize
imresize_like
imresize_to_multiple
imrotate
imshear
imtranslate
rescale_size
Photometric
----------------
.. autosummary::
:toctree: generated
:nosignatures:
adjust_brightness
adjust_color
adjust_contrast
adjust_hue
adjust_lighting
adjust_sharpness
auto_contrast
clahe
imdenormalize
imequalize
iminvert
imnormalize
lut_transform
posterize
solarize
Miscellaneous
----------------
.. autosummary::
:toctree: generated
:nosignatures:
tensor2imgs
================================================
FILE: docs/en/api/ops.rst
================================================
.. role:: hidden
:class: hidden-section
mmcv.ops
===================================
.. contents:: mmcv.ops
:depth: 2
:local:
:backlinks: top
.. currentmodule:: mmcv.ops
.. autosummary::
:toctree: generated
:nosignatures:
:template: classtemplate.rst
BorderAlign
CARAFE
CARAFENaive
CARAFEPack
Conv2d
ConvTranspose2d
CornerPool
Correlation
CrissCrossAttention
DeformConv2d
DeformConv2dPack
DeformRoIPool
DeformRoIPoolPack
DynamicScatter
FusedBiasLeakyReLU
GroupAll
Linear
MaskedConv2d
MaxPool2d
ModulatedDeformConv2d
ModulatedDeformConv2dPack
ModulatedDeformRoIPoolPack
MultiScaleDeformableAttention
PSAMask
PointsSampler
PrRoIPool
QueryAndGroup
RiRoIAlignRotated
RoIAlign
RoIAlignRotated
RoIAwarePool3d
RoIPointPool3d
RoIPool
SAConv2d
SigmoidFocalLoss
SimpleRoIAlign
SoftmaxFocalLoss
SparseConv2d
SparseConv3d
SparseConvTensor
SparseConvTranspose2d
SparseConvTranspose3d
SparseInverseConv2d
SparseInverseConv3d
SparseMaxPool2d
SparseMaxPool3d
SparseModule
SparseSequential
SubMConv2d
SubMConv3d
SyncBatchNorm
TINShift
Voxelization
.. autosummary::
:toctree: generated
:nosignatures:
active_rotated_filter
assign_score_withk
ball_query
batched_nms
bbox_overlaps
border_align
box_iou_rotated
boxes_iou3d
boxes_iou_bev
boxes_overlap_bev
carafe
carafe_naive
chamfer_distance
contour_expand
convex_giou
convex_iou
deform_conv2d
deform_roi_pool
diff_iou_rotated_2d
diff_iou_rotated_3d
dynamic_scatter
furthest_point_sample
furthest_point_sample_with_dist
fused_bias_leakyrelu
gather_points
grouping_operation
knn
masked_conv2d
min_area_polygons
modulated_deform_conv2d
nms
nms3d
nms3d_normal
nms_bev
nms_match
nms_normal_bev
nms_rotated
pixel_group
point_sample
points_in_boxes_all
points_in_boxes_cpu
points_in_boxes_part
points_in_polygons
prroi_pool
rel_roi_point_to_rel_img_point
riroi_align_rotated
roi_align
roi_align_rotated
roi_pool
rotated_feature_align
scatter_nd
sigmoid_focal_loss
soft_nms
softmax_focal_loss
three_interpolate
three_nn
tin_shift
upfirdn2d
voxelization
================================================
FILE: docs/en/api/transforms.rst
================================================
.. role:: hidden
:class: hidden-section
mmcv.transforms
===================================
.. currentmodule:: mmcv.transforms
.. autosummary::
:toctree: generated
:nosignatures:
:template: classtemplate.rst
BaseTransform
TestTimeAug
Loading
----------------
.. autosummary::
:toctree: generated
:nosignatures:
:template: classtemplate.rst
LoadAnnotations
LoadImageFromFile
Processing
----------------
.. autosummary::
:toctree: generated
:nosignatures:
:template: classtemplate.rst
CenterCrop
MultiScaleFlipAug
Normalize
Pad
RandomChoiceResize
RandomFlip
RandomGrayscale
RandomResize
Resize
ToTensor
ImageToTensor
Wrapper
----------------
.. autosummary::
:toctree: generated
:nosignatures:
:template: classtemplate.rst
Compose
KeyMapper
RandomApply
RandomChoice
TransformBroadcaster
================================================
FILE: docs/en/api/utils.rst
================================================
.. role:: hidden
:class: hidden-section
mmcv.utils
===================================
.. contents:: mmcv.utils
:depth: 2
:local:
:backlinks: top
.. currentmodule:: mmcv.utils
.. autosummary::
:toctree: generated
:nosignatures:
IS_CUDA_AVAILABLE
IS_MLU_AVAILABLE
IS_MPS_AVAILABLE
collect_env
jit
skip_no_elena
================================================
FILE: docs/en/api/video.rst
================================================
.. role:: hidden
:class: hidden-section
mmcv.video
===================================
.. contents:: mmcv.video
:depth: 2
:local:
:backlinks: top
.. currentmodule:: mmcv.video
IO
----------------
.. autosummary::
:toctree: generated
:nosignatures:
:template: classtemplate.rst
VideoReader
Cache
.. autosummary::
:toctree: generated
:nosignatures:
frames2video
Optical Flow
----------------
.. autosummary::
:toctree: generated
:nosignatures:
dequantize_flow
flow_from_bytes
flow_warp
flowread
flowwrite
quantize_flow
sparse_flow_from_bytes
Video Processing
----------------
.. autosummary::
:toctree: generated
:nosignatures:
concat_video
convert_video
cut_video
resize_video
================================================
FILE: docs/en/api/visualization.rst
================================================
.. role:: hidden
:class: hidden-section
mmcv.visualization
===================================
.. contents:: mmcv.visualization
:depth: 2
:local:
:backlinks: top
.. currentmodule:: mmcv.visualization
Color
----------------
.. autosummary::
:toctree: generated
:nosignatures:
:template: classtemplate.rst
Color
.. autosummary::
:toctree: generated
:nosignatures:
color_val
Image
----------------
.. autosummary::
:toctree: generated
:nosignatures:
imshow
imshow_bboxes
imshow_det_bboxes
Optical Flow
----------------
.. autosummary::
:toctree: generated
:nosignatures:
flow2rgb
flowshow
make_color_wheel
================================================
FILE: docs/en/community/contributing.md
================================================
## Contributing to OpenMMLab
Welcome to the MMCV community, we are committed to building a cutting-edge computer vision foundational library and all kinds of contributions are welcomed, including but not limited to
**Fix bug**
You can directly post a Pull Request to fix typo in code or documents
The steps to fix the bug of code implementation are as follows.
1. If the modification involve significant changes, you should create an issue first and describe the error information and how to trigger the bug. Other developers will discuss with you and propose an proper solution.
2. Posting a pull request after fixing the bug and adding corresponding unit test.
**New Feature or Enhancement**
1. If the modification involve significant changes, you should create an issue to discuss with our developers to propose an proper design.
2. Post a Pull Request after implementing the new feature or enhancement and add corresponding unit test.
**Document**
You can directly post a pull request to fix documents. If you want to add a document, you should first create an issue to check if it is reasonable.
### Pull Request Workflow
If you're not familiar with Pull Request, don't worry! The following guidance will tell you how to create a Pull Request step by step. If you want to dive into the develop mode of Pull Request, you can refer to the [official documents](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests)
#### 1. Fork and clone
If you are posting a pull request for the first time, you should fork the OpenMMLab repositories by clicking the **Fork** button in the top right corner of the GitHub page, and the forked repositories will appear under your GitHub profile.
<img src="https://user-images.githubusercontent.com/57566630/167305749-43c7f4e9-449b-4e98-ade5-0c9276d5c9ce.png" width="1200">
Then, you can clone the repositories to local:
```shell
git clone git@github.com:{username}/mmcv.git
```
After that, you should ddd official repository as the upstream repository
```bash
git remote add upstream git@github.com:open-mmlab/mmcv
```
Check whether remote repository has been added successfully by `git remote -v`
```bash
origin git@github.com:{username}/mmcv.git (fetch)
origin git@github.com:{username}/mmcv.git (push)
upstream git@github.com:open-mmlab/mmcv (fetch)
upstream git@github.com:open-mmlab/mmcv (push)
```
```{note}
Here's a brief introduction to origin and upstream. When we use "git clone", we create an "origin" remote by default, which points to the repository cloned from. As for "upstream", we add it ourselves to point to the target repository. Of course, if you don't like the name "upstream", you could name it as you wish. Usually, we'll push the code to "origin". If the pushed code conflicts with the latest code in official("upstream"), we should pull the latest code from upstream to resolve the conflicts, and then push to "origin" again. The posted Pull Request will be updated automatically.
```
#### 2. Configure pre-commit
You should configure [pre-commit](https://pre-commit.com/#intro) in the local development environment to make sure the code style matches that of OpenMMLab. **Note**: The following code should be executed under the MMCV directory.
```shell
pip install -U pre-commit
pre-commit install
```
Check that pre-commit is configured successfully, and install the hooks defined in `.pre-commit-config.yaml`.
```shell
pre-commit run --all-files
```
<img src="https://user-images.githubusercontent.com/57566630/173660750-3df20a63-cb66-4d33-a986-1f643f1d8aaf.png" width="1200">
<img src="https://user-images.githubusercontent.com/57566630/202368856-0465a90d-8fce-4345-918e-67b8b9c82614.png" width="1200">
```{note}
Chinese users may fail to download the pre-commit hooks due to the network issue. In this case, you could download these hooks from gitee by setting the .pre-commit-config-zh-cn.yaml
pre-commit install -c .pre-commit-config-zh-cn.yaml
pre-commit run --all-files -c .pre-commit-config-zh-cn.yaml
```
If the installation process is interrupted, you can repeatedly run `pre-commit run ... ` to continue the installation.
If the code does not conform to the code style specification, pre-commit will raise a warning and fixes some of the errors automatically.
<img src="https://user-images.githubusercontent.com/57566630/202369176-67642454-0025-4023-a095-263529107aa3.png" width="1200">
If we want to commit our code bypassing the pre-commit hook, we can use the `--no-verify` option(**only for temporarily commit**.
```shell
git commit -m "xxx" --no-verify
```
#### 3. Create a development branch
After configuring the pre-commit, we should create a branch based on the main branch to develop the new feature or fix the bug. The proposed branch name is `username/pr_name`
```shell
git checkout -b yhc/refactor_contributing_doc
```
In subsequent development, if the main branch of the local repository is behind the main branch of "upstream", we need to pull the upstream for synchronization, and then execute the above command:
```shell
git pull upstream main
```
#### 4. Commit the code and pass the unit test
- MMCV introduces mypy to do static type checking to increase the robustness of the code. Therefore, we need to add Type Hints to our code and pass the mypy check. If you are not familiar with Type Hints, you can refer to [this tutorial](https://docs.python.org/3/library/typing.html).
- The committed code should pass through the unit test
```shell
# Pass all unit tests
pytest tests
# Pass the unit test of runner
pytest tests/test_runner/test_runner.py
```
If the unit test fails for lack of dependencies, you can install the dependencies referring to the [guidance](#unit-test)
- If the documents are modified/added, we should check the rendering result referring to [guidance](#document-rendering)
#### 5. Push the code to remote
We could push the local commits to remote after passing through the check of unit test and pre-commit. You can associate the local branch with remote branch by adding `-u` option.
```shell
git push -u origin {branch_name}
```
This will allow you to use the `git push` command to push code directly next time, without having to specify a branch or the remote repository.
#### 6. Create a Pull Request
(1) Create a pull request in GitHub's Pull request interface
<img src="https://user-images.githubusercontent.com/57566630/201533288-516f7ac4-0b14-4dc8-afbd-912475c368b5.png" width="1200">
(2) Modify the PR description according to the guidelines so that other developers can better understand your changes
<img src="https://user-images.githubusercontent.com/57566630/202242953-c91a18ff-e388-4ff9-8591-5fae0ead6c1e.png" width="1200">
Find more details about Pull Request description in [pull request guidelines](#pr-specs).
**note**
(a) The Pull Request description should contain the reason for the change, the content of the change, and the impact of the change, and be associated with the relevant Issue (see [documentation](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
(b) If it is your first contribution, please sign the CLA
<img src="https://user-images.githubusercontent.com/57566630/167307569-a794b967-6e28-4eac-a942-00deb657815f.png" width="1200">
(c) Check whether the Pull Request pass through the CI
<img src="https://user-images.githubusercontent.com/57566630/167307490-f9ebf9fa-63c0-4d83-8ba1-081ea169eb3a.png" width="1200">
MMCV will run unit test for the posted Pull Request on different platforms (Linux, Window, Mac), based on different versions of Python, PyTorch, CUDA to make sure the code is correct. We can see the specific test information by clicking `Details` in the above image so that we can modify the code.
(3) If the Pull Request passes the CI, then you can wait for the review from other developers. You'll modify the code based on the reviewer's comments, and repeat the steps [4](#4-commit-the-code-and-pass-the-unit-test)-[5](#5-push-the-code-to-remote) until all reviewers approve it. Then, we will merge it ASAP.
<img src="https://user-images.githubusercontent.com/57566630/202145400-cc2cd8c4-10b0-472f-ba37-07e6f50acc67.png" width="1200">
#### 7. Resolve conflicts
If your local branch conflicts with the latest main branch of "upstream", you'll need to resolove them. There are two ways to do this:
```shell
git fetch --all --prune
git rebase upstream/main
```
or
```shell
git fetch --all --prune
git merge upstream/main
```
If you are very good at handling conflicts, then you can use rebase to resolve conflicts, as this will keep your commit logs tidy. If you are not familiar with `rebase`, then you can use `merge` to resolve conflicts.
### Guidance
#### Unit test
If you cannot run the unit test of some modules for lacking of some dependencies, such as [video](https://github.com/open-mmlab/mmcv/tree/main/mmcv/video) module, you can try to install the following dependencies:
```shell
# Linux
sudo apt-get update -y
sudo apt-get install -y libturbojpeg
sudo apt-get install -y ffmpeg
# Windows
conda install ffmpeg
```
We should also make sure the committed code will not decrease the coverage of unit test, we could run the following command to check the coverage of unit test:
```shell
python -m coverage run -m pytest /path/to/test_file
python -m coverage html
# check file in htmlcov/index.html
```
#### Document rendering
If the documents are modified/added, we should check the rendering result. We could install the dependencies and run the following command to render the documents and check the results:
```shell
pip install -r requirements/docs.txt
cd docs/zh_cn/
# or docs/en
make html
# check file in ./docs/zh_cn/_build/html/index.html
```
### Code style
#### Python
We adopt [PEP8](https://www.python.org/dev/peps/pep-0008/) as the preferred code style.
We use the following tools for linting and formatting:
- [flake8](https://github.com/PyCQA/flake8): A wrapper around some linter tools.
- [isort](https://github.com/timothycrosley/isort): A Python utility to sort imports.
- [yapf](https://github.com/google/yapf): A formatter for Python files.
- [codespell](https://github.com/codespell-project/codespell): A Python utility to fix common misspellings in text files.
- [mdformat](https://github.com/executablebooks/mdformat): Mdformat is an opinionated Markdown formatter that can be used to enforce a consistent style in Markdown files.
- [docformatter](https://github.com/myint/docformatter): A formatter to format docstring.
Style configurations of yapf and isort can be found in [setup.cfg](./setup.cfg).
We use [pre-commit hook](https://pre-commit.com/) that checks and formats for `flake8`, `yapf`, `isort`, `trailing whitespaces`, `markdown files`,
fixes `end-of-files`, `double-quoted-strings`, `python-encoding-pragma`, `mixed-line-ending`, sorts `requirments.txt` automatically on every commit.
The config for a pre-commit hook is stored in [.pre-commit-config](./.pre-commit-config.yaml).
#### C++ and CUDA
We follow the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html).
### PR Specs
1. Use [pre-commit](https://pre-commit.com) hook to avoid issues of code style
2. One short-time branch should be matched with only one PR
3. Accomplish a detailed change in one PR. Avoid large PR
- Bad: Support Faster R-CNN
- Acceptable: Add a box head to Faster R-CNN
- Good: Add a parameter to box head to support custom conv-layer number
4. Provide clear and significant commit message
5. Provide clear and meaningful PR description
- Task name should be clarified in title. The general format is: \[Prefix\] Short description of the PR (Suffix)
- Prefix: add new feature \[Feature\], fix bug \[Fix\], related to documents \[Docs\], in developing \[WIP\] (which will not be reviewed temporarily)
- Introduce main changes, results and influences on other modules in short description
- Associate related issues and pull requests with a milestone
================================================
FILE: docs/en/community/pr.md
================================================
## Pull Request (PR)
Content has been migrated to [contributing guidance](contributing.md).
================================================
FILE: docs/en/compatibility.md
================================================
### v2.0.0
The OpenMMLab team released a new generation of training engine [MMEngine](https://github.com/open-mmlab/mmengine) at the World Artificial Intelligence Conference on September 1, 2022. It is a foundational library for training deep learning models. Compared with MMCV, it provides a universal and powerful runner, an open architecture with a more unified interface, and a more customizable training process.
The OpenMMLab team released MMCV v2.0.0 on April 6, 2023. In the 2.x version, it has the following significant changes:
(1) It removed the following components:
- `mmcv.fileio` module, removed in PR [#2179](https://github.com/open-mmlab/mmcv/pull/2179). FileIO module from mmengine will be used wherever required.
- `mmcv.runner`, `mmcv.parallel`, `mmcv. engine` and `mmcv.device`, removed in PR [#2216](https://github.com/open-mmlab/mmcv/pull/2216).
- All classes in `mmcv.utils` (eg `Config` and `Registry`) and many functions, removed in PR [#2217](https://github.com/open-mmlab/mmcv/pull/2217). Only a few functions related to mmcv are reserved.
- `mmcv.onnx`, `mmcv.tensorrt` modules and related functions, removed in PR [#2225](https://github.com/open-mmlab/mmcv/pull/2225).
- Removed all root registrars in MMCV and registered classes or functions to the [root registrar](https://github.com/open-mmlab/mmengine/blob/main/mmengine/registry/root.py) in MMEngine.
(2) It added the [`mmcv.transforms`](https://github.com/open-mmlab/mmcv/tree/main/mmcv/transforms) data transformation module.
(3) It renamed the package name **mmcv** to **mmcv-lite** and **mmcv-full** to **mmcv** in PR [#2235](https://github.com/open-mmlab/mmcv/pull/2235). Also, change the default value of the environment variable `MMCV_WITH_OPS` from 0 to 1.
<table class="docutils">
<thead>
<tr>
<th align="center">MMCV < 2.0</th>
<th align="center">MMCV >= 2.0 </th>
<tbody>
<tr>
<td valign="top">
```bash
# Contains ops, because the highest version of mmcv-full is less than 2.0.0, so there is no need to add version restrictions
pip install openmim
mim install mmcv-full
# do not contain ops
pip install openmim
mim install "mmcv < 2.0.0"
```
</td>
<td valign="top">
```bash
# Contains ops
pip install openmim
mim install mmcv
# Ops are not included, because the starting version of mmcv-lite is 2.0.0rc1, so there is no need to add version restrictions
pip install openmim
mim install mmcv-lite
```
</td>
</tr>
</thead>
</table>
### v1.3.18
Some ops have different implementations on different devices. Lots of macros and type checks are scattered in several files, which makes the code hard to maintain. For example:
```c++
if (input.device().is_cuda()) {
#ifdef MMCV_WITH_CUDA
CHECK_CUDA_INPUT(input);
CHECK_CUDA_INPUT(rois);
CHECK_CUDA_INPUT(output);
CHECK_CUDA_INPUT(argmax_y);
CHECK_CUDA_INPUT(argmax_x);
roi_align_forward_cuda(input, rois, output, argmax_y, argmax_x,
aligned_height, aligned_width, spatial_scale,
sampling_ratio, pool_mode, aligned);
#else
AT_ERROR("RoIAlign is not compiled with GPU support");
#endif
} else {
CHECK_CPU_INPUT(input);
CHECK_CPU_INPUT(rois);
CHECK_CPU_INPUT(output);
CHECK_CPU_INPUT(argmax_y);
CHECK_CPU_INPUT(argmax_x);
roi_align_forward_cpu(input, rois, output, argmax_y, argmax_x,
aligned_height, aligned_width, spatial_scale,
sampling_ratio, pool_mode, aligned);
}
```
Registry and dispatcher are added to manage these implementations.
```c++
void ROIAlignForwardCUDAKernelLauncher(Tensor input, Tensor rois, Tensor output,
Tensor argmax_y, Tensor argmax_x,
int aligned_height, int aligned_width,
float spatial_scale, int sampling_ratio,
int pool_mode, bool aligned);
void roi_align_forward_cuda(Tensor input, Tensor rois, Tensor output,
Tensor argmax_y, Tensor argmax_x,
int aligned_height, int aligned_width,
float spatial_scale, int sampling_ratio,
int pool_mode, bool aligned) {
ROIAlignForwardCUDAKernelLauncher(
input, rois, output, argmax_y, argmax_x, aligned_height, aligned_width,
spatial_scale, sampling_ratio, pool_mode, aligned);
}
// register cuda implementation
void roi_align_forward_impl(Tensor input, Tensor rois, Tensor output,
Tensor argmax_y, Tensor argmax_x,
int aligned_height, int aligned_width,
float spatial_scale, int sampling_ratio,
int pool_mode, bool aligned);
REGISTER_DEVICE_IMPL(roi_align_forward_impl, CUDA, roi_align_forward_cuda);
// roi_align.cpp
// use the dispatcher to invoke different implementation depending on device type of input tensors.
void roi_align_forward_impl(Tensor input, Tensor rois, Tensor output,
Tensor argmax_y, Tensor argmax_x,
int aligned_height, int aligned_width,
float spatial_scale, int sampling_ratio,
int pool_mode, bool aligned) {
DISPATCH_DEVICE_IMPL(roi_align_forward_impl, input, rois, output, argmax_y,
argmax_x, aligned_height, aligned_width, spatial_scale,
sampling_ratio, pool_mode, aligned);
}
```
### v1.3.11
In order to flexibly support more backends and hardwares like `NVIDIA GPUs` and `AMD GPUs`, the directory of `mmcv/ops/csrc` is refactored. Note that this refactoring will not affect the usage in API. For related information, please refer to [PR1206](https://github.com/open-mmlab/mmcv/pull/1206).
The original directory was organized as follows.
```
.
├── common_cuda_helper.hpp
├── ops_cuda_kernel.cuh
├── pytorch_cpp_helper.hpp
├── pytorch_cuda_helper.hpp
├── parrots_cpp_helper.hpp
├── parrots_cuda_helper.hpp
├── parrots_cudawarpfunction.cuh
├── onnxruntime
│ ├── onnxruntime_register.h
│ ├── onnxruntime_session_options_config_keys.h
│ ├── ort_mmcv_utils.h
│ ├── ...
│ ├── onnx_ops.h
│ └── cpu
│ ├── onnxruntime_register.cpp
│ ├── ...
│ └── onnx_ops_impl.cpp
├── parrots
│ ├── ...
│ ├── ops.cpp
│ ├── ops_cuda.cu
│ ├── ops_parrots.cpp
│ └── ops_pytorch.h
├── pytorch
│ ├── ...
│ ├── ops.cpp
│ ├── ops_cuda.cu
│ ├── pybind.cpp
└── tensorrt
├── trt_cuda_helper.cuh
├── trt_plugin_helper.hpp
├── trt_plugin.hpp
├── trt_serialize.hpp
├── ...
├── trt_ops.hpp
└── plugins
├── trt_cuda_helper.cu
├── trt_plugin.cpp
├── ...
├── trt_ops.cpp
└── trt_ops_kernel.cu
```
After refactored, it is organized as follows.
```
.
├── common
│ ├── box_iou_rotated_utils.hpp
│ ├── parrots_cpp_helper.hpp
│ ├── parrots_cuda_helper.hpp
│ ├── pytorch_cpp_helper.hpp
│ ├── pytorch_cuda_helper.hpp
│ └── cuda
│ ├── common_cuda_helper.hpp
│ ├── parrots_cudawarpfunction.cuh
│ ├── ...
│ └── ops_cuda_kernel.cuh
├── onnxruntime
│ ├── onnxruntime_register.h
│ ├── onnxruntime_session_options_config_keys.h
│ ├── ort_mmcv_utils.h
│ ├── ...
│ ├── onnx_ops.h
│ └── cpu
│ ├── onnxruntime_register.cpp
│ ├── ...
│ └── onnx_ops_impl.cpp
├── parrots
│ ├── ...
│ ├── ops.cpp
│ ├── ops_parrots.cpp
│ └── ops_pytorch.h
├── pytorch
│ ├── info.cpp
│ ├── pybind.cpp
│ ├── ...
│ ├── ops.cpp
│ └── cuda
│ ├── ...
│ └── ops_cuda.cu
└── tensorrt
├── trt_cuda_helper.cuh
├── trt_plugin_helper.hpp
├── trt_plugin.hpp
├── trt_serialize.hpp
├── ...
├── trt_ops.hpp
└── plugins
├── trt_cuda_helper.cu
├── trt_plugin.cpp
├── ...
├── trt_ops.cpp
└── trt_ops_kernel.cu
```
================================================
FILE: docs/en/conf.py
================================================
#
# 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 pytorch_sphinx_theme
from sphinx.builders.html import StandaloneHTMLBuilder
sys.path.insert(0, os.path.abspath('../..'))
version_file = '../../mmcv/version.py'
with open(version_file) as f:
exec(compile(f.read(), version_file, 'exec'))
__version__ = locals()['__version__']
# -- Project information -----------------------------------------------------
project = 'mmcv'
copyright = '2018-2022, OpenMMLab'
author = 'MMCV Authors'
# The short X.Y version
version = __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.0'
# 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.autosummary',
'sphinx.ext.intersphinx',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinx_markdown_tables',
'myst_parser',
'sphinx_copybutton',
] # yapf: disable
myst_heading_anchors = 4
myst_enable_extensions = ['colon_fence']
# Configuration for intersphinx
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
'numpy': ('https://numpy.org/doc/stable', None),
'torch': ('https://pytorch.org/docs/stable/', None),
'mmengine': ('https://mmengine.readthedocs.io/en/latest', None),
}
autodoc_mock_imports = ['mmcv._ext', 'mmcv.utils.ext_loader', 'torchvision']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
}
# 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']
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
# html_theme = 'sphinx_rtd_theme'
html_theme = 'pytorch_sphinx_theme'
html_theme_path = [pytorch_sphinx_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 = {
'menu': [
{
'name': 'GitHub',
'url': 'https://github.com/open-mmlab/mmcv'
},
],
# Specify the language of shared menu
'menu_lang': 'en',
}
# 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']
html_css_files = ['css/readthedocs.css']
# 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 = 'mmcvdoc'
# -- 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, 'mmcv.tex', 'mmcv Documentation', 'MMCV 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, 'mmcv', 'mmcv 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, 'mmcv', 'mmcv Documentation', author, 'mmcv',
'One line description of project.', 'Miscellaneous'),
]
# -- Options for Epub output -------------------------------------------------
# Bibliographic Dublin Core info.
epub_title = project
# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#
# epub_identifier = ''
# A unique identification for the text.
#
# epub_uid = ''
# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']
# set priority when building html
StandaloneHTMLBuilder.supported_image_types = [
'image/svg+xml', 'image/gif', 'image/png', 'image/jpeg'
]
# -- Extension configuration -------------------------------------------------
# Ignore >>> when copying code
copybutton_prompt_text = r'>>> |\.\.\. '
copybutton_prompt_is_regexp = True
================================================
FILE: docs/en/deployment/mmcv_ops_definition.md
================================================
# MMCV Operators
To make custom operators in MMCV more standard, precise definitions of each operator are listed in this document.
<!-- TOC -->
- [MMCV Operators](#mmcv-operators)
- [MMCVBorderAlign](#mmcvborderalign)
- [Description](#description)
- [Parameters](#parameters)
- [Inputs](#inputs)
- [Outputs](#outputs)
- [Type Constraints](#type-constraints)
- [MMCVCARAFE](#mmcvcarafe)
- [Description](#description-1)
- [Parameters](#parameters-1)
- [Inputs](#inputs-1)
- [Outputs](#outputs-1)
- [Type Constraints](#type-constraints-1)
- [MMCVCAWeight](#mmcvcaweight)
- [Description](#description-2)
- [Parameters](#parameters-2)
- [Inputs](#inputs-2)
- [Outputs](#outputs-2)
- [Type Constraints](#type-constraints-2)
- [MMCVCAMap](#mmcvcamap)
- [Description](#description-3)
- [Parameters](#parameters-3)
- [Inputs](#inputs-3)
- [Outputs](#outputs-3)
- [Type Constraints](#type-constraints-3)
- [MMCVCornerPool](#mmcvcornerpool)
- [Description](#description-4)
- [Parameters](#parameters-4)
- [Inputs](#inputs-4)
- [Outputs](#outputs-4)
- [Type Constraints](#type-constraints-4)
- [MMCVDeformConv2d](#mmcvdeformconv2d)
- [Description](#description-5)
- [Parameters](#parameters-5)
- [Inputs](#inputs-5)
- [Outputs](#outputs-5)
- [Type Constraints](#type-constraints-5)
- [MMCVModulatedDeformConv2d](#mmcvmodulateddeformconv2d)
- [Description](#description-6)
- [Parameters](#parameters-6)
- [Inputs](#inputs-6)
- [Outputs](#outputs-6)
- [Type Constraints](#type-constraints-6)
- [MMCVDeformRoIPool](#mmcvdeformroipool)
- [Description](#description-7)
- [Parameters](#parameters-7)
- [Inputs](#inputs-7)
- [Outputs](#outputs-7)
- [Type Constraints](#type-constraints-7)
- [MMCVMaskedConv2d](#mmcvmaskedconv2d)
- [Description](#description-8)
- [Parameters](#parameters-8)
- [Inputs](#inputs-8)
- [Outputs](#outputs-8)
- [Type Constraints](#type-constraints-8)
- [MMCVPSAMask](#mmcvpsamask)
- [Description](#description-9)
- [Parameters](#parameters-9)
- [Inputs](#inputs-9)
- [Outputs](#outputs-9)
- [Type Constraints](#type-constraints-9)
- [NonMaxSuppression](#nonmaxsuppression)
- [Description](#description-10)
- [Parameters](#parameters-10)
- [Inputs](#inputs-10)
- [Outputs](#outputs-10)
- [Type Constraints](#type-constraints-10)
- [MMCVRoIAlign](#mmcvroialign)
- [Description](#description-11)
- [Parameters](#parameters-11)
- [Inputs](#inputs-11)
- [Outputs](#outputs-11)
- [Type Constraints](#type-constraints-11)
- [MMCVRoIAlignRotated](#mmcvroialignrotated)
- [Description](#description-12)
- [Parameters](#parameters-12)
- [Inputs](#inputs-12)
- [Outputs](#outputs-12)
- [Type Constraints](#type-constraints-12)
- [grid_sampler\*](#grid_sampler)
- [Description](#description-13)
- [Parameters](#parameters-13)
- [Inputs](#inputs-13)
- [Outputs](#outputs-13)
- [Type Constraints](#type-constraints-13)
- [cummax\*](#cummax)
- [Description](#description-14)
- [Parameters](#parameters-14)
- [Inputs](#inputs-14)
- [Outputs](#outputs-14)
- [Type Constraints](#type-constraints-14)
- [cummin\*](#cummin)
- [Description](#description-15)
- [Parameters](#parameters-15)
- [Inputs](#inputs-15)
- [Outputs](#outputs-15)
- [Type Constraints](#type-constraints-15)
- [Reminders](#reminders)
<!-- TOC -->
## MMCVBorderAlign
### Description
Applies `border_align` over the input feature based on predicted bboxes.
For each border line (e.g. top, left, bottom or right) of each box,
border_align does the following:
- uniformly samples `pool_size`+1 positions on this line, involving the start and end points.
- the corresponding features on these points are computed by bilinear interpolation.
- max pooling over all the `pool_size`+1 positions are used for computing pooled feature.
Read [BorderDet: Border Feature for Dense Object Detection](ttps://arxiv.org/abs/2007.11056) for more detailed information.
### Parameters
| Type | Parameter | Description |
| ----- | ----------- | ----------------------------------------------------------------------------------- |
| `int` | `pool_size` | number of positions sampled over the boxes' borders(e.g. top, bottom, left, right). |
### Inputs
<dl>
<dt><tt>input</tt>: T</dt>
<dd>Features with shape [N,4C,H,W]. Channels ranged in [0,C), [C,2C), [2C,3C), [3C,4C) represent the top, left, bottom, right features respectively</dd>
<dt><tt>boxes</tt>: T</dt>
<dd>Boxes with shape [N,H*W,4]. Coordinate format (x1,y1,x2,y2).</dd>
</dl>
### Outputs
<dl>
<dt><tt>output</tt>: T</dt>
<dd>Pooled features with shape [N,C,H*W,4]. The order is(top,left,bottom,right) for the last dimension.</dd>
</dl>
### Type Constraints
- T:tensor(float32)
## MMCVCARAFE
### Description
CARAFE operator performs feature upsampling.
Read [CARAFE: Content-Aware ReAssembly of FEatures](https://arxiv.org/abs/1905.02188) for more detailed information.
### Parameters
| Type | Parameter | Description |
| ------- | -------------- | --------------------------------------------- |
| `int` | `kernel_size` | reassemble kernel size, should be odd integer |
| `int` | `group_size` | reassemble group size |
| `float` | `scale_factor` | upsample ratio(>=1) |
### Inputs
<dl>
<dt><tt>features</tt>: T</dt>
<dd>Input features. 4-D tensor of shape (N, C, H, W). N is the batch size.</dd>
<dt><tt>masks</tt>: T</dt>
<dd>The input mask</dd>
</dl>
### Outputs
<dl>
<dt><tt>output</tt>: T</dt>
<dd>The upsampled features. 4-D tensor of shape (N, C, H * scale_factor, W * scale_factor). N is the batch size.</dd>
</dl>
### Type Constraints
- T:tensor(float32)
## MMCVCAWeight
### Description
Operator for Criss-Cross Attention
Read [CCNet: Criss-Cross Attention for SemanticSegmentation](https://arxiv.org/pdf/1811.11721.pdf) for more detailed information.
### Parameters
None
### Inputs
<dl>
<dt><tt>t</tt>: T</dt>
<dd>The query matrix of shape (N, C', H, W).</dd>
<dt><tt>f</tt>: T</dt>
<dd>The key matrix of shape (N, C', H, W).</dd>
</dl>
### Outputs
<dl>
<dt><tt>weight</tt>: T</dt>
<dd>The attention map of shape (N, H+W-1, H, W).</dd>
</dl>
### Type Constraints
- T:tensor(float32)
## MMCVCAMap
### Description
Operator for Criss-Cross Attention
Read [CCNet: Criss-Cross Attention for SemanticSegmentation](https://arxiv.org/pdf/1811.11721.pdf) for more detailed information.
### Parameters
None
### Inputs
<dl>
<dt><tt>weight</tt>: T</dt>
<dd>Output from the operator MMCVCAWeight.</dd>
<dt><tt>value</tt>: T</dt>
<dd>The value matrix of shape (N, C, H, W).</dd>
</dl>
### Outputs
<dl>
<dt><tt>output</tt>: T</dt>
<dd>Output tensor of aggregated contextual information</dd>
</dl>
### Type Constraints
- T:tensor(float32)
## MMCVCornerPool
### Description
Perform CornerPool on `input` features. Read [CornerNet -- Detecting Objects as Paired Keypoints](https://arxiv.org/abs/1808.01244) for more details.
### Parameters
| Type | Parameter | Description |
| ----- | --------- | ---------------------------------------------------------------- |
| `int` | `mode` | corner pool mode, (0: `top`, 1: `bottom`, 2: `left`, 3: `right`) |
### Inputs
<dl>
<dt><tt>input</tt>: T</dt>
<dd>Input features. 4-D tensor of shape (N, C, H, W). N is the batch size.</dd>
</dl>
### Outputs
<dl>
<dt><tt>output</tt>: T</dt>
<dd>The pooled features. 4-D tensor of shape (N, C, H, W).</dd>
</dl>
### Type Constraints
- T:tensor(float32)
## MMCVDeformConv2d
### Description
Applies a deformable 2D convolution over an input signal composed of several input planes.
Read [Deformable Convolutional Networks](https://arxiv.org/pdf/1703.06211.pdf) for detail.
### Parameters
| Type | Parameter | Description |
| -------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `list of ints` | `stride` | The stride of the convolving kernel, (sH, sW). Defaults to `(1, 1)`. |
| `list of ints` | `padding` | Paddings on both sides of the input, (padH, padW). Defaults to `(0, 0)`. |
| `list of ints` | `dilation` | The spacing between kernel elements (dH, dW). Defaults to `(1, 1)`. |
| `int` | `groups` | Split input into groups. `input_channel` should be divisible by the number of groups. Defaults to `1`. |
| `int` | `deformable_groups` | Groups of deformable offset. Defaults to `1`. |
| `int` | `bias` | Whether to add a learnable bias to the output. `0` stands for `False` and `1` stands for `True`. Defaults to `0`. |
| `int` | `im2col_step` | Groups of deformable offset. Defaults to `32`. |
### Inputs
<dl>
<dt><tt>input</tt>: T</dt>
<dd>Input feature; 4-D tensor of shape (N, C, inH, inW), where N is the batch size, C is the number of channels, inH and inW are the height and width of the data.</dd>
<dt><tt>offset</tt>: T</dt>
<dd>Input offset; 4-D tensor of shape (N, deformable_group* 2* kH* kW, outH, outW), where kH and kW are the height and width of weight, outH and outW is the height and width of offset and output.</dd>
<dt><tt>weight</tt>: T</dt>
<dd>Input weight; 4-D tensor of shape (output_channel, input_channel, kH, kW).</dd>
</dl>
### Outputs
<dl>
<dt><tt>output</tt>: T</dt>
<dd>Output feature; 4-D tensor of shape (N, output_channel, outH, outW).</dd>
</dl>
### Type Constraints
- T:tensor(float32, Linear)
## MMCVModulatedDeformConv2d
### Description
Perform Modulated Deformable Convolution on input feature, read [Deformable ConvNets v2: More Deformable, Better Results](https://arxiv.org/abs/1811.11168?from=timeline) for detail.
### Parameters
| Type | Parameter | Description |
| -------------- | ------------------- | ------------------------------------------------------------------------------------- |
| `list of ints` | `stride` | The stride of the convolving kernel. (sH, sW) |
| `list of ints` | `padding` | Paddings on both sides of the input. (padH, padW) |
| `list of ints` | `dilation` | The spacing between kernel elements. (dH, dW) |
| `int` | `deformable_groups` | Groups of deformable offset. |
| `int` | `groups` | Split input into groups. `input_channel` should be divisible by the number of groups. |
### Inputs
<dl>
<dt><tt>feature</tt>: T</dt>
<dd>Input feature; 4-D tensor of shape (N, C, inH, inW), where N is the batch size, C is the number of channels, inH and inW are the height and width of the data.</dd>
<dt><tt>offset</tt>: T</dt>
<dd>Input offset; 4-D tensor of shape (N, deformable_group* 2* kH* kW, outH, outW), where kH and kW are the height and width of weight, outH and outW are the height and width of offset and output.</dd>
<dt><tt>mask</tt>: T</dt>
<dd>Input mask; 4-D tensor of shape (N, deformable_group* kH* kW, outH, outW), where kH and kW are the height and width of weight, outH and outW are the height and width of offset and output.</dd>
<dt><tt>weight]</tt>: T</dt>
<dd>Input weight; 4-D tensor of shape (output_channel, input_channel, kH, kW).</dd>
<dt><tt>bias</tt>: T, optional</dt>
<dd>Input bias; 1-D tensor of shape (output_channel).</dd>
</dl>
### Outputs
<dl>
<dt><tt>output</tt>: T</dt>
<dd>Output feature; 4-D tensor of shape (N, output_channel, outH, outW).</dd>
</dl>
### Type Constraints
- T:tensor(float32, Linear)
## MMCVDeformRoIPool
### Description
Deformable roi pooling layer
### Parameters
| Type | Parameter | Description |
| ------- | ---------------- | ------------------------------------------------------------------------------------------------------------- |
| `int` | `output_height` | height of output roi |
| `int` | `output_width` | width of output roi |
| `float` | `spatial_scale` | used to scale the input boxes |
| `int` | `sampling_ratio` | number of input samples to take for each output sample. `0` means to take samples densely for current models. |
| `float` | `gamma` | gamma |
### Inputs
<dl>
<dt><tt>input</tt>: T</dt>
<dd>Input feature map; 4D tensor of shape (N, C, H, W), where N is the batch size, C is the numbers of channels, H and W are the height and width of the data.</dd>
<dt><tt>rois</tt>: T</dt>
<dd>RoIs (Regions of Interest) to pool over; 2-D tensor of shape (num_rois, 5) given as [[batch_index, x1, y1, x2, y2], ...]. The RoIs' coordinates are the coordinate system of input.</dd>
<dt><tt>offset</tt>: T</dt>
<dd>offset of height and width. Defaults to a tensor of zero</dd>
</dl>
### Outputs
<dl>
<dt><tt>feat</tt>: T</dt>
<dd>RoI pooled output, 4-D tensor of shape (num_rois, C, output_height, output_width). The r-th batch element feat[r-1] is a pooled feature map corresponding to the r-th RoI RoIs[r-1].<dd>
</dl>
### Type Constraints
- T:tensor(float32)
## MMCVMaskedConv2d
### Description
Performs a masked 2D convolution from PixelRNN
Read [Pixel Recurrent Neural Networks](https://arxiv.org/abs/1601.06759) for more detailed information.
### Parameters
| Type | Parameter | Description |
| -------------- | --------- | -------------------------------------------------------------------------------- |
| `list of ints` | `stride` | The stride of the convolving kernel. (sH, sW). **Only support stride=1 in mmcv** |
| `list of ints` | `padding` | Paddings on both sides of the input. (padH, padW). Defaults to `(0, 0)`. |
### Inputs
<dl>
<dt><tt>features</tt>: T</dt>
<dd>Input features; 4D tensor of shape (N, C, H, W), where N is the batch size, C is the numbers of channels, H and W are the height and width of the data.</dd>
<dt><tt>mask</tt>: T</dt>
<dd>Input mask; 3D tensor of shape (N, H, W)</dd>
<dt><tt>weight</tt>: T</dt>
<dd>The learnable weights of the module</dd>
<dt><tt>bias</tt>: T</dt>
<dd>The learnable bias of the module</dd>
</dl>
### Outputs
<dl>
<dt><tt>output</tt>: T</dt>
<dd>The output convolved feature</dd>
</dl>
### Type Constraints
- T:tensor(float32)
## MMCVPSAMask
### Description
An operator from PSANet.
Read [PSANet: Point-wise Spatial Attention Network for Scene Parsing](https://hszhao.github.io/papers/eccv18_psanet.pdf) for more detailed information.
### Parameters
| Type | Parameter | Description |
| -------------- | ----------- | -------------------------------------------- |
| `int` | `psa_type` | `0` means collect and `1` means `distribute` |
| `list of ints` | `mask_size` | The size of mask |
### Inputs
<dl>
<dt><tt>input</tt>: T</dt>
<dd>Input feature; 4D tensor of shape (N, C, H, W), where N is the batch size, C is the numbers of channels, H and W are the height and width of the data.</dd>
</dl>
### Outputs
<dl>
<dt><tt>output</tt>: T</dt>
<dd>Output tensor of shape (N, H * W, H, W)</dd>
</dl>
### Type Constraints
- T:tensor(float32)
## NonMaxSuppression
### Description
Filter out boxes has high IoU overlap with previously selected boxes or low score. Output the indices of valid boxes.
Note this definition is slightly different with [onnx: NonMaxSuppression](https://github.com/onnx/onnx/blob/main/docs/Operators.md#nonmaxsuppression)
### Parameters
| Type | Parameter | Description |
| ------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `int` | `center_point_box` | 0 - the box data is supplied as \[y1, x1, y2, x2\], 1-the box data is supplied as \[x_center, y_center, width, height\]. |
| `int` | `max_output_boxes_per_class` | The maximum number of boxes to be selected per batch per class. Default to 0, number of output boxes equal to number of input boxes. |
| `float` | `iou_threshold` | The threshold for deciding whether boxes overlap too much with respect to IoU. Value range \[0, 1\]. Default to 0. |
| `float` | `score_threshold` | The threshold for deciding when to remove boxes based on score. |
| `int` | `offset` | 0 or 1, boxes' width or height is (x2 - x1 + offset). |
### Inputs
<dl>
<dt><tt>boxes</tt>: T</dt>
<dd>Input boxes. 3-D tensor of shape (num_batches, spatial_dimension, 4).</dd>
<dt><tt>scores</tt>: T</dt>
<dd>Input scores. 3-D tensor of shape (num_batches, num_classes, spatial_dimension).</dd>
</dl>
### Outputs
<dl>
<dt><tt>indices</tt>: tensor(int32, Linear)</dt>
<dd>Selected indices. 2-D tensor of shape (num_selected_indices, 3) as [[batch_index, class_index, box_index], ...].</dd>
<dd>num_selected_indices=num_batches* num_classes* min(max_output_boxes_per_class, spatial_dimension).</dd>
<dd>All invalid indices will be filled with -1.</dd>
</dl>
### Type Constraints
- T:tensor(float32, Linear)
## MMCVRoIAlign
### Description
Perform RoIAlign on output feature, used in bbox_head of most two-stage detectors.
### Parameters
| Type | Parameter | Description |
| ------- | ---------------- | ------------------------------------------------------------------------------------------------------------- |
| `int` | `output_height` | height of output roi |
| `int` | `output_width` | width of output roi |
| `float` | `spatial_scale` | used to scale the input boxes |
| `int` | `sampling_ratio` | number of input samples to take for each output sample. `0` means to take samples densely for current models. |
| `str` | `mode` | pooling mode in each bin. `avg` or `max` |
| `int` | `aligned` | If `aligned=0`, use the legacy implementation in MMDetection. Else, align the results more perfectly. |
### Inputs
<dl>
<dt><tt>input</tt>: T</dt>
<dd>Input feature map; 4D tensor of shape (N, C, H, W), where N is the batch size, C is the numbers of channels, H and W are the height and width of the data.</dd>
<dt><tt>rois</tt>: T</dt>
<dd>RoIs (Regions of Interest) to pool over; 2-D tensor of shape (num_rois, 5) given as [[batch_index, x1, y1, x2, y2], ...]. The RoIs' coordinates are the coordinate system of input.</dd>
</dl>
### Outputs
<dl>
<dt><tt>feat</tt>: T</dt>
<dd>RoI pooled output, 4-D tensor of shape (num_rois, C, output_height, output_width). The r-th batch element feat[r-1] is a pooled feature map corresponding to the r-th RoI RoIs[r-1].<dd>
</dl>
### Type Constraints
- T:tensor(float32)
## MMCVRoIAlignRotated
### Description
Perform RoI align pooling for rotated proposals
### Parameters
| Type | Parameter | Description |
| ------- | ---------------- | ------------------------------------------------------------------------------------------------------------- |
| `int` | `output_height` | height of output roi |
| `int` | `output_width` | width of output roi |
| `float` | `spatial_scale` | used to scale the input boxes |
| `int` | `sampling_ratio` | number of input samples to take for each output sample. `0` means to take samples densely for current models. |
| `str` | `mode` | pooling mode in each bin. `avg` or `max` |
| `int` | `aligned` | If `aligned=0`, use the legacy implementation in MMDetection. Else, align the results more perfectly. |
| `int` | `clockwise` | If `aligned=0`, use the legacy implementation in MMDetection. Else, align the results more perfectly. |
### Inputs
<dl>
<dt><tt>features</tt>: T</dt>
<dd>Input feature map; 4D tensor of shape (N, C, H, W)</dd>
<dt><tt>rois</tt>: T</dt>
<dd>RoIs (Regions of Interest) to pool over; 2-D tensor of shape (num_rois, 5) given as [[batch_index, x1, y1, x2, y2], ...]. The RoIs' coordinates are the coordinate system of input.</dd>
</dl>
### Outputs
<dl>
<dd>RoI pooled output, 4-D tensor of shape (num_rois, C, output_height, output_width). The r-th batch element feat[r-1] is a pooled feature map corresponding to the r-th RoI RoIs[r-1].<dd>
</dl>
### Type Constraints
- T:tensor(float32)
## grid_sampler\*
### Description
Perform sample from `input` with pixel locations from `grid`.
Check [torch.nn.functional.grid_sample](https://pytorch.org/docs/stable/generated/torch.nn.functional.grid_sample.html?highlight=grid_sample#torch.nn.functional.grid_sample) for more information.
### Parameters
| Type | Parameter | Description |
| ----- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `int` | `interpolation_mode` | Interpolation mode to calculate output values. (0: `bilinear` , 1: `nearest`) |
| `int` | `padding_mode` | Padding mode for outside grid values. (0: `zeros`, 1: `border`, 2: `reflection`) |
| `int` | `align_corners` | If `align_corners=1`, the extrema (`-1` and `1`) are considered as referring to the center points of the input's corner pixels. If `align_corners=0`, they are instead considered as referring to the corner points of the input's corner pixels, making the sampling more resolution agnostic. |
### Inputs
<dl>
<dt><tt>input</tt>: T</dt>
<dd>Input feature; 4-D tensor of shape (N, C, inH, inW), where N is the batch size, C is the numbers of channels, inH and inW are the height and width of the data.</dd>
<dt><tt>grid</tt>: T</dt>
<dd>Input offset; 4-D tensor of shape (N, outH, outW, 2), where outH and outW are the height and width of offset and output. </dd>
</dl>
### Outputs
<dl>
<dt><tt>output</tt>: T</dt>
<dd>Output feature; 4-D tensor of shape (N, C, outH, outW).</dd>
</dl>
### Type Constraints
- T:tensor(float32, Linear)
## cummax\*
### Description
Returns a tuple (`values`, `indices`) where `values` is the cumulative maximum elements of `input` in the dimension `dim`. And `indices` is the index location of each maximum value found in the dimension `dim`. Read [torch.cummax](https://pytorch.org/docs/stable/generated/torch.cummax.html) for more details.
### Parameters
| Type | Parameter | Description |
| ----- | --------- | -------------------------------------- |
| `int` | `dim` | the dimension to do the operation over |
### Inputs
<dl>
<dt><tt>input</tt>: T</dt>
<dd>The input tensor with various shapes. Tensor with empty element is also supported.</dd>
</dl>
### Outputs
<dl>
<dt><tt>output</tt>: T</dt>
<dd>Output the cumulative maximum elements of `input` in the dimension `dim`, with the same shape and dtype as `input`.</dd>
<dt><tt>indices</tt>: tensor(int64)</dt>
<dd>Output the index location of each cumulative maximum value found in the dimension `dim`, with the same shape as `input`.</dd>
</dl>
### Type Constraints
- T:tensor(float32)
## cummin\*
### Description
Returns a tuple (`values`, `indices`) where `values` is the cumulative minimum elements of `input` in the dimension `dim`. And `indices` is the index location of each minimum value found in the dimension `dim`. Read [torch.cummin](https://pytorch.org/docs/stable/generated/torch.cummin.html) for more details.
### Parameters
| Type | Parameter | Description |
| ----- | --------- | -------------------------------------- |
| `int` | `dim` | the dimension to do the operation over |
### Inputs
<dl>
<dt><tt>input</tt>: T</dt>
<dd>The input tensor with various shapes. Tensor with empty element is also supported.</dd>
</dl>
### Outputs
<dl>
<dt><tt>output</tt>: T</dt>
<dd>Output the cumulative minimum elements of `input` in the dimension `dim`, with the same shape and dtype as `input`.</dd>
<dt><tt>indices</tt>: tensor(int64)</dt>
<dd>Output the index location of each cumulative minimum value found in the dimension `dim`, with the same shape as `input`.</dd>
</dl>
### Type Constraints
- T:tensor(float32)
## Reminders
- Operators endwith `*` are defined in Torch and are included here for the conversion to ONNX.
================================================
FILE: docs/en/docutils.conf
================================================
[html writers]
table_style: colwidths-auto
================================================
FILE: docs/en/faq.md
================================================
## Frequently Asked Questions
We list some common troubles faced by many users and their corresponding solutions here.
Feel free to enrich the list if you find any frequent issues and have ways to help others to solve them.
### Installation
- KeyError: "xxx: 'yyy is not in the zzz registry'"
The registry mechanism will be triggered only when the file of the module is imported.
So you need to import that file somewhere. More details can be found at [KeyError: "MaskRCNN: 'RefineRoIHead is not in the models registry'"](https://github.com/open-mmlab/mmdetection/issues/5974).
- "No module named 'mmcv.ops'"; "No module named 'mmcv.\_ext'"
1. Uninstall existing mmcv in the environment using `pip uninstall mmcv`
2. Install mmcv-full following the [installation instruction](https://mmcv.readthedocs.io/en/latest/get_started/installation.html) or [Build MMCV from source](https://mmcv.readthedocs.io/en/latest/get_started/build.html)
- "invalid device function" or "no kernel image is available for execution"
1. Check the CUDA compute capability of you GPU
2. Run `python mmdet/utils/collect_env.py` to check whether PyTorch, torchvision, and MMCV are built for the correct GPU architecture. You may need to set `TORCH_CUDA_ARCH_LIST` to reinstall MMCV. The compatibility issue could happen when using old GPUS, e.g., Tesla K80 (3.7) on colab.
3. Check whether the running environment is the same as that when mmcv/mmdet is compiled. For example, you may compile mmcv using CUDA 10.0 bug run it on CUDA9.0 environments
- "undefined symbol" or "cannot open xxx.so"
1. If those symbols are CUDA/C++ symbols (e.g., libcudart.so or GLIBCXX), check
whether the CUDA/GCC runtimes are the same as those used for compiling mmcv
2. If those symbols are Pytorch symbols (e.g., symbols containing caffe, aten, and TH), check whether the Pytorch version is the same as that used for compiling mmcv
3. Run `python mmdet/utils/collect_env.py` to check whether PyTorch, torchvision, and MMCV are built by and running on the same environment
- "RuntimeError: CUDA error: invalid configuration argument"
This error may be caused by the poor performance of GPU. Try to decrease the value of [THREADS_PER_BLOCK](https://github.com/open-mmlab/mmcv/blob/cac22f8cf5a904477e3b5461b1cc36856c2793da/mmcv/ops/csrc/common_cuda_helper.hpp#L10)
and recompile mmcv.
- "RuntimeError: nms is not compiled with GPU support"
This error is because your CUDA environment is not installed correctly.
You may try to re-install your CUDA environment and then delete the build/ folder before re-compile mmcv.
- "Segmentation fault"
1. Check your GCC version and use GCC >= 5.4. This usually caused by the incompatibility between PyTorch an
gitextract_pswz5bz1/
├── .dev_scripts/
│ └── check_installation.py
├── .dockerignore
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── 1-bug-report.yml
│ │ ├── 2-feature_request.yml
│ │ ├── 3-documentation.yml
│ │ └── config.yml
│ ├── pull_request_template.md
│ └── workflows/
│ ├── build_macos_wheel.yml
│ ├── lint.yml
│ ├── merge_stage_test.yml
│ ├── pr_stage_test.yml
│ └── publish-to-pypi.yml
├── .gitignore
├── .pre-commit-config-zh-cn.yaml
├── .pre-commit-config.yaml
├── .readthedocs.yml
├── CITATION.cff
├── CONTRIBUTING.md
├── CONTRIBUTING_zh-CN.md
├── LICENSE
├── LICENSES.md
├── MANIFEST.in
├── README.md
├── README_zh-CN.md
├── TERMINOLOGY.md
├── docker/
│ ├── README.md
│ ├── dev/
│ │ └── Dockerfile
│ └── release/
│ └── Dockerfile
├── docs/
│ ├── en/
│ │ ├── Makefile
│ │ ├── _static/
│ │ │ ├── css/
│ │ │ │ └── readthedocs.css
│ │ │ └── version.json
│ │ ├── _templates/
│ │ │ └── classtemplate.rst
│ │ ├── api/
│ │ │ ├── arraymisc.rst
│ │ │ ├── cnn.rst
│ │ │ ├── image.rst
│ │ │ ├── ops.rst
│ │ │ ├── transforms.rst
│ │ │ ├── utils.rst
│ │ │ ├── video.rst
│ │ │ └── visualization.rst
│ │ ├── community/
│ │ │ ├── contributing.md
│ │ │ └── pr.md
│ │ ├── compatibility.md
│ │ ├── conf.py
│ │ ├── deployment/
│ │ │ └── mmcv_ops_definition.md
│ │ ├── docutils.conf
│ │ ├── faq.md
│ │ ├── get_started/
│ │ │ ├── api_reference.md
│ │ │ ├── build.md
│ │ │ ├── installation.md
│ │ │ ├── introduction.md
│ │ │ └── previous_versions.md
│ │ ├── index.rst
│ │ ├── make.bat
│ │ ├── switch_language.md
│ │ └── understand_mmcv/
│ │ ├── cnn.md
│ │ ├── data_process.md
│ │ ├── data_transform.md
│ │ ├── ops.md
│ │ └── visualization.md
│ └── zh_cn/
│ ├── Makefile
│ ├── _static/
│ │ ├── css/
│ │ │ └── readthedocs.css
│ │ └── version.json
│ ├── _templates/
│ │ └── classtemplate.rst
│ ├── api/
│ │ ├── arraymisc.rst
│ │ ├── cnn.rst
│ │ ├── image.rst
│ │ ├── ops.rst
│ │ ├── transforms.rst
│ │ ├── utils.rst
│ │ ├── video.rst
│ │ └── visualization.rst
│ ├── community/
│ │ ├── code_style.md
│ │ ├── contributing.md
│ │ └── pr.md
│ ├── compatibility.md
│ ├── conf.py
│ ├── docutils.conf
│ ├── faq.md
│ ├── get_started/
│ │ ├── api_reference.md
│ │ ├── article.md
│ │ ├── build.md
│ │ ├── installation.md
│ │ ├── introduction.md
│ │ └── previous_versions.md
│ ├── index.rst
│ ├── make.bat
│ ├── switch_language.md
│ └── understand_mmcv/
│ ├── cnn.md
│ ├── data_process.md
│ ├── data_transform.md
│ ├── ops.md
│ └── visualization.md
├── mmcv/
│ ├── __init__.py
│ ├── arraymisc/
│ │ ├── __init__.py
│ │ └── quantization.py
│ ├── cnn/
│ │ ├── __init__.py
│ │ ├── alexnet.py
│ │ ├── bricks/
│ │ │ ├── __init__.py
│ │ │ ├── activation.py
│ │ │ ├── context_block.py
│ │ │ ├── conv.py
│ │ │ ├── conv2d_adaptive_padding.py
│ │ │ ├── conv_module.py
│ │ │ ├── conv_ws.py
│ │ │ ├── depthwise_separable_conv_module.py
│ │ │ ├── drop.py
│ │ │ ├── generalized_attention.py
│ │ │ ├── hsigmoid.py
│ │ │ ├── hswish.py
│ │ │ ├── non_local.py
│ │ │ ├── norm.py
│ │ │ ├── padding.py
│ │ │ ├── plugin.py
│ │ │ ├── scale.py
│ │ │ ├── swish.py
│ │ │ ├── transformer.py
│ │ │ ├── upsample.py
│ │ │ └── wrappers.py
│ │ ├── resnet.py
│ │ ├── rfsearch/
│ │ │ ├── __init__.py
│ │ │ ├── operator.py
│ │ │ ├── search.py
│ │ │ └── utils.py
│ │ ├── utils/
│ │ │ ├── __init__.py
│ │ │ ├── flops_counter.py
│ │ │ └── fuse_conv_bn.py
│ │ └── vgg.py
│ ├── image/
│ │ ├── __init__.py
│ │ ├── colorspace.py
│ │ ├── geometric.py
│ │ ├── io.py
│ │ ├── misc.py
│ │ └── photometric.py
│ ├── ops/
│ │ ├── __init__.py
│ │ ├── active_rotated_filter.py
│ │ ├── assign_score_withk.py
│ │ ├── ball_query.py
│ │ ├── bbox.py
│ │ ├── bezier_align.py
│ │ ├── bias_act.py
│ │ ├── border_align.py
│ │ ├── box_iou_quadri.py
│ │ ├── box_iou_rotated.py
│ │ ├── carafe.py
│ │ ├── cc_attention.py
│ │ ├── chamfer_distance.py
│ │ ├── contour_expand.py
│ │ ├── conv2d_gradfix.py
│ │ ├── convex_iou.py
│ │ ├── corner_pool.py
│ │ ├── correlation.py
│ │ ├── csrc/
│ │ │ ├── README.md
│ │ │ ├── common/
│ │ │ │ ├── box_iou_rotated_utils.hpp
│ │ │ │ ├── cuda/
│ │ │ │ │ ├── active_rotated_filter_cuda_kernel.cuh
│ │ │ │ │ ├── assign_score_withk_cuda_kernel.cuh
│ │ │ │ │ ├── ball_query_cuda_kernel.cuh
│ │ │ │ │ ├── bbox_overlaps_cuda_kernel.cuh
│ │ │ │ │ ├── bezier_align_cuda_kernel.cuh
│ │ │ │ │ ├── border_align_cuda_kernel.cuh
│ │ │ │ │ ├── box_iou_quadri_cuda.cuh
│ │ │ │ │ ├── box_iou_rotated_cuda.cuh
│ │ │ │ │ ├── carafe_cuda_kernel.cuh
│ │ │ │ │ ├── carafe_naive_cuda_kernel.cuh
│ │ │ │ │ ├── chamfer_distance_cuda_kernel.cuh
│ │ │ │ │ ├── common_cuda_helper.hpp
│ │ │ │ │ ├── convex_iou_cuda_kernel.cuh
│ │ │ │ │ ├── correlation_cuda.cuh
│ │ │ │ │ ├── deform_conv_cuda_kernel.cuh
│ │ │ │ │ ├── deform_roi_pool_cuda_kernel.cuh
│ │ │ │ │ ├── diff_iou_rotated_cuda_kernel.cuh
│ │ │ │ │ ├── furthest_point_sample_cuda_kernel.cuh
│ │ │ │ │ ├── gather_points_cuda_kernel.cuh
│ │ │ │ │ ├── group_points_cuda_kernel.cuh
│ │ │ │ │ ├── iou3d_cuda_kernel.cuh
│ │ │ │ │ ├── knn_cuda_kernel.cuh
│ │ │ │ │ ├── masked_conv2d_cuda_kernel.cuh
│ │ │ │ │ ├── min_area_polygons_cuda.cuh
│ │ │ │ │ ├── modulated_deform_conv_cuda_kernel.cuh
│ │ │ │ │ ├── ms_deform_attn_cuda_kernel.cuh
│ │ │ │ │ ├── nms_cuda_kernel.cuh
│ │ │ │ │ ├── nms_quadri_cuda.cuh
│ │ │ │ │ ├── nms_rotated_cuda.cuh
│ │ │ │ │ ├── parrots_cudawarpfunction.cuh
│ │ │ │ │ ├── points_in_boxes_cuda_kernel.cuh
│ │ │ │ │ ├── points_in_polygons_cuda_kernel.cuh
│ │ │ │ │ ├── prroi_pool_cuda_kernel.cuh
│ │ │ │ │ ├── psamask_cuda_kernel.cuh
│ │ │ │ │ ├── riroi_align_rotated_cuda_kernel.cuh
│ │ │ │ │ ├── roi_align_cuda_kernel.cuh
│ │ │ │ │ ├── roi_align_rotated_cuda_kernel.cuh
│ │ │ │ │ ├── roi_pool_cuda_kernel.cuh
│ │ │ │ │ ├── roiaware_pool3d_cuda_kernel.cuh
│ │ │ │ │ ├── roipoint_pool3d_cuda_kernel.cuh
│ │ │ │ │ ├── rotated_feature_align_cuda_kernel.cuh
│ │ │ │ │ ├── scatter_points_cuda_kernel.cuh
│ │ │ │ │ ├── sigmoid_focal_loss_cuda_kernel.cuh
│ │ │ │ │ ├── softmax_focal_loss_cuda_kernel.cuh
│ │ │ │ │ ├── spconv/
│ │ │ │ │ │ ├── indice.cuh
│ │ │ │ │ │ └── reordering.cuh
│ │ │ │ │ ├── stack_ball_query_cuda_kernel.cuh
│ │ │ │ │ ├── stack_group_points_cuda_kernel.cuh
│ │ │ │ │ ├── sync_bn_cuda_kernel.cuh
│ │ │ │ │ ├── three_interpolate_cuda_kernel.cuh
│ │ │ │ │ ├── three_nn_cuda_kernel.cuh
│ │ │ │ │ ├── tin_shift_cuda_kernel.cuh
│ │ │ │ │ └── voxelization_cuda_kernel.cuh
│ │ │ │ ├── mlu/
│ │ │ │ │ ├── common_mlu_helper.hpp
│ │ │ │ │ ├── masked_conv2d_mlu_kernel.mlu
│ │ │ │ │ └── roi_pool_mlu_kernel.mlu
│ │ │ │ ├── mps/
│ │ │ │ │ ├── MPSDevice.h
│ │ │ │ │ ├── MPSLibrary.h
│ │ │ │ │ ├── MPSLibrary.mm
│ │ │ │ │ ├── MPSStream.h
│ │ │ │ │ └── MPSUtils.h
│ │ │ │ ├── musa/
│ │ │ │ │ ├── active_rotated_filter_musa_kernel.muh
│ │ │ │ │ ├── assign_score_withk_musa_kernel.muh
│ │ │ │ │ ├── ball_query_musa_kernel.muh
│ │ │ │ │ ├── bbox_overlaps_musa_kernel.muh
│ │ │ │ │ ├── bezier_align_musa_kernel.muh
│ │ │ │ │ ├── border_align_musa_kernel.muh
│ │ │ │ │ ├── box_iou_quadri_musa.muh
│ │ │ │ │ ├── box_iou_rotated_musa.muh
│ │ │ │ │ ├── carafe_musa_kernel.muh
│ │ │ │ │ ├── carafe_naive_musa_kernel.muh
│ │ │ │ │ ├── chamfer_distance_musa_kernel.muh
│ │ │ │ │ ├── common_musa_helper.hpp
│ │ │ │ │ ├── convex_iou_musa_kernel.muh
│ │ │ │ │ ├── correlation_musa.muh
│ │ │ │ │ ├── deform_conv_musa_kernel.muh
│ │ │ │ │ ├── deform_roi_pool_musa_kernel.muh
│ │ │ │ │ ├── diff_iou_rotated_musa_kernel.muh
│ │ │ │ │ ├── furthest_point_sample_musa_kernel.muh
│ │ │ │ │ ├── gather_points_musa_kernel.muh
│ │ │ │ │ ├── group_points_musa_kernel.muh
│ │ │ │ │ ├── iou3d_musa_kernel.muh
│ │ │ │ │ ├── knn_musa_kernel.muh
│ │ │ │ │ ├── masked_conv2d_musa_kernel.muh
│ │ │ │ │ ├── min_area_polygons_musa.muh
│ │ │ │ │ ├── modulated_deform_conv_musa_kernel.muh
│ │ │ │ │ ├── ms_deform_attn_musa_kernel.muh
│ │ │ │ │ ├── nms_musa_kernel.muh
│ │ │ │ │ ├── nms_quadri_musa.muh
│ │ │ │ │ ├── nms_rotated_musa.muh
│ │ │ │ │ ├── points_in_boxes_musa_kernel.muh
│ │ │ │ │ ├── points_in_polygons_musa_kernel.muh
│ │ │ │ │ ├── prroi_pool_musa_kernel.muh
│ │ │ │ │ ├── psamask_musa_kernel.muh
│ │ │ │ │ ├── riroi_align_rotated_musa_kernel.muh
│ │ │ │ │ ├── roi_align_musa_kernel.muh
│ │ │ │ │ ├── roi_align_rotated_musa_kernel.muh
│ │ │ │ │ ├── roi_pool_musa_kernel.muh
│ │ │ │ │ ├── roiaware_pool3d_musa_kernel.muh
│ │ │ │ │ ├── roipoint_pool3d_musa_kernel.muh
│ │ │ │ │ ├── rotated_feature_align_musa_kernel.muh
│ │ │ │ │ ├── scatter_points_musa_kernel.muh
│ │ │ │ │ ├── sigmoid_focal_loss_musa_kernel.muh
│ │ │ │ │ ├── softmax_focal_loss_musa_kernel.muh
│ │ │ │ │ ├── spconv/
│ │ │ │ │ │ ├── indice.muh
│ │ │ │ │ │ └── reordering.muh
│ │ │ │ │ ├── stack_ball_query_musa_kernel.muh
│ │ │ │ │ ├── stack_group_points_musa_kernel.muh
│ │ │ │ │ ├── sync_bn_musa_kernel.muh
│ │ │ │ │ ├── three_interpolate_musa_kernel.muh
│ │ │ │ │ ├── three_nn_musa_kernel.muh
│ │ │ │ │ ├── tin_shift_musa_kernel.muh
│ │ │ │ │ └── voxelization_musa_kernel.muh
│ │ │ │ ├── parrots_cpp_helper.hpp
│ │ │ │ ├── parrots_cuda_helper.hpp
│ │ │ │ ├── pytorch_cpp_helper.hpp
│ │ │ │ ├── pytorch_cuda_helper.hpp
│ │ │ │ ├── pytorch_device_registry.hpp
│ │ │ │ ├── pytorch_mlu_helper.hpp
│ │ │ │ ├── pytorch_musa_helper.hpp
│ │ │ │ ├── pytorch_npu_helper.hpp
│ │ │ │ ├── pytorch_npu_util.hpp
│ │ │ │ └── utils/
│ │ │ │ └── spconv/
│ │ │ │ ├── paramsgrid.h
│ │ │ │ ├── prettyprint.h
│ │ │ │ ├── pybind11_utils.h
│ │ │ │ ├── spconv/
│ │ │ │ │ ├── geometry.h
│ │ │ │ │ ├── indice.h
│ │ │ │ │ ├── maxpool.h
│ │ │ │ │ ├── mp_helper.h
│ │ │ │ │ ├── point2voxel.h
│ │ │ │ │ └── reordering.h
│ │ │ │ └── tensorview/
│ │ │ │ ├── helper_kernel.cuh
│ │ │ │ ├── helper_kernel.muh
│ │ │ │ ├── helper_launch.h
│ │ │ │ └── tensorview.h
│ │ │ ├── parrots/
│ │ │ │ ├── active_rotated_filter.cpp
│ │ │ │ ├── active_rotated_filter_parrots.cpp
│ │ │ │ ├── active_rotated_filter_pytorch.h
│ │ │ │ ├── assign_score_withk.cpp
│ │ │ │ ├── assign_score_withk_parrots.cpp
│ │ │ │ ├── assign_score_withk_pytorch.h
│ │ │ │ ├── ball_query._parrots.cpp
│ │ │ │ ├── ball_query.cpp
│ │ │ │ ├── ball_query_pytorch.h
│ │ │ │ ├── bbox_overlaps.cpp
│ │ │ │ ├── bbox_overlaps_parrots.cpp
│ │ │ │ ├── bbox_overlaps_pytorch.h
│ │ │ │ ├── border_align.cpp
│ │ │ │ ├── border_align_parrots.cpp
│ │ │ │ ├── border_align_pytorch.h
│ │ │ │ ├── box_iou_rotated.cpp
│ │ │ │ ├── box_iou_rotated_parrots.cpp
│ │ │ │ ├── box_iou_rotated_pytorch.h
│ │ │ │ ├── carafe.cpp
│ │ │ │ ├── carafe_naive.cpp
│ │ │ │ ├── carafe_naive_parrots.cpp
│ │ │ │ ├── carafe_naive_pytorch.h
│ │ │ │ ├── carafe_parrots.cpp
│ │ │ │ ├── carafe_pytorch.h
│ │ │ │ ├── chamfer_distance.cpp
│ │ │ │ ├── chamfer_distance_parrots.cpp
│ │ │ │ ├── chamfer_distance_pytorch.h
│ │ │ │ ├── contour_expand.cpp
│ │ │ │ ├── contour_expand_parrots.cpp
│ │ │ │ ├── contour_expand_pytorch.h
│ │ │ │ ├── convex_iou.cpp
│ │ │ │ ├── convex_iou_parrots.cpp
│ │ │ │ ├── convex_iou_pytorch.h
│ │ │ │ ├── correlation.cpp
│ │ │ │ ├── correlation_parrots.cpp
│ │ │ │ ├── correlation_pytorch.h
│ │ │ │ ├── cudabind.cpp
│ │ │ │ ├── deform_conv.cpp
│ │ │ │ ├── deform_conv_parrots.cpp
│ │ │ │ ├── deform_conv_pytorch.h
│ │ │ │ ├── deform_roi_pool.cpp
│ │ │ │ ├── deform_roi_pool_parrots.cpp
│ │ │ │ ├── deform_roi_pool_pytorch.h
│ │ │ │ ├── diff_iou_rotated.cpp
│ │ │ │ ├── diff_iou_rotated_parrots.cpp
│ │ │ │ ├── diff_iou_rotated_pytorch.h
│ │ │ │ ├── focal_loss.cpp
│ │ │ │ ├── focal_loss_parrots.cpp
│ │ │ │ ├── focal_loss_pytorch.h
│ │ │ │ ├── furthest_point_sample.cpp
│ │ │ │ ├── furthest_point_sample_parrots.cpp
│ │ │ │ ├── furthest_point_sample_pytorch.h
│ │ │ │ ├── fused_bias_leakyrelu.cpp
│ │ │ │ ├── fused_bias_parrots.cpp
│ │ │ │ ├── gather_points.cpp
│ │ │ │ ├── gather_points_parrots.cpp
│ │ │ │ ├── gather_points_pytorch.h
│ │ │ │ ├── group_points.cpp
│ │ │ │ ├── group_points_parrots.cpp
│ │ │ │ ├── group_points_pytorch.h
│ │ │ │ ├── info.cpp
│ │ │ │ ├── iou3d.cpp
│ │ │ │ ├── iou3d_parrots.cpp
│ │ │ │ ├── iou3d_pytorch.h
│ │ │ │ ├── knn.cpp
│ │ │ │ ├── knn_parrots.cpp
│ │ │ │ ├── knn_pytorch.h
│ │ │ │ ├── masked_conv2d.cpp
│ │ │ │ ├── masked_conv2d_parrots.cpp
│ │ │ │ ├── masked_conv2d_pytorch.h
│ │ │ │ ├── min_area_polygons.cpp
│ │ │ │ ├── min_area_polygons_parrots.cpp
│ │ │ │ ├── min_area_polygons_pytorch.h
│ │ │ │ ├── modulated_deform_conv.cpp
│ │ │ │ ├── modulated_deform_conv_parrots.cpp
│ │ │ │ ├── modulated_deform_conv_pytorch.h
│ │ │ │ ├── ms_deform_attn.cpp
│ │ │ │ ├── ms_deform_attn_parrots.cpp
│ │ │ │ ├── nms.cpp
│ │ │ │ ├── nms_parrots.cpp
│ │ │ │ ├── nms_pytorch.h
│ │ │ │ ├── nms_rotated.cpp
│ │ │ │ ├── pixel_group.cpp
│ │ │ │ ├── pixel_group_parrots.cpp
│ │ │ │ ├── pixel_group_pytorch.h
│ │ │ │ ├── points_in_boxes.cpp
│ │ │ │ ├── points_in_boxes_parrots.cpp
│ │ │ │ ├── points_in_boxes_pytorch.h
│ │ │ │ ├── points_in_polygons.cpp
│ │ │ │ ├── points_in_polygons_parrots.cpp
│ │ │ │ ├── points_in_polygons_pytorch.h
│ │ │ │ ├── prroi_pool.cpp
│ │ │ │ ├── prroi_pool_parrots.cpp
│ │ │ │ ├── prroi_pool_pytorch.h
│ │ │ │ ├── psamask.cpp
│ │ │ │ ├── psamask_parrots.cpp
│ │ │ │ ├── psamask_pytorch.h
│ │ │ │ ├── riroi_align_rotated.cpp
│ │ │ │ ├── riroi_align_rotated_parrots.cpp
│ │ │ │ ├── riroi_align_rotated_pytorch.h
│ │ │ │ ├── roi_align.cpp
│ │ │ │ ├── roi_align_parrots.cpp
│ │ │ │ ├── roi_align_pytorch.h
│ │ │ │ ├── roi_align_rotated.cpp
│ │ │ │ ├── roi_align_rotated_parrots.cpp
│ │ │ │ ├── roi_align_rotated_pytorch.h
│ │ │ │ ├── roi_pool.cpp
│ │ │ │ ├── roi_pool_parrots.cpp
│ │ │ │ ├── roi_pool_pytorch.h
│ │ │ │ ├── roiaware_pool3d.cpp
│ │ │ │ ├── roiaware_pool3d_parrots.cpp
│ │ │ │ ├── roiaware_pool3d_pytorch.h
│ │ │ │ ├── roipoint_pool3d.cpp
│ │ │ │ ├── roipoint_pool3d_parrots.cpp
│ │ │ │ ├── roipoint_pool3d_pytorch.h
│ │ │ │ ├── rotated_feature_align.cpp
│ │ │ │ ├── rotated_feature_align_parrots.cpp
│ │ │ │ ├── rotated_feature_align_pytorch.h
│ │ │ │ ├── sync_bn.cpp
│ │ │ │ ├── sync_bn_parrots.cpp
│ │ │ │ ├── sync_bn_pytorch.h
│ │ │ │ ├── three_interpolate.cpp
│ │ │ │ ├── three_interpolate_parrots.cpp
│ │ │ │ ├── three_interpolate_pytorch.h
│ │ │ │ ├── three_nn.cpp
│ │ │ │ ├── three_nn_parrots.cpp
│ │ │ │ ├── three_nn_pytorch.h
│ │ │ │ ├── tin_shift.cpp
│ │ │ │ ├── tin_shift_parrots.cpp
│ │ │ │ ├── tin_shift_pytorch.h
│ │ │ │ ├── upfirdn2d.cpp
│ │ │ │ ├── upfirdn2d_parrots.cpp
│ │ │ │ ├── voxelization.cpp
│ │ │ │ ├── voxelization_parrots.cpp
│ │ │ │ └── voxelization_pytorch.h
│ │ │ └── pytorch/
│ │ │ ├── active_rotated_filter.cpp
│ │ │ ├── assign_score_withk.cpp
│ │ │ ├── ball_query.cpp
│ │ │ ├── bbox_overlaps.cpp
│ │ │ ├── bezier_align.cpp
│ │ │ ├── bias_act.cpp
│ │ │ ├── border_align.cpp
│ │ │ ├── box_iou_quadri.cpp
│ │ │ ├── box_iou_rotated.cpp
│ │ │ ├── carafe.cpp
│ │ │ ├── carafe_naive.cpp
│ │ │ ├── chamfer_distance.cpp
│ │ │ ├── contour_expand.cpp
│ │ │ ├── convex_iou.cpp
│ │ │ ├── correlation.cpp
│ │ │ ├── cpu/
│ │ │ │ ├── active_rotated_filter.cpp
│ │ │ │ ├── bbox_overlaps_cpu.cpp
│ │ │ │ ├── bezier_align.cpp
│ │ │ │ ├── box_iou_quadri.cpp
│ │ │ │ ├── box_iou_rotated.cpp
│ │ │ │ ├── deform_conv.cpp
│ │ │ │ ├── modulated_deform_conv.cpp
│ │ │ │ ├── nms.cpp
│ │ │ │ ├── nms_quadri.cpp
│ │ │ │ ├── nms_rotated.cpp
│ │ │ │ ├── pixel_group.cpp
│ │ │ │ ├── points_in_boxes.cpp
│ │ │ │ ├── psamask.cpp
│ │ │ │ ├── roi_align.cpp
│ │ │ │ ├── roi_align_rotated.cpp
│ │ │ │ ├── rotated_feature_align.cpp
│ │ │ │ ├── sparse_indice.cpp
│ │ │ │ ├── sparse_maxpool.cpp
│ │ │ │ ├── sparse_reordering.cpp
│ │ │ │ └── voxelization.cpp
│ │ │ ├── cuda/
│ │ │ │ ├── active_rotated_filter_cuda.cu
│ │ │ │ ├── assign_score_withk_cuda.cu
│ │ │ │ ├── ball_query_cuda.cu
│ │ │ │ ├── bbox_overlaps_cuda.cu
│ │ │ │ ├── bezier_align_cuda.cu
│ │ │ │ ├── bias_act_cuda.cu
│ │ │ │ ├── border_align_cuda.cu
│ │ │ │ ├── box_iou_quadri_cuda.cu
│ │ │ │ ├── box_iou_rotated_cuda.cu
│ │ │ │ ├── carafe_cuda.cu
│ │ │ │ ├── carafe_naive_cuda.cu
│ │ │ │ ├── chamfer_distance_cuda.cu
│ │ │ │ ├── convex_iou.cu
│ │ │ │ ├── correlation_cuda.cu
│ │ │ │ ├── cudabind.cpp
│ │ │ │ ├── deform_conv_cuda.cu
│ │ │ │ ├── deform_roi_pool_cuda.cu
│ │ │ │ ├── diff_iou_rotated_cuda.cu
│ │ │ │ ├── filtered_lrelu.cu
│ │ │ │ ├── focal_loss_cuda.cu
│ │ │ │ ├── furthest_point_sample_cuda.cu
│ │ │ │ ├── fused_bias_leakyrelu_cuda.cu
│ │ │ │ ├── fused_spconv_ops_cuda.cu
│ │ │ │ ├── gather_points_cuda.cu
│ │ │ │ ├── group_points_cuda.cu
│ │ │ │ ├── iou3d_cuda.cu
│ │ │ │ ├── knn_cuda.cu
│ │ │ │ ├── masked_conv2d_cuda.cu
│ │ │ │ ├── min_area_polygons.cu
│ │ │ │ ├── modulated_deform_conv_cuda.cu
│ │ │ │ ├── ms_deform_attn_cuda.cu
│ │ │ │ ├── nms_cuda.cu
│ │ │ │ ├── nms_quadri_cuda.cu
│ │ │ │ ├── nms_rotated_cuda.cu
│ │ │ │ ├── points_in_boxes_cuda.cu
│ │ │ │ ├── points_in_polygons_cuda.cu
│ │ │ │ ├── prroi_pool_cuda.cu
│ │ │ │ ├── psamask_cuda.cu
│ │ │ │ ├── riroi_align_rotated_cuda.cu
│ │ │ │ ├── roi_align_cuda.cu
│ │ │ │ ├── roi_align_rotated_cuda.cu
│ │ │ │ ├── roi_pool_cuda.cu
│ │ │ │ ├── roiaware_pool3d_cuda.cu
│ │ │ │ ├── roipoint_pool3d_cuda.cu
│ │ │ │ ├── rotated_feature_align_cuda.cu
│ │ │ │ ├── scatter_points_cuda.cu
│ │ │ │ ├── sparse_indice.cu
│ │ │ │ ├── sparse_maxpool.cu
│ │ │ │ ├── sparse_pool_ops_cuda.cu
│ │ │ │ ├── sparse_reordering.cu
│ │ │ │ ├── spconv_ops_cuda.cu
│ │ │ │ ├── stack_ball_query_cuda.cu
│ │ │ │ ├── stack_group_points_cuda.cu
│ │ │ │ ├── sync_bn_cuda.cu
│ │ │ │ ├── three_interpolate_cuda.cu
│ │ │ │ ├── three_nn_cuda.cu
│ │ │ │ ├── tin_shift_cuda.cu
│ │ │ │ ├── upfirdn2d_kernel.cu
│ │ │ │ └── voxelization_cuda.cu
│ │ │ ├── deform_conv.cpp
│ │ │ ├── deform_roi_pool.cpp
│ │ │ ├── diff_iou_rotated.cpp
│ │ │ ├── filtered_lrelu.cpp
│ │ │ ├── focal_loss.cpp
│ │ │ ├── furthest_point_sample.cpp
│ │ │ ├── fused_bias_leakyrelu.cpp
│ │ │ ├── fused_spconv_ops.cpp
│ │ │ ├── gather_points.cpp
│ │ │ ├── group_points.cpp
│ │ │ ├── info.cpp
│ │ │ ├── iou3d.cpp
│ │ │ ├── knn.cpp
│ │ │ ├── masked_conv2d.cpp
│ │ │ ├── min_area_polygons.cpp
│ │ │ ├── mlu/
│ │ │ │ ├── ball_query_mlu.cpp
│ │ │ │ ├── bbox_overlaps_mlu.cpp
│ │ │ │ ├── box_iou_rotated.cpp
│ │ │ │ ├── carafe_mlu.cpp
│ │ │ │ ├── deform_roi_pool_mlu.cpp
│ │ │ │ ├── diff_iou_rotated_mlu.cpp
│ │ │ │ ├── focal_loss_sigmoid_mlu.cpp
│ │ │ │ ├── iou3d_mlu.cpp
│ │ │ │ ├── masked_conv2d_mlu.cpp
│ │ │ │ ├── mlu_common_helper.cpp
│ │ │ │ ├── mlu_common_helper.h
│ │ │ │ ├── ms_deform_attn_mlu.cpp
│ │ │ │ ├── nms_mlu.cpp
│ │ │ │ ├── nms_rotated_mlu.cpp
│ │ │ │ ├── psamask_mlu.cpp
│ │ │ │ ├── roi_align_mlu.cpp
│ │ │ │ ├── roi_align_rotated_mlu.cpp
│ │ │ │ ├── roi_pool_mlu.cpp
│ │ │ │ ├── roiaware_pool3d_mlu.cpp
│ │ │ │ ├── roipoint_pool3d_mlu.cpp
│ │ │ │ ├── rotated_feature_align_mlu.cpp
│ │ │ │ ├── scatter_points_mlu.cpp
│ │ │ │ ├── sparse_conv_mlu.cpp
│ │ │ │ ├── three_nn_mlu.cpp
│ │ │ │ ├── tin_shift_mlu.cpp
│ │ │ │ └── voxelization_mlu.cpp
│ │ │ ├── modulated_deform_conv.cpp
│ │ │ ├── mps/
│ │ │ │ └── bbox_overlaps_mps.mm
│ │ │ ├── ms_deform_attn.cpp
│ │ │ ├── musa/
│ │ │ │ ├── active_rotated_filter_musa.mu
│ │ │ │ ├── assign_score_withk_musa.mu
│ │ │ │ ├── ball_query_musa.mu
│ │ │ │ ├── bbox_overlaps_musa.mu
│ │ │ │ ├── bezier_align_musa.mu
│ │ │ │ ├── bias_act_musa.mu
│ │ │ │ ├── border_align_musa.mu
│ │ │ │ ├── box_iou_quadri_musa.mu
│ │ │ │ ├── box_iou_rotated_musa.mu
│ │ │ │ ├── carafe_musa.mu
│ │ │ │ ├── carafe_naive_musa.mu
│ │ │ │ ├── chamfer_distance_musa.mu
│ │ │ │ ├── convex_iou.mu
│ │ │ │ ├── correlation_musa.mu
│ │ │ │ ├── deform_conv_musa.mu
│ │ │ │ ├── deform_roi_pool_musa.mu
│ │ │ │ ├── diff_iou_rotated_musa.mu
│ │ │ │ ├── filtered_lrelu.mu
│ │ │ │ ├── focal_loss_musa.mu
│ │ │ │ ├── furthest_point_sample_musa.mu
│ │ │ │ ├── fused_bias_leakyrelu_musa.mu
│ │ │ │ ├── fused_spconv_ops_musa.mu
│ │ │ │ ├── gather_points_musa.mu
│ │ │ │ ├── group_points_musa.mu
│ │ │ │ ├── iou3d_musa.mu
│ │ │ │ ├── knn_musa.mu
│ │ │ │ ├── masked_conv2d_musa.mu
│ │ │ │ ├── min_area_polygons.mu
│ │ │ │ ├── modulated_deform_conv_musa.mu
│ │ │ │ ├── ms_deform_attn_musa.mu
│ │ │ │ ├── musabind.cpp
│ │ │ │ ├── nms_musa.mu
│ │ │ │ ├── nms_quadri_musa.mu
│ │ │ │ ├── nms_rotated_musa.mu
│ │ │ │ ├── points_in_boxes_musa.mu
│ │ │ │ ├── points_in_polygons_musa.mu
│ │ │ │ ├── prroi_pool_musa.mu
│ │ │ │ ├── psamask_musa.mu
│ │ │ │ ├── riroi_align_rotated_musa.mu
│ │ │ │ ├── roi_align_musa.mu
│ │ │ │ ├── roi_align_rotated_musa.mu
│ │ │ │ ├── roi_pool_musa.mu
│ │ │ │ ├── roiaware_pool3d_musa.mu
│ │ │ │ ├── roipoint_pool3d_musa.mu
│ │ │ │ ├── rotated_feature_align_musa.mu
│ │ │ │ ├── scatter_points_musa.mu
│ │ │ │ ├── sparse_indice.mu
│ │ │ │ ├── sparse_maxpool.mu
│ │ │ │ ├── sparse_pool_ops_musa.mu
│ │ │ │ ├── sparse_reordering.mu
│ │ │ │ ├── spconv_ops_musa.mu
│ │ │ │ ├── stack_ball_query_musa.mu
│ │ │ │ ├── stack_group_points_musa.mu
│ │ │ │ ├── sync_bn_musa.mu
│ │ │ │ ├── three_interpolate_musa.mu
│ │ │ │ ├── three_nn_musa.mu
│ │ │ │ ├── tin_shift_musa.mu
│ │ │ │ ├── upfirdn2d_kernel.mu
│ │ │ │ └── voxelization_musa.mu
│ │ │ ├── nms.cpp
│ │ │ ├── nms_quadri.cpp
│ │ │ ├── nms_rotated.cpp
│ │ │ ├── npu/
│ │ │ │ ├── active_rotated_filter_npu.cpp
│ │ │ │ ├── assign_score_withk_npu.cpp
│ │ │ │ ├── ball_query_npu.cpp
│ │ │ │ ├── bbox_overlaps_npu.cpp
│ │ │ │ ├── border_align_npu.cpp
│ │ │ │ ├── box_iou_quadri_npu.cpp
│ │ │ │ ├── box_iou_rotated_npu.cpp
│ │ │ │ ├── boxes_overlap_bev_npu.cpp
│ │ │ │ ├── chamfer_distance_npu.cpp
│ │ │ │ ├── common_util.h
│ │ │ │ ├── deform_roi_pool.cpp
│ │ │ │ ├── diff_iou_rotated_npu.cpp
│ │ │ │ ├── focal_loss_npu.cpp
│ │ │ │ ├── furthest_point_sample_npu.cpp
│ │ │ │ ├── furthest_point_sampling_with_dist_npu.cpp
│ │ │ │ ├── fused_bias_leakyrelu_npu.cpp
│ │ │ │ ├── gather_points_npu.cpp
│ │ │ │ ├── group_points_npu.cpp
│ │ │ │ ├── knn_npu.cpp
│ │ │ │ ├── ms_deform_attn_npu.cpp
│ │ │ │ ├── nms3d_normal_npu.cpp
│ │ │ │ ├── nms3d_npu.cpp
│ │ │ │ ├── nms_npu.cpp
│ │ │ │ ├── nms_rotated_npu.cpp
│ │ │ │ ├── points_in_box_npu.cpp
│ │ │ │ ├── points_in_box_npu_all.cpp
│ │ │ │ ├── points_in_polygons_npu.cpp
│ │ │ │ ├── psa_mask_npu.cpp
│ │ │ │ ├── roi_align_npu.cpp
│ │ │ │ ├── roi_align_rotated_npu.cpp
│ │ │ │ ├── roi_pool_npu.cpp
│ │ │ │ ├── roiaware_pool3d_npu.cpp
│ │ │ │ ├── roipoint_pool3d_forward.cpp
│ │ │ │ ├── rotated_feature_align_npu.cpp
│ │ │ │ ├── stack_ball_query_npu.cpp
│ │ │ │ ├── stack_group_points_npu.cpp
│ │ │ │ ├── three_interpolate_npu.cpp
│ │ │ │ ├── three_nn_npu.cpp
│ │ │ │ └── voxelization_npu.cpp
│ │ │ ├── pixel_group.cpp
│ │ │ ├── points_in_boxes.cpp
│ │ │ ├── points_in_polygons.cpp
│ │ │ ├── prroi_pool.cpp
│ │ │ ├── psamask.cpp
│ │ │ ├── pybind.cpp
│ │ │ ├── riroi_align_rotated.cpp
│ │ │ ├── roi_align.cpp
│ │ │ ├── roi_align_rotated.cpp
│ │ │ ├── roi_pool.cpp
│ │ │ ├── roiaware_pool3d.cpp
│ │ │ ├── roipoint_pool3d.cpp
│ │ │ ├── rotated_feature_align.cpp
│ │ │ ├── scatter_points.cpp
│ │ │ ├── sparse_pool_ops.cpp
│ │ │ ├── spconv_ops.cpp
│ │ │ ├── spconv_utils.h
│ │ │ ├── sync_bn.cpp
│ │ │ ├── three_interpolate.cpp
│ │ │ ├── three_nn.cpp
│ │ │ ├── tin_shift.cpp
│ │ │ ├── upfirdn2d.cpp
│ │ │ └── voxelization.cpp
│ │ ├── deform_conv.py
│ │ ├── deform_roi_pool.py
│ │ ├── deprecated_wrappers.py
│ │ ├── diff_iou_rotated.py
│ │ ├── filtered_lrelu.py
│ │ ├── focal_loss.py
│ │ ├── furthest_point_sample.py
│ │ ├── fused_bias_leakyrelu.py
│ │ ├── gather_points.py
│ │ ├── group_points.py
│ │ ├── info.py
│ │ ├── iou3d.py
│ │ ├── knn.py
│ │ ├── masked_conv.py
│ │ ├── merge_cells.py
│ │ ├── min_area_polygons.py
│ │ ├── modulated_deform_conv.py
│ │ ├── multi_scale_deform_attn.py
│ │ ├── nms.py
│ │ ├── pixel_group.py
│ │ ├── point_sample.py
│ │ ├── points_in_boxes.py
│ │ ├── points_in_polygons.py
│ │ ├── points_sampler.py
│ │ ├── prroi_pool.py
│ │ ├── psa_mask.py
│ │ ├── riroi_align_rotated.py
│ │ ├── roi_align.py
│ │ ├── roi_align_rotated.py
│ │ ├── roi_pool.py
│ │ ├── roiaware_pool3d.py
│ │ ├── roipoint_pool3d.py
│ │ ├── rotated_feature_align.py
│ │ ├── saconv.py
│ │ ├── scatter_points.py
│ │ ├── sparse_conv.py
│ │ ├── sparse_functional.py
│ │ ├── sparse_modules.py
│ │ ├── sparse_ops.py
│ │ ├── sparse_pool.py
│ │ ├── sparse_structure.py
│ │ ├── sync_bn.py
│ │ ├── three_interpolate.py
│ │ ├── three_nn.py
│ │ ├── tin_shift.py
│ │ ├── upfirdn2d.py
│ │ └── voxelize.py
│ ├── transforms/
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── builder.py
│ │ ├── formatting.py
│ │ ├── loading.py
│ │ ├── processing.py
│ │ ├── utils.py
│ │ └── wrappers.py
│ ├── utils/
│ │ ├── __init__.py
│ │ ├── device_type.py
│ │ ├── env.py
│ │ ├── ext_loader.py
│ │ └── parrots_jit.py
│ ├── version.py
│ ├── video/
│ │ ├── __init__.py
│ │ ├── io.py
│ │ ├── optflow.py
│ │ └── processing.py
│ └── visualization/
│ ├── __init__.py
│ ├── color.py
│ ├── image.py
│ └── optflow.py
├── requirements/
│ ├── build.txt
│ ├── docs.txt
│ ├── optional.txt
│ ├── runtime.txt
│ └── test.txt
├── requirements.txt
├── setup.cfg
├── setup.py
└── tests/
├── test_arraymisc.py
├── test_cnn/
│ ├── test_build_layers.py
│ ├── test_context_block.py
│ ├── test_conv2d_adaptive_padding.py
│ ├── test_conv_module.py
│ ├── test_depthwise_seperable_conv_module.py
│ ├── test_flops_counter.py
│ ├── test_fuse_conv_bn.py
│ ├── test_generalized_attention.py
│ ├── test_hsigmoid.py
│ ├── test_hswish.py
│ ├── test_non_local.py
│ ├── test_rfsearch/
│ │ ├── test_operator.py
│ │ └── test_search.py
│ ├── test_scale.py
│ ├── test_silu.py
│ ├── test_swish.py
│ ├── test_transformer.py
│ └── test_wrappers.py
├── test_image/
│ ├── test_colorspace.py
│ ├── test_geometric.py
│ ├── test_image_misc.py
│ ├── test_io.py
│ └── test_photometric.py
├── test_ops/
│ ├── output.pkl
│ ├── test_active_rotated_filter.py
│ ├── test_assign_score_withk.py
│ ├── test_ball_query.py
│ ├── test_bbox.py
│ ├── test_bezier_align.py
│ ├── test_bias_act.py
│ ├── test_bilinear_grid_sample.py
│ ├── test_border_align.py
│ ├── test_box_iou_quadri.py
│ ├── test_box_iou_rotated.py
│ ├── test_carafe.py
│ ├── test_cc_attention.py
│ ├── test_chamfer_distance.py
│ ├── test_contour_expand.py
│ ├── test_conv_gradfix.py
│ ├── test_convex_iou.py
│ ├── test_corner_pool.py
│ ├── test_correlation.py
│ ├── test_deform_conv.py
│ ├── test_deform_roi_pool.py
│ ├── test_diff_iou_rotated.py
│ ├── test_filtered_lrelu.py
│ ├── test_focal_loss.py
│ ├── test_furthest_point_sample.py
│ ├── test_fused_bias_leakyrelu.py
│ ├── test_gather_points.py
│ ├── test_group_points.py
│ ├── test_info.py
│ ├── test_iou3d.py
│ ├── test_knn.py
│ ├── test_masked_conv2d.py
│ ├── test_merge_cells.py
│ ├── test_min_area_polygons.py
│ ├── test_modulated_deform_conv.py
│ ├── test_ms_deformable_attn.py
│ ├── test_nms.py
│ ├── test_nms_quadri.py
│ ├── test_nms_rotated.py
│ ├── test_onnx.py
│ ├── test_pixel_group.py
│ ├── test_points_in_polygons.py
│ ├── test_prroi_pool.py
│ ├── test_psa_mask.py
│ ├── test_riroi_align_rotated.py
│ ├── test_roi_align.py
│ ├── test_roi_align_rotated.py
│ ├── test_roi_pool.py
│ ├── test_roiaware_pool3d.py
│ ├── test_roipoint_pool3d.py
│ ├── test_rotated_feature_align.py
│ ├── test_saconv.py
│ ├── test_scatter_points.py
│ ├── test_spconv.py
│ ├── test_syncbn.py
│ ├── test_three_interpolate.py
│ ├── test_three_nn.py
│ ├── test_tin_shift.py
│ ├── test_upfirdn2d.py
│ └── test_voxelization.py
├── test_transforms/
│ ├── test_transforms_formatting.py
│ ├── test_transforms_loading.py
│ ├── test_transforms_processing.py
│ └── test_transforms_wrapper.py
├── test_utils/
│ ├── test_env.py
│ └── test_parrots_jit.py
├── test_video/
│ ├── test_optflow.py
│ ├── test_processing.py
│ └── test_reader.py
└── test_visualization.py
Showing preview only (255K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2558 symbols across 467 files)
FILE: .dev_scripts/check_installation.py
function check_installation (line 8) | def check_installation():
FILE: mmcv/arraymisc/quantization.py
function quantize (line 7) | def quantize(arr: np.ndarray,
function dequantize (line 38) | def dequantize(arr: np.ndarray,
FILE: mmcv/cnn/alexnet.py
class AlexNet (line 10) | class AlexNet(nn.Module):
method __init__ (line 17) | def __init__(self, num_classes: int = -1):
method init_weights (line 46) | def init_weights(self, pretrained: Optional[str] = None) -> None:
method forward (line 56) | def forward(self, x: torch.Tensor) -> torch.Tensor:
FILE: mmcv/cnn/bricks/activation.py
class SiLU (line 21) | class SiLU(nn.Module):
method __init__ (line 24) | def __init__(self, inplace=False):
method forward (line 28) | def forward(self, inputs) -> torch.Tensor:
class Clamp (line 39) | class Clamp(nn.Module):
method __init__ (line 52) | def __init__(self, min: float = -1., max: float = 1.):
method forward (line 57) | def forward(self, x) -> torch.Tensor:
class GELU (line 69) | class GELU(nn.Module):
method forward (line 91) | def forward(self, input: torch.Tensor) -> torch.Tensor:
function build_activation_layer (line 102) | def build_activation_layer(cfg: Dict) -> nn.Module:
FILE: mmcv/cnn/bricks/context_block.py
function last_zero_init (line 10) | def last_zero_init(m: Union[nn.Module, nn.Sequential]) -> None:
class ContextBlock (line 18) | class ContextBlock(nn.Module):
method __init__ (line 37) | def __init__(self,
method reset_parameters (line 76) | def reset_parameters(self):
method spatial_pool (line 86) | def spatial_pool(self, x: torch.Tensor) -> torch.Tensor:
method forward (line 112) | def forward(self, x: torch.Tensor) -> torch.Tensor:
FILE: mmcv/cnn/bricks/conv.py
function build_conv_layer (line 14) | def build_conv_layer(cfg: Optional[Dict], *args, **kwargs) -> nn.Module:
FILE: mmcv/cnn/bricks/conv2d_adaptive_padding.py
class Conv2dAdaptivePadding (line 12) | class Conv2dAdaptivePadding(nn.Conv2d):
method __init__ (line 34) | def __init__(self,
method forward (line 46) | def forward(self, x: torch.Tensor) -> torch.Tensor:
FILE: mmcv/cnn/bricks/conv_module.py
function efficient_conv_bn_eval_forward (line 18) | def efficient_conv_bn_eval_forward(bn: _BatchNorm,
class ConvModule (line 69) | class ConvModule(nn.Module):
method __init__ (line 126) | def __init__(self,
method norm (line 229) | def norm(self):
method init_weights (line 235) | def init_weights(self):
method forward (line 256) | def forward(self,
method turn_on_efficient_conv_bn_eval (line 289) | def turn_on_efficient_conv_bn_eval(self, efficient_conv_bn_eval=True):
method create_from_conv_bn (line 300) | def create_from_conv_bn(conv: torch.nn.modules.conv._ConvNd,
FILE: mmcv/cnn/bricks/conv_ws.py
function conv_ws_2d (line 11) | def conv_ws_2d(input: torch.Tensor,
class ConvWS2d (line 28) | class ConvWS2d(nn.Conv2d):
method __init__ (line 30) | def __init__(self,
method forward (line 51) | def forward(self, x: torch.Tensor) -> torch.Tensor:
class ConvAWS2d (line 57) | class ConvAWS2d(nn.Conv2d):
method __init__ (line 80) | def __init__(self,
method _get_weight (line 103) | def _get_weight(self, weight: torch.Tensor) -> torch.Tensor:
method forward (line 111) | def forward(self, x: torch.Tensor) -> torch.Tensor:
method _load_from_state_dict (line 116) | def _load_from_state_dict(self, state_dict: OrderedDict, prefix: str,
FILE: mmcv/cnn/bricks/depthwise_separable_conv_module.py
class DepthwiseSeparableConvModule (line 10) | class DepthwiseSeparableConvModule(nn.Module):
method __init__ (line 51) | def __init__(self,
method forward (line 96) | def forward(self, x: torch.Tensor) -> torch.Tensor:
FILE: mmcv/cnn/bricks/drop.py
function drop_path (line 9) | def drop_path(x: torch.Tensor,
class DropPath (line 31) | class DropPath(nn.Module):
method __init__ (line 42) | def __init__(self, drop_prob: float = 0.1):
method forward (line 46) | def forward(self, x: torch.Tensor) -> torch.Tensor:
class Dropout (line 51) | class Dropout(nn.Dropout):
method __init__ (line 62) | def __init__(self, drop_prob: float = 0.5, inplace: bool = False):
function build_dropout (line 66) | def build_dropout(cfg: Dict, default_args: Optional[Dict] = None) -> Any:
FILE: mmcv/cnn/bricks/generalized_attention.py
class GeneralizedAttention (line 13) | class GeneralizedAttention(nn.Module):
method __init__ (line 46) | def __init__(self,
method get_position_embedding (line 165) | def get_position_embedding(self,
method forward (line 215) | def forward(self, x_input: torch.Tensor) -> torch.Tensor:
method init_weights (line 402) | def init_weights(self):
FILE: mmcv/cnn/bricks/hsigmoid.py
class HSigmoid (line 10) | class HSigmoid(nn.Module):
method __init__ (line 29) | def __init__(self,
method forward (line 47) | def forward(self, x: torch.Tensor) -> torch.Tensor:
FILE: mmcv/cnn/bricks/hswish.py
class HSwish (line 9) | class HSwish(nn.Module):
method __init__ (line 25) | def __init__(self, inplace: bool = False):
method forward (line 29) | def forward(self, x: torch.Tensor) -> torch.Tensor:
FILE: mmcv/cnn/bricks/non_local.py
class _NonLocalNd (line 13) | class _NonLocalNd(nn.Module, metaclass=ABCMeta):
method __init__ (line 36) | def __init__(self,
method init_weights (line 100) | def init_weights(self, std: float = 0.01, zeros_init: bool = True) -> ...
method gaussian (line 117) | def gaussian(self, theta_x: torch.Tensor,
method embedded_gaussian (line 126) | def embedded_gaussian(self, theta_x: torch.Tensor,
method dot_product (line 138) | def dot_product(self, theta_x: torch.Tensor,
method concatenation (line 147) | def concatenation(self, theta_x: torch.Tensor,
method forward (line 165) | def forward(self, x: torch.Tensor) -> torch.Tensor:
class NonLocal1d (line 219) | class NonLocal1d(_NonLocalNd):
method __init__ (line 231) | def __init__(self,
class NonLocal2d (line 250) | class NonLocal2d(_NonLocalNd):
method __init__ (line 264) | def __init__(self,
class NonLocal3d (line 282) | class NonLocal3d(_NonLocalNd):
method __init__ (line 294) | def __init__(self,
FILE: mmcv/cnn/bricks/norm.py
function infer_abbr (line 24) | def infer_abbr(class_type):
function build_norm_layer (line 73) | def build_norm_layer(cfg: Dict,
function is_norm (line 133) | def is_norm(layer: nn.Module,
FILE: mmcv/cnn/bricks/padding.py
function build_padding_layer (line 13) | def build_padding_layer(cfg: Dict, *args, **kwargs) -> nn.Module:
FILE: mmcv/cnn/bricks/plugin.py
function infer_abbr (line 15) | def infer_abbr(class_type: type) -> str:
function build_plugin_layer (line 58) | def build_plugin_layer(cfg: Dict,
FILE: mmcv/cnn/bricks/scale.py
class Scale (line 6) | class Scale(nn.Module):
method __init__ (line 16) | def __init__(self, scale: float = 1.0):
method forward (line 20) | def forward(self, x: torch.Tensor) -> torch.Tensor:
class LayerScale (line 24) | class LayerScale(nn.Module):
method __init__ (line 37) | def __init__(self,
method forward (line 49) | def forward(self, x) -> torch.Tensor:
FILE: mmcv/cnn/bricks/swish.py
class Swish (line 8) | class Swish(nn.Module):
method __init__ (line 20) | def __init__(self):
method forward (line 23) | def forward(self, x: torch.Tensor) -> torch.Tensor:
FILE: mmcv/cnn/bricks/transformer.py
function build_positional_encoding (line 39) | def build_positional_encoding(cfg, default_args=None):
function build_attention (line 44) | def build_attention(cfg, default_args=None):
function build_feedforward_network (line 49) | def build_feedforward_network(cfg, default_args=None):
function build_transformer_layer (line 54) | def build_transformer_layer(cfg, default_args=None):
function build_transformer_layer_sequence (line 59) | def build_transformer_layer_sequence(cfg, default_args=None):
class AdaptivePadding (line 64) | class AdaptivePadding(nn.Module):
method __init__ (line 99) | def __init__(self, kernel_size=1, stride=1, dilation=1, padding='corne...
method get_pad_shape (line 112) | def get_pad_shape(self, input_shape):
method forward (line 133) | def forward(self, x):
class PatchEmbed (line 154) | class PatchEmbed(BaseModule):
method __init__ (line 182) | def __init__(self,
method forward (line 254) | def forward(self, x):
class PatchMerging (line 278) | class PatchMerging(BaseModule):
method __init__ (line 310) | def __init__(self,
method forward (line 359) | def forward(self, x, input_size):
class MultiheadAttention (line 408) | class MultiheadAttention(BaseModule):
method __init__ (line 430) | def __init__(self,
method forward (line 462) | def forward(self,
class FFN (line 556) | class FFN(BaseModule):
method __init__ (line 586) | def __init__(self,
method forward (line 624) | def forward(self, x, identity=None):
class BaseTransformerLayer (line 639) | class BaseTransformerLayer(BaseModule):
method __init__ (line 675) | def __init__(self,
method forward (line 768) | def forward(self,
class TransformerLayerSequence (line 870) | class TransformerLayerSequence(BaseModule):
method __init__ (line 889) | def __init__(self, transformerlayers=None, num_layers=None, init_cfg=N...
method forward (line 905) | def forward(self,
FILE: mmcv/cnn/bricks/upsample.py
class PixelShufflePack (line 16) | class PixelShufflePack(nn.Module):
method __init__ (line 30) | def __init__(self, in_channels: int, out_channels: int, scale_factor: ...
method init_weights (line 44) | def init_weights(self):
method forward (line 47) | def forward(self, x: torch.Tensor) -> torch.Tensor:
function build_upsample_layer (line 53) | def build_upsample_layer(cfg: Dict, *args, **kwargs) -> nn.Module:
FILE: mmcv/cnn/bricks/wrappers.py
function obsolete_torch_version (line 23) | def obsolete_torch_version(torch_version, version_threshold) -> bool:
class NewEmptyTensorOp (line 27) | class NewEmptyTensorOp(torch.autograd.Function):
method forward (line 30) | def forward(ctx, x: torch.Tensor, new_shape: tuple) -> torch.Tensor:
method backward (line 35) | def backward(ctx, grad: torch.Tensor) -> tuple:
class Conv2d (line 41) | class Conv2d(nn.Conv2d):
method forward (line 43) | def forward(self, x: torch.Tensor) -> torch.Tensor:
class Conv3d (line 62) | class Conv3d(nn.Conv3d):
method forward (line 64) | def forward(self, x: torch.Tensor) -> torch.Tensor:
class ConvTranspose2d (line 84) | class ConvTranspose2d(nn.ConvTranspose2d):
method forward (line 86) | def forward(self, x: torch.Tensor) -> torch.Tensor:
class ConvTranspose3d (line 106) | class ConvTranspose3d(nn.ConvTranspose3d):
method forward (line 108) | def forward(self, x: torch.Tensor) -> torch.Tensor:
class MaxPool2d (line 126) | class MaxPool2d(nn.MaxPool2d):
method forward (line 128) | def forward(self, x: torch.Tensor) -> torch.Tensor:
class MaxPool3d (line 144) | class MaxPool3d(nn.MaxPool3d):
method forward (line 146) | def forward(self, x: torch.Tensor) -> torch.Tensor:
class Linear (line 163) | class Linear(torch.nn.Linear):
method forward (line 165) | def forward(self, x: torch.Tensor) -> torch.Tensor:
FILE: mmcv/cnn/resnet.py
function conv3x3 (line 12) | def conv3x3(in_planes: int,
class BasicBlock (line 27) | class BasicBlock(nn.Module):
method __init__ (line 30) | def __init__(self,
method forward (line 50) | def forward(self, x: Tensor) -> Tensor:
class Bottleneck (line 69) | class Bottleneck(nn.Module):
method __init__ (line 72) | def __init__(self,
method forward (line 115) | def forward(self, x: Tensor) -> Tensor:
function make_res_layer (line 148) | def make_res_layer(block: nn.Module,
class ResNet (line 186) | class ResNet(nn.Module):
method __init__ (line 215) | def __init__(self,
method init_weights (line 271) | def init_weights(self, pretrained: Optional[str] = None) -> None:
method forward (line 284) | def forward(self, x: Tensor) -> Union[Tensor, Tuple[Tensor]]:
method train (line 300) | def train(self, mode: bool = True) -> None:
FILE: mmcv/cnn/rfsearch/operator.py
class BaseConvRFSearchOp (line 14) | class BaseConvRFSearchOp(BaseModule):
method __init__ (line 22) | def __init__(self, op_layer: nn.Module, global_config: dict):
method normlize (line 27) | def normlize(self, weights: nn.Parameter) -> nn.Parameter:
class Conv2dRFSearchOp (line 41) | class Conv2dRFSearchOp(BaseConvRFSearchOp):
method __init__ (line 63) | def __init__(self,
method forward (line 88) | def forward(self, input: Tensor) -> Tensor:
method estimate_rates (line 119) | def estimate_rates(self) -> None:
method expand_rates (line 147) | def expand_rates(self) -> None:
method get_padding (line 164) | def get_padding(self, dilation) -> tuple:
FILE: mmcv/cnn/rfsearch/search.py
class RFSearchHook (line 17) | class RFSearchHook(Hook):
method __init__ (line 55) | def __init__(self,
method init_model (line 73) | def init_model(self, model: nn.Module):
method after_train_epoch (line 99) | def after_train_epoch(self, runner):
method after_train_iter (line 104) | def after_train_iter(self, runner, batch_idx, data_batch, outputs):
method step (line 109) | def step(self, model: nn.Module, work_dir: str) -> None:
method estimate_and_expand (line 134) | def estimate_and_expand(self, model: nn.Module) -> None:
method wrap_model (line 145) | def wrap_model(self,
method set_model (line 185) | def set_model(self,
FILE: mmcv/cnn/rfsearch/utils.py
function write_to_json (line 6) | def write_to_json(config: dict, filename: str):
function expand_rates (line 18) | def expand_rates(dilation: tuple, config: dict) -> list:
function get_single_padding (line 64) | def get_single_padding(kernel_size: int,
FILE: mmcv/cnn/utils/flops_counter.py
function get_model_complexity_info (line 39) | def get_model_complexity_info(model: nn.Module,
function flops_to_string (line 121) | def flops_to_string(flops: float,
function params_to_string (line 166) | def params_to_string(num_params: float,
function print_model_with_flops (line 205) | def print_model_with_flops(model: nn.Module,
function get_model_parameters_number (line 314) | def get_model_parameters_number(model: nn.Module) -> float:
function add_flops_counting_methods (line 327) | def add_flops_counting_methods(net_main_module: nn.Module) -> nn.Module:
function compute_average_flops_cost (line 344) | def compute_average_flops_cost(self) -> Tuple[float, float]:
function start_flops_count (line 362) | def start_flops_count(self) -> None:
function stop_flops_count (line 385) | def stop_flops_count(self) -> None:
function reset_flops_count (line 396) | def reset_flops_count(self) -> None:
function empty_flops_counter_hook (line 407) | def empty_flops_counter_hook(module: nn.Module, input: tuple,
function upsample_flops_counter_hook (line 412) | def upsample_flops_counter_hook(module: nn.Module, input: tuple,
function relu_flops_counter_hook (line 422) | def relu_flops_counter_hook(module: nn.Module, input: tuple,
function linear_flops_counter_hook (line 428) | def linear_flops_counter_hook(module: nn.Module, input: tuple,
function pool_flops_counter_hook (line 435) | def pool_flops_counter_hook(module: nn.Module, input: tuple,
function norm_flops_counter_hook (line 440) | def norm_flops_counter_hook(module: nn.Module, input: tuple,
function deconv_flops_counter_hook (line 449) | def deconv_flops_counter_hook(conv_module: nn.Module, input: tuple,
function conv_flops_counter_hook (line 475) | def conv_flops_counter_hook(conv_module: nn.Module, input: tuple,
function batch_counter_hook (line 505) | def batch_counter_hook(module: nn.Module, input: tuple, output: Any) -> ...
function add_batch_counter_variables_or_reset (line 516) | def add_batch_counter_variables_or_reset(module: nn.Module) -> None:
function add_batch_counter_hook_function (line 521) | def add_batch_counter_hook_function(module: nn.Module) -> None:
function remove_batch_counter_hook_function (line 529) | def remove_batch_counter_hook_function(module: nn.Module) -> None:
function add_flops_counter_variable_or_reset (line 535) | def add_flops_counter_variable_or_reset(module: nn.Module) -> None:
function is_supported_instance (line 545) | def is_supported_instance(module: nn.Module) -> bool:
function remove_flops_counter_hook_function (line 551) | def remove_flops_counter_hook_function(module: nn.Module) -> None:
function get_modules_mapping (line 558) | def get_modules_mapping() -> Dict:
FILE: mmcv/cnn/utils/fuse_conv_bn.py
function _fuse_conv_bn (line 6) | def _fuse_conv_bn(conv: nn.Module, bn: nn.Module) -> nn.Module:
function fuse_conv_bn (line 27) | def fuse_conv_bn(module: nn.Module) -> nn.Module:
FILE: mmcv/cnn/vgg.py
function conv3x3 (line 11) | def conv3x3(in_planes: int, out_planes: int, dilation: int = 1) -> nn.Mo...
function make_vgg_layer (line 21) | def make_vgg_layer(inplanes: int,
class VGG (line 39) | class VGG(nn.Module):
method __init__ (line 63) | def __init__(self,
method init_weights (line 127) | def init_weights(self, pretrained: Optional[str] = None) -> None:
method forward (line 142) | def forward(self, x: Tensor) -> Union[Tensor, Tuple[Tensor, ...]]:
method train (line 160) | def train(self, mode: bool = True) -> None:
FILE: mmcv/image/colorspace.py
function imconvert (line 8) | def imconvert(img: np.ndarray, src: str, dst: str) -> np.ndarray:
function bgr2gray (line 24) | def bgr2gray(img: np.ndarray, keepdim: bool = False) -> np.ndarray:
function rgb2gray (line 41) | def rgb2gray(img: np.ndarray, keepdim: bool = False) -> np.ndarray:
function gray2bgr (line 58) | def gray2bgr(img: np.ndarray) -> np.ndarray:
function gray2rgb (line 72) | def gray2rgb(img: np.ndarray) -> np.ndarray:
function _convert_input_type_range (line 86) | def _convert_input_type_range(img: np.ndarray) -> np.ndarray:
function _convert_output_type_range (line 114) | def _convert_output_type_range(
function rgb2ycbcr (line 146) | def rgb2ycbcr(img: np.ndarray, y_only: bool = False) -> np.ndarray:
function bgr2ycbcr (line 180) | def bgr2ycbcr(img: np.ndarray, y_only: bool = False) -> np.ndarray:
function ycbcr2rgb (line 214) | def ycbcr2rgb(img: np.ndarray) -> np.ndarray:
function ycbcr2bgr (line 246) | def ycbcr2bgr(img: np.ndarray) -> np.ndarray:
function convert_color_factory (line 278) | def convert_color_factory(src: str, dst: str) -> Callable:
FILE: mmcv/image/geometric.py
function _scale_size (line 17) | def _scale_size(
function imresize (line 77) | def imresize(
function imresize_to_multiple (line 127) | def imresize_to_multiple(
function imresize_like (line 195) | def imresize_like(
function rescale_size (line 219) | def rescale_size(old_size: tuple,
function imrescale (line 258) | def imrescale(
function imflip (line 291) | def imflip(img: np.ndarray, direction: str = 'horizontal') -> np.ndarray:
function imflip_ (line 311) | def imflip_(img: np.ndarray, direction: str = 'horizontal') -> np.ndarray:
function imrotate (line 331) | def imrotate(img: np.ndarray,
function bbox_clip (line 385) | def bbox_clip(bboxes: np.ndarray, img_shape: Tuple[int, int]) -> np.ndar...
function bbox_scaling (line 403) | def bbox_scaling(bboxes: np.ndarray,
function imcrop (line 431) | def imcrop(
function impad (line 492) | def impad(img: np.ndarray,
function impad_to_multiple (line 576) | def impad_to_multiple(img: np.ndarray,
function cutout (line 594) | def cutout(img: np.ndarray,
function _get_shear_matrix (line 651) | def _get_shear_matrix(magnitude: Union[int, float],
function imshear (line 670) | def imshear(img: np.ndarray,
function _get_translate_matrix (line 721) | def _get_translate_matrix(offset: Union[int, float],
function imtranslate (line 740) | def imtranslate(img: np.ndarray,
FILE: mmcv/image/io.py
function use_backend (line 45) | def use_backend(backend: str) -> None:
function _jpegflag (line 71) | def _jpegflag(flag: str = 'color', channel_order: str = 'bgr'):
function _pillow2array (line 87) | def _pillow2array(img,
function imread (line 144) | def imread(img_or_path: Union[np.ndarray, str, Path],
function imfrombytes (line 232) | def imfrombytes(content: bytes,
function imwrite (line 291) | def imwrite(img: np.ndarray,
FILE: mmcv/image/misc.py
function tensor2imgs (line 14) | def tensor2imgs(tensor,
FILE: mmcv/image/photometric.py
function imnormalize (line 14) | def imnormalize(img, mean, std, to_rgb=True):
function imnormalize_ (line 30) | def imnormalize_(img, mean, std, to_rgb=True):
function imdenormalize (line 53) | def imdenormalize(img, mean, std, to_bgr=True):
function iminvert (line 64) | def iminvert(img):
function solarize (line 76) | def solarize(img, thr=128):
function posterize (line 90) | def posterize(img, bits):
function adjust_color (line 105) | def adjust_color(img, alpha=1, beta=None, gamma=0, backend=None):
function imequalize (line 155) | def imequalize(img):
function adjust_brightness (line 200) | def adjust_brightness(img, factor=1., backend=None):
function adjust_contrast (line 250) | def adjust_contrast(img, factor=1., backend=None):
function auto_contrast (line 298) | def auto_contrast(img, cutoff=0):
function adjust_sharpness (line 354) | def adjust_sharpness(img, factor=1., kernel=None):
function adjust_lighting (line 398) | def adjust_lighting(img, eigval, eigvec, alphastd=0.1, to_rgb=True):
function lut_transform (line 441) | def lut_transform(img, lut_table):
function clahe (line 465) | def clahe(img, clip_limit=40.0, tile_grid_size=(8, 8)):
function adjust_hue (line 491) | def adjust_hue(img: np.ndarray,
FILE: mmcv/ops/active_rotated_filter.py
class ActiveRotatedFilterFunction (line 15) | class ActiveRotatedFilterFunction(Function):
method forward (line 24) | def forward(ctx, input: torch.Tensor,
method backward (line 47) | def backward(ctx, grad_out: torch.Tensor) -> Tuple[torch.Tensor, None]:
FILE: mmcv/ops/assign_score_withk.py
class AssignScoreWithK (line 12) | class AssignScoreWithK(Function):
method forward (line 32) | def forward(ctx,
method backward (line 84) | def backward(
FILE: mmcv/ops/ball_query.py
class BallQuery (line 13) | class BallQuery(Function):
method forward (line 17) | def forward(
method backward (line 83) | def backward(ctx, a=None) -> Tuple[None, None, None, None]:
FILE: mmcv/ops/bbox.py
function _bbox_overlaps_cpu (line 9) | def _bbox_overlaps_cpu(bboxes1: torch.Tensor,
function bbox_overlaps (line 50) | def bbox_overlaps(bboxes1: torch.Tensor,
FILE: mmcv/ops/bezier_align.py
class BezierAlignFunction (line 16) | class BezierAlignFunction(Function):
method forward (line 19) | def forward(ctx,
method backward (line 51) | def backward(ctx, grad_output: torch.Tensor):
class BezierAlign (line 70) | class BezierAlign(nn.Module):
method __init__ (line 105) | def __init__(
method forward (line 119) | def forward(self, input: torch.Tensor,
method __repr__ (line 131) | def __repr__(self):
FILE: mmcv/ops/bias_act.py
class EasyDict (line 25) | class EasyDict(dict):
method __getattr__ (line 29) | def __getattr__(self, name: str) -> Any:
method __setattr__ (line 35) | def __setattr__(self, name: str, value: Any) -> None:
method __delattr__ (line 38) | def __delattr__(self, name: str) -> None:
function bias_act (line 195) | def bias_act(input: torch.Tensor,
function _bias_act_ref (line 262) | def _bias_act_ref(input: torch.Tensor,
function _bias_act_cuda (line 340) | def _bias_act_cuda(dim: int = 1,
function _bias_act_musa (line 463) | def _bias_act_musa(dim: int = 1,
FILE: mmcv/ops/border_align.py
class BorderAlignFunction (line 18) | class BorderAlignFunction(Function):
method symbolic (line 21) | def symbolic(g, input, boxes, pool_size):
method forward (line 26) | def forward(ctx, input: torch.Tensor, boxes: torch.Tensor,
method backward (line 51) | def backward(ctx,
class BorderAlign (line 69) | class BorderAlign(nn.Module):
method __init__ (line 92) | def __init__(self, pool_size: int):
method forward (line 96) | def forward(self, input: torch.Tensor,
method __repr__ (line 111) | def __repr__(self):
FILE: mmcv/ops/box_iou_quadri.py
function box_iou_quadri (line 9) | def box_iou_quadri(bboxes1: torch.Tensor,
FILE: mmcv/ops/box_iou_rotated.py
function box_iou_rotated (line 9) | def box_iou_rotated(bboxes1: torch.Tensor,
FILE: mmcv/ops/carafe.py
class CARAFENaiveFunction (line 21) | class CARAFENaiveFunction(Function):
method symbolic (line 24) | def symbolic(g, features: Tensor, masks: Tensor, kernel_size: int,
method forward (line 35) | def forward(ctx, features: Tensor, masks: Tensor, kernel_size: int,
method backward (line 65) | def backward(
class CARAFENaive (line 93) | class CARAFENaive(Module):
method __init__ (line 95) | def __init__(self, kernel_size: int, group_size: int, scale_factor: int):
method forward (line 104) | def forward(self, features: Tensor, masks: Tensor) -> Tensor:
class CARAFEFunction (line 109) | class CARAFEFunction(Function):
method symbolic (line 112) | def symbolic(g, features: Tensor, masks: Tensor, kernel_size: int,
method forward (line 123) | def forward(ctx, features: Tensor, masks: Tensor, kernel_size: int,
method backward (line 159) | def backward(
class CARAFE (line 192) | class CARAFE(Module):
method __init__ (line 207) | def __init__(self, kernel_size: int, group_size: int, scale_factor: int):
method forward (line 216) | def forward(self, features: Tensor, masks: Tensor) -> Tensor:
class CARAFEPack (line 222) | class CARAFEPack(nn.Module):
method __init__ (line 243) | def __init__(self,
method init_weights (line 271) | def init_weights(self):
method kernel_normalizer (line 277) | def kernel_normalizer(self, mask: Tensor) -> Tensor:
method feature_reassemble (line 290) | def feature_reassemble(self, x: Tensor, mask: Tensor) -> Tensor:
method forward (line 294) | def forward(self, x: Tensor) -> Tensor:
FILE: mmcv/ops/cc_attention.py
function NEG_INF_DIAG (line 10) | def NEG_INF_DIAG(n: int, device: torch.device) -> torch.Tensor:
class CrissCrossAttention (line 20) | class CrissCrossAttention(nn.Module):
method __init__ (line 45) | def __init__(self, in_channels: int) -> None:
method forward (line 53) | def forward(self, x: torch.Tensor) -> torch.Tensor:
method __repr__ (line 82) | def __repr__(self) -> str:
FILE: mmcv/ops/chamfer_distance.py
class ChamferDistanceFunction (line 15) | class ChamferDistanceFunction(Function):
method forward (line 24) | def forward(ctx, xyz1: Tensor, xyz2: Tensor) -> Sequence[Tensor]:
method backward (line 60) | def backward(ctx,
FILE: mmcv/ops/contour_expand.py
function contour_expand (line 12) | def contour_expand(kernel_mask: Union[np.array, torch.Tensor],
FILE: mmcv/ops/conv2d_gradfix.py
function no_weight_gradients (line 27) | def no_weight_gradients(disable=True):
function conv2d (line 36) | def conv2d(input: torch.Tensor,
function conv_transpose2d (line 69) | def conv_transpose2d(input: torch.Tensor,
function _should_use_custom_op (line 97) | def _should_use_custom_op(input):
function _to_tuple (line 108) | def _to_tuple(x, ndim):
function _conv2d_gradfix (line 119) | def _conv2d_gradfix(
FILE: mmcv/ops/convex_iou.py
function convex_giou (line 11) | def convex_giou(pointsets: torch.Tensor,
function convex_iou (line 34) | def convex_iou(pointsets: torch.Tensor,
FILE: mmcv/ops/corner_pool.py
function _corner_pool (line 9) | def _corner_pool(x: Tensor, dim: int, flip: bool) -> Tensor:
class CornerPool (line 38) | class CornerPool(nn.Module):
method __init__ (line 68) | def __init__(self, mode: str):
method forward (line 73) | def forward(self, x: Tensor) -> Tensor:
FILE: mmcv/ops/correlation.py
class CorrelationFunction (line 16) | class CorrelationFunction(Function):
method forward (line 19) | def forward(ctx,
method backward (line 65) | def backward(
method _output_size (line 100) | def _output_size(ctx, input1):
class Correlation (line 118) | class Correlation(nn.Module):
method __init__ (line 171) | def __init__(self,
method forward (line 186) | def forward(self, input1: Tensor, input2: Tensor) -> Tensor:
method __repr__ (line 192) | def __repr__(self) -> str:
FILE: mmcv/ops/csrc/common/box_iou_rotated_utils.hpp
type RotatedBox (line 21) | struct RotatedBox {
type Point (line 26) | struct Point {
method HOST_DEVICE_INLINE (line 29) | HOST_DEVICE_INLINE Point operator+(const Point& p) const {
method HOST_DEVICE_INLINE (line 32) | HOST_DEVICE_INLINE Point& operator+=(const Point& p) {
method HOST_DEVICE_INLINE (line 37) | HOST_DEVICE_INLINE Point operator-(const Point& p) const {
method HOST_DEVICE_INLINE (line 40) | HOST_DEVICE_INLINE Point operator*(const T coeff) const {
function HOST_DEVICE_INLINE (line 46) | HOST_DEVICE_INLINE T dot_2d(const Point<T>& A, const Point<T>& B) {
function HOST_DEVICE_INLINE (line 51) | HOST_DEVICE_INLINE T cross_2d(const Point<T>& A, const Point<T>& B) {
function HOST_DEVICE_INLINE (line 56) | HOST_DEVICE_INLINE void get_rotated_vertices(const RotatedBox<T>& box,
function HOST_DEVICE_INLINE (line 77) | HOST_DEVICE_INLINE int get_intersection_points(const Point<T> (&pts1)[4],
function HOST_DEVICE_INLINE (line 157) | HOST_DEVICE_INLINE int convex_hull_graham(const Point<T> (&p)[24],
function HOST_DEVICE_INLINE (line 274) | HOST_DEVICE_INLINE T quadri_box_area(const Point<T> (&q)[4]) {
function HOST_DEVICE_INLINE (line 285) | HOST_DEVICE_INLINE T polygon_area(const Point<T> (&q)[24], const int& m) {
function HOST_DEVICE_INLINE (line 299) | HOST_DEVICE_INLINE T rotated_boxes_intersection(const RotatedBox<T>& box1,
function HOST_DEVICE_INLINE (line 323) | HOST_DEVICE_INLINE T quadri_boxes_intersection(const Point<T> (&pts1)[4],
function HOST_DEVICE_INLINE (line 344) | HOST_DEVICE_INLINE T single_box_iou_rotated(T const* const box1_raw,
function HOST_DEVICE_INLINE (line 380) | HOST_DEVICE_INLINE T single_box_iou_quadri(T const* const pts1_raw,
FILE: mmcv/ops/csrc/common/cuda/common_cuda_helper.hpp
function GET_BLOCKS (line 22) | inline int GET_BLOCKS(const int N, const int num_threads = THREADS_PER_B...
function __device__ (line 29) | __device__ T bilinear_interpolate(const T* input, const int height,
function __device__ (line 73) | __device__ void bilinear_interpolate_gradient(
FILE: mmcv/ops/csrc/common/mlu/common_mlu_helper.hpp
function __mlu_func__ (line 39) | __mlu_func__ inline scalar_t min(scalar_t a, scalar_t b) {
function __mlu_func__ (line 44) | __mlu_func__ inline scalar_t max(scalar_t a, scalar_t b) {
function __mlu_func__ (line 64) | __mlu_func__ void convertInt2Float(float *dst, float *dst_addition, int ...
function __mlu_func__ (line 140) | __mlu_func__ void convertFloat2Int(int *dst, float *dst_addition, float ...
function __mlu_func__ (line 214) | __mlu_func__ inline void convertFloat2half(half *dst, float *src,
function __mlu_func__ (line 235) | __mlu_func__ void recursiveSumPool(T *dst, int low_dim, int high_dim,
FILE: mmcv/ops/csrc/common/mps/MPSDevice.h
type id (line 15) | typedef id<MTLDevice> MTLDevice_t;
function namespace (line 23) | namespace at {
FILE: mmcv/ops/csrc/common/mps/MPSLibrary.h
type id (line 12) | typedef id<MTLComputePipelineState> MTLComputePipelineState_t;
type id (line 13) | typedef id<MTLLibrary> MTLLibrary_t;
function class (line 21) | class MPSLibrary {
function class (line 38) | class MPSLibraryManager {
FILE: mmcv/ops/csrc/common/mps/MPSStream.h
type id (line 21) | typedef id<MTLCommandQueue> MTLCommandQueue_t;
type id (line 22) | typedef id<MTLCommandBuffer> MTLCommandBuffer_t;
type id (line 23) | typedef id<MTLSharedEvent> MTLSharedEvent_t;
type id (line 24) | typedef id<MTLDevice> MTLDevice_t;
function namespace (line 36) | namespace at {
FILE: mmcv/ops/csrc/common/mps/MPSUtils.h
type id (line 9) | typedef id<MTLBuffer> MTLBuffer_t;
type id (line 10) | typedef id<MTLComputeCommandEncoder> MTLComputeCommandEncoder_t;
function MTLBuffer_t (line 19) | static inline MTLBuffer_t getMTLBufferStorage(const at::Tensor& tensor) {
function setMTLArgsImpl (line 38) | inline void setMTLArgsImpl(MTLComputeCommandEncoder_t, int) {}
FILE: mmcv/ops/csrc/common/musa/common_musa_helper.hpp
function GET_BLOCKS (line 22) | inline int GET_BLOCKS(const int N, const int num_threads = THREADS_PER_B...
function __device__ (line 29) | __device__ T bilinear_interpolate(const T* input, const int height,
function __device__ (line 73) | __device__ void bilinear_interpolate_gradient(
FILE: mmcv/ops/csrc/common/parrots_cuda_helper.hpp
function __device__ (line 65) | static __inline__ __device__ double atomicAdd(double* address, double va...
function __device__ (line 79) | static __inline__ __device__ float16 atomicAdd(float16* address, float16...
FILE: mmcv/ops/csrc/common/pytorch_device_registry.hpp
function GetDeviceStr (line 19) | inline std::string GetDeviceStr(const at::Device& device) {
class DeviceRegistry (line 30) | class DeviceRegistry
class DeviceRegistry<Ret (*)(Args...), f> (line 33) | class DeviceRegistry<Ret (*)(Args...), f> {
method Register (line 39) | void Register(at::DeviceType device, FunctionType function) {
method FunctionType (line 43) | FunctionType Find(at::DeviceType device) const {
method DeviceRegistry (line 47) | static DeviceRegistry& instance() {
method DeviceRegistry (line 53) | DeviceRegistry() {
function GetFirstTensorDevice (line 66) | at::Device GetFirstTensorDevice(T&& t, Args&&... args) {
function GetFirstTensorDevice (line 72) | at::Device GetFirstTensorDevice(T&& t, Args&&... args) {
function CheckDeviceConsistency (line 78) | inline std::pair<int, at::Device> CheckDeviceConsistency(
function CheckDeviceConsistency (line 93) | std::pair<int, at::Device> CheckDeviceConsistency(const at::Device& device,
function CheckDeviceConsistency (line 107) | std::pair<int, at::Device> CheckDeviceConsistency(const at::Device& device,
function Dispatch (line 116) | auto Dispatch(const R& registry, const char* name, Args&&... args) {
FILE: mmcv/ops/csrc/common/pytorch_mlu_helper.hpp
function getJobLimitCapability (line 28) | inline int32_t getJobLimitCapability() {
function getCoreNumOfJobLimitCapability (line 39) | inline int32_t getCoreNumOfJobLimitCapability() {
FILE: mmcv/ops/csrc/common/pytorch_npu_util.hpp
type aclOpExecutor (line 44) | struct aclOpExecutor
type aclTensor (line 45) | struct aclTensor
type aclScalar (line 46) | struct aclScalar
type aclIntArray (line 47) | struct aclIntArray
type aclFloatArray (line 48) | struct aclFloatArray
type aclBoolArray (line 49) | struct aclBoolArray
type aclTensorList (line 50) | struct aclTensorList
function ConvertTensorToScalar (line 161) | inline c10::Scalar ConvertTensorToScalar(const at::Tensor &tensor) {
function CopyTensorHostToDevice (line 204) | inline at::Tensor CopyTensorHostToDevice(const at::Tensor &cpu_tensor) {
function CopyScalarToDevice (line 211) | inline at::Tensor CopyScalarToDevice(const c10::Scalar &cpu_scalar,
function aclTensor (line 217) | inline aclTensor *ConvertType(const at::Tensor &at_tensor) {
function aclScalar (line 277) | inline aclScalar *ConvertType(const at::Scalar &at_scalar) {
function aclIntArray (line 318) | inline aclIntArray *ConvertType(const at::IntArrayRef &at_array) {
function aclBoolArray (line 328) | inline aclBoolArray *ConvertType(const std::array<bool, N> &value) {
function aclBoolArray (line 338) | inline aclBoolArray *ConvertType(const at::ArrayRef<bool> &value) {
function aclTensorList (line 348) | inline aclTensorList *ConvertType(const at::TensorList &at_tensor_list) {
function aclTensor (line 363) | inline aclTensor *ConvertType(const c10::optional<at::Tensor> &opt_tenso...
function aclIntArray (line 370) | inline aclIntArray *ConvertType(
function aclScalar (line 378) | inline aclScalar *ConvertType(const c10::optional<at::Scalar> &opt_scala...
function aclDataType (line 385) | inline aclDataType ConvertType(const at::ScalarType scalarType) {
function T (line 390) | T ConvertType(T value) {
function ConvertToOpApiFunc (line 395) | auto ConvertToOpApiFunc(const Tuple ¶ms, void *opApiAddr,
function ConvertToOpApiFunc (line 404) | auto ConvertToOpApiFunc(const Tuple ¶ms, void *opApiAddr) {
function Release (line 410) | inline void Release(aclTensor *p) {
function Release (line 418) | inline void Release(aclScalar *p) {
function Release (line 426) | inline void Release(aclIntArray *p) {
function Release (line 435) | inline void Release(aclBoolArray *p) {
function Release (line 444) | inline void Release(aclTensorList *p) {
function Release (line 455) | void Release(T value) {
function CallRelease (line 460) | void CallRelease(Tuple t, std::index_sequence<I...>) {
function ReleaseConvertTypes (line 465) | void ReleaseConvertTypes(Tuple &t) {
function ConvertTypes (line 471) | constexpr auto ConvertTypes(Ts &...args) {
function call (line 476) | auto call(Function f, Tuple t, std::index_sequence<I...>) {
function call (line 481) | auto call(Function f, Tuple t) {
function AddParamToBuf (line 487) | void AddParamToBuf(const std::array<bool, N> &value) {
function AddParamToBuf (line 492) | void AddParamToBuf(const T &value) {
function AddParamToBuf (line 509) | void AddParamToBuf(const T &arg, Args &...args) {
FILE: mmcv/ops/csrc/common/utils/spconv/paramsgrid.h
function namespace (line 20) | namespace detail {
FILE: mmcv/ops/csrc/common/utils/spconv/prettyprint.h
function namespace (line 25) | namespace pretty_print {
type custom_delims_base (line 385) | struct custom_delims_base {
type T (line 429) | typedef const T *const_iterator;
type T (line 430) | typedef T value_type;
type typename (line 447) | typedef typename T::const_local_iterator const_iterator;
type typename (line 448) | typedef typename T::size_type size_type;
function namespace (line 480) | namespace std {
FILE: mmcv/ops/csrc/common/utils/spconv/spconv/geometry.h
function Index (line 24) | Index getValidOutPos(const Index *input_pos,
function Index (line 87) | Index getValidOutPosTranspose(
FILE: mmcv/ops/csrc/common/utils/spconv/spconv/indice.h
function namespace (line 19) | namespace functor {
FILE: mmcv/ops/csrc/common/utils/spconv/spconv/maxpool.h
function namespace (line 19) | namespace functor {
FILE: mmcv/ops/csrc/common/utils/spconv/spconv/mp_helper.h
function namespace (line 12) | namespace detail {
function namespace (line 26) | namespace detail {
FILE: mmcv/ops/csrc/common/utils/spconv/spconv/reordering.h
function namespace (line 19) | namespace functor {
FILE: mmcv/ops/csrc/common/utils/spconv/tensorview/helper_launch.h
function namespace (line 4) | namespace tv {
FILE: mmcv/ops/csrc/common/utils/spconv/tensorview/tensorview.h
function namespace (line 28) | namespace tv {
type CPU (line 115) | struct CPU {}
type size_type (line 176) | typedef size_t size_type;
function class (line 178) | class iterator {
function rowArrayIdx (line 390) | unsigned rowArrayIdx(std::vector<int> &shape,
function rowArrayIdx (line 406) | TV_HOST_DEVICE_INLINE unsigned rowArrayIdx(std::vector<int> &shape,
function rowArrayIdx (line 418) | unsigned rowArrayIdx(const Shape &shape,
function rowArrayIdx (line 431) | TV_HOST_DEVICE_INLINE unsigned rowArrayIdx(const Shape &shape,
function rowArrayIdx (line 443) | unsigned rowArrayIdx(const Index *indexes,
function Index (line 456) | Index rowArrayIdxInv(Index index, Index *output,
function TV_HOST_DEVICE_INLINE (line 469) | TV_HOST_DEVICE_INLINE static unsigned run(const Shape &shape,
type ArrayIndexRowMajor (line 477) | struct ArrayIndexRowMajor
function TV_HOST_DEVICE_INLINE (line 478) | TV_HOST_DEVICE_INLINE static unsigned run(const Shape &shape,
function namespace (line 484) | namespace detail {
function TV_HOST_DEVICE_INLINE (line 515) | TV_HOST_DEVICE_INLINE TensorView() {}
function explicit (line 516) | explicit TV_HOST_DEVICE_INLINE TensorView(scalar_t *ptr, Shape shape)
function TV_HOST_DEVICE_INLINE (line 519) | TV_HOST_DEVICE_INLINE TensorView(scalar_t *ptr, Integers... shapes)
function TV_HOST_DEVICE_INLINE (line 574) | TV_HOST_DEVICE_INLINE scalar_t &operator()() {
function TV_HOST_DEVICE_INLINE (line 814) | TV_HOST_DEVICE_INLINE scalar_t &operator[](int idx) {
function TV_HOST_DEVICE_INLINE (line 835) | TV_HOST_DEVICE_INLINE scalar_t *data() { return mPtr; }
function TV_HOST_DEVICE_INLINE (line 836) | TV_HOST_DEVICE_INLINE const scalar_t *data() const { return mPtr; }
function TV_HOST_DEVICE_INLINE (line 838) | TV_HOST_DEVICE_INLINE int dim(int idx) const { return mShape[idx]; }
function Shape (line 842) | Shape shapes{int(newShapes)...};
function Shape (line 855) | Shape shapes{int(newShapes)...};
function Shape (line 887) | Shape new_shape{to_slice(slices)[0]...};
function Slice (line 1021) | Slice to_slice(T1 s) const {
function TV_HOST_DEVICE_INLINE (line 1025) | TV_HOST_DEVICE_INLINE Slice to_slice(Slice s) const { return Slice(s); }
function namespace (line 1043) | namespace detail {
function printTensorView (line 1073) | void printTensorView(const TensorView<scalar_t> tensor,
function printTensorView (line 1120) | void printTensorView(const scalar_t *ptr, Shape shape) {
function printTensorView (line 1126) | void printTensorView(const scalar_t *ptr, Shape shape,
FILE: mmcv/ops/csrc/parrots/active_rotated_filter.cpp
function active_rotated_filter_forward_impl (line 8) | void active_rotated_filter_forward_impl(const Tensor input,
function active_rotated_filter_backward_impl (line 14) | void active_rotated_filter_backward_impl(const Tensor grad_out,
function active_rotated_filter_forward (line 20) | void active_rotated_filter_forward(const Tensor input, const Tensor indi...
function active_rotated_filter_backward (line 25) | void active_rotated_filter_backward(const Tensor grad_out, const Tensor ...
FILE: mmcv/ops/csrc/parrots/active_rotated_filter_parrots.cpp
function active_rotated_filter_forward_cuda_parrots (line 10) | void active_rotated_filter_forward_cuda_parrots(
function active_rotated_filter_backward_cuda_parrots (line 19) | void active_rotated_filter_backward_cuda_parrots(
function active_rotated_filter_forward_cpu_parrots (line 29) | void active_rotated_filter_forward_cpu_parrots(
function active_rotated_filter_backward_cpu_parrots (line 38) | void active_rotated_filter_backward_cpu_parrots(
FILE: mmcv/ops/csrc/parrots/assign_score_withk.cpp
function assign_score_withk_forward_impl (line 6) | void assign_score_withk_forward_impl(int B, int N0, int N1, int M, int K...
function assign_score_withk_backward_impl (line 15) | void assign_score_withk_backward_impl(
function assign_score_withk_forward (line 25) | void assign_score_withk_forward(const Tensor& points, const Tensor& cent...
function assign_score_withk_backward (line 33) | void assign_score_withk_backward(const Tensor& grad_out, const Tensor& p...
FILE: mmcv/ops/csrc/parrots/assign_score_withk_parrots.cpp
function assign_score_withk_forward_cuda_parrots (line 11) | void assign_score_withk_forward_cuda_parrots(CudaContext& ctx,
function assign_score_withk_backward_cuda_parrots (line 36) | void assign_score_withk_backward_cuda_parrots(
FILE: mmcv/ops/csrc/parrots/ball_query._parrots.cpp
function ball_query_parrots (line 11) | void ball_query_parrots(CudaContext& ctx, const SSElement& attr,
FILE: mmcv/ops/csrc/parrots/ball_query.cpp
function ball_query_forward_impl (line 7) | void ball_query_forward_impl(int b, int n, int m, float min_radius,
function ball_query_forward (line 15) | void ball_query_forward(Tensor new_xyz_tensor, Tensor xyz_tensor,
FILE: mmcv/ops/csrc/parrots/bbox_overlaps.cpp
function bbox_overlaps_impl (line 5) | void bbox_overlaps_impl(const Tensor bboxes1, const Tensor bboxes2, Tens...
function bbox_overlaps (line 11) | void bbox_overlaps(const Tensor bboxes1, const Tensor bboxes2, Tensor ious,
FILE: mmcv/ops/csrc/parrots/bbox_overlaps_parrots.cpp
function bbox_overlaps_parrots (line 15) | void bbox_overlaps_parrots(CudaContext& ctx, const SSElement& attr,
FILE: mmcv/ops/csrc/parrots/border_align.cpp
function border_align_forward_impl (line 5) | void border_align_forward_impl(const Tensor &input, const Tensor &boxes,
function border_align_backward_impl (line 12) | void border_align_backward_impl(const Tensor &grad_output, const Tensor ...
function border_align_forward (line 19) | void border_align_forward(const Tensor &input, const Tensor &boxes,
function border_align_backward (line 25) | void border_align_backward(const Tensor &grad_output, const Tensor &boxes,
FILE: mmcv/ops/csrc/parrots/border_align_parrots.cpp
function border_align_forward_cuda_parrots (line 11) | void border_align_forward_cuda_parrots(CudaContext& ctx, const SSElement...
function border_align_backward_cuda_parrots (line 25) | void border_align_backward_cuda_parrots(CudaContext& ctx, const SSElemen...
FILE: mmcv/ops/csrc/parrots/box_iou_rotated.cpp
function box_iou_rotated_impl (line 7) | void box_iou_rotated_impl(const Tensor boxes1, const Tensor boxes2, Tens...
function box_iou_rotated (line 16) | void box_iou_rotated(const Tensor boxes1, const Tensor boxes2, Tensor ious,
FILE: mmcv/ops/csrc/parrots/box_iou_rotated_parrots.cpp
function box_iou_rotated_cpu_parrots (line 14) | void box_iou_rotated_cpu_parrots(HostContext& ctx, const SSElement& attr,
function box_iou_rotated_cuda_parrots (line 35) | void box_iou_rotated_cuda_parrots(CudaContext& ctx, const SSElement& attr,
FILE: mmcv/ops/csrc/parrots/carafe.cpp
function carafe_forward_impl (line 5) | void carafe_forward_impl(Tensor features, Tensor masks, Tensor rfeatures,
function carafe_backward_impl (line 12) | void carafe_backward_impl(Tensor top_grad, Tensor rfeatures, Tensor masks,
function carafe_forward (line 23) | void carafe_forward(Tensor features, Tensor masks, Tensor rfeatures,
function carafe_backward (line 30) | void carafe_backward(Tensor top_grad, Tensor rfeatures, Tensor masks,
FILE: mmcv/ops/csrc/parrots/carafe_naive.cpp
function carafe_naive_forward_impl (line 5) | void carafe_naive_forward_impl(Tensor features, Tensor masks, Tensor out...
function carafe_naive_backward_impl (line 12) | void carafe_naive_backward_impl(Tensor top_grad, Tensor features, Tensor...
function carafe_naive_forward (line 21) | void carafe_naive_forward(Tensor features, Tensor masks, Tensor output,
function carafe_naive_backward (line 27) | void carafe_naive_backward(Tensor top_grad, Tensor features, Tensor masks,
FILE: mmcv/ops/csrc/parrots/carafe_naive_parrots.cpp
function carafe_naive_forward_cuda_parrots (line 15) | void carafe_naive_forward_cuda_parrots(CudaContext& ctx, const SSElement...
function carafe_naive_backward_cuda_parrots (line 37) | void carafe_naive_backward_cuda_parrots(CudaContext& ctx, const SSElemen...
FILE: mmcv/ops/csrc/parrots/carafe_parrots.cpp
function carafe_forward_cuda_parrots (line 16) | void carafe_forward_cuda_parrots(CudaContext& ctx, const SSElement& attr,
function carafe_backward_cuda_parrots (line 45) | void carafe_backward_cuda_parrots(CudaContext& ctx, const SSElement& attr,
FILE: mmcv/ops/csrc/parrots/chamfer_distance.cpp
function chamfer_distance_forward_impl (line 8) | void chamfer_distance_forward_impl(const Tensor xyz1, const Tensor xyz2,
function chamfer_distance_backward_impl (line 15) | void chamfer_distance_backward_impl(const Tensor xyz1, const Tensor xyz2,
function chamfer_distance_forward (line 23) | void chamfer_distance_forward(const Tensor xyz1, const Tensor xyz2,
function chamfer_distance_backward (line 29) | void chamfer_distance_backward(const Tensor xyz1, const Tensor xyz2,
FILE: mmcv/ops/csrc/parrots/chamfer_distance_parrots.cpp
function chamfer_distance_forward_cuda_parrots (line 10) | void chamfer_distance_forward_cuda_parrots(CudaContext& ctx,
function chamfer_distance_backward_cuda_parrots (line 23) | void chamfer_distance_backward_cuda_parrots(CudaContext& ctx,
FILE: mmcv/ops/csrc/parrots/contour_expand.cpp
class Point2d (line 10) | class Point2d {
method Point2d (line 15) | Point2d() : x(0), y(0) {}
method Point2d (line 16) | Point2d(int _x, int _y) : x(_x), y(_y) {}
function kernel_dilate (line 19) | void kernel_dilate(const uint8_t *data, IntArrayRef data_shape,
function contour_expand (line 89) | std::vector<std::vector<int>> contour_expand(Tensor kernel_mask,
FILE: mmcv/ops/csrc/parrots/contour_expand_parrots.cpp
function contour_expand_parrots (line 12) | void contour_expand_parrots(T& ctx, const SSElement& attr,
FILE: mmcv/ops/csrc/parrots/convex_iou.cpp
function convex_iou_impl (line 7) | void convex_iou_impl(const Tensor pointsets, const Tensor polygons,
function convex_iou (line 12) | void convex_iou(const Tensor pointsets, const Tensor polygons, Tensor io...
function convex_giou_impl (line 16) | void convex_giou_impl(const Tensor pointsets, const Tensor polygons,
function convex_giou (line 21) | void convex_giou(const Tensor pointsets, const Tensor polygons, Tensor o...
FILE: mmcv/ops/csrc/parrots/convex_iou_parrots.cpp
function convex_iou_forward_cuda_parrots (line 10) | void convex_iou_forward_cuda_parrots(CudaContext& ctx, const SSElement& ...
function convex_giou_forward_cuda_parrots (line 19) | void convex_giou_forward_cuda_parrots(CudaContext& ctx, const SSElement&...
FILE: mmcv/ops/csrc/parrots/correlation.cpp
function correlation_forward_impl (line 7) | void correlation_forward_impl(Tensor input1, Tensor input2, Tensor output,
function correlation_backward_impl (line 17) | void correlation_backward_impl(Tensor grad_output, Tensor input1, Tensor...
function correlation_forward (line 29) | void correlation_forward(Tensor input1, Tensor input2, Tensor output, in...
function correlation_backward (line 38) | void correlation_backward(Tensor grad_output, Tensor input1, Tensor input2,
FILE: mmcv/ops/csrc/parrots/correlation_parrots.cpp
function correlation_forward_cuda_parrots (line 11) | void correlation_forward_cuda_parrots(CudaContext& ctx, const SSElement&...
function correlation_backward_cuda_parrots (line 41) | void correlation_backward_cuda_parrots(CudaContext& ctx, const SSElement...
function correlation_forward_cpu_parrots (line 74) | void correlation_forward_cpu_parrots(HostContext& ctx, const SSElement& ...
function correlation_backward_cpu_parrots (line 104) | void correlation_backward_cpu_parrots(HostContext& ctx, const SSElement&...
FILE: mmcv/ops/csrc/parrots/cudabind.cpp
function assign_score_withk_forward_cuda (line 15) | void assign_score_withk_forward_cuda(int B, int N0, int N1, int M, int K...
function assign_score_withk_backward_cuda (line 24) | void assign_score_withk_backward_cuda(
function ball_query_forward_cuda (line 56) | void ball_query_forward_cuda(int b, int n, int m, float min_radius,
function bbox_overlaps_cuda (line 74) | void bbox_overlaps_cuda(const Tensor bboxes1, const Tensor bboxes2, Tens...
function border_align_forward_cuda (line 94) | void border_align_forward_cuda(const Tensor& input, const Tensor& boxes,
function border_align_backward_cuda (line 101) | void border_align_backward_cuda(const Tensor& grad_output, const Tensor&...
function carafe_forward_cuda (line 141) | void carafe_forward_cuda(Tensor features, Tensor masks, Tensor rfeatures,
function carafe_backward_cuda (line 149) | void carafe_backward_cuda(Tensor top_grad, Tensor rfeatures, Tensor masks,
function carafe_naive_forward_cuda (line 184) | void carafe_naive_forward_cuda(Tensor features, Tensor masks, Tensor out...
function carafe_naive_backward_cuda (line 191) | void carafe_naive_backward_cuda(Tensor top_grad, Tensor features, Tensor...
function correlation_forward_cuda (line 228) | void correlation_forward_cuda(Tensor input1, Tensor input2, Tensor output,
function correlation_backward_cuda (line 238) | void correlation_backward_cuda(Tensor grad_output, Tensor input1, Tensor...
function deform_roi_pool_forward_cuda (line 333) | void deform_roi_pool_forward_cuda(Tensor input, Tensor rois, Tensor offset,
function deform_roi_pool_backward_cuda (line 342) | void deform_roi_pool_backward_cuda(Tensor grad_output, Tensor input,
function sigmoid_focal_loss_forward_cuda (line 392) | void sigmoid_focal_loss_forward_cuda(Tensor input, Tensor target, Tensor...
function sigmoid_focal_loss_backward_cuda (line 398) | void sigmoid_focal_loss_backward_cuda(Tensor input, Tensor target,
function softmax_focal_loss_forward_cuda (line 405) | void softmax_focal_loss_forward_cuda(Tensor input, Tensor target, Tensor...
function softmax_focal_loss_backward_cuda (line 411) | void softmax_focal_loss_backward_cuda(Tensor input, Tensor target,
function furthest_point_sampling_forward_cuda (line 450) | void furthest_point_sampling_forward_cuda(Tensor points_tensor,
function furthest_point_sampling_with_dist_forward_cuda (line 459) | void furthest_point_sampling_with_dist_forward_cuda(Tensor points_tensor,
function gather_points_forward_cuda (line 505) | void gather_points_forward_cuda(int b, int c, int n, int npoints,
function gather_points_backward_cuda (line 511) | void gather_points_backward_cuda(int b, int c, int n, int npoints,
function group_points_forward_cuda (line 540) | void group_points_forward_cuda(int b, int c, int n, int npoints, int nsa...
function group_points_backward_cuda (line 547) | void group_points_backward_cuda(int b, int c, int n, int npoints, int ns...
function knn_forward_cuda (line 571) | void knn_forward_cuda(int b, int n, int m, int nsample, const Tensor xyz,
function masked_im2col_forward_cuda (line 593) | void masked_im2col_forward_cuda(const Tensor im, const Tensor mask_h_idx,
function masked_col2im_forward_cuda (line 603) | void masked_col2im_forward_cuda(const Tensor col, const Tensor mask_h_idx,
function Tensor (line 717) | Tensor nms_cuda(Tensor boxes, Tensor scores, float iou_threshold, int of...
function points_in_boxes_part_forward_cuda (line 734) | void points_in_boxes_part_forward_cuda(int batch_size, int boxes_num,
function points_in_boxes_all_forward_cuda (line 742) | void points_in_boxes_all_forward_cuda(int batch_size, int boxes_num,
function psamask_forward_cuda (line 776) | void psamask_forward_cuda(const int psa_type, const Tensor input, Tensor...
function psamask_backward_cuda (line 786) | void psamask_backward_cuda(const int psa_type, const Tensor grad_output,
function roi_align_forward_cuda (line 823) | void roi_align_forward_cuda(Tensor input, Tensor rois, Tensor output,
function roi_align_backward_cuda (line 833) | void roi_align_backward_cuda(Tensor grad_output, Tensor rois, Tensor arg...
function roi_align_rotated_forward_cuda (line 870) | void roi_align_rotated_forward_cuda(Tensor input, Tensor rois, Tensor ou...
function roi_align_rotated_backward_cuda (line 891) | void roi_align_rotated_backward_cuda(Tensor top_grad, Tensor rois,
function riroi_align_rotated_forward_cuda (line 941) | void riroi_align_rotated_forward_cuda(Tensor features, Tensor rois,
function riroi_align_rotated_backward_cuda (line 963) | void riroi_align_rotated_backward_cuda(Tensor top_grad, Tensor rois,
function roiaware_pool3d_forward_cuda (line 1013) | void roiaware_pool3d_forward_cuda(int boxes_num, int pts_num, int channels,
function roiaware_pool3d_backward_cuda (line 1025) | void roiaware_pool3d_backward_cuda(int boxes_num, int out_x, int out_y,
function roipoint_pool3d_forward_cuda (line 1060) | void roipoint_pool3d_forward_cuda(int batch_size, int pts_num, int boxes...
function roi_pool_forward_cuda (line 1089) | void roi_pool_forward_cuda(Tensor input, Tensor rois, Tensor output,
function roi_pool_backward_cuda (line 1096) | void roi_pool_backward_cuda(Tensor grad_output, Tensor rois, Tensor argmax,
function dynamic_point_to_voxel_forward_cuda (line 1124) | std::vector<torch::Tensor> dynamic_point_to_voxel_forward_cuda(
function dynamic_point_to_voxel_backward_cuda (line 1131) | void dynamic_point_to_voxel_backward_cuda(
function sync_bn_forward_mean_cuda (line 1179) | void sync_bn_forward_mean_cuda(const Tensor input, Tensor mean) {
function sync_bn_forward_var_cuda (line 1183) | void sync_bn_forward_var_cuda(const Tensor input, const Tensor mean,
function sync_bn_forward_output_cuda (line 1188) | void sync_bn_forward_output_cuda(const Tensor input, const Tensor mean,
function sync_bn_backward_param_cuda (line 1199) | void sync_bn_backward_param_cuda(const Tensor grad_output, const Tensor ...
function sync_bn_backward_data_cuda (line 1205) | void sync_bn_backward_data_cuda(const Tensor grad_output, const Tensor w...
function three_interpolate_forward_cuda (line 1254) | void three_interpolate_forward_cuda(int b, int c, int m, int n,
function three_interpolate_backward_cuda (line 1261) | void three_interpolate_backward_cuda(int b, int c, int n, int m,
function three_nn_forward_cuda (line 1284) | void three_nn_forward_cuda(int b, int n, int m, const Tensor unknown,
function tin_shift_forward_cuda (line 1299) | void tin_shift_forward_cuda(Tensor input, Tensor shift, Tensor output) {
function tin_shift_backward_cuda (line 1303) | void tin_shift_backward_cuda(Tensor grad_output, Tensor shift,
function hard_voxelize_forward_cuda (line 1342) | int hard_voxelize_forward_cuda(const at::Tensor& points, at::Tensor& vox...
function nondeterministic_hard_voxelize_forward_cuda (line 1354) | int nondeterministic_hard_voxelize_forward_cuda(
function dynamic_voxelize_forward_cuda (line 1364) | void dynamic_voxelize_forward_cuda(const at::Tensor& points, at::Tensor&...
function rotated_feature_align_forward_cuda (line 1410) | void rotated_feature_align_forward_cuda(const Tensor features,
function rotated_feature_align_backward_cuda (line 1418) | void rotated_feature_align_backward_cuda(const Tensor top_grad,
function points_in_polygons_forward_cuda (line 1446) | void points_in_polygons_forward_cuda(const Tensor points, const Tensor p...
function min_area_polygons_cuda (line 1462) | void min_area_polygons_cuda(const Tensor pointsets, Tensor polygons) {
function active_rotated_filter_forward_cuda (line 1478) | void active_rotated_filter_forward_cuda(const Tensor input,
function active_rotated_filter_backward_cuda (line 1483) | void active_rotated_filter_backward_cuda(const Tensor grad_out,
function convex_iou_cuda (line 1505) | void convex_iou_cuda(const Tensor pointsets, const Tensor polygons,
function convex_giou_cuda (line 1510) | void convex_giou_cuda(const Tensor pointsets, const Tensor polygons,
function Tensor (line 1528) | Tensor diff_iou_rotated_sort_vertices_forward_cuda(Tensor vertices, Tens...
function chamfer_distance_forward_cuda (line 1548) | void chamfer_distance_forward_cuda(const Tensor xyz1, const Tensor xyz2,
function chamfer_distance_backward_cuda (line 1555) | void chamfer_distance_backward_cuda(const Tensor xyz1, const Tensor xyz2,
function prroi_pool_forward_cuda (line 1589) | void prroi_pool_forward_cuda(Tensor input, Tensor rois, Tensor output,
function prroi_pool_backward_cuda (line 1596) | void prroi_pool_backward_cuda(Tensor grad_output, Tensor rois,
function prroi_pool_coor_backward_cuda (line 1604) | void prroi_pool_coor_backward_cuda(Tensor output, Tensor grad_output,
FILE: mmcv/ops/csrc/parrots/deform_conv.cpp
function deformable_im2col_impl (line 5) | void deformable_im2col_impl(Tensor data_im, Tensor data_offset,
function deformable_col2im_impl (line 19) | void deformable_col2im_impl(Tensor data_col, Tensor data_offset,
function deformable_col2im_coord_impl (line 33) | void deformable_col2im_coord_impl(
function deform_conv_shape_check (line 45) | void deform_conv_shape_check(at::Tensor input, at::Tensor offset,
function deform_conv_forward (line 140) | void deform_conv_forward(Tensor input, Tensor weight, Tensor offset,
function deform_conv_backward_input (line 260) | void deform_conv_backward_input(Tensor input, Tensor offset, Tensor grad...
function deform_conv_backward_parameters (line 392) | void deform_conv_backward_parameters(Tensor input, Tensor offset,
FILE: mmcv/ops/csrc/parrots/deform_conv_parrots.cpp
function deform_conv_forward_cuda_parrots (line 11) | void deform_conv_forward_cuda_parrots(CudaContext& ctx, const SSElement&...
function deform_conv_backward_input_cuda_parrots (line 43) | void deform_conv_backward_input_cuda_parrots(CudaContext& ctx,
function deform_conv_backward_parameters_cuda_parrots (line 78) | void deform_conv_backward_parameters_cuda_parrots(
function deform_conv_forward_cpu_parrots (line 113) | void deform_conv_forward_cpu_parrots(HostContext& ctx, const SSElement& ...
function deform_conv_backward_input_cpu_parrots (line 145) | void deform_conv_backward_input_cpu_parrots(HostContext& ctx,
function deform_conv_backward_parameters_cpu_parrots (line 180) | void deform_conv_backward_parameters_cpu_parrots(
FILE: mmcv/ops/csrc/parrots/deform_roi_pool.cpp
function deform_roi_pool_forward_impl (line 5) | void deform_roi_pool_forward_impl(Tensor input, Tensor rois, Tensor offset,
function deform_roi_pool_backward_impl (line 14) | void deform_roi_pool_backward_impl(Tensor grad_output, Tensor input,
function deform_roi_pool_forward (line 25) | void deform_roi_pool_forward(Tensor input, Tensor rois, Tensor offset,
function deform_roi_pool_backward (line 34) | void deform_roi_pool_backward(Tensor grad_output, Tensor input, Tensor r...
FILE: mmcv/ops/csrc/parrots/deform_roi_pool_parrots.cpp
function deform_roi_pool_forward_cuda_parrots (line 16) | void deform_roi_pool_forward_cuda_parrots(CudaContext& ctx,
function deform_roi_pool_backward_cuda_parrots (line 50) | void deform_roi_pool_backward_cuda_parrots(CudaContext& ctx,
FILE: mmcv/ops/csrc/parrots/diff_iou_rotated.cpp
function Tensor (line 5) | Tensor diff_iou_rotated_sort_vertices_forward_impl(Tensor vertices, Tens...
function Tensor (line 11) | Tensor diff_iou_rotated_sort_vertices_forward(Tensor vertices, Tensor mask,
FILE: mmcv/ops/csrc/parrots/diff_iou_rotated_parrots.cpp
function diff_iou_rotated_sort_vertices_forward_cuda_parrots (line 11) | void diff_iou_rotated_sort_vertices_forward_cuda_parrots(
FILE: mmcv/ops/csrc/parrots/focal_loss.cpp
function sigmoid_focal_loss_forward_impl (line 5) | void sigmoid_focal_loss_forward_impl(Tensor input, Tensor target, Tensor...
function sigmoid_focal_loss_backward_impl (line 11) | void sigmoid_focal_loss_backward_impl(Tensor input, Tensor target,
function softmax_focal_loss_forward_impl (line 18) | void softmax_focal_loss_forward_impl(Tensor input, Tensor target, Tensor...
function softmax_focal_loss_backward_impl (line 24) | void softmax_focal_loss_backward_impl(Tensor input, Tensor target,
function sigmoid_focal_loss_forward (line 32) | void sigmoid_focal_loss_forward(Tensor input, Tensor target, Tensor weight,
function sigmoid_focal_loss_backward (line 37) | void sigmoid_focal_loss_backward(Tensor input, Tensor target, Tensor wei...
function softmax_focal_loss_forward (line 43) | void softmax_focal_loss_forward(Tensor input, Tensor target, Tensor weight,
function softmax_focal_loss_backward (line 48) | void softmax_focal_loss_backward(Tensor input, Tensor target, Tensor wei...
FILE: mmcv/ops/csrc/parrots/focal_loss_parrots.cpp
function sigmoid_focal_loss_forward_cuda_parrots (line 11) | void sigmoid_focal_loss_forward_cuda_parrots(CudaContext& ctx,
function sigmoid_focal_loss_backward_cuda_parrots (line 29) | void sigmoid_focal_loss_backward_cuda_parrots(
function softmax_focal_loss_forward_cuda_parrots (line 47) | void softmax_focal_loss_forward_cuda_parrots(CudaContext& ctx,
function softmax_focal_loss_backward_cuda_parrots (line 64) | void softmax_focal_loss_backward_cuda_parrots(
FILE: mmcv/ops/csrc/parrots/furthest_point_sample.cpp
function furthest_point_sampling_forward_impl (line 7) | void furthest_point_sampling_forward_impl(Tensor points_tensor,
function furthest_point_sampling_with_dist_forward_impl (line 14) | void furthest_point_sampling_with_dist_forward_impl(Tensor points_tensor,
function furthest_point_sampling_forward (line 22) | void furthest_point_sampling_forward(Tensor points_tensor, Tensor temp_t...
function furthest_point_sampling_with_dist_forward (line 28) | void furthest_point_sampling_with_dist_forward(Tensor points_tensor,
FILE: mmcv/ops/csrc/parrots/furthest_point_sample_parrots.cpp
function furthest_point_sample_forward_cuda_parrots (line 11) | void furthest_point_sample_forward_cuda_parrots(
function furthest_point_sampling_with_dist_forward_cuda_parrots (line 26) | void furthest_point_sampling_with_dist_forward_cuda_parrots(
FILE: mmcv/ops/csrc/parrots/fused_bias_leakyrelu.cpp
function fused_bias_leakyrelu_op_impl (line 105) | torch::Tensor fused_bias_leakyrelu_op_impl(const torch::Tensor& input,
function fused_bias_leakyrelu (line 113) | torch::Tensor fused_bias_leakyrelu(const torch::Tensor& input,
FILE: mmcv/ops/csrc/parrots/fused_bias_parrots.cpp
function fused_bias_leakyrelu_parrots (line 15) | void fused_bias_leakyrelu_parrots(CudaContext &ctx, const SSElement &attr,
FILE: mmcv/ops/csrc/parrots/gather_points.cpp
function gather_points_forward_impl (line 4) | void gather_points_forward_impl(int b, int c, int n, int npoints,
function gather_points_backward_impl (line 11) | void gather_points_backward_impl(int b, int c, int n, int npoints,
function gather_points_forward (line 18) | void gather_points_forward(Tensor points_tensor, Tensor idx_tensor,
function gather_points_backward (line 25) | void gather_points_backward(Tensor grad_out_tensor, Tensor idx_tensor,
FILE: mmcv/ops/csrc/parrots/gather_points_parrots.cpp
function gather_points_forward_cuda_parrots (line 11) | void gather_points_forward_cuda_parrots(CudaContext& ctx, const SSElemen...
function gather_points_backward_cuda_parrots (line 31) | void gather_points_backward_cuda_parrots(CudaContext& ctx,
FILE: mmcv/ops/csrc/parrots/group_points.cpp
function group_points_forward_impl (line 8) | void group_points_forward_impl(int b, int c, int n, int npoints, int nsa...
function group_points_backward_impl (line 15) | void group_points_backward_impl(int b, int c, int n, int npoints, int ns...
function group_points_forward (line 22) | void group_points_forward(Tensor points_tensor, Tensor idx_tensor,
function group_points_backward (line 29) | void group_points_backward(Tensor grad_out_tensor, Tensor idx_tensor,
FILE: mmcv/ops/csrc/parrots/group_points_parrots.cpp
function group_points_forward_cuda_parrots (line 11) | void group_points_forward_cuda_parrots(CudaContext& ctx, const SSElement...
function group_points_backward_cuda_parrots (line 31) | void group_points_backward_cuda_parrots(CudaContext& ctx, const SSElemen...
FILE: mmcv/ops/csrc/parrots/info.cpp
function get_hiprt_version (line 9) | int get_hiprt_version() {
function get_cudart_version (line 16) | int get_cudart_version() { return CUDART_VERSION; }
function get_compiling_cuda_version (line 20) | std::string get_compiling_cuda_version() {
function get_compiler_version (line 46) | std::string get_compiler_version() {
FILE: mmcv/ops/csrc/parrots/iou3d.cpp
function iou3d_boxes_overlap_bev_forward_impl (line 15) | void iou3d_boxes_overlap_bev_forward_impl(const int num_a, const Tensor ...
function iou3d_nms3d_forward_impl (line 22) | void iou3d_nms3d_forward_impl(const Tensor boxes, Tensor &keep,
function iou3d_nms3d_normal_forward_impl (line 28) | void iou3d_nms3d_normal_forward_impl(const Tensor boxes, Tensor &keep,
function iou3d_boxes_overlap_bev_forward (line 35) | void iou3d_boxes_overlap_bev_forward(Tensor boxes_a, Tensor boxes_b,
function iou3d_nms3d_forward (line 47) | void iou3d_nms3d_forward(Tensor boxes, Tensor keep, Tensor keep_num,
function iou3d_nms3d_normal_forward (line 57) | void iou3d_nms3d_normal_forward(Tensor boxes, Tensor keep, Tensor keep_num,
FILE: mmcv/ops/csrc/parrots/iou3d_parrots.cpp
function iou3d_boxes_overlap_bev_forward_cuda_parrots (line 11) | void iou3d_boxes_overlap_bev_forward_cuda_parrots(
function iou3d_nms3d_forward_cuda_parrots (line 22) | void iou3d_nms3d_forward_cuda_parrots(CudaContext& ctx, const SSElement&...
function iou3d_nms3d_normal_forward_cuda_parrots (line 36) | void iou3d_nms3d_normal_forward_cuda_parrots(CudaContext& ctx,
FILE: mmcv/ops/csrc/parrots/knn.cpp
function knn_forward_impl (line 7) | void knn_forward_impl(int b, int n, int m, int nsample, const Tensor xyz,
function knn_forward (line 13) | void knn_forward(Tensor xyz_tensor, Tensor new_xyz_tensor, Tensor idx_te...
FILE: mmcv/ops/csrc/parrots/knn_parrots.cpp
function knn_forward_cuda_parrots (line 11) | void knn_forward_cuda_parrots(CudaContext& ctx, const SSElement& attr,
FILE: mmcv/ops/csrc/parrots/masked_conv2d.cpp
function masked_im2col_forward_impl (line 5) | void masked_im2col_forward_impl(const Tensor im, const Tensor mask_h_idx,
function masked_col2im_forward_impl (line 13) | void masked_col2im_forward_impl(const Tensor col, const Tensor mask_h_idx,
function masked_im2col_forward (line 20) | void masked_im2col_forward(const Tensor im, const Tensor mask_h_idx,
function masked_col2im_forward (line 28) | void masked_col2im_forward(const Tensor col, const Tensor mask_h_idx,
FILE: mmcv/ops/csrc/parrots/masked_conv2d_parrots.cpp
function masked_im2col_forward_cuda_parrots (line 11) | void masked_im2col_forward_cuda_parrots(CudaContext& ctx, const SSElemen...
function masked_col2im_forward_cuda_parrots (line 33) | void masked_col2im_forward_cuda_parrots(CudaContext& ctx, const SSElemen...
FILE: mmcv/ops/csrc/parrots/min_area_polygons.cpp
function min_area_polygons_impl (line 5) | void min_area_polygons_impl(const Tensor pointsets, Tensor polygons) {
function min_area_polygons (line 9) | void min_area_polygons(const Tensor pointsets, Tensor polygons) {
FILE: mmcv/ops/csrc/parrots/min_area_polygons_parrots.cpp
function min_area_polygons_cuda_parrots (line 11) | void min_area_polygons_cuda_parrots(CudaContext& ctx, const SSElement& a...
FILE: mmcv/ops/csrc/parrots/modulated_deform_conv.cpp
function modulated_deformable_im2col_impl (line 5) | void modulated_deformable_im2col_impl(
function modulated_deformable_col2im_impl (line 19) | void modulated_deformable_col2im_impl(
function modulated_deformable_col2im_coord_impl (line 33) | void modulated_deformable_col2im_coord_impl(
function modulated_deform_conv_forward (line 48) | void modulated_deform_conv_forward(
function modulated_deform_conv_backward (line 126) | void modulated_deform_conv_backward(
FILE: mmcv/ops/csrc/parrots/modulated_deform_conv_parrots.cpp
function modulated_deform_conv_forward_cuda_parrots (line 11) | void modulated_deform_conv_forward_cuda_parrots(
function modulated_deform_conv_backward_cuda_parrots (line 46) | void modulated_deform_conv_backward_cuda_parrots(
function modulated_deform_conv_forward_cpu_parrots (line 87) | void modulated_deform_conv_forward_cpu_parrots(
function modulated_deform_conv_backward_cpu_parrots (line 122) | void modulated_deform_conv_backward_cpu_parrots(
FILE: mmcv/ops/csrc/parrots/ms_deform_attn.cpp
function Tensor (line 15) | Tensor ms_deform_attn_impl_forward(const Tensor &value,
function ms_deform_attn_impl_backward (line 26) | void ms_deform_attn_impl_backward(
function Tensor (line 38) | Tensor ms_deform_attn_forward(const Tensor &value, const Tensor &spatial...
function ms_deform_attn_backward (line 48) | void ms_deform_attn_backward(const Tensor &value, const Tensor &spatial_...
FILE: mmcv/ops/csrc/parrots/ms_deform_attn_parrots.cpp
function ms_deform_attn_forward_parrots (line 23) | void ms_deform_attn_forward_parrots(CudaContext &ctx, const SSElement &a...
function ms_deform_attn_backward_parrots (line 38) | void ms_deform_attn_backward_parrots(CudaContext &ctx, const SSElement &...
FILE: mmcv/ops/csrc/parrots/nms.cpp
function Tensor (line 5) | Tensor nms_impl(Tensor boxes, Tensor scores, float iou_threshold, int of...
function Tensor (line 9) | Tensor softnms_impl(Tensor boxes, Tensor scores, Tensor dets,
function nms_match_impl (line 16) | std::vector<std::vector<int> > nms_match_impl(Tensor dets,
function Tensor (line 21) | Tensor nms(Tensor boxes, Tensor scores, float iou_threshold, int offset) {
function Tensor (line 25) | Tensor softnms(Tensor boxes, Tensor scores, Tensor dets, float iou_thres...
function nms_match (line 31) | std::vector<std::vector<int> > nms_match(Tensor dets, float iou_threshol...
FILE: mmcv/ops/csrc/parrots/nms_parrots.cpp
function nms_parrots (line 12) | void nms_parrots(T& ctx, const SSElement& attr,
function softnms_parrots (line 31) | void softnms_parrots(T& ctx, const SSElement& attr,
function nms_match_parrots (line 54) | void nms_match_parrots(T& ctx, const SSElement& attr,
function nms_rotated_parrots (line 77) | void nms_rotated_parrots(T& ctx, const SSElement& attr,
FILE: mmcv/ops/csrc/parrots/nms_rotated.cpp
function Tensor (line 18) | Tensor nms_rotated(const Tensor dets, const Tensor scores, const Tensor ...
FILE: mmcv/ops/csrc/parrots/pixel_group.cpp
function pixel_group_impl (line 7) | std::vector<std::vector<float>> pixel_group_impl(
function pixel_group (line 15) | std::vector<std::vector<float>> pixel_group(
FILE: mmcv/ops/csrc/parrots/pixel_group_parrots.cpp
function pixel_group_parrots (line 12) | void pixel_group_parrots(T& ctx, const SSElement& attr,
FILE: mmcv/ops/csrc/parrots/points_in_boxes.cpp
function points_in_boxes_part_forward_impl (line 4) | void points_in_boxes_part_forward_impl(int batch_size, int boxes_num,
function points_in_boxes_all_forward_impl (line 12) | void points_in_boxes_all_forward_impl(int batch_size, int boxes_num,
function points_in_boxes_part_forward (line 20) | void points_in_boxes_part_forward(Tensor boxes_tensor, Tensor pts_tensor,
function points_in_boxes_all_forward (line 34) | void points_in_boxes_all_forward(Tensor boxes_tensor, Tensor pts_tensor,
FILE: mmcv/ops/csrc/parrots/points_in_boxes_parrots.cpp
function points_in_boxes_part_forward_cuda_parrots (line 11) | void points_in_boxes_part_forward_cuda_parrots(
function points_in_boxes_all_forward_cuda_parrots (line 23) | void points_in_boxes_all_forward_cuda_parrots(
function points_in_boxes_forward_cpu_parrots (line 48) | void points_in_boxes_forward_cpu_parrots(HostContext& ctx,
FILE: mmcv/ops/csrc/parrots/points_in_polygons.cpp
function points_in_polygons_forward_impl (line 4) | void points_in_polygons_forward_impl(const Tensor points, const Tensor p...
function points_in_polygons_forward (line 11) | void points_in_polygons_forward(Tensor points, Tensor polygons, Tensor o...
FILE: mmcv/ops/csrc/parrots/points_in_polygons_parrots.cpp
function points_in_polygons_cuda_parrots (line 11) | void points_in_polygons_cuda_parrots(CudaContext& ctx, const SSElement& ...
FILE: mmcv/ops/csrc/parrots/prroi_pool.cpp
function prroi_pool_forward_impl (line 5) | void prroi_pool_forward_impl(Tensor input, Tensor rois, Tensor output,
function prroi_pool_backward_impl (line 12) | void prroi_pool_backward_impl(Tensor grad_output, Tensor rois,
function prroi_pool_coor_backward_impl (line 19) | void prroi_pool_coor_backward_impl(Tensor output, Tensor grad_output,
function prroi_pool_forward (line 28) | void prroi_pool_forward(Tensor input, Tensor rois, Tensor output,
function prroi_pool_backward (line 35) | void prroi_pool_backward(Tensor grad_output, Tensor rois, Tensor grad_in...
function prroi_pool_coor_backward (line 42) | void prroi_pool_coor_backward(Tensor output, Tensor grad_output, Tensor ...
FILE: mmcv/ops/csrc/parrots/prroi_pool_parrots.cpp
function prroi_pool_forward_cuda_parrots (line 11) | void prroi_pool_forward_cuda_parrots(CudaContext& ctx, const SSElement& ...
function prroi_pool_backward_cuda_parrots (line 30) | void prroi_pool_backward_cuda_parrots(CudaContext& ctx, const SSElement&...
function prroi_pool_coor_backward_cuda_parrots (line 49) | void prroi_pool_coor_backward_cuda_parrots(CudaContext& ctx,
FILE: mmcv/ops/csrc/parrots/psamask.cpp
function psamask_forward_impl (line 7) | void psamask_forward_impl(const int psa_type, const Tensor input, Tensor...
function psamask_backward_impl (line 17) | void psamask_backward_impl(const int psa_type, const Tensor grad_output,
function psamask_forward (line 27) | void psamask_forward(const Tensor input, Tensor output, const int psa_type,
function psamask_backward (line 35) | void psamask_backward(Tensor grad_output, const Tensor grad_input,
FILE: mmcv/ops/csrc/parrots/psamask_parrots.cpp
function psamask_forward_cuda_parrots (line 10) | void psamask_forward_cuda_parrots(CudaContext &ctx, const SSElement &attr,
function psamask_backward_cuda_parrots (line 31) | void psamask_backward_cuda_parrots(CudaContext &ctx, const SSElement &attr,
function psamask_forward_cpu_parrots (line 54) | void psamask_forward_cpu_parrots(HostContext &ctx, const SSElement &attr,
function psamask_backward_cpu_parrots (line 75) | void psamask_backward_cpu_parrots(HostContext &ctx, const SSElement &attr,
FILE: mmcv/ops/csrc/parrots/riroi_align_rotated.cpp
function riroi_align_rotated_forward_impl (line 5) | void riroi_align_rotated_forward_impl(Tensor features, Tensor rois,
function riroi_align_rotated_backward_impl (line 15) | void riroi_align_rotated_backward_impl(Tensor top_grad, Tensor rois,
function riroi_align_rotated_forward (line 25) | void riroi_align_rotated_forward(Tensor features, Tensor rois, Tensor ou...
function riroi_align_rotated_backward (line 34) | void riroi_align_rotated_backward(Tensor top_grad, Tensor rois,
FILE: mmcv/ops/csrc/parrots/riroi_align_rotated_parrots.cpp
function riroi_align_rotated_forward_cuda_parrots (line 10) | void riroi_align_rotated_forward_cuda_parrots(
function riroi_align_rotated_backward_cuda_parrots (line 36) | void riroi_align_rotated_backward_cuda_parrots(
FILE: mmcv/ops/csrc/parrots/roi_align.cpp
function roi_align_forward_impl (line 5) | void roi_align_forward_impl(Tensor input, Tensor rois, Tensor output,
function roi_align_backward_impl (line 15) | void roi_align_backward_impl(Tensor grad_output, Tensor rois, Tensor arg...
function roi_align_forward (line 25) | void roi_align_forward(Tensor input, Tensor rois, Tensor output,
function roi_align_backward (line 34) | void roi_align_backward(Tensor grad_output, Tensor rois, Tensor argmax_y,
FILE: mmcv/ops/csrc/parrots/roi_align_parrots.cpp
function roi_align_forward_cuda_parrots (line 10) | void roi_align_forward_cuda_parrots(CudaContext& ctx, const SSElement& a...
function roi_align_backward_cuda_parrots (line 38) | void roi_align_backward_cuda_parrots(CudaContext& ctx, const SSElement& ...
function roi_align_forward_cpu_parrots (line 67) | void roi_align_forward_cpu_parrots(HostContext& ctx, const SSElement& attr,
function roi_align_backward_cpu_parrots (line 95) | void roi_align_backward_cpu_parrots(HostContext& ctx, const SSElement& a...
FILE: mmcv/ops/csrc/parrots/roi_align_rotated.cpp
function roi_align_rotated_forward_impl (line 5) | void roi_align_rotated_forward_impl(Tensor features, Tensor rois, Tensor...
function roi_align_rotated_backward_impl (line 14) | void roi_align_rotated_backward_impl(Tensor top_grad, Tensor rois,
function roi_align_rotated_forward (line 24) | void roi_align_rotated_forward(Tensor input, Tensor rois, Tensor output,
function roi_align_rotated_backward (line 33) | void roi_align_rotated_backward(Tensor top_grad, Tensor rois,
FILE: mmcv/ops/csrc/parrots/roi_align_rotated_parrots.cpp
function roi_align_rotated_forward_cuda_parrots (line 10) | void roi_align_rotated_forward_cuda_parrots(CudaContext& ctx,
function roi_align_rotated_backward_cuda_parrots (line 37) | void roi_align_rotated_backward_cuda_parrots(CudaContext& ctx,
function roi_align_rotated_forward_cpu_parrots (line 65) | void roi_align_rotated_forward_cpu_parrots(HostContext& ctx,
function roi_align_rotated_backward_cpu_parrots (line 92) | void roi_align_rotated_backward_cpu_parrots(HostContext& ctx,
FILE: mmcv/ops/csrc/parrots/roi_pool.cpp
function roi_pool_forward_impl (line 5) | void roi_pool_forward_impl(Tensor input, Tensor rois, Tensor output,
function roi_pool_backward_impl (line 12) | void roi_pool_backward_impl(Tensor grad_output, Tensor rois, Tensor argmax,
function roi_pool_forward (line 19) | void roi_pool_forward(Tensor input, Tensor rois, Tensor output, Tensor a...
function roi_pool_backward (line 26) | void roi_pool_backward(Tensor grad_output, Tensor rois, Tensor argmax,
FILE: mmcv/ops/csrc/parrots/roi_pool_parrots.cpp
function roi_pool_forward_cuda_parrots (line 10) | void roi_pool_forward_cuda_parrots(CudaContext& ctx, const SSElement& attr,
function roi_pool_backward_cuda_parrots (line 30) | void roi_pool_backward_cuda_parrots(CudaContext& ctx, const SSElement& a...
FILE: mmcv/ops/csrc/parrots/roiaware_pool3d.cpp
function roiaware_pool3d_forward_impl (line 4) | void roiaware_pool3d_forward_impl(int boxes_num, int pts_num, int channels,
function roiaware_pool3d_backward_impl (line 16) | void roiaware_pool3d_backward_impl(int boxes_num, int out_x, int out_y,
function roiaware_pool3d_forward (line 27) | void roiaware_pool3d_forward(Tensor rois, Tensor pts, Tensor pts_feature,
function roiaware_pool3d_backward (line 54) | void roiaware_pool3d_backward(Tensor pts_idx_of_voxels, Tensor argmax,
FILE: mmcv/ops/csrc/parrots/roiaware_pool3d_parrots.cpp
function roiaware_pool3d_forward_cuda_parrots (line 11) | void roiaware_pool3d_forward_cuda_parrots(CudaContext& ctx,
function roiaware_pool3d_backward_cuda_parrots (line 29) | void roiaware_pool3d_backward_cuda_parrots(CudaContext& ctx,
FILE: mmcv/ops/csrc/parrots/roipoint_pool3d.cpp
function roipoint_pool3d_forward_impl (line 12) | void roipoint_pool3d_forward_impl(int batch_size, int pts_num, int boxes...
function roipoint_pool3d_forward (line 23) | void roipoint_pool3d_forward(Tensor xyz, Tensor boxes3d, Tensor pts_feat...
FILE: mmcv/ops/csrc/parrots/roipoint_pool3d_parrots.cpp
function roipoint_pool3d_forward_cuda_parrots (line 11) | void roipoint_pool3d_forward_cuda_parrots(CudaContext& ctx,
FILE: mmcv/ops/csrc/parrots/rotated_feature_align.cpp
function rotated_feature_align_forward_impl (line 8) | void rotated_feature_align_forward_impl(const Tensor features,
function rotated_feature_align_backward_impl (line 16) | void rotated_feature_align_backward_impl(const Tensor top_grad,
function rotated_feature_align_forward (line 24) | void rotated_feature_align_forward(const Tensor features,
function rotated_feature_align_backward (line 32) | void rotated_feature_align_backward(const Tensor top_grad,
FILE: mmcv/ops/csrc/parrots/rotated_feature_align_parrots.cpp
function rotated_feature_align_forward_cuda_parrots (line 10) | void rotated_feature_align_forward_cuda_parrots(
function rotated_feature_align_backward_cuda_parrots (line 27) | void rotated_feature_align_backward_cuda_parrots(
function rotated_feature_align_forward_cpu_parrots (line 45) | void rotated_feature_align_forward_cpu_parrots(
function rotated_feature_align_backward_cpu_parrots (line 62) | void rotated_feature_align_backward_cpu_parrots(
FILE: mmcv/ops/csrc/parrots/sync_bn.cpp
function sync_bn_forward_mean_impl (line 5) | void sync_bn_forward_mean_impl(const Tensor input, Tensor mean) {
function sync_bn_forward_var_impl (line 9) | void sync_bn_forward_var_impl(const Tensor input, const Tensor mean,
function sync_bn_forward_output_impl (line 14) | void sync_bn_forward_output_impl(const Tensor input, const Tensor mean,
function sync_bn_backward_param_impl (line 25) | void sync_bn_backward_param_impl(const Tensor grad_output, const Tensor ...
function sync_bn_backward_data_impl (line 31) | void sync_bn_backward_data_impl(const Tensor grad_output, const Tensor w...
function sync_bn_forward_mean (line 39) | void sync_bn_forward_mean(const Tensor input, Tensor mean) {
function sync_bn_forward_var (line 43) | void sync_bn_forward_var(const Tensor input, const Tensor mean, Tensor v...
function sync_bn_forward_output (line 47) | void sync_bn_forward_output(const Tensor input, const Tensor mean,
function sync_bn_backward_param (line 58) | void sync_bn_backward_param(const Tensor grad_output, const Tensor norm,
function sync_bn_backward_data (line 63) | void sync_bn_backward_data(const Tensor grad_output, const Tensor weight,
FILE: mmcv/ops/csrc/parrots/sync_bn_parrots.cpp
function sync_bn_forward_mean_cuda_parrots (line 10) | void sync_bn_forward_mean_cuda_parrots(CudaContext& ctx, const SSElement...
function sync_bn_forward_var_cuda_parrots (line 18) | void sync_bn_forward_var_cuda_parrots(CudaContext& ctx, const SSElement&...
function sync_bn_forward_output_cuda_parrots (line 27) | void sync_bn_forward_output_cuda_parrots(CudaContext& ctx,
function sync_bn_backward_param_cuda_parrots (line 54) | void sync_bn_backward_param_cuda_parrots(CudaContext& ctx,
function sync_bn_backward_data_cuda_parrots (line 65) | void sync_bn_backward_data_cuda_parrots(CudaContext& ctx, const SSElemen...
FILE: mmcv/ops/csrc/parrots/three_interpolate.cpp
function three_interpolate_forward_impl (line 7) | void three_interpolate_forward_impl(int b, int c, int m, int n,
function three_interpolate_backward_impl (line 14) | void three_interpolate_backward_impl(int b, int c, int n, int m,
function three_interpolate_forward (line 21) | void three_interpolate_forward(Tensor points_tensor, Tensor idx_tensor,
function three_interpolate_backward (line 28) | void three_interpolate_backward(Tensor grad_out_tensor, Tensor idx_tensor,
FILE: mmcv/ops/csrc/parrots/three_interpolate_parrots.cpp
function three_interpolate_forward_cuda_parrots (line 11) | void three_interpolate_forward_cuda_parrots(CudaContext& ctx,
function three_interpolate_backward_cuda_parrots (line 33) | void three_interpolate_backward_cuda_parrots(CudaContext& ctx,
FILE: mmcv/ops/csrc/parrots/three_nn.cpp
function three_nn_forward_impl (line 7) | void three_nn_forward_impl(int b, int n, int m, const Tensor unknown,
function three_nn_forward (line 13) | void three_nn_forward(Tensor unknown_tensor, Tensor known_tensor,
FILE: mmcv/ops/csrc/parrots/three_nn_parrots.cpp
function three_nn_forward_cuda_parrots (line 11) | void three_nn_forward_cuda_parrots(CudaContext& ctx, const SSElement& attr,
FILE: mmcv/ops/csrc/parrots/tin_shift.cpp
function tin_shift_forward_impl (line 5) | void tin_shift_forward_impl(Tensor input, Tensor shift, Tensor output) {
function tin_shift_backward_impl (line 9) | void tin_shift_backward_impl(Tensor grad_output, Tensor shift,
function tin_shift_forward (line 14) | void tin_shift_forward(Tensor input, Tensor shift, Tensor output) {
function tin_shift_backward (line 18) | void tin_shift_backward(Tensor grad_output, Tensor shift, Tensor grad_in...
FILE: mmcv/ops/csrc/parrots/tin_shift_parrots.cpp
function tin_shift_forward_cuda_parrots (line 10) | void tin_shift_forward_cuda_parrots(CudaContext &ctx, const SSElement &a...
function tin_shift_backward_cuda_parrots (line 19) | void tin_shift_backward_cuda_parrots(CudaContext &ctx, const SSElement &...
FILE: mmcv/ops/csrc/parrots/upfirdn2d.cpp
function upfirdn2d_op_impl (line 105) | torch::Tensor upfirdn2d_op_impl(const torch::Tensor& input,
function upfirdn2d (line 113) | torch::Tensor upfirdn2d(const torch::Tensor& input, const torch::Tensor&...
FILE: mmcv/ops/csrc/parrots/upfirdn2d_parrots.cpp
function upfirdn2d_parrots (line 14) | void upfirdn2d_parrots(CudaContext &ctx, const SSElement &attr,
FILE: mmcv/ops/csrc/parrots/voxelization.cpp
function hard_voxelize_forward_impl (line 5) | int hard_voxelize_forward_impl(const at::Tensor &points, at::Tensor &vox...
function nondeterministic_hard_voxelize_forward_impl (line 17) | int nondeterministic_hard_voxelize_forward_impl(
function dynamic_voxelize_forward_impl (line 28) | void dynamic_voxelize_forward_impl(const at::Tensor &points, at::Tensor ...
function hard_voxelize_forward (line 36) | void hard_voxelize_forward(const at::Tensor &points,
function dynamic_voxelize_forward (line 62) | void dynamic_voxelize_forward(const at::Tensor &points,
FILE: mmcv/ops/csrc/parrots/voxelization_parrots.cpp
function hard_voxelize_forward_cuda_parrots (line 11) | void hard_voxelize_forward_cuda_parrots(CudaContext& ctx, const SSElemen...
function dynamic_voxelize_forward_cuda_parrots (line 36) | void dynamic_voxelize_forward_cuda_parrots(CudaContext& ctx,
function hard_voxelize_forward_cpu_parrots (line 52) | void hard_voxelize_forward_cpu_parrots(HostContext& ctx, const SSElement...
function dynamic_voxelize_forward_cpu_parrots (line 77) | void dynamic_voxelize_forward_cpu_parrots(HostContext& ctx,
FILE: mmcv/ops/csrc/pytorch/active_rotated_filter.cpp
function active_rotated_filter_forward_impl (line 8) | void active_rotated_filter_forward_impl(const Tensor input,
function active_rotated_filter_backward_impl (line 14) | void active_rotated_filter_backward_impl(const Tensor grad_out,
function active_rotated_filter_forward (line 20) | void active_rotated_filter_forward(const Tensor input, const Tensor indi...
function active_rotated_filter_backward (line 25) | void active_rotated_filter_backward(const Tensor grad_out, const Tensor ...
FILE: mmcv/ops/csrc/pytorch/assign_score_withk.cpp
function assign_score_withk_forward_impl (line 6) | void assign_score_withk_forward_impl(int B, int N0, int N1, int M, int K...
function assign_score_withk_backward_impl (line 15) | void assign_score_withk_backward_impl(
function assign_score_withk_forward (line 25) | void assign_score_withk_forward(const Tensor& points, const Tensor& cent...
function assign_score_withk_backward (line 33) | void assign_score_withk_backward(const Tensor& grad_out, const Tensor& p...
FILE: mmcv/ops/csrc/pytorch/ball_query.cpp
function ball_query_forward_impl (line 7) | void ball_query_forward_impl(int b, int n, int m, float min_radius,
function ball_query_forward (line 15) | void ball_query_forward(Tensor new_xyz_tensor, Tensor xyz_tensor,
function stack_ball_query_forward_impl (line 22) | void stack_ball_query_forward_impl(float max_radius, int nsample,
function stack_ball_query_forward (line 31) | void stack_ball_query_forward(Tensor new_xyz_tensor, Tensor new_xyz_batc...
FILE: mmcv/ops/csrc/pytorch/bbox_overlaps.cpp
function bbox_overlaps_impl (line 16) | void bbox_overlaps_impl(const Tensor bboxes1, const Tensor bboxes2, Tens...
function bbox_overlaps_diopi (line 23) | void bbox_overlaps_diopi(const Tensor bboxes1, const Tensor bboxes2,
function bbox_overlaps (line 53) | void bbox_overlaps(const Tensor bboxes1, const Tensor bboxes2, Tensor ious,
FILE: mmcv/ops/csrc/pytorch/bezier_align.cpp
function bezier_align_forward_impl (line 5) | void bezier_align_forward_impl(Tensor input, Tensor rois, Tensor output,
function bezier_align_backward_impl (line 14) | void bezier_align_backward_impl(Tensor grad_output, Tensor rois,
function bezier_align_forward (line 23) | void bezier_align_forward(Tensor input, Tensor rois, Tensor output,
function bezier_align_backward (line 31) | void bezier_align_backward(Tensor grad_output, Tensor rois, Tensor grad_...
FILE: mmcv/ops/csrc/pytorch/bias_act.cpp
function bias_act_op_impl (line 4) | torch::Tensor bias_act_op_impl(const torch::Tensor &input,
function bias_act (line 14) | torch::Tensor bias_act(const torch::Tensor &input, const torch::Tensor &...
FILE: mmcv/ops/csrc/pytorch/border_align.cpp
function border_align_forward_impl (line 5) | void border_align_forward_impl(const Tensor &input, const Tensor &boxes,
function border_align_backward_impl (line 12) | void border_align_backward_impl(const Tensor &grad_output, const Tensor ...
function border_align_forward (line 19) | void border_align_forward(const Tensor &input, const Tensor &boxes,
function border_align_backward (line 25) | void border_align_backward(const Tensor &grad_output, const Tensor &boxes,
FILE: mmcv/ops/csrc/pytorch/box_iou_quadri.cpp
function box_iou_quadri_impl (line 5) | void box_iou_quadri_impl(const Tensor boxes1, const Tensor boxes2, Tenso...
function box_iou_quadri (line 14) | void box_iou_quadri(const Tensor boxes1, const Tensor boxes2, Tensor ious,
FILE: mmcv/ops/csrc/pytorch/box_iou_rotated.cpp
function box_iou_rotated_impl (line 7) | void box_iou_rotated_impl(const Tensor boxes1, const Tensor boxes2, Tens...
function box_iou_rotated (line 16) | void box_iou_rotated(const Tensor boxes1, const Tensor boxes2, Tensor ious,
FILE: mmcv/ops/csrc/pytorch/carafe.cpp
function carafe_forward_impl (line 5) | void carafe_forward_impl(Tensor features, Tensor masks, Tensor rfeatures,
function carafe_backward_impl (line 12) | void carafe_backward_impl(Tensor top_grad, Tensor rfeatures, Tensor masks,
function carafe_forward (line 23) | void carafe_forward(Tensor features, Tensor masks, Tensor rfeatures,
function carafe_backward (line 30) | void carafe_backward(Tensor top_grad, Tensor rfeatures, Tensor masks,
FILE: mmcv/ops/csrc/pytorch/carafe_naive.cpp
function carafe_naive_forward_impl (line 5) | void carafe_naive_forward_impl(Tensor features, Tensor masks, Tensor out...
function carafe_naive_backward_impl (line 12) | void carafe_naive_backward_impl(Tensor top_grad, Tensor features, Tensor...
function carafe_naive_forward (line 21) | void carafe_naive_forward(Tensor features, Tensor masks, Tensor output,
function carafe_naive_backward (line 27) | void carafe_naive_backward(Tensor top_grad, Tensor features, Tensor masks,
FILE: mmcv/ops/csrc/pytorch/chamfer_distance.cpp
function chamfer_distance_forward_impl (line 8) | void chamfer_distance_forward_impl(const Tensor xyz1, const Tensor xyz2,
function chamfer_distance_backward_impl (line 15) | void chamfer_distance_backward_impl(const Tensor xyz1, const Tensor xyz2,
function chamfer_distance_forward (line 23) | void chamfer_distance_forward(const Tensor xyz1, const Tensor xyz2,
function chamfer_distance_backward (line 29) | void chamfer_distance_backward(const Tensor xyz1, const Tensor xyz2,
FILE: mmcv/ops/csrc/pytorch/contour_expand.cpp
class Point2d (line 10) | class Point2d {
method Point2d (line 15) | Point2d() : x(0), y(0) {}
method Point2d (line 16) | Point2d(int _x, int _y) : x(_x), y(_y) {}
function kernel_dilate (line 19) | void kernel_dilate(const uint8_t *data, IntArrayRef data_shape,
function contour_expand (line 89) | std::vector<std::vector<int>> contour_expand(Tensor kernel_mask,
FILE: mmcv/ops/csrc/pytorch/convex_iou.cpp
function convex_iou_impl (line 7) | void convex_iou_impl(const Tensor pointsets, const Tensor polygons,
function convex_iou (line 12) | void convex_iou(const Tensor pointsets, const Tensor polygons, Tensor io...
function convex_giou_impl (line 16) | void convex_giou_impl(const Tensor pointsets, const Tensor polygons,
function convex_giou (line 21) | void convex_giou(const Tensor pointsets, const Tensor polygons, Tensor o...
FILE: mmcv/ops/csrc/pytorch/correlation.cpp
function correlation_forward_impl (line 7) | void correlation_forward_impl(Tensor input1, Tensor input2, Tensor output,
function correlation_backward_impl (line 17) | void correlation_backward_impl(Tensor grad_output, Tensor input1, Tensor...
function correlation_forward (line 29) | void correlation_forward(Tensor input1, Tensor input2, Tensor output, in...
function correlation_backward (line 38) | void correlation_backward(Tensor grad_output, Tensor input1, Tensor input2,
FILE: mmcv/ops/csrc/pytorch/cpu/active_rotated_filter.cpp
function active_rotated_filter_forward_cpu_kernel (line 8) | void active_rotated_filter_forward_cpu_kernel(
function active_rotated_filter_backward_cpu_kernel (line 35) | void active_rotated_filter_backward_cpu_kernel(
function ActiveRotatedFilterForwardCPULauncher (line 63) | void ActiveRotatedFilterForwardCPULauncher(const Tensor input,
function ActiveRotatedFilterBackwardCPULauncher (line 82) | void ActiveRotatedFilterBackwardCPULauncher(const Tensor grad_out,
function active_rotated_filter_forward_cpu (line 101) | void active_rotated_filter_forward_cpu(const Tensor input, const Tensor ...
function active_rotated_filter_backward_cpu (line 106) | void active_rotated_filter_backward_cpu(const Tensor grad_out,
FILE: mmcv/ops/csrc/pytorch/cpu/bbox_overlaps_cpu.cpp
function bbox_overlaps_cpu_kernel (line 8) | void bbox_overlaps_cpu_kernel(const Tensor boxes1, const Tensor boxes2,
function bbox_overlaps_cpu (line 57) | void bbox_overlaps_cpu(const Tensor boxes1, const Tensor boxes2, Tensor ...
FILE: mmcv/ops/csrc/pytorch/cpu/bezier_align.cpp
type PreCalc (line 12) | struct PreCalc {
function T (line 24) | T bezier_curve(const T p0, const T p1, const T p2, const T p3, const T u) {
function pre_calc_for_bilinear_interpolate (line 31) | void pre_calc_for_bilinear_interpolate(
function BezierAlignForward (line 129) | void BezierAlignForward(const int nthreads, const T *input, const T *rois,
function bilinear_interpolate_gradient (line 229) | void bilinear_interpolate_gradient(const int height, const int width, T ...
function add (line 276) | inline void add(T *address, const T &val) {
function BezierAlignBackward (line 281) | void BezierAlignBackward(const int nthreads, const T *grad_output,
function BezierAlignForwardCPULauncher (line 389) | void BezierAlignForwardCPULauncher(Tensor input, Tensor rois, Tensor out...
function BezierAlignBackwardCPULauncher (line 408) | void BezierAlignBackwardCPULauncher(Tensor grad_output, Tensor rois,
FILE: mmcv/ops/csrc/pytorch/cpu/box_iou_quadri.cpp
function box_iou_quadri_cpu_kernel (line 7) | void box_iou_quadri_cpu_kernel(const Tensor boxes1, const Tensor boxes2,
function box_iou_quadri_cpu (line 29) | void box_iou_quadri_cpu(const Tensor boxes1, const Tensor boxes2, Tensor...
FILE: mmcv/ops/csrc/pytorch/cpu/box_iou_rotated.cpp
function box_iou_rotated_cpu_kernel (line 9) | void box_iou_rotated_cpu_kernel(const Tensor boxes1, const Tensor boxes2,
function box_iou_rotated_cpu (line 31) | void box_iou_rotated_cpu(const Tensor boxes1, const Tensor boxes2, Tenso...
FILE: mmcv/ops/csrc/pytorch/cpu/deform_conv.cpp
function T (line 6) | T deformable_im2col_bilinear_cpu(const T *input, const int data_width,
function T (line 40) | T get_gradient_weight_cpu(T argmax_h, T argmax_w, const int h, const int w,
function T (line 66) | T get_coordinate_weight_cpu(T argmax_h, T argmax_w, const int height,
function deformable_im2col_cpu_kernel (line 114) | void deformable_im2col_cpu_kernel(
function deformable_col2im_cpu_kernel (line 167) | void deformable_col2im_cpu_kernel(
function deformable_col2im_coord_cpu_kernel (line 224) | void deformable_col2im_coord_cpu_kernel(
function deformable_im2col_cpu (line 291) | void deformable_im2col_cpu(Tensor data_im, Tensor data_offset,
function deformable_col2im_cpu (line 318) | void deformable_col2im_cpu(Tensor data_col, Tensor data_offset,
function deformable_col2im_coord_cpu (line 349) | void deformable_col2im_coord_cpu(
FILE: mmcv/ops/csrc/pytorch/cpu/modulated_deform_conv.cpp
function T (line 6) | T dmcn_im2col_bilinear_cpu(const T *input, const int data_width,
function T (line 36) | T dmcn_get_gradient_weight_cpu(T argmax_h, T argmax_w, const int h, cons...
function T (line 62) | T dmcn_get_coordinate_weight_cpu(T argmax_h, T argmax_w, const int height,
function modulated_deformable_im2col_cpu_kernel (line 110) | void modulated_deformable_im2col_cpu_kernel(
function modulated_deformable_col2im_cpu_kernel (line 171) | void modulated_deformable_col2im_cpu_kernel(
function modulated_deformable_col2im_coord_cpu_kernel (line 234) | void modulated_deformable_col2im_coord_cpu_kernel(
function modulated_deformable_im2col_cpu (line 322) | void modulated_deformable_im2col_cpu(
function modulated_deformable_col2im_cpu (line 348) | void modulated_deformable_col2im_cpu(
function modulated_deformable_col2im_coord_cpu (line 374) | void modulated_deformable_col2im_coord_cpu(
FILE: mmcv/ops/csrc/pytorch/cpu/nms.cpp
function Tensor (line 5) | Tensor nms_cpu(Tensor boxes, Tensor scores, float iou_threshold, int off...
function Tensor (line 59) | Tensor softnms_cpu(Tensor boxes, Tensor scores, Tensor dets,
function nms_match_cpu (line 168) | std::vector<std::vector<int> > nms_match_cpu(Tensor dets, float iou_thre...
FILE: mmcv/ops/csrc/pytorch/cpu/nms_quadri.cpp
function Tensor (line 6) | Tensor nms_quadri_cpu_kernel(const Tensor dets, const Tensor scores,
function Tensor (line 57) | Tensor nms_quadri_cpu(const Tensor dets, const Tensor scores,
FILE: mmcv/ops/csrc/pytorch/cpu/nms_rotated.cpp
function Tensor (line 8) | Tensor nms_rotated_cpu_kernel(const Tensor dets, const Tensor scores,
function Tensor (line 59) | Tensor nms_rotated_cpu(const Tensor dets, const Tensor scores,
FILE: mmcv/ops/csrc/pytorch/cpu/pixel_group.cpp
function estimate_confidence (line 9) | std::vector<std::vector<float>> estimate_confidence(int32_t* label,
function pixel_group_cpu (line 39) | std::vector<std::vector<float>> pixel_group_cpu(
FILE: mmcv/ops/csrc/pytorch/cpu/points_in_boxes.cpp
function lidar_to_local_coords_cpu (line 3) | inline void lidar_to_local_coords_cpu(float shift_x, float shift_y, floa...
function check_pt_in_box3d_cpu (line 10) | inline int check_pt_in_box3d_cpu(const float *pt, const float *box3d,
function points_in_boxes_cpu_forward (line 28) | void points_in_boxes_cpu_forward(Tensor boxes_tensor, Tensor pts_tensor,
FILE: mmcv/ops/csrc/pytorch/cpu/psamask.cpp
function psamask_collect_forward (line 14) | void psamask_collect_forward(const int num_, const int h_feature,
function psamask_distribute_forward (line 51) | void psamask_distribute_forward(const int num_, const int h_feature,
function psamask_collect_backward (line 88) | void psamask_collect_backward(const int num_, const int h_feature,
function psamask_distribute_backward (line 124) | void psamask_distribute_backward(const int num_, const int h_feature,
function psamask_forward_cpu (line 160) | void psamask_forward_cpu(const int psa_type, const Tensor input, Tensor ...
function psamask_backward_cpu (line 173) | void psamask_backward_cpu(const int psa_type, const Tensor grad_output,
FILE: mmcv/ops/csrc/pytorch/cpu/roi_align.cpp
type PreCalc (line 12) | struct PreCalc {
function pre_calc_for_bilinear_interpolate (line 24) | void pre_calc_for_bilinear_interpolate(
function ROIAlignForward (line 111) | void ROIAlignForward(const int nthreads, const T* input, const T* rois,
function bilinear_interpolate_gradient (line 217) | void bilinear_interpolate_gradient(const int height, const int width, T ...
function add (line 266) | inline void add(T* address, const T& val) {
function ROIAlignBackward (line 271) | void ROIAlignBackward(const int nthreads, const T* grad_output, const T*...
function ROIAlignForwardCPULauncher (line 384) | void ROIAlignForwardCPULauncher(Tensor input, Tensor rois, Tensor output,
function ROIAlignBackwardCPULauncher (line 405) | void ROIAlignBackwardCPULauncher(Tensor grad_output, Tensor rois,
function roi_align_forward_cpu (line 434) | void roi_align_forward_cpu(Tensor input, Tensor rois, Tensor output,
function roi_align_backward_cpu (line 443) | void roi_align_backward_cpu(Tensor grad_output, Tensor rois, Tensor argm...
FILE: mmcv/ops/csrc/pytorch/cpu/roi_align_rotated.cpp
type PreCalc (line 12) | struct PreCalc {
function pre_calc_for_bilinear_interpolate (line 24) | void pre_calc_for_bilinear_interpolate(
function ROIAlignRotatedForward (line 116) | void ROIAlignRotatedForward(const int nthreads, const T* input,
function bilinear_interpolate_gradient (line 215) | void bilinear_interpolate_gradient(const int height, const int width, T ...
function add (line 268) | inline void add(T* address, const T& val) {
function ROIAlignRotatedBackward (line 273) | void ROIAlignRotatedBackward(
function ROIAlignRotatedForwardCPULauncher (line 374) | void ROIAlignRotatedForwardCPULauncher(Tensor input, Tensor rois, Tensor...
function ROIAlignRotatedBackwardCPULauncher (line 393) | void ROIAlignRotatedBackwardCPULauncher(Tensor grad_output, Tensor rois,
function roi_align_rotated_forward_cpu (line 419) | void roi_align_rotated_forward_cpu(Tensor input, Tensor rois, Tensor out...
function roi_align_rotated_backward_cpu (line 428) | void roi_align_rotated_backward_cpu(Tensor top_grad, Tensor rois,
FILE: mmcv/ops/csrc/pytorch/cpu/rotated_feature_align.cpp
function T (line 7) | T bilinear_interpolate(const T* input, const int height, const int width...
function rotated_feature_align_forward_cpu_kernel (line 49) | void rotated_feature_align_forward_cpu_kernel(
function bilinear_interpolate_gradient (line 100) | void bilinear_interpolate_gradient(const int height, const int width, T ...
function valueAdd (line 142) | inline void valueAdd(scalar_t* address, scalar_t val) {
function rotated_feature_align_backward_cpu_kernel (line 148) | void rotated_feature_align_backward_cpu_kernel(
function rotated_feature_align_forward_cpu (line 213) | void rotated_feature_align_forward_cpu(const Tensor features,
function rotated_feature_align_backward_cpu (line 231) | void rotated_feature_align_backward_cpu(const Tensor top_grad,
FILE: mmcv/ops/csrc/pytorch/cpu/sparse_indice.cpp
type functor (line 21) | namespace functor {
type CreateConvIndicePairFunctor<tv::CPU, Index, IndexGrid, NDim> (line 23) | struct CreateConvIndicePairFunctor<tv::CPU, Index, IndexGrid, NDim> {
method Index (line 24) | Index operator()(const tv::CPU& d, tv::TensorView<const Index> indic...
type CreateSubMIndicePairFunctor<tv::CPU, Index, IndexGrid, NDim> (line 49) | struct CreateSubMIndicePairFunctor<tv::CPU, Index, IndexGrid, NDim> {
method Index (line 50) | Index operator()(const tv::CPU& d, tv::TensorView<const Index> indic...
FILE: mmcv/ops/csrc/pytorch/cpu/sparse_maxpool.cpp
type functor (line 20) | namespace functor {
type SparseMaxPoolForwardFunctor<tv::CPU, scalar_t, Index> (line 22) | struct SparseMaxPoolForwardFunctor<tv::CPU, scalar_t, Index> {
type SparseMaxPoolBackwardFunctor<tv::CPU, scalar_t, Index> (line 43) | struct SparseMaxPoolBackwardFunctor<tv::CPU, scalar_t, Index> {
FILE: mmcv/ops/csrc/pytorch/cpu/sparse_reordering.cpp
type functor (line 20) | namespace functor {
type SparseGatherFunctor<tv::CPU, scalar_t, Index> (line 22) | struct SparseGatherFunctor<tv::CPU, scalar_t, Index> {
type SparseScatterAddFunctor<tv::CPU, scalar_t, Index> (line 36) | struct SparseScatterAddFunctor<tv::CPU, scalar_t, Index> {
FILE: mmcv/ops/csrc/pytorch/cpu/voxelization.cpp
function dynamic_voxelize_forward_cpu_kernel (line 6) | void dynamic_voxelize_forward_cpu_kernel(
function hard_voxelize_forward_cpu_kernel (line 48) | void hard_voxelize_forward_cpu_kernel(
function dynamic_voxelize_forward_cpu (line 106) | void dynamic_voxelize_forward_cpu(const at::Tensor& points, at::Tensor& ...
function hard_voxelize_forward_cpu (line 131) | int hard_voxelize_forward_cpu(const at::Tensor& points, at::Tensor& voxels,
FILE: mmcv/ops/csrc/pytorch/cuda/cudabind.cpp
function assign_score_withk_forward_cuda (line 15) | void assign_score_withk_forward_cuda(int B, int N0, int N1, int M, int K...
function assign_score_withk_backward_cuda (line 24) | void assign_score_withk_backward_cuda(
function ball_query_forward_cuda (line 56) | void ball_query_forward_cuda(int b, int n, int m, float min_radius,
function stack_ball_query_forward_cuda (line 77) | void stack_ball_query_forward_cuda(float max_radius, int nsample,
function bbox_overlaps_cuda (line 98) | void bbox_overlaps_cuda(const Tensor bboxes1, const Tensor bboxes2, Tens...
function border_align_forward_cuda (line 118) | void border_align_forward_cuda(const Tensor &input, const Tensor &boxes,
function border_align_backward_cuda (line 125) | void border_align_backward_cuda(const Tensor &grad_output, const Tensor ...
function carafe_forward_cuda (line 172) | void carafe_forward_cuda(Tensor features, Tensor masks, Tensor rfeatures,
function carafe_backward_cuda (line 180) | void carafe_backward_cuda(Tensor top_grad, Tensor rfeatures, Tensor masks,
function carafe_naive_forward_cuda (line 215) | void carafe_naive_forward_cuda(Tensor features, Tensor masks, Tensor out...
function carafe_naive_backward_cuda (line 222) | void carafe_naive_backward_cuda(Tensor top_grad, Tensor features, Tensor...
function correlation_forward_cuda (line 259) | void correlation_forward_cuda(Tensor input1, Tensor input2, Tensor output,
function correlation_backward_cuda (line 269) | void correlation_backward_cuda(Tensor grad_output, Tensor input1, Tensor...
function deform_roi_pool_forward_cuda (line 364) | void deform_roi_pool_forward_cuda(Tensor input, Tensor rois, Tensor offset,
function deform_roi_pool_backward_cuda (line 373) | void deform_roi_pool_backward_cuda(Tensor grad_output, Tensor input,
function sigmoid_focal_loss_forward_cuda (line 423) | void sigmoid_focal_loss_forward_cuda(Tensor input, Tensor target, Tensor...
function sigmoid_focal_loss_backward_cuda (line 429) | void sigmoid_focal_loss_backward_cuda(Tensor input, Tensor target,
function softmax_focal_loss_forward_cuda (line 436) | void softmax_focal_loss_forward_cuda(Tensor input, Tensor target, Tensor...
function softmax_focal_loss_backward_cuda (line 442) | void softmax_focal_loss_backward_cuda(Tensor input, Tensor target,
function furthest_point_sampling_forward_cuda (line 481) | void furthest_point_sampling_forward_cuda(Tensor points_tensor,
function furthest_point_sampling_with_dist_forward_cuda (line 490) | void furthest_point_sampling_with_dist_forward_cuda(Tensor points_tensor,
function gather_points_forward_cuda (line 561) | void gather_points_forward_cuda(int b, int c, int n, int npoints,
function gather_points_backward_cuda (line 567) | void gather_points_backward_cuda(int b, int c, int n, int npoints,
function group_points_forward_cuda (line 596) | void group_points_forward_cuda(int b, int c, int n, int npoints, int nsa...
function group_points_backward_cuda (line 603) | void group_points_backward_cuda(int b, int c, int n, int npoints, int ns...
function stack_group_points_forward_cuda (line 632) | void stack_group_points_forward_cuda(int b, int c, int m, int nsample,
function stack_group_points_backward_cuda (line 643) | void stack_group_points_backward_cuda(int b, int c, int m, int n, int ns...
function iou3d_boxes_overlap_bev_forward_cuda (line 687) | void iou3d_boxes_overlap_bev_forward_cuda(const int num_a, const Tensor ...
function iou3d_nms3d_forward_cuda (line 694) | void iou3d_nms3d_forward_cuda(const Tensor boxes, Tensor &keep,
function iou3d_nms3d_normal_forward_cuda (line 700) | void iou3d_nms3d_normal_forward_cuda(const Tensor boxes, Tensor &keep,
function knn_forward_cuda (line 728) | void knn_forward_cuda(int b, int n, int m, int nsample, const Tensor xyz,
function masked_im2col_forward_cuda (line 750) | void masked_im2col_forward_cuda(const Tensor im, const Tensor mask_h_idx,
function masked_col2im_forward_cuda (line 760) | void masked_col2im_forward_cuda(const Tensor col, const Tensor mask_h_idx,
function Tensor (line 874) | Tensor nms_cuda(Tensor boxes, Tensor scores, float iou_threshold, int of...
function points_in_boxes_part_forward_cuda (line 891) | void points_in_boxes_part_forward_cuda(int batch_size, int boxes_num,
function points_in_boxes_all_forward_cuda (line 899) | void points_in_boxes_all_forward_cuda(int batch_size, int boxes_num,
function psamask_forward_cuda (line 933) | void psamask_forward_cuda(const int psa_type, const Tensor input, Tensor...
function psamask_backward_cuda (line 943) | void psamask_backward_cuda(const int psa_type, const Tensor grad_output,
function roi_align_forward_cuda (line 980) | void roi_align_forward_cuda(Tensor input, Tensor rois, Tensor output,
function roi_align_backward_cuda (line 990) | void roi_align_backward_cuda(Tensor grad_output, Tensor rois, Tensor arg...
function roi_align_rotated_forward_cuda (line 1027) | void roi_align_rotated_forward_cuda(Tensor input, Tensor rois, Tensor ou...
function roi_align_rotated_backward_cuda (line 1048) | void roi_align_rotated_backward_cuda(Tensor top_grad, Tensor rois,
function riroi_align_rotated_forward_cuda (line 1098) | void riroi_align_rotated_forward_cuda(Tensor features, Tensor rois,
function riroi_align_rotated_backward_cuda (line 1120) | void riroi_align_rotated_backward_cuda(Tensor top_grad, Tensor rois,
function roiaware_pool3d_forward_cuda (line 1170) | void roiaware_pool3d_forward_cuda(int boxes_num, int pts_num, int channels,
function roiaware_pool3d_backward_cuda (line 1182) | void roiaware_pool3d_backward_cuda(int boxes_num, int out_x, int out_y,
function roipoint_pool3d_forward_cuda (line 1217) | void roipoint_pool3d_forward_cuda(int batch_size, int pts_num, int boxes...
function roi_pool_forward_cuda (line 1246) | void roi_pool_forward_cuda(Tensor input, Tensor rois, Tensor output,
function roi_pool_backward_cuda (line 1253) | void roi_pool_backward_cuda(Tensor grad_output, Tensor rois, Tensor argmax,
function dynamic_point_to_voxel_forward_cuda (line 1281) | std::vector<torch::Tensor> dynamic_point_to_voxel_forward_cuda(
function dynamic_point_to_voxel_backward_cuda (line 1288) | void dynamic_point_to_voxel_backward_cuda(
function sync_bn_forward_mean_cuda (line 1336) | void sync_bn_forward_mean_cuda(const Tensor input, Tensor mean) {
function sync_bn_forward_var_cuda (line 1340) | void sync_bn_forward_var_cuda(const Tensor input, const Tensor mean,
function sync_bn_forward_output_cuda (line 1345) | void sync_bn_forward_output_cuda(const Tensor input, const Tensor mean,
function sync_bn_backward_param_cuda (line 1356) | void sync_bn_backward_param_cuda(const Tensor grad_output, const Tensor ...
function sync_bn_backward_data_cuda (line 1362) | void sync_bn_backward_data_cuda(const Tensor grad_output, const Tensor w...
function three_interpolate_forward_cuda (line 1411) | void three_interpolate_forward_cuda(int b, int c, int m, int n,
function three_interpolate_backward_cuda (line 1418) | void three_interpolate_backward_cuda(int b, int c, int n, int m,
function three_nn_forward_cuda (line 1441) | void three_nn_forward_cuda(int b, int n, int m, const Tensor unknown,
function tin_shift_forward_cuda (line 1456) | void tin_shift_forward_cuda(Tensor input, Tensor shift, Tensor output) {
function tin_shift_backward_cuda (line 1460) | void tin_shift_backward_cuda(Tensor grad_output, Tensor shift,
function hard_voxelize_forward_cuda (line 1498) | int hard_voxelize_forward_cuda(const at::Tensor &points, at::Tensor &vox...
function nondeterministic_hard_voxelize_forward_cuda (line 1510) | int nondeterministic_hard_voxelize_forward_cuda(
function dynamic_voxelize_forward_cuda (line 1520) | void dynamic_voxelize_forward_cuda(const at::Tensor &points, at::Tensor ...
function rotated_feature_align_forward_cuda (line 1566) | void rotated_feature_align_forward_cuda(const Tensor features,
function rotated_feature_align_backward_cuda (line 1574) | void rotated_feature_align_backward_cuda(const Tensor top_grad,
function points_in_polygons_forward_cuda (line 1602) | void points_in_polygons_forward_cuda(const Tensor points, const Tensor p...
function indice_maxpool_forward_cuda (line 1621) | torch::Tensor indice_maxpool_forward_cuda(torch::Tensor features,
function indice_maxpool_backward_cuda (line 1642) | torch::Tensor indice_maxpool_backward_cuda(torch::Tensor features,
function indice_conv_forward_cuda (line 1665) | torch::Tensor indice_conv_forward_cuda(torch::Tensor features,
function indice_conv_backward_cuda (line 1689) | std::vector<torch::Tensor> indice_conv_backward_cuda(
function fused_indice_conv_batchnorm_forward_cuda (line 1710) | torch::Tensor fused_indice_conv_batchnorm_forward_cuda(
function min_area_polygons_cuda (line 1729) | void min_area_polygons_cuda(const Tensor pointsets, Tensor polygons) {
function active_rotated_filter_forward_cuda (line 1745) | void active_rotated_filter_forward_cuda(const Tensor input,
function active_rotated_filter_backward_cuda (line 1750) | void active_rotated_filter_backward_cuda(const Tensor grad_out,
function convex_iou_cuda (line 1772) | void convex_iou_cuda(const Tensor pointsets, const Tensor polygons,
function convex_giou_cuda (line 1777) | void convex_giou_cuda(const Tensor pointsets, const Tensor polygons,
function Tensor (line 1795) | Tensor diff_iou_rotated_sort_vertices_forward_cuda(Tensor vertices, Tens...
function chamfer_distance_forward_cuda (line 1815) | void chamfer_distance_forward_cuda(const Tensor xyz1, const Tensor xyz2,
function chamfer_distance_backward_cuda (line 1822) | void chamfer_distance_backward_cuda(const Tensor xyz1, const Tensor xyz2,
function prroi_pool_forward_cuda (line 1856) | void prroi_pool_forward_cuda(Tensor input, Tensor rois, Tensor output,
function prroi_pool_backward_cuda (line 1863) | void prroi_pool_backward_cuda(Tensor grad_output, Tensor rois,
function prroi_pool_coor_backward_cuda (line 1871) | void prroi_pool_coor_backward_cuda(Tensor output, Tensor grad_output,
FILE: mmcv/ops/csrc/pytorch/deform_conv.cpp
function deformable_im2col_impl (line 5) | void deformable_im2col_impl(Tensor data_im, Tensor data_offset,
function deformable_col2im_impl (line 19) | void deformable_col2im_impl(Tensor data_col, Tensor data_offset,
function deformable_col2im_coord_impl (line 33) | void deformable_col2im_coord_impl(
function deform_conv_shape_check (line 45) | void deform_conv_shape_check(at::Tensor input, at::Tensor offset,
function deform_conv_forward (line 140) | void deform_conv_forward(Tensor input, Tensor weight, Tensor offset,
function deform_conv_backward_input (line 262) | void deform_conv_backward_input(Tensor input, Tensor offset, Tensor grad...
function deform_conv_backward_parameters (line 397) | void deform_conv_backward_parameters(Tensor input, Tensor offset,
FILE: mmcv/ops/csrc/pytorch/deform_roi_pool.cpp
function deform_roi_pool_forward_impl (line 5) | void deform_roi_pool_forward_impl(Tensor input, Tensor rois, Tensor offset,
function deform_roi_pool_backward_impl (line 14) | void deform_roi_pool_backward_impl(Tensor grad_output, Tensor input,
function deform_roi_pool_forward (line 25) | void deform_roi_pool_forward(Tensor input, Tensor rois, Tensor offset,
function deform_roi_pool_backward (line 34) | void deform_roi_pool_backward(Tensor grad_output, Tensor input, Tensor r...
FILE: mmcv/ops/csrc/pytorch/diff_iou_rotated.cpp
function Tensor (line 5) | Tensor diff_iou_rotated_sort_vertices_forward_impl(Tensor vertices, Tens...
function Tensor (line 11) | Tensor diff_iou_rotated_sort_vertices_forward(Tensor vertices, Tensor mask,
FILE: mmcv/ops/csrc/pytorch/filtered_lrelu.cpp
function filtered_lrelu_op_impl (line 4) | std::tuple<torch::Tensor, torch::Tensor, int> filtered_lrelu_op_impl(
function filtered_lrelu (line 14) | std::tuple<torch::Tensor, torch::Tensor, int> filtered_lrelu(
function filtered_lrelu_act_op_impl (line 24) | torch::Tensor filtered_lrelu_act_op_impl(torch::Tensor x, torch::Tensor si,
function filtered_lrelu_act_ (line 32) | torch::Tensor filtered_lrelu_act_(torch::Tensor x, torch::Tensor si, int...
FILE: mmcv/ops/csrc/pytorch/focal_loss.cpp
function sigmoid_focal_loss_forward_impl (line 19) | void sigmoid_focal_loss_forward_impl(Tensor input, Tensor target, Tensor...
function sigmoid_focal_loss_backward_impl (line 25) | void sigmoid_focal_loss_backward_impl(Tensor input, Tensor target,
function softmax_focal_loss_forward_impl (line 32) | void softmax_focal_loss_forward_impl(Tensor input, Tensor target, Tensor...
function softmax_focal_loss_backward_impl (line 38) | void softmax_focal_loss_backward_impl(Tensor input, Tensor target,
function sigmoid_focal_loss_forward_diopi (line 47) | void sigmoid_focal_loss_forward_diopi(Tensor input, Tensor target,
function sigmoid_focal_loss_backward_diopi (line 87) | void sigmoid_focal_loss_backward_diopi(Tensor input, Tensor target,
function sigmoid_focal_loss_forward (line 128) | void sigmoid_focal_loss_forward(Tensor input, Tensor target, Tensor weight,
function sigmoid_focal_loss_backward (line 137) | void sigmoid_focal_loss_backward(Tensor input, Tensor target, Tensor wei...
function softmax_focal_loss_forward (line 148) | void softmax_focal_loss_forward(Tensor input, Tensor target, Tensor weight,
function softmax_focal_loss_backward (line 153) | void softmax_focal_loss_backward(Tensor input, Tensor target, Tensor wei...
FILE: mmcv/ops/csrc/pytorch/furthest_point_sample.cpp
function furthest_point_sampling_forward_impl (line 7) | void furthest_point_sampling_forward_impl(Tensor points_tensor,
function furthest_point_sampling_with_dist_forward_impl (line 14) | void furthest_point_sampling_with_dist_forward_impl(Tensor points_tensor,
function furthest_point_sampling_forward (line 22) | void furthest_point_sampling_forward(Tensor points_tensor, Tensor temp_t...
function furthest_point_sampling_with_dist_forward (line 28) | void furthest_point_sampling_with_dist_forward(Tensor points_tensor,
FILE: mmcv/ops/csrc/pytorch/fused_bias_leakyrelu.cpp
function fused_bias_leakyrelu_op_impl (line 105) | torch::Tensor fused_bias_leakyrelu_op_impl(const torch::Tensor& input,
function fused_bias_leakyrelu (line 113) | torch::Tensor fused_bias_leakyrelu(const torch::Tensor& input,
FILE: mmcv/ops/csrc/pytorch/fused_spconv_ops.cpp
function fused_indice_conv_batchnorm_forward_impl (line 18) | torch::Tensor fused_indice_conv_batchnorm_forward_impl(
function fused_indice_conv_batchnorm_forward (line 27) | torch::Tensor fused_indice_conv_batchnorm_forward(
FILE: mmcv/ops/csrc/pytorch/gather_points.cpp
function gather_points_forward_impl (line 4) | void gather_points_forward_impl(int b, int c, int n, int npoints,
function gather_points_backward_impl (line 11) | void gather_points_backward_impl(int b, int c, int n, int npoints,
function gather_points_forward (line 18) | void gather_points_forward(Tensor points_tensor, Tensor idx_tensor,
function gather_points_backward (line 25) | void gather_points_backward(Tensor grad_out_tensor, Tensor idx_tensor,
FILE: mmcv/ops/csrc/pytorch/group_points.cpp
function group_points_forward_impl (line 8) | void group_points_forward_impl(int b, int c, int n, int npoints, int nsa...
function group_points_backward_impl (line 15) | void group_points_backward_impl(int b, int c, int n, int npoints, int ns...
function group_points_forward (line 22) | void group_points_forward(Tensor points_tensor, Tensor idx_tensor,
function group_points_backward (line 29) | void group_points_backward(Tensor grad_out_tensor, Tensor idx_tensor,
function stack_group_points_backward_impl (line 36) | void stack_group_points_backward_impl(int b, int c, int m, int n, int ns...
function stack_group_points_backward (line 47) | void stack_group_points_backward(Tensor grad_out_tensor, Tensor idx_tensor,
function stack_group_points_forward_impl (line 57) | void stack_group_points_forward_impl(int b, int c, int m, int nsample,
function stack_group_points_forward (line 68) | void stack_group_points_forward(Tensor features_tensor,
FILE: mmcv/ops/csrc/pytorch/info.cpp
function get_hiprt_version (line 9) | int get_hiprt_version() {
function get_cudart_version (line 16) | int get_cudart_version() { return CUDART_VERSION; }
function get_compiling_cuda_version (line 20) | std::string get_compiling_cuda_version() {
function get_compiler_version (line 46) | std::string get_compiler_version() {
FILE: mmcv/ops/csrc/pytorch/iou3d.cpp
function iou3d_boxes_overlap_bev_forward_impl (line 15) | void iou3d_boxes_overlap_bev_forward_impl(const int num_a, const Tensor ...
function iou3d_nms3d_forward_impl (line 22) | void iou3d_nms3d_forward_impl(const Tensor boxes, Tensor &keep,
function iou3d_nms3d_normal_forward_impl (line 28) | void iou3d_nms3d_normal_forward_impl(const Tensor boxes, Tensor &keep,
function iou3d_boxes_overlap_bev_forward (line 35) | void iou3d_boxes_overlap_bev_forward(Tensor boxes_a, Tensor boxes_b,
function iou3d_nms3d_forward (line 47) | void iou3d_nms3d_forward(Tensor boxes, Tensor keep, Tensor keep_num,
function iou3d_nms3d_normal_forward (line 57) | void iou3d_nms3d_normal_forward(Tensor boxes, Tensor keep, Tensor keep_num,
FILE: mmcv/ops/csrc/pytorch/knn.cpp
function knn_forward_impl (line 7) | void knn_forward_impl(int b, int n, int m, int nsample, const Tensor xyz,
function knn_forward (line 13) | void knn_forward(Tensor xyz_tensor, Tensor new_xyz_tensor, Tensor idx_te...
FILE: mmcv/ops/csrc/pytorch/masked_conv2d.cpp
function masked_im2col_forward_impl (line 5) | void masked_im2col_forward_impl(const Tensor im, const Tensor mask_h_idx,
function masked_col2im_forward_impl (line 13) | void masked_col2im_forward_impl(const Tensor col, const Tensor mask_h_idx,
function masked_im2col_forward (line 20) | void masked_im2col_forward(const Tensor im, const Tensor mask_h_idx,
function masked_col2im_forward (line 28) | void masked_col2im_forward(const Tensor col, const Tensor mask_h_idx,
FILE: mmcv/ops/csrc/pytorch/min_area_polygons.cpp
function min_area_polygons_impl (line 5) | void min_area_polygons_impl(const Tensor pointsets, Tensor polygons) {
function min_area_polygons (line 9) | void min_area_polygons(const Tensor pointsets, Tensor polygons) {
FILE: mmcv/ops/csrc/pytorch/mlu/ball_query_mlu.cpp
function ball_query_forward_mlu (line 14) | void ball_query_forward_mlu(int b, int n, int m, float min_radius,
FILE: mmcv/ops/csrc/pytorch/mlu/bbox_overlaps_mlu.cpp
function bbox_overlaps_mlu (line 15) | void bbox_overlaps_mlu(const Tensor bboxes1, const Tensor bboxes2, Tenso...
FILE: mmcv/ops/csrc/pytorch/mlu/box_iou_rotated.cpp
function BoxIouRotatedMLUKernelLauncher (line 14) | void BoxIouRotatedMLUKernelLauncher(const Tensor boxes1, const Tensor bo...
function box_iou_rotated_mlu (line 46) | void box_iou_rotated_mlu(const Tensor boxes1, const Tensor boxes2, Tenso...
FILE: mmcv/ops/csrc/pytorch/mlu/carafe_mlu.cpp
function CARAFEForwardMLUKernelLauncher (line 14) | void CARAFEForwardMLUKernelLauncher(const Tensor input, const Tensor mask,
function CARAFEBackwardMLUKernelLauncher (line 89) | void CARAFEBackwardMLUKernelLauncher(
function carafe_forward_mlu (line 179) | void carafe_forward_mlu(Tensor features, Tensor masks, Tensor rfeatures,
function carafe_backward_mlu (line 186) | void carafe_backward_mlu(Tensor top_grad, Tensor rfeatures, Tensor masks,
FILE: mmcv/ops/csrc/pytorch/mlu/deform_roi_pool_mlu.cpp
function DeformRoIPoolForwardMLUKernelLauncher (line 14) | void DeformRoIPoolForwardMLUKernelLauncher(Tensor input, Tensor rois,
function DeformRoIPoolBackwardMLUKernelLauncher (line 61) | void DeformRoIPoolBackwardMLUKernelLauncher(
function deform_roi_pool_forward_mlu (line 125) | void deform_roi_pool_forward_mlu(Tensor input, Tensor rois, Tensor offset,
function deform_roi_pool_backward_mlu (line 134) | void deform_roi_pool_backward_mlu(Tensor grad_output, Tensor input, Tens...
FILE: mmcv/ops/csrc/pytorch/mlu/diff_iou_rotated_mlu.cpp
function Tensor (line 14) | Tensor diff_iou_rotated_sort_vertices_forward_mlu(Tensor vertices, Tenso...
FILE: mmcv/ops/csrc/pytorch/mlu/focal_loss_sigmoid_mlu.cpp
function sigmoid_focal_loss_forward_mlu (line 17) | void sigmoid_focal_loss_forward_mlu(Tensor input, Tensor target, Tensor ...
function sigmoid_focal_loss_backward_mlu (line 91) | void sigmoid_focal_loss_backward_mlu(Tensor input, Tensor target, Tensor...
FILE: mmcv/ops/csrc/pytorch/mlu/iou3d_mlu.cpp
function IoU3DNMS3DMLUKernelLauncher (line 15) | void IoU3DNMS3DMLUKernelLauncher(Tensor boxes, Tensor &keep, Tensor &kee...
function iou3d_nms3d_forward_mlu (line 72) | void iou3d_nms3d_forward_mlu(const Tensor boxes, Tensor &keep, Tensor &k...
FILE: mmcv/ops/csrc/pytorch/mlu/masked_conv2d_mlu.cpp
function policyFunc (line 31) | static void policyFunc(const int mask_cnt, cnrtDim3_t *k_dim,
function MaskedIm2colForwardMLUKernelLauncher (line 43) | void MaskedIm2colForwardMLUKernelLauncher(const Tensor im,
function MaskedCol2imForwardMLUKernelLauncher (line 123) | void MaskedCol2imForwardMLUKernelLauncher(const Tensor col,
function masked_im2col_forward_mlu (line 195) | void masked_im2col_forward_mlu(const Tensor im, const Tensor mask_h_idx,
function masked_col2im_forward_mlu (line 205) | void masked_col2im_forward_mlu(const Tensor col, const Tensor mask_h_idx,
FILE: mmcv/ops/csrc/pytorch/mlu/mlu_common_helper.cpp
function mluOpDataType_t (line 15) | mluOpDataType_t getMluOpDataType(const caffe2::TypeMeta& data_type) {
function mluOpTensorLayout_t (line 39) | mluOpTensorLayout_t getMluOpSuggestLayout(const at::Tensor& input) {
function mluOpReduceMode_t (line 59) | mluOpReduceMode_t getMluOpReduceMode(const reduce_t reduce_type) {
function mluOpHandle_t (line 135) | mluOpHandle_t mluOpGetCurrentHandle(c10::DeviceIndex device_index) {
FILE: mmcv/ops/csrc/pytorch/mlu/mlu_common_helper.h
function reduce_t (line 48) | enum class reduce_t { SUM = 0, MEAN = 1, MAX = 2 };
FILE: mmcv/ops/csrc/pytorch/mlu/ms_deform_attn_mlu.cpp
function Tensor (line 16) | Tensor MsDeformAttnForwardLauncher(const Tensor& value,
function MsDeformAttnBackwardLauncher (line 49) | void MsDeformAttnBackwardLauncher(
function Tensor (line 90) | Tensor ms_deform_attn_mlu_forward(const Tensor& value,
function ms_deform_attn_mlu_backward (line 100) | void ms_deform_attn_mlu_backward(
FILE: mmcv/ops/csrc/pytorch/mlu/nms_mlu.cpp
function Tensor (line 15) | Tensor NMSMLUKernelLauncher(Tensor boxes, Tensor scores, float iou_thres...
function Tensor (line 81) | Tensor nms_mlu(Tensor boxes, Tensor scores, float iou_threshold, int off...
FILE: mmcv/ops/csrc/pytorch/mlu/nms_rotated_mlu.cpp
function Tensor (line 14) | Tensor nms_rotated_mlu(Tensor boxes, Tensor scores, float iou_threshold) {
FILE: mmcv/ops/csrc/pytorch/mlu/psamask_mlu.cpp
function PSAMaskForwardMLUKernelLauncher (line 14) | void PSAMaskForwardMLUKernelLauncher(const int psa_type, const Tensor x,
function PSAMaskBackwardMLUKernelLauncher (line 44) | void PSAMaskBackwardMLUKernelLauncher(const int psa_type, const Tensor dy,
function psamask_forward_mlu (line 77) | void psamask_forward_mlu(const int psa_type, const Tensor input, Tensor ...
function psamask_backward_mlu (line 87) | void psamask_backward_mlu(const int psa_type, const Tensor grad_output,
FILE: mmcv/ops/csrc/pytorch/mlu/roi_align_mlu.cpp
function ROIAlignForwardMLUKernelLauncher (line 14) | void ROIAlignForwardMLUKernelLauncher(Tensor input, Tensor rois, Tensor ...
function ROIAlignBackwardMLUKernelLauncher (line 83) | void ROIAlignBackwardMLUKernelLauncher(Tensor grad, Tensor rois,
function roi_align_forward_mlu (line 153) | void roi_align_forward_mlu(Tensor input, Tensor rois, Tensor output,
function roi_align_backward_mlu (line 162) | void roi_align_backward_mlu(Tensor grad_output, Tensor rois, Tensor argm...
FILE: mmcv/ops/csrc/pytorch/mlu/roi_align_rotated_mlu.cpp
function ROIAlignRotatedForwardMLUKernelLauncher (line 14) | void ROIAlignRotatedForwardMLUKernelLauncher(Tensor input, Tensor rois,
function ROIAlignRotatedBackwardMLUKernelLauncher (line 51) | void ROIAlignRotatedBackwardMLUKernelLauncher(
function roi_align_rotated_forward_mlu (line 86) | void roi_align_rotated_forward_mlu(Tensor input, Tensor rois, Tensor out...
function roi_align_rotated_backward_mlu (line 95) | void roi_align_rotated_backward_mlu(Tensor top_grad, Tensor rois,
FILE: mmcv/ops/csrc/pytorch/mlu/roi_pool_mlu.cpp
function policyFuncForward (line 34) | static void policyFuncForward(const int bin_num, cnrtDim3_t *k_dim,
function ROIPoolForwardMLUKernelLauncher (line 45) | void ROIPoolForwardMLUKernelLauncher(Tensor input, Tensor rois, Tensor o...
function policyFuncBackward (line 140) | static void policyFuncBackward(cnrtDim3_t *k_dim, cnrtFunctionType_t *k_...
function ROIPoolBackwardMLUKernelLauncher (line 147) | void ROIPoolBackwardMLUKernelLauncher(Tensor grad_output, Tensor rois,
function roi_pool_forward_mlu (line 252) | void roi_pool_forward_mlu(Tensor input, Tensor rois, Tensor output,
function roi_pool_backward_mlu (line 259) | void roi_pool_backward_mlu(Tensor grad_output, Tensor rois, Tensor argmax,
FILE: mmcv/ops/csrc/pytorch/mlu/roiaware_pool3d_mlu.cpp
function RoiawarePool3dForwardMLUKernelLauncher (line 14) | void RoiawarePool3dForwardMLUKernelLauncher(
function roiaware_pool3d_forward_mlu (line 81) | void roiaware_pool3d_forward_mlu(int boxes_num, int pts_num, int channels,
function RoiawarePool3dBackwardMLUKernelLauncher (line 103) | void RoiawarePool3dBackwardMLUKernelLauncher(
function roiaware_pool3d_backward_mlu (line 145) | void roiaware_pool3d_backward_mlu(int boxes_num, int out_x, int out_y,
FILE: mmcv/ops/csrc/pytorch/mlu/roipoint_pool3d_mlu.cpp
function RoIPointPool3dForwardMLUKernelLauncher (line 14) | void RoIPointPool3dForwardMLUKernelLauncher(
function roipoint_pool3d_forward_mlu (line 131) | void roipoint_pool3d_forward_mlu(int batch_size, int pts_num, int boxes_...
FILE: mmcv/ops/csrc/pytorch/mlu/rotated_feature_align_mlu.cpp
function RotatedFeatureAlignForwardMLUKernelLauncher (line 14) | void RotatedFeatureAlignForwardMLUKernelLauncher(const Tensor features,
function RotatedFeatureAlignBackwardMLUKernelLauncher (line 50) | void RotatedFeatureAlignBackwardMLUKernelLauncher(const Tensor top_grad,
function rotated_feature_align_forward_mlu (line 86) | void rotated_feature_align_forward_mlu(const Tensor features,
function rotated_feature_align_backward_mlu (line 94) | void rotated_feature_align_backward_mlu(const Tensor top_grad,
FILE: mmcv/ops/csrc/pytorch/mlu/scatter_points_mlu.cpp
function dynamic_point_to_voxel_forward_mlu (line 14) | std::vector<Tensor> dynamic_point_to_voxel_forward_mlu(
function dynamic_point_to_voxel_backward_mlu (line 76) | void dynamic_point_to_voxel_backward_mlu(
FILE: mmcv/ops/csrc/pytorch/mlu/sparse_conv_mlu.cpp
function GetIndicePairsForwardMLUKernelLauncher (line 21) | std::vector<torch::Tensor> GetIndicePairsForwardMLUKernelLauncher(
function IndiceConvForwardMLUKernelLauncher (line 146) | torch::Tensor IndiceConvForwardMLUKernelLauncher(
function IndiceConvBackwardMLUKernelLauncher (line 239) | std::vector<torch::Tensor> IndiceConvBackwardMLUKernelLauncher(
function indice_conv_forward_mlu (line 392) | torch::Tensor indice_conv_forward_mlu(torch::Tensor features,
function indice_conv_backward_mlu (line 402) | std::vector<torch::Tensor> indice_conv_backward_mlu(
FILE: mmcv/ops/csrc/pytorch/mlu/three_nn_mlu.cpp
function ThreeNNMLUKernelLauncher (line 14) | void ThreeNNMLUKernelLauncher(int b, int n, int m, const Tensor unknown,
function three_nn_forward_mlu (line 55) | void three_nn_forward_mlu(int b, int n, int m, const Tensor unknown,
FILE: mmcv/ops/csrc/pytorch/mlu/tin_shift_mlu.cpp
function TINShiftForwardMLUKernelLauncher (line 14) | void TINShiftForwardMLUKernelLauncher(Tensor input, Tensor shift,
function TINShiftBackwardMLUKernelLauncher (line 67) | void TINShiftBackwardMLUKernelLauncher(Tensor grad_output, Tensor shift,
function tin_shift_forward_mlu (line 123) | void tin_shift_forward_mlu(Tensor input, Tensor shift, Tensor output) {
function tin_shift_backward_mlu (line 127) | void tin_shift_backward_mlu(Tensor grad_output, Tensor shift,
FILE: mmcv/ops/csrc/pytorch/mlu/voxelization_mlu.cpp
function HardVoxelizeForwardMLUKernelLauncher (line 27) | int HardVoxelizeForwardMLUKernelLauncher(
function hard_voxelize_forward_mlu (line 78) | int hard_voxelize_forward_mlu(const at::Tensor &points, at::Tensor &voxels,
FILE: mmcv/ops/csrc/pytorch/modulated_deform_conv.cpp
function modulated_deformable_im2col_impl (line 19) | void modulated_deformable_im2col_impl(
function modulated_deformable_col2im_impl (line 33) | void modulated_deformable_col2im_impl(
function modulated_deformable_col2im_coord_impl (line 47) | void modulated_deformable_col2im_coord_impl(
function modulated_deform_conv_forward_fallthrough (line 62) | void modulated_deform_conv_forward_fallthrough(
function modulated_deform_conv_backward_fallthrough (line 140) | void modulated_deform_conv_backward_fallthrough(
function modulated_deform_conv_forward_diopi (line 254) | void modulated_deform_conv_forward_diopi(
function modulated_deform_conv_backward_diopi (line 312) | void modulated_deform_conv_backward_diopi(
function modulated_deform_conv_forward (line 395) | void modulated_deform_conv_forward(
function modulated_deform_conv_backward (line 414) | void modulated_deform_conv_backward(
FILE: mmcv/ops/csrc/pytorch/ms_deform_attn.cpp
function Tensor (line 15) | Tensor ms_deform_attn_impl_forward(const Tensor &value,
function ms_deform_attn_impl_backward (line 26) | void ms_deform_attn_impl_backward(
function Tensor (line 38) | Tensor ms_deform_attn_forward(const Tensor &value, const Tensor &spatial...
function ms_deform_attn_backward (line 48) | void ms_deform_attn_backward(const Tensor &value, const Tensor &spatial_...
FILE: mmcv/ops/csrc/pytorch/musa/musabind.cpp
function assign_score_withk_forward_musa (line 14) | void assign_score_withk_forward_musa(int B, int N0, int N1, int M, int K...
function assign_score_withk_backward_musa (line 23) | void assign_score_withk_backward_musa(
function ball_query_forward_musa (line 55) | void ball_query_forward_musa(int b, int n, int m, float min_radius,
function stack_ball_query_forward_musa (line 76) | void stack_ball_query_forward_musa(float max_radius, int nsample,
function bbox_overlaps_musa (line 97) | void bbox_overlaps_musa(const Tensor bboxes1, const Tensor bboxes2, Tens...
function border_align_forward_musa (line 117) | void border_align_forward_musa(const Tensor &input, const Tensor &boxes,
function border_align_backward_musa (line 124) | void border_align_backward_musa(const Tensor &grad_output, const Tensor ...
function carafe_forward_musa (line 173) | void carafe_forward_musa(Tensor features, Tensor masks, Tensor rfeatures,
function carafe_backward_musa (line 181) | void carafe_backward_musa(Tensor top_grad, Tensor rfeatures, Tensor masks,
function carafe_naive_forward_musa (line 217) | void carafe_naive_forward_musa(Tensor features, Tensor masks, Tensor out...
function carafe_naive_backward_musa (line 224) | void carafe_naive_backward_musa(Tensor top_grad, Tensor features, Tensor...
function correlation_forward_musa (line 261) | void correlation_forward_musa(Tensor input1, Tensor input2, Tensor output,
function correlation_backward_musa (line 271) | void correlation_backward_musa(Tensor grad_output, Tensor input1, Tensor...
function deform_roi_pool_forward_musa (line 366) | void deform_roi_pool_forward_musa(Tensor input, Tensor rois, Tensor offset,
function deform_roi_pool_backward_musa (line 375) | void deform_roi_pool_backward_musa(Tensor grad_output, Tensor input,
function sigmoid_focal_loss_forward_musa (line 425) | void sigmoid_focal_loss_forward_musa(Tensor input, Tensor target, Tensor...
function sigmoid_focal_loss_backward_musa (line 431) | void sigmoid_focal_loss_backward_musa(Tensor input, Tensor target,
function softmax_focal_loss_forward_musa (line 438) | void softmax_focal_loss_forward_musa(Tensor input, Tensor target, Tensor...
function softmax_focal_loss_backward_musa (line 444) | void softmax_focal_loss_backward_musa(Tensor input, Tensor target,
function furthest_point_sampling_forward_musa (line 483) | void furthest_point_sampling_forward_musa(Tensor points_tensor,
function furthest_point_sampling_with_dist_forward_musa (line 492) | void furthest_point_sampling_with_dist_forward_musa(Tensor points_tensor,
function gather_points_forward_musa (line 563) | void gather_points_forward_musa(int b, int c, int n, int npoints,
function gather_points_backward_musa (line 569) | void gather_points_backward_musa(int b, int c, int n, int npoints,
function group_points_forward_musa (line 598) | void group_points_forward_musa(int b, int c, int n, int npoints, int nsa...
function group_points_backward_musa (line 605) | void group_points_backward_musa(int b, int c, int n, int npoints, int ns...
function stack_group_points_forward_musa (line 634) | void stack_group_points_forward_musa(int b, int c, int m, int nsample,
function stack_group_points_backward_musa (line 645) | void stack_group_points_backward_musa(int b, int c, int m, int n, int ns...
function iou3d_boxes_overlap_bev_forward_musa (line 689) | void iou3d_boxes_overlap_bev_forward_musa(const int num_a, const Tensor ...
function iou3d_nms3d_forward_musa (line 696) | void iou3d_nms3d_forward_musa(const Tensor boxes, Tensor &keep,
function iou3d_nms3d_normal_forward_musa (line 702) | void iou3d_nms3d_normal_forward_musa(const Tensor boxes, Tensor &keep,
function knn_forward_musa (line 730) | void knn_forward_musa(int b, int n, int m, int nsample, const Tensor xyz,
function masked_im2col_forward_musa (line 752) | void masked_im2col_forward_musa(const Tensor im, const Tensor mask_h_idx,
function masked_col2im_forward_musa (line 762) | void masked_col2im_forward_musa(const Tensor col, const Tensor mask_h_idx,
function Tensor (line 876) | Tensor nms_musa(Tensor boxes, Tensor scores, float iou_threshold, int of...
function points_in_boxes_part_forward_musa (line 893) | void points_in_boxes_part_forward_musa(int batch_size, int boxes_num,
function points_in_boxes_all_forward_musa (line 901) | void points_in_boxes_all_forward_musa(int batch_size, int boxes_num,
function psamask_forward_musa (line 935) | void psamask_forward_musa(const int psa_type, const Tensor input, Tensor...
function psamask_backward_musa (line 945) | void psamask_backward_musa(const int psa_type, const Tensor grad_output,
function roi_align_forward_musa (line 982) | void roi_align_forward_musa(Tensor input, Tensor rois, Tensor output,
function roi_align_backward_musa (line 992) | void roi_align_backward_musa(Tensor grad_output, Tensor rois, Tensor arg...
function roi_align_rotated_forward_musa (line 1029) | void roi_align_rotated_forward_musa(Tensor input, Tensor rois, Tensor ou...
function roi_align_rotated_backward_musa (line 1050) | void roi_align_rotated_backward_musa(Tensor top_grad, Tensor rois,
function riroi_align_rotated_forward_musa (line 1100) | void riroi_align_rotated_forward_musa(Tensor features, Tensor rois,
function riroi_align_rotated_backward_musa (line 1122) | void riroi_align_rotated_backward_musa(Tensor top_grad, Tensor rois,
function roiaware_pool3d_forward_musa (line 1172) | void roiaware_pool3d_forward_musa(int boxes_num, int pts_num, int channels,
function roiaware_pool3d_backward_musa (line 1184) | void roiaware_pool3d_backward_musa(int boxes_num, int out_x, int out_y,
function roipoint_pool3d_forward_musa (line 1219) | void roipoint_pool3d_forward_musa(int batch_size, int pts_num, int boxes...
function roi_pool_forward_musa (line 1248) | void roi_pool_forward_musa(Tensor input, Tensor rois, Tensor output,
function roi_pool_backward_musa (line 1255) | void roi_pool_backward_musa(Tensor grad_output, Tensor rois, Tensor argmax,
function dynamic_point_to_voxel_forward_musa (line 1283) | std::vector<torch::Tensor> dynamic_point_to_voxel_forward_musa(
function dynamic_point_to_voxel_backward_musa (line 1290) | void dynamic_point_to_voxel_backward_musa(
function sync_bn_forward_mean_musa (line 1338) | void sync_bn_forward_mean_musa(const Tensor input, Tensor mean) {
function sync_bn_forward_var_musa (line 1342) | void sync_bn_forward_var_musa(const Tensor input, const Tensor mean,
function sync_bn_forward_output_musa (line 1347) | void sync_bn_forward_output_musa(const Tensor input, const Tensor mean,
function sync_bn_backward_param_musa (line 1358) | void sync_bn_backward_param_musa(const Tensor grad_output, const Tensor ...
function sync_bn_backward_data_musa (line 1364) | void sync_bn_backward_data_musa(const Tensor grad_output, const Tensor w...
function three_interpolate_forward_musa (line 1413) | void three_interpolate_forward_musa(int b, int c, int m, int n,
function three_interpolate_backward_musa (line 1420) | void three_interpolate_backward_musa(int b, int c, int n, int m,
function three_nn_forward_musa (line 1443) | void three_nn_forward_musa(int b, int n, int m, const Tensor unknown,
function tin_shift_forward_musa (line 1458) | void tin_shift_forward_musa(Tensor input, Tensor shift, Tensor output) {
function tin_shift_backward_musa (line 1462) | void tin_shift_backward_musa(Tensor grad_output, Tensor shift,
function hard_voxelize_forward_musa (line 1502) | int hard_voxelize_forward_musa(const at::Tensor &points, at::Tensor &vox...
function nondeterministic_hard_voxelize_forward_musa (line 1514) | int nondeterministic_hard_voxelize_forward_musa(
function dynamic_voxelize_forward_musa (line 1524) | void dynamic_voxelize_forward_musa(const at::Tensor &points, at::Tensor ...
function rotated_feature_align_forward_musa (line 1570) | void rotated_feature_align_forward_musa(const Tensor features,
function rotated_feature_align_backward_musa (line 1578) | void rotated_feature_align_backward_musa(const Tensor top_grad,
function points_in_polygons_forward_musa (line 1606) | void points_in_polygons_forward_musa(const Tensor points, const Tensor p...
function indice_maxpool_forward_musa (line 1625) | torch::Tensor indice_maxpool_forward_musa(torch::Tensor features,
function indice_maxpool_backward_musa (line 1646) | torch::Tensor indice_maxpool_backward_musa(torch::Tensor features,
function indice_conv_forward_musa (line 1669) | torch::Tensor indice_conv_forward_musa(torch::Tensor features,
function indice_conv_backward_musa (line 1693) | std::vector<torch::Tensor> indice_conv_backward_musa(
function fused_indice_conv_batchnorm_forward_musa (line 1714) | torch::Tensor fused_indice_conv_batchnorm_forward_musa(
function min_area_polygons_musa (line 1733) | void min_area_polygons_musa(const Tensor pointsets, Tensor polygons) {
function active_rotated_filter_forward_musa (line 1749) | void active_rotated_filter_forward_musa(const Tensor input,
function active_rotated_filter_backward_musa (line 1754) | void active_rotated_filter_backward_musa(const Tensor grad_out,
function convex_iou_musa (line 1776) | void convex_iou_musa(const Tensor pointsets, const Tensor polygons,
function convex_giou_musa (line 1781) | void convex_giou_musa(const Tensor pointsets, const Tensor polygons,
function Tensor (line 1799) | Tensor diff_iou_rotated_sort_vertices_forward_musa(Tensor vertices, Tens...
function chamfer_distance_forward_musa (line 1822) | void chamfer_distance_forward_musa(const Tensor xyz1, const Tensor xyz2,
function chamfer_distance_backward_musa (line 1829) | void chamfer_distance_backward_musa(const Tensor xyz1, const Tensor xyz2,
function prroi_pool_forward_musa (line 1864) | void prroi_pool_forward_musa(Tensor input, Tensor rois, Tensor output,
function prroi_pool_backward_musa (line 1871) | void prroi_pool_backward_musa(Tensor grad_output, Tensor rois,
function prroi_pool_coor_backward_musa (line 1879) | void prroi_pool_coor_backward_musa(Tensor output, Tensor grad_output,
FILE: mmcv/ops/csrc/pytorch/nms.cpp
function Tensor (line 20) | Tensor nms_impl(Tensor boxes, Tensor scores, float iou_threshold, int of...
function Tensor (line 24) | Tensor softnms_impl(Tensor boxes, Tensor scores, Tensor dets,
function nms_match_impl (line 31) | std::vector<std::vector<int> > nms_match_impl(Tensor dets,
function Tensor (line 37) | Tensor nms_diopi(Tensor boxes, Tensor scores, float iou_threshold, int o...
function Tensor (line 76) | Tensor nms(Tensor boxes, Tensor scores, float iou_threshold, int offset) {
function Tensor (line 84) | Tensor softnms(Tensor boxes, Tensor scores, Tensor dets, float iou_thres...
function nms_match (line 90) | std::vector<std::vector<int> > nms_match(Tensor dets, float iou_threshol...
FILE: mmcv/ops/csrc/pytorch/nms_quadri.cpp
function Tensor (line 20) | Tensor nms_quadri(const Tensor dets, const Tensor scores, const Tensor o...
FILE: mmcv/ops/csrc/pytorch/nms_rotated.cpp
function Tensor (line 34) | Tensor nms_rotated(const Tensor dets, const Tensor scores, const Tensor ...
FILE: mmcv/ops/csrc/pytorch/npu/active_rotated_filter_npu.cpp
function active_rotated_filter_forward_npu (line 12) | void active_rotated_filter_forward_npu(const Tensor input, const Tensor ...
function active_rotated_filter_backward_npu (line 22) | void active_rotated_filter_backward_npu(const Tensor grad_out,
FILE: mmcv/ops/csrc/pytorch/npu/assign_score_withk_npu.cpp
function assign_score_withk_forward_npu (line 6) | void assign_score_withk_forward_npu(int B, int N0, int N1, int M, int K,...
function assign_score_withk_backward_npu (line 25) | void assign_score_withk_backward_npu(
FILE: mmcv/ops/csrc/pytorch/npu/ball_query_npu.cpp
function ball_query_forward_npu (line 6) | void ball_query_forward_npu(int b, int n, int m, float min_radius,
FILE: mmcv/ops/csrc/pytorch/npu/bbox_overlaps_npu.cpp
function bbox_overlaps_npu (line 10) | void bbox_overlaps_npu(const Tensor bboxes1, const Tensor bboxes2, Tenso...
FILE: mmcv/ops/csrc/pytorch/npu/border_align_npu.cpp
function border_align_forward_npu (line 10) | void border_align_forward_npu(const Tensor &input, const Tensor &boxes,
function border_align_backward_npu (line 46) | void border_align_backward_npu(const Tensor &grad_output, const Tensor &...
FILE: mmcv/ops/csrc/pytorch/npu/box_iou_quadri_npu.cpp
function box_iou_quadri_npu (line 9) | void box_iou_quadri_npu(const Tensor boxes1, const Tensor boxes2, Tensor...
FILE: mmcv/ops/csrc/pytorch/npu/box_iou_rotated_npu.cpp
function box_iou_rotated_npu (line 9) | void box_iou_rotated_npu(const Tensor boxes1, const Tensor boxes2, Tenso...
FILE: mmcv/ops/csrc/pytorch/npu/boxes_overlap_bev_npu.cpp
function iou3d_boxes_overlap_bev_forward_npu (line 15) | void iou3d_boxes_overlap_bev_forward_npu(const int num_a, const Tensor b...
FILE: mmcv/ops/csrc/pytorch/npu/chamfer_distance_npu.cpp
function chamfer_distance_forward_npu (line 6) | void chamfer_distance_forward_npu(Tensor XYZ1, Tensor XYZ2, Tensor dist1,
function chamfer_distance_backward_npu (line 23) | void chamfer_distance_backward_npu(Tensor xyz1, Tensor xyz2, Tensor idx1,
FILE: mmcv/ops/csrc/pytorch/npu/deform_roi_pool.cpp
function deform_roi_pool_forward_npu (line 18) | void deform_roi_pool_forward_npu(Tensor input, Tensor rois, Tensor offset,
function deform_roi_pool_backward_npu (line 38) | void deform_roi_pool_backward_npu(Tensor grad_output, Tensor input, Tens...
FILE: mmcv/ops/csrc/pytorch/npu/diff_iou_rotated_npu.cpp
function Tensor (line 5) | Tensor diff_iou_rotated_sort_vertices_npu(Tensor vertices, Tensor mask,
FILE: mmcv/ops/csrc/pytorch/npu/focal_loss_npu.cpp
function sigmoid_focal_loss_forward_npu (line 5) | void sigmoid_focal_loss_forward_npu(Tensor input, Tensor target, Tensor ...
function sigmoid_focal_loss_backward_npu (line 40) | void sigmoid_focal_loss_backward_npu(Tensor input, Tensor target, Tensor...
function softmax_focal_loss_forward_npu (line 77) | void softmax_focal_loss_forward_npu(Tensor input, Tensor target, Tensor ...
function softmax_focal_loss_backward_npu (line 126) | void softmax_focal_loss_backward_npu(Tensor input, Tensor target, Tensor...
FILE: mmcv/ops/csrc/pytorch/npu/furthest_point_sample_npu.cpp
function furthest_point_sampling_forward_npu (line 6) | void furthest_point_sampling_forward_npu(Tensor points_tensor,
FILE: mmcv/ops/csrc/pytorch/npu/furthest_point_sampling_with_dist_npu.cpp
function furthest_point_sampling_with_dist_npu (line 5) | void furthest_point_sampling_with_dist_npu(Tensor points_tensor,
FILE: mmcv/ops/csrc/pytorch/npu/fused_bias_leakyrelu_npu.cpp
function Tensor (line 11) | Tensor fused_bias_leakyrelu_npu(const Tensor &input, const Tensor &bias,
FILE: mmcv/ops/csrc/pytorch/npu/gather_points_npu.cpp
function gather_points_forward_npu (line 6) | void gather_points_forward_npu(int b, int c, int n, int npoints,
function gather_points_backward_npu (line 24) | void gather_points_backward_npu(int b, int c, int n, int npoints,
FILE: mmcv/ops/csrc/pytorch/npu/group_points_npu.cpp
function group_points_forward_npu (line 6) | void group_points_forward_npu(int b, int c, int n, int npoints, int nsam...
function group_points_backward_npu (line 41) | void group_points_backward_npu(int b, int c, int n, int npoints, int nsa...
FILE: mmcv/ops/csrc/pytorch/npu/knn_npu.cpp
function knn_forward_npu (line 8) | void knn_forward_npu(int b, int n, int m, int nsample, const Tensor xyz,
FILE: mmcv/ops/csrc/pytorch/npu/ms_deform_attn_npu.cpp
function check_support (line 13) | void check_support(const Tensor &value, const Tensor &attention_weights) {
function Tensor (line 28) | Tensor ms_deform_attn_forward_npu(const Tensor &value,
function ms_deform_attn_backward_npu (line 79) | void ms_deform_attn_backward_npu(
FILE: mmcv/ops/csrc/pytorch/npu/nms3d_normal_npu.cpp
function iou3d_nms3d_normal_forward_npu (line 5) | void iou3d_nms3d_normal_forward_npu(const Tensor boxes, Tensor &keep,
FILE: mmcv/ops/csrc/pytorch/npu/nms3d_npu.cpp
function iou3d_nms3d_forward_npu (line 8) | void iou3d_nms3d_forward_npu(const Tensor boxes, Tensor &keep, Tensor &n...
FILE: mmcv/ops/csrc/pytorch/npu/nms_npu.cpp
function Tensor (line 7) | Tensor nms_npu(Tensor boxes, Tensor scores, float iou_threshold, int off...
FILE: mmcv/ops/csrc/pytorch/npu/nms_rotated_npu.cpp
function Tensor (line 6) | Tensor nms_rotated_npu(const Tensor dets, const Tensor scores,
FILE: mmcv/ops/csrc/pytorch/npu/points_in_box_npu.cpp
function points_in_boxes_part_forward_impl_npu (line 6) | void points_in_boxes_part_forward_impl_npu(int batch_size, int boxes_num,
FILE: mmcv/ops/csrc/pytorch/npu/points_in_box_npu_all.cpp
function points_in_boxes_all_forward_impl_npu (line 6) | void points_in_boxes_all_forward_impl_npu(int batch_size, int boxes_num,
FILE: mmcv/ops/csrc/pytorch/npu/points_in_polygons_npu.cpp
function points_in_polygons_npu (line 8) | void points_in_polygons_npu(const Tensor points, Tensor polygons, Tensor...
FILE: mmcv/ops/csrc/pytorch/npu/psa_mask_npu.cpp
function psamask_forward_npu (line 6) | void psamask_forward_npu(const int psa_type, const Tensor x, Tensor y,
function psamask_backward_npu (line 40) | void psamask_backward_npu(const int psa_type, const Tensor y_grad,
FILE: mmcv/ops/csrc/pytorch/npu/roi_align_npu.cpp
function roi_align_forward_npu (line 7) | void roi_align_forward_npu(Tensor input, Tensor rois, Tensor output,
function roi_align_backward_npu (line 34) | void roi_align_backward_npu(Tensor grad_output, Tensor rois, Tensor argm...
FILE: mmcv/ops/csrc/pytorch/npu/roi_align_rotated_npu.cpp
function roi_align_rotated_forward_npu (line 7) | void roi_align_rotated_forward_npu(Tensor input, Tensor rois, Tensor out...
function roi_align_rotated_backward_npu (line 36) | void roi_align_rotated_backward_npu(Tensor top_grad, Tensor rois,
FILE: mmcv/ops/csrc/pytorch/npu/roi_pool_npu.cpp
function roi_pool_forward_npu (line 6) | void roi_pool_forward_npu(Tensor input, Tensor rois, Tensor output,
function roi_pool_backward_npu (line 47) | void roi_pool_backward_npu(Tensor grad_output, Tensor rois, Tensor argmax,
FILE: mmcv/ops/csrc/pytorch/npu/roiaware_pool3d_npu.cpp
function roiaware_pool3d_forward_npu (line 5) | void roiaware_pool3d_forward_npu(int boxes_num, int pts_num, int channels,
function roiaware_pool3d_backward_npu (line 35) | void roiaware_pool3d_backward_npu(int boxes_num, int out_x, int out_y,
FILE: mmcv/ops/csrc/pytorch/npu/roipoint_pool3d_forward.cpp
function roipoint_pool3d_forward_impl_npu (line 7) | void roipoint_pool3d_forward_impl_npu(int batch_size, int pts_num,
FILE: mmcv/ops/csrc/pytorch/npu/rotated_feature_align_npu.cpp
function rotated_feature_align_forward_npu (line 16) | void rotated_feature_align_forward_npu(const Tensor features,
function rotated_feature_align_backward_npu (line 32) | void rotated_feature_align_backward_npu(const Tensor top_grad,
FILE: mmcv/ops/csrc/pytorch/npu/stack_ball_query_npu.cpp
function stack_ball_query_forward_npu (line 6) | void stack_ball_query_forward_npu(float max_radius, int nsample,
FILE: mmcv/ops/csrc/pytorch/npu/stack_group_points_npu.cpp
function stack_group_points_forward_npu (line 6) | void stack_group_points_forward_npu(int b, int c, int n, int nsample,
FILE: mmcv/ops/csrc/pytorch/npu/three_interpolate_npu.cpp
function three_interpolate_forward_npu (line 8) | void three_interpolate_forward_npu(int b, int c, int m, int n,
function three_interpolate_backward_npu (line 30) | void three_interpolate_backward_npu(int b, int c, int n, int m,
FILE: mmcv/ops/csrc/pytorch/npu/three_nn_npu.cpp
function three_nn_forward_npu (line 8) | void three_nn_forward_npu(int b, int n, int m, const Tensor unknown,
FILE: mmcv/ops/csrc/pytorch/npu/voxelization_npu.cpp
function hard_voxelize_forward_npu (line 19) | int hard_voxelize_forward_npu(const at::Tensor &points, at::Tensor &voxels,
function dynamic_voxelize_forward_npu (line 61) | void dynamic_voxelize_forward_npu(const at::Tensor &points, at::Tensor &...
FILE: mmcv/ops/csrc/pytorch/pixel_group.cpp
function pixel_group_impl (line 7) | std::vector<std::vector<float>> pixel_group_impl(
function pixel_group (line 15) | std::vector<std::vector<float>> pixel_group(
FILE: mmcv/ops/csrc/pytorch/points_in_boxes.cpp
function points_in_boxes_part_forward_impl (line 4) | void points_in_boxes_part_forward_impl(int batch_size, int boxes_num,
function points_in_boxes_all_forward_impl (line 12) | void points_in_boxes_all_forward_impl(int batch_size, int boxes_num,
function points_in_boxes_part_forward (line 20) | void points_in_boxes_part_forward(Tensor boxes_tensor, Tensor pts_tensor,
function points_in_boxes_all_forward (line 34) | void points_in_boxes_all_forward(Tensor boxes_tensor, Tensor pts_tensor,
FILE: mmcv/ops/csrc/pytorch/points_in_polygons.cpp
function points_in_polygons_forward_impl (line 4) | void points_in_polygons_forward_impl(const Tensor points, const Tensor p...
function points_in_polygons_forward (line 11) | void points_in_polygons_forward(Tensor points, Tensor polygons, Tensor o...
FILE: mmcv/ops/csrc/pytorch/prroi_pool.cpp
function prroi_pool_forward_impl (line 5) | void prroi_pool_forward_impl(Tensor input, Tensor rois, Tensor output,
function prroi_pool_backward_impl (line 12) | void prroi_pool_backward_impl(Tensor grad_output, Tensor rois,
function prroi_pool_coor_backward_impl (line 19) | void prroi_pool_coor_backward_impl(Tensor output, Tensor grad_output,
function prroi_pool_forward (line 28) | void prroi_pool_forward(Tensor input, Tensor rois, Tensor output,
function prroi_pool_backward (line 35) | void prroi_pool_backward(Tensor grad_output, Tensor rois, Tensor grad_in...
function prroi_pool_coor_backward (line 42) | void prroi_pool_coor_backward(Tensor output, Tensor grad_output, Tensor ...
FILE: mmcv/ops/csrc/pytorch/psamask.cpp
function psamask_forward_impl (line 7) | void psamask_forward_impl(const int psa_type, const Tensor input, Tensor...
function psamask_backward_impl (line 17) | void psamask_backward_impl(const int psa_type, const Tensor grad_output,
function psamask_forward (line 27) | void psamask_forward(const Tensor input, Tensor output, const int psa_type,
function psamask_backward (line 35) | void psamask_backward(Tensor grad_output, const Tensor grad_input,
FILE: mmcv/ops/csrc/pytorch/pybind.cpp
function PYBIND11_MODULE (line 473) | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
FILE: mmcv/ops/csrc/pytorch/riroi_align_rotated.cpp
function riroi_align_rotated_forward_impl (line 5) | void riroi_align_rotated_forward_impl(Tensor features, Tensor rois,
function riroi_align_rotated_backward_impl (line 15) | void riroi_align_rotated_backward_impl(Tensor top_grad, Tensor rois,
function riroi_align_rotated_forward (line 25) | void riroi_align_rotated_forward(Tensor features, Tensor rois, Tensor ou...
function riroi_align_rotated_backward (line 34) | void riroi_align_rotated_backward(Tensor top_grad, Tensor rois,
FILE: mmcv/ops/csrc/pytorch/roi_align.cpp
function roi_align_forward_impl (line 20) | void roi_align_forward_impl(Tensor input, Tensor rois, Tensor output,
function roi_align_backward_impl (line 30) | void roi_align_backward_impl(Tensor grad_output, Tensor rois, Tensor arg...
function roi_align_forward_diopi (line 41) | void roi_align_forward_diopi(Tensor input, Tensor rois, Tensor output,
function roi_align_backward_diopi (line 88) | void roi_align_backward_diopi(Tensor grad_output, Tensor rois, Tensor ar...
function roi_align_forward (line 139) | void roi_align_forward(Tensor input, Tensor rois, Tensor output,
function roi_align_backward (line 154) | void roi_align_backward(Tensor grad_output, Tensor rois, Tensor argmax_y,
FILE: mmcv/ops/csrc/pytorch/roi_align_rotated.cpp
function roi_align_rotated_forward_impl (line 5) | void roi_align_rotated_forward_impl(Tensor input, Tensor rois, Tensor ou...
function roi_align_rotated_backward_impl (line 14) | void roi_align_rotated_backward_impl(Tensor top_grad, Tensor rois,
function roi_align_rotated_forward (line 24) | void roi_align_rotated_forward(Tensor input, Tensor rois, Tensor output,
function roi_align_rotated_backward (line 33) | void roi_align_rotated_backward(Tensor top_grad, Tensor rois,
FILE: mmcv/ops/csrc/pytorch/roi_pool.cpp
function roi_pool_forward_impl (line 5) | void roi_pool_forward_impl(Tensor input, Tensor rois, Tensor output,
function roi_pool_backward_impl (line 12) | void roi_pool_backward_impl(Tensor grad_output, Tensor rois, Tensor argmax,
function roi_pool_forward (line 19) | void roi_pool_forward(Tensor input, Tensor rois, Tensor output, Tensor a...
function roi_pool_backward (line 26) | void roi_pool_backward(Tensor grad_output, Tensor rois, Tensor argmax,
FILE: mmcv/ops/csrc/pytorch/roiaware_pool3d.cpp
function roiaware_pool3d_forward_impl (line 4) | void roiaware_pool3d_forward_impl(int boxes_num, int pts_num, int channels,
function roiaware_pool3d_backward_impl (line 16) | void roiaware_pool3d_backward_impl(int boxes_num, int out_x, int out_y,
function roiaware_pool3d_forward (line 27) | void roiaware_pool3d_forward(Tensor rois, Tensor pts, Tensor pts_feature,
function roiaware_pool3d_backward (line 54) | void roiaware_pool3d_backward(Tensor pts_idx_of_voxels, Tensor argmax,
FILE: mmcv/ops/csrc/pytorch/roipoint_pool3d.cpp
function roipoint_pool3d_forward_impl (line 12) | void roipoint_pool3d_forward_impl(int batch_size, int pts_num, int boxes...
function roipoint_pool3d_forward (line 23) | void roipoint_pool3d_forward(Tensor xyz, Tensor boxes3d, Tensor pts_feat...
FILE: mmcv/ops/csrc/pytorch/rotated_feature_align.cpp
function rotated_feature_align_forward_impl (line 8) | void rotated_feature_align_forward_impl(const Tensor features,
function rotated_feature_align_backward_impl (line 16) | void rotated_feature_align_backward_impl(const Tensor top_grad,
function rotated_feature_align_forward (line 24) | void rotated_feature_align_forward(const Tensor features,
function rotated_feature_align_backward (line 32) | void rotated_feature_align_backward(const Tensor top_grad,
FILE: mmcv/ops/csrc/pytorch/scatter_points.cpp
function dynamic_point_to_voxel_forward_impl (line 7) | std::vector<torch::Tensor> dynamic_point_to_voxel_forward_impl(
function dynamic_point_to_voxel_backward_impl (line 14) | void dynamic_point_to_voxel_backward_impl(
function reduce_t (line 24) | inline reduce_t convert_reduce_type(const std::string &reduce_type) {
function dynamic_point_to_voxel_forward (line 36) | std::vector<torch::Tensor> dynamic_point_to_voxel_forward(
function dynamic_point_to_voxel_backward (line 43) | void dynamic_point_to_voxel_backward(torch::Tensor &grad_feats,
FILE: mmcv/ops/csrc/pytorch/sparse_pool_ops.cpp
function indice_maxpool_forward_impl (line 18) | torch::Tensor indice_maxpool_forward_impl(torch::Tensor features,
function indice_maxpool_forward (line 26) | torch::Tensor indice_maxpool_forward(torch::Tensor features,
function indice_maxpool_backward_impl (line 32) | torch::Tensor indice_maxpool_backward_impl(torch::Tensor features,
function indice_maxpool_backward (line 41) | torch::Tensor indice_maxpool_backward(torch::Tensor features,
FILE: mmcv/ops/csrc/pytorch/spconv_ops.cpp
function get_indice_pairs_forward_cuda (line 27) | std::vector<torch::Tensor> get_indice_pairs_forward_cuda(
function get_indice_pairs_forward_mlu (line 47) | std::vector<torch::Tensor> get_indice_pairs_forward_mlu(
function get_indice_pairs_forward_musa (line 67) | std::vector<torch::Tensor> get_indice_pairs_forward_musa(
function get_indice_pairs_backward_cuda (line 87) | std::vector<torch::Tensor> get_indice_pairs_backward_cuda(
function get_indice_pairs_backward_musa (line 108) | std::vector<torch::Tensor> get_indice_pairs_backward_musa(
function get_indice_pairs_forward (line 121) | std::vector<torch::Tensor> get_indice_pairs_forward(
function get_indice_pairs_backward (line 155) | std::vector<torch::Tensor> get_indice_pairs_backward(
function indice_conv_forward_impl (line 186) | torch::Tensor indice_conv_forward_impl(torch::Tensor features,
function indice_conv_forward (line 197) | torch::Tensor indice_conv_forward(torch::Tensor features, torch::Tensor ...
function indice_conv_backward_impl (line 205) | std::vector<torch::Tensor> indice_conv_backward_impl(
function indice_conv_backward (line 213) | std::vector<torch::Tensor> indice_conv_backward(
FILE: mmcv/ops/csrc/pytorch/spconv_utils.h
function namespace (line 28) | namespace tv {
FILE: mmcv/ops/csrc/pytorch/sync_bn.cpp
function sync_bn_forward_mean_impl (line 5) | void sync_bn_forward_mean_impl(const Tensor input, Tensor mean) {
function sync_bn_forward_var_impl (line 9) | void sync_bn_forward_var_impl(const Tensor input, const Tensor mean,
function sync_bn_forward_output_impl (line 14) | void sync_bn_forward_output_impl(const Tensor input, const Tensor mean,
function sync_bn_backward_param_impl (line 25) | void sync_bn_backward_param_impl(const Tensor grad_output, const Tensor ...
function sync_bn_backward_data_impl (line 31) | void sync_bn_backward_data_impl(const Tensor grad_output, const Tensor w...
function sync_bn_forward_mean (line 39) | void sync_bn_forward_mean(const Tensor input, Tensor mean) {
function sync_bn_forward_var (line 43) | void sync_bn_forward_var(const Tensor input, const Tensor mean, Tensor v...
function sync_bn_forward_output (line 47) | void sync_bn_forward_output(const Tensor input, const Tensor mean,
function sync_bn_backward_param (line 58) | void sync_bn_backward_param(const Tensor grad_output, const Tensor norm,
function sync_bn_backward_data (line 63) | void sync_bn_backward_data(const Tensor grad_output, const Tensor weight,
FILE: mmcv/ops/csrc/pytorch/three_interpolate.cpp
function three_interpolate_forward_impl (line 7) | void three_interpolate_forward_impl(int b, int c, int m, int n,
function three_interpolate_backward_impl (line 14) | void three_interpolate_backward_impl(int b, int c, int n, int m,
function three_interpolate_forward (line 21) | void three_interpolate_forward(Tensor points_tensor, Tensor idx_tensor,
function three_interpolate_backward (line 28) | void three_interpolate_backward(Tensor grad_out_tensor, Tensor idx_tensor,
FILE: mmcv/ops/csrc/pytorch/three_nn.cpp
function three_nn_forward_impl (line 7) | void three_nn_forward_impl(int b, int n, int m, const Tensor unknown,
function three_nn_forward (line 13) | void three_nn_forward(Tensor unknown_tensor, Tensor known_tensor,
FILE: mmcv/ops/csrc/pytorch/tin_shift.cpp
function tin_shift_forward_impl (line 5) | void tin_shift_forward_impl(Tensor input, Tensor shift, Tensor output) {
function tin_shift_backward_impl (line 9) | void tin_shift_backward_impl(Tensor grad_output, Tensor shift,
function tin_shift_forward (line 14) | void tin_shift_forward(Tensor input, Tensor shift, Tensor output) {
function tin_shift_backward (line 18) | void tin_shift_backward(Tensor grad_output, Tensor shift, Tensor grad_in...
FILE: mmcv/ops/csrc/pytorch/upfirdn2d.cpp
function upfirdn2d_op_impl (line 105) | torch::Tensor upfirdn2d_op_impl(torch::Tensor input, torch::Tensor filter,
function upfirdn2d (line 113) | torch::Tensor upfirdn2d(torch::Tensor input, torch::Tensor filter, int upx,
FILE: mmcv/ops/csrc/pytorch/voxelization.cpp
function hard_voxelize_forward_impl (line 19) | int hard_voxelize_forward_impl(const at::Tensor &points, at::Tensor &vox...
function nondeterministic_hard_voxelize_forward_impl (line 31) | int nondeterministic_hard_voxelize_forward_impl(
function dynamic_voxelize_forward_impl (line 42) | void dynamic_voxelize_forward_impl(const at::Tensor &points, at::Tensor ...
function hard_voxelize_forward_diopi (line 51) | void hard_voxelize_forward_diopi(const at::Tensor &points,
function dynamic_voxelize_forward_diopi (line 138) | void dynamic_voxelize_forward_diopi(const at::Tensor &points,
function hard_voxelize_forward (line 192) | void hard_voxelize_forward(const at::Tensor &points,
function dynamic_voxelize_forward (line 224) | void dynamic_voxelize_forward(const at::Tensor &points,
FILE: mmcv/ops/deform_conv.py
class DeformConv2dFunction (line 25) | class DeformConv2dFunction(Function):
method symbolic (line 28) | def symbolic(g,
method _npu_backward (line 53) | def _npu_backward(ctx, grad_output):
method forward (line 72) | def forward(ctx,
method backward (line 146) | def backward(
method _output_size (line 210) | def _output_size(ctx, input, weight):
class DeformConv2d (line 229) | class DeformConv2d(nn.Module):
method __init__ (line 265) | def __init__(self,
method reset_parameters (line 306) | def reset_parameters(self):
method forward (line 313) | def forward(self, x: Tensor, offset: Tensor) -> Tensor:
method __repr__ (line 352) | def __repr__(self):
class DeformConv2dPack (line 368) | class DeformConv2dPack(DeformConv2d):
method __init__ (line 395) | def __init__(self, *args, **kwargs):
method init_offset (line 407) | def init_offset(self):
method forward (line 411) | def forward(self, x: Tensor) -> Tensor: # type: ignore
method _load_from_state_dict (line 417) | def _load_from_state_dict(self, state_dict, prefix, local_metadata, st...
class DeformConv2dPack_MLU (line 451) | class DeformConv2dPack_MLU(DeformConv2d):
method __init__ (line 476) | def __init__(self, *args, **kwargs):
method init_offset (line 492) | def init_offset(self):
method forward (line 496) | def forward(self, x: Tensor) -> Tensor: # type: ignore
FILE: mmcv/ops/deform_roi_pool.py
class DeformRoIPoolFunction (line 15) | class DeformRoIPoolFunction(Function):
method symbolic (line 18) | def symbolic(g, input, rois, offset, output_size, spatial_scale,
method forward (line 34) | def forward(ctx,
method backward (line 71) | def backward(
class DeformRoIPool (line 98) | class DeformRoIPool(nn.Module):
method __init__ (line 100) | def __init__(self,
method forward (line 111) | def forward(self,
class DeformRoIPoolPack (line 120) | class DeformRoIPoolPack(DeformRoIPool):
method __init__ (line 122) | def __init__(self,
method forward (line 146) | def forward(self, input: Tensor, rois: Tensor) -> Tensor: # type: ignore
class ModulatedDeformRoIPoolPack (line 160) | class ModulatedDeformRoIPoolPack(DeformRoIPool):
method __init__ (line 162) | def __init__(self,
method forward (line 197) | def forward(self, input: Tensor, rois: Tensor) -> Tensor: # type: ignore
FILE: mmcv/ops/deprecated_wrappers.py
class Conv2d_deprecated (line 9) | class Conv2d_deprecated(Conv2d):
method __init__ (line 11) | def __init__(self, *args, **kwargs):
class ConvTranspose2d_deprecated (line 19) | class ConvTranspose2d_deprecated(ConvTranspose2d):
method __init__ (line 21) | def __init__(self, *args, **kwargs):
class MaxPool2d_deprecated (line 29) | class MaxPool2d_deprecated(MaxPool2d):
method __init__ (line 31) | def __init__(self, *args, **kwargs):
class Linear_deprecated (line 39) | class Linear_deprecated(Linear):
method __init__ (line 41) | def __init__(self, *args, **kwargs):
FILE: mmcv/ops/diff_iou_rotated.py
class SortVertices (line 17) | class SortVertices(Function):
method forward (line 20) | def forward(ctx, vertices, mask, num_valid):
method backward (line 28) | def backward(ctx, gradout):
function box_intersection (line 32) | def box_intersection(corners1: Tensor,
function box1_in_box2 (line 75) | def box1_in_box2(corners1: Tensor, corners2: Tensor) -> Tensor:
function box_in_box (line 108) | def box_in_box(corners1: Tensor, corners2: Tensor) -> Tuple[Tensor, Tens...
function build_vertices (line 125) | def build_vertices(corners1: Tensor, corners2: Tensor, c1_in_2: Tensor,
function sort_indices (line 157) | def sort_indices(vertices: Tensor, mask: Tensor) -> Tensor:
function calculate_area (line 184) | def calculate_area(idx_sorted: Tensor,
function oriented_box_intersection_2d (line 206) | def oriented_box_intersection_2d(corners1: Tensor,
function box2corners (line 227) | def box2corners(box: Tensor) -> Tensor:
function diff_iou_rotated_2d (line 255) | def diff_iou_rotated_2d(box1: Tensor, box2: Tensor) -> Tensor:
function diff_iou_rotated_3d (line 276) | def diff_iou_rotated_3d(box3d1: Tensor, box3d2: Tensor) -> Tensor:
FILE: mmcv/ops/filtered_lrelu.py
function filtered_lrelu (line 26) | def filtered_lrelu(input: torch.Tensor,
function _filtered_lrelu_ref (line 149) | def _filtered_lrelu_ref(input: torch.Tensor,
function _filtered_lrelu_cuda (line 238) | def _filtered_lrelu_cuda(up: int = 1,
function _filtered_lrelu_musa (line 441) | def _filtered_lrelu_musa(up: int = 1,
FILE: mmcv/ops/focal_loss.py
class SigmoidFocalLossFunction (line 17) | class SigmoidFocalLossFunction(Function):
method forward (line 20) | def forward(ctx,
method backward (line 57) | def backward(ctx, grad_output: torch.Tensor) -> tuple:
class SigmoidFocalLoss (line 79) | class SigmoidFocalLoss(nn.Module):
method __init__ (line 81) | def __init__(self,
method forward (line 92) | def forward(
method __repr__ (line 100) | def __repr__(self):
class SoftmaxFocalLossFunction (line 108) | class SoftmaxFocalLossFunction(Function):
method forward (line 111) | def forward(ctx,
method backward (line 159) | def backward(ctx, grad_output: torch.Tensor) -> tuple:
class SoftmaxFocalLoss (line 182) | class SoftmaxFocalLoss(nn.Module):
method __init__ (line 184) | def __init__(self,
method forward (line 195) | def forward(
method __repr__ (line 203) | def __repr__(self):
FILE: mmcv/ops/furthest_point_sample.py
class FurthestPointSampling (line 13) | class FurthestPointSampling(Function):
method forward (line 18) | def forward(ctx, points_xyz: torch.Tensor,
method backward (line 54) | def backward(xyz, a=None):
class FurthestPointSamplingWithDist (line 58) | class FurthestPointSamplingWithDist(Function):
method forward (line 63) | def forward(ctx, points_dist: torch.Tensor,
method backward (line 87) | def backward(xyz, a=None):
FILE: mmcv/ops/fused_bias_leakyrelu.py
class FusedBiasLeakyReLUFunctionBackward (line 108) | class FusedBiasLeakyReLUFunctionBackward(Function):
method forward (line 116) | def forward(ctx, grad_output: torch.Tensor, out: torch.Tensor,
method backward (line 143) | def backward(ctx, gradgrad_input: torch.Tensor,
class FusedBiasLeakyReLUFunction (line 162) | class FusedBiasLeakyReLUFunction(Function):
method forward (line 165) | def forward(ctx, input: torch.Tensor, bias: nn.Parameter,
method backward (line 184) | def backward(ctx, grad_output: torch.Tensor) -> tuple:
class FusedBiasLeakyReLU (line 193) | class FusedBiasLeakyReLU(nn.Module):
method __init__ (line 217) | def __init__(self,
method forward (line 227) | def forward(self, input: torch.Tensor) -> torch.Tensor:
function fused_bias_leakyrelu (line 232) | def fused_bias_leakyrelu(input: torch.Tensor,
function bias_leakyrelu_ref (line 269) | def bias_leakyrelu_ref(x: torch.Tensor,
FILE: mmcv/ops/gather_points.py
class GatherPoints (line 12) | class GatherPoints(Function):
method forward (line 16) | def forward(ctx, features: torch.Tensor,
method backward (line 42) | def backward(ctx, grad_out: torch.Tensor) -> Tuple[torch.Tensor, None]:
FILE: mmcv/ops/group_points.py
class QueryAndGroup (line 18) | class QueryAndGroup(nn.Module):
method __init__ (line 41) | def __init__(self,
method forward (line 69) | def forward(
class GroupAll (line 145) | class GroupAll(nn.Module):
method __init__ (line 152) | def __init__(self, use_xyz: bool = True):
method forward (line 156) | def forward(self,
class GroupingOperation (line 184) | class GroupingOperation(Function):
method forward (line 188) | def forward(
method backward (line 252) | def backward(ctx, grad_out: torch.Tensor) -> Tuple:
FILE: mmcv/ops/info.py
function get_compiler_version (line 7) | def get_compiler_version():
function get_compiling_cuda_version (line 10) | def get_compiling_cuda_version():
function get_compiler_version (line 17) | def get_compiler_version():
function get_compiling_cuda_version (line 20) | def get_compiling_cuda_version():
FILE: mmcv/ops/iou3d.py
function boxes_overlap_bev (line 16) | def boxes_overlap_bev(boxes_a: Tensor, boxes_b: Tensor) -> Tensor:
function boxes_iou3d (line 35) | def boxes_iou3d(boxes_a: Tensor, boxes_b: Tensor) -> Tensor:
function nms3d (line 69) | def nms3d(boxes: Tensor, scores: Tensor, iou_threshold: float) -> Tensor:
function nms3d_normal (line 93) | def nms3d_normal(boxes: Tensor, scores: Tensor,
function _xyxyr2xywhr (line 119) | def _xyxyr2xywhr(boxes: Tensor) -> Tensor:
function boxes_iou_bev (line 137) | def boxes_iou_bev(boxes_a: Tensor, boxes_b: Tensor) -> Tensor:
function nms_bev (line 159) | def nms_bev(boxes: Tensor,
function nms_normal_bev (line 204) | def nms_normal_bev(boxes: Tensor, scores: Tensor, thresh: float) -> Tensor:
FILE: mmcv/ops/knn.py
class KNN (line 12) | class KNN(Function):
method forward (line 22) | def forward(ctx,
method backward (line 92) | def backward(ctx, a=None):
FILE: mmcv/ops/masked_conv.py
class MaskedConv2dFunction (line 17) | class MaskedConv2dFunction(Function):
method symbolic (line 20) | def symbolic(g, features, mask, weight, bias, padding, stride=1):
method forward (line 31) | def forward(ctx,
method backward (line 105) | def backward(ctx, grad_output: torch.Tensor) -> tuple:
class MaskedConv2d (line 112) | class MaskedConv2d(nn.Conv2d):
method __init__ (line 119) | def __init__(self,
method forward (line 131) | def forward(self,
FILE: mmcv/ops/merge_cells.py
class BaseMergeCell (line 13) | class BaseMergeCell(nn.Module):
method __init__ (line 45) | def __init__(self,
method _build_input_conv (line 80) | def _build_input_conv(self, channel, conv_cfg, norm_cfg):
method _binary_op (line 91) | def _binary_op(self, x1, x2):
method _resize (line 94) | def _resize(self, x, size):
method forward (line 115) | def forward(self,
class SumCell (line 136) | class SumCell(BaseMergeCell):
method __init__ (line 138) | def __init__(self, in_channels: int, out_channels: int, **kwargs):
method _binary_op (line 141) | def _binary_op(self, x1, x2):
class ConcatCell (line 145) | class ConcatCell(BaseMergeCell):
method __init__ (line 147) | def __init__(self, in_channels: int, out_channels: int, **kwargs):
method _binary_op (line 150) | def _binary_op(self, x1, x2):
class GlobalPoolingCell (line 155) | class GlobalPoolingCell(BaseMergeCell):
method __init__ (line 157) | def __init__(self,
method _binary_op (line 164) | def _binary_op(self, x1, x2):
FILE: mmcv/ops/min_area_polygons.py
function min_area_polygons (line 9) | def min_area_polygons(pointsets: torch.Tensor) -> torch.Tensor:
FILE: mmcv/ops/modulated_deform_conv.py
class ModulatedDeformConv2dFunction (line 22) | class ModulatedDeformConv2dFunction(Function):
method symbolic (line 25) | def symbolic(g, input, offset, mask, weight, bias, stride, padding,
method _calculate_sort_index (line 40) | def _calculate_sort_index(kernel_h, kernel_w, deformable_group):
method _npu_forward (line 53) | def _npu_forward(ctx, input_tensor, offset, mask, weight, bias):
method _npu_backward (line 83) | def _npu_backward(ctx, grad_output):
method forward (line 105) | def forward(ctx,
method backward (line 174) | def backward(ctx, grad_output: torch.Tensor) -> tuple:
method _output_size (line 217) | def _output_size(ctx, input, weight):
class ModulatedDeformConv2d (line 236) | class ModulatedDeformConv2d(nn.Module):
method __init__ (line 240) | def __init__(self,
method init_weights (line 272) | def init_weights(self):
method forward (line 281) | def forward(self, x: torch.Tensor, offset: torch.Tensor,
class ModulatedDeformConv2dPack (line 290) | class ModulatedDeformConv2dPack(ModulatedDeformConv2d):
method __init__ (line 309) | def __init__(self, *args, **kwargs):
method init_weights (line 321) | def init_weights(self) -> None:
method forward (line 327) | def forward(self, x: torch.Tensor) -> torch.Tensor: # type: ignore
method _load_from_state_dict (line 337) | def _load_from_state_dict(self, state_dict, prefix, local_metadata, st...
class ModulatedDeformConv2dPack_MLU (line 372) | class ModulatedDeformConv2dPack_MLU(ModulatedDeformConv2d):
method __init__ (line 391) | def __init__(self, *args, **kwargs):
method init_weights (line 406) | def init_weights(self):
method forward (line 412) | def forward(self, x):
FILE: mmcv/ops/multi_scale_deform_attn.py
class MultiScaleDeformableAttnFunction (line 23) | class MultiScaleDeformableAttnFunction(Function):
method forward (line 26) | def forward(ctx, value: torch.Tensor, value_spatial_shapes: torch.Tensor,
method backward (line 79) | def backward(ctx, grad_output: torch.Tensor) -> tuple:
function multi_scale_deformable_attn_pytorch (line 110) | def multi_scale_deformable_attn_pytorch(
class MultiScaleDeformableAttention (line 173) | class MultiScaleDeformableAttention(BaseModule):
method __init__ (line 202) | def __init__(self,
method init_weights (line 252) | def init_weights(self) -> None:
method forward (line 276) | def forward(self,
FILE: mmcv/ops/nms.py
class NMSop (line 15) | class NMSop(torch.autograd.Function):
method forward (line 18) | def forward(ctx: Any, bboxes: Tensor, scores: Tensor, iou_threshold: f...
class SoftNMSop (line 37) | class SoftNMSop(torch.autograd.Function):
method forward (line 40) | def forward(ctx: Any, boxes: Tensor, scores: Tensor, iou_threshold: fl...
method symbolic (line 56) | def symbolic(g, boxes, scores, iou_threshold, sigma, min_score, method,
function nms (line 77) | def nms(boxes: array_like_type,
function soft_nms (line 137) | def soft_nms(boxes: array_like_type,
function batched_nms (line 216) | def batched_nms(boxes: Tensor,
function nms_match (line 337) | def nms_match(dets: array_like_type,
function nms_rotated (line 375) | def nms_rotated(dets: Tensor,
function nms_quadri (line 448) | def nms_quadri(dets: Tensor,
FILE: mmcv/ops/pixel_group.py
function pixel_group (line 13) | def pixel_group(
FILE: mmcv/ops/point_sample.py
function bilinear_grid_sample (line 12) | def bilinear_grid_sample(im: Tensor,
function normalize (line 90) | def normalize(grid: Tensor) -> Tensor:
function denormalize (line 103) | def denormalize(grid: Tensor) -> Tensor:
function generate_grid (line 116) | def generate_grid(num_grid: int, size: Tuple[int, int],
function rel_roi_point_to_abs_img_point (line 138) | def rel_roi_point_to_abs_img_point(rois: Tensor,
function get_shape_from_feature_map (line 170) | def get_shape_from_feature_map(x: Tensor) -> Tensor:
function abs_img_point_to_rel_img_point (line 185) | def abs_img_point_to_rel_img_point(abs_img_points: Tensor,
function rel_roi_point_to_rel_img_point (line 218) | def rel_roi_point_to_rel_img_point(rois: Tensor,
function point_sample (line 245) | def point_sample(input: Tensor,
class SimpleRoIAlign (line 277) | class SimpleRoIAlign(nn.Module):
method __init__ (line 279) | def __init__(self,
method forward (line 300) | def forward(self, features: Tensor, rois: Tensor) -> Tensor:
method __repr__ (line 328) | def __repr__(self) -> str:
FILE: mmcv/ops/points_in_boxes.py
function points_in_boxes_part (line 13) | def points_in_boxes_part(points: Tensor, boxes: Tensor) -> Tensor:
function points_in_boxes_cpu (line 68) | def points_in_boxes_cpu(points: Tensor, boxes: Tensor) -> Tensor:
function points_in_boxes_all (line 106) | def points_in_boxes_all(points: Tensor, boxes: Tensor) -> Tensor:
FILE: mmcv/ops/points_in_polygons.py
function points_in_polygons (line 9) | def points_in_polygons(points: Tensor, polygons: Tensor) -> Tensor:
FILE: mmcv/ops/points_sampler.py
function calc_square_dist (line 11) | def calc_square_dist(point_feat_a: Tensor,
function get_sampler_cls (line 34) | def get_sampler_cls(sampler_type: str) -> nn.Module:
class PointsSampler (line 57) | class PointsSampler(nn.Module):
method __init__ (line 71) | def __init__(self,
method forward (line 88) | def forward(self, points_xyz: Tensor, features: Tensor) -> Tensor:
class DFPSSampler (line 134) | class DFPSSampler(nn.Module):
method __init__ (line 137) | def __init__(self) -> None:
method forward (line 140) | def forward(self, points: Tensor, features: Tensor, npoint: int) -> Te...
class FFPSSampler (line 146) | class FFPSSampler(nn.Module):
method __init__ (line 149) | def __init__(self) -> None:
method forward (line 152) | def forward(self, points: Tensor, features: Tensor, npoint: int) -> Te...
class FSSampler (line 163) | class FSSampler(nn.Module):
method __init__ (line 166) | def __init__(self) -> None:
method forward (line 169) | def forward(self, points: Tensor, features: Tensor, npoint: int) -> Te...
FILE: mmcv/ops/prroi_pool.py
class PrRoIPoolFunction (line 18) | class PrRoIPoolFunction(Function):
method symbolic (line 21) | def symbolic(g, features, rois, output_size, spatial_scale):
method forward (line 31) | def forward(ctx,
method backward (line 67) | def backward(
class PrRoIPool (line 101) | class PrRoIPool(nn.Module):
method __init__ (line 126) | def __init__(self,
method forward (line 134) | def forward(self, features: torch.Tensor,
method __repr__ (line 148) | def __repr__(self):
FILE: mmcv/ops/psa_mask.py
class PSAMaskFunction (line 15) | class PSAMaskFunction(Function):
method symbolic (line 18) | def symbolic(g, input, psa_type, mask_size):
method forward (line 26) | def forward(ctx, input: torch.Tensor, psa_type: str,
method backward (line 52) | def backward(
class PSAMask (line 78) | class PSAMask(nn.Module):
method __init__ (line 80) | def __init__(self, psa_type: str, mask_size: Optional[tuple] = None):
method forward (line 91) | def forward(self, input: torch.Tensor) -> torch.Tensor:
method __repr__ (line 94) | def __repr__(self):
FILE: mmcv/ops/riroi_align_rotated.py
class RiRoIAlignRotatedFunction (line 15) | class RiRoIAlignRotatedFunction(Function):
method forward (line 18) | def forward(ctx: Any,
method backward (line 61) | def backward(
class RiRoIAlignRotated (line 99) | class RiRoIAlignRotated(nn.Module):
method __init__ (line 120) | def __init__(self,
method forward (line 134) | def forward(self, features: torch.Tensor,
FILE: mmcv/ops/roi_align.py
class RoIAlignFunction (line 17) | class RoIAlignFunction(Function):
method symbolic (line 20) | def symbolic(g, input, rois, output_size, spatial_scale, sampling_ratio,
method forward (line 62) | def forward(ctx: Any,
method backward (line 108) | def backward(ctx: Any, grad_output: torch.Tensor) -> tuple:
class RoIAlign (line 131) | class RoIAlign(nn.Module):
method __init__ (line 174) | def __init__(self,
method forward (line 190) | def forward(self, input: torch.Tensor, rois: torch.Tensor) -> torch.Te...
method __repr__ (line 213) | def __repr__(self):
FILE: mmcv/ops/roi_align_rotated.py
class RoIAlignRotatedFunction (line 16) | class RoIAlignRotatedFunction(Function):
method symbolic (line 19) | def symbolic(g, input, rois, output_size, spatial_scale, sampling_ratio,
method forward (line 44) | def forward(ctx: Any,
method backward (line 78) | def backward(
class RoIAlignRotated (line 111) | class RoIAlignRotated(nn.Module):
method __init__ (line 160) | def __init__(self,
method forward (line 174) | def forward(self, input: torch.Tensor, rois: torch.Tensor) -> torch.Te...
method __repr__ (line 180) | def __repr__(self):
FILE: mmcv/ops/roi_pool.py
class RoIPoolFunction (line 16) | class RoIPoolFunction(Function):
method symbolic (line 19) | def symbolic(g, input, rois, output_size, spatial_scale):
method forward (line 28) | def forward(ctx: Any,
method backward (line 58) | def backward(
class RoIPool (line 79) | class RoIPool(nn.Module):
method __init__ (line 81) | def __init__(self,
method forward (line 89) | def forward(self, input: torch.Tensor, rois: torch.Tensor) -> torch.Te...
method __repr__ (line 92) | def __repr__(self):
FILE: mmcv/ops/roiaware_pool3d.py
class RoIAwarePool3d (line 15) | class RoIAwarePool3d(nn.Module):
method __init__ (line 30) | def __init__(self,
method forward (line 42) | def forward(self, rois: torch.Tensor, pts: torch.Tensor,
class RoIAwarePool3dFunction (line 61) | class RoIAwarePool3dFunction(Function):
method forward (line 64) | def forward(ctx: Any, rois: torch.Tensor, pts: torch.Tensor,
method backward (line 118) | def backward(
FILE: mmcv/ops/roipoint_pool3d.py
class RoIPointPool3d (line 12) | class RoIPointPool3d(nn.Module):
method __init__ (line 23) | def __init__(self, num_sampled_points: int = 512):
method forward (line 27) | def forward(self, points: torch.Tensor, point_features: torch.Tensor,
class RoIPointPool3dFunction (line 45) | class RoIPointPool3dFunction(Function):
method forward (line 48) | def forward(
method backward (line 86) | def backward(ctx: Any, grad_out: torch.Tensor) -> torch.Tensor:
FILE: mmcv/ops/rotated_feature_align.py
class RotatedFeatureAlignFunction (line 15) | class RotatedFeatureAlignFunction(Function):
method symbolic (line 26) | def symbolic(g, features, best_rbboxes, spatial_scale, points):
method forward (line 36) | def forward(ctx: Any, features: torch.Tensor, best_rbboxes: torch.Tensor,
method backward (line 66) | def backward(ctx: Any, grad_output: torch.Tensor) -> tuple:
function rotated_feature_align (line 90) | def rotated_feature_align(features: torch.Tensor,
FILE: mmcv/ops/saconv.py
class SAConv2d (line 15) | class SAConv2d(ConvAWS2d):
method __init__ (line 41) | def __init__(self,
method init_weights (line 85) | def init_weights(self):
method forward (line 94) | def forward(self, x):
FILE: mmcv/ops/scatter_points.py
class _DynamicScatter (line 16) | class _DynamicScatter(Function):
method forward (line 19) | def forward(ctx: Any,
method backward (line 50) | def backward(ctx: Any,
class DynamicScatter (line 67) | class DynamicScatter(nn.Module):
method __init__ (line 83) | def __init__(self, voxel_size: List, point_cloud_range: List,
method forward_single (line 91) | def forward_single(
method forward (line 110) | def forward(self, points: torch.Tensor,
method __repr__ (line 142) | def __repr__(self):
FILE: mmcv/ops/sparse_conv.py
function _calculate_fan_in_and_fan_out_hwio (line 28) | def _calculate_fan_in_and_fan_out_hwio(tensor):
class SparseConvolution (line 49) | class SparseConvolution(SparseModule):
method __init__ (line 51) | def __init__(self,
method reset_parameters (line 107) | def reset_parameters(self):
method forward (line 114) | def forward(self, input):
class SparseConv2d (line 208) | class SparseConv2d(SparseConvolution):
method __init__ (line 210) | def __init__(self,
class SparseConv3d (line 234) | class SparseConv3d(SparseConvolution):
method __init__ (line 236) | def __init__(self,
class SparseConv4d (line 260) | class SparseConv4d(SparseConvolution):
method __init__ (line 262) | def __init__(self,
class SparseConvTranspose2d (line 286) | class SparseConvTranspose2d(SparseConvolution):
method __init__ (line 288) | def __init__(self,
class SparseConvTranspose3d (line 313) | class SparseConvTranspose3d(SparseConvolution):
method __init__ (line 315) | def __init__(self,
class SparseInverseConv2d (line 340) | class SparseInverseConv2d(SparseConvolution):
method __init__ (line 342) | def __init__(self,
class SparseInverseConv3d (line 359) | class SparseInverseConv3d(SparseConvolution):
method __init__ (line 361) | def __init__(self,
class SubMConv2d (line 378) | class SubMConv2d(SparseConvolution):
method __init__ (line 380) | def __init__(self,
class SubMConv3d (line 405) | class SubMConv3d(SparseConvolution):
method __init__ (line 407) | def __init__(self,
class SubMConv4d (line 432) | class SubMConv4d(SparseConvolution):
method __init__ (line 434) | def __init__(self,
FILE: mmcv/ops/sparse_functional.py
class SparseConvFunction (line 22) | class SparseConvFunction(Function):
method forward (line 30) | def forward(ctx: Any, features: torch.Tensor, filters: torch.nn.Parame...
method backward (line 50) | def backward(ctx: Any, grad_output: torch.Tensor) -> tuple:
class SparseInverseConvFunction (line 59) | class SparseInverseConvFunction(Function):
method forward (line 62) | def forward(ctx: Any, features: torch.Tensor, filters: torch.nn.Parame...
method backward (line 82) | def backward(ctx: Any, grad_output: torch.Tensor) -> tuple:
class SubMConvFunction (line 91) | class SubMConvFunction(Function):
method forward (line 94) | def forward(ctx: Any, features: torch.Tensor, filters: torch.nn.Parame...
method backward (line 114) | def backward(ctx: Any, grad_output: torch.Tensor) -> tuple:
class SparseMaxPoolFunction (line 123) | class SparseMaxPoolFunction(Function):
method forward (line 126) | def forward(ctx, features: torch.Tensor, indice_pairs: torch.Tensor,
method backward (line 146) | def backward(ctx: Any, grad_output: torch.Tensor) -> tuple:
FILE: mmcv/ops/sparse_modules.py
function is_spconv_module (line 24) | def is_spconv_module(module: nn.Module) -> bool:
function is_sparse_conv (line 29) | def is_sparse_conv(module: nn.Module) -> bool:
function _mean_update (line 34) | def _mean_update(vals: Union[int, List], m_vals: Union[int, List],
class SparseModule (line 49) | class SparseModule(nn.Module):
class SparseSequential (line 55) | class SparseSequential(SparseModule):
method __init__ (line 89) | def __init__(self, *args, **kwargs):
method __getitem__ (line 105) | def __getitem__(self, idx: int) -> torch.Tensor:
method __len__ (line 115) | def __len__(self):
method sparity_dict (line 119) | def sparity_dict(self):
method add (line 122) | def add(self, module: Any, name: Optional[str] = None) -> None:
method forward (line 129) | def forward(self, input: torch.Tensor) -> torch.Tensor:
method fused (line 143) | def fused(self):
class ToDense (line 190) | class ToDense(SparseModule):
method forward (line 193) | def forward(self, x: SparseConvTensor):
class RemoveGrid (line 197) | class RemoveGrid(SparseModule):
method forward (line 200) | def forward(self, x: SparseConvTensor):
FILE: mmcv/ops/sparse_ops.py
function get_conv_output_size (line 28) | def get_conv_output_size(input_size, kernel_size, stride, padding, dilat...
function get_deconv_output_size (line 41) | def get_deconv_output_size(input_size, kernel_size, stride, padding, dil...
function get_indice_pairs (line 54) | def get_indice_pairs(indices,
function indice_conv (line 116) | def indice_conv(features,
function fused_indice_conv (line 132) | def fused_indice_conv(features, filters, bias, indice_pairs, indice_pair...
function indice_conv_backward (line 143) | def indice_conv_backward(features,
function indice_maxpool (line 158) | def indice_maxpool(features, indice_pairs, indice_pair_num, num_activate...
function indice_maxpool_backward (line 167) | def indice_maxpool_backward(features, out_features, out_bp, indice_pairs,
FILE: mmcv/ops/sparse_pool.py
class SparseMaxPool (line 23) | class SparseMaxPool(SparseModule):
method __init__ (line 25) | def __init__(self,
method forward (line 49) | def forward(self, input):
class SparseMaxPool2d (line 77) | class SparseMaxPool2d(SparseMaxPool):
method __init__ (line 79) | def __init__(self, kernel_size, stride=1, padding=0, dilation=1):
class SparseMaxPool3d (line 83) | class SparseMaxPool3d(SparseMaxPool):
method __init__ (line 85) | def __init__(self, kernel_size, stride=1, padding=0, dilation=1):
FILE: mmcv/ops/sparse_structure.py
function scatter_nd (line 7) | def scatter_nd(indices: torch.Tensor, updates: torch.Tensor,
class SparseConvTensor (line 24) | class SparseConvTensor:
method __init__ (line 26) | def __init__(self,
method spatial_size (line 42) | def spatial_size(self):
method find_indice_pair (line 45) | def find_indice_pair(self, key):
method dense (line 52) | def dense(self, channels_first: bool = True) -> torch.Tensor:
method sparity (line 64) | def sparity(self):
FILE: mmcv/ops/sync_bn.py
class SyncBatchNormFunction (line 22) | class SyncBatchNormFunction(Function):
method symbolic (line 25) | def symbolic(g, input, running_mean, running_var, weight, bias, momentum,
m
Condensed preview — 857 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (5,144K chars).
[
{
"path": ".dev_scripts/check_installation.py",
"chars": 1418,
"preview": "import numpy as np\nimport torch\n\nfrom mmcv.ops import box_iou_rotated\nfrom mmcv.utils import collect_env\n\n\ndef check_ins"
},
{
"path": ".dockerignore",
"chars": 65,
"preview": ".git\n.gitignore\n*.egg-info\n.eggs/\n.mypy-cache\npip-wheel-metadata\n"
},
{
"path": ".github/ISSUE_TEMPLATE/1-bug-report.yml",
"chars": 3554,
"preview": "name: \"🐞 Bug report\"\ndescription: \"Create a report to help us reproduce and fix the bug\"\nlabels: bug\ntitle: \"[Bug] \"\n\nbo"
},
{
"path": ".github/ISSUE_TEMPLATE/2-feature_request.yml",
"chars": 1523,
"preview": "name: 🚀 Feature request\ndescription: Suggest an idea for this project\nlabels: [feature-request]\ntitle: \"[Feature] \"\n\nbod"
},
{
"path": ".github/ISSUE_TEMPLATE/3-documentation.yml",
"chars": 1383,
"preview": "name: 📚 Documentation\ndescription: Report an issue related to the documentation.\nlabels: \"docs\"\ntitle: \"[Docs] \"\n\nbody:\n"
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 437,
"preview": "blank_issues_enabled: false\n\ncontact_links:\n - name: 💬 Forum\n url: https://github.com/open-mmlab/mmcv/discussions\n "
},
{
"path": ".github/pull_request_template.md",
"chars": 1825,
"preview": "Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more he"
},
{
"path": ".github/workflows/build_macos_wheel.yml",
"chars": 2221,
"preview": "name: build macos wheel\n\non: push\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: "
},
{
"path": ".github/workflows/lint.yml",
"chars": 730,
"preview": "name: lint\n\non: [push, pull_request]\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progres"
},
{
"path": ".github/workflows/merge_stage_test.yml",
"chars": 14554,
"preview": "name: merge_stage_test\n\non:\n push:\n paths-ignore:\n - \".github/**.md\"\n - \"docker/**\"\n - \"docs/**\"\n "
},
{
"path": ".github/workflows/pr_stage_test.yml",
"chars": 8725,
"preview": "name: pr_stage_test\n\non:\n pull_request:\n paths-ignore:\n - \".github/**.md\"\n - \"docker/**\"\n - \"docs/**\""
},
{
"path": ".github/workflows/publish-to-pypi.yml",
"chars": 1386,
"preview": "name: deploy\n\non: push\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref }}\n cancel-in-progress: true\n\njobs:"
},
{
"path": ".gitignore",
"chars": 1436,
"preview": "# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# PyTorch checkpoint\n*.p"
},
{
"path": ".pre-commit-config-zh-cn.yaml",
"chars": 2262,
"preview": "exclude: ^tests/data/\nrepos:\n - repo: https://github.com/pre-commit/pre-commit\n rev: v4.0.0\n hooks:\n - id: v"
},
{
"path": ".pre-commit-config.yaml",
"chars": 2179,
"preview": "exclude: ^tests/data/\nrepos:\n - repo: https://github.com/pre-commit/pre-commit\n rev: v4.0.0\n hooks:\n - id: v"
},
{
"path": ".readthedocs.yml",
"chars": 186,
"preview": "version: 2\n\nformats: all\n\nbuild:\n os: ubuntu-22.04\n tools:\n python: \"3.7\"\n\npython:\n install:\n - requirements: r"
},
{
"path": "CITATION.cff",
"chars": 254,
"preview": "cff-version: 1.2.0\nmessage: \"If you use this software, please cite it as below.\"\nauthors:\n - name: \"MMCV Contributors\"\n"
},
{
"path": "CONTRIBUTING.md",
"chars": 11786,
"preview": "## Contributing to OpenMMLab\n\nWelcome to the MMCV community, we are committed to building a cutting-edge computer vision"
},
{
"path": "CONTRIBUTING_zh-CN.md",
"chars": 7471,
"preview": "## 贡献代码\n\n欢迎加入 MMCV 社区,我们致力于打造最前沿的计算机视觉基础库,我们欢迎任何类型的贡献,包括但不限于\n\n**修复错误**\n\n修复代码实现错误的步骤如下:\n\n1. 如果提交的代码改动较大,建议先提交 issue,并正确描述"
},
{
"path": "LICENSE",
"chars": 11413,
"preview": "Copyright (c) OpenMMLab. All rights reserved\n\n Apache License\n "
},
{
"path": "LICENSES.md",
"chars": 1592,
"preview": "# Licenses for special operations\n\nIn this file, we list the operations with other licenses instead of Apache 2.0. Users"
},
{
"path": "MANIFEST.in",
"chars": 490,
"preview": "include requirements/runtime.txt\ninclude mmcv/ops/csrc/common/cuda/*.cuh mmcv/ops/csrc/common/cuda/*.hpp mmcv/ops/csrc/c"
},
{
"path": "README.md",
"chars": 11581,
"preview": "<div align=\"center\">\n <img src=\"https://raw.githubusercontent.com/open-mmlab/mmcv/main/docs/en/mmcv-logo.png\" width=\"30"
},
{
"path": "README_zh-CN.md",
"chars": 10404,
"preview": "<div align=\"center\">\n <img src=\"https://raw.githubusercontent.com/open-mmlab/mmcv/main/docs/en/mmcv-logo.png\" width=\"30"
},
{
"path": "TERMINOLOGY.md",
"chars": 968,
"preview": "# English-Chinese terminology comparison (英汉术语对照)\n\nThis document is used as a reference for English-Chinese terminology "
},
{
"path": "docker/README.md",
"chars": 2108,
"preview": "# Docker images\n\nThere are two `Dockerfile` files to build docker images, one to build an image with the mmcv pre-built "
},
{
"path": "docker/dev/Dockerfile",
"chars": 1216,
"preview": "ARG PYTORCH=\"1.8.1\"\nARG CUDA=\"10.2\"\nARG CUDNN=\"7\"\n\nFROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel\n\n# To"
},
{
"path": "docker/release/Dockerfile",
"chars": 941,
"preview": "ARG PYTORCH=\"1.8.1\"\nARG CUDA=\"10.2\"\nARG CUDNN=\"7\"\n\nFROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel\n\n# To"
},
{
"path": "docs/en/Makefile",
"chars": 581,
"preview": "# Minimal makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS =\nSPHI"
},
{
"path": "docs/en/_static/css/readthedocs.css",
"chars": 181,
"preview": ".header-logo {\n background-image: url(\"../image/mmcv-logo.png\");\n background-size: 85px 40px;\n height: 40px;\n "
},
{
"path": "docs/en/_static/version.json",
"chars": 23926,
"preview": "{\n \"Linux\": [\n {\n \"cuda\": \"12.1\",\n \"torch\": \"2.4.x\",\n \"mmcv\": [\n "
},
{
"path": "docs/en/_templates/classtemplate.rst",
"chars": 247,
"preview": ".. role:: hidden\n :class: hidden-section\n.. currentmodule:: {{ module }}\n\n\n{{ name | underline}}\n\n.. autoclass:: {{ n"
},
{
"path": "docs/en/api/arraymisc.rst",
"chars": 290,
"preview": ".. role:: hidden\n :class: hidden-section\n\nmmcv.arraymisc\n===================================\n\n.. contents:: mmcv.arra"
},
{
"path": "docs/en/api/cnn.rst",
"chars": 1050,
"preview": ".. role:: hidden\n :class: hidden-section\n\nmmcv.cnn\n===================================\n\n.. contents:: mmcv.cnn\n :de"
},
{
"path": "docs/en/api/image.rst",
"chars": 1293,
"preview": ".. role:: hidden\n :class: hidden-section\n\nmmcv.image\n===================================\n\n.. contents:: mmcv.image\n "
},
{
"path": "docs/en/api/ops.rst",
"chars": 2346,
"preview": ".. role:: hidden\n :class: hidden-section\n\nmmcv.ops\n===================================\n\n.. contents:: mmcv.ops\n :de"
},
{
"path": "docs/en/api/transforms.rst",
"chars": 898,
"preview": ".. role:: hidden\n :class: hidden-section\n\nmmcv.transforms\n===================================\n\n.. currentmodule:: mmc"
},
{
"path": "docs/en/api/utils.rst",
"chars": 352,
"preview": ".. role:: hidden\n :class: hidden-section\n\nmmcv.utils\n===================================\n\n.. contents:: mmcv.utils\n "
},
{
"path": "docs/en/api/video.rst",
"chars": 772,
"preview": ".. role:: hidden\n :class: hidden-section\n\nmmcv.video\n===================================\n\n.. contents:: mmcv.video\n "
},
{
"path": "docs/en/api/visualization.rst",
"chars": 681,
"preview": ".. role:: hidden\n :class: hidden-section\n\nmmcv.visualization\n===================================\n\n.. contents:: mmcv."
},
{
"path": "docs/en/community/contributing.md",
"chars": 12092,
"preview": "## Contributing to OpenMMLab\n\nWelcome to the MMCV community, we are committed to building a cutting-edge computer vision"
},
{
"path": "docs/en/community/pr.md",
"chars": 93,
"preview": "## Pull Request (PR)\n\nContent has been migrated to [contributing guidance](contributing.md).\n"
},
{
"path": "docs/en/compatibility.md",
"chars": 7992,
"preview": "### v2.0.0\n\nThe OpenMMLab team released a new generation of training engine [MMEngine](https://github.com/open-mmlab/mme"
},
{
"path": "docs/en/conf.py",
"chars": 6681,
"preview": "#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most com"
},
{
"path": "docs/en/deployment/mmcv_ops_definition.md",
"chars": 27460,
"preview": "# MMCV Operators\n\nTo make custom operators in MMCV more standard, precise definitions of each operator are listed in thi"
},
{
"path": "docs/en/docutils.conf",
"chars": 43,
"preview": "[html writers]\ntable_style: colwidths-auto\n"
},
{
"path": "docs/en/faq.md",
"chars": 7916,
"preview": "## Frequently Asked Questions\n\nWe list some common troubles faced by many users and their corresponding solutions here.\n"
},
{
"path": "docs/en/get_started/api_reference.md",
"chars": 109027,
"preview": "# API reference table\n\nDue to the removal of the `mmcv.fileio`, `mmcv.runner`, `mmcv.parallel`, `mmcv.engine`, `mmcv.dev"
},
{
"path": "docs/en/get_started/build.md",
"chars": 11336,
"preview": "## Build MMCV from source\n\n### Build mmcv\n\nBefore installing mmcv, make sure that PyTorch has been successfully installe"
},
{
"path": "docs/en/get_started/installation.md",
"chars": 13179,
"preview": "## Installation\n\nThere are two versions of MMCV:\n\n- **mmcv**: comprehensive, with full features and various CUDA ops out"
},
{
"path": "docs/en/get_started/introduction.md",
"chars": 2547,
"preview": "## Introduction\n\nMMCV is a foundational library for computer vision research and provides the following functionalities."
},
{
"path": "docs/en/get_started/previous_versions.md",
"chars": 1111,
"preview": "## OTHER VERSIONS OF PYTORCH BUILT FOR MMCV-FULL\n\nWe no longer provide `mmcv-full` packages compiled under lower version"
},
{
"path": "docs/en/index.rst",
"chars": 1283,
"preview": "Welcome to MMCV's documentation!\n================================\n\nYou can switch between Chinese and English documents "
},
{
"path": "docs/en/make.bat",
"chars": 752,
"preview": "@ECHO OFF\n\npushd %~dp0\n\nREM Command file for Sphinx documentation\n\nif \"%SPHINXBUILD%\" == \"\" (\n\tset SPHINXBUILD=sphinx-bu"
},
{
"path": "docs/en/switch_language.md",
"chars": 129,
"preview": "## <a href='https://mmcv.readthedocs.io/en/latest/'>English</a>\n\n## <a href='https://mmcv.readthedocs.io/zh_CN/latest/'>"
},
{
"path": "docs/en/understand_mmcv/cnn.md",
"chars": 2432,
"preview": "## CNN\n\nWe provide some building bricks for CNNs, including layer building, module bundles and weight initialization.\n\n#"
},
{
"path": "docs/en/understand_mmcv/data_process.md",
"chars": 7309,
"preview": "## Data Process\n\n### Image\n\nThis module provides some image processing methods, which requires `opencv` to be installed "
},
{
"path": "docs/en/understand_mmcv/data_transform.md",
"chars": 17312,
"preview": "# Data Transformation\n\nIn the OpenMMLab algorithm library, dataset construction and data preparation are decoupled. Usua"
},
{
"path": "docs/en/understand_mmcv/ops.md",
"chars": 4225,
"preview": "## ops\n\nWe implement common ops used in detection, segmentation, etc.\n\n| Device | CPU | CUDA | MLU"
},
{
"path": "docs/en/understand_mmcv/visualization.md",
"chars": 527,
"preview": "## Visualization\n\n`mmcv` can show images and annotations (currently supported types include bounding boxes).\n\n```python\n"
},
{
"path": "docs/zh_cn/Makefile",
"chars": 581,
"preview": "# Minimal makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS =\nSPHI"
},
{
"path": "docs/zh_cn/_static/css/readthedocs.css",
"chars": 181,
"preview": ".header-logo {\n background-image: url(\"../image/mmcv-logo.png\");\n background-size: 85px 40px;\n height: 40px;\n "
},
{
"path": "docs/zh_cn/_static/version.json",
"chars": 23926,
"preview": "{\n \"Linux\": [\n {\n \"cuda\": \"12.1\",\n \"torch\": \"2.4.x\",\n \"mmcv\": [\n "
},
{
"path": "docs/zh_cn/_templates/classtemplate.rst",
"chars": 247,
"preview": ".. role:: hidden\n :class: hidden-section\n.. currentmodule:: {{ module }}\n\n\n{{ name | underline}}\n\n.. autoclass:: {{ n"
},
{
"path": "docs/zh_cn/api/arraymisc.rst",
"chars": 290,
"preview": ".. role:: hidden\n :class: hidden-section\n\nmmcv.arraymisc\n===================================\n\n.. contents:: mmcv.arra"
},
{
"path": "docs/zh_cn/api/cnn.rst",
"chars": 1050,
"preview": ".. role:: hidden\n :class: hidden-section\n\nmmcv.cnn\n===================================\n\n.. contents:: mmcv.cnn\n :de"
},
{
"path": "docs/zh_cn/api/image.rst",
"chars": 1293,
"preview": ".. role:: hidden\n :class: hidden-section\n\nmmcv.image\n===================================\n\n.. contents:: mmcv.image\n "
},
{
"path": "docs/zh_cn/api/ops.rst",
"chars": 2346,
"preview": ".. role:: hidden\n :class: hidden-section\n\nmmcv.ops\n===================================\n\n.. contents:: mmcv.ops\n :de"
},
{
"path": "docs/zh_cn/api/transforms.rst",
"chars": 898,
"preview": ".. role:: hidden\n :class: hidden-section\n\nmmcv.transforms\n===================================\n\n.. currentmodule:: mmc"
},
{
"path": "docs/zh_cn/api/utils.rst",
"chars": 352,
"preview": ".. role:: hidden\n :class: hidden-section\n\nmmcv.utils\n===================================\n\n.. contents:: mmcv.utils\n "
},
{
"path": "docs/zh_cn/api/video.rst",
"chars": 772,
"preview": ".. role:: hidden\n :class: hidden-section\n\nmmcv.video\n===================================\n\n.. contents:: mmcv.video\n "
},
{
"path": "docs/zh_cn/api/visualization.rst",
"chars": 681,
"preview": ".. role:: hidden\n :class: hidden-section\n\nmmcv.visualization\n===================================\n\n.. contents:: mmcv."
},
{
"path": "docs/zh_cn/community/code_style.md",
"chars": 19789,
"preview": "## 代码规范\n\n### 代码规范标准\n\n#### PEP 8 —— Python 官方代码规范\n\n[Python 官方的代码风格指南](https://www.python.org/dev/peps/pep-0008/),包含了以下几个方"
},
{
"path": "docs/zh_cn/community/contributing.md",
"chars": 7477,
"preview": "## 贡献代码\n\n欢迎加入 MMCV 社区,我们致力于打造最前沿的计算机视觉基础库,我们欢迎任何类型的贡献,包括但不限于\n\n**修复错误**\n\n修复代码实现错误的步骤如下:\n\n1. 如果提交的代码改动较大,建议先提交 issue,并正确描述"
},
{
"path": "docs/zh_cn/community/pr.md",
"chars": 44,
"preview": "## 拉取请求\n\n本文档的内容已迁移到[贡献指南](contributing.md)。\n"
},
{
"path": "docs/zh_cn/compatibility.md",
"chars": 6777,
"preview": "### v2.0.0\n\nOpenMMLab 团队于 2022 年 9 月 1 日在世界人工智能大会发布了新一代训练引擎 [MMEngine](https://github.com/open-mmlab/mmengine),它是一个用于训练深"
},
{
"path": "docs/zh_cn/conf.py",
"chars": 6759,
"preview": "#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most com"
},
{
"path": "docs/zh_cn/docutils.conf",
"chars": 43,
"preview": "[html writers]\ntable_style: colwidths-auto\n"
},
{
"path": "docs/zh_cn/faq.md",
"chars": 5600,
"preview": "## 常见问题\n\n在这里我们列出了用户经常遇到的问题以及对应的解决方法。如果您遇到了其他常见的问题,并且知道可以帮到大家的解决办法,\n欢迎随时丰富这个列表。\n\n### 安装问题\n\n- KeyError: \"xxx: 'yyy is not "
},
{
"path": "docs/zh_cn/get_started/api_reference.md",
"chars": 107827,
"preview": "# 接口对照表\n\n由于 MMCV v1.x 升级到 MMCV v2.x 时移除了 `mmcv.fileio`,`mmcv.runner`,`mmcv.parallel`,`mmcv.engine`,`mmcv.device` 模块,以及 `"
},
{
"path": "docs/zh_cn/get_started/article.md",
"chars": 3134,
"preview": "## 解读文章汇总\n\n这篇文章汇总了 [OpenMMLab](https://www.zhihu.com/people/openmmlab) 解读的部分文章(更多文章和视频见 [OpenMMLabCourse](https://github"
},
{
"path": "docs/zh_cn/get_started/build.md",
"chars": 9453,
"preview": "## 从源码编译 MMCV\n\n### 编译 mmcv\n\n在编译 mmcv 之前,请确保 PyTorch 已经成功安装在环境中,可以参考 [PyTorch 官方安装文档](https://pytorch.org/get-started/loc"
},
{
"path": "docs/zh_cn/get_started/installation.md",
"chars": 11299,
"preview": "## 安装 MMCV\n\nMMCV 有两个版本:\n\n- **mmcv**: 完整版,包含所有的特性以及丰富的开箱即用的 CPU 和 CUDA 算子。注意,完整版本可能需要更长时间来编译。\n- **mmcv-lite**: 精简版,不包含 CP"
},
{
"path": "docs/zh_cn/get_started/introduction.md",
"chars": 1759,
"preview": "## 介绍 MMCV\n\nMMCV 是一个面向计算机视觉的基础库,它提供了以下功能:\n\n- [图像和视频处理](../understand_mmcv/data_process.md)\n- [图像和标注结果可视化](../understand_"
},
{
"path": "docs/zh_cn/get_started/previous_versions.md",
"chars": 1004,
"preview": "## 其他版本的 PyTorch\n\n我们不再提供在较低的 `PyTorch` 版本下编译的 `mmcv-full` 包,但为了您的方便,您可以在下面找到它们。\n\n### PyTorch 1.4\n\n| 1.0.0 \\<= mmcv_versi"
},
{
"path": "docs/zh_cn/index.rst",
"chars": 1104,
"preview": "欢迎来到 MMCV 的中文文档!\n=============================\n\n您可以在页面左下角切换中英文文档。\n\n.. toctree::\n :maxdepth: 2\n :caption: 介绍与安装\n\n g"
},
{
"path": "docs/zh_cn/make.bat",
"chars": 752,
"preview": "@ECHO OFF\n\npushd %~dp0\n\nREM Command file for Sphinx documentation\n\nif \"%SPHINXBUILD%\" == \"\" (\n\tset SPHINXBUILD=sphinx-bu"
},
{
"path": "docs/zh_cn/switch_language.md",
"chars": 123,
"preview": "## <a href='https://mmcv.readthedocs.io/en/2.x/'>English</a>\n\n## <a href='https://mmcv.readthedocs.io/zh_CN/2.x/'>简体中文</"
},
{
"path": "docs/zh_cn/understand_mmcv/cnn.md",
"chars": 1844,
"preview": "## 卷积神经网络\n\n我们为卷积神经网络提供了一些构建模块,包括层构建、模块组件和权重初始化。\n\n### 网络层的构建\n\n在运行实验时,我们可能需要尝试同属一种类型但不同配置的层,但又不希望每次都修改代码。于是我们提供一些层构建方法,可以从"
},
{
"path": "docs/zh_cn/understand_mmcv/data_process.md",
"chars": 4975,
"preview": "## 数据处理\n\n### 图像\n\n图像模块提供了一些图像预处理的函数,该模块依赖 `opencv` 。\n\n#### 读取/保存/显示\n\n使用 `imread` 和 `imwrite` 函数可以读取和保存图像。\n\n```python\nimpo"
},
{
"path": "docs/zh_cn/understand_mmcv/data_transform.md",
"chars": 10138,
"preview": "# 数据变换\n\n在 OpenMMLab 算法库中,数据集的构建和数据的准备是相互解耦的。通常,数据集的构建只对数据集进行解析,记录每个样本的基本信息;而数据的准备则是通过一系列的数据变换,根据样本的基本信息进行数据加载、预处理、格式化等操作"
},
{
"path": "docs/zh_cn/understand_mmcv/ops.md",
"chars": 4185,
"preview": "## 算子\n\nMMCV 提供了检测、分割等任务中常用的算子\n\n| Device | CPU | CUDA | MLU | MPS | Ascend |\n| --------------------"
},
{
"path": "docs/zh_cn/understand_mmcv/visualization.md",
"chars": 370,
"preview": "## 可视化\n\n`mmcv` 可以展示图像以及标注(目前只支持标注框)\n\n```python\n# 展示图像文件\nmmcv.imshow('a.jpg')\n\n# 展示已加载的图像\nimg = np.random.rand(100, 100, "
},
{
"path": "mmcv/__init__.py",
"chars": 321,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\n# flake8: noqa\nfrom .arraymisc import *\nfrom .image import *\nfrom .trans"
},
{
"path": "mmcv/arraymisc/__init__.py",
"chars": 133,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom .quantization import dequantize, quantize\n\n__all__ = ['quantize', '"
},
{
"path": "mmcv/arraymisc/quantization.py",
"chars": 2114,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom typing import Union\n\nimport numpy as np\n\n\ndef quantize(arr: np.ndar"
},
{
"path": "mmcv/cnn/__init__.py",
"chars": 1501,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom .alexnet import AlexNet\n# yapf: disable\nfrom .bricks import (Contex"
},
{
"path": "mmcv/cnn/alexnet.py",
"chars": 2075,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport logging\nfrom typing import Optional\n\nimport torch\nimport torch.nn"
},
{
"path": "mmcv/cnn/bricks/__init__.py",
"chars": 1510,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom .activation import build_activation_layer\nfrom .context_block impor"
},
{
"path": "mmcv/cnn/bricks/activation.py",
"chars": 3101,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom typing import Dict\n\nimport torch\nimport torch.nn as nn\nimport torch"
},
{
"path": "mmcv/cnn/bricks/context_block.py",
"chars": 4818,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom typing import Union\n\nimport torch\nfrom mmengine.model import consta"
},
{
"path": "mmcv/cnn/bricks/conv.py",
"chars": 1868,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport inspect\nfrom typing import Dict, Optional\n\nfrom mmengine.registry"
},
{
"path": "mmcv/cnn/bricks/conv2d_adaptive_padding.py",
"chars": 2733,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport math\nfrom typing import Tuple, Union\n\nimport torch\nfrom mmengine."
},
{
"path": "mmcv/cnn/bricks/conv_module.py",
"chars": 14583,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport warnings\nfrom functools import partial\nfrom typing import Dict, O"
},
{
"path": "mmcv/cnn/bricks/conv_ws.py",
"chars": 6225,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom collections import OrderedDict\nfrom typing import Dict, List, Optio"
},
{
"path": "mmcv/cnn/bricks/depthwise_separable_conv_module.py",
"chars": 4558,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom typing import Dict, Optional, Tuple, Union\n\nimport torch\nimport tor"
},
{
"path": "mmcv/cnn/bricks/drop.py",
"chars": 2289,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom typing import Any, Dict, Optional\n\nimport torch\nimport torch.nn as "
},
{
"path": "mmcv/cnn/bricks/generalized_attention.py",
"chars": 16063,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport math\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimpor"
},
{
"path": "mmcv/cnn/bricks/hsigmoid.py",
"chars": 1664,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport warnings\n\nimport torch\nimport torch.nn as nn\nfrom mmengine.regist"
},
{
"path": "mmcv/cnn/bricks/hswish.py",
"chars": 1071,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport torch\nimport torch.nn as nn\nfrom mmengine.registry import MODELS\n"
},
{
"path": "mmcv/cnn/bricks/non_local.py",
"chars": 11401,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom abc import ABCMeta\nfrom typing import Dict, Optional\n\nimport torch\n"
},
{
"path": "mmcv/cnn/bricks/norm.py",
"chars": 5719,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport inspect\nfrom typing import Dict, Tuple, Union\n\nimport torch.nn as"
},
{
"path": "mmcv/cnn/bricks/padding.py",
"chars": 1500,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport inspect\nfrom typing import Dict\n\nimport torch.nn as nn\nfrom mmeng"
},
{
"path": "mmcv/cnn/bricks/plugin.py",
"chars": 3155,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport inspect\nimport platform\nfrom typing import Dict, Tuple, Union\n\nim"
},
{
"path": "mmcv/cnn/bricks/scale.py",
"chars": 1962,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport torch\nimport torch.nn as nn\n\n\nclass Scale(nn.Module):\n \"\"\"A le"
},
{
"path": "mmcv/cnn/bricks/swish.py",
"chars": 489,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport torch\nimport torch.nn as nn\nfrom mmengine.registry import MODELS\n"
},
{
"path": "mmcv/cnn/bricks/transformer.py",
"chars": 37137,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport copy\nimport math\nimport warnings\nfrom typing import Sequence\n\nimp"
},
{
"path": "mmcv/cnn/bricks/upsample.py",
"chars": 3299,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport inspect\nfrom typing import Dict\n\nimport torch\nimport torch.nn as "
},
{
"path": "mmcv/cnn/bricks/wrappers.py",
"chars": 7082,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nr\"\"\"Modified from https://github.com/facebookresearch/detectron2/blob/ma"
},
{
"path": "mmcv/cnn/resnet.py",
"chars": 10514,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport logging\nfrom typing import Optional, Sequence, Tuple, Union\n\nimpo"
},
{
"path": "mmcv/cnn/rfsearch/__init__.py",
"chars": 210,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom .operator import BaseConvRFSearchOp, Conv2dRFSearchOp\nfrom .search "
},
{
"path": "mmcv/cnn/rfsearch/operator.py",
"chars": 6787,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport copy\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nfrom "
},
{
"path": "mmcv/cnn/rfsearch/search.py",
"chars": 10167,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport os\nfrom typing import Dict, Optional\n\nimport mmengine\nimport torc"
},
{
"path": "mmcv/cnn/rfsearch/utils.py",
"chars": 2000,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport mmengine\nimport numpy as np\n\n\ndef write_to_json(config: dict, fil"
},
{
"path": "mmcv/cnn/utils/__init__.py",
"chars": 197,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom .flops_counter import get_model_complexity_info\nfrom .fuse_conv_bn "
},
{
"path": "mmcv/cnn/utils/flops_counter.py",
"chars": 23248,
"preview": "# Modified from flops-counter.pytorch by Vladislav Sovrasov\n# original repo: https://github.com/sovrasov/flops-counter.p"
},
{
"path": "mmcv/cnn/utils/fuse_conv_bn.py",
"chars": 1940,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport torch\nimport torch.nn as nn\n\n\ndef _fuse_conv_bn(conv: nn.Module, "
},
{
"path": "mmcv/cnn/vgg.py",
"chars": 6393,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport logging\nfrom typing import List, Optional, Sequence, Tuple, Union"
},
{
"path": "mmcv/image/__init__.py",
"chars": 1755,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom .colorspace import (bgr2gray, bgr2hls, bgr2hsv, bgr2rgb, bgr2ycbcr,"
},
{
"path": "mmcv/image/colorspace.py",
"chars": 10341,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom typing import Callable, Union\n\nimport cv2\nimport numpy as np\n\n\ndef "
},
{
"path": "mmcv/image/geometric.py",
"chars": 28189,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport numbers\nfrom typing import List, Optional, Tuple, Union, no_type_"
},
{
"path": "mmcv/image/io.py",
"chars": 14461,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport io\nimport os.path as osp\nimport warnings\nfrom pathlib import Path"
},
{
"path": "mmcv/image/misc.py",
"chars": 2065,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom typing import Optional\n\nimport numpy as np\n\nimport mmcv\n\ntry:\n i"
},
{
"path": "mmcv/image/photometric.py",
"chars": 21048,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport warnings\nfrom typing import Optional\n\nimport cv2\nimport numpy as "
},
{
"path": "mmcv/ops/__init__.py",
"chars": 6724,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom mmcv.utils import IS_MLU_AVAILABLE\nfrom .active_rotated_filter impo"
},
{
"path": "mmcv/ops/active_rotated_filter.py",
"chars": 2244,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom typing import Tuple\n\nimport torch\nfrom torch.autograd import Functi"
},
{
"path": "mmcv/ops/assign_score_withk.py",
"chars": 4761,
"preview": "from typing import Tuple\n\nimport torch\nfrom torch.autograd import Function\n\nfrom ..utils import ext_loader\n\next_module ="
},
{
"path": "mmcv/ops/ball_query.py",
"chars": 3138,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom typing import Optional, Tuple\n\nimport torch\nfrom torch.autograd imp"
},
{
"path": "mmcv/ops/bbox.py",
"chars": 4423,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport torch\n\nfrom ..utils import ext_loader\n\next_module = ext_loader.lo"
},
{
"path": "mmcv/ops/bezier_align.py",
"chars": 4825,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom typing import Tuple, Union\n\nimport torch\nimport torch.nn as nn\nfrom"
},
{
"path": "mmcv/ops/bias_act.py",
"chars": 21212,
"preview": "# Modified from\n# https://github.com/NVlabs/stylegan3/blob/main/torch_utils/ops/bias_act.py\n\n# Copyright (c) 2021, NVIDI"
},
{
"path": "mmcv/ops/border_align.py",
"chars": 3908,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\n# modified from\n# https://github.com/Megvii-BaseDetection/cvpods/blob/ma"
},
{
"path": "mmcv/ops/box_iou_quadri.py",
"chars": 1709,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport torch\n\nfrom ..utils import ext_loader\n\next_module = ext_loader.lo"
},
{
"path": "mmcv/ops/box_iou_rotated.py",
"chars": 5362,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport torch\n\nfrom ..utils import ext_loader\n\next_module = ext_loader.lo"
},
{
"path": "mmcv/ops/carafe.py",
"chars": 10587,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom typing import Tuple\n\nimport torch\nimport torch.nn as nn\nimport torc"
},
{
"path": "mmcv/ops/cc_attention.py",
"chars": 3146,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom "
},
{
"path": "mmcv/ops/chamfer_distance.py",
"chars": 3446,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom typing import Sequence, Tuple\n\nimport torch\nfrom torch import Tenso"
},
{
"path": "mmcv/ops/contour_expand.py",
"chars": 1935,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom typing import Union\n\nimport numpy as np\nimport torch\n\nfrom ..utils "
},
{
"path": "mmcv/ops/conv2d_gradfix.py",
"chars": 13616,
"preview": "# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n#\n# NVIDIA CORPORATION and its licensors re"
},
{
"path": "mmcv/ops/convex_iou.py",
"chars": 1853,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom typing import Tuple\n\nimport torch\n\nfrom ..utils import ext_loader\n\n"
},
{
"path": "mmcv/ops/corner_pool.py",
"chars": 2475,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nimport torch\nfrom mmengine.utils import digit_version\nfrom torch import "
},
{
"path": "mmcv/ops/correlation.py",
"chars": 6875,
"preview": "# Copyright (c) OpenMMLab. All rights reserved.\nfrom typing import Tuple\n\nimport torch\nfrom torch import Tensor, nn\nfrom"
},
{
"path": "mmcv/ops/csrc/README.md",
"chars": 4836,
"preview": "# Code Structure of CUDA operators\n\nThis folder contains all non-python code for MMCV custom ops. Please follow the same"
},
{
"path": "mmcv/ops/csrc/common/box_iou_rotated_utils.hpp",
"chars": 13013,
"preview": "// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n// modified from\n// https://github.com/facebookr"
},
{
"path": "mmcv/ops/csrc/common/cuda/active_rotated_filter_cuda_kernel.cuh",
"chars": 2227,
"preview": "// Copyright (c) OpenMMLab. All rights reserved.\n// Modified from\n// https://github.com/csuhan/s2anet/blob/master/mmdet/"
},
{
"path": "mmcv/ops/csrc/common/cuda/assign_score_withk_cuda_kernel.cuh",
"chars": 4594,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef ASSIGN_SCORE_WITHK_CUDA_KERNEL_CUH\n#define ASSIGN_SCORE_WITHK_CU"
},
{
"path": "mmcv/ops/csrc/common/cuda/ball_query_cuda_kernel.cuh",
"chars": 1746,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n// Modified from\n// https://github.com/sshaoshuai/Pointnet2.PyTorch/tree"
},
{
"path": "mmcv/ops/csrc/common/cuda/bbox_overlaps_cuda_kernel.cuh",
"chars": 5724,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef BBOX_OVERLAPS_CUDA_KERNEL_CUH\n#define BBOX_OVERLAPS_CUDA_KERNEL_"
},
{
"path": "mmcv/ops/csrc/common/cuda/bezier_align_cuda_kernel.cuh",
"chars": 9886,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n// Modified from\n// https://github.com/aim-uofa/AdelaiDet/blob/master/ad"
},
{
"path": "mmcv/ops/csrc/common/cuda/border_align_cuda_kernel.cuh",
"chars": 6913,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n// modified from\n// https://github.com/Megvii-BaseDetection/cvpods/blob/"
},
{
"path": "mmcv/ops/csrc/common/cuda/box_iou_quadri_cuda.cuh",
"chars": 2876,
"preview": "// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n#ifndef BOX_IOU_QUADRI_CUDA_CUH\n#define BOX_IOU_"
},
{
"path": "mmcv/ops/csrc/common/cuda/box_iou_rotated_cuda.cuh",
"chars": 2459,
"preview": "// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n// modified from\n// https://github.com/facebookr"
},
{
"path": "mmcv/ops/csrc/common/cuda/carafe_cuda_kernel.cuh",
"chars": 12524,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef CARAFE_CUDA_KERNEL_CUH\n#define CARAFE_CUDA_KERNEL_CUH\n\n#include "
},
{
"path": "mmcv/ops/csrc/common/cuda/carafe_naive_cuda_kernel.cuh",
"chars": 4363,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef CARAFE_NAIVE_CUDA_KERNEL_CUH\n#define CARAFE_NAIVE_CUDA_KERNEL_CU"
},
{
"path": "mmcv/ops/csrc/common/cuda/chamfer_distance_cuda_kernel.cuh",
"chars": 3727,
"preview": "// Copyright (c) OpenMMLab. All rights reserved.\n// Modified from\n// https://github.com/chrdiller/pyTorchChamferDistance"
},
{
"path": "mmcv/ops/csrc/common/cuda/common_cuda_helper.hpp",
"chars": 3329,
"preview": "#ifndef COMMON_CUDA_HELPER\n#define COMMON_CUDA_HELPER\n\n#include <cuda.h>\n\n#define CUDA_1D_KERNEL_LOOP(i, n) "
},
{
"path": "mmcv/ops/csrc/common/cuda/convex_iou_cuda_kernel.cuh",
"chars": 23369,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef CONVEX_IOU_CUDA_KERNEL_CUH\n#define CONVEX_IOU_CUDA_KERNEL_CUH\n\n#"
},
{
"path": "mmcv/ops/csrc/common/cuda/correlation_cuda.cuh",
"chars": 7694,
"preview": "// Copyright (c) OpenMMLab. All rights reserved.\n// Modified from\n// https://github.com/ClementPinard/Pytorch-Correlatio"
},
{
"path": "mmcv/ops/csrc/common/cuda/deform_conv_cuda_kernel.cuh",
"chars": 15470,
"preview": "/*!\n ******************* BEGIN Caffe Copyright Notice and Disclaimer\n *****************\n *\n * COPYRIGHT\n *\n * All contri"
},
{
"path": "mmcv/ops/csrc/common/cuda/deform_roi_pool_cuda_kernel.cuh",
"chars": 7888,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef DEFORM_ROI_POOL_CUDA_KERNEL_CUH\n#define DEFORM_ROI_POOL_CUDA_KER"
},
{
"path": "mmcv/ops/csrc/common/cuda/diff_iou_rotated_cuda_kernel.cuh",
"chars": 4428,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n// Adapted from\n// https://github.com/lilanxiao/Rotated_IoU/cuda_op/sort"
},
{
"path": "mmcv/ops/csrc/common/cuda/furthest_point_sample_cuda_kernel.cuh",
"chars": 4212,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef FURTHEST_POINT_SAMPLE_CUDA_KERNEL_CUH\n#define FURTHEST_POINT_SAM"
},
{
"path": "mmcv/ops/csrc/common/cuda/gather_points_cuda_kernel.cuh",
"chars": 1708,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef GATHER_POINTS_CUDA_KERNEL_CUH\n#define GATHER_POINTS_CUDA_KERNEL_"
},
{
"path": "mmcv/ops/csrc/common/cuda/group_points_cuda_kernel.cuh",
"chars": 2384,
"preview": "// Copyright (c) OpenMMLab. All rights reserved.\n// Modified from\n// https://github.com/sshaoshuai/Pointnet2.PyTorch/tre"
},
{
"path": "mmcv/ops/csrc/common/cuda/iou3d_cuda_kernel.cuh",
"chars": 12932,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef IOU3D_CUDA_KERNEL_CUH\n#define IOU3D_CUDA_KERNEL_CUH\n\n#ifdef MMCV"
},
{
"path": "mmcv/ops/csrc/common/cuda/knn_cuda_kernel.cuh",
"chars": 2462,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n// Modified from\n// https://github.com/CVMI-Lab/PAConv/tree/main/scene_s"
},
{
"path": "mmcv/ops/csrc/common/cuda/masked_conv2d_cuda_kernel.cuh",
"chars": 2409,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef MASKED_CONV2D_CUDA_KERNEL_CUH\n#define MASKED_CONV2D_CUDA_KERNEL_"
},
{
"path": "mmcv/ops/csrc/common/cuda/min_area_polygons_cuda.cuh",
"chars": 7743,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef MIN_AREA_POLYGONS_CUDA_KERNEL_CUH\n#define MIN_AREA_POLYGONS_CUDA"
},
{
"path": "mmcv/ops/csrc/common/cuda/modulated_deform_conv_cuda_kernel.cuh",
"chars": 17255,
"preview": "/*!\n ******************* BEGIN Caffe Copyright Notice and Disclaimer\n *****************\n *\n * COPYRIGHT\n *\n * All contri"
},
{
"path": "mmcv/ops/csrc/common/cuda/ms_deform_attn_cuda_kernel.cuh",
"chars": 33575,
"preview": "/*!\n**************************************************************************************************\n* Deformable DETR"
},
{
"path": "mmcv/ops/csrc/common/cuda/nms_cuda_kernel.cuh",
"chars": 4052,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef NMS_CUDA_KERNEL_CUH\n#define NMS_CUDA_KERNEL_CUH\n\n#include <float"
},
{
"path": "mmcv/ops/csrc/common/cuda/nms_quadri_cuda.cuh",
"chars": 5469,
"preview": "// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n#ifndef NMS_QUADRI_CUDA_CUH\n#define NMS_QUADRI_C"
},
{
"path": "mmcv/ops/csrc/common/cuda/nms_rotated_cuda.cuh",
"chars": 5057,
"preview": "// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n// modified from\n// https://github.com/facebookr"
},
{
"path": "mmcv/ops/csrc/common/cuda/parrots_cudawarpfunction.cuh",
"chars": 3424,
"preview": "/*\n * Copyright (c) 2019, SenseTime.\n */\n\n#ifndef INCLUDE_PARROTS_DARRAY_CUDAWARPFUNCTION_CUH_\n#define INCLUDE_PARROTS_D"
},
{
"path": "mmcv/ops/csrc/common/cuda/points_in_boxes_cuda_kernel.cuh",
"chars": 3334,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef POINT_IN_BOXES_CUDA_KERNEL_CUH\n#define POINT_IN_BOXES_CUDA_KERNE"
},
{
"path": "mmcv/ops/csrc/common/cuda/points_in_polygons_cuda_kernel.cuh",
"chars": 1994,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef POINTS_IN_POLYGONS_CUDA_KERNEL_CUH\n#define POINTS_IN_POLYGONS_CU"
},
{
"path": "mmcv/ops/csrc/common/cuda/prroi_pool_cuda_kernel.cuh",
"chars": 15141,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n// Modified from\n// https://github.com/vacancy/PreciseRoIPooling/blob/ma"
},
{
"path": "mmcv/ops/csrc/common/cuda/psamask_cuda_kernel.cuh",
"chars": 6160,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef PSAMASK_CUDA_KERNEL_CUH\n#define PSAMASK_CUDA_KERNEL_CUH\n\n#ifdef "
},
{
"path": "mmcv/ops/csrc/common/cuda/riroi_align_rotated_cuda_kernel.cuh",
"chars": 10982,
"preview": "// Modified from\n// https://github.com/csuhan/ReDet/blob/master/mmdet/ops/riroi_align/src/riroi_align_kernel.cu\n#ifndef "
},
{
"path": "mmcv/ops/csrc/common/cuda/roi_align_cuda_kernel.cuh",
"chars": 8616,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef ROI_ALIGN_CUDA_KERNEL_CUH\n#define ROI_ALIGN_CUDA_KERNEL_CUH\n\n#in"
},
{
"path": "mmcv/ops/csrc/common/cuda/roi_align_rotated_cuda_kernel.cuh",
"chars": 9033,
"preview": "// Modified from\n// https://github.com/facebookresearch/detectron2/tree/master/detectron2/layers/csrc/ROIAlignRotated\n//"
},
{
"path": "mmcv/ops/csrc/common/cuda/roi_pool_cuda_kernel.cuh",
"chars": 3448,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef ROI_POOL_CUDA_KERNEL_CUH\n#define ROI_POOL_CUDA_KERNEL_CUH\n\n#ifde"
},
{
"path": "mmcv/ops/csrc/common/cuda/roiaware_pool3d_cuda_kernel.cuh",
"chars": 10602,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef ROIAWARE_POOL3D_CUDA_KERNEL_CUH\n#define ROIAWARE_POOL3D_CUDA_KER"
},
{
"path": "mmcv/ops/csrc/common/cuda/roipoint_pool3d_cuda_kernel.cuh",
"chars": 4905,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef ROIPOINT_POOL3D_CUDA_KERNEL_CUH\n#define ROIPOINT_POOL3D_CUDA_KER"
},
{
"path": "mmcv/ops/csrc/common/cuda/rotated_feature_align_cuda_kernel.cuh",
"chars": 4702,
"preview": "// Copyright (c) OpenMMLab. All rights reserved.\n// Modified from\n// https://github.com/SJTU-Thinklab-Det/r3det-on-mmdet"
},
{
"path": "mmcv/ops/csrc/common/cuda/scatter_points_cuda_kernel.cuh",
"chars": 6284,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef SCATTER_POINTS_CUDA_KERNEL_CUH\n#define SCATTER_POINTS_CUDA_KERNE"
},
{
"path": "mmcv/ops/csrc/common/cuda/sigmoid_focal_loss_cuda_kernel.cuh",
"chars": 2241,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef SIGMOID_FOCAL_LOSS_CUDA_KERNEL_CUH\n#define SIGMOID_FOCAL_LOSS_CU"
},
{
"path": "mmcv/ops/csrc/common/cuda/softmax_focal_loss_cuda_kernel.cuh",
"chars": 2111,
"preview": "// Copyright (c) OpenMMLab. All rights reserved\n#ifndef SOFTMAX_FOCAL_LOSS_CUDA_KERNEL_CUH\n#define SOFTMAX_FOCAL_LOSS_CU"
},
{
"path": "mmcv/ops/csrc/common/cuda/spconv/indice.cuh",
"chars": 9124,
"preview": "// Copyright 2019 Yan Yan\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this "
},
{
"path": "mmcv/ops/csrc/common/cuda/spconv/reordering.cuh",
"chars": 5859,
"preview": "// Copyright 2019 Yan Yan\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this "
}
]
// ... and 657 more files (download for full content)
About this extraction
This page contains the full source code of the open-mmlab/mmcv GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 857 files (4.7 MB), approximately 1.3M tokens, and a symbol index with 2558 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.