Skip to content

Repository files navigation

AMNet: Attention-Enhanced Multi-Branch Network for Micro-Expression Recognition

Published in The Visual Computer

This repository contains the implementation of AMNet, an attention-enhanced multi-branch network for micro-expression recognition (MER). AMNet is designed to address the challenges of subtle and short-duration micro-expressions through advanced attention mechanisms, spatiotemporal modeling, and hierarchical feature fusion. The code supports experiments on benchmark datasets including CASME II, SAMM, SMIC, and CAS(ME)³.

This work has been officially published in The Visual Computer:

Liu, S., Huang, Y., Yu, H. et al.
AMNet: an attention-enhanced multi-branch network for micro-expression recognition.
The Visual Computer, 41, 6521–6532 (2025).
https://doi.org/10.1007/s00371-025-03951-4

Repository Structure

The repository includes the following files: CA_block.py: Implements the Improved Multi-Modal Attention (IMMA) mechanism, combining channel, spatial, and diagonal attention to enhance feature extraction. data.py: Handles data preprocessing, including face alignment, resizing, and augmentation for consistent input across datasets. dataset.py: Defines the dataset loading logic (e.g., SAMMDataset) for fetching micro-expression sequences and optical flow features. model.py: Defines the AMNet architecture, integrating optical flow, motion, and spatiotemporal branches with hierarchical fusion. magnet.py: Implements an improved MagNet model for motion representation extraction, enhancing dynamic feature capture. train.py: Contains the training script, including loss function (weighted cross-entropy), optimizer (AdamW), and evaluation metrics (UF1, UAR).

Prerequisites

Python 3.8+ PyTorch 2.0.0+ with CUDA 11.8 (for GPU support) NVIDIA GPU (e.g., RTX 3090 recommended)

About

No description, website, or topics provided.

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages