Awesome
FICE: Text-Conditioned Fashion Image Editing with Guided GAN Inversion (arXiv)
<img src=imgs/paper/example.png width="1000">
Installation
cat requirements.txt | xargs -n 1 -L 1 pip install
Download Models
./download.sh
Example Usage (Inference)
python main.py --input_dir imgs/input --description "long sleeve silk crepe de chine shirt featuring graphic pattern printed in tones of blue"
The --input_dir
argument specifies directory of images (256x256 resolution) to be edited.
(New) Intructions on Training With Other Datasets
- Train the GAN model using the StyleGAN2 repository
- Convert the best .pkl file (lowest FID score) to .pt file with provided script in
scripts/pkl2pt
directory. Themain.py
in this directory has to be run from this directory! You can simply place a .pkl file in thetarget
directory and the result will be placed in theresult
directory. - Run the E4e training from
misc_scripts/E4e
directory. This is only a slight modification of the original E4e repository, where most edits happen inmodels/psp.py
file to enable the proper GAN code. Make sure to edit thescripts/train.py
file with your custom arguments. - (optional) Depending on the dataset and your purpose you might need to train a segmentation model that supports lower body regions as well. The training procedure follows common segmentation training regimes and should be easy to perform. Nevertheless, finding a good dataset for such segmentation training could be a problem!
Code Acknowledgements
Sponsor Acknowledgements
Supported in parts by the Slovenian Research Agency ARRS through the Research Programme P2-0250(B) Metrology and Biometric System, the ARRS Project J2-2501(A) DeepBeauty and the ARRS junior researcher program.
<img src=imgs/ARRSLogo.png width="400">