EfficientNet-B0 facial-expression classifier
EmotiEffLib EfficientNet-B0 AffectNet checkpoint with seven visible-expression categories.
This repository contains immutable model artifacts used by Facetorch. Use the packaged Facetorch manifest to select a revision and artifact; do not treat mutable main or older unlisted files as a release contract.
Contract
| Field | Value |
|---|---|
| Model ID | fer-efficientnet-b0 |
| Architecture | TF EfficientNet-B0 with average pooling |
| Input | 244 by 244 RGB face crop |
| Output | Seven logits ordered as Anger, Disgust, Fear, Happiness, Neutral, Sadness, Surprise. |
| Dynamic shapes | Batch dimension 1 through 64. |
| Weights license | Apache-2.0 |
Preprocessing: Resize to 244 by 244 and apply ImageNet mean [0.485, 0.456, 0.406] and standard deviation [0.229, 0.224, 0.225].
Release artifacts
| File | Format | Runtime | Devices | SHA-256 |
|---|---|---|---|---|
model-torch2.6.pt2 |
pt2 | >=2.6, <2.7 | cpu, cuda | 10937b9a9cc544cac440f938e7d706e9ef0321cdc9fc345d61f7b70e6efa27c9 |
model-torch2.11.pt2 |
pt2 | >=2.11, <2.12 | cpu, cuda | eddeb006828d128c2817bad74a6d5ee85775863c8bbff472e03e1bfb14a59dc0 |
model.pt |
torchscript | >=2.6, <2.12 | cpu | 39d8046b1fe3eb06d5edb094307f0cd465a40b7f8886d4b477ca4bbaf7cbb62e |
Facetorch v1 supports the Torch 2.6 and 2.11 cohort files listed in its manifest. The legacy TorchScript object is CPU-only and requires the explicit legacy opt-in. Files from unsupported cohorts are not part of the v1 release contract.
Loading the manifest-selected artifact
import torch
from huggingface_hub import hf_hub_download
from facetorch.artifacts import get_model_manifest
MODEL_ID = "fer-efficientnet-b0"
device = "cuda" if torch.cuda.is_available() else "cpu"
artifact = get_model_manifest().candidates(
MODEL_ID,
torch_version=torch.__version__,
device=device,
allow_legacy_models=False,
)[0]
path = hf_hub_download(
repo_id=artifact.repo_id,
revision=artifact.revision,
filename=artifact.filename,
)
model = torch.export.load(path).module().to(device).eval()
example = torch.randn(1, 3, 244, 244, device=device)
with torch.inference_mode():
output = model(example)
The random tensor above is only a loading smoke test. Use Facetorch's documented preprocessing for meaningful inference.
Provenance
| Upstream | Immutable revision | Role | License |
|---|---|---|---|
| https://github.com/sb-ai-lab/EmotiEffLib | 520a051c64cd191521e5934655314e769a319684 |
checkpoint publisher and architecture source | Apache-2.0 |
| Upstream checkpoint | SHA-256 | Source |
|---|---|---|
models/affectnet_emotions/enet_b0_7.pt |
772abad3fc90333ca3f5d454d20857900cad0a8988d1564d3ec6215673624010 |
publisher location |
Mapping method: exact_tensor_equality_against_historical_author_repository_checkpoint.
Result: 360 of 360 tensors matched exactly.
The repository owner approved the mapping and redistribution record on 2026-08-23. Under the recorded policy, an author-published checkpoint in a permissively licensed repository with no separate checkpoint terms uses that repository license. MIT and Apache-2.0 have not been converted or treated as interchangeable. See LICENSE, THIRD_PARTY_NOTICES.md, and Facetorch's facetorch/models/governance.json.
Papers
Intended use
- Research classification of visible facial-expression categories.
Limitations and responsible use
- Expression labels do not establish emotion, intent, mental state, or truthfulness.
- Performance varies with culture, context, demographic representation, pose, and image quality.
- The checkpoint license does not grant rights to AffectNet or other training datasets.
- The artifact license does not itself license training datasets, input data, or a deployment's processing of personal data.
- Do not use model output as the sole basis for consequential decisions about a person.