This repository contains scripts that were used for data processing, model training, as well as for implementation into a web service.
colorizer folder contains scripts for image colorization inference. It uses pretrained iColoriT model, you can find it here. Also there is an example of how to use this model.
eraser folder contains scripts for text erasing. It uses two pretrained model: DBNet++ for text detection and LaMa for object deletion. You can use them separately or in tandem, achieving auto text erasing. Also there is an example of how to use this model.
DBNet++ model is loaded automatically using mmocr framework.
pip install -r requirements.txt
mim install mmengine
mim install 'mmcv>=2.0.0rc1'
mim install 'mmdet>=3.0.0rc0'
git clone https://github.com/open-mmlab/mmocr.git
cd mmocr
pip install -e .LaMa model weights can be found here.
styler folder contains scripts for applying different styles to an image. It uses ControlNet with the Canny algorithm for edge detection.
ControlNet with Stable Diffusion model is loaded automatically using diffusers framework.
data_processing folder contains scripts for captioning collected dataset and for processing survey results. You can find more information in the corresponding notebooks.
lora folder contains sripts for Stable Diffusion fine-tuning using LoRa method. It contains two different implementations with LoRa and LoHa (LoRA with Hadamard Product representation). You can find more information in the corresponding notebooks.