spoterembedding/README2.md
2023-05-21 20:30:12 +00:00

1.1 KiB

Spoter Embeddings

Creating dataset

First, make a folder where all you're videos are located. When this is done, all keypoints can be extracted from the videos using the following command. This will extract the keypoints and store them in <path-to-landmarks-folder>.

python3 preprocessing.py extract --videos-folder <path-to-videos-folder> --output-landmark <path-to-landmarks-folder>

When this is done, the dataset can be created using the following command:

python3 preprocessing.py create --landmarks-dataset <path-to-landmarks-folder> --videos-folder <path-to-videos-folder> --dataset-folder <dataset-output-folder> (--create-new-split --test-size <test-percentage>)

The above command generates a train (and val) csv file which includes all the extracted keypoints. These can then be used to train or generates embeddings.

Creating Embeddings

The embeddings can be created using the following command:

python3 export_embeddings.py --checkpoint <path-to-checkpoints-file> --dataset <path-to-dataset-file> --output <embeddings-output-file>

The command above generates the embeddings for a given dataset and saves them as a csv file.