• Stars
    star
    178
  • Rank 214,989 (Top 5 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created almost 4 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Repository for "Generating images from caption and vice versa via CLIP-Guided Generative Latent Space Search"

CLIP-GLaSS

Repository for the paper Generating images from caption and vice versa via CLIP-Guided Generative Latent Space Search

An in-browser demo is available here

Installation

Clone this repository

git clone https://github.com/galatolofederico/clip-glass && cd clip-glass

Create a virtual environment and install the requirements

virtualenv --python=python3.6 env && . ./env/bin/activate
pip install -r requirements.txt

Run CLIP-GLaSS

You can run CLIP-GLaSS with:

python run.py --config <config> --target <target>

Specifying <config> and <target> according to the following table:

Config Meaning Target Type
GPT2 Use GPT2 to solve the Image-to-Text task Image
DeepMindBigGAN512 Use DeepMind's BigGAN 512x512 to solve the Text-to-Image task Text
DeepMindBigGAN256 Use DeepMind's BigGAN 256x256 to solve the Text-to-Image task Text
StyleGAN2_ffhq_d Use StyleGAN2-ffhq to solve the Text-to-Image task Text
StyleGAN2_ffhq_nod Use StyleGAN2-ffhq without Discriminator to solve the Text-to-Image task Text
StyleGAN2_church_d Use StyleGAN2-church to solve the Text-to-Image task Text
StyleGAN2_church_nod Use StyleGAN2-church without Discriminator to solve the Text-to-Image task Text
StyleGAN2_car_d Use StyleGAN2-car to solve the Text-to-Image task Text
StyleGAN2_car_nod Use StyleGAN2-car without Discriminator to solve the Text-to-Image task Text

If you do not have downloaded the models weights you will be prompted to run ./download-weights.sh You will find the results in the folder ./tmp, a different output folder can be specified with --tmp-folder

Examples

python run.py --config StyleGAN2_ffhq_d --target "the face of a man with brown eyes and stubble beard"
python run.py --config GPT2 --target gpt2_images/dog.jpeg

Acknowledgments and licensing

This work heavily relies on the following amazing repositories and would have not been possible without them:

All their work can be shared under the terms of the respective original licenses.

All my original work (everything except the content of the folders clip, stylegan2 and gpt2) is released under the terms of the GNU/GPLv3 license. Copying, adapting and republishing it is not only consent but also encouraged.

Citing

If you want to cite use you can use this BibTeX

@article{generating2021,
    author={Federico Galatolo. and  Mario Cimino. and  Gigliola Vaglini},
    title={Generating Images from Caption and Vice Versa via CLIP-Guided Generative Latent Space Search},
    journal={Proceedings of the International Conference on Image Processing and Vision Engineering},
    year={2021},
    volume={},
    pages={},
    publisher={SCITEPRESS - Science and Technology Publications},
    doi={10.5220/0010503701660174},
    issn={},
}

Contacts

For any further question feel free to reach me at [email protected] or on Telegram @galatolo

More Repositories

1

microchain

function calling-based LLM agents
Python
264
star
2

manim-presentation

Tool for live presentations using manim
Python
161
star
3

pytorch-balanced-batch

A pytorch dataset sampler for always sampling balanced batches.
Python
110
star
4

cerbero-7b

Cerbero-7b is the first 100% Free and Open Source Italian Large Language Model (LLM) ready to be used for research or commercial applications.
36
star
5

pso

Pretty Straightforward Opener
Shell
18
star
6

easyopt

zero-code hyperparameters optimization framework
Python
12
star
7

rcnn-opencv-live-webcam-background-removal

Real time webcam background removal with Mask R-CNN and OpenCV
Python
11
star
8

cogsima2022

Repository for the paper Enhancing Land Subsidence Awareness via InSAR Data and Deep Transformers
Python
9
star
9

cidl2324

Jupyter Notebook
9
star
10

scamminator

Telegram Client and Bot that use Artificial Intelligence to auto-reply to scammers and waste their time
Python
8
star
11

benchita

High quality few-shots benchmarks for Italian LLMs.
Python
8
star
12

torchsm

Pytorch implementation of the Stigmergic Memory (ICPRAM 2019)
Python
6
star
13

deep-salvini

Codice sorgente di deepsalvini.club
Python
5
star
14

isaac-framework

High-level optimization framework
Python
3
star
15

torchsnn

pytorch implementation of the Stigmergic Neural Networks (MIKE2018)
Python
3
star
16

oral-lesions-detection

Python
3
star
17

icpram2019

Python
2
star
18

personal-website-angular

Repository for https://galatolo.me
TypeScript
2
star
19

mike2018

Python
2
star
20

text-generation-api

Python
2
star
21

me.json

Myself as a JSON document
JavaScript
2
star
22

mesh-neural-networks

Python implementation of the Mesh Neural Networks
Python
2
star
23

roq

RPC over MQTT in Python
Python
2
star
24

dwm

Fork of https://git.suckless.org/dwm/
C
2
star
25

sacred-retrieve

Retrieve and process results from sacred mongodb database
Python
2
star
26

a2c-te-nog

Repository for "Solving the scalarization issues of Advantage-based Reinforcement Learning Algorithms"
Python
2
star
27

ci-cd-sse

Repository for a lecture about CI/CD
Python
1
star
28

mlpi-citation-page

JavaScript
1
star
29

stigmergic-autoencoder

Python
1
star
30

slope

A very light and customizable objective processor emulator
C++
1
star
31

dii-presentation-latex

Beamer template for the Department of Information Engineering of the University of Pisa.
TeX
1
star
32

plotszoo

Python
1
star
33

yadepage

Yet Another Deterministic Password Generator
JavaScript
1
star
34

ml-theory-and-frameworks

Slides and examples for "Machine Learning Theory and Frameworks" lecture
1
star
35

tetim-eval

1
star
36

workshop-2018

Repository per i seminari 2018 del corso di Programmazione Avanzata
JavaScript
1
star
37

dotfiles

Home of my dotfiles
Shell
1
star
38

icpram2019-presentation

Beamer + Tikz Presentation for ICPRAM2019
TeX
1
star
39

oral2

Python
1
star
40

three-sided-coin

A javascript simulator for the three sided coin experiment proposed by Matt Parker
JavaScript
1
star
41

torre-transformer

Python
1
star
42

git-very-informal-introduction

LaTeX sources for the "A very informal introduction to Git" presentation
TeX
1
star
43

shieldsweep

Go
1
star