Commit Graph

39 Commits (859d84c5b1db7be8c247bd96d9f68802603e31b2)

Author SHA1 Message Date
Zaida Zhou b6a7fd98e4
Upgrade pre commit hooks (#2321)
* Upgrade the versions of pre-commit hooks

* update the versions of zh-cn.yaml
2022-10-08 11:48:44 +08:00
Jingwei Zhang b9bdfeb6f6
[Enhance] Support different border modes in imrotate (#2141)
* support different border_mode in imrotate

* fix docstring

* small fix

* reorder the border_mode arg in imrotate

* fix lint

* polish docstring

* polish docstring
2022-08-17 10:53:05 +08:00
Yixiao Fang b2ac245602 [Refactor] Add pillow backend for ColorJitter related functions (#2127)
* add 'backend' for ColorJitter related functions

* add unittest

* fix unittest

* add bgr transpose and revise ut

* update unittest

* revise docstring
2022-08-03 16:21:41 +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
pc e70a318ae9
[Fix] Fix parrots unit tests (#1913) 2022-05-09 16:59:32 +08:00
Charlyo 7982dd1a06
Make sure padding size is not negative (#1792)
* Make sure padding size is not negative

If Resize maintains aspect ratio, could be the case that image shape is bigger than resize value.

* Test pad shape smaller than image shape

* Fix lint

* Remove whitespaces
2022-04-15 14:05:32 +08:00
Zaida Zhou dd82ab1497
Upgrade the version of isort (#1705)
* Upgrade the version of isort

* sort the order of importing modules
2022-02-09 21:29:21 +08:00
Hongbin Sun 690a77fa6f
[Feature]: Support tensor2grayimgs (#1595)
* support tensor2grayimgs

* give default mean and std according to the input channel

* update docstring

* update

* fix bug
2021-12-22 19:49:50 +08:00
Jiazhen Wang fb486b96fd
[Fix] Fix some warnings in unittest (#1522)
* [Fix] fix some warnings in unittest

* [Impl] standardize some warnings

* [Fix] fix warning type in test_deprecation

* [Fix] fix warning type

* [Fix] continue fixing

* [Fix] fix some details

* [Fix] fix docstring

* [Fix] del useless statement

* [Fix] keep compatibility for torch < 1.5.0
2021-12-22 10:57:10 +08:00
wuwencheng 66bff139e4
[Feature] Add multi file backends to imread/imwrite. (#1527)
* 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.
2021-12-14 14:37:21 +08:00
Zaida Zhou f22c9eb4a4
Add code spell hook to pre-commit and fix typos (#1384)
* Add code-spell hook to pre-commit

* Add code-spell hook to pre-commit and fix typos

* fix setup.cfg
2021-10-04 20:13:54 +08:00
Jerry Jiarui XU c47c9196d0
[Docs] Add header for files (#1181)
* [Docs] Add header for files

* change to OpenMMLab

* add headers for .cpp, .cu, .h, .cuh

* replace Open-MMLab with OpenMMLab
2021-08-08 22:10:55 +08:00
Ma Zerun 366c628a85
[Fix] Fix potential interger overflow in `imequalize`. (#1198)
* Fix potential interger overflow in `imequalize`.

* Modify imequalize unit test image size to generate potential integer
overflow.
2021-07-14 21:03:06 +08:00
Tong Gao 227e7a73b8
Support image reading while ignoring EXIF orientation info (#1091)
* Support image reading while ignoring EXIF orientation info

Add unit test for ignore_orientation flags in imread()

* add documentation for imread

* Add test cases
2021-06-25 20:46:13 +08:00
Junjun2016 49a1d347bb
[Enhancement] Support resize or rescale to multiple (#1121)
* add resize or rescale to multiple

* add imresize_to_multiple function in mmcv.image

* fix docstring

* use to_2tuple
2021-06-24 21:21:51 +08:00
LXXXXR 8647b9a1b1
[Feature] Add cutout and lighting (#909)
* add cutout

* add adjust_lighting

* minor fix
2021-03-26 18:58:19 +08:00
sshuair 73bff4ead1
add tifffile backend support for image io (#868)
* add tifffile backend support for imageio

* add tifffile package for test requirements

* add tifffile package for test requirements

* small tiffile
2021-03-12 10:28:30 +08:00
LXXXXR a4bb2c5b04
[Feature] Support auto contrast (#881)
* support auto contrast

* add comments

* Fix unittest for pillow 6.2.2

* revised according to comments
2021-03-09 18:46:35 +08:00
LXXXXR ce10425d2f
[Feature] Add adjust sharpness (#864)
* add adjust sharpness

* revised according to commnts

* fix bug

* fix docstring

* revise according to comments

* fix blank lines

* revised according to comments
2021-03-08 10:23:49 +08:00
LXXXXR 27e9ede5b9
[Fix]: fix bugs in some photometric transforms (#863) 2021-03-03 18:58:15 +08:00
David de la Iglesia Castro 4450bd2ec2
Hande exif orientation with `pillow` backend in `imread` (#805)
* Add breaking test

* Handle exif orientation tag
2021-01-27 11:53:43 +08:00
Kai Chen afc35f13ff
relax the error bound in colorspace conversion (#706) 2020-12-12 19:16:11 +08:00
yamengxi c6c230df1b
[Feature] Add CLAHE method (#647)
* add CLAHE

* add CLAHE

* restore

* Add docstring

* modify docstring

* modify CLAHE to clahe

* fix syntax error

* simplify assert

* simplify assert

* add assert test

* fix unittest bug

* fix syntax bug

* fix assert bug
2020-11-11 22:34:14 +08:00
yamengxi d9ef9dabe2
[Feature] Add LUT transform (#646)
* add lut_transform

* restore

* fix test bug

* add test

* Fix syntax bug

* Delete test id

* modfiy docstrinng

* simplify assert
2020-11-11 17:32:41 +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
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
Qiaofei Li 9769024fbd
Add Translate augmentation. (#538)
* add imtranslate

* add imtranslate

* update comments

* reformat
2020-09-04 20:30:42 +08:00
Qiaofei Li 06556c8459
Add shear augmentation (#526)
* Add shear augmentation

* Update geometric.py

* Update geometric.py
2020-09-02 10:57:36 +08:00
Jerry Jiarui XU 83d9a9c89b
[Feature] Add diagonal flip (#515) 2020-08-22 14:29:27 +08:00
Jerry Jiarui XU 9e3ff5f94c
Support pillow resize (#426)
* Support pillow resize

* add more types
2020-07-17 19:25:47 +08:00
Cao Yuhang d5cbf7eed1
Migrate op (#392)
* migrate op

* migrate unittest

* update build no torch

* add back use_torch_vision for roi align

* fix type and unit test

* ignore test logging when no torch

* fix no torch ci test

* skip test registry

* remove coverage report when no torch

* fix mac ci order

* install latest pillow when no torch

* mv convws to brisk
2020-07-08 17:29:15 +08:00
Xiaojie Li 82211b407e
Added new features to `impad` (#377)
* update impad

* fix docstring

* add shape for impad

* fix unit test

* remove old version & fix doc

* fix linting

* fix doc

Co-authored-by: lixiaojie <lixiaojie@sensetime.com>
2020-07-02 19:34:46 +08:00
Jerry Jiarui XU 9c51928b7c
Add tensor2imgs in misc (#374)
* add tensor2imgs in misc

* rename

* fixed import

* raise error
2020-07-02 00:14:50 +08:00
zhuyuanhao c0f5492ee9
add ext ops, support parrots (#310)
* add ext ops, support parrots

* fix lint

* fix lint

* update op from mmdetection

* support non-pytorch env

* fix import bug

* test not import mmcv.op

* rename mmcv.op to mmcv.ops

* fix compile warning

* 1. fix syncbn warning in pytorch 1.5
2. support only cpu compile
3. add point_sample from mmdet

* fix text bug

* update docstrings

* fix line endings

* minor updates

* remove non_local from ops

* bug fix for nonlocal2d

* rename ops_ext to _ext and _ext to _flow_warp_ext

* update the doc

* try clang-format github action

* fix github action

* add ops to api.rst

* fix cpp format

* fix clang format issues

* remove .clang-format

Co-authored-by: Kai Chen <chenkaidev@gmail.com>
2020-06-28 23:15:47 +08:00
Jerry Jiarui XU c6784f4acf
add backend arg (#350)
* add backend arg

* add test

* update doc, add test

* update test

* update doc
2020-06-17 19:42:31 +08:00
Wang Xinjiang 630b747cb1
added pillow backend in loading (#333)
* added pillow backend in loading

* reformat

* remove auto fill for RGBA

* change according to comments

* change according to comments

* reformat
2020-06-17 10:25:48 +08:00
Xintao 65fbc75689
Add colorspace functions: rgb2ycbcr, bgr2ycbcr, ycbcr2rgb and ycbcr2bgr (#259)
* update

* add functions

* update tests

* resolve comments

* resolve comments

* resolve comments

* update docstr
2020-05-03 23:32:48 +08:00
Kai Chen a338d43d78
Refactor unittests (#241)
* refactor unittests

* split test_video.py to two files
2020-04-26 22:54:27 +08:00