Giter VIP home page Giter VIP logo

toyota-connected-india / zokyo Goto Github PK

View Code? Open in Web Editor NEW
12.0 2.0 2.0 50.05 MB

Zokyo is a MLOps friendly image augmentation library written in python built with modularity and extensibility in mind. Specifically crafted for automotive deep learning development.

Home Page: https://toyota-connected-india.github.io/zokyo/

License: Apache License 2.0

Makefile 2.17% Python 97.19% Batchfile 0.63%
automotive deep-learning deeplearning augmentation computer-vision mlops mlops-workflow keras pytorch segmentation

zokyo's Introduction

zokyo

CV library for image data augmentation

Zokyo


                                                                                             
                                                                                             
                                  kkkkkkkk                                                   
                                  k::::::k                                                   
                                  k::::::k                                                   
                                  k::::::k                                                   
zzzzzzzzzzzzzzzzz   ooooooooooo    k:::::k    kkkkkkkyyyyyyy           yyyyyyy ooooooooooo   
z:::::::::::::::z oo:::::::::::oo  k:::::k   k:::::k  y:::::y         y:::::yoo:::::::::::oo 
z::::::::::::::z o:::::::::::::::o k:::::k  k:::::k    y:::::y       y:::::yo:::::::::::::::o
zzzzzzzz::::::z  o:::::ooooo:::::o k:::::k k:::::k      y:::::y     y:::::y o:::::ooooo:::::o
      z::::::z   o::::o     o::::o k::::::k:::::k        y:::::y   y:::::y  o::::o     o::::o
     z::::::z    o::::o     o::::o k:::::::::::k          y:::::y y:::::y   o::::o     o::::o
    z::::::z     o::::o     o::::o k:::::::::::k           y:::::y:::::y    o::::o     o::::o
   z::::::z      o::::o     o::::o k::::::k:::::k           y:::::::::y     o::::o     o::::o
  z::::::zzzzzzzzo:::::ooooo:::::ok::::::k k:::::k           y:::::::y      o:::::ooooo:::::o
 z::::::::::::::zo:::::::::::::::ok::::::k  k:::::k           y:::::y       o:::::::::::::::o
z:::::::::::::::z oo:::::::::::oo k::::::k   k:::::k         y:::::y         oo:::::::::::oo 
zzzzzzzzzzzzzzzzz   ooooooooooo   kkkkkkkk    kkkkkkk       y:::::y            ooooooooooo   
                                                           y:::::y                           
                                                          y:::::y                            
                                                         y:::::y                             
                                                        y:::::y                              
                                                       yyyyyyy                               
                                                                                                                                                                 

Zokyo is a no-nonsense low-code computer vision augmentation library specifically built for automotive deep learning development which is easy to integrate with your MLOps pipelines.

Installing from source

With your venv activated:

$ make install

Running tests

From your activated venv run:

$ make test

Generate documentation

After done adding a new module with necessary docstrings, make sure to run the following command to generate sphinx documentation before submitting the PR.

$ make docs

Usage

A Computer Vision or ML engineer can try out different operations to finalize a configuration file for augmenting their images. A sample Configuration json file for Zokyo looks like this,

Note: Refer Documentation for more details.

{
        "input_dir" : "images", # input directory
        "output_dir" : "output", # output directory
        "annotation_dir" : "annotations", # ground truth annotations directory (Pascal VOC format)
        "annotation_format" : "pascal_voc", # annotation format 
        "mask_dir" : "mask" # segmentation masks directory 
        "sample" : 5000, # number of output samples required
        "multi_threaded" : true, # TODO
        "batch_ingestion": true, # set to true to turn on batch ingestion to have internal batch size
        "internal_batch": 20, # internal batch size
        "save_annotation_mask" : false, # set to true to save output anotation masks
        "operations":[
            {
                "operation": "DarkenScene", # operation name
                "operation_module" : "zokyo.augmentation", # module of that operation, refer examples on how to write custom ops
                "args": { # arguments required by that operation
                    "probability": 0.7, # probability of applying that operation
                    "darkness" : 0.5, # argument specific to the augmentation operation
                    "is_mask" : true, # apply augmentation operation to specific mask class label
                    "mask_label" : 2, # that specific mask label
                    "is_annotation" : true, # apply augmentation operation to specific annotation class label
                    "annotation_label : 1 # that specific annotation label
                }
            }
            ...
        ]
}

The above created config can then be used by a DevOps engineer to load and augment the data with the following 3 lines of code.

from zokyo.augmentation import Builder
pipeline = Builder(config_json="config.json")
pipeline.process_and_save()

Code of Conduct

Zokyo is an open-source project and adheres to the Contributor Convent Code of Conduct. By participating you are expected to uphold our Code of Conduct. We request our contributors and users to take a few minutes to review our Code of Conduct.

Contribution

If you are interested in contributing to Zokyo through code, documentation, feature ideas, bug fixing, etc., use the Issues section as the place to start the discussion.

License

Zokyo is licensed under Apache License 2.0.


For more usage tutorials, take a look at the notebooks in the examples folder.

Note: Zokyo currently supports only Pascal VOC format. To convert other annotation formats to Pascal VOC see this.

zokyo's People

Contributors

ashokramadass avatar ashokramadass-tcin avatar harsha-tc avatar srivathsang avatar tcinsrini avatar vi-sri avatar vis55 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

vi-sri llia2420

zokyo's Issues

config sample does not work as intended

“Sample“ in configuration doesn’t work properly
Sometimes more images get yielded, and sometimes less. Eg. say sample:6, internal batch size: 2, batch size:1 . Only 3 images get returned.

Too much augmentation

When batch size is greater than 1:
Image is getting augmented too much and the key features get missed

Images do not get augmented completely

When internalbatchsize is greater than 1:
Say internalbatchsize is 3 . Only 1 of the image gets returned after augmentation (even if the batch size is 5)

Initial Update

The initial setup worked, but all your packages are up to date. You can safely close this issue.

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.