Skip to content

Commit 433e342

Browse files
authored
Merge pull request #1 from sandracl72/patch-1
Add visualizing the latent space
2 parents 3e3f3b9 + 22bcc5f commit 433e342

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,20 @@ In above example `--syn_data_path` argument indicates path for synthetic images,
161161

162162
To make a diagnosis using trained model use [`predict.py`](predict.py) script.
163163

164+
165+
## Visualizing the latent space
166+
[`embeddings_projector.py`](https://github.com/aidotse/stylegan2-ada-pytorch/blob/main/embeddings_projector.py) performs the two following tasks:
167+
168+
* Project embeddings of a CNN used as feature extractor. (`--use_cnn`)
169+
170+
* Project w-vectors.
171+
172+
This generates a `metadata.tsv`, `tensors.tsv` and (optionally using `--sprite` flag) a sprite of the images. These files can be uploaded in the [Tensorboard Projector](https://www.tensorflow.org/tensorboard/tensorboard_projector_plugin) , which graphically represent these embeddings.
173+
164174
## Measuring authenticity
165175

166-
We additionaly calculated cosine distance between embeddings from tsv file.
167-
For details see [read_tsv.py`](./CNN_embeddings_projector/read_tsv.py).
176+
We additionaly calculated cosine distances between the CNN embeddings from the tsv file.
177+
For details see [`read_tsv.py`](./CNN_embeddings_projector/read_tsv.py).
168178

169179
```.bash
170180
python ./CNN_embeddings_projector/read_tsv.py --metadata=metadata.tsv \

0 commit comments

Comments
 (0)