The code implementation for the paper:Towards Privacy-Preserving Thermal Human Perception from Dataset to Deployment.
Download or clone the repository.
git clone https://github.com/kailaisun/RGBT.git
cd RGBTWe recommend using Conda (Miniconda) for installation.
Some examples:
We publish part of the thermal images and annotations on Hugging Face.
We release one model per task, together with minimal inference code. Weights live
on Hugging Face; each folder below contains a
self-contained infer.py.
| Task | Method | Folder | Weights (Hugging Face) | Headline metric |
|---|---|---|---|---|
| Infrared person counting | ResNet18 | resnet18/ |
resnet18/weights/best.pt |
accuracy / macro-F1 |
| RGB to thermal field | U-Net | unet_rgb2t/ |
unet_rgb2t/weights/checkpoint.pt |
MAE / R2 |
| Infrared to RGB | BBDM | bbdm_ir2rgb/ |
bbdm_ir2rgb/weights/last_model.pth |
PSNR / SSIM / FID |
Only the thermal-infrared image is used as input for the counting model; RGB is never fed to it.
The infrared person-state detection model (4 states: lie / sit / other / off_bed) is coming soon.
pip install "huggingface_hub[cli]"
hf download skl24/RGBT --local-dir checkpoints# person counting
python resnet18/infer.py --weights checkpoints/resnet18/weights/best.pt --source ir.png
# RGB -> thermal field
python unet_rgb2t/infer.py --weights checkpoints/unet_rgb2t/weights/checkpoint.pt --source rgb.jpg
# IR -> RGB
python bbdm_ir2rgb/infer.py --weights checkpoints/bbdm_ir2rgb/weights/last_model.pth \
--source ir.png --output rgb.pngSee each folder's README.md for the model details, training setup and
held-out test numbers.
The repository is licensed under the MIT license.
If you have other questions❓, please contact us in time 👬


