Commit Graph

514 Commits (23b2bdbf52c8c4960dc696ec35901146f839fd6d)
 

Author SHA1 Message Date
robin Han 23b2bdbf52
add unittest for onnx convert (#608)
* add unittest for onnx convert

* build onnx and onnxruntime in CI

* skip onnx op unit test while using CUDA

* fix offset==0 case in NMS

* remove tmp file used in test

* delete tmp file before assert so that we can remove the tmp file anyway
2020-10-26 11:33:35 +08:00
Rui Xu 65a60a3d7d
fix iter-time-hook bug when meeting iter-based runner (#623) 2020-10-26 11:26:58 +08:00
David de la Iglesia Castro c8146cc52b
Skip opencv requirement if it's already installed in the env (i.e. via conda) (#616)
* Skip opencv requirement if it's already installed in the env

* pre-commit

* Check opencv conda version

* Check opencv conda version
2020-10-17 17:58:25 +08:00
Jintao Lin a260a96a0f
import_modules_from_strings when loading cfg from file (#606)
* import_modules_from_strings when loading cfg from file

* add unittest to tell whether the feature is enabled as expected

* minor

* set an environment variable instead of writing a file

* use 'shutil' instead of 'os.system'
2020-10-15 22:29:24 +08:00
Ruohui Wang 460959573b
Fix a typo in warning message (#615)
"please use MMDistributedDataParallelinstead." -> "please use MMDistributedDataParallel instead."
2020-10-15 15:08:42 +08:00
Wang Xinjiang 50a33950a4
Add Sync buffer in CheckpointHook (#588)
* Add Sync buffer in CheckpointHook

* add reduce_params in fp16_utils.py

* change default value of sync_buffer to False

* Add world size check

* reset sync_buffer to false

* fix world_size

* Move dist functions into dist_utils.py

* fix small bugs

* Deprecation compatibility

* Change according to comments
2020-10-15 11:02:41 +08:00
Ryan Li 54c527acd5
fix wrappers when using parrots (#613)
* fix wrappers when using parrots

* linting

* refactor according to review
2020-10-13 17:54:16 +08:00
robin Han 993da2bbd7
add switch for onnx exporter (#607) 2020-10-11 18:11:52 +08:00
Rui Xu 0dfc6ae6e6
[bug] fix bug in resuming optim-dict when using epoch based runner (#610)
* fix bug in resuming optim-dict

* add raise error when meeting unexceptable type

* add raise error when meeting unexceptable type
2020-10-11 18:11:33 +08:00
Kai Chen 665fee2441
bump version to 1.1.5 (#603) 2020-10-07 23:09:52 +08:00
Wenwei Zhang 005c408748
Fix wrappers version comparison (#602)
* add version check in wrappers

* fix assersion

* use digital version for version comparison

* fix unit tests

* reformat

* fall back to compare the first two version

* fix unittest

* fix unittest

* fix unit test

* clean unnecessary change
2020-10-06 12:44:56 +08:00
Cao Yuhang fe83261b94
revert dcn (#597) 2020-10-02 00:03:55 +08:00
Kai Chen f3a2be99b9
lint markdown files (#592) 2020-09-29 10:44:44 +08:00
Kai Chen 9141d91ddc
bump version to 1.1.4 (#591) 2020-09-29 00:09:49 +08:00
Cao Yuhang f6d5b0f8cb
fix lint #580 (#590) 2020-09-28 21:52:27 +08:00
wdmwhh c80e4cae54
Fixed fp16_optimizer state bug (#580) 2020-09-28 21:48:56 +08:00
GT9505 acee61d7c5
register deconv in CONV_LAYERS (#582)
* register deconv in CONV_LAYERS

* use ConvTranspose2d implemented in MMCV

* remove repetitive register_module

* update

* add unittest for deconv
2020-09-27 17:51:00 +08:00
Wenwei Zhang 34127b9f14
[enhance]: show grad norm in fp16 optimizer hook (#584) 2020-09-27 00:40:39 +08:00
Jerry Jiarui XU 71952ff3aa
[Enhance] Switch to https://download.openmmlab.com (#583) 2020-09-27 00:20:13 +08:00
Wenwei Zhang ed2887bb72
Support to specify LR of DCN's conv_offset (#344)
* Support to specify LR of DCN's conv_offset

* Resolve comments & add unit test

* Resolve formats

* Fix CI for DCN

* Mock DCN when cpu only

* Use mock for cpu testing

* Fix docstring and support ModulatedDCN

* set offset_lr_mult as dcn's arguments, link CU-49u01p

* fix lr bug

* fall back to set LR in constructor

* resolve comments
2020-09-25 20:51:58 +08:00
q.yao 467b4883b9
add torchvision roi_align with aligned=True (#581)
* add torchvision roi_align with aligned=True

* fix for lint test

* fix for lint test2

* format use yapf
2020-09-25 20:19:37 +08:00
David de la Iglesia Castro 6b52e9b55f
Add runner builder (#570)
* Add build_runner

* Parametrize test_runner

* Add imports to runner __init__

* Refactor max_iters and max_epochs from run to init

* Add assertion error messages

* Add test_builder

* Make change retro-compatible

* Raise ValueError if max_epochs and max_iters
2020-09-25 10:25:29 +08:00
Wenwei Zhang 2bb1160e6c
[fix]: fix wrapper comparison of pytorch version (#572) 2020-09-25 00:09:58 +08:00
David de la Iglesia Castro afb73995b9
Add missing by_epoch arg (#576) 2020-09-25 00:00:27 +08:00
Zhiyuan Chen 50af00991c
merge the calling of train/val_step and batch_processor into run_iter (#553)
* merge train/val_step and batch_processor into run_iter

* make self.train_mode of runner as an argument

* remove abstract methods of run_iter() in base_runner
2020-09-22 10:40:00 +08:00
Kai Chen 8c70df3310
bump version to 1.1.3 (#569) 2020-09-21 17:27:21 +08:00
Ryan Li 5cad35bd2d
fix deprecated wrappers exiting bug (#567) 2020-09-18 19:54:37 +08:00
robin Han cc332b26e1
add switch for onnx exporter (#564) 2020-09-18 13:54:00 +08:00
ychan 2114356826
fix dcon forward and backward bug (#565) 2020-09-18 13:48:21 +08:00
ychan b7af0e9ff7
fix mdconv backward bug (#563) 2020-09-17 14:25:16 +08:00
ychan ece32796c3
fix dcn forward bug (#562) 2020-09-17 14:25:05 +08:00
David de la Iglesia Castro 779f47bab9
Allow type to be default arg (#558)
* Add test case for type defined using default_args

* Refactor build_from_cfg

* Update exception of missing type

* pre-commit

* Fix default_args is None

* pre-commit

* Bring back test

* Update exception raising
2020-09-16 19:16:49 +08:00
Kai Chen 7ef3a5e925
Use copy instead of symlink on windows (#557)
* use copy instead of symlink on windows

* use platform.system() instead of sys.platform
2020-09-16 19:12:18 +08:00
Ryan Li 9ecd6b0d5f
Add 'wrap_fp16_model' to __init__.py (#555)
* add 'wrap_fp16_model' to __inti__.py

* add 'wrap_fp16_model' to __init__.py
2020-09-15 20:44:35 +08:00
Qiaofei Li a0cc5a8450
Supports brightness and contrast augmentations (#546)
* add brightness and contrast augmentation

* remove unnecessary

* reformat

* relax the precision constrain for adjust_brightness aug

* fix percision assertion error in unit test

* remove toy

* rename alpha as factor

* use np.testing.assert_allclose in place of np.less_equal
2020-09-14 12:14:43 +08:00
Wenwei Zhang c937d3953d
Mv wrappers into bricks and use wrappers in registry (#550)
* Mv wrappers into bricks and use wrappers in registry

* resolve import issues

* fix import issues

* set nn op forward to torch 1.6.1

* fix CI bug and add warning

* Fix CI by using patch mock

* mv warnings inside deprecated module's initialization
2020-09-12 21:59:17 +08:00
Cao Yuhang c054a2393e
remove assertion (#549) 2020-09-12 16:51:44 +08:00
Xiaojie Li 49e32c2688
Implementation of 2D convolution in tensorflow with `padding` as "same" (#529)
* update impad

* fix docstring

* add shape for impad

* fix unit test

* remove old version & fix doc

* fix linting

* fix doc

* add linear decay learning rate scheduler

* fix impad

* fix setup.cfg

* fix linting

* add yapf

* add swish

* fix lr_updater

* fix lr_updater.py

* update swish

* add swish

* fix inplace

* fix typo

* update

* add same padding

* fix docstring

* add unittest

* fix register

* change name

Co-authored-by: lixiaojie <lixiaojie@sensetime.com>
2020-09-09 23:57:48 +08:00
Hongkai Zhang d7c895a361
support multiple interpolation modes for imrotate (#545)
* support multiple interpolation modes for imrotate

* reformat code
2020-09-09 23:54:01 +08:00
su c8435966ed
Reordered the hooks and use attributes rather than args. (#544)
* Reordered the hooks and use attributes rather than args.

Formated.

* Reordering may cause conflict, assign the value first than update such as max_iter

Rewind back the order.

* Rewind back to just use attributes, the update of max_iter and stuff will be done in new hooks.

Minor format.
2020-09-08 18:00:33 +08:00
Qiaofei Li a59a35bcce
Supports Equalize Augmentation. (#543)
* add equalize augmentation in mmcv

* delete unnecessary

* reformat

* remove clip in implementing equalize, and add uint test with case step=0

* remove clip in implementing equalize, and add uint test with case step=0

* add comments for unit test

* rename function name as imequalize
2020-09-08 14:44:14 +08:00
Qiaofei Li 95417a5d24
Supports Color augmentation. (#542)
* add Color augmentation

* reformat

* reformat

* reformat docstring

* reformat docstring

* add more unit test

* add more unit test

* add clip value and uint test for image with type float

* rename function name
2020-09-08 13:09:06 +08:00
Jintao Lin fec7cd61d6
Support reading video from url (#531)
* add url support for VideoReader

* add a comment

* add unittest

* use a connectable url for ci
2020-09-07 00:52:33 +08:00
Qiaofei Li 9769024fbd
Add Translate augmentation. (#538)
* add imtranslate

* add imtranslate

* update comments

* reformat
2020-09-04 20:30:42 +08:00
Wenwei Zhang c6987937fe
[fix] Fix compilation bug in windows and add instruction for windows (#540)
* Add windows instruction and fix compilation bug

* reformat codebase
2020-09-04 15:08:12 +08:00
Wenwei Zhang 16071ed011
[Fix]: fix missing pad_val in impad_to_multiple (#539) 2020-09-04 15:05:14 +08:00
Kai Chen 0664f9b3ed
bump version to 1.1.2 (#537) 2020-09-03 21:30:13 +08:00
Wang Xinjiang fe07f09e0a
Add more default types for json dump (#536) 2020-09-03 19:28:45 +08:00
Qiaofei Li 8dfe58d197
Fix TypeError: Scalar value for argument borderValue is longer than 4 (#535)
* fix TypeError: Scalar value for argument borderValue is longer than 4

* add comments for imshear with case that border_value has more than 3 elements
2020-09-03 17:14:49 +08:00
Jerry Jiarui XU cfd337bb22
Support load with mmcls:// (#511)
* [Feature] Support load models from mmcls

* [Feature] Support load with mmcls://

* hard-code load mmcls

* fixed wrong commit

* add json

* remove cifar
2020-09-02 19:27:47 +08:00