Commit Graph

1202 Commits (e2ca0733c63df70d0b756b8ced351c2fe69414c9)
 

Author SHA1 Message Date
Yining Li e2ca0733c6 Refactor base transform (#1830)
* rename cacheable_method to cache_randomness

* refactor transform wrappers and update docs

* fix all_nonexist_keys

* fix lint

* rename transform wrappers
2022-07-19 19:18:16 +08:00
Yuan Liu 0a5b412509 [Feature]: Reformat resize config (#1826)
* [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>
2022-07-19 19:18:16 +08:00
Yifei Yang 2844a11631 [Fix] Fix MultiScaleFlipAug (#1801)
* Fix MultiScaleFlipAug

* fix as comment
2022-07-19 19:18:16 +08:00
Yifei Yang 169f098d82 [Fix] Set keypoints not in the cropped image invisible (#1804)
* set invisiblity

* fix as comment
2022-07-19 19:18:16 +08:00
Yining Li 6534efd6ca [Fix] Add @cacheable_method in transform wrapper `RandomChoice` (#1807)
* add @cacheable_methd in RandomChoice

* RandomChoice add __iter__() and fix unittest
2022-07-19 19:18:16 +08:00
Yifei Yang 2f85d78149 [Enhancement] Enhance CenterCrop (#1765)
* enhance centercrop and adjust crop size to (w, h)

* fix comments

* update required keys and docstring
2022-07-19 19:18:16 +08:00
Yifei Yang 2619aa9c8e [Feature] Add Part3 of data transform (#1735)
* update data transform part3

* update init

* rename flip funcs

* fix comments

* update comments

* fix lint

* Update mmcv/transforms/processing.py

* fix docs format

* fix comments

* add test pad_val and fix bugs in class Pad

* merge updated pad

* fix lint

* Update tests/test_transforms/test_transforms_processing.py
2022-07-19 19:18:16 +08:00
liukuikun 5af6c12b81 [Fix] Pad boader fix (#1757)
* [Fix] expand pad_val'dim to be same with image

* fix comment
2022-07-19 19:18:16 +08:00
Yuan Liu 53070ebccf [Feature]: Add Part2 of data transform (#1730)
* [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>
2022-07-19 19:18:16 +08:00
liukuikun 9e4b2ff58e [Feature] Add Part1 of data transform (#1736)
* [Feature] Add Part1 of data transform

* api.rst transform->transforms

* fix typo

* fix typo

* rename test_processing into test_transforms_processing for avoiding same name

* fix mypy

* fix comment

* fix comment
2022-07-19 19:18:15 +08:00
Wenwei Zhang 95b5a07b90 Rename transform to transforms (#1737) 2022-07-19 19:18:15 +08:00
Yining Li d00b0cec74 [Feature] Add base transform interface (#1538)
* Support deepcopy for Config (#1658)

* Support deepcopy for Config

* Iterate the `__dict__` of Config directly.

* Use __new__ to avoid unnecessary initialization.

* Improve according to comments

* [Feature] Add spconv ops from mmdet3d (#1581)

* add ops (spconv) of mmdet3d

* fix typo

* refactor code

* resolve comments in #1452

* fix compile error

* fix bugs

* fix bug

* transform from 'types.h' to 'extension.h'

* fix bug

* transform from 'types.h' to 'extension.h' in parrots

* add extension.h in pybind.cpp

* add unittest

* Recover code

* (1) Remove prettyprint.h
(2) Switch `T` to `scalar_t`
(3) Remove useless lines
(4) Refine example in docstring of sparse_modules.py

* (1) rename from `cu.h` to `cuh`
(2) remove useless files
(3) move cpu files to `pytorch/cpu`

* reorganize files

* Add docstring for sparse_functional.py

* use dispatcher

* remove template

* use dispatch in cuda ops

* resolve Segmentation fault

* remove useless files

* fix lint

* fix lint

* fix lint

* fix unittest in test_build_layers.py

* add tensorview into include_dirs when compiling

* recover all deleted files

* fix lint and comments

* recover setup.py

* replace tv::GPU as tv::TorchGPU & support device guard

* fix lint

Co-authored-by: hdc <hudingchang.vendor@sensetime.com>
Co-authored-by: grimoire <yaoqian@sensetime.com>

* Imporve the docstring of imfrombytes and fix a deprecation-warning (#1731)

* [Refactor] Refactor the interface for RoIAlignRotated (#1662)

* fix interface for RoIAlignRotated

* Add a unit test for RoIAlignRotated

* Make a unit test for RoIAlignRotated concise

* fix interface for RoIAlignRotated

* Refactor ext_module.nms_rotated

* Lint cpp files

* add transforms

* add invoking time check for cacheable methods

* fix lint

* add unittest

* fix bug in non-strict input mapping

* fix ci

* fix ci

* fix compatibility with python<3.9

* fix typing compatibility

* fix import

* fix typing

* add alternative for nullcontext

* fix import

* fix import

* add docstrings

* add docstrings

* fix callable check

* resolve comments

* fix lint

* enrich unittest cases

* fix lint

* fix unittest

Co-authored-by: Ma Zerun <mzr1996@163.com>
Co-authored-by: Wenhao Wu <79644370+wHao-Wu@users.noreply.github.com>
Co-authored-by: hdc <hudingchang.vendor@sensetime.com>
Co-authored-by: grimoire <yaoqian@sensetime.com>
Co-authored-by: Jiazhen Wang <47851024+teamwong111@users.noreply.github.com>
Co-authored-by: Hakjin Lee <nijkah@gmail.com>
2022-07-19 19:18:15 +08:00
Ma Zerun 8b47579e7c [Docs] Add data transform docs. (#1723)
* Add data transfrom docs

* Convert all Chinese paragraph in oneline to prevent some rendering bug
in Chrome/Edge. (It looks well in Firefox :/)

* Update docs

* Update docs

* Imporve docs according to comments

* Imporve docs according comments
2022-07-19 19:18:15 +08:00
Zaida Zhou d1004b7c92
Update daily dispatcher (#2125) 2022-07-19 19:12:54 +08:00
GPhilo 0092699fef
[Enhancement] Improve ProfilerHook beaviour when using a relative (or empty) dir_name (#2119)
* Add default dir_name and make non-absolute dir_name relative to runner.work_dir

* Add log message and change default dir name
2022-07-18 19:40:59 +08:00
Zaida Zhou b58c84c6f0
[Docs] Fix markdown version (#2121)
* [Docs] Fix sphinx markdown tables version

* fix markdown version
2022-07-17 22:03:28 +08:00
Reza 323abb9e5a
[Docs] Fix typos (#2124) 2022-07-17 18:41:17 +08:00
Happylkx 75ae200954
[Docs] Correct mistakes of examples (#2120) 2022-07-16 11:33:43 +08:00
Zaida Zhou f4167fe1e3
Bump version to v1.6.0 (#2096)
* bump version to v1.6.0

* minor fix
2022-07-08 20:32:52 +08:00
Mashiro da2df84a9f
[Fix] Make `MMDistributedDataParallel` compatible with Pytorch1.12 (#2107)
* make  compatible with pytorch 1.12

* override _run_ddp_forward

* over write _run_ddp_forward

* refactor docstring
2022-07-08 16:14:35 +08:00
Zaida Zhou 6a03918f55
[Feature] Add support for mps (#2092)
* [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
2022-07-07 16:05:49 +08:00
Yuchen Fan 357b484d37
[Fix] Fix undefined variable error in pixel_group.cpp (#2104) 2022-07-07 15:32:25 +08:00
Grapymage d77557b08c
[Fix] Fix index error when using multi-samplers strategy (#2094)
* fix index error when using multi-samplers strategy

* After every loop, change the last_fps_end_index to fps_sample_range
2022-07-06 20:44:19 +08:00
Evelyn Wang c67ab9a356
[Enhancement] Refine import error of PAVI (#2098)
* Import Error message refined.

* PAVI import error message refined.
2022-07-05 14:23:19 +08:00
Zaida Zhou 9fffcbc9cd
[Feature] Add Dockerfile (#1974)
* Add Dockerfiles

remove Dockerfile in root directory

minor fix

minor fix

* improve dockerfile

* refine
2022-07-01 16:23:28 +08:00
Zaida Zhou c344c11004
Test torch1.12 in CI (#2088) 2022-06-30 21:57:09 +08:00
Mashiro 14c3e175fa
[Fix] num_channels can not be divisible by num_groups in test_build_norm_layer (#2085) 2022-06-30 19:28:34 +08:00
Mashiro c03bba0008
Add missing json file for testing torchvision0.13 (#2084) 2022-06-30 19:12:11 +08:00
zhouchenyang 2708fac6c5
[Feature] Support RoiPool with Cambricon MLU backend (#2073)
* [Feature] Support RoiPool with cambricon MLU backend

* [Docs] Update ops.md
2022-06-29 11:24:00 +08:00
q.yao d71d067da1
[Fix] Fix mdcn trt (#2075) 2022-06-26 21:54:49 +08:00
Evelyn Wang 5e6ede9946
[Enhancement] Improve the docstring of PaviLoggerHook (#2060)
* Add parameter configuration description of summarywriter to MMCV PAVI hook.

* Typo repaired

* fix typo with suggested change

* self.init_kwargs lines modified.
2022-06-26 21:25:43 +08:00
tripleMu 1f25001028
Add type hints for mmcv/runner (#2002)
* Fix

* Fix

* fix type hint

* minor fix

* remove some type hints of functions or methods

* minor fix

* Apply suggestions from code review

* minor fix

* minor refinement

Co-authored-by: HAOCHENYE <21724054@zju.edu.cn>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: zhouzaida <zhouzaida@163.com>
2022-06-20 18:51:40 +08:00
WINDSKY45 b9a96e5677
[Enhance] Add type hints in /ops: (#2030)
* [Enhance] Add type hints in /ops:
`fused_bias_leakyrelu.py`, 'gather_points.py`, `group_points.py`.
There is no need to add type hints in `furthest_point_sample.py` and
`info.py`.
As for `focal_loss.py`, please see #1994.

* Modidied the default value of a variable.

* [Enhance] Add type hints in:
`knn.py`, `masked_conv.py`, `merge_cells.py`, `min_area_polygons.py`,
`modulated_deform_conv.py`, multi_scale_deform_attn.py`.

* Fix typehint.

* Fixed typehint.

* remove type hints of symbolic

* add no_type_check to ignore mypy check for method

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-06-20 14:53:23 +08:00
tripleMu 305c2a3025
Add type hints for mmcv/cnn/bricks (#1993)
* Add type hint

* Add typehint in mmcv/cnn/bricks*

* Deal conflict0

* Fix

* fix

* minor fix

* minor fix

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-06-20 14:52:45 +08:00
tripleMu 2d3e42fc41
Add type hints for mmcv/ops (#1995)
* Merge Master

* Add typehint in mmcv/ops/*

* Fix

* Update mmcv/ops/roi_align.py

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>

* Fix

* Fix

* Fix

* Update mmcv/ops/riroi_align_rotated.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Update mmcv/ops/riroi_align_rotated.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* remove type hints of all symbolic methods

* remove type hints of all symbolic methods

* minor refinement

* minor refinement

* minor fix

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: zhouzaida <zhouzaida@163.com>
2022-06-20 14:50:28 +08:00
Yvette Zhao 3dd2a21b45
Add type hints for runner/base_runner (#2003)
* Add type hints for runner

* refine

* fix error

* refine

* refine format

Co-authored-by: zhouzaida <zhouzaida@163.com>
2022-06-20 14:45:36 +08:00
Tri Wahyu Utomo bb7106755e
Add type hints for mmcv/runner (#1991)
* add typehints

* fix typehints

* fix _init_rule type hint

* update error message

* simplify type hint

* minor refinement

* minor refinement

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: HAOCHENYE <21724054@zju.edu.cn>
2022-06-15 22:41:10 +08:00
Philipp Allgeuer f5425ab761
Add torch_meshgrid wrapper due to PyTorch change (#2044)
* 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>
2022-06-15 20:36:48 +08:00
tripleMu b062468015
Add type hints for mmcv/parallel (#2031)
* Add typehints

* Fix

* Fix

* Update mmcv/parallel/distributed_deprecated.py

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>

* Fix

* add type hints to scatter

add type hints to scatter

* fix ScatterInputs

* Update mmcv/parallel/_functions.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Fix

* refine type hints

* minor fix

Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Co-authored-by: HAOCHENYE <21724054@zju.edu.cn>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: zhouzaida <zhouzaida@163.com>
2022-06-15 20:28:15 +08:00
Alex Yang 9110df94fc
[Docs] Reformat op docs (#2052)
* [Docs]:update ops.md

* fix missing ops
2022-06-15 10:57:29 +08:00
Zaida Zhou 30f3058107
Bump version to v1.5.3 (#2053) 2022-06-11 18:48:50 +08:00
pc 9f30496cb0
[Fix] Fix iou3d in parrots (#2054) 2022-06-11 01:09:28 +08:00
Yanyi Liu 9807c2d268
[Fix] Fix batched_nms for rotated box and add type hints for nms.py (#2006)
* 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
2022-06-10 19:49:07 +08:00
nxznm 5a2906cbd7
Add type hints in vgg.py (#2050)
* add type hints in vgg.py

* Update mmcv/cnn/vgg.py

* add type hints for return value in vgg.py
2022-06-09 22:26:32 +08:00
Danila Rukhovich 15495ea0a7
[Fix] make iou3d.boxes_iou3d actually calculate 3D IoU (#2018)
* fix iou3d

* rename variables in test

* fix comments
2022-06-09 21:08:32 +08:00
Zaida Zhou 11d8554cf9
[Docs] Fix mdformat version to support python3.6 (#2014)
* [Docs] Refine documentation

* fix mdformat version to support python3.6

* remove ruby dependency from CI

* fix invalid links
2022-06-09 17:47:26 +08:00
Yue Zhou 834d5978df
[Feature] Add ChamferDistance op in gpu (#1933)
* update

* fix lint

* fix lint

* Update mmcv/ops/chamfer_distance.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Update chamfer_distance.py

* Update test_chamfer_distance.py

* fix

* Update chamfer_distance_cuda_kernel.cuh

* Update chamfer_distance_cuda_kernel.cuh

* fix

* Update mmcv/ops/chamfer_distance.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Update chamfer_distance.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-06-08 18:12:57 +08:00
zhouchenyang 5601427bbc
[Feature] Support PSAMask with cambricon MLU backend (#2024)
* [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
2022-06-08 16:13:13 +08:00
zhouchenyang fb5062ca00
[Feature] Support RoiAlignRotated with cambricon MLU backend (#2033)
* [Feature] Support RoiAlignRotated with cambricon MLU backend

* [Fix] Remove std lib in mlu files

* [Fix] replace std::min/max with conditional operators
2022-06-08 14:13:28 +08:00
tripleMu 27d1d7fef2
Add type hints for mmcv/cnn/utils (#1996)
* Add typehint in mmcv/cnn/utils/*

* Update mmcv/cnn/utils/flops_counter.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Update mmcv/cnn/utils/weight_init.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Fix bugs

* Fix

* Fix2

* Update mmcv/cnn/utils/weight_init.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Update mmcv/cnn/utils/flops_counter.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Update mmcv/cnn/utils/weight_init.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Update mmcv/cnn/utils/weight_init.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* Fix

* minor fix

* line is too long.

* Update mmcv/cnn/utils/weight_init.py

Co-authored-by: Jiazhen Wang <47851024+teamwong111@users.noreply.github.com>

* Fix

* Update mmcv/cnn/utils/weight_init.py

* fix default value of float type hint

* fix default value of float type hint

* fix default value of float type hint

* fix default value of float type hint

* fix default value of float type hint

* fix default value of float type hint

* fix default value of float type hint

* Fix

* minor refinement

* replace list with tuple for input

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Co-authored-by: Jiazhen Wang <47851024+teamwong111@users.noreply.github.com>
Co-authored-by: Mashiro <57566630+HAOCHENYE@users.noreply.github.com>
Co-authored-by: zhouzaida <zhouzaida@163.com>
2022-06-07 21:00:29 +08:00