Instructions to use yangtzentg/LNSU with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use yangtzentg/LNSU with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://yangtzentg/LNSU") - Notebooks
- Google Colab
- Kaggle
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
CS231-FER Weights
Pretrained checkpoints for the CS231 – Facial Expression Recognition Benchmark project.
Project Structure
CS231/
├── dataset/
│ ├── RAF/
│ └── list_patition_label.txt
│
├── methods/
│ ├── Advanced-FER-CNN/
│ ├── EfficientNetV2-S/
│ ├── hybrid-vit/
│ ├── LNSU/
│ └── ResNet18-Discriminative-loss/
└── README.md
Available Checkpoints
1. Advanced-FER-CNN
Files
best_cnn_model.h5
best_CNNModel.keras
Destination
Place either checkpoint inside:
methods/Advanced-FER-CNN/
├── best_cnn_model.h5
└── best_CNNModel.keras
2. EfficientNetV2-S
Files
best_checkpoint.pth
best_EfficientNetV2_RAFDB_rafdb.pth
Destination
methods/EfficientNetV2-S/
├── best_checkpoint.pth
└── best_EfficientNetV2_RAFDB_rafdb.pth
3. Hybrid Vision Transformer (Hybrid-ViT)
File
best_model.pth
Destination
methods/hybrid-vit/
└── best_model.pth
4. LNSU
Files
start_0.pt
checkpoint_step_59999_gpu_0.pt
Destination
methods/LNSU/
├── start_0.pt
└── results/
└── checkpoint_step_59999_gpu_0.pt
Notes
start_0.pt is the initialization checkpoint required by the training pipeline.
Training script:
cd methods/LNSU
./train_exp.sh
DAN (ResNet18 + Discriminative Loss)
Required Backbone
resnet18_msceleb.pth
Place into:
methods/ResNet18-Discriminative-loss/models/
Experimental Notebook
MLP_Affinity_RAF_DB_Training.ipynb
The notebook reproduces all DAN experiments on RAF-DB.
Available Checkpoints
rafdb_resnet18_mlp_pretrained_ce_affinity.pth
rafdb_resnet18_mlp_pretrained_ce.pth
rafdb_resnet18_mlp_random_ce_affinity.pth
rafdb_resnet18_mlp_random_ce.pth
Placement
methods/ResNet18-Discriminative-loss/
├── rafdb_resnet18_mlp_pretrained_ce_affinity.pth
├── rafdb_resnet18_mlp_pretrained_ce.pth
├── rafdb_resnet18_mlp_random_ce_affinity.pth
└── rafdb_resnet18_mlp_random_ce.pth
Dataset
This repository does not redistribute RAF-DB.
Please obtain RAF-DB from the official source and place it in:
dataset/
├── RAF/
│ ├── train_00001.jpg
│ ├── train_00002.jpg
│ └── ...
└── list_patition_label.txt
Benchmark Methods
The benchmark includes:
- Advanced-FER-CNN
- EfficientNetV2-S
- Hybrid Vision Transformer (Hybrid-ViT)
- LNSU
- DAN (ResNet18 + Discriminative Loss)
All methods are evaluated on RAF-DB using a unified project structure.
- Downloads last month
- 3
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support