* support different border_mode in imrotate
* fix docstring
* small fix
* reorder the border_mode arg in imrotate
* fix lint
* polish docstring
* polish docstring
* [Feature]: Add cache to random func in data transform
* [Fix]: Fix lint
* [Fix]: Fix cache decorate problem
* [Refactor]: Initialize Resize with config
* [Refactor]: Move other resize config into Resize config
* [Fix]: Scale can not be None in RandomResize
* [Fix]: Change semantic seg to gt seg map
* [Fix]: Delete unnecessary assert
* [Fix]: Fix docstring
* [Fix]: Add double quot to Resize in config
* [Fix]: Fix the return type
* [Fix]: Improve docstring
* [Fix]: Specify the order of width and height for ratio range
* [Fix]: Specify resize order
Co-authored-by: Your <you@example.com>
* [Refactor]: New commit of Part2 of data transform
* [Fix]: Fix lint
* [Fix]: Change flip reisze to prefix
* [Refactor]: Delete redundant code in ToTensor
* [Fix]:optional
* [Fix]: Change the discription of RandomFlip
* [Refactor]: Change flip_with_flip_direction to flip_on_direction
Co-authored-by: Your <you@example.com>
* [Feature] Add support for MPS
* fix import error
* update ut
* fix error
* trigger CI
* use a unique basename for test file modules
* avoid bc-breaking
* Add torch_meshgrid_ij wrapper due to PyTorch change
* Update torch_meshgrid name/doc/version implementation
* Make imports local
* add ut
* ignore ut when torch is not available
Co-authored-by: zhouzaida <zhouzaida@163.com>
* Fix batched_nms for rotated box.
Add type hint for nms.py
* Add test
* doc string
* revert symbolic hint
* fix max_coordinate
* add comment
* rename type
* fix typo docstring
* [Feature] Support Psamask with cambricon MLU backend
* [Fix] refine the format according to lint check
* Replace std:max/min with conditional operators
* [Fix] Format head files
* [Fix] Fix the problem that the instance cannot reuse when overwriting the file client.
* Remove _overridden_backends and _overridden_prefixes, and pop the old instance when overwriting the file client.
* add unittest
* fix prefix error
* modify clear_backend to overridden_backend
* Delete redundant comments.
* Fix the bug met in using nasfpn
Fix the bug met in using nasfpn which is mentioned at https://github.com/open-mmlab/mmdetection/issues/5987.
Avoid the strong restrictions of _resize function in BaseMergeCell:
1. When Downsampling the feature map, the feature map's shape must be divisible by the target size. We pad zero around feature map before max_pool2d opt to make it always divisible. (line 102 ~ 107)
2. Considering the different downsampling scale of H and W, shape[-2] and shape[-1] are involed in the definition of kernel_size. (line 110)
* Update merge_cells.py
check flake8 & isort
* Update merge_cells.py
* Update merge_cells.py
yapf
* Update mmcv/ops/merge_cells.py
X_pad rename to padding_x
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
* Update merge_cells.py
format the code style after renameing the X_pad to padding_x
* Update test_merge_cells.py
Mainly test the downsampling resize in BaseMergeCell. The smaller target size is set to (14, 7), the classical feature map's size in the last few stages of the backbone, which will product different downsampling scales in different dims.
* Update test_merge_cells.py
add "# Copyright (c) OpenMMLab. All rights reserved."
* Update merge_cells.py
format the variable name
* Update test_merge_cells.py
Testing divisible and indivisible situations simultaneously
* Update mmcv/ops/merge_cells.py
fix the bug when h is indivisible and w is divisible, the pad_w will be padded unreasonable.
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* Update mmcv/ops/merge_cells.py
fix the bug when w is indivisible and h is divisible, the pad_h will be padded unreasonable.
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
* fix undefined error
* Update merge_cells.py
make pad_h, pad_w more readable
* Update test_merge_cells.py
use @pytest.mark.parametrize instead of 'for' methor
* Update merge_cells.py
* Update test_merge_cells.py
isort
* Update merge_cells.py
isort
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>