English | 简体中文
This Python tool can help you organize the uncompressed AffectNet
dataset into a structure that can be directly read by Pytorch's ImageFolder
method. This tool can help you start using the AffectNet
dataset for deep learning research more quickly.
- Download and uncompress the AffectNet dataset(For most research, you only need to decompress the image compressed file
Manually_Annotated.partX.rar
in theManually_Annotated
folder and the corresponding label fileManually_Annotated_file_lists.zip
). - Place this tool in the root directory of the AffectNet dataset.
- Run the
affectnet_preprocess.py
file as
python affectnet_preprocess.py
- Or you can run the one-click processing script
process.sh
as:
bash process.sh
It will generate a folder AffectNet_class
to store the processed dataset.
- Before running this tool, make sure you have uncompressed the AffectNet dataset.
- After processing, there should be
train
andtest
folders under the dataset folder, and the eight expressions in it are stored in folders0-7
. - We also provide file structure reconstruction scripts
reconstruction.sh
in case an error occurs during processing and needs to be restarted. run with the following code:
bash reconstruction.sh
If you have any questions or issues while using this tool, please contact us.