Created guide and script to export embeddings

This commit is contained in:
2023-04-14 14:40:05 +00:00
parent 49ced1983d
commit 1f24df1b8f
6 changed files with 255 additions and 150 deletions

20
README2.md Normal file
View File

@@ -0,0 +1,20 @@
# 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-folder <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 <checkpoint-path> --dataset <path-to-dataset> --output <embeddings-output-file>
```
The command above generates the embeddings for a given dataset and saves them as a csv file.