Skip to main content

A versatile augmentation library for computer vision projects.

Project description


Unlocking Infinite Possibilities in Computer Vision Augmentation
๐Ÿ”ง Configurable โ€ข โš™๏ธ Controllable โ€ข ๐Ÿ“„ Format-Agnostic


AugFlow is an advanced open-source augmentation library designed to elevate your computer vision projects. Whether you're a researcher pushing innovation or a practitioner aiming for peak performance, AugFlow enables the creation of highly customizable augmentation pipelines that enhance dataset diversity and improve model generalization. With fully configurable and controllable processes, AugFlow offers unmatched flexibility for precise fine-tuning, optimizing both performance and robustness. ๐Ÿš€

To explore how AugFlow builds diverse augmentation pipelines, refer to the Flow diagram below.


๐Ÿ‘พ Features

Discover What Makes AugFlow Unique and So Powerful ๐ŸŒŸ

  • ๐ŸŒŠ Innovative Flow Concept AugFlow introduces the entirely novel concept of flows, a groundbreaking approach not yet implemented in any existing theory or solutions. Our initial evaluations demonstrate the impact and advantages this unique methodology brings to data augmentation.

  • ๐Ÿ› ๏ธ Configurable Parameters: Every augmentation is fully configurable through simple and intuitive parameters.

  • ๐Ÿ–๏ธ Comprehensive Polygon Clipping Control Unlike existing open and closed-source solutions that inadequately manage polygon clipping, AugFlow offers comprehensive, per-class control over clipped polygons, enhancing dataset diversity especially for those with high intra-class variability.

  • โœ‚๏ธ Enhanced CutOut Functionality AugFlow's CutOut feature provides superior control, enabling precise targeting of large or small polygons along with customizable parameters. This flexibility ensures more effective and tailored data augmentation strategies.

  • ๐Ÿงฉ Advanced Mosaic Augmentation AugFlow's Mosaic augmentation offers exceptional control with dynamic grid configurations, including larger grids for high-resolution images. This adaptability significantly improves detection accuracy for small objects within complex scenes.

  • ๐Ÿ”„ Precise Transformation Controls AugFlow enhances fundamental augmentations like Crop, Rotate, Shear, and Translate, allowing precise customization to better suit diverse dataset requirements and improve model robustness.

  • ๐ŸŽฏ Targeted Category Focusing AugFlow enables targeted augmentation by focusing on images containing specific categories while excluding others, effectively balancing datasets. Future enhancements aim to handle edge cases per class using advanced unsupervised techniques.

  • ๐Ÿ“„ Format-Agnostic: Supports multiple annotation formats including COCO and YOLO seamlessly, for both detection and segmentation.

  • ๐Ÿ“Š Logging & Visualization: Track augmentation processes with detailed logs and visualize annotations to ensure quality.

  • ๐Ÿ”ง Extensible Architecture: Designed to easily incorporate new augmentations and extend existing functionalities.


๐Ÿš€ Getting Started

โ˜‘๏ธ Prerequisites

Before you begin, ensure you have met the following requirements:

  • Operating System: Windows, macOS, or Linux
  • Python Version: Python 3.6 or higher
  • Package Manager: pip installed
  • Git: Installed for cloning the repository and contributing (Download Git)

โš™๏ธ Installation

๐Ÿ› ๏ธ Setting Up a Virtual Environment (Recommended):

  1. Create a Virtual Environment:

    python3 -m venv augflow-env
    
  2. Activate the Virtual Environment:

    • Windows:

      augflow-env\Scripts\activate
      
    • macOS and Linux:

      source augflow-env/bin/activate
      

After creating your virtual env you can Install AugFlow using one of the following methods:

  1. Build from source:

    • Clone the augflow repository:

      git clone https://github.com/ConnectedMotion/augflow.git
      
    • Navigate to the project directory:

      cd augflow
      
    • Install the project dependencies:

      pip install -e .
      
  2. Or. Install directly using ย 

   pip install augflow

๐ŸŽฏ Quick Start Example

The following example demonstrates how to use AugFlow's Pipeline to apply Augmentations to coco 128 dataset.

First, download the COCO128 dataset from the following Google Drive link, extract it, and run the example.

After running your experiment, you will get detailed logs about the flow, saved in the augflow_pipeline.log file.

  


import os
import logging
from augflow.pipeline import Pipeline
import augflow.utils.configs as config
from augflow.utils.configs import example_custom_rotate_config

logging.basicConfig(level=logging.INFO)

experiment_id = 'exp1'


pipe = Pipeline()


pipe.task(
  format='yolo',
  dataset_path='dataset_path_contains_data_dot_yaml_images_labels'
)

pipe.fuse(
  source_id='root',
  type='rotate',
  id='aug_rotate',
  config=example_custom_rotate_config,
  merge=True
)


pipe.out(
  format='yolo',
  output_path=f'output_path/{experiment_id}',
  ignore_masks=False,
  visualize_annotations=True
)

๐Ÿ”ฌ Unit Testing

Run the test suite using PyTest:

pytest tests/ -v

๐Ÿ“Œ Project Roadmap

  • [โœ…] Milestone 1: Implement more controllable, configurable, and intelligent augmentation flows (Done)

  • [โŒ] Milestone 2: Develop Detailed Documentation. ๐Ÿ•’

  • [โŒ] Milestone 3: Add Comprehensive Control Over Individual Augmentations. ๐Ÿ•’

  • [โŒ] Milestone 4: Provide predefined augmentation presets based on the dataset's statistical distribution. ๐Ÿ•’

  • [โŒ] Milestone 5: Support Key Points Annotations. ๐Ÿ•’

  • [โŒ] Milestone 6: Enhance Augmentation Focus Based on Object Features. ๐Ÿ•’

  • [โŒ] Milestone 7: Support 3D Augmentations. ๐Ÿ•’

  • [โŒ] Milestone 8: Develop an Interactive GUI for Augmentation Setup. ๐Ÿ•’


๐Ÿ”ฐ Contributing

  1. Fork the Repository: Start by forking the project repository to your github account.
  2. Clone Locally: Clone the forked repository to your local machine using a git client.
git clone https://github.com/your-username/augflow.git
  1. Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
  1. Make Your Changes: Develop and test your changes locally.
  2. Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.'
  1. Push to github: Push the changes to your forked repository.
git push origin new-feature-x
  1. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
  2. Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!

๐ŸŽ— License

This project is licensed under the MIT License. For more details, refer to the LICENSE file.


๐Ÿ“ฌ Contact and Support

For any inquiries or support, feel free to reach out via Issues or join the Discussions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

augflow-1.1.0.tar.gz (57.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

augflow-1.1.0-py3-none-any.whl (76.8 kB view details)

Uploaded Python 3

File details

Details for the file augflow-1.1.0.tar.gz.

File metadata

  • Download URL: augflow-1.1.0.tar.gz
  • Upload date:
  • Size: 57.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.10

File hashes

Hashes for augflow-1.1.0.tar.gz
Algorithm Hash digest
SHA256 dfa11b63e258be2e101b3629938c166b08f1bf41a7b473dfa848a6feaacee32c
MD5 73e74d0fd48c257e11263d357de6960b
BLAKE2b-256 8a1f6bf17f65db8e61ffa294c6a863b8a7ecc1c43376cbfaf6505729704480bc

See more details on using hashes here.

File details

Details for the file augflow-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: augflow-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 76.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.10

File hashes

Hashes for augflow-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6b42f2c13023404132ce53d69f1345a98d728b6a0983a2c7e962e7bcc7ef324
MD5 a94e764c3be7111c346234df776b311a
BLAKE2b-256 8ea03a873d84f7d6509959a2dce4e642fd6e2947ef2ee4fb86cc4be5d51a5f57

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page