During my PhD I struggled for finding an end-to-end working pipeline for my emotion recognition project. I was new to deep learning, I didn't have seniors to follow, and the ER community is not as popular/open as others. Then a good soul shared his code and models with me. I was salvaged and survived my PhD. I hope the code and model state here can be helpful for those lost souls.
conda create --name abaw2 pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
pip install tqdm matplotlib scipy pandas
In main.py:
-stamp
argument. When you are going to run the main.py
, you need to carefully name your instance. Name determines the output directory. If two instances have the same name, then the late one will replace the early one and ruin its output.python main.py -resume 0
will start a fresh run, and python main.py -resume 1
with continue an existing instance from the checkpoint.-debug 1
so that only one trial will be loaded for each fold.-emotion
to either arousal
or valence
.-folds_to_run
to 0-6. For example, -folds_to_run 0
runs fold 0. -folds_to_run 0 1 2
runs fold 0, fold 1, and fold 2 in a row.Usually, with all the default settings in main.py
being correctly set, all u need to type in is like below.
python main.py -folds_to_run 0 -emotion "valence" -stamp "cv"
Of course, if you have more machines available, u can run one fold on each machine.
Note that one single fold may take 1-2 days. So the following command may take 5 days to complete:
python main.py -folds_to_run 0 1 2 -emotion "valence" -stamp "cv"
Sometimes, the running is stopped falsely. To continue with the latest epoch, add -resume 1
to the last command you were running like:
python main.py -folds_to_run 0 -emotion "valence" -stamp "cv" -resume 1
The results will be saved in your specified -save_path
, which include: