Zaida Zhou
dd82ab1497
Upgrade the version of isort ( #1705 )
...
* Upgrade the version of isort
* sort the order of importing modules
2022-02-09 21:29:21 +08:00
Yue Zhou
b0b30d0c5c
fix bug ( #1702 )
2022-02-09 14:00:12 +08:00
Zaida Zhou
227037fcd3
[Fix] Fix the unit test of correlation op ( #1659 )
2022-01-13 14:27:50 +08:00
Yue Zhou
594ff3c0d3
[Feature] Add convex IoU CUDA op for rotated detection. ( #1610 )
...
* add convex iou
* fix lint
* add convex_iou
* fix convex_iou
* add convex_giou
* fix bug
* fix lint
* fix bug
* Update
* update
* add kernel loop
* fix bug.
* fix polygen typo
* simplify reverse
* Update convex_iou_cuda_kernel.cuh
* Update mmcv/ops/convex_iou.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmcv/ops/convex_iou.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* add AT_DISPATCH_FLOATING_TYPES_AND_HALF
* fix lint
* fix lint
* Resolving conflicts
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-01-10 20:43:12 +08:00
Yue Zhou
9acc892a44
[Feature] Add active rotated filter op for rotated detection. ( #1598 )
...
* add active_rotated_filter
* fix lint
* fix lint
* renaming nRotation and nOrientation
* Update active_rotated_filter_cuda_kernel.cuh
* Update active_rotated_filter_cuda.cu
* fix bug
* fix lint
* Update test_active_rotated_filter.py
* fix lint
* Update active_rotated_filter_cuda_kernel.cuh
* renaming
* Update mmcv/ops/active_rotated_filter.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmcv/ops/active_rotated_filter.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmcv/ops/active_rotated_filter.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmcv/ops/active_rotated_filter.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmcv/ops/active_rotated_filter.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmcv/ops/active_rotated_filter.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* fix lint
* Resolving conflicts
* fix lint.
* Update __init__.py
* Update mmcv/ops/csrc/pytorch/cuda/active_rotated_filter_cuda.cu
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update active_rotated_filter.cpp
* fix lint
* Update mmcv/ops/csrc/pytorch/cpu/active_rotated_filter.cpp
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmcv/ops/csrc/pytorch/cpu/active_rotated_filter.cpp
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update active_rotated_filter.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-01-10 17:35:20 +08:00
Yue Zhou
51b40c332a
[Feature] Add min_area_polygons CUDA op for rotated detection. ( #1611 )
...
* init
* Update pybind.cpp
* Update min_area_polygons_cuda.cuh
* Update cudabind.cpp
* fix bug
* Create test_min_area_polygons.py
* add test
* update
* Update min_area_polygons_cuda.cuh
* fix bugs.
* Update min_area_polygons_cuda.cuh
* Update min_area_polygons.py
* Update min_area_polygons_cuda.cuh
* merge these 4 nested loops
* add AT_DISPATCH_FLOATING_TYPES_AND_HALF
* fix lint
* Resolving conflicts
2022-01-10 11:00:50 +08:00
zhanggefan
b6167d5987
[Enhancement] Add clockwise argument to ops box_iou_rotated and nms_rotated ( #1592 )
...
* add clockwise arguments to ops box_iou_rotated and nms_rotated
* refactor docs
* change code that may incur stopped gradient.
* refactor docs
* Update mmcv/ops/nms.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmcv/ops/box_iou_rotated.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-01-10 10:57:11 +08:00
zhouyue
304efbb650
[Feature] Add points_in_polygons CUDA op for rotated detection. ( #1600 )
2021-12-24 10:56:48 +08:00
zhouyue
0bcbeadb53
[Feature] Add RiRoIAlignRotated CUDA op for rotated detection. ( #1599 )
2021-12-24 00:30:34 +08:00
zhouyue
2475dc3452
[Feature] Add feature refine CUDA op for rotated detection. ( #1603 )
...
* re PR
* replace all the feature_refine with rotated_feature_align
* replace all the FR with RotatedFeatureAlign
* Update mmcv/ops/rotated_feature_align.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmcv/ops/rotated_feature_align.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* fix lint
* Update mmcv/ops/csrc/pytorch/cuda/rotated_feature_align_cuda.cu
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmcv/ops/csrc/pytorch/cuda/cudabind.cpp
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmcv/ops/csrc/pytorch/cuda/rotated_feature_align_cuda.cu
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmcv/ops/csrc/pytorch/cuda/rotated_feature_align_cuda.cu
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmcv/ops/csrc/pytorch/cuda/rotated_feature_align_cuda.cu
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* fix lint
* Update cudabind.cpp
* Update cudabind.cpp
* fix bug in test. & add backward test
* fix lint
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2021-12-23 17:38:58 +08:00
Jiazhen Wang
fb486b96fd
[Fix] Fix some warnings in unittest ( #1522 )
...
* [Fix] fix some warnings in unittest
* [Impl] standardize some warnings
* [Fix] fix warning type in test_deprecation
* [Fix] fix warning type
* [Fix] continue fixing
* [Fix] fix some details
* [Fix] fix docstring
* [Fix] del useless statement
* [Fix] keep compatibility for torch < 1.5.0
2021-12-22 10:57:10 +08:00
Shilong Zhang
43b2f0981c
[Feature]Support skip nms ( #1552 )
...
* skip nms
* judge at beginning
* add test
* remove else
* add more details in docstr including version not
* fix unitest
* fix doc
* fix doc
* fix typo
* resove conversation
* fix link
2021-12-14 13:18:30 +08:00
WangJiaZhen
e3c63f34bc
[Fix] Fix deform conv by adding an extra argument im2col_step ( #1459 )
...
* [Fix] fix deform conv by add argument
* [Fix] replace useless func with np.repeat and add necessary comment
* [Fix] reduce batch_size and remove useless lines and modify some var name
* [Fix] change position of comments
* [Fix] add im2col_step in the docstring and add two test cases
* [Fix] fix docstring and add comments for test cases
* [Fix] fix docstring
* [Fix] add note, fix issue link and other details
* [Fix] fix docstring details
* [Fix] fix links in docstring
* [Fix] fix docstring details
2021-11-10 19:05:20 +08:00
q.yao
426e229d88
[Fix]: Update test data of test_tin_shift ( #1426 )
...
* Update test data of test_tin_shift
* Delete tmp.engine
* add pytest raises asserterror test
* raise valueerror, update test log
* add more comment
* Apply suggestions from code review
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2021-11-02 20:50:50 +08:00
dingchang
75cae78c55
[Feature] Add group points ops from mmdet3d ( #1415 )
...
* add op (group points) and its related ops (ball query and knn) in mmdet3d
* refactor code
* fix typo
* refactor code
* fix typo
* refactor code
* make input contiguous
Co-authored-by: zhouzaida <zhouzaida@163.com>
2021-10-23 14:01:31 +08:00
q.yao
6935a818ec
[Fix] Update test data for test_iou3d ( #1427 )
...
* Update test data for test_iou3d
* delete blank lines
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2021-10-22 21:18:19 +08:00
dingchang
2157b708fb
[Feature] Add iou3d op from mmdet3d ( #1356 )
...
* add ops (iou3d) in mmdet3d
* add unit test
* refactor code
* refactor code
* refactor code
* refactor code
* refactor code
Co-authored-by: zhouzaida <zhouzaida@163.com>
2021-10-22 10:46:55 +08:00
dingchang
4c8bfb48ef
[Feature] Add roiaware pool3d ops from mmdet3d ( #1382 )
...
* add ops (roiaware pool3d) in mmdet3d
* refactor code
* fix typo
Co-authored-by: zhouzaida <zhouzaida@163.com>
2021-10-21 20:00:04 +08:00
dingchang
e3e1dba2c8
[Feature] Add voxel ops from mmdet3d ( #1381 )
...
* add ops (voxel) in mmdet3d
* add ops (voxel) in mmdet3d
* add ops (voxel) in mmdet3d
* refactor code
* update test
* update test
* update test
* refactor code
* refactor code
* refactor code
* fix typo
* fix typo
2021-10-21 11:08:11 +08:00
q.yao
91b8478c84
Reduce ms_deformable_attn test memory usage ( #1407 )
2021-10-15 19:49:39 +08:00
dingchang
5c25ae1a19
[Feature] Add roipoint_pool3d op from mmdet3d ( #1358 )
...
* add ops (roipoint_pool3d) in mmdet3d
* refactor code
* fix typo
* add unit test
* refactor code
* refactor code
* refactor code
* fix typo
2021-10-15 17:15:53 +08:00
dingchang
e99bfce608
[Feature] Add assign_score_withk op for paconv from mmdet3d ( #1357 )
...
* add ops (assign_score_withk) in mmdet3d
* add ops (assign_score_withk) in mmdet3d
* refactor code
* fix typo
* refactor code
* fix typo
* polish docstring
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2021-10-15 13:18:31 +08:00
dingchang
be5841e45d
[Feature] Add interpolate ops from mmdet3d ( #1355 )
...
* add ops (interpolate) in mmdet3d
* refactor code
* fix typo
* fix typo
* fix typo
* refactor code
2021-10-14 20:51:02 +08:00
Zaida Zhou
97e5bada4c
continue PR #1223 ( #1404 )
...
* fix MultiScaleDeformableAttention inference issue on cpu model
* fix lint
* add unintest
* remove some code
* Update tests/test_ops/test_ms_deformable_attn.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* fix device
* remove device
* add more device
* refactor unittest
Co-authored-by: zhicheng huang <zhichenghzc@gmail.com>
Co-authored-by: zhangshilong <2392587229zsl@gmail.com>
Co-authored-by: Shilong Zhang <61961338+jshilong@users.noreply.github.com>
2021-10-14 20:50:38 +08:00
dingchang
1cd01db935
[Feature] Add gather points op from mmdet3d ( #1338 )
...
* add ops (gather points) in mmdet3d
* add ops (gather points) in mmdet3d
* refactor code
* refactor code
* fix typo
2021-10-14 16:58:12 +08:00
dingchang
42c9e71120
[Feature] Add knn op from mmdet3d ( #1354 )
...
* add ops (knn) in mmdet3d
* refactor code
* refactor code
* fix typo
* fix typo
* fix typo
* refactor code
* refactor code
* spell typo
* fix spell typo
2021-10-14 13:33:13 +08:00
dingchang
63a6cbe913
[Feature] Add fps op from mmdet3d ( #1337 )
...
* add ops (furthest point sample) in mmdet3d
* refactor code
* refactor code
* fix typo
* fix typo
* fix typo
* refactor code
* fix typo
* define DIVUP in common_cuda_helper.hpp
2021-10-13 20:39:31 +08:00
Eugene Liu
599163e645
Add Deformable Conv CustomOp for onnxruntime ( #1343 )
...
* add onnx dcn
* replace gemm with torch C++ api
* small update
* fix cpp clang format
* pefer generic GEMM than torch ATen library
* addressing comments
* add ops path check
2021-10-13 20:28:24 +08:00
Zaida Zhou
f22c9eb4a4
Add code spell hook to pre-commit and fix typos ( #1384 )
...
* Add code-spell hook to pre-commit
* Add code-spell hook to pre-commit and fix typos
* fix setup.cfg
2021-10-04 20:13:54 +08:00
Miao Zheng
745aa7373e
[Fix] Revise unit test of correlation ( #1368 )
...
* [Fix] Revise unit test of correlation
* rename
* lint
* lint
* lint
* lint
2021-09-25 21:13:34 +08:00
Miao Zheng
b92ea0b5df
[Feature] Add Correlation CUDA op ( #1361 )
2021-09-23 21:08:41 +08:00
dingchang
f3dfc4135b
[Feature] Add ballquery op from mmdet3d ( #1332 )
2021-09-23 21:08:00 +08:00
Wenwei Zhang
4e101e0b75
[Feature]: Support empty tensor in MMSyncBN ( #1205 )
...
* [Feature]: support empty tensor in MMSyncBN
* refine code
* resolve comments
* clean unnecessary comments
* fix inaccurate statistics when empty tensor
* resolve comments and add docstrings
* update unit tests
* rephrase, ready for merge
2021-09-23 17:10:38 +08:00
Leojc
2a3d2d4a35
Reimplement cc_attention using pure pytorch ( #1201 )
...
* Reimplement cc_attention using pure pytorch
* fix: avoid BC-Breaking
* delete cc_attention related cpp and cuda files
* delete cc_attention related lines in pybind.cpp
* make out Tensor contiguous.
* remove unneeded lines.
* Update mmcv/ops/cc_attention.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update TestCrissCrossAttention
* passing pre-commit
* Update docstring of CrissCrossAttention
* Update docstring of CrissCrossAttention
* Update mmcv/ops/cc_attention.py
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* [docs]polish the docstring
* [Docs] Polish the docstring
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2021-09-09 21:53:45 +08:00
Eugene Liu
e621e08d54
Add DCN and Modulated DCN CPU implementation ( #1278 )
...
* DCN cpu version
* add modulated dcn cpu version
* move deform_conv_shape_check to deform conv utils
* add inline to deform_conv_shape_check
* add tests
* run linter
* add newline at file end
* run pre-commit against modulated deform conv cpp
* update saconv test
* run clang-format
* remove cuda device inline
* refactor dcn cuda/cpu functions
* remove DCN util
* remove DCN util hpp from all included files
* Addressing PR comment by refactoring modulated-DCN
* fix lint in cpp files
2021-08-29 20:48:31 +08:00
Paige Wang
1790e9f265
add modulated_deform_conv in onnxruntime support ( #1281 )
...
* add modulated_deform_conv in onnxruntime support
* Add docs descriptions
* Add gpu test in test_onnx.py
* code format
* remove new usage and move if outside for loop
* use memset when bias is nullptr
2021-08-23 11:22:24 +08:00
Haodong Duan
ef48a47389
[Improvement] Improve digit_version & use it for version_checking ( #1185 )
...
* improve digit_version & use it for version_checking
* more testing for digit_version
* setuptools >= 50 is needed
* fix CI
* add debuging log
* >= to ==
* fix lint
* remove
* add failure case
* replace
* fix
* consider TORCH_VERSION == 'parrots'
* add unittest
* digit_version do not deal with the case if 'parrots' in version name.
2021-07-23 21:03:33 +08:00
q.yao
5f9e6b610b
[Feature] Add ONNX export support to torch.roll ( #1194 )
...
* add torch.roll to onnx
* remove skip test
* add support to torch<170
* add dim=0 for torch==1.9.0
* update fixture function name, add comment in roll symbolic
2021-07-20 16:54:04 +08:00
qjqfl
07d681ac00
[Feature]: support tensorrt custom plugin `MMCVCornerPool` ( #1179 )
2021-07-09 21:07:38 +08:00
Haodong Duan
1d5ee6e09a
use LooseVersion for version checking ( #1158 )
2021-06-29 21:33:08 +08:00
q.yao
004c00675f
[Feature]: add modulated deformable conv TensorRT support ( #1078 )
...
* add modulated dcn, better dcn plugin
* clangformat
* update documentation
2021-06-16 21:38:07 +08:00
Shilong Zhang
e05fb56031
Refactor the baseclass related to transformer ( #978 )
...
* minor changes
* change to modulist
* change to Sequential
* replace dropout with attn_drop and proj_drop in MultiheadAttention
* add operation_name for attn
* add drop path and move all ffn args to ffncfgs
* fix typo
* fix a bug when use default value of ffn_cfgs
* fix ffns
* add deprecate warning
* fix deprecate warning
* change to pop kwargs
* support register FFN of transformer
* support batch first
* fix batch first wapper
* fix forward wapper
* fix typo
* fix lint
* add unitest for transformer
* fix unitest
* fix equal
* use allclose
* fix comments
* fix comments
* change configdict to dict
* move drop to a file
* add comments for drop path
* add noqa 501
* move bnc wapper to MultiheadAttention
* move bnc wapper to MultiheadAttention
* use dep warning
* resolve comments
* add unitest:
* rename residual to identity
* revert runner
* msda residual to identity
* rename inp_identity to identity
* fix name
* fix transformer
* remove key in msda
* remove assert for key
Co-authored-by: HIT-cwh <2892770585@qq.com>
Co-authored-by: bkhuang <congee524@gmail.com>
Co-authored-by: Wenwei Zhang <40779233+ZwwWayne@users.noreply.github.com>
2021-06-11 18:09:31 +08:00
Dmitry Sidnev
a88d1d28c1
[Feature] enable exporting to onnx for PointRend ( #953 )
...
* Fix export to onnx for PointRend
* Fix codestyle
* Fix codestyle
* Fix type in docstring
* Minor fix
* Fix export with custom ops
* Fix codestyle
* Add tests for bilinear_grid_sample function
* Remove redundant operation and rename variables
* Fix bug in bilinear_grid_sample and update test
* Fix getting batch size
* skip torch==1.3.1
* remove unused import
* fix lint
* support export with batch
* fix dynamic clip
* skip test for torch<1.5.0
* Add docstrings and comments
* Minor fix
* Recover clipping code
* Fix clamping in pytorch 1.7.0
* Fix bilinear_grid_sampler
* Minor fix
Co-authored-by: maningsheng <maningsheng@sensetime.com>
2021-06-11 13:49:19 +08:00
SemyonBevzuk
bf2c9fa8d2
[Feature] NMS update ( #957 )
...
* Add score_threshold and max_num to NMS
* Fix codestyle
* Fix codestyle
* Fix inds in nms
* Update nms docstring
* Move score_threshold and max_num arguments
* Fix args order in docstring
* fix lint of c++ file
* Remove torch.onnx.is_in_onnx_export() and add max_num to batched_nms for separate classes.
* Rewrote max_num handling in NMSop.symbolic
* Added processing max_output_boxes_per_class when exporting to TensorRT
* Added score_threshold and max_num for NMS in test_onnx.py and test_tensorrt.py
* Remove _is_value(max_num)
* fix ci errors with torch==1.3.1
* Update test_batched_nms in test_nms.py
* Added tests for preprocess_onnx
* Moved 'test_tensorrt_preprocess.py' and 'preprocess', updated 'remove_tmp_file'.
* Update mmcv/tensorrt/__init__.py
* Fix segfault torch==1.3.1 (remove onnx.checker.check_model)
* Returned 'onnx.checker.check_model' with torch version check
* Changed torch version from 1.3.1 to 1.4.0
* update version check
* remove check for onnx
Co-authored-by: maningsheng <maningsheng@sensetime.com>
2021-05-31 23:42:26 +08:00
RunningLeon
4d42365ac2
[Feature]: add TensorRT InstanceNormalization plugin ( #1034 )
...
* add instancenorm plugin
* resolve comments
* fix lint
* fix typo
2021-05-25 20:03:57 +08:00
v-qjqs
6c7d6c32ee
Supports cuda version BorderAlign module ( #1021 )
...
* support cuda version `BorderAlign` module
* fix symbolic
* merge
* fix cpp lint error
* add unit test
* add comments for code references
* reformat doc
* fix lint error
* fix conflict
2021-05-25 15:23:11 +08:00
pc
732ff5093e
Add ms_deformable_attn in parrots ( #1042 )
2021-05-25 13:13:05 +08:00
q.yao
9d1436fb6c
[Feature] add cummax/cummin tensorrt plugin ( #1031 )
...
* add cummax/cummin tensorrt plugin
* fix isort
* fix with clang-format
* fix with clang-format again
* add document
2021-05-24 13:55:21 +08:00
Guangchen Lin
4bd3b5027a
[Fix] Support amp (pytorch >= 1.6.0) on DCN and DCNv2/ Add unit tests on DCN/DCNv2 amp ( #1029 )
...
* fix fp16 bug on DCNv2
* support fp16 on DCN/DCNv2 when pytorch >= '1.6.0'
* add comment
* Modified the comments
* Unified the usages of '.to()' and '.type_as()'
2021-05-23 17:42:59 +08:00
Shilong Zhang
9b8dd0835d
[fix]: fix softnms ( #1019 )
...
* fix basemodule
* fix typo
* fix unitest
2021-05-13 14:04:54 +08:00