Updated the Readme.md file
Browse files- README.md +51 -31
- output/check.png +0 -0
- output/check3.png +0 -0
- output/check5.png +0 -0
README.md
CHANGED
@@ -1,53 +1,73 @@
|
|
1 |
-
# πΌοΈ
|
2 |
-
Welcome to the Image Sticker Generator API! This service is designed to transform images into "stickers" by isolating the main object with advanced semantic segmentation. The stickers are crafted with smooth, feathered edges to ensure a clean and professional appearance.
|
3 |
|
|
|
4 |
|
5 |
-
## Examples
|
6 |
|
7 |
-
|
8 |
-
![Example2](output/sticker_check.png)
|
9 |
-
![Example3](output/sticker_check5.png)
|
10 |
|
|
|
|
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
### π Feathered Edges: Applies a soft Gaussian blur to mask edges, creating a natural transition to transparency.
|
15 |
-
### β‘ Built with FastAPI: Ensures high performance, scalability, and rapid response times for production use.
|
16 |
-
### π Versatile Image Support: Accepts both PNG and JPEG image formats.
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
## π οΈ API Endpoints
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
|
|
|
|
29 |
## 𧩠How It Works
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
34 |
## π Directory Structure
|
35 |
-
|
|
|
36 |
|
37 |
## βοΈ Configuration
|
38 |
-
|
|
|
39 |
|
40 |
## π License
|
41 |
-
|
|
|
42 |
|
43 |
## πββοΈ Contributing
|
|
|
44 |
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.
|
45 |
|
46 |
## Built with β€οΈ by [SAMIULLAH]
|
47 |
|
48 |
## π Support
|
49 |
-
For support or inquiries, please contact nicesami156@gmail.com.
|
50 |
|
51 |
-
|
52 |
-
license: mit
|
53 |
-
---
|
|
|
1 |
+
# πΌοΈ AI Sticker Generator API
|
|
|
2 |
|
3 |
+
## 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.
|
4 |
|
5 |
+
## Examples
|
6 |
|
7 |
+
### Before and After Transformation
|
|
|
|
|
8 |
|
9 |
+
- **Before:** ![Before](output/check3.png)
|
10 |
+
**After:** ![After](output/sticker_check3.png)
|
11 |
|
12 |
+
- **Before:** ![Before](output/check.png)
|
13 |
+
**After:** ![After](output/sticker_check.png)
|
|
|
|
|
|
|
14 |
|
15 |
+
- **Before:** ![Before](output/check5.png)
|
16 |
+
**After:** ![After](output/sticker_check5.png)
|
17 |
+
|
18 |
+
## π Key Features
|
19 |
+
|
20 |
+
### π Semantic Segmentation
|
21 |
+
Automatically identifies and isolates the main subject in an image, providing precise cutouts for clear and visually appealing stickers.
|
22 |
+
|
23 |
+
### π Feathered Edges
|
24 |
+
Applies a Gaussian blur to the mask edges, creating a soft and natural transition to transparency for a more polished finish.
|
25 |
+
|
26 |
+
### β‘ Built with FastAPI
|
27 |
+
Utilizes FastAPI for high performance, scalability, and fast response times suitable for production environments.
|
28 |
+
|
29 |
+
### π Versatile Image Support
|
30 |
+
Supports **PNG** and **JPEG** formats, ensuring compatibility with widely used image types.
|
31 |
+
|
32 |
+
## π Quick Start Guide
|
33 |
+
|
34 |
+
1. **Clone the repository** and navigate to the project directory.
|
35 |
+
2. **Install dependencies** (requires Python 3.8+).
|
36 |
+
3. **Start the API server** using the provided configuration file.
|
37 |
+
4. Once the server is running, the API is accessible locally, ready to accept image uploads for sticker generation.
|
38 |
|
39 |
## π οΈ API Endpoints
|
40 |
+
|
41 |
+
### `POST /create_sticker/`
|
42 |
+
- **Description**: Upload an image to generate a sticker with a transparent background.
|
43 |
+
- **Supported File Types**: PNG and JPEG formats.
|
44 |
+
- **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.
|
45 |
+
|
46 |
## 𧩠How It Works
|
47 |
+
|
48 |
+
1. **Model & Preprocessing**: Uploaded images are preprocessed and passed through a pre-trained model for semantic segmentation.
|
49 |
+
2. **Mask Generation**: A binary mask isolates the main object in the image.
|
50 |
+
3. **Edge Feathering**: A Gaussian blur is applied to mask edges, creating a smooth transition.
|
51 |
+
4. **Sticker Creation**: The mask adds transparency, producing an image that can be directly used as a sticker.
|
52 |
+
|
53 |
## π Directory Structure
|
54 |
+
|
55 |
+
Generated stickers are saved in a designated output directory, ensuring easy access and organization of created stickers.
|
56 |
|
57 |
## βοΈ Configuration
|
58 |
+
|
59 |
+
Before running the application, confirm that the output directory exists. This directory is essential for storing generated stickers for easy retrieval and management.
|
60 |
|
61 |
## π License
|
62 |
+
|
63 |
+
Licensed under the MIT License, allowing easy adaptation and building upon this work.
|
64 |
|
65 |
## πββοΈ Contributing
|
66 |
+
|
67 |
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.
|
68 |
|
69 |
## Built with β€οΈ by [SAMIULLAH]
|
70 |
|
71 |
## π Support
|
|
|
72 |
|
73 |
+
For support or inquiries, please contact nicesami156@gmail.com.
|
|
|
|
output/check.png
ADDED
output/check3.png
ADDED
output/check5.png
ADDED