The provided code is intended to support the exploration of embedding spaces, and multi-modal embedding spaces, especially for language. A summary may be found here, and the full document may be found here.
The dataset and pretrained models are available for download.
This code is written in python 3.7.0, and uses PyTorch 0.4.1.
- Install the python dependencies
pip install -r requirements.txt
. - Download the dataset, and unzip.
- Unzip images_single.zip.
- Set the
path_dataset
variable in thepath_manager.py.example
file. - Raname
path_manager.py.example
topath_manager.py
.
To train and evalute these pose-aware embeddings:
- Run the desired model
experiments/*/train.py
script. - Once complete, run
experiments/*/embed.py
. - Once complete, run the desired evaluation script in
experiments/*/eval/
.
To train and evaluate the language mode:
- Run the
experiments/language/train.py
. - Once complete, run
experiments/language/embed.py
. - Once complete, run the desired evaluation script in
experiments/language/eval/
.
To produce and evaluate the conditional posebytes:
- Run the
experiments/language_conditional/generate_single_question_posebyte.py
. - Once complete, run
experiments/language_conditional/embed.py
. - Once complete, run the desired evaluation script in
experiments/language_conditional/eval/
.
To train and evaluate the conditional masks:
- Run the
experiments/language_masks/train.py
. - Once complete, run the desired evaluation script in
experiments/language_masks/eval/
.
Evaluating the pose-aware embeddings:
- Copy the desired
precomputed_embeddings/image/*/embedding_0.py
to the correspondingexperiments/image/*/embeddings
folder. - Run the desired evaulation located in the respective eval folder.
Evaluating the language mode:
- Copy the
precomputed_embeddings/language/embedding_valtest_0.py
to the correspondingexperiments/language
embeddings folder. - Run the desired evaulation located in the respective eval folder.
Evaluating the conditional posebytes:
- Copy the
precomputed_embeddings/language_conditional/embedding_conditional.py
to the correspondingexperiments/language_conditional/
embeddings folder. - Run the desired evaulation located in the respective eval folder.
Evaluating the pose-aware masks:
- Copy the contents of
precomputed_masks/
to the correspondingexperiments/language_mask/masks/
folder. - Run the desired evaulation located in the respective eval folder.