From d06b35201b667f5ba09688cb1f15ed693af150a3 Mon Sep 17 00:00:00 2001 From: Wenwei Zhang <40779233+ZwwWayne@users.noreply.github.com> Date: Sun, 2 Aug 2020 21:46:06 +0800 Subject: [PATCH] Add ops warpper (#3457) * Add ops warpper * Reformat * disable yapf * Add comments --- .dev_scripts/linter.sh | 2 +- mmdet/ops/__init__.py | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 mmdet/ops/__init__.py diff --git a/.dev_scripts/linter.sh b/.dev_scripts/linter.sh index 46a05511..b0fe0acf 100644 --- a/.dev_scripts/linter.sh +++ b/.dev_scripts/linter.sh @@ -1,3 +1,3 @@ -yapf -r -i --style mmdet/ configs/ tests/ tools/ +yapf -r -i mmdet/ configs/ tests/ tools/ isort -rc mmdet/ configs/ tests/ tools/ flake8 . diff --git a/mmdet/ops/__init__.py b/mmdet/ops/__init__.py new file mode 100644 index 00000000..ae6a8368 --- /dev/null +++ b/mmdet/ops/__init__.py @@ -0,0 +1,32 @@ +# This file is added for back-compatibility. Thus, downstream codebase +# could still use and import mmdet.ops. + +# yapf: disable +from mmcv.ops import (ContextBlock, Conv2d, ConvTranspose2d, ConvWS2d, + CornerPool, DeformConv, DeformConvPack, DeformRoIPooling, + DeformRoIPoolingPack, GeneralizedAttention, Linear, + MaskedConv2d, MaxPool2d, ModulatedDeformConv, + ModulatedDeformConvPack, ModulatedDeformRoIPoolingPack, + NonLocal2D, RoIAlign, RoIPool, SAConv2d, + SigmoidFocalLoss, SimpleRoIAlign, batched_nms, + build_plugin_layer, conv_ws_2d, deform_conv, + deform_roi_pooling, get_compiler_version, + get_compiling_cuda_version, modulated_deform_conv, nms, + nms_match, point_sample, rel_roi_point_to_rel_img_point, + roi_align, roi_pool, sigmoid_focal_loss, soft_nms) + +# yapf: enable + +__all__ = [ + 'nms', 'soft_nms', 'RoIAlign', 'roi_align', 'RoIPool', 'roi_pool', + 'DeformConv', 'DeformConvPack', 'DeformRoIPooling', 'DeformRoIPoolingPack', + 'ModulatedDeformRoIPoolingPack', 'ModulatedDeformConv', + 'ModulatedDeformConvPack', 'deform_conv', 'modulated_deform_conv', + 'deform_roi_pooling', 'SigmoidFocalLoss', 'sigmoid_focal_loss', + 'MaskedConv2d', 'ContextBlock', 'GeneralizedAttention', 'NonLocal2D', + 'get_compiler_version', 'get_compiling_cuda_version', 'ConvWS2d', + 'conv_ws_2d', 'build_plugin_layer', 'batched_nms', 'Conv2d', + 'ConvTranspose2d', 'MaxPool2d', 'Linear', 'nms_match', 'CornerPool', + 'point_sample', 'rel_roi_point_to_rel_img_point', 'SimpleRoIAlign', + 'SAConv2d' +]