implementation and weights for facial landmarks in thermal images trained with the dataset described in 'T-FAKE: Synthesizing Thermal Images for Facial Landmarking'.
Project description
Thermal-facial-alignment network (TFAN) trained on the T-FAKE dataset
Using the landmarker
Install and run:
pip install thermal-face-alignment
import cv2
from tfan import ThermalLandmarks
# Read a thermal image (grayscale)
image = cv2.imread("thermal.png", cv2.IMREAD_GRAYSCALE)
# Initialize landmarker (downloads weights on first use)
landmarker = ThermalLandmarks(device="cpu", n_landmarks=478)
landmarks, confidences = landmarker.process(image)
Training dataset
We trained our landmarker on our custom-made T-FAKE dataset consisting of synthetic thermal images. To download the original color images, sparse annotations, and segmentation masks for the dataset, please use the links in the FaceSynthetics repository.
Our dataset has been generated for a warm and for a cold condition. Each dataset can be downloaded separately as
- A small sample with 100 images from here warm and here cold
- A medium sample with 1,000 images from here warm and here cold
- The full dataset with 100,000 images from here warm and here cold
- The dense annotations are available from here
Pre-trained models
The models for the thermalization as well as the landmarkers can be downloaded from here.
License
Our landmarking methods and the training dataset are licensed under the Attribution-NonCommercial-ShareAlike 4.0 International license as it is derived from the FaceSynthetics dataset.
Citation
If you use this code for your own work, please cite our paper:
P. Flotho, M. Piening, A. Kukleva and G. Steidl, “T-FAKE: Synthesizing Thermal Images for Facial Landmarking,” Proceedings of the Computer Vision and Pattern Recognition Conference (CVPR), 2025. CVF Open Access
BibTeX entry
@InProceedings{tfake2025_CVPR,
author = {Flotho, Philipp and Piening, Moritz and Kukleva, Anna and Steidl, Gabriele},
title = {T-FAKE: Synthesizing Thermal Images for Facial Landmarking},
booktitle = {Proceedings of the Computer Vision and Pattern Recognition Conference (CVPR)},
month = {June},
year = {2025},
pages = {26356-26366}
}
The thermal face bounding box detection in this repo uses the TFW landmarker model, please additionally cite:
Kuzdeuov, A., Aubakirova, D., Koishigarina, D., & Varol, H. A. (2022). TFW: Annotated Thermal Faces in the Wild Dataset. IEEE Transactions on Information Forensics and Security, 17, 2084–2094. https://doi.org/10.1109/TIFS.2022.3177949
@article{9781417,
author={Kuzdeuov, Askat and Aubakirova, Dana and Koishigarina, Darina and Varol, Huseyin Atakan},
journal={IEEE Transactions on Information Forensics and Security},
title={TFW: Annotated Thermal Faces in the Wild Dataset},
year={2022},
volume={17},
pages={2084-2094},
doi={10.1109/TIFS.2022.3177949}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file thermal_face_alignment-1.0.0a3.tar.gz.
File metadata
- Download URL: thermal_face_alignment-1.0.0a3.tar.gz
- Upload date:
- Size: 1.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a662eac03c3ca0aede04ce7436540ba20472975324b33aa9ab5edfcaf89803a3
|
|
| MD5 |
7b60af8d9b5fc0845aebdcc552470ec1
|
|
| BLAKE2b-256 |
80bf03d95e06d5925a13b1887837b08de8a6e78cef0cce62af6e9fa6dee0b668
|
Provenance
The following attestation bundles were made for thermal_face_alignment-1.0.0a3.tar.gz:
Publisher:
pypi-release.yml on openscivision/thermal-face-alignment
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thermal_face_alignment-1.0.0a3.tar.gz -
Subject digest:
a662eac03c3ca0aede04ce7436540ba20472975324b33aa9ab5edfcaf89803a3 - Sigstore transparency entry: 770739917
- Sigstore integration time:
-
Permalink:
openscivision/thermal-face-alignment@0587950b7fb581f4de997cdc560cccc44d714e74 -
Branch / Tag:
refs/tags/v1.0.0a3 - Owner: https://github.com/openscivision
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-release.yml@0587950b7fb581f4de997cdc560cccc44d714e74 -
Trigger Event:
push
-
Statement type:
File details
Details for the file thermal_face_alignment-1.0.0a3-py3-none-any.whl.
File metadata
- Download URL: thermal_face_alignment-1.0.0a3-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bead405c1f93f69d2c30de18c35e17c2d898def64fef6667ed07ab505eca426d
|
|
| MD5 |
113265465329c79e74ac30a5a96b2139
|
|
| BLAKE2b-256 |
4dfadcb0e40f35172826c4e45b4a2dae965136fd6770846a319923408039664d
|
Provenance
The following attestation bundles were made for thermal_face_alignment-1.0.0a3-py3-none-any.whl:
Publisher:
pypi-release.yml on openscivision/thermal-face-alignment
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thermal_face_alignment-1.0.0a3-py3-none-any.whl -
Subject digest:
bead405c1f93f69d2c30de18c35e17c2d898def64fef6667ed07ab505eca426d - Sigstore transparency entry: 770739934
- Sigstore integration time:
-
Permalink:
openscivision/thermal-face-alignment@0587950b7fb581f4de997cdc560cccc44d714e74 -
Branch / Tag:
refs/tags/v1.0.0a3 - Owner: https://github.com/openscivision
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-release.yml@0587950b7fb581f4de997cdc560cccc44d714e74 -
Trigger Event:
push
-
Statement type: