Skip to content

ababiyaworku/GPT4o-Image-YellowTint-Cleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPT4o-Image-YellowTint-remover

A simple & powerful Gradio based webapp to remove yellow tints from an image while preserving the image quality. It uses advanced image processing techniques including channel manipulation, histogram equalization, and color correction to restore natural-looking colors in yellowed images.

Gradio WebApp Sample

Gradio

Best Setting

setting

Before/After Comparison

Before After
Before After
Before After

Setup

  1. Clone this repository:
git clone https://github.com/agxagi/GPT4o-Image-YellowTint-Cleaner.git
cd GPT4o-Image-YellowTint-Cleaner
  1. Install the required dependencies:
pip install -r requirements.txt

Usage

Just run the YellowTint_remover_Gradio.bat file and copy past the URL to your Browser

How It Works

The Yellow Tint Cleaner uses several image processing techniques to restore natural colors:

  1. Channel Normalization: Each color channel is normalized individually to correct color imbalances
  2. Histogram Equalization: Enhances contrast and improves overall image appearance
  3. Color Correction: Fine-tuned adjustments to remove yellow color casts
  4. Image Blending: Smooth integration of corrections with the original image

Customization

You can modify the image processing parameters in the script to adjust the strength of correction:

adjusted_image = auto_adjust(
    input_image,
    strength=100,    # Overall correction strength (0-100)
    brightness=10,   # Brightness adjustment (-100 to 100)
    contrast=15,     # Contrast adjustment (-100 to 100)
    saturation=0,    # Saturation adjustment (-100 to 100)
    red=-5,          # Red channel adjustment (-100 to 100)
    green=-10,       # Green channel adjustment (-100 to 100)
    blue=15,         # Blue channel adjustment (-100 to 100)
    mode='RGB'       # Processing mode
)

For yellowed images, try reducing green and red channels while increasing the blue channel.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Built with PIL/Pillow and NumPy for efficient and effective image restoration
  • Inspired by the need to restore old photographs and scanned documents that have developed yellow tints over time

About

A 1 click Yellow Tint remover for GPT4o images.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published