This paper releases a public thermal infrared imaging dataset of experimental rats for semantic segmentation tasks, containing 1655 quality-controlled thermal imaging frames from 25 experimental rats together with corresponding pixel-level anatomical segmentation masks, and is accompanied by open-source baseline segmentation validation code.
Infrared thermal imaging provides a contact-free, restraint-free method of surface temperature acquisition, and can serve as a highly valuable marker of thermoregulatory responses in laboratory animal stress and pharmacological research.
Current analysis pipelines for such thermal images are limited by the manual annotation of anatomical regions, creating a clear performance bottleneck, and no public dataset had previously provided paired resources of experimental rat thermal infrared frames with pixel-level body-part annotations.
The thermal infrared imaging corpus constructed in this work contains infrared thermal imaging records of 25 experimental rats, acquired over multiple imaging sessions, with a total of 1655 valid frames after quality control. All subjects came from two approved pharmacological studies, and imaging time points were specifically selected so that the entire dataset covers diverse body surface temperature ranges across individuals and experimental conditions. The dataset is further divided into an ethanol experiment group of 15 rats with 307 frames and a ketamine experiment group of 10 rats with 1348 frames.
This annotated thermal infrared imaging dataset has been made publicly available on the Figshare platform, organized as independent directories for each of the 25 subjects; each subject directory synchronously contains the corresponding raw thermal imaging data, annotation masks, and related CSV files, fully covering all 1655 quality-checked valid frames.
The accompanying open-source baseline segmentation code is hosted on the GitHub platform. The repository provides a complete five-fold semantic segmentation pipeline implementation, together with a sample data package containing example images, supporting reproduction and further development of related segmentation tasks.
Annotators drew pixel-level masks based on Jet-colormap PNGs rendered from the raw thermal matrices, rather than using MSX-format JPEG images; this design ensures that every annotation label is precisely registered with the thermal infrared pixels it describes. Annotation was performed in the MATLAB medical image labeling tool, defining four mutually exclusive classes corresponding to background, head (including ears), torso (composed of back, abdomen, and limbs), and tail. Before formal release, the dataset underwent two rounds of quality checks: the first was a triple-consistency check that retained only frames with a matching thermal render, a same-sized four-class mask, and a raw temperature CSV file; the second was a model-assisted anomaly review to further filter annotation deviations.
The released dataset adopts a subject-stratified directory organization, with a separate subdirectory created at the top level for each experimental rat, named Rat1 through Rat25. Each rat's dedicated directory contains three parallel subfolders—CSV, Mask, and Thermal Imaging—and all files are paired via a unified integer frame index N, with all content sharing a 480-row × 640-column pixel grid.
Under a five-fold cross-validation setting, the baseline semantic segmentation model achieved per-fold intersection-over-union (IoU) values above 0.99, 0.95, and 0.90 for the background, head, and body classes respectively; the tail class was the hardest to recognize, with a mean IoU of 0.724 and a cross-fold standard deviation of 0.025, a performance directly related to the small pixel share of the tail region and the frequent partial occlusion of animals' distal parts. The difference between mean and median IoU for each class did not exceed 0.006, indicating no strongly skewed outliers among the five-fold results and that the overall validation results are stable and reliable. You can consult the row-normalized confusion matrix that follows to directly view the correspondence between predicted classes and ground-truth annotations aggregated over all five folds.
All animal-related experimental procedures were reviewed and approved by the Institutional Animal Care and Use Committee (IACUC) of Ben-Gurion University of the Negev, in compliance with the Guide for the Care and Use of Laboratory Animals issued by the U.S. National Institutes of Health. The ketamine-related experiments were approved under protocol number BGU-IL-2512-143-5, and the ethanol-related experiments under protocol number BGU-358-08-2024-E.