Overview This project provides a user-friendly GUI application for removing backgrounds from images and applying various adjustments like hue, contrast, brightness, shadows, and highlights. The application uses the rembg
library for background removal and includes post-processing to refine the edges, ensuring high-quality output.
- Background Removal: Remove backgrounds from images using the state-of-the-art
rembg
library. - Adjustments: Fine-tune images with sliders for: - Hue - Contrast - Brightness - Shadows (Blacks)
- Highlights (Whites) - Edge Refinement: Post-process images to smooth edges and eliminate artifacts.
- Save Functionality: Save the adjusted and refined images with transparency preserved. ## Requirements
- Python 3.6+ - PyQt5 - rembg - pillow - opencv-python-headless
-
Clone the Repository:
git clone https://github.com/Ameer-Jamal/RemoveImageBG.git
cd RemoveImageBG
-
Install Dependencies:
pip install -r requirements.txt
-
Run the Application:
python main.py
-
Using the GUI:
- Select Image: Click the "Select Image" button to choose an image file.
- Adjust Sliders: Use the sliders to adjust hue, contrast, brightness, shadows, and highlights.
- Save Image: Click the "Save Edited File" button to save the processed image.
The application includes a post-processing step to refine the edges of the processed images. This is achieved by applying a Gaussian blur to the alpha channel, smoothing the edges and eliminating artifacts.
- main.py: Main application code including GUI and image processing functions.
- postProcessing.py: Module for edge refinement (integrated within
main.py
).
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Commit your changes (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature
). - Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.