Views
No views yet
| File | Description | Test acc | Mean-class | Backbone |
|---|---|---|---|---|
mek_resnet18_rafdb_msceleb_best.pth | RAF-DB - MEK ResNet-18 - MS-Celeb-1M backbone (headline best, verified) | 0.8641 | 0.8137 | MS-Celeb-1M |
mek_resnet18_rafdb_imagenet_best.pth | RAF-DB - MEK ResNet-18 - ImageNet backbone | 0.8585 | 0.7910 | ImageNet |
mek_resnet34_rafdb_imagenet_best.pth | RAF-DB - MEK ResNet-34 - ImageNet backbone (best overall acc) | 0.8657 | 0.7892 | ImageNet |
mek_resnet34_fer2013_imagenet_best.pth | FER-2013 - MEK ResNet-34 - ImageNet backbone (best FER, verified) | 0.7205 | 0.6960 | ImageNet |
mek_resnet18_fer2013_imagenet_best.pth | FER-2013 - MEK ResNet-18 - ImageNet backbone | 0.7081 | 0.6928 | ImageNet |
mek_webcam_resnet18_rafdb_clahe_facecrop_best.pth | RAF-DB - webcam-robust MEK ResNet-18 - MS-Celeb-1M + EMA + face-crop/CLAHE (demo.py) | 0.8625 | 0.8083 | MS-Celeb-1M |
MEKResNet state_dicts (7 classes, 224x224 input). The rafdb_msceleb
and fer_rn34 checkpoints are end-to-end verified: re-running them reproduces the
reported overall / mean-class / per-class accuracy to four decimals.1import torch
2from huggingface_hub import hf_hub_download
3from mek.model import MEKResNet # from the project repo
4
5path = hf_hub_download("ToiTenBao/fer-mek-checkpoints", "mek_resnet18_rafdb_msceleb_best.pth")
6model = MEKResNet("resnet18", num_classes=7, pretrained=False)
7model.load_state_dict(torch.load(path, map_location="cpu", weights_only=True))
8model.eval()
9logits, attn = model(images) # images: [B,3,224,224], ImageNet-normalised0=surprise 1=fear 2=disgust 3=happy 4=sad
5=angry 6=neutral (folders 1..7 sorted as strings). FER-2013 classes are the folder
names in alphabetical order: angry, disgust, fear, happy, neutral, sad, surprise.