837 Commits

Author SHA1 Message Date
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
Ma Zerun
366c628a85
[Fix] Fix potential interger overflow in imequalize. (#1198)
* Fix potential interger overflow in `imequalize`.

* Modify imequalize unit test image size to generate potential integer
overflow.
2021-07-14 21:03:06 +08:00
Ma Zerun
6659c38dd5
[Feature] Add is_tracing to wrap torch.jit.is_tracing in different versions. (#1187)
* Add `is_tracing` to wrap `torch.jit.is_tracing` in different versions.

* Remame `is_tracing` to `is_jit_tracing`

* Ignore `is_jit_tracing` tests in CI.
2021-07-13 14:42:50 +08:00
Junjun2016
c3ddcf9d38
[Fix] Fix typos (#1196)
* fix typos

* fix typos
2021-07-13 14:31:26 +08:00
Ma Zerun
a5684b0de2
[Feature]: Support custom hooks in IterBasedRunner. (#1193) 2021-07-13 14:09:56 +08:00
Ye Liu
44e19ff68c
[Feature]: Register CrissCrossAttention into plugin layers (#1189) 2021-07-13 14:08:57 +08:00
Zaida Zhou
96c4b70ccb
bump version to v1.3.9 (#1188) v1.3.9 2021-07-09 21:39:40 +08:00
qjqfl
07d681ac00
[Feature]: support tensorrt custom plugin MMCVCornerPool (#1179) 2021-07-09 21:07:38 +08:00
Y_Xuan
2dc0a219c1
[Feature] Porting mmcv for hip (#1022)
* porting mmcv for hip

* add nvcc

* fix format

* fix format

* fix bug for carafe

* fix test_utils because rocm_torch not allow set torch.backends.cudnn.benchmark to false

* add LOOSEVERSION

* fix format

* fix format of version

* fix code format

* test for yaml

* fix bug for citest

* fix bug for how to get torch._version_ at setup.py
2021-07-09 21:02:10 +08:00
Zaida Zhou
db580dda8d
[Docs] Build Chinese docs (#1073)
* Remove _build directroy in docs_zh_CN

* Change utils title to Chinese

* Translate documents

* Translate documents

* Use symbolic link to avoid repeated images

* Use symbolic link to avoid repeated images

* fix readme.md

* update copyright

* refactor docs

* rename title to Chinese
2021-07-07 13:10:04 +08:00
Zaida Zhou
0cbe5f4c84
[Fix] Fix sphinx compile error (#1176)
* [Docs] Fix sphinx version

* [Docs] Remove sphinx_markdown_tables

* update readme link

* add sphinx_rtd_theme package
2021-07-07 13:09:04 +08:00
RangiLyu
31b8829de8
Add pretrained mmdet/mobilenet_v2 (#1177) 2021-07-07 09:10:15 +08:00
Zaida Zhou
23d7fc83cb
add CI for pt1.8 pt1.9 (#1141)
* add ci for pt1.8 pt1.9

* remove cp command

* change cuda verison

* fix typo

* fix ci

* fix typo
2021-07-06 15:40:56 +08:00
Zaida Zhou
4a9f83467c
[Fix] Fix unittest in pt1.9 (#1146)
* fix test.txt

* fix unittest in pt1.9

* fix checkpoint filename error

* add comment

* fix unittest

* fix onnxruntime version
2021-07-03 20:47:22 +08:00
Zaida Zhou
6c63621a86
[Docs] Fix typo (#1166) 2021-07-03 16:05:31 +08:00
Zaida Zhou
66cefaffa3
[Docs] Refactor docs (#1102)
* [Docs] Refactor documentation

* [Docs] Refactor documentation

* refactor docs

* refactor docs

* set sphinx==3.1.2

* fix typo

* modify according to comment

* modify according to comment

* modify according to comment

* [Docs] delete unnecessary file

* fix title

* rename

* rename
2021-07-02 20:53:00 +08:00
Zaida Zhou
cdcbc03c98
add citation in readme.md (#1160) 2021-07-02 16:44:39 +08:00
Haodong Duan
7e285d359f
[Fix] Fix saconv (#1147)
* fix saconv

* update

* update

* fix

* use LooseVersion
2021-07-02 10:38:01 +08:00
Antonio Lanza
b035fe9171
Change dict update order (#1108)
* Change dict update order

* Change dict() with {}

* Added comments with PR link

* Fixed comments according to Lint Job
2021-06-29 22:11:21 +08:00
Haodong Duan
1d5ee6e09a
use LooseVersion for version checking (#1158) 2021-06-29 21:33:08 +08:00
achaiah
21845db455
[Fix]: fix missing check of directory in scandir (#1110)
* Missing check for dir in the 'else' clause

Fixing issue when recursively scanning directories with filenames starting with '.'  Without this fix, the `if not entry.name.startswith('.') and entry.is_file()` logic falls through to the `else` clause which in the current code base will error out as it encounters '.' files (e.g. .DS_Store)

* Updated code per comments

* fixing indentation

* fix indenterror and add comment

* remove .DS_Store and add .file

Co-authored-by: zhouzaida <zhouzaida@163.com>
2021-06-29 21:31:00 +08:00
Zaida Zhou
76d9bf1efb
[Docs] Fix error when cv2 is mocked (#1152) 2021-06-28 17:31:36 +08:00
Jerry Jiarui XU
797ef57e15
[Fix] Fix SyncBN build in PyTorch 1.9 (#1138)
* [Fix] Fix SyncBN build in PyTorch 1.9

* fixed parrots SyncBN
2021-06-27 19:10:00 +08:00
Zaida Zhou
db097bd1e9
bump version to v1.3.8 (#1148) v1.3.8 2021-06-25 22:43:10 +08:00
Ma Zerun
1b15f02220
support print hooks before running. (#1123)
* support print using hooks before running.

* Support to print hook trigger stages.

* Print stage-wise hook infos. And make `stages` as class attribute of
`Hook`

* Add util function `is_method_overriden` and use it in
`Hook.get_trigger_stages`.

* Add unit tests.

* Move `is_method_overriden` to `mmcv/utils/misc.py`

* Improve hook info text.

* Add base_class argument type assertion, and fix some typos.

* Remove `get_trigger_stages` to `get_triggered_stages`

* Use f-string.
2021-06-25 20:49:24 +08:00
Tong Gao
227e7a73b8
Support image reading while ignoring EXIF orientation info (#1091)
* Support image reading while ignoring EXIF orientation info

Add unit test for ignore_orientation flags in imread()

* add documentation for imread

* Add test cases
2021-06-25 20:46:13 +08:00
pc
94818ad136
update ca_forward_kernel (#1144) 2021-06-25 16:14:26 +08:00
q.yao
7b150fab34
[Feature] Optimize the PyTorch CUDA implementation for Criss Cross Attention (#1143)
* optimize criss cross attention

* optimize criss cross attention

* optimize criss cross attention

* fix lint

* fix ci, remove useless variable

* better ca_forward_kernel

Co-authored-by: wondervictor <victorchanchina@gmail.com>
2021-06-25 15:25:19 +08:00
Ma Zerun
6fe3722510
Refine default hooks and custom hooks priority rank. (#1120)
* Refine default hooks and custom hooks priority rank.

* Add unit tests for custom hooks with string priority.

* Use priority `ABOVE_NORMAL` and `BELOW_NORMAL` instead of `HIGHER` and
`LOWER`.

And add unit tests for custom hook with the same priority as
default hooks.
2021-06-25 15:07:32 +08:00
lizz
d9effbd1d0
Support variables in base files for configs (#1083)
* Support variables in base files for configs

Signed-off-by: lizz <lizz@sensetime.com>

* Test json and yaml as well

Signed-off-by: lizz <lizz@sensetime.com>

* Add test for recusive base

Signed-off-by: lizz <lizz@sensetime.com>

* Test misleading values

Signed-off-by: lizz <lizz@sensetime.com>

* Improve comments

Signed-off-by: lizz <lizz@sensetime.com>

* Add doc

Signed-off-by: lizz <lizz@sensetime.com>

* Improve doc

Signed-off-by: lizz <lizz@sensetime.com>

* More tests

Signed-off-by: lizz <lizz@sensetime.com>

* Harder test case

Signed-off-by: lizz <lizz@sensetime.com>

* use BASE_KEY instead of base

Signed-off-by: lizz <lizz@sensetime.com>
2021-06-25 14:30:58 +08:00
fjfzlzj
eb08835fa2
[Fix] Fix the permission denied error on windows. (#1077)
* Fix the permission denied error on windows.

* Format code.

* Using a cleaner way.

* Update config.py

use os.unlink instead of unlink

* change  unlink to remove

* add notes for new implementation

* Fix typo

Co-authored-by: WRH <12756472+wangruohui@users.noreply.github.com>
Co-authored-by: Wenwei Zhang <40779233+ZwwWayne@users.noreply.github.com>
2021-06-24 22:27:30 +08:00
Yining Li
560719da41
EvalHook uses case-insensitive key indicator matching and configurabl… (#1076)
* EvalHook uses case-insensitive key indicator matching and configurable test functions

* * fix docstring

* * move test_fn import into __init__
* configurable greater/less keys

* * update unittest
* update DistEvalHook

* fix comments and remove debug code

* support single greater/less key
2021-06-24 22:08:48 +08:00
Junjun2016
49a1d347bb
[Enhancement] Support resize or rescale to multiple (#1121)
* add resize or rescale to multiple

* add imresize_to_multiple function in mmcv.image

* fix docstring

* use to_2tuple
2021-06-24 21:21:51 +08:00
pc
303aa7f117
fix parrots cpu compile bug (#1129) 2021-06-24 21:16:53 +08:00
Jintao Lin
9c26a1049e
empty tensor inference backward compatible (#1131)
* empty tensor inference backward continity

* update

* add 3d
2021-06-24 17:04:03 +08:00
Jaemin Jung
59ed0dddf1
Fix the dimension (#1117) 2021-06-23 14:27:24 +08:00
Junjun2016
f7caa80f9c
[Enhancement] Add to_ntuple (#1125)
* add to_ntuple

* add unit test
2021-06-23 10:19:28 +08:00
Junjun2016
f71e47c2f7
fix typos (#1124) 2021-06-22 23:41:32 +08:00
Miao Zheng
6fd6ada6d7
[Fix] Delete warning report (#1126) 2021-06-22 22:02:42 +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
Zaida Zhou
1b59409e94
bump version to v1.3.7 (#1103) v1.3.7 2021-06-16 19:15:58 +08:00
Shilong Zhang
088fde3541
Avoid bc-breaking of importing MultiScaleDeformableAttention (#1100)
* avoid bc-breaking

* fix function name

* fix typo

* fix import

* add import warning

* remove wapper

* remove unitest

* add dep warning

* add dep warning
2021-06-16 13:48:12 +08:00
Weiwen Chen
a5d4c6528f
add a return value in TextLoggerHook.log() (#1040)
I need this in a subclass, but I dont want copy the whole `log()` function
2021-06-14 21:21:29 +08:00
Zaida Zhou
6cb534b775
bump version to v1.3.6 (#1095) v1.3.6 2021-06-11 21:04:53 +08:00
LXXXXR
c9b009f1ba
fix typo (#1094) 2021-06-11 20:08:08 +08:00
pc
3d7bcc8fe2
add border_align support in parrots (#1086) 2021-06-11 18:11:43 +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
Y. Xiong
11629d5268
Support resume for fp16 training (#1013)
* fix cast nn.Module bug

* fix misleading doc

* add resume function

* del useless; fix typo

* change meta structure; set resume default
2021-06-11 16:35:51 +08:00
pc
69146fe3d7
add load_ext warning (#1089) 2021-06-11 16:30:39 +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