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.rarin theManually_Annotatedfolder and the corresponding label fileManually_Annotated_file_lists.zip). - Place this tool in the root directory of the AffectNet dataset.
- Run the
affectnet_preprocess.pyfile as
python affectnet_preprocess.py- Or you can run the one-click processing script
process.shas:
bash process.shIt 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
trainandtestfolders under the dataset folder, and the eight expressions in it are stored in folders0-7. - We also provide file structure reconstruction scripts
reconstruction.shin case an error occurs during processing and needs to be restarted. run with the following code:
bash reconstruction.shIf you have any questions or issues while using this tool, please contact us.