GitHub - lixinustc/Enhance-Anything: Enhance and restore any things continuously with Segment Anything (original) (raw)
Purpose: We aim to achieve a unfied intellignet image/video PS/enhancement framework. More functions will be developed.
Brief intro for current function: Enhance and restore anything continuously with Segment Anything Model for image processing (The initial version is achieved with CResMD, and it will be extended in future).
🌟 Enhance Anything Features
- Continuously Enhance Anything by a simple click
- Assist Colorizing Anything
- Assist multiple distortion types
- Assist multiple enhancement types
- Technique Analysis - Arxiv Version
- Demo
- Improving generalization capability
Visual Examples
Enhance zebra continuously
Enhance dog and chair continuously
Enhance dog continuously
Enhance butterfly continuously
Usages
Please download the weights for segment-anything, and move it to ./pretrained_weights. Then you can run the code with:
python enhance_anything_continusly.py --input_img ./examples/0006.png --point_coords 200 300 --point_labels 1 --dilate_kernel_size 30 --output_dir ./results --sam_model_type "vit_h" --sam_ckpt ./pretrained_models/sam_vit_h_4b8939.pth --opt ./CResMD/options/test/modulation_CResMD.yml
The results are shown in ./results_continuous/.
Environment
conda create -n seganything python python -m pip install torch torchvision torchaudio python -m pip install -e segment_anything python -m pip install lmdb