Output text masks, upgrade dependencies, improved code and docs#155
Output text masks, upgrade dependencies, improved code and docs#155sslavian812 wants to merge 11 commits intoankush-me:python3from
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 |
ankush-me
left a comment
There was a problem hiding this comment.
I'm not sure if all of these packages are required, eg. sqlparse, tornado, kiwisolver etc. Can you review / clean these up?
| 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.
there seem to be two data_paths -- data_path and DATA_PATH?
gen.py
Outdated
| help='flag for turning on output of masks') | ||
| args = parser.parse_args() | ||
| main(args.viz) | ||
| main(viz=args.viz, output_masks=args.output_masks) |
There was a problem hiding this comment.
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:
pyplotand others)pyplot.hold(True)- works by default since version3.0(and the method is removed),scipy.misc.imsave- replaced with recommendedimageio.imwrite)--output-masksflag 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.