Comments (11)
Added PencileScribbles augmentation (see d496cef). With default settings it will produce something like this.
With size_range set large enough like this
PencilScribbles(size_range=(2000, 2020), p=1.0)
It can produce images like this.
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
from augraphy.
Added a template colab notebook, linked in #56
from augraphy.
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
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.
from augraphy.
@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.
@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.
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 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.
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.
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:
- https://colab.research.google.com/drive/1hLHyyvNi-cRRDOcqtPnZPCw4j25oZMDG?usp=sharing
- https://colab.research.google.com/drive/1MXNhPQ_37aiPmAOkfKNCDhKnlaPc1zDt?usp=sharing
I'm following the steps of:
- Install Augraphy
- Download sample image using gdown
- Initialize libraries
- Initialize pipeline
- Apply pipeline to image
Is this good enough or do you have any suggestion to improve the workflow in the notebook?
from augraphy.
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, redstroke_width
- default ranges typical for ink, pen or markerstroke_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 apen
,pencil
andmarker
; overrides would be honors while setting default param values where not explicitly set
from augraphy.
This should be resolved with the update in this pull request:
#282
from augraphy.
Related Issues (20)
- Add Pattern-based Distortion Generator HOT 6
- Add `InkShifter` Augmentation to Shift Ink Pixels Randomly and Follow Background Shadows
- Add Wrinkled, Crumpled Paper Augmentation HOT 1
- Create Utility Function for Exposing Underlying Pixel Colors
- Empty Pipeline lowers image quality HOT 12
- Add Augmentation for Shadows Cast onto Camera-Sourced Document Images HOT 1
- Create Baseline Performance Benchmark; Apply Initial Optimizations Using Numba HOT 2
- Create Example Using Dataloader for PyTorch and TensorFlow HOT 1
- Add Python 3.11 Support, Drop Python 3.7 HOT 2
- Images Broken in PyPI Listing HOT 2
- Reflected Light from Camera Flash or other Bright Sources HOT 1
- Add Color Shifting / 3D Blur Effect HOT 4
- Improve PageBorder effect HOT 1
- Add support for bounding box, keypoints and mask. HOT 1
- Add `InkColorSwap` to Replace the Color Used for Lettering in a Document HOT 1
- Add `InkMottling` Augmentation to Ensure Ink is Non-Uniform HOT 1
- Add support for image with alpha layer. HOT 1
- Color range in InkBleed is not working HOT 1
- Update to Paper Factory HOT 1
- Confusion on `Geometric` Augmentation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from augraphy.