slau8405
Added few more features
e2b6524

A newer version of the Gradio SDK is available: 6.9.0

Upgrade
metadata
title: Polygon Augmentation
emoji: 📉
colorFrom: green
colorTo: gray
sdk: gradio
sdk_version: 5.30.0
app_file: app.py
pinned: false
license: apache-2.0
short_description: Preserve donut shape polygon in Augmentation

augmentation

Polygon Augmentation for Image Segmentation

This Hugging Face Space presents a prototype for preserving donut-shaped polygons during offline augmentation in image segmentation tasks. Built with Gradio, this demo provides an interactive interface to explore and apply augmentation techniques while maintaining the topological integrity of donut-like structures. Overview In image segmentation, data augmentation enhances model robustness by generating diverse training samples. However, standard augmentation techniques (e.g., rotation, scaling, or flipping) can distort complex polygon shapes, such as donuts (polygons with holes). This project addresses the challenge of preserving the topological properties of donut-shaped polygons during offline augmentation, ensuring accurate segmentation datasets. Features

Topology-Preserving Augmentation: Implements methods to maintain donut-shaped polygon structures during transformations. Interactive Interface: Built with Gradio 5.30.0 for real-time visualization and user interaction. Customizable Pipeline: Supports offline augmentation workflows compatible with segmentation tasks. Hugging Face Integration: Designed for seamless deployment on Hugging Face Spaces.

Getting Started

Navigate to the Spaces tab above to launch the demo. Upload a sample image and its corresponding donut-shaped polygon mask. Experiment with augmentation parameters and visualize results in real-time. Fork this Space to customize or extend the augmentation logic for your dataset.

Installation (Local Setup) To run this project locally: git clone https://huggingface.co/spaces// cd pip install -r requirements.txt python app.py

Ensure you have Python 3.8+ and Gradio 5.30.0 installed. Refer to requirements.txt for additional dependencies. Upcoming Features

Enhanced Polygon Support: Upload and process complex polygon masks with multiple holes. Live Augmentation Preview: Visualize transformations in real-time with adjustable parameters. Integration with DONUT Models: Compatibility with DONUT-like transformers for end-to-end segmentation pipelines. Batch Processing: Support for offline augmentation of large datasets. Export Options: Save augmented images and masks in common formats (e.g., PNG, NumPy).

Technical Details

Framework: Gradio 5.30.0 for the interactive frontend. Augmentation Library: Leverages libraries like Albumentations or Imgaug (to be specified in app.py). Polygon Preservation: Custom algorithms to enforce topological constraints during augmentation. License: Apache-2.0, ensuring open-source accessibility.

Contributing Contributions are welcome! Please fork this Space, make improvements, and submit a pull request. For issues or suggestions, open a ticket on the Hugging Face Space. References

Hugging Face Spaces Configuration Gradio Documentation Albumentations Library (if used) DONUT Model

For questions or feedback, reach out via the Hugging Face community or create an issue in this Space.