-
Notifications
You must be signed in to change notification settings - Fork 622
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
Output text masks, upgrade dependencies, improved code and docs #155
base: python3
Are you sure you want to change the base?
Conversation
…and images to separate files implemented.
…precated api useage. fix --viz logic.
… flag to control debug output.
…deprecated and recomments to use this library instead)
@sslavian812 : thank you for the pull request. I will review it in a few days and get back to you! |
…ovider class (1st version)
Hi, do you have some news about this pr? |
Hi @ankush-me |
Hi @ankush-me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if all of these packages are required, eg. sqlparse, tornado, kiwisolver etc. Can you review / clean these up?
@@ -95,9 +117,12 @@ def main(viz=False): | |||
NUM_IMG = N | |||
start_idx, end_idx = 0, min(NUM_IMG, N) | |||
|
|||
RV3 = RendererV3(DATA_PATH, max_time=SECS_PER_IMG) | |||
renderer = RendererV3(DATA_PATH, max_time=SECS_PER_IMG) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there seem to be two data_paths -- data_path
and DATA_PATH
?
gen.py
Outdated
args = parser.parse_args() | ||
main(args.viz) | ||
main(viz=args.viz, output_masks=args.output_masks) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if viz
is set to True, the app crashes.
@sslavian812 Thanks for this pull request. I tried to test it out but kept running into issues. I've highlighted some of these in the comments above. Will review later with (hopefully) more time at hand. |
Hi there!
In my research, I needed to use your project to generate some images with texts along with masks, labels and bounding boxes.
I added some new features to it, and here is my PR:
pyplot
and others)pyplot.hold(True)
- works by default since version3.0
(and the method is removed),scipy.misc.imsave
- replaced with recommendedimageio.imwrite
)--output-masks
flag users can obtain text masks used to place text to the image (see "_mask.png" files), and bounding boxes of each word with a label (see "_bb.txt" files).Run with this flag and see the content of "./masks/" folder for more examples
Following the single responsibility principle: renderer should render, a generator should generate (and, optionally, display result for users)
Tested combinations "--viz --debug" "--viz --output-masks", "--viz --output-masks --debug" "--output-masks --debug".
Let's work together on merging this contribution to your project.
Btw, I'd very much encourage you to make it python3 by default.