{"id":23691943,"url":"https://github.com/justin900429/facial-graph-representation-learning","last_synced_at":"2025-07-15T04:15:02.930Z","repository":{"id":47756928,"uuid":"395975697","full_name":"Justin900429/Facial-Graph-Representation-Learning","owner":"Justin900429","description":"PyTorch version for the \"Micro-expression Recognition Based on Facial Graph Representation Learning and Facial Action Unit Fusion\"","archived":false,"fork":false,"pushed_at":"2022-10-11T13:39:38.000Z","size":49,"stargazers_count":26,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-03-05T03:24:31.486Z","etag":null,"topics":["deep-learning","graphconvoltution","microexpressions","paper-implementations","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Justin900429.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-14T10:38:42.000Z","updated_at":"2023-02-10T10:02:29.000Z","dependencies_parsed_at":"2023-01-19T20:47:02.250Z","dependency_job_id":null,"html_url":"https://github.com/Justin900429/Facial-Graph-Representation-Learning","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Justin900429%2FFacial-Graph-Representation-Learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Justin900429%2FFacial-Graph-Representation-Learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Justin900429%2FFacial-Graph-Representation-Learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Justin900429%2FFacial-Graph-Representation-Learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Justin900429","download_url":"https://codeload.github.com/Justin900429/Facial-Graph-Representation-Learning/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231807355,"owners_count":18429521,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","graphconvoltution","microexpressions","paper-implementations","pytorch"],"created_at":"2024-12-30T02:59:36.881Z","updated_at":"2024-12-30T02:59:37.464Z","avatar_url":"https://github.com/Justin900429.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README\n## Introduction\nThe source code was trying to reproduce the paper - \"Micro-expression Recognition Based on Facial Graph Representation Learning and Facial Action Unit Fusion\". [[paper]](https://openaccess.thecvf.com/content/CVPR2021W/AUVi/papers/Lei_Micro-Expression_Recognition_Based_on_Facial_Graph_Representation_Learning_and_Facial_CVPRW_2021_paper.pdf) [[official code]](https://github.com/raying777/FGRMER)\n\n## Installation\n\n### Requirements\n```command\n# Install requirement\n$ pip install -r requirements.txt\n\n# Download landmarks weight for DLIB\n$ mkdir -p dataloader/weight\n$ wget https://github.com/davisking/dlib-models/raw/master/mmod_human_face_detector.dat.bz2 -P dataloader/weight\n$ bzip2 -d dataloader/weight/mmod_human_face_detector.dat.bz2\n$ wget https://github.com/davisking/dlib-models/raw/master/shape_predictor_68_face_landmarks.dat.bz2 -P dataloader/weight\n$ bzip2 -d dataloader/weight/shape_predictor_68_face_landmarks.dat.bz2\n```\n\n### MagNet\nThe structure of MagNet was adapted from [here](https://github.com/ZhengPeng7/motion_magnification_learning-based). Please download the pretrained weight from their release and place in `dataloader/weight/`.\n\n### DLIB with GPU (not necessary)\n```command\n# Remove the cpu version first\n$ pip uninstall dlib\n# Install cudnn and its toolkit\n$ conda install cudnn cudatoolkit\n# Build from source\n$ git clone https://github.com/davisking/dlib.git\n$ cd dlib\n$ mkdir build \u0026 cd build\n$ cmake .. \\\n    -DDLIB_USE_CUDA=1 \\\n    -DUSE_AVX_INSTRUCTIONS=1 \\\n    -DCMAKE_PREFIX_PATH=\u003cpath to  conda env\u003e\\\n    -DCMAKE_C_COMPILER=gcc-6 -DCMAKE_CXX_COMPILER=g++-6\n$ cmake --build .\n$ cd ..\n$ python setup.py install \\\n    --set USE_AVX_INSTRUCTIONS=1 \\\n    --set DLIB_USE_CUDA=1 \\\n    --set CMAKE_PREFIX_PATH=\u003cpath to  conda env\u003e  \\\n    --set CMAKE_C_COMPILER=gcc-6 \\\n    --set CMAKE_CXX_COMPILER=g++-\n```\n\n## Dataset\n* [CASME II](http://fu.psych.ac.cn/CASME/casme2-en.php)\n* [SAMM](https://personalpages.manchester.ac.uk/staff/adrian.davison/SAMM.html)\n\n## Training\n```\nusage: train.py [-h] --csv_path CSV_PATH --image_root IMAGE_ROOT --npz_file\n                NPZ_FILE --catego CATEGO [--num_classes NUM_CLASSES]\n                [--batch_size BATCH_SIZE]\n                [--weight_save_path WEIGHT_SAVE_PATH] [--epochs EPOCHS]\n                [--learning_rate LEARNING_RATE]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --csv_path CSV_PATH   Path for the csv file for training data\n  --image_root IMAGE_ROOT\n                        Root for the training images\n  --npz_file NPZ_FILE   Files root for npz\n  --catego CATEGO       SAMM or CASME dataset\n  --num_classes NUM_CLASSES\n                        Classes to be trained\n  --batch_size BATCH_SIZE\n                        Training batch size\n  --weight_save_path WEIGHT_SAVE_PATH\n                        Path for the saving weight\n  --epochs EPOCHS       Epochs for training the model\n  --learning_rate LEARNING_RATE\n                        Learning rate for training the model\n```\n\n## Citation\n```bibtex\n@InProceedings{Lei_2021_CVPR,\n    author    = {Lei, Ling and Chen, Tong and Li, Shigang and Li, Jianfeng},\n    title     = {Micro-Expression Recognition Based on Facial Graph Representation Learning and Facial Action Unit Fusion},\n    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},\n    month     = {June},\n    year      = {2021},\n    pages     = {1571-1580}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustin900429%2Ffacial-graph-representation-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustin900429%2Ffacial-graph-representation-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustin900429%2Ffacial-graph-representation-learning/lists"}