jbohnslav / opencv_transforms

OpenCV implementation of Torchvision's image augmentations
MIT License
375 stars 46 forks source link

call for Pad is not the same as pytorch.transforms #7

Closed prass-anyvision closed 4 years ago

prass-anyvision commented 4 years ago

https://github.com/jbohnslav/opencv_transforms/blob/620f1f4881173faa0fc8f884087ee20359754765/opencv_transforms/transforms.py#L222

To follow the same call, and have an in-place replacement, we need pad = [pad[0], pad[2], pad[1], pad[3]]

jbohnslav commented 4 years ago

As far as I can tell, this is exactly the same as TorchVision.

https://github.com/pytorch/vision/blob/8aec85deb447d415abc0788d8dc301a727cc69fb/torchvision/transforms/transforms.py#L303