The AI-Powered Photo Editor is an advanced image editing tool that integrates state-of-the-art AI models to provide users with powerful editing capabilities. This tool is built using a Gradio interface, making it user-friendly while leveraging cutting-edge techniques like SAM, LaMa, and blended latent diffusion for various image manipulation tasks.
- Object Selection: Utilize the SAM (Segment Anything Model) for precise object selection using point or box prompts.
- Object Removal: Seamlessly remove objects and fill backgrounds using LaMa inpainting.
- Text-Guided Editing: Transform selected objects based on text prompts with blended latent diffusion.
- Custom Area Editing: Draw and select specific areas for targeted modifications.
- SAM (Segment Anything Model): Ensures accurate object segmentation and selection.
- LaMa (Large Mask Inpainting): Provides high-quality inpainting after object removal.
- Blended Latent Diffusion: Facilitates text-guided object transformation and editing.
- Background Removal
- Sticker Creation
These features make the toolkit versatile for various image manipulation tasks, offering both basic and advanced functionalities.
Point.mode.1.mp4
Box.selection.1.mp4
Drag.edit.1.mp4
graph TD
A[User Input] --> B{Input Type}
B -->|Point/Box Prompt| C[SAM Segmentation]
B -->|Custom Drawing| D[Manual Selection]
C --> E{Edit Action}
D --> E
E -->|Remove Object| F[LaMa Inpainting]
E -->|Edit Object| G[Blended Latent Diffusion]
F --> H[Final Image]
G --> H
subgraph "Gradio UI"
A
B
C
D
E
end
subgraph "AI Models"
I[SAM - Segment Anything Model]
J[LaMa - Large Mask Inpainting]
K[Blended Latent Diffusion]
end
C -.-> I
F -.-> J
G -.-> K
Ensure you have Python (>=3.9) and the necessary dependencies installed.
git clone https://github.com/dsgiitr/segmedit.git
Navigate to the project directory and install the required Python packages:
pip install -r requirements.txt
Execute the following command to start the application:
python app.py
This will launch the Gradio interface, where you can interact with the AI-powered photo editor.