py-feat / resmasknet

huggingface.co
Total runs: 6.7K
24-hour runs: 0
7-day runs: 2.5K
30-day runs: 18
Model's Last Updated: September 02 2024
image-feature-extraction

Introduction of resmasknet

Model Details of resmasknet

ResMaskNet

Model Description

resmasknet combines residual masking with unet architecture to predict 7 facial emotion categories from images.

Model Details
  • Model Type : Convolutional Neural Network (CNN)
  • Architecture : Residual masking network with u-network. Output layer classifies 7 emotion categories
  • Input Size : 224x224 pixels
  • Framework : PyTorch
Model Sources
Citation

If you use the svm_au model in your research or application, please cite the following paper:

Pham Luan, The Huynh Vu, and Tuan Anh Tran. "Facial Expression Recognition using Residual Masking Network". In: Proc. ICPR. 2020.

@inproceedings{pham2021facial,
  title={Facial expression recognition using residual masking network},
  author={Pham, Luan and Vu, The Huynh and Tran, Tuan Anh},
  booktitle={2020 25th International Conference on Pattern Recognition (ICPR)},
  pages={4513--4519},
  year={2021},
  organization={IEEE}
}
Acknowledgements

We thank Luan Pham for generously sharing this model with a permissive license.

Example Useage
import numpy as np
import torch
import torch.nn as nn
from feat.emo_detectors.ResMaskNet.resmasknet_test import ResMasking
from huggingface_hub import hf_hub_download

# Load Configs
emotion_config_file = hf_hub_download(repo_id= "py-feat/resmasknet", filename="config.json", cache_dir=get_resource_path())
with open(emotion_config_file, "r") as f:
    emotion_config = json.load(f)

device = 'cpu'
emotion_detector = ResMasking("", in_channels=emotion_config['in_channels'])
emotion_detector.fc = nn.Sequential(nn.Dropout(0.4), nn.Linear(512, emotion_config['num_classes']))
emotion_model_file = hf_hub_download(repo_id='py-feat/resmasknet', filename="ResMaskNet_Z_resmasking_dropout1_rot30.pth")
emotion_checkpoint = torch.load(emotion_model_file, map_location=device)["net"]
emotion_detector.load_state_dict(emotion_checkpoint)
emotion_detector.eval()
emotion_detector.to(device)


# Test model
face_image = "path/to/your/test_image.jpg"  # Replace with your extracted face image that is [224, 224]

# Classification - [angry, disgust, fear, happy, sad, surprise, neutral]
emotions = emotion_detector.forward(face_image)
emotion_probabilities = torch.softmax(emotions, 1)
        

Runs of py-feat resmasknet on huggingface.co

6.7K
Total runs
0
24-hour runs
924
3-day runs
2.5K
7-day runs
18
30-day runs

More Information About resmasknet huggingface.co Model

More resmasknet license Visit here:

https://choosealicense.com/licenses/mit

resmasknet huggingface.co

resmasknet huggingface.co is an AI model on huggingface.co that provides resmasknet's model effect (), which can be used instantly with this py-feat resmasknet model. huggingface.co supports a free trial of the resmasknet model, and also provides paid use of the resmasknet. Support call resmasknet model through api, including Node.js, Python, http.

resmasknet huggingface.co Url

https://huggingface.co/py-feat/resmasknet

py-feat resmasknet online free

resmasknet huggingface.co is an online trial and call api platform, which integrates resmasknet's modeling effects, including api services, and provides a free online trial of resmasknet, you can try resmasknet online for free by clicking the link below.

py-feat resmasknet online free url in huggingface.co:

https://huggingface.co/py-feat/resmasknet

resmasknet install

resmasknet is an open source model from GitHub that offers a free installation service, and any user can find resmasknet on GitHub to install. At the same time, huggingface.co provides the effect of resmasknet install, users can directly use resmasknet installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

resmasknet install url in huggingface.co:

https://huggingface.co/py-feat/resmasknet

Url of resmasknet

resmasknet huggingface.co Url

Provider of resmasknet huggingface.co

py-feat
ORGANIZATIONS

Other API from py-feat

huggingface.co

Total runs: 2.0K
Run Growth: -1.8K
Growth Rate: -92.75%
Updated:September 02 2024
huggingface.co

Total runs: 72
Run Growth: 45
Growth Rate: 61.64%
Updated:September 02 2024
huggingface.co

Total runs: 6
Run Growth: 4
Growth Rate: 66.67%
Updated:September 02 2024
huggingface.co

Total runs: 2
Run Growth: 1
Growth Rate: 50.00%
Updated:September 02 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:August 01 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:May 07 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:July 30 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:May 02 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:August 01 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:September 02 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:September 02 2024
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:May 02 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:June 27 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:May 07 2026