WavePaint
Wavelet-based Image InPainting Model
Install / Use
/learn @pranavphoenix/WavePaintREADME
WavePaint
Resource-efficient Token-mixer for Self-supervised Inpainting
[arXiv]
Thick Mask
Medium Mask
Thin Mask
Model Architecture
Training using train.py
Change the path to input directory containing images. Set the output image size as required. Modify the model parameters and training configurations. Use can use either medium or thick masks.
python train.py -batch <batch-size> -mask <mask-size>
Running Inference using infer.py
Provide the path to save model pth file, folder containing validation images ground truth and masks, folder to which model outputs to be saved, folder to which masked images to be saved
python infer.py
Calculating performance metrics using evaluate.py
Provide the path to save model pth file, folder containing validation images ground truth and masks, folder to which model outputs to be saved, folder to which masked images to be saved
python evaluate.py <path/to/Ground/truth/images> <path/to/model/output> <path/to/save/metrics.csv>
As its written now, the code expects a folder structure in the form:
workspace/
├── train.py
├── config.py
├── datasets.py
├── evaluate.py
├── infer.py
├── masks.py
├── model.py
├── scores.py
├── celebhq/
│ ├── train_256/
│ │ ├── 0.jpg
│ │ └── 1.jpg ...
│ └── val_256/
│ ├── random_medium_256/
│ │ ├── 0.png
│ │ └── 0_mask000.png ...
│ ├── random_thick_256/
│ │ ├── 0.png
│ │ └── 0_mask000.png ...
│ ── random_thin_256/
│ ├── 0.png
│ └── 0_mask000.png ...
├── generated_images/
│ ├── image1.png
│ └── image2.png...
├── metrics/
│ ├── alex.pth
│ ├── squeeze.pth
│ ├── vgg.pth
│ └── metrics.csv
└── output/
├── masked/
│ ├── img1.png
│ └── img2.png ...
└── output/
├── img1.png
└── img2.png...
We have used LaMa training and inference codes for our experiments from https://github.com/advimman/lama The scripts to generate various masks for validation set is also available there.
Citation
If you found this code helpful, please consider citing:
@misc{jeevan2023wavepaint,
title={WavePaint: Resource-efficient Token-mixer for Self-supervised Inpainting},
author={Pranav Jeevan and Dharshan Sampath Kumar and Amit Sethi},
year={2023},
eprint={2307.00407},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
Related Skills
docs-writer
99.2k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
337.4kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
ddd
Guía de Principios DDD para el Proyecto > 📚 Documento Complementario : Este documento define los principios y reglas de DDD. Para ver templates de código, ejemplos detallados y guías paso
arscontexta
2.9kClaude Code plugin that generates individualized knowledge systems from conversation. You describe how you think and work, have a conversation and get a complete second brain as markdown files you own.
