* Support deepcopy for Config
* Iterate the `__dict__` of Config directly.
* Use __new__ to avoid unnecessary initialization.
* Improve according to comments
* Fix batched_nms to support nms_rotated
* Update test code for batched_nms with nms_rotated
* Edit indexing the score in nms
* Use -1 indexing for batched_nms
* fix the scatter when input is cpu
* Update _functions.py
Add spaces to comply with the code specification
* add unittests
* add a blank line
* fix unittet
Co-authored-by: zhouzaida <zhouzaida@163.com>
* Add file client to image io
* Fix petrel_client imwrite error
* Add examples to the docstring and delete the file check of imread
* modify docstring v1.3.19->v1.4.1
* Deprecate auto_mkdir parameter and complete test_io.py
* Fix error caused by deleting the mock package in test_io.py
* Add annotation to imencode
* modify imread input assert and delete the judgement of file client 'put' method
* Delete try except in imwrite.
* Add a error file extension unit test.
* 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
* detect detect_anomalous_params
* fix default value
* merge two case
* fix none case
* add unitest
* fix typo
* change level to error
* fix type
* add more details in docstr
* [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
* [Features] Load optical flow data from bytes
* docstring
* revise base on comments
* compression test data
* compression test data
* docstring
* minors
* restrict the warning message
* and an important keyword in warning description
* a more elegant way of condition
* link format code too long
* fix the stupid spelling mistake
* Use issubclass to restrict warning message.
* maybe this version is more elegant.
* conv + bias + norm warning pytest
* 'created' a warning, hahaha
* isort and yapf format revision
* isort and yapf format revision
* flake8 fail issue
* I have to right this way in order to solve the conflicts between yapf and flake8, sigh...
* fixed test bug
* Add ruby windows installer source.
* Simplified the code and remove ruby source from CONTRIBUTING.md
* use _BatchNorm to simplify the code
* bug fix and add instanceNorm case into warning
* change the warning message to make it more clear
* fix unit test
* 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
* add windows CI
* clean versions
* only allow pt1.7 on windows
* fix windows install issue
* add win cpu
* fix win command
* clean unnecessary command
* resolve turbojpeg & tempfile on win
* replace os.readlink with os.path.realpath
* fix windows ci
* close file before removing it
* fix windows ci
* fix symlink on windows
* fix windows ci
* fix windows ci
* fix windows ci
* fix windows ci
* fix windows ci
* fix windows ci
* fix windows ci
* fix windows ci
* fix windows ci
* modify according to comment
Co-authored-by: zhouzaida <zhouzaida@163.com>
* 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
* Add gradient cumulative optimizer
fixes#190
* Update optimizer.py
* Update optimizer.py
* fix loss scale improperly in last equivalent_iter
* Add `GradientCumulativeOptimizerHook` in `__init__.py`.
* Add docstring of `GradientCumulativeOptimizerHook`.
* Add type check, BN warning and resume warning. And fix typo, lint the
code.
* Add unit test
* Update docstring example.
* Change GradientCumulativeOptimizerHook `__init__` arguments.
* Add GradientCumulativeOptimzierHook unit tests with IterBasedRunner.
* Add GradientCumulativeFp16OptimizerHook.
* Add unit tests of GradientCumulativeFp16OptimizerHook
* Use '!=' instead of '>' to determine resume
Co-authored-by: Zhiyuan Chen <this@zyc.ai>
* Support deprecation checking in Config
* add unittest for config deprecation
* support reference link in deprecation info
* add doc
* Update config.md
* [Fix] Fix the bug that training log and evaluating log are mixed
* [Fix] Fix the bug that training log and evaluating log are mixed
* fix comment
* fix import error
* refactor
* refactor
* refactor
* clear log_buffer before evaluation
* fix error
* add unittest
* 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.
* add flat cosine lr updater
* add test
* add doc
* update doc
* reformat
* update unittest
* update test flat cos
* remove momentum hook test
* update test
* change assert to ValueError
* fix unittest
* add by_epoch=True unittest
* change to start_percent
* change to start_percent in test
* 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
* 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.
* 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
* 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>
* 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.
* Support image reading while ignoring EXIF orientation info
Add unit test for ignore_orientation flags in imread()
* add documentation for imread
* Add test cases
* 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.
* 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>
* 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>
* 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>
* 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()'
* Assign different priority to default hooks, and add custom hook register in base runner.
* Add custom hook register in example train file
* Add unittest of custom hook
* Code format
* support custom op `mmcv::cummax` for onnxruntime in mmcv
* fix clang-format lint error
* support mmcv::cummin, reformat codes
* fix merge from master
* add docs for mmcv::cummax and mmcv::cummin
* format doc
* add assertion for torch version, when exporting `cummax` to onnx
* add more comments for torch version
* handle exporting to onnx in `soft_nms`
* commit for test_onnx
* remove `is_in_onnx_export` in softnms
* add more comments
* fix c++ lint error
* add known issues doc for `cummax`
* fix known issues doc
* supports for onnxruntime custom op `mmcv::MMCVTopPool`
* supports for onnxruntime custom op `mmcv::MMCVCornerPool`, involving TopPool, BottomPool, LeftPool and RightPool
* add unittest for corner_pool
* supports mmcv::CornerPool without memcpy
* add docs for mmcv::CornerPool
* re-add docs for mmcv::CornerPool
* fix output dtype doc
* reformat
* format with pre-commit
* format
* fix lint error, by using google clang-format style for c/c++
* support clipping min_lr in StepLrUpdaterHook
* add docstring for StepLrUpdaterHook
* fix small bugs
* add unit test for StepLrUpdaterHook
* fix linting error
* fix raise error bug in registering multiple names
* fix bug in checking the type of name
* fix lint
* fix unit test for registry
* fix bug in unit test
* add c++ ms_deform_atten
* fix cpp lint
* fix cpp lint
* clang format
* remove cmakefile
* google style
* clang-format precommit
* use clang-format-lint-action
* add transformer base class
* add merge
* add docstr
* add pyargs
* fix according to commments
* resiger module
* change to use basemodule
* add _ between build function
* split the name
* fix according to comments
* fix lint and fix unitest
* fix cpp lint
* fix bug of deformdetr_atten
* fix drop out
* fix residual
* use CUDA_1D_KERNEL_LOOP
* add roi_align_rotated
* code format
* Add align key to roi align rotated
* Add clockwise for rotated roi align
* fix bugs in onnx export
* Add docstring for RoIAlignRotated
* remove cuda unittest
* Reformat c++ code
* add onnx roi align rotated file
* fix unittest
* Add cpu and float64 of cuda support for parrots
* code format
* Add unified header to roi align rotated
Co-authored-by: luopeichao <luopeichao@sensetime.com>
* [Fix] OneCycleLrUpdaterHook interface
* revise according to comments
* revise according to comments
* add test
* fix lint
* revise according to comments
* minors
* add pytest param
* fix lint
* ci
* add grid sample trt support
* fix align_corners=True
* change 'intep' to 'interp', fix bugs of grid sampler, better test script
* remove unused import
* move source comment to the top of trt_grid_sampler_kernel.cu
* add upfirdn2d op
* fix bug in pybind
* add fused bias leakyrelu
* fix bug in fused-bias-leakyrelu
* fix lint error
* fix bug in build cpu version
* fix bug in build cpu version
* fix lint
* fix comment from zww
Co-authored-by: zhangshilong <zhangshilong@sensetime.com>
* add adjust sharpness
* revised according to commnts
* fix bug
* fix docstring
* revise according to comments
* fix blank lines
* revised according to comments