Giter VIP home page Giter VIP logo

kp-poly-aug's Introduction

kp-poly-aug

The scripts are based on the official label studio integration with fifty-one .

Annotation

First start Label studio:

label-studio start 

Then run the annotation script to automatically create a label studio project and start annotating a dataset.

python annotate.py
  • name: A name for the dataset.
  • anno_key: A name for the labelstudio project.
  • dataset_dir: The path to the repository containing the dataset

See here for more details about the labeling schema.

  • label_field: a string indicating a new or existing label field to annotate

  • label_type: a string indicating the type of labels to annotate. The possible label types are:

    • "classification": a single classification stored in Classification fields
    • "detections": object detections stored in Detections fields
    • "instances": instance segmentations stored in Detections fields with their mask attributes populated
    • "polylines": polylines stored in Polylines fields with their filled attributes set to False
    • "polygons": polygons stored in Polylines fields with their filled attributes set to True
    • "keypoints": keypoints stored in Keypoints fields
    • "segmentation": semantic segmentations stored in Segmentation fields
  • classes: a list of strings indicating the class options for label_field or all fields in label_schema without classes specified.

To use Label studio, an API key must be provided, see here.

Augmentation

Run the annotation script to automatically augment a dataset using albumentation.

python annotate.py
  • name: Name of the dataset to load.
  • json_file: JSON file containing labels.
  • image_root: The directory containing the images.
  • list_augmentations_file: A file containing a list of albumentation augmmentations.
  • output_folder: A folder to save the augmented images.

Visualization

Inspect a dataset by running:

python augmented_fo_dataset.py
  • name: Name of the dataset to load.
  • labels_path: JSON file containing labels.
  • data_path: The directory containing the images.

Dataset preparation for Detectron

The script is based on the official Detectron2 integration with fifty-one .

Load the dataset, split it into training/validation and train a model.

python detectron_ready.py

kp-poly-aug's People

Contributors

zorrander avatar

Watchers

 avatar

Forkers

gaurangsharma18

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.