Skip to content

A Python tool for preprocessing the AffectNet dataset into a structure that can be directly read by Pytorch's ImageFolder method.一个用于预处理AffectNet数据集的Python工具,使其可以直接被Pytorch中的ImageFolder方法读取。

Notifications You must be signed in to change notification settings

ZBigFish/AffectNet-Dataset-Preprocessing-Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English | 简体中文

AffectNet Dataset Preprocessing Tool

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.

How to Use

  • Download and uncompress the AffectNet dataset(For most research, you only need to decompress the image compressed file Manually_Annotated.partX.rar in the Manually_Annotated folder and the corresponding label file Manually_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.

Notes

  • Before running this tool, make sure you have uncompressed the AffectNet dataset.
  • After processing, there should be train and test folders under the dataset folder, and the eight expressions in it are stored in folders 0-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

Contact Us

If you have any questions or issues while using this tool, please contact us.

About

A Python tool for preprocessing the AffectNet dataset into a structure that can be directly read by Pytorch's ImageFolder method.一个用于预处理AffectNet数据集的Python工具,使其可以直接被Pytorch中的ImageFolder方法读取。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published