Commit Graph

1190 Commits (73066430bed3dfe229ed0de8265d785da37f343e)
 

Author SHA1 Message Date
Zaida Zhou 9ea55badcb
[Fix] dump has incompatible type TextIO (#2029) 2022-05-31 00:02:37 +08:00
tripleMu 569d588e15
Add type hints for mmcv/fileio (#1997)
* Add typehint in mmcv/fileio/*

* Update mmcv/fileio/io.py

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

* Update mmcv/fileio/io.py

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

* Update mmcv/fileio/io.py

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

* Update mmcv/fileio/io.py

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

* Update mmcv/fileio/io.py

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

* Update mmcv/fileio/io.py

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

* Update mmcv/fileio/parse.py

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

* Update mmcv/fileio/parse.py

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

* Update mmcv/fileio/parse.py

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

* Update mmcv/fileio/io.py

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

* Update mmcv/fileio/io.py

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

* Fix hint bugs

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-05-30 17:42:53 +08:00
ShawnHu e234c183cc
Add type hints in ops/border_align.py (#2026) 2022-05-30 15:33:18 +08:00
tripleMu ea173c9f07
Add type hints for mmcv/runer/hooks/logger (#2000)
* Fix

* Fix
2022-05-30 15:31:15 +08:00
ShawnHu c70fafebf4
Add type hints in ops/assign_score_withk.py (#2023) 2022-05-29 20:55:50 +08:00
kira de90c7a2fd
[Enhancement] Update the missing warning message for LrUpdaterHook (#2021) 2022-05-29 11:31:47 +08:00
gy77 e5d9ef5285
Add type hints in mmcv/ops/point_sample.py (#2019)
* Add type hints in mmcv/ops/point_sample.py

* fix docstring and type hint
2022-05-29 09:25:27 +08:00
tripleMu 966b742817
Add type hints for mmcv/runner/optimizer (#2001) 2022-05-28 23:45:42 +08:00
ShawnHu 1577f40744
Add type hints in mmcv/ops/active_rotated_filter.py (#2017)
* add typehints in ops-active-rotated-filter

* resolve typehints in ops-active-rotated-filter
2022-05-28 19:57:27 +08:00
gy77 19902d897a
Add type hints in mmcv/ops/points_sampler.py (#2015)
* add typehint in mmcv/ops/points_sampler.py

* Update mmcv/ops/points_sampler.py

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

* Update mmcv/ops/points_sampler.py

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

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-05-28 15:35:17 +08:00
gy77 1211b06b9e
Add type hint in mmcv/ops/points_in_boxes.py (#2007)
* add type hint in mmcv/ops/points_in_boxes.py

* fix lint
2022-05-28 11:57:34 +08:00
gy77 50d1505225
Add type hint in mmcv/ops/points_in_polygons.py (#2013) 2022-05-28 11:57:08 +08:00
WINDSKY45 335199db92
Add type hint in lr_updater.py (#1988)
* [Enhance] Add type hint in `lr_updater.py`.

* Fix circle import
2022-05-27 15:43:47 +08:00
gy77 23eb359beb
Add type hint for the "boxes_iou_bev" function in iou3d.py (#2005)
* add type hints in iou3d.py

* fix lint

* Add a missing item in iou3d.py
2022-05-27 15:01:01 +08:00
Zaida Zhou d0dc7577b8
Transfer test data to aliyun (#2004) 2022-05-27 14:54:08 +08:00
kira a465fb4114
Add type hints in alexnet.py (#1983)
* Update alexnet.py

* Update alexnet.py

* Update mmcv/cnn/alexnet.py

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

* Update alexnet.py

* Update mmcv/cnn/alexnet.py

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

* Update mmcv/cnn/alexnet.py

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

* Update alexnet.py

* fix importing format

* Update alexnet.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-05-27 14:00:18 +08:00
zengxiang68 699398ad86
Add type hints for mmcv/ops (#1987)
* add type hints for mmcv/ops/...

* add type hints for mmcv/ops/...

* add type hints for mmcv/ops/...
2022-05-27 12:45:47 +08:00
Yvette Zhao 84a544fb3e
Add type hints for runner/builder (#1985) 2022-05-27 10:44:08 +08:00
tripleMu ef2b927b29
Add typehint in mmcv/utils* (#1998)
* Add typehint in mmcv/utils*

* Update mmcv/utils/registry.py

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

* Update mmcv/utils/registry.py

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

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-05-27 10:30:25 +08:00
gy77 af861bf9b8
Add type hints in iou3d.py (#1989)
* add type hints in iou3d.py

* fix lint
2022-05-27 10:23:10 +08:00
Range King bb4c65d8ff
Add type hints in bbox.py and box_iou_rotated.py (#1981)
* Add type hints in bbox.py

* Add type hints in box_iou_rotated.py

* Update ball_query.py

* Revert "Add type hints in bbox.py"

This reverts commit 102566488e.

* Update bbox.py

* Revert "Update bbox.py"

This reverts commit d34b2c6ed5.

* Update bbox.py
2022-05-27 10:21:48 +08:00
Zaida Zhou 1e922b84ee
[Fix] Fix protobuf compatible error (#1992) 2022-05-26 17:26:45 +08:00
Zaida Zhou 05bdd1624f
Fix lint (#1984) 2022-05-25 20:45:31 +08:00
Zaida Zhou 4ea914ed28
bump version to v1.5.2 (#1979) 2022-05-25 20:08:02 +08:00
Wencheng Wu cb781ae4ba
[Fix] Fix the problem that the instance cannot reuse when overwriting the file client. (#1747)
* [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.
2022-05-25 19:34:15 +08:00
wlf-darkmatter 544a6b1432
Imporve ability to view usage data during training (#1940)
* Imporve ability to view usage data during training

The wrong labeling of the dataset may cause problems such as gradient explosion during the training process. The wrong labeling can be found by setting up a hook function.
**Problem**: However, when a for loop is used to traverse the iterator of the pytorch `DataLoader` class, the hook cannot obtain the information of the currently read image, and thus cannot determine the source of the error.
**Solution**: Load the data_batch information into the `runner` during the train process, and then pass it to the hook function to solve the problem.

* Update epoch_based_runner.py

* Update iter_based_runner.py

* strict the scope of runner.data_batch

* strict the scope of runner.data_batch

* strict the scope of runner.data_batch
2022-05-25 19:33:27 +08:00
Alex Yang 21bada3256
[fix]:fix docstrings in EvalHook (#1978) 2022-05-25 19:14:37 +08:00
whcao c90f2be0be
[Fix] Fix is_module_wrapper (#1900)
* fix is_module_wrapper

* test is_module_wrapper

* fix code style
2022-05-25 17:32:41 +08:00
Danila Rukhovich e9f48a4f8e
[Enhance] Replace BEV IoU with 3D IoU (#1902)
* add iou3d

* revert deprecated python function

* fix lint

* replace 3d iou/nms calls for bev iou/nms
2022-05-25 17:05:50 +08:00
del-zhenwu 7e6f462495
[Fix] Skip CPU test in test_rotated_feature_align.py for parrots (#1968)
* skip test_rotated_feature_align.py for parrots

Signed-off-by: del-zhenwu <dele.zhenwu@gmail.com>

* fix lint

Co-authored-by: zhouzaida <zhouzaida@163.com>
2022-05-20 17:04:58 +08:00
JarvisKevin 60eadb0665
[Enhancement] Lower the restrictions of _resize method in BaseMergeCell (#1959)
* 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>
2022-05-20 15:13:13 +08:00
Zaida Zhou 45fa3e44a2
Add pyupgrade pre-commit hook (#1937)
* add pyupgrade

* add options for pyupgrade

* minor refinement
2022-05-18 11:47:14 +08:00
Zaida Zhou c561264d55
[Docs] Fix failed links in docs/zh_cn/faq.md (#1964)
* [Docs] Fix failed links in docs/zh_cn/faq.md

* fix links
2022-05-17 10:45:19 +08:00
Zaida Zhou b326a219a7
[Docs] Replace markdownlint with mdformat for avoiding installing ruby (#1936)
* Use mdformat pre-commit hook

* allows consecutive numbering

* improve .mdformat.toml

* test mdformat

* format markdown

* minor fix

* fix codespecll

* fix circleci

* add linkify-it-py dependency for cicleci

* add comments

* replace flake8 url

* add mdformat-myst dependency

* remove mdformat-myst dependency

* update contributing.md
2022-05-16 20:47:56 +08:00
q.yao 8708851eca
[Fix] Fix bbox overlap fp16 (#1958)
* add CUDA_ARCH check

* add check in cuh
2022-05-14 19:46:27 +08:00
Zaida Zhou a3b4640be8
bump version to v1.5.1 (#1951) 2022-05-13 10:50:11 +08:00
SuperDong 940609d5ea
[Enhancement] Add type annoations for mmcv/visualization/image (#1946)
* dev_1st_mmcv_visual_image_py

* dev_3rd_mmcv_visual_image_py

* dev_4th_mmcv_visual_image_py

* dev_5th_mmcv_visual_image_py

* dev_6th_mmcv_visual_image_py

* dev_7th_mmcv_visual_image_py

* dev_8th_mmcv_visual_image_py

* dev_9th_mmcv_visual_image_py

* minor fix

* fix isort

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-05-12 12:50:29 +08:00
Song Lin 94cc99d595
[Enhancement] Add type hints for mmcv/arraymisc and mmcv/video (#1950)
* Add type hints

* Add type hints

* Fix int float about scalar

* Add type hints for mmcv/tensorrt

* Update mmcv/tensorrt/tensorrt_utils.py

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

* Update mmcv/arraymisc/quantization.py

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

* Ignore type hint for dtype

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-05-11 21:55:41 +08:00
Song Lin 882cab77bb
[Enhancement] Add type annotations for mmcv/visualization (#1947)
* Add type hints

* Replace mmcv is_str by isinstance str

* Add type hints in optflow.py

* Update mmcv/visualization/optflow.py

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

* Update mmcv/visualization/color.py

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

* Fix tuple hints

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-05-10 23:48:00 +08:00
Jiazhen Wang 105fe55002
[Feature] Add adjust_hue (#1628)
* [Impl] impl adjust hue

* Update docstring

* Fix docstring

* add copyright

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-05-10 17:06:45 +08:00
jmercat 1dbb5d360d
[Fix] Fix dump method of Config (#1837)
* config dump fix
dump should not depend on how config was loaded only where it is dumped
changed checks for type to the given filename instead of the source filename

* defined test_fromdict and fixed dump function
it might be more convoluted than it needs to be but the formatting depends on the extension of the argument or the extension of the self.filename

* config dump defaults to returning pretty_text, test_fromdict renamed to test_dump_from_dict

* some reformatting in docstrings

* refine unittest

* fix unit test as comment

* Refine docstring

* minor refinement

* import mmcv

* fix lint

Co-authored-by: HAOCHENYE <21724054@zju.edu.cn>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-05-10 15:41:51 +08:00
Alex Yang a848ecfdfc
[Fix] Fix type hint in file_client (#1942)
* [fix]:fix type hint in file_client and mmcv

* [fix]:fix type hint in tests files

* [fix]:fix type hint in tests files

* [fix]:fix pre-commit.yaml to igore test for mypy

* [fix]:fix pre-commit.yaml to igore test for mypy

* [fix]:fix precommit.yml

* [fix]:fix precommit.yml

* Update __init__.py

delete unused type-ignore comment
2022-05-10 14:01:07 +08:00
Zaida Zhou fb9af9f36f
[Docs] Fix heading anchor in documentation (#1945) 2022-05-09 22:53:17 +08:00
Alex Yang 19b1d363a5
[Fix] Incorrectly append items to __all__ (#1944) 2022-05-09 19:45:45 +08:00
pc e70a318ae9
[Fix] Fix parrots unit tests (#1913) 2022-05-09 16:59:32 +08:00
Hongbin Sun a86e807105
[Fix] LmdbBackend can't pickle env obj (#1764)
* fix bug of can't pickle env objs

* use utf-8 to support Chinese

* use __del__ instead close

* move try import to init

* remove getitem

* use client instead
2022-05-08 17:21:52 +08:00
Johannes L d126f3026c
[Enhancement] Add support for latest Pillow resampling filter naming scheme (#1931)
* Add support for latest Pillow resampling filter naming scheme

* Comments added

* Shortened comments, lint fixes

* Added specific Pillow version
2022-05-08 17:20:49 +08:00
Zaida Zhou 8b4dcf1dfb
[Docs] Include several files in index.rts (#1939) 2022-05-07 16:26:18 +08:00
Boyuan Deng 8ecaf2e8b2
[Enhancement] Set environment variables in _init_dist_mpi (#1682)
* [Enhancement] Initialize 'mpi' launcher from OpenMPI's environmental variables

* raise exception when no MASTER_ADDR

Co-authored-by: jzwang <841713301@qq.com>
2022-05-05 12:36:52 +08:00
Mashiro 887d9a0f38
[Feature] Add a script to visualize lr (#1667)
* add learning rate visualization

* support momentum visualization

* fix second axis font size error

* fix argparse description

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

* fix lint

* Accelerate visualization

* Support custom batchsize and log-interval

Support custom batchsize and log-interval

* remove unnecessary keys and rename some varaible

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
2022-05-05 12:29:03 +08:00