Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Augmentation may distort too much #482

Closed
notiho opened this issue Apr 3, 2023 · 9 comments
Closed

Augmentation may distort too much #482

notiho opened this issue Apr 3, 2023 · 9 comments

Comments

@notiho
Copy link
Contributor

notiho commented Apr 3, 2023

I just added a few lines to also log images using tensorboard, and I noticed that when using augmentation, sometimes the lines get rotated so much that most content gets lost towards the ends. I assume that this is too much to make sense? I have attached an example. I suspect that this is caused by ElasticTransform which also does an affine transformation.
皇帝陞壇上香行禮初獻奏時豐之章職事官獻帛爵

@bencomp
Copy link
Contributor

bencomp commented Apr 5, 2023

Off-topic: I would like to see how you logged images to Tensorboard. Could you share the code for this?

More on-topic: it looks indeed like this much distortion is too much. I would think that to train a model to recognise text, it should be able to 'see' the text.

@notiho
Copy link
Contributor Author

notiho commented Apr 6, 2023

Sure, I made a pull request #485 in case this is useful for other people

mittagessen added a commit that referenced this issue Apr 12, 2023
@mittagessen
Copy link
Owner

I'm fairly sure we dialed in the values when we rewrote the augmentation a while ago but there's also a difference in the scale of the rotation between the different datasets as I just saw. What kind of training data are you using? In the line strip format the rotation can be quite high resulting in data like yours but otherwise it is fairly low at max 3 deg.

@notiho
Copy link
Contributor Author

notiho commented Apr 13, 2023

I was using arrow training data, so that should not have been the cause. I am also currently looking into this, I will probably to a PR later

@mittagessen
Copy link
Owner

OK, thanks. I've got a bunch on my plate so not having to track down bugs like this really helps.

@notiho
Copy link
Contributor Author

notiho commented Apr 13, 2023

I just made #489

@mittagessen
Copy link
Owner

Thanks, it's been merged.

@colibrisson
Copy link
Contributor

@notiho I still have a few images that are too distorted:

image

@notiho
Copy link
Contributor Author

notiho commented Jun 4, 2023

You are right, it looks like that for longer lines, a rotation of 3 degrees around the centre as is currently possible is already too much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants