Downloads Β· 30 days
43
1% of all-time downloads
chaubeyG/FaceLLaVA
FaceLLaVA is a machine learning model from chaubeyG. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as other.
<div align="center" <img src="./facellavalogo.png" width="300"
Downloads Β· 30 days
43
1% of all-time downloads
All-time downloads
3.8K
Public
Repo size
30.2 GB
Likes
3
Public
Click a slice to open those files.
.bin15.1 GB Β· 100%
From the Hugging Face model README
This is the official released weights of of the WACV 2026 Round 1 Early Accept paper (6.4% acceptance rate) - Face-LLaVA: Facial Expression and Attribute Understanding through Instruction Tuning. Please refer to the official github repository for instructions to run inference.
The human face plays a central role in social communication, necessitating the use of performant computer vision tools for human-centered applications. We propose Face-LLaVA, a multimodal large language model for face-centered, in-context learning, including facial expression and attribute recognition. Additionally, Face-LLaVA is able to generate natural language descriptions that can be used for reasoning. Leveraging existing visual databases, we first developed FaceInstruct-1M, a face-centered database for instruction tuning MLLMs for face processing. We then developed a novel face-specific visual encoder powered by Face-Region Guided Cross-Attention that integrates face geometry with local visual features. We evaluated the proposed method across nine different datasets and five different face processing tasks, including facial expression recognition, action unit detection, facial attribute detection, age estimation and deepfake detection. Face-LLaVA achieves superior results compared to existing open-source MLLMs and competitive performance compared to commercial solutions. Our model output also receives a higher reasoning rating by GPT under a zero-shot setting across all the tasks. Both our dataset and model wil be released at this https URL to support future advancements in social AI and foundational vision-language research.
βββ cache_dir/ # will automatically be created to download LanguageBind image and video models from huggingface
βββ checkpoints/ # create a new folder by this name
βββ facellava/ # Main source code
βββ scripts/ # Training scripts for FaceLLaVA
Clone the repository
git clone https://github.com/ac-alpha/face-llava.git
cd Face-LLaVA
Create a virtual environment (recommended)
conda create -n facellava python=3.10 -y
conda activate facellava
Install torch
pip install torch==2.5.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
<details>
<summary>Potential issues</summary>
Install in editable mode for development:
pip install -e .
pip install -e ".[train]" ## if you want to train your own model
Install other libraries:
pip install flash-attn --no-build-isolation ## recommended but not required
pip install decord opencv-python git+https://github.com/facebookresearch/pytorchvideo.git@28fe037d212663c6a24f373b94cc5d478c8c1a1d
Download the model weights from huggingface inside checkpoints/ folder so that the structure becomes - ./checkpoints/FaceLLaVA.
Crop the input image/video using tools/crop_face.py before further processing.
Use the following command to crop an image
python crop_face.py \
--mode image \
--image_path "/path/to/input.jpg" \
--output_image_path "/path/to/output_cropped.jpg"
Use the following command to crop a video
python crop_face.py \
--mode video \
--video_path "/path/to/input/video.mp4" \
--output_video_path "/path/to/output/cropped_video.mp4" \
--temp_dir "/path/to/temp"
Run the following command for inference.
CUDA_VISIBLE_DEVICES=0 python inference.py --model_path="./checkpoints/FaceLLaVA" \
--file_path="./assets/demo_inputs/face_attr_example_1.png" --prompt="What are the facial attributes in the given image?"
Currently the following face perception tasks are supported along with the best modality suited for that task - Emotion(Video), Age(Image), Facial Attributes(Image), Facial Action Units(Image)
A list of prompts that work well for different tasks is present in ./assets/good_prompts.
This codebase is distributed under the USC Research license. See LICENSE.rst for more details.
This codebase builds upon the following excellent works: VideoLLaVA, LLaVA and LLaVA-Next. We gratefully acknowledge their contributions to the open-source community.
@article{chaubey2025face,
title={Face-LLaVA: Facial Expression and Attribute Understanding through Instruction Tuning},
author={Chaubey, Ashutosh and Guan, Xulang and Soleymani, Mohammad},
journal={arXiv preprint arXiv:2504.07198},
year={2025}
}