Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

add rotation augmentation #890

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

hcx1231
Copy link
Contributor

@hcx1231 hcx1231 commented Jun 13, 2019

In some cases, like industrial inspection, rotation is a natural scene as horizontal flip,so I added it to the transform process in training time.Default was set to 0.0.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jun 13, 2019
@lsrock1
Copy link
Contributor

lsrock1 commented Jun 21, 2019

Does this work? When i ran this, i got size inconsistent error in cat boxlist.

F.resize parameter order is height, width,
image.size's parameter order is width height

so, to correct this

width, height = image.size
image = F.rotate(image,90,expand=True)
image = F.resize(image, (height, width))

is necessary

@hcx1231
Copy link
Contributor Author

hcx1231 commented Jun 21, 2019

Does this work? When i ran this, i got size inconsistent error in cat boxlist.

I am so sorry.I have resized to keep it the same size with the input box and ran OK in my own dataset.Let me check it and answer you later.

@SkeletonOne
Copy link
Contributor

@hcx1231 Hi, have you tested your implementation on COCO dataset? And do you have an improvement on COCO minival dataset?

@ManOfStory
Copy link

ManOfStory commented Apr 3, 2023

How can I generate a random rotation angle by your code? Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants