- 30 Jun, 2020 1 commit
-
-
vfdev authored
* [WIP] Unified Tensor/PIL crop * Fixed misplaced type annotation * Fixed tests - crop with padding - other tests using mising private functions: _is_pil_image, _get_image_size * Unified CenterCrop and F.center_crop - sorted includes in transforms.py - used py3 annotations * Unified FiveCrop and F.five_crop * Improved tests and docs * Unified TenCrop and F.ten_crop * Removed useless typing in functional_pil * Updated code according to the review - removed useless torch.jit.export - added missing typing return type - fixed F.F_pil._is_pil_image -> F._is_pil_image * Removed useless torch.jit.export * Improved code according to the review
-
- 26 Jun, 2020 1 commit
-
-
vfdev authored
* [WIP] Add Tensor implementation for pad * Unified Pad and F.pad opertion for PIL and Tensor inputs * Added another test and improved docstring * Updates according to the review * Cosmetics and replaced f-string by "".format * Updated docstring - added compatibility support for padding as [value, ] for functional_pil.pad Co-authored-by:Francisco Massa <fvsmassa@gmail.com>
-
- 23 Jun, 2020 1 commit
-
-
joerg-de authored
-
- 11 Jun, 2020 1 commit
-
-
Philip Meier authored
* add convert_image_dtype to functionals * add ConvertImageDtype transform * add test * remove underscores from numbers since they are not compatible with python<3.6 * address review comments 1/3 * fix torch.bool * use torch.iinfo in test * fix flake8 * remove double conversion * fix flake9 * bug fix * add error messages to test * disable torch.float16 and torch.half for now * add docstring * add test for consistency * move nested function to top * test in CI * dirty progress * add int to int and cleanup * lint Co-authored-by:Philip Meier <meier.philip@posteo.de>
-
- 10 Jun, 2020 1 commit
-
-
Clement Joudet authored
* feat: torchscriptable adjusments * fix: tensor output type * feat: ColorJitter torchscriptable * fix: too many blank lines * fix: documentation spacing and torchscript annotation * refactor: list type for _check_input * refactor: reverting to original syntax Co-authored-by:clement.joudet <clement.joudet@inventia.life>
-
- 04 Jun, 2020 1 commit
-
-
Francisco Massa authored
* Make RandomHorizontalFlip torchscriptable * Make _is_tensor_a_torch_image more generic * Make RandomVerticalFlip torchscriptable (#2283) * Make RandomVerticalFlip torchscriptable * Fix lint
-
- 18 May, 2020 2 commits
-
-
Steven Basart authored
* Adds as_tensor to functional.py Similar functionality to to_tensor without the default conversion to float and division by 255. Also adds support for Image mode 'L'. * Adds tests to AsTensor() Adds tests to AsTensor and removes the conversion to float and division by 255. * Adds AsTensor to transforms.py Calls the as_tensor function in functionals and adds the function AsTensor as callable from transforms. * Removes the pic.mode == 'L' This was handled by the else condition previously so I'll remove it. * Fix Lint issue Adds two line breaks between functions to fix lint issue * Replace from_numpy with as_tensor Removes the extra if conditionals and replaces from_numpy with as_tensor. * Renames as_tensor to pil_to_tensor Renames the function as_tensor to pil_to_tensor and narrows the scope of the function. At the same time also creates a flag that defaults to True for swapping to the channels first format. * Renames AsTensor to PILToImage Renames the function AsTensor to PILToImage and modifies the description. Adds the swap_to_channelsfirst boolean variable to indicate if the user wishes to change the shape of the input. * Add the __init__ function to PILToTensor Add the __init__ function to PILToTensor since it contains the swap_to_channelsfirst parameter now. * fix lint issue remove trailing white space * Fix the tests Reflects the name change to PILToTensor and the parameter to the function as well as the new narrowed scope that the function only accepts PIL images. * fix tests Instead of undoing the transpose just create a new tensor and test that one. * Add the view back Add img.view(pic.size[1], pic.size[0], len(pic.getbands())) back to outside the if condition. * fix test fix conversion from torch tensor to PIL back to torch tensor. * fix lint issues * fix lint remove trailing white space * Fixed the channel swapping tensor test Torch tranpose operates differently than numpy transpose. Changed operation to permute. * Add mode='F' Add mode information when converting to PIL Image from Float Tensor. * Added inline comments to follow shape changes * ToPILImage converts FloatTensors to uint8 * Remove testing not swapping * Removes the swap_channelsfirst parameter Makes the channel swapping the default behavior. * Remove the swap_channelsfirst argument Remove the swap_channelsfirst argument and makes the swapping the default functionality.
-
Francisco Massa authored
-
- 05 May, 2020 1 commit
-
-
Hong Xu authored
`Mn`, `Sn` are used as mean and std, but their suddenly turned to be `mean[n]` and `std[n]` in about 10 words later
-
- 02 Apr, 2020 1 commit
-
-
Francisco Massa authored
Summary: Fix docstring formatting issues Reviewed By: fmassa Differential Revision: D20736644 fbshipit-source-id: 78f66045cfd4c84cb35ca84a1e1fa6aadcd50642 Co-authored-by:Patrick Labatut <plabatut@fb.com>
-
- 01 Apr, 2020 1 commit
-
-
Philip Meier authored
-
- 31 Mar, 2020 1 commit
-
-
Philip Meier authored
* remove sys.version_info == 2 * remove sys.version_info < 3 * remove from __future__ imports
-
- 24 Mar, 2020 1 commit
-
-
Francisco Massa authored
Summary: Currently the scale argument can only be of type tuple or integer, this diff allows feeding the input argument `scale` with a list. Pull Request resolved: https://github.com/pytorch/vision/pull/1997 Test Plan: Without this diff, launching the following classy vision task causes error: https://our.intern.facebook.com/intern/fblearner/details/175876950/ With this diff, everything works fine: https://our.intern.facebook.com/intern/fblearner/details/175913768/ Reviewed By: resonatevision Differential Revision: D20544904 Pulled By: ymao1993 fbshipit-source-id: a95a2e9ceadec77fffe234756fb3b38b1b9c9cb1 Co-authored-by:
Yu Mao <ymao1@fb.com>
-
- 23 Mar, 2020 1 commit
-
-
Willie Maddox authored
* Add fill option to RandomPerspective #1972 * Minor fix to docstring syntax * Add _parse_fill() to get fillcolor (#1972) * Minor refactoring as per comments. * Added test for RandomPerspective with fillcolor. * Force perspective transform in test.
-
- 10 Feb, 2020 1 commit
-
-
Bharat Raghunathan authored
-
- 27 Jan, 2020 1 commit
-
-
abdjava authored
I have fixed a typo that was persent in the Normalize class changed line 150 from ``input[channel] = (input[channel] - mean[channel]) / std[channel]`` to ``output[channel] = (input[channel] - mean[channel]) / std[channel]``
-
- 22 Jan, 2020 1 commit
-
-
Philip Meier authored
* initial fix * outsourced num bands lookup * fix doc * added pillow version requirement * simplify number of bands extraction * remove unrelated change * remove indirect dependency on pillow>=5.2.0 * extend docstring to transform * bug fix * added test
-
- 24 Sep, 2019 1 commit
-
-
Zhicheng Yan authored
* video transforms * [video transforms]in ToTensorVideo, divide value by 255.0 * [video transforms] fix a bug * fix linting * Make changes backwards-compatible
-
- 11 Sep, 2019 1 commit
-
-
Philip Meier authored
* Adds optional fill colour to rotate * bug fix
-
- 30 Aug, 2019 1 commit
-
-
Francisco Massa authored
* Fix flakiness of test_randomresized_params * Real fix * Reduce number of iters
-
- 06 Jul, 2019 1 commit
-
-
Zhun Zhong authored
* Fix bug to Random Erasing 1. Avoid forever loop for getting parameters of erase. 2. replace' img_b' by 'img_c', because it indicates the channel. 3. replace v = torch.rand([img_c, h, w]) by v = torch.empty([img_c, h, w], dtype=torch.float32).normal_(). Normally distributed achieves better performance. * add test * Update test_transforms.py * Update transforms.py * Update test_transforms.py * Update transforms.py * Update functional.py
-
- 04 Jul, 2019 1 commit
-
-
ekka authored
* Minor optimization to RandomErasing This PR adds an additional check on `p` argument and prevents computing `img.shape` multiple times. * linting
-
- 03 Jul, 2019 1 commit
-
-
ptrblck authored
* initial commit * add more checks, fix lint, fix doc
-
- 28 Jun, 2019 2 commits
-
-
Surgan Jandial authored
* updates on normalize * test fixes * Update test_transforms.py
-
Surgan Jandial authored
* test improved * Update test_transforms.py * behaviour changes RandomErasing * test fixes * linter fix
-
- 24 Jun, 2019 1 commit
-
-
Zhun Zhong authored
* add erase function * add Random Erasing * Update transforms.py * Update transforms.py * add test for random erasing * Update test_transforms.py * fix flake8 * Update test_transforms.py * Update functional.py * Update test_transforms.py * fix bug for per-pixel erasing * Update transforms.py * specific for coordinate (x, y) * add raise TypeError for img * Update transforms.py * Update transforms.rst
-
- 20 Jun, 2019 1 commit
-
-
Francisco Massa authored
-
- 05 Jun, 2019 1 commit
-
-
Surgan Jandial authored
* updating docs for randomperspective * my * ci
-
- 21 May, 2019 1 commit
-
-
Francisco Massa authored
-
- 06 May, 2019 1 commit
-
-
Adam J. Stewart authored
-
- 02 May, 2019 1 commit
-
-
ekka authored
-
- 25 Apr, 2019 1 commit
-
-
Surgan Jandial authored
* final changes * final * linter * test changes * linter * lint * indent * lint * minor changes * parameter added * ci * ci fixes * indent * indent * indent * arg fixed
-
- 09 Apr, 2019 1 commit
-
-
ekka authored
* Update test_transforms.py * Update transforms.py
-
- 25 Mar, 2019 1 commit
-
-
ekka authored
* Add Affinetransformation Add Affinetransformation to superseed LinearTransformation * Add test * Add zero mean_vector in LinearTransformation and improved docs * update * minor fix * minor fix2 * fixed flake8 * fix flake8 * fixed transpose syntax * fixed shape of mean_vector in test * fixed test * print est cov and mean * fixed flake8 * debug * reduce num_samples * debug * fixed num_features * fixed rtol for cov * fix __repr__ * Update transforms.py * Update test_transforms.py * Update transforms.py * fix flake8 * Update transforms.py * Update transforms.py * Update transforms.py * Update transforms.py * Changed dim of mean_vector to 1D, doc and removed .numpy () from format_string * Restore test_linear_transformation() * Update test_transforms.py
-
- 20 Mar, 2019 1 commit
-
-
Michał Zientkiewicz authored
Signed-off-by:Michal Zientkiewicz <michalz@nvidia.com>
-
- 11 Mar, 2019 2 commits
- 18 Feb, 2019 1 commit
-
-
surgan12 authored
* randomresizedmods * lint checks * test to randomrescrop added * updates * tests updated * tests updated * upd * updates * Update torchvision/transforms/transforms.py Co-Authored-By:surgan12 <33121121+surgan12@users.noreply.github.com> * tests changed * trvis * travis * fixes syntax * ... * flake fixes * flake_fixes * flake_fixes2
-
- 08 Jan, 2019 1 commit
-
-
surgan12 authored
* doc change * doc changes * lint_checks * Update transforms.py
-
- 30 Dec, 2018 1 commit
-
-
surgan12 authored
* normalise * some changes * Update functional.py * Update functional.py * code changes
-