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

Create "Damage Paper" Augmentation #17

Closed
proofconstruction opened this issue Jul 8, 2021 · 6 comments
Closed

Create "Damage Paper" Augmentation #17

proofconstruction opened this issue Jul 8, 2021 · 6 comments
Labels
discussion Open dialog about how we can approach and solve various issues

Comments

@proofconstruction
Copy link
Collaborator

Motivation
It's not uncommon to scan documents that have undergone some physical deformation, like tearing, folding, or crinkling. The resulting changes in the surface of the paper generally become more apparent after digitization, causing difficulties for humans and machines reading the text.

See, for example, the image at the top of this post

It would be useful to be able to generate images of "damaged" documents, for training models in settings like healthcare (medical records), law (contracts), finance (invoicing), and so on.

There are several forms of damage that could be applied. Off the top of my head:

  1. crumpling
  2. tearing
  3. burning
  4. dissolving

... to name a few

Implementation
There are several paths forward for something like this. The most naive way would be to take some images of damaged paper and use these as the base image for existing pipelines. One much more sophisticated approach would be generating a 3D model (perhaps using Blender API?) and applying an image of a document as a texture.

@kwcckw
Copy link
Collaborator

kwcckw commented Jul 8, 2021

One much more sophisticated approach would be generating a 3D model (perhaps using Blender API?)

Interesting, or we can just use some damaged paper reference in paper phase?

@proofconstruction
Copy link
Collaborator Author

Interesting, or we can just use some damaged paper reference in paper phase?

Can you explain more what you mean?

@kwcckw
Copy link
Collaborator

kwcckw commented Jul 8, 2021

The most naive way would be to take some images of damaged paper and use these as the base image for existing pipelines

Actually i think this should be good enough, but how a 3D model can further improve the results? Do you have any related link on that?

@proofconstruction
Copy link
Collaborator Author

I don’t have a link, and I’m not sure what to look for.

What I mean is:

  1. We use a pipeline to create an image, just like we can now
  2. After the image is generated, we pass it through the CrumplePaperAugmentation to simulate rolling the paper into a ball, tearing it, etc.
  3. The result is very different than using the existing image pipeline to apply text to a picture of damaged paper, because the text does not deform in the same way the paper is.

@jboarman jboarman added the enhancement New feature or request label Jul 8, 2021
@jboarman
Copy link
Sponsor Member

jboarman commented Jul 8, 2021

Before tacking the more complicated concepts in this issue, we might want to decompose the concepts into simpler techniques (like in #21) that we can evolve into more the complicated techniques that we'll need for fuller implementation needed for this issue.

@jboarman jboarman added discussion Open dialog about how we can approach and solve various issues and removed enhancement New feature or request labels Jul 11, 2021
@jboarman
Copy link
Sponsor Member

The mechanical deformations proposed here are good ones that should be independently proposed on a per-transform basis along with examples of the expected output. For now, I think we should allow issue #21 (single paper fold) to reach completion so that we can pivot accordingly at that point based on how that issue matures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Open dialog about how we can approach and solve various issues
Projects
None yet
Development

No branches or pull requests

3 participants