Spaces:
Sleeping
A newer version of the Gradio SDK is available: 6.20.0
title: Image Cleanup
emoji: π§βπ¬
colorFrom: pink
colorTo: yellow
sdk: gradio
sdk_version: 6.19.0
python_version: '3.10'
app_file: app.py
pinned: false
Image cleanup
Script for removing dark, low-saturation debris from IHC images with OpenCV inpainting.
uv sync
uv run python main.py data/example.png
PNG, JPEG, TIFF, and TIF inputs are supported. Cleaned images are written to
out/cleaned/ with _cleaned added before the original extension, and masks
are written to out/masks/ as PNG files.
An optional Gradio interface is also available:
uv run python app.py
Open the local URL printed in the terminal, upload an input image, and select Clean image. TIFF inputs are converted to PNG previews in the interface, and the cleaned file can be downloaded with the original extension.
For batch processing, open the Image directory tab and select a folder.
The app processes all uploaded images, including .tif and .tiff files, and
returns a ZIP archive.
Project layout:
main.pyβ primary image-cleaning scriptcleaning.pyβ reusable cleaning operationsapp.pyβ optional Gradio interfacedata/β source and example imagesout/β generated cleaned images and maskstest.ipynbβ image-cleaning experiments