πΌοΈ AI Sticker Generator API
Welcome to the AI Sticker Generator API! This API is designed to transform images into high-quality "stickers" by isolating the primary object using advanced semantic segmentation techniques. The stickers produced have smooth, feathered edges to ensure a polished and professional look.
Examples
Before and After Transformation
π Key Features
π Semantic Segmentation
Automatically identifies and isolates the main subject in an image, providing precise cutouts for clear and visually appealing stickers.
π Feathered Edges
Applies a Gaussian blur to the mask edges, creating a soft and natural transition to transparency for a more polished finish.
β‘ Built with FastAPI
Utilizes FastAPI for high performance, scalability, and fast response times suitable for production environments.
π Versatile Image Support
Supports PNG and JPEG formats, ensuring compatibility with widely used image types.
π Quick Start Guide
Entire Code is on GitHub as well : ![URL]https://github.com/rajasami156/AI-Image-Sticker-Generator.git
- Clone the repository and navigate to the project directory.
- Install dependencies (requires Python 3.8+).
- Start the API server using the provided configuration file.
- Once the server is running, the API is accessible locally, ready to accept image uploads for sticker generation.
π οΈ API Endpoints
POST /create_sticker/
- Description: Upload an image to generate a sticker with a transparent background.
- Supported File Types: PNG and JPEG formats.
- Response: Returns a PNG image of the sticker with a transparent background. In case of an unsupported file format, an error message will be returned.
𧩠How It Works
- Model & Preprocessing: Uploaded images are preprocessed and passed through a pre-trained model for semantic segmentation.
- Mask Generation: A binary mask isolates the main object in the image.
- Edge Feathering: A Gaussian blur is applied to mask edges, creating a smooth transition.
- Sticker Creation: The mask adds transparency, producing an image that can be directly used as a sticker.
π Directory Structure
Generated stickers are saved in a designated output directory, ensuring easy access and organization of created stickers.
βοΈ Configuration
Before running the application, confirm that the output directory exists. This directory is essential for storing generated stickers for easy retrieval and management.
π License
Licensed under the MIT License, allowing easy adaptation and building upon this work.
πββοΈ Contributing
Contributions are welcome! To contribute, create a new issue or pull request for bug fixes, enhancements, or new features. All contributions should adhere to the project's coding standards and guidelines.
Built with β€οΈ by [SAMIULLAH]
π Support
For support or inquiries, please contact [email protected].
Model tree for SAMI156/AI-Image-Sticker-Generator
Base model
google/deeplabv3_mobilenet_v2_1.0_513