[Bug] Wrong padding order used at RandomCrop
See original GitHub issue🐛 Bug
According to the kornia docu left/ right or left, top, right, bottom order is used for 2D https://github.com/kornia/kornia/blob/87a0ead264ce5fc97997071acb9fe2286d6c425c/kornia/augmentation/augmentation.py#L645-L648
In pytorch docu (padding_left,padding_right) ,(padding_left,padding_right,padding_top,padding_bottom) orders are used
But in the code it’s mixed up. https://github.com/kornia/kornia/blob/87a0ead264ce5fc97997071acb9fe2286d6c425c/kornia/augmentation/augmentation.py#L717-L723
and here for 3D: https://github.com/kornia/kornia/blob/87a0ead264ce5fc97997071acb9fe2286d6c425c/kornia/augmentation/augmentation3d.py#L676-L678
Also pad_if_needed
adds twice the necessary padding.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Why isn't RandomCrop inserting the padding in pytorch?
padding (int or sequence) – Padding on each border. If a single int is provided this is used to pad all borders. so...
Read more >Source code for detectron2.data.transforms.augmentation_impl
def __init__(self, prob=0.5, *, horizontal=True, vertical=False): """ Args: prob ... than the input image size, then it uses a random crop of the...
Read more >Pytorch101: Data Preprocessing and Augmentation (Part 1)
To solve this kind of problem (since we cannot require users to give a ... In this case, we can use random-crop to...
Read more >Why isn't RandomCrop inserting the padding in pytorch? - vision
I am getting odd images despite printing the transform the data is using: -- splits[i]='train' taskset=<learn2learn.data.task_dataset.
Read more >Why and How to Implement Random Crop Data Augmentation
If we aim to apply a random crop to an object detection problem, ... Annotations that extend outside of frame throw an error...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes. Hasn’t been fixed yet.
@FGeri @shijianjian is this still happenning ?