Giter Site home page Giter Site logo

Comments (11)

tbrettallen avatar tbrettallen commented on May 30, 2024 4

Added PencileScribbles augmentation (see d496cef). With default settings it will produce something like this.
lazy_scribbled_out

With size_range set large enough like this
PencilScribbles(size_range=(2000, 2020), p=1.0)
It can produce images like this.
PencilScribbles

With brightness_change set to 32 instead of the default 128
PencilScribbles(brightness_change=32, size_range=(2000, 2020), p=1.0)
It can create charcoal-like strokes instead of graphite-like strokes as seen belo
CharcoalScribbles

from augraphy.

proofconstruction avatar proofconstruction commented on May 30, 2024 1

Added a template colab notebook, linked in #56

from augraphy.

jboarman avatar jboarman commented on May 30, 2024

Looks really great @tbrettallen! 🥇

To a future dev looking at this issue, we could potentially expand this by applying this effect to lorem ipsum text that is generated using cursive fonts built in to OpenCV:

FONT_HERSHEY_SCRIPT_COMPLEX
FONT_HERSHEY_SCRIPT_SIMPLEX

image

Another source of handwriting text could come from the IAM Handwriting Database which includes handwriting samples from 657 writers, 1,539 pages of scanned text, 5,685 isolated and labeled sentences and 13,353 isolated and labeled text lines.

image

from augraphy.

jboarman avatar jboarman commented on May 30, 2024

@shaheryar1 @kwcckw Would either of you be interested in adding documentation for this effect?

Also, I'm wondering if we should create notebooks for each feature. That's something we can discuss further in #33, but we could use this example as a starting point for testing out that concept. (Note that @proofconstruction has revised the documentation structure to help make it a bit more manageable.)

from augraphy.

kwcckw avatar kwcckw commented on May 30, 2024

@shaheryar1 @kwcckw Would either of you be interested in adding documentation for this effect?

By creating documentation, do you mean adding notebook on this particular augmentation? Since right now i don't see any related page on the documentation except the one in the Readme.

Also, I'm wondering if we should create notebooks for each feature. That's something we can discuss further in #33, but we could use this example as a starting point for testing out that concept. (Note that @proofconstruction has revised the documentation structure to help make it a bit more manageable.)

I think we should create notebook with specific use case by using this augmentation? It should be a pipeline consists of this augmentation , and the other augmentations too. Otherwise, it might be not so relevant to create 1 notebook for each augmentation, some are not quite distinct on their own.

from augraphy.

jboarman avatar jboarman commented on May 30, 2024

By creating documentation, do you mean adding notebook on this particular augmentation?

@kwcckw Sort of. The README was just updated with all the documentation moved around into a more organized format. Check out the new doc folder.

… should be a pipeline consisting of this augmentation , and the other augmentations too. Otherwise, it might be not so relevant to create 1 notebook for each augmentation, some are not quite distinct on their own.

Valid point. Some augmentations won’t stand on their own. However, I think (eventually) we should strive to create notebooks documentation that is very narrowly defined so that the effect of an augmentation is center stage in the documentation of that augmentation, where possible. This pencil scribbles augmentation, for example, stands alone very well and would be obfuscated in a sample notebook that engaged other augmentations.

Perhaps a compromise is some hybrid of shared notebook samples for augmentations that go well together, which will result in fewer notebooks that we would have to maintain within the repo.

from augraphy.

kwcckw avatar kwcckw commented on May 30, 2024

@kwcckw Sort of. The README was just updated with all the documentation moved around into a more organized format. Check out the new doc folder.

I see, sorry i didn't aware of that previously. Yea, i will include the documentation after i go through the code on the new agumentation.

Valid point. Some augmentations won’t stand on their own. However, I think (eventually) we should strive to create notebooks documentation that is very narrowly defined so that the effect of an augmentation is center stage in the documentation of that augmentation, where possible. This pencil scribbles augmentation, for example, stands alone very well and would be obfuscated in a sample notebook that engaged other augmentations.

Perhaps a compromise is some hybrid of shared notebook samples for augmentations that go well together, which will result in fewer notebooks that we would have to maintain within the repo.

Okay, then i think we need to create a standardize notebook format for all augmentation and create each of them first. Once we are having a clear visualization on each augmentation, then we can decide whether to merge them or not.

from augraphy.

shaheryar1 avatar shaheryar1 commented on May 30, 2024

I was having the same confusions about making seperate notebooks for each augmentation. @kwcckw Once you write a create a standard format, do share it with me. As there are plenty of augmentations to consider , we can divide the task.

from augraphy.

kwcckw avatar kwcckw commented on May 30, 2024

I was having the same confusions about making seperate notebooks for each augmentation. @kwcckw Once you write a create a standard format, do share it with me. As there are plenty of augmentations to consider , we can divide the task.

Right now here are the 2 main notebooks example from my end:

  1. https://colab.research.google.com/drive/1hLHyyvNi-cRRDOcqtPnZPCw4j25oZMDG?usp=sharing
  2. https://colab.research.google.com/drive/1MXNhPQ_37aiPmAOkfKNCDhKnlaPc1zDt?usp=sharing

I'm following the steps of:

  1. Install Augraphy
  2. Download sample image using gdown
  3. Initialize libraries
  4. Initialize pipeline
  5. Apply pipeline to image

Is this good enough or do you have any suggestion to improve the workflow in the notebook?

from augraphy.

jboarman avatar jboarman commented on May 30, 2024

The pencil-oriented implementation in PencilScribbles is well implemented (see code) which uses noise and grey color to emulate a pencil stroke.

However, we still lack the ability to produce ink-like lines in various colors, as originally intended, which would contain less noise than a pencil stroke and have more diverse range of stroke widths (e.g. thinner pen ink vs thicker markers).

We should generalize this to simply Scribbles with stroke parameters that can be randomized.

Stroke parameters would include:

  • stroke_color - random defaults would be typical colors such as black, grey, blue, red
  • stroke_width - default ranges typical for ink, pen or marker
  • stroke_noise - less noise would be more like a dark marker or pen, while more would be a pencil or possibly a marker)
  • stroke_type - defaults above stroke parameters to values suitable for implementing a pen, pencil and marker; overrides would be honors while setting default param values where not explicitly set

from augraphy.

kwcckw avatar kwcckw commented on May 30, 2024

This should be resolved with the update in this pull request:
#282

from augraphy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.