havanagrawal / clomask

Capstone Project for Clobotics: Using Mask R-CNN for Rigid/Non-Rigid Retail Consumable Product Detection
MIT License
7 stars 4 forks source link

Cleanup and Improve Data Synthesizer 🚧 #31

Closed havanagrawal closed 5 years ago

havanagrawal commented 5 years ago

Summary of Changes

  1. Minor code cleanup in data_synthesizer.py
    1. Added a random seed to have reproducible data sets
    2. Removed multithreading. Encourage the user to use concurrency on the consuming end.
    3. Add pydocs
  2. New version of data_synthesizer (data_synthesizer_v2.py), and corresponding configuration
    1. Added support for non-aligned shelves
    2. Added support for non-mask foreground objects
  3. Updated template_manager.py
    1. Update template manager to support new configuration format
    2. Better layer of abstraction over the configuration
  4. Added shelf.py
    1. A layer of abstraction over the raw backgrounds.json config file
    2. Necessary geometrical functions

You can view the Demo notebook here (renamed to be more descriptive)

P.S.: Sorry for mixed intent in a single PR

pshivraj commented 5 years ago

There is a minor fix that needs to be put in the "Synthetic-Data-Creation-for-Retail-Environments" notebook that we need to make sure data folder exists.

So make following changes to 28th and 34th cell of the notebook:

output_dir = "data/"
if not os.path.exists(output_dir ):
    os.mkdir(output_dir )

instead of :

output_dir = "data/"