Next Article in Journal
Long-Term Radiometric Stability of Uncooled and Shutterless Microbolometer-Based Infrared Cameras
Previous Article in Journal
Respiratory Rate Estimation from Thermal Video Data Using Spatio-Temporal Deep Learning
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Dataset of Visible Light and Thermal Infrared Images for Health Monitoring of Caged Laying Hens in Large-Scale Farming

by
Weihong Ma
1,2,3,†,
Xingmeng Wang
1,3,†,
Xianglong Xue
2,
Mingyu Li
2,
Simon X. Yang
4,
Yuhang Guo
2,
Ronghua Gao
1,
Lepeng Song
3,* and
Qifeng Li
1,2,*
1
Information Technology Research Center, Beijing Academy of Agriculture and Forestry Sciences, Beijing 100097, China
2
National Innovation Center of Digital Technology in Animal Husbandry, Beijing 100097, China
3
College of Electronic and Electrical Engineering, Chongqing University of Science & Technology, Chongqing 401331, China
4
Advanced Robotics and Intelligent Systems Laboratory, School of Engineering, University of Guelph, Guelph, ON N1G 2W1, Canada
*
Authors to whom correspondence should be addressed.
These authors contributed equally to this work.
Sensors 2024, 24(19), 6385; https://doi.org/10.3390/s24196385
Submission received: 19 August 2024 / Revised: 14 September 2024 / Accepted: 30 September 2024 / Published: 2 October 2024

Abstract

:
Considering animal welfare, the free-range laying hen farming model is increasingly gaining attention. However, in some countries, large-scale farming still relies on the cage-rearing model, making the focus on the welfare of caged laying hens equally important. To evaluate the health status of caged laying hens, a dataset comprising visible light and thermal infrared images was established for analyses, including morphological, thermographic, comb, and behavioral assessments, enabling a comprehensive evaluation of the hens’ health, behavior, and population counts. To address the issue of insufficient data samples in the health detection process for individual and group hens, a dataset named BClayinghens was constructed containing 61,133 images of visible light and thermal infrared images. The BClayinghens dataset was completed using three types of devices: smartphones, visible light cameras, and infrared thermal cameras. All thermal infrared images correspond to visible light images and have achieved positional alignment through coordinate correction. Additionally, the visible light images were annotated with chicken head labels, obtaining 63,693 chicken head labels, which can be directly used for training deep learning models for chicken head object detection and combined with corresponding thermal infrared data to analyze the temperature of the chicken heads. To enable the constructed deep-learning object detection and recognition models to adapt to different breeding environments, various data enhancement methods such as rotation, shearing, color enhancement, and noise addition were used for image processing. The BClayinghens dataset is important for applying visible light images and corresponding thermal infrared images in the health detection, behavioral analysis, and counting of caged laying hens under large-scale farming.

1. Introduction

In the rapidly advancing field of precision livestock farming technology, intelligent management has become a key factor in enhancing production efficiency and reducing costs. Particularly within the poultry farming industry, as the global demand for chicken meat and eggs increases, numerous farms are progressively transitioning towards intelligent and automated systems [1]. Many large-scale poultry farms have developed and implemented intelligent management systems for tasks such as overall temperature control in the henhouses, automated egg collection, and automated feeding, significantly reducing costs. However, many practical issues remain unresolved in the refined, intelligent management of individual hens and cages.
Geffen et al. [2] utilized a convolutional neural network based on Faster R-CNN to detect and count laying hens in battery cages, achieving an accuracy of 89.6%. Bakar et al. [3] demonstrated a novel feature for detecting bacteria- or virus-infected chickens by automatically detecting the color of the chicken’s comb. Yu et al. [4] proposed a cage-gate removal algorithm based on big data and deep learning Cyclic Consistent Migration Neural Network (CCMNN) for the detection of head features in caged laying hens. Wu et al. [5] employed super-resolution fusion optimization methods for multi-object chicken detection, enriching the pixel features of chickens. Campbell et al. [6] utilized a computer vision system to monitor broiler chickens on farms, analyzing the activity of the broilers through an unsupervised 2D trajectory clustering method.
Establishing and refining a refined, intelligent management system for poultry farms are inseparable from the support of high-quality data. The quality and quantity of the dataset play a crucial role in the training of deep learning-based algorithms, the validation of models, and the enhancement of system performance [7]. Yao et al. [8] constructed a gender classification dataset for free-range chickens, which includes 800 images of chicken flocks and 1000 images of individual chickens. Adebayo et al. [9] collected a dataset of 346 audio signals for the health monitoring of chickens based on vocalization signals. Aworinde et al. [10] established a chicken feces image dataset with data labels containing 14,618 images for predicting the health status of chickens. We have yet to encounter a high-quality dataset of visible light and thermal infrared images for caged laying hens.
The primary aim of this paper is to introduce and elaborate on the construction and application of the BClayinghens dataset. The BClayinghens dataset contains visible light and thermal infrared images of caged laying hens, aiming to enhance the detection capabilities of health status, behavior analysis, and counting of caged laying hens through deep learning technologies. This study will provide valuable data resources for researchers and practitioners in the field of caged laying hen research. The specific objectives include the following:
(1)
Dataset Introduction: A comprehensive description of the background, data content, collection process, data processing, and annotation methods involved in constructing the BClayinghens dataset.
(2)
Dataset Applications: An exploration of the practical application value of the BClayinghens dataset in chicken head target detection.
(3)
Deep Learning Model Training: An explanation of how to use this dataset to train deep learning models and enhance the model’s robustness in different environments through data augmentation techniques.
(4)
Providing Data Resources: Offering high-quality image data resources of caged laying hens to researchers and practitioners, supporting the research and development of poultry health detection and intelligent farming management systems.

2. Materials and Methods

2.1. Data Collection

Before data collection, we devised a detailed photography plan, aiming to meet the diverse characteristics of the data.

2.1.1. Experimental Location

China stands as one of the largest global producers and consumers of eggs, rendering the collection of laying hen data from Chinese large-scale farms highly significant for investigating the utilization of artificial intelligence technologies in the health monitoring and behavioral recognition of laying hens. We collected data from a large poultry farm in Shenzhou, Hebei, China, where the number of chickens exceeds one million. The collected data pertain to white-feathered laying hens. The housing structure within a single shed consists of a 10-column by 8-tier cage configuration, with partitions every 4 tiers. Each cage accommodates 6 to 8 laying hens, with an age range of 200 to 300 days. The dimensions of an individual cage are 60 cm in length and 60 cm in width, with a front height of 50 cm and a rear height of 38 cm, and the cage floor is inclined at approximately 10°. The data collection apparatus is integrated into the Autonomous Poultry House Inspection Robot, maintaining a distance of 60 cm from the cage’s exterior during its patrol for mobile monitoring purposes.

2.1.2. Experimental Equipment

To facilitate data collection, this study explored the use of an autonomous inspection robot for poultry houses, as shown in Figure 1 [11]. The technical parameters of the robot are detailed in Table 1. The autonomous inspection robot can adjust its speed, direction, image acquisition, and detection height according to the specific tasks of the experiment, and it provides a visual interface as well as monitoring indoor gas, temperature, and humidity information.
Data collection devices consist of smartphones and chicken inspection robots equipped with visible light cameras and infrared thermal cameras. The specific parameters of the image acquisition devices are detailed in Table 2. Given the varying image qualities produced by the three types of collection devices, the BClayinghens dataset adeptly captures the diversity of images within the henhouse environment, as depicted in Figure 2.
Notably, during the acquisition of TIR images by the chicken inspection robot, the camera is simultaneously activated to capture RGB images (with approximately a 1 s interval between the two image captures). Consequently, each TIR image of the henhouse has a corresponding RGB image, providing viable data material for the design of image fusion algorithms [13]. The chicken inspection robot and its image capture devices are shown in Figure 3. Additionally, by scaling and shifting the RGB images and conducting boundary checks and dimension adjustments, we have achieved coordinate correction between RGB and TIR images.

2.1.3. Experimental Methods

In large-scale poultry farms, the internal environment of the henhouses is uniformly regulated by a central environmental control system. The main factors affecting the experimental data include the following: resting hens, feed cart feeding, egg laying by laying hens, and pecking behaviors of the chickens. Under a single experiment, the chicken dataset is captured in 12 sessions; each shooting session lasted 2 h, as shown in Table 3.
The data collection experimental process is shown in Figure 4. After the poultry house inspection robot is activated, the lifting device equipped with a thermal infrared camera and a visible light camera automatically rises to the predetermined height according to the structure of the poultry house and completes the camera initialization. Subsequently, the robot’s position-reading device reads the cage number while the thermal infrared camera and visible light camera automatically capture images of the hens, continuing until the last cage is completed. The thermal infrared camera and visible light camera are centrally controlled by the information collection system, completing one round of data collection by scanning around 960 cages to obtain diverse data. After the final hen image is captured, the lifting device, thermal infrared camera, and visible light camera reset, and all data are archived by the robot and sent to the cloud.
It should be noted that the data collection experiments described in this paper used visible light cameras and thermal infrared cameras that employ non-stress, non-contact image acquisition methods. Additionally, the farm enforced strict disinfection and protection measures for personnel entering the site, ensuring that the image collection and testing process did not cause any harm to the hens. Therefore, the research presented in this paper does not raise any ethical issues. All images were captured between April 2022 and July 2024, with image acquisition experiments in five coops in separate time periods for a total of 60 shots. This resulted in 30,993 raw images with a data file size of 6.89 GB.

2.1.4. Data Preprocessing

Data preprocessing encompasses three aspects. 1: For a series containing only RGB images, data cleansing is required. Duplicate and chicken-free images are removed to meet the needs of chicken head detection tasks and to facilitate the exploration of performance enhancement in object detection by deep learning algorithms. 2: For a series of images where RGB corresponds to TIR images, the correspondence between RGB and TIR images is verified, and any RGB and TIR images not containing laying hens are removed. 3: The selected data are annotated to distinguish between the chicken head and body parts, which will be beneficial for implementing chicken counting and dead chicken detection tasks. The data annotation work is completed by data annotators, ensuring the accuracy of the data labels.
To ensure the quality of the dataset, data selection was performed manually. The data selection criteria are detailed in Table 4.

2.2. Data Augmentations

The limitations of the poultry farm environment can result in a singular environment within the collected laying hen image dataset and a limited number of collections. To better adapt this dataset to various breeding environments and deep learning models, we have employed data augmentation techniques to enrich the existing data. Data augmentation considers the impact of factors such as the breeding environment, collection equipment, and chicken head features on the generalizability of the dataset, making the augmented dataset more accurate and reliable in model expression.

2.2.1. Rotation

Three rotation methods are used for data augmentation: rotating the image’s red channel by 45°, shearing the image in a 16° direction to create a tilt effect, and rotating the image counterclockwise by 20°. Rotation augmentation is primarily used for enhancing RGB-TIR images, and the enhanced RGB images remain corresponding to the TIR images.

2.2.2. R-Value (Redness) Enhancement

The key to accurately identifying laying hens is precisely determining the chicken head. Since the comb color of a laying hen is red, enhancing the value of the red channel in the RGB image will facilitate the differentiation between the target and the background. We randomly increase the R channel of each pixel of the image by a value between 10 and 100, as follows:
R e n h a n c e d x , y = R r a w x , y + Δ R
where Renhanced is the red channel value of the pixel at position (x, y) in the enhanced image; ΔR is a random variable ranging from [10, 100]; Rraw is the red channel value of the pixel at position (x, y) in the raw image.

2.2.3. Hue Enhancement

Hue enhancement can make the model more robust during training and capable of dealing with the impact of hue variation. First, convert the image from the RGB color space to the HSV color space. Then, select the hue channel H and add a random value. The hue enhancement is calculated as follows:
H e n h a n c e d = H r a w + Δ H
where Henhanced is the enhanced H channel value; ΔH is a random variable ranging from [25, 90]; Hraw is the H channel value of the raw image. Since hue H is periodic (between 0 and 360 degrees), periodic adjustment is made to Henhanced during the enhancement process to ensure it remains within the valid hue range.

2.2.4. Brightness Enhancement

Brightness enhancement is used to simulate lighting variations in different poultry farms, variations in lighting at different heights of chicken cages within the same farm, and imaging differences in image collection by different cameras, thereby increasing data complexity. A multiplication factor is applied to each channel of every pixel in the image, calculated as follows:
P e n h a n c e d = k × P r a w
where Penhanced is the pixel value of the enhanced image; k is a random variable ranging from [0.5, 1.5]; Praw is the pixel value of the raw image. When k is less than 1, the enhanced image is darker than the raw image; when k is greater than 1, the enhanced image is brighter than the raw image.

2.2.5. Edge Enhancement

Edge enhancement is used to make the edges of the image more pronounced, which can improve the image’s visual effect [14]. Incorporating edge enhancement as a step in the laying hen data augmentation process during machine learning model training can enhance the model’s ability to recognize edge features of the chicken head (especially the comb part).

2.2.6. Gaussian Noise

Gaussian noise is added for data augmentation to simulate noise interference during the image collection process in the henhouse. A random noise value following a Gaussian distribution is added to each raw image pixel. The enhanced pixel value is calculated as follows:
P G n e w = c l i p P r a w + N , 0 , 255
where PGnew is the pixel value of the image after Gaussian enhancement; the clip function limits the value to the range of 0 to 255; N is the noise value, randomly drawn from a Gaussian distribution with a standard deviation of 51.

2.2.7. Laplacian Noise

Laplacian noise enhancement is added to simulate interference caused by low lighting and high compression rates during image collection in the henhouse environment. A random noise value following a Laplacian distribution is generated for each pixel of the image, calculated as follows:
P L n e w = c l i p P r a w + M , 0 , 255
where PLnew is the pixel value of the image after Laplacian enhancement; the clip function limits the value to the range of 0 to 255; M is the noise value, randomly drawn from a Laplacian distribution with a scale of 51.

2.2.8. Poisson Noise

Statistical noise following a Poisson distribution is added to enhance the robustness of the model, calculated as follows:
P P n e w = c l i p P r a w + λ , 0 , 255
where PPnew is the pixel value of the image after Poisson enhancement; the clip function limits the value to the range of 0 to 255; λ is the noise value, randomly drawn from a Poisson distribution with a scale of 40.

2.2.9. Salt-and-Pepper Noise

Salt-and-pepper noise is added for data augmentation to simulate interference in images due to low-quality cameras, wireless transmission errors, storage media damage, and other similar issues. The proportion of pixels covered by noise points in the image is defined as 10%, and within this 10%, white (salt) or black (pepper) pixel points are randomly introduced.
The raw images were processed using the methods above, as illustrated in Figure 5. Before data augmentation, there were 30,993 raw images, with 2359 xml, json, and txt data labels each. It is important to note that the laying hen data obtained through the above data augmentation methods include not only the laying hen images but also the corresponding xml, json, and txt data labels for the augmented laying hen images, or the TIR images corresponding to the RGB images. This allows for the support of various model training tasks. After data augmentation, there are 61,133 images and 63,693 data labels (21,231 XML, JSON, and TXT data labels each).

3. Results and Analysis

3.1. Data Description

This dataset encompasses three categories of imagery data about laying hens: RGB image data, paired RGB and Thermal Infrared (TIR) image data, and RGB image data incorporating chicken head annotation information. Specifically, the dataset comprises 5226 RGB images of individual hens, constituting 8% of the total dataset. The paired RGB and TIR images number 34,676, representing 57% of the dataset. The RGB images annotated with chicken head information total 21,231, accounting for 35% of the dataset.

3.1.1. Data Environment

A robust dataset must consider both the quantity and quality of the images and the diversity of the environment [15], taking into account a variety of photographic perspectives, lighting conditions, and background contexts. Figure 6, Figure 7 and Figure 8 depict the range of complex environments captured within the dataset.
(1)
We collected data on individual laying hens in a natural environment, as illustrated in Figure 6. During photography, complete and partial images of the hens were captured under various natural lighting and background conditions. The data obtained from the natural setting are conducive to analyzing the morphology of free-range laying hens [16] and assessing their health state.
(2)
The activity states of caged laying hens were photographed, considering the variations in cage lighting and camera angles, as depicted in Figure 7. The dataset of caged laying hens can be utilized to analyze flock activity levels, detect deceased hens within cages, and calculate hen population numbers.
(3)
An innovative image acquisition technology that fuses RGB images with TIR images was introduced [17], as shown in Figure 8. Corresponding RGB and TIR images were taken at different distances, angles, and with varying numbers of hens, capturing multimodal image data. The image fusion technique overcomes interference caused by camera shake in RGB images and provides data support for studying infectious diseases among hen flocks.
Due to the slightly wider field of view in TIR image compared to RGB images (with the TIR image resolution being lower than that of the RGB images), we employed image correction [18] methods to transform the coordinates and dimensions of the RGB images onto the TIR images to align these two kinds of images. Using the xywh notation for image correction, the calculation method for the two-dimensional coordinates of pixels and the dimensions of length and width in the TIR image is as follows:
T x = k x x + b x T y = k y y + b y T w = k w w T h = k h h
where x represents the x-coordinate in the RGB image with the top-left corner as the origin; y represents the y-coordinate in the RGB image with the top-left corner as the origin; w denotes the raw width of the RGB image; h denotes the raw height of the RGB image; Tx signifies the x-coordinate in the transformed TIR image; Ty signifies the y-coordinate in the transformed TIR image; Tw denotes the width of the transformed TIR image; Th denotes the height of the transformed TIR image; kx is the scaling factor for the x-coordinate, taken as 0.09661 in this paper; ky is the scaling factor for the y-coordinate, taken as 0.09558 in this paper; kw is the scaling factor for the image width, taken as 0.09672 in this paper; kh is the scaling factor for the image height, taken as 0.09618 in this paper; bx is the adjustment factor for the x-coordinate offset, taken as 8.66434 in this paper; by is the adjustment factor for the y-coordinate offset, taken as 10.1642 in this paper.
To ensure that the transformed coordinates and dimensions do not exceed the boundaries of the TIR image, boundary checks and dimension adjustments are performed on the corrected TIR images. The adjusted width Tadjust(w) of the TIR image is calculated as follows:
T a d j u s t ( w ) = T w     i f T x + T w 318 318 T x i f T x + T w > 318
The adjusted height Tadjust(h) of the TIR image is calculated as follows:
T a d j u s t ( h ) = T h     i f T y + T h 238 238 T y i f T y + T h > 238
Furthermore, data augmentation techniques have been applied to the dataset to expand it, including operations such as rotation, hue transformation, brightness transformation, and the addition of noise.

3.1.2. Annotations and Labels

In the collected images of caged laying hen flocks, annotations for chicken heads were performed, with the data annotation task accomplished by 10 data annotators, ensuring the precision and standardization of the data. The annotations provide location information for the heads of the hens within the images, marked with rectangular frames, using the Labelme (Version 4.5.13) annotation software. To ensure the quality and consistency of the annotations, the following methods were used for data quality inspection. 1. After completing the data annotation, the 10 annotators conducted cross-checks in pairs to ensure that there were no instances of missed annotations, incorrect annotations, or inaccurate annotation positions for the chicken heads. 2. Researchers with interdisciplinary expertise in animal husbandry management and information technology, along with poultry farm staff, jointly verified whether the categories and positions of the data labels were correct.
As shown in Figure 9, for the same image, we provide annotation information in three different formats: xml, txt, and json. The xml format annotation files include the images’ size, category, and location information, adhering to the annotation standards of datasets such as PASCAL VOC and YOLO. The txt format is a plain text file containing only category and location information, commonly used for YOLO format annotations, and is characterized by its simplicity and ease of parsing. The json format annotation files include image size, category, location, and other information, with a level of lightness between xml and txt formats. The three data annotation formats we provide can meet the needs of different application scenarios. For the operation guide on data annotation, please refer to https://github.com/maweihong/BClayinghens/blob/main/Data%20Annotation%20Guide.docx (accessed on 1 September 2024).

3.1.3. Data Folders

The structure of the data folders is shown in Figure 10 and Figure 11. In Figure 11, the folders from 09RBGtxt+xml+json-2359 to 17SPNoisetxt+xml+json-2359 have divided the dataset in a ratio of 7:2:1, with the training set (folder train1653) accounting for 70%, the validation set (folder val471) accounting for 20%, and the test set (folder test235) accounting for 10%. Each folder for the training, validation, and test sets contains four subfolders: img, json, txt, and xml, for saving the corresponding formats of ten images or labels. Figure 12 and Figure 13 show the file count statistics within the BClayinghens dataset.

3.1.4. Value of the Data

  • The dataset is applicable for the health monitoring and behavioral analysis of caged laying hens and research on chicken head detection and the counting of caged hens. It is particularly suitable for classification studies of hens based on deep learning convolutional neural networks [19].
  • Multimodal image data from visible light and thermal infrared are provided, supporting research on the health monitoring and behavior recognition of hens through image fusion techniques. The fused images of hens are especially useful for body temperature detection, aiding disease prevention and control efforts in commercial poultry farming.
  • Different morphological images of individual hens are supplied, which can be utilized for health assessments of laying hens.
  • The use of the BClayinghens dataset for automatic monitoring and management [20] in laying hen farming not only enables the detection of disease risks in hens under non-contact, stress-free conditions but also improves the efficiency of routine inspections and the accuracy of disease detection [21], while reducing the labor costs of manual inspections in poultry farms. In contrast, the current health management methods for caged laying hens in commercial farms involve manually wearing headlamps and masks to inspect hens row by row. Such intense lighting and human contact not only negatively impact hen welfare but also pose potential health risks to on-site personnel.
The relevant information regarding the BClayinghens dataset is presented in Table 5.

3.2. Chicken Head and Head Temperature Detection

3.2.1. Comparison of Detection Performance of Different Algorithms

The chicken inspection robot in the henhouse should possess high real-time performance during actual use, necessitating the selection of target detection models with superior real-time capabilities for deployment [22]. We have chosen mainstream and novel real-time target detection models to test the dataset, thereby verifying the dataset’s outstanding performance across various target detection algorithms. The RT-DETR model [23] and the YOLO series target detection models (YOLOv5 [24], YOLOv8 [25], YOLOv9 [26], YOLOv10 [27]) are utilized as baseline testing methods for chicken head recognition. Model training is implemented on a Linux server, using an Intel(R) Xeon(R) Platinum 8375c CPU @ 2.90GHz processor(Intel, Hillsboro, OR, USA), an NVIDIA RTX A6000 graphics card(NVIDIA, Taiwan, China), CUDA version 11.3, Python version 3.8.18, and the Pytorch deep learning framework, Pytorch version 1.12.0. None of the experiments uses pre-trained weights, with a batch size set to 48 and the number of epochs set to 200.
We selected 2359 images from the BClayinghens dataset to verify the chicken head detection performance of the dataset across different algorithms. Figure 14 illustrates the distribution of the dataset used during the chicken head detection training process, where the coordinates are normalized values. The x and y coordinates, with a value of 0, represent the upper left corner of the image in the dataset, and a value of 1 represents the upper right corner. It can be observed that the x-coordinates of the chicken head target boxes in the selected data are relatively evenly distributed, the y-coordinates are concentrated in the central area of the image, and the width and height of the target boxes follow a normal distribution. Additionally, a denser concentration of points is shown in areas with smaller widths and heights within the image, indicating a strong commonality in certain specific sizes or positions of the chicken head targets in the dataset. This aggregation can help the model learn the target position and size distribution more accurately, thereby improving detection accuracy.
Table 6 presents the detection performance of various algorithms in the chicken head detection task. As the model size, parameters, and computation decrease, the inference speed of the model increases and resource consumption decreases. Among the models, YOLOv5n, YOLOv8n, YOLOv9t, and YOLOv10n exhibit faster inference speeds and lower resource consumption. Conversely, YOLOv5x, YOLOv8x, and YOLOv9e perform poorly in the aforementioned three performance metrics. Therefore, for deploying chicken head detection models on mobile or embedded devices, YOLOv5n, YOLOv8n, YOLOv9t, and YOLOv10n should be considered as preliminary options.
However, in practical applications, it is necessary to balance the model’s Precision, Recall, mAP50, and other accuracy metrics in addition to considering computational resources. As shown in Table 6, the four models with the highest Precision are YOLOv5m, YOLOv8m, YOLOv8l, and YOLOv8x, with Precision values of 96.27%, 96.48%, 95.98%, and 96.28%, respectively. The two models with the lowest Precision are YOLOv9t and YOLOv10n, with Precision values of 92.24% and 91.87%, respectively. Higher Precision indicates more accurate classification of chicken heads, so YOLOv5m, YOLOv8m, YOLOv8l, and YOLOv8x have better classification accuracy. The four models with the higher Recall are YOLOv5s, YOLOv5x, YOLOv8l, and YOLOv8x, with Recall values of 95.82%, 95.23%, 95.54%, and 95.73%, respectively. The two models with lower Recall are RT-DETR-ResNet101 and YOLOv9t, with Recall values of 92.18% and 92.12%, respectively. Higher Recall indicates more accurate localization of chicken heads, so YOLOv5s, YOLOv5x, YOLOv8l, and YOLOv8x offer better localization accuracy. The four models with the higher mAP50 are YOLOv8m, YOLOv9m, YOLOv9c, and YOLOv9e, with mAP50 values of 97.71%, 97.92%, 97.81%, and 97.87%, respectively. The two models with lower mAP50 are RT-DETR-ResNet101 and YOLOv10n, both with an mAP50 value of 95.94%. Higher mAP50 indicates better overall performance of the chicken head detection algorithm.
After considering the performance of the models based on overall metrics—namely inference speed, resource consumption, and accuracy—across a total of six indicators, we recommend the models that ranked in the top positions for at least two of these metrics. Consequently, the preferred chicken head detection models are YOLOv5n, YOLOv8m, and YOLOv9c. Furthermore, for deployment on resource-limited mobile or embedded devices, we recommend using the YOLOv5n model for chicken head detection tasks. For hardware with ample computational resources, we suggest deploying the YOLOv8m or YOLOv9c models, as they offer higher detection accuracy.
Figure 15, Figure 16 and Figure 17 illustrate the variations in loss values and precision during the training process of the RT-DETR and YOLO series chicken head detection models. Given the complexity of object detection tasks, models require optimization across multiple dimensions. To enable models to comprehensively learn various aspects of object detection tasks, different algorithms enhance overall model performance by employing a design philosophy that combines multiple loss functions. Specifically, in Figure 15, Figure 16 and Figure 17, the loss calculation for RT-DETR includes giou_loss (Generalized Intersection over Union Loss [28]), cls_loss (classification loss), and l1_loss (Mean Absolute Error) [23]; YOLOv5 comprises box_loss (bounding box loss) and obj_loss (object classification loss); YOLOv8 includes box_loss, cls_loss, and dfl_loss (distribution focal loss); YOLOv9 consists of box_loss, cls_loss, and dfl_loss; YOLOv10 utilizes a dual label assignment strategy, encompassing box_om, cls_om, dfl_om, box_oo, cls_oo, and dfl_oo [27].
In Figure 15, the loss and precision curves for the RT-DETR series algorithms show near convergence. Among them, the giou_loss, cls_loss, and l1_loss for RT-DETR-ResNet50 converge to their lowest values, reaching 0.29, 0.35, and 0.11, respectively. Conversely, RT-DETR-l exhibits the highest giou_loss, cls_loss, and l1_loss, at 1.73, 0.90, and 0.92, respectively. In terms of precision, RT-DETR-ResNet101 exhibits significant oscillations during the early training phases but stabilizes to 0.92 in the later stages. Although RT-DETR-ResNet50 also experiences considerable oscillation in the early stages, its final precision of 0.94 surpasses that of RT-DETR-l, RT-DETR-ResNet101, and RT-DETR-x. The differences between the loss and precision curves of the various RT-DETR algorithms are minimal, with the maximum loss function difference being 0.24 and the maximum precision difference being 0.02 after convergence. Overall, when applied to the BClayinghens dataset, the RT-DETR-ResNet50 algorithm demonstrates the best classification and regression performance among the RT-DETR series.
In Figure 15, the differences in the loss curves among the YOLOv5 series algorithms are quite pronounced, while the precision curves show smaller variations. YOLOv5l and YOLOv5x both converge well, with YOLOv5x exhibiting the best convergence. Specifically, YOLOv5x achieves the lowest convergence for box_loss, reducing from 0.11 to 0.01, and for obj_loss, decreasing from 0.08 to 0.02. Among the YOLOv5 series algorithms, YOLOv5m, YOLOv5l, and YOLOv5x all achieve a precision of 0.96. Therefore, when applying the BClayinghens dataset to the YOLOv5 series algorithms, selecting YOLOv5x provides the best trade-off between loss and precision.
Figure 16 illustrates the variations in loss values and precision for the YOLOv8 and YOLOv9 chicken head detection models. Among the YOLOv8 series models, the largest model, YOLOv8x, achieves the lowest loss values, with box_loss converging to 0.31, cls_loss converging to 0.18, and dfl_loss converging to 0.84. In contrast, the smallest model in the YOLOv8 series, YOLOv8n, has box_loss, cls_loss, and dfl_loss values of 0.84, 0.40, and 1.15, respectively. We observe that the loss curves for the YOLOv8 series algorithms converge better as the model size increases. Additionally, precision exhibits a similar trend, with YOLOv8n having the lowest precision among the YOLOv8 series models, at 0.95.
In Figure 16, the loss curves for the YOLOv9 series algorithms exhibit similar characteristics to those of the YOLOv8 series, with the loss curves converging better as the model size increases. YOLOv9t achieves box_loss, cls_loss, and dfl_loss values of 1.42, 0.67, and 1.63, respectively. In comparison, YOLOv9e achieves box_loss, cls_loss, and dfl_loss values of 0.82, 0.39, and 1.28. In terms of precision, the highest value observed is 0.96, with YOLOv9m, YOLOv9c, and YOLOv9t all reaching this level of precision.
Figure 17 displays the loss and precision curves for the YOLOv10 series algorithms. Both the one-to-many head (om) and one-to-one head (oo) variants of the YOLOv10 series show convergent loss curves. YOLOv10l achieves the lowest values for box_om, cls_om, and dfl_om, which are 0.48, 0.25, and 0.89, respectively. YOLOv10l also has the lowest values for box_oo, cls_oo, and dfl_oo among the YOLOv10 series algorithms, with values of 0.50, 0.18, and 0.90. Additionally, YOLOv10l achieves the highest precision in this series, at 0.96. Therefore, when applying the BClayinghens dataset with the YOLOv10 series algorithms, using YOLOv10l will yield better detection precision.
Overall, as the number of training epochs increases, the loss values for each algorithm gradually decrease and stabilize, while the precision values gradually increase and stabilize. The highest convergence of the loss values among the algorithms reaches 0.02. For detection tasks where precision is prioritized, selecting one of the following seven algorithms—YOLOv5m, YOLOv5l, YOLOv5x, YOLOv9m, YOLOv9c, YOLOv9t, or YOLOv10l—can achieve the highest precision of 0.96.
Additionally, this study evaluates the detection performance of each model using Recall and mAP50 (mean Average Precision at Intersection over Union of 0.5), as shown in Figure 18. It can be observed that, with the exception of the RT-DETR-ResNet50 and YOLOv5x algorithms, the Recall and mAP50 values of the other algorithms converge rapidly in the early stages of training and exhibit minimal oscillation.
As shown in Figure 18, RT-DETR-ResNet50 has the highest Recall in the RT-DETR series, at 0.94, while RT-DETR-x achieves the highest mAP50 in the RT-DETR series, at 0.97. Given that Figure 15 indicates RT-DETR-ResNet50 performs best in classification and regression with the highest Recall and an mAP50 of 0.96, we determine that the best-performing algorithm for the BClayinghens dataset within the RT-DETR series is RT-DETR-ResNet50.
As shown in Figure 18, within the YOLOv5 series algorithms, Recall is highest for YOLOv5s, at 0.96. The highest mAP50 is 0.98, achieved by YOLOv5n, YOLOv5s, and YOLOv5m. The differences between YOLOv5 algorithms after convergence are not significant. When training YOLOv5 series algorithms on the BClayinghens dataset, if considering a balance between loss and precision, YOLOv5x is recommended. For a focus on high Recall and high mAP50, YOLOv5s should be selected.
In the YOLOv8 series algorithms, Recall and mAP50 show significant differences during the first 75 epochs of training, but converge closely in the later stages of training. Recall ranges from 0.94 to 0.95, while mAP50 ranges from 0.97 to 0.98. The BClayinghens dataset demonstrates good adaptability within the YOLOv8 series algorithms.
In the YOLOv9 series algorithms, Recall reaches its highest value of 0.96 with the YOLOv9e model, while the YOLOv9t model shows the lowest Recall of 0.92 within the series. mAP50 is 0.98 for the YOLOv9m, YOLOv9c, and YOLOv9e algorithms, and 0.97 for the YOLOv9t and YOLOv9s algorithms. While the differences in mAP50 among YOLOv9 series algorithms are not significant, YOLOv9e exhibits the highest values for loss, Recall, and mAP50 within this category. Therefore, the best-performing algorithm for the BClayinghens dataset in the YOLOv9 series is determined to be YOLOv9e.
In the YOLOv10 series algorithms, Recall reaches its maximum value of 0.94 with the YOLOv10s and YOLOv10l models. mAP50 achieves its highest value of 0.97 with the YOLOv10s, YOLOv10b, YOLOv10l, and YOLOv10x models. Based on the YOLOv10 loss and precision curves shown in Figure 17, the YOLOv10l model performs optimally across various aspects. Therefore, the best-performing algorithm for the BClayinghens dataset in the YOLOv10 series is determined to be YOLOv10l.
It can be observed that the dataset exhibits low loss values and high precision, recall, and mAP50 values across different models, demonstrating a strong capability to identify chicken head targets. Among all algorithms, the highest loss value converges to 0.02, the highest precision is 0.96, the highest recall is 0.96, and the highest mAP50 is 0.98. Overall, the BClayinghens dataset has high quality and can adapt well to various object detection algorithms.

3.2.2. Analysis of Chicken Head Detection

Due to the interpretability limitations of deep learning algorithms, we conducted a visual analysis using the inference results of chicken head detection. Figure 19, Figure 20, Figure 21, Figure 22 and Figure 23 demonstrate the recognition effects of different object detection algorithms on laying hen images. In Figure 19, the highest confidence for chicken head detection by the RT-DETR series algorithms is 0.95. In Figure 20, the highest confidence for chicken head detection by the YOLOv5 series algorithms is 0.98. In Figure 21, the highest confidence for chicken head detection by the YOLOv8 series algorithms is 0.98. In Figure 22, the highest confidence for chicken head detection by the YOLOv9 series algorithms is 0.98. In Figure 23, the highest confidence for chicken head detection by the YOLOv10 series algorithms is 0.99.
In general, all algorithms can accurately identify the chicken head targets for images of laying hens in various poses with high confidence. The predicted boxes can fully encompass the chicken head area without any missed detections. The RT-DETR series algorithms have chicken head detection confidence, mostly around 0.9, with relatively stable detection results. The YOLOv5 series algorithms have the highest sensitivity in identifying chicken heads, with detection confidence frequently reaching up to 0.98. The YOLOv5 series algorithms have the best learning capability for chicken head features but are prone to false positives in practical applications. The YOLOv8 series algorithms have the highest confidence at 0.97, and the YOLOv9 series algorithms have the highest confidence at 0.98. However, considering the loss values and precision curves during the training process, we found that the YOLOv8 series algorithms consistently have lower loss values than YOLOv9, indicating that the YOLOv8 series algorithms have an advantage in chicken head detection. In comparison, the YOLOv10 series algorithms are less capable of recognizing chicken head targets than others, with the lowest confidence for single chicken head recognition at 0.3. In conclusion, different mainstream object detection models can meet the needs of chicken head identification and provide great convenience for subsequent chicken head temperature detection and deployment on the robot side.

3.2.3. Analysis of Chicken Head Temperature Identification

After applying the object detection algorithm to identify the chicken head using the chicken inspection robot in the henhouse, the position of the chicken head is sent to the information collection and control system in the xywh (coordinates (x, y), width w, height h) format, as shown in Equations (7)–(9). The information collection and control system then invokes the chicken head temperature recognition algorithm and displays the chicken head temperature recognition results on the robot’s visualization interface.
During the experimental process, we calibrated the temperature recognition system of the chicken inspection robot in the henhouse to further improve the temperature detection accuracy. The method for correcting the chicken head temperature detection is as follows:
Ta = 0.144 · Tt + 36.351
where Tt is the raw chicken head temperature detected by the infrared thermal camera, and Ta is the corrected actual chicken head temperature.
When the detection and recognition results of the chicken head are accurate, the chicken inspection robot in the henhouse can call the temperature detection algorithm to calculate the chicken head temperature. Since the RT-DETR above and YOLO series object detection algorithms can accurately identify the chicken head targets, the effect of chicken head temperature recognition is only related to the temperature recognition system. The YOLOv5n algorithm, which has the highest sensitivity for chicken head detection in the YOLOv5 series, was deployed on the chicken inspection robot in the henhouse to test the effect of chicken head temperature detection. The YOLOv5n algorithm can maintain a fast speed while providing accuracy suitable for edge devices, and the effect of chicken head temperature recognition is shown in Figure 24.
In Figure 22, the chicken head temperature is generally around 40 °C, the normal temperature for a chicken head, indicating a high degree of temperature recognition accuracy. Moreover, the movement of the chicken and the robot has a minimal impact on the recognition of the chicken head temperature, with the maximum difference in the temperature recognition of the same laying hen’s head being 0.4 °C and the minimum being 0.1 °C. The dataset shows good performance in chicken head temperature recognition, which can provide a strong preference for the refined management and prevention of diseases in the henhouse.

3.2.4. Comparison with Existing Research

This section discusses the advantages and limitations of this study compared to existing research in terms of dataset quality, chicken head detection accuracy, and chicken head temperature detection accuracy.
In terms of dataset, Reference [8] provides a free-range chicken gender classification dataset with a size of 355 MB. In contrast, the BClayinghens dataset provided in this study includes 61,133 images of caged laying hens, with a dataset size of 76.1 GB, offering more extensive data. For the 346 audio signal dataset provided in Reference [9], the authors did not apply any algorithms for data usability validation. In contrast, our study, which tested 25 different algorithms, demonstrates that the BClayinghens dataset achieves over 95% accuracy in chicken head detection tasks. Reference [10] provides a chicken manure dataset containing 14,618 images, each with a size of 100 × 100 pixels. In comparison, the BClayinghens dataset offers better and richer image quality with resolutions of 2592 × 1944, 1920 × 1080, and 320 × 240.
In terms of chicken head detection, Reference [29] employs adaptive brightness adjustment and convolutional neural networks for the fine detection of caged hens’ head states, achieving a mAP of 0.846. Reference [4] uses YOLOv8n, YOLOv8s, YOLOv8m, and YOLOv8x for caged chicken head feature recognition, with the highest mAP value reaching 0.988. In this study, YOLOv8 series algorithms were also used for chicken head detection, with the highest recognition mAP being 0.98, comparable to the mAP in Reference [4]. In addition to YOLOv8 algorithms, this study utilized a total of 25 algorithms from five series including RT-DETR, YOLOv5, YOLOv9, and YOLOv10 for caged laying hen head detection. The results indicate that the highest precision for chicken head detection is 0.96, recall is 0.96, and mAP50 is 0.98.
In terms of chicken head temperature detection, References [30,31] estimate the sensible heat loss (SHL) of laying hens using infrared thermal imaging (TIR), showing that the temperature of the chicken head ranges between 32.9 °C and 42.1 °C. References [30,31] do not provide the average temperature of the chicken head, but from the TIR images in the references, it can be observed that only the eye area of the chicken head has a lower temperature; thus, it is inferred that the average temperature of the chicken head is above 37 °C. The average temperature of the chicken head measured in this study ranges from 40.7 °C to 41.6 °C, which is consistent with the experimental results of References [30,31] and this study provides a larger sample of chicken head temperature data. Reference [32] proposes a temperature measurement method for pig eyes, with an average temperature of 32.34 °C and an error of 1.06 °C for pigs with normal body temperature, and an average temperature of 34.37 °C with an error of 0.41 °C for pigs with abnormal body temperature. The temperature measurement error for chicken heads in this study ranges from 0.1 °C to 0.4 °C, which is smaller than the error reported in Reference [32].
Overall, this study utilizes the BClayinghens dataset for chicken head detection and temperature measurement. Compared to existing research, the dataset in this study offers better image quality, the chicken head detection task achieves higher precision, and the chicken head temperature measurements have a lower rate of errors.

4. Conclusions

In this study, we have established a comprehensive image dataset named BClayinghens, which encompasses RGB and TIR images of flocks within henhouses and RGB images annotated with laying hen head information. The dataset includes images captured under diverse conditions, varying scenarios, sizes, and lighting types, making it suitable for various image detection tasks for laying hens and for research in deep learning methods within the caged laying hen production domain. Specifically, it includes (1) RGB images of individual laying hens that can be utilized to evaluate their size, thereby facilitating the calculation of weight and the degree of growth in individual parts; it can also be employed to assess the health status of the hens and to identify deceased or sickly hens. (2) RGB and TIR images of flocks within cages are conducive to monitoring individual and group temperatures, aiding in preventing and controlling diseases within hen populations; they are also useful for detecting deceased or sickly hens in complex cage environments. (3) RGB images with annotated laying hen head information can be applied for counting caged laying hens, simplifying intelligent management for large-scale egg-production facilities. The BClayinghens dataset offers significant contributions to the study of animal welfare for caged laying hens, propelling the advancement of smart henhouse management and enhancing the welfare of the animals.

Author Contributions

Conceptualization, W.M.; data curation, W.M., X.W., Y.G., and R.G.; formal analysis, X.W. and R.G.; funding acquisition, R.G.; investigation, X.W. and X.X.; methodology, X.W., S.X.Y., and Y.G.; project administration, Q.L.; software, W.M., X.W., and M.L.; supervision, S.X.Y., L.S., and Q.L.; validation, W.M.; visualization, W.M. and X.W.; writing—original draft, W.M.; writing—review and editing, X.W., L.S., and Q.L. All authors have read and agreed to the published version of the manuscript.

Funding

National Key R&D Program of China grant 2023YFD2000802 to R.G.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Direct URL to the data: https://github.com/maweihong/BClayinghens.git (accessed on 1 September 2024).

Acknowledgments

This study was funded by National Key R&D Program of China (2023YFD2000802).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Khanal, R.; Choi, Y.; Lee, J. Transforming Poultry Farming: A Pyramid Vision Transformer Approach for Accurate Chicken Counting in Smart Farm Environments. Sensors 2024, 24, 2977. [Google Scholar] [CrossRef] [PubMed]
  2. Geffen, O.; Yitzhaky, Y.; Barchilon, N.; Druyan, S.; Halachmi, I. A machine vision system to detect and count laying hens in battery cages. Animal 2020, 14, 2628–2634. [Google Scholar] [CrossRef]
  3. Bakar, M.; Ker, P.J.; Tang, S.G.H.; Baharuddin, M.Z.; Lee, H.J.; Omar, A.R. Translating conventional wisdom on chicken comb color into automated monitoring of disease-infected chicken using chromaticity-based machine learning models. Front. Vet. Sci. 2023, 10, 1174700. [Google Scholar] [CrossRef]
  4. Yu, Z.W.; Wan, L.Q.; Yousaf, K.; Lin, H.; Zhang, J.; Jiao, H.C.; Yan, G.Q.; Song, Z.H.; Tian, F.Y. An enhancement algorithm for head characteristics of caged chickens detection based on cyclic consistent migration neural network. Poult. Sci. 2024, 103, 103663. [Google Scholar] [CrossRef] [PubMed]
  5. Wu, Z.L.; Zhang, T.M.; Fang, C.; Yang, J.K.; Ma, C.; Zheng, H.K.; Zhao, H.Z. Super-resolution fusion optimization for poultry detection: A multi-object chicken detection method. J. Anim. Sci. 2023, 101, skad249. [Google Scholar] [CrossRef]
  6. Campbell, M.; Miller, P.; Díaz-Chito, K.; Hong, X.; McLaughlin, N.; Parvinzamir, F.; Del Rincón, J.M.; O’Connell, N. A computer vision approach to monitor activity in commercial broiler chickens using trajectory-based clustering analysis. Comput. Electron. Agric. 2024, 217, 108591. [Google Scholar] [CrossRef]
  7. Nasiri, A.; Yoder, J.; Zhao, Y.; Hawkins, S.; Prado, M.; Gan, H. Pose estimation-based lameness recognition in broiler using CNN-LSTM network. Comput. Electron. Agric. 2022, 197, 106931. [Google Scholar] [CrossRef]
  8. Yao, Y.Z.; Yu, H.Y.; Mu, J.; Li, J.; Pu, H.B. Estimation of the Gender Ratio of Chickens Based on Computer Vision: Dataset and Exploration. Entropy 2020, 22, 719. [Google Scholar] [CrossRef]
  9. Adebayo, S.; Aworinde, H.O.; Akinwunmi, A.O.; Alabi, O.M.; Ayandiji, A.; Sakpere, A.B.; Adeyemo, A.; Oyebamiji, A.K.; Olaide, O.; Kizito, E. Enhancing poultry health management through machine learning-based analysis of vocalization signals dataset. Data Brief 2023, 50, 109528. [Google Scholar] [CrossRef]
  10. Aworinde, H.O.; Adebayo, S.; Akinwunmi, A.O.; Alabi, O.M.; Ayandiji, A.; Sakpere, A.B.; Oyebamiji, A.K.; Olaide, O.; Kizito, E.; Olawuyi, A.J. Poultry fecal imagery dataset for health status prediction: A case of South-West Nigeria. Data Brief 2023, 50, 109517. [Google Scholar] [CrossRef]
  11. Han, H.; Xue, X.; Li, Q.; Gao, H.; Wang, R.; Jiang, R.; Ren, Z.; Meng, R.; Li, M.; Guo, Y.; et al. Pig-ear detection from the thermal infrared image based on improved YOLOv8n. Intell. Robot. 2024, 4, 20–38. [Google Scholar] [CrossRef]
  12. Hongwei, L.; Yang, J.; Manlu, L.; Xinbin, Z.; Jianwen, H.; Haoxiang, S. Path planning with obstacle avoidance for soft robots based on improved particle swarm optimization algorithm. Intell. Robot. 2023, 3, 565–580. [Google Scholar]
  13. Dlesk, A.; Vach, K.; Pavelka, K. Photogrammetric Co-Processing of Thermal Infrared Images and RGB Images. Sensors 2022, 22, 1655. [Google Scholar] [CrossRef]
  14. Lin, F.; Hu, W.; Wang, Y.; Tian, Y.; Lu, G.; Chen, F.; Xu, Y.; Wang, X. Universal Object Detection with Large Vision Model. Int. J. Comput. Vis. 2024, 132, 1258–1276. [Google Scholar] [CrossRef]
  15. Chen, X.; Wang, Y.; Chen, C.; Leng, Y.; Fu, C. Towards environment perception for walking-aid robots: An improved staircase shape feature extraction method. Intell. Robot. 2024, 4, 179–195. [Google Scholar] [CrossRef]
  16. Tan, X.J.; Yin, C.C.; Li, X.X.; Cai, M.R.; Chen, W.H.; Liu, Z.; Wang, J.S.; Han, Y.X. SY-Track: A tracking tool for measuring chicken flock activity level. Comput. Electron. Agric. 2024, 217, 108603. [Google Scholar] [CrossRef]
  17. Ma, W.H.; Wang, K.; Li, J.W.; Yang, S.X.; Li, J.F.; Song, L.P.; Li, Q.F. Infrared and Visible Image Fusion Technology and Application: A Review. Sensors 2023, 23, 599. [Google Scholar] [CrossRef]
  18. Fan, J.; Zheng, E.; He, Y.; Yang, J. A Cross-View Geo-Localization Algorithm Using UAV Image and Satellite Image. Sensors 2024, 24, 3719. [Google Scholar] [CrossRef] [PubMed]
  19. Zhao, X.; Wang, L.; Zhang, Y.; Han, X.; Deveci, M.; Parmar, M. A review of convolutional neural networks in computer vision. Artif. Intell. Rev. 2024, 57, 99. [Google Scholar] [CrossRef]
  20. Melak, A.; Aseged, T.; Shitaw, T. The Influence of Artificial Intelligence Technology on the Management of Livestock Farms. Int. J. Distrib. Sens. Netw. 2024, 2024, 8929748. [Google Scholar] [CrossRef]
  21. Li, X.; Cai, M.; Tan, X.; Yin, C.; Chen, W.; Liu, Z.; Wen, J.; Han, Y. An efficient transformer network for detecting multi-scale chicken in complex free-range farming environments via improved RT-DETR. Comput. Electron. Agric. 2024, 224, 109160. [Google Scholar] [CrossRef]
  22. Tong, Q.; Zhang, E.; Wu, S.; Xu, K.; Sun, C. A Real-Time Detector of Chicken Healthy Status Based on Modified YOLO. SIViP; Research Square: London, UK, 2023; pp. 4199–4207. [Google Scholar]
  23. Lv, W.; Xu, S.; Zhao, Y.; Wang, G.; Wei, J.; Cui, C.; Du, Y.; Dang, Q.; Liu, Y. DETRs Beat YOLOs on Real-time Object Detection. arXiv 2023, arXiv:2304.08069. [Google Scholar]
  24. Terven, J.R.; Esparza, D.M.C. A Comprehensive Review of YOLO: From YOLOv1 to YOLOv8 and Beyond. arXiv 2023, arXiv:2304.00501. [Google Scholar]
  25. Varghese, R.; Sambath, M. YOLOv8: A Novel Object Detection Algorithm with Enhanced Performance and Robustness. In Proceedings of the 2024 International Conference on Advances in Data Engineering and Intelligent Computing Systems (ADICS), Chennai, India, 18–19 April 2024; pp. 1–6. [Google Scholar]
  26. Wang, C.-Y.; Yeh, I.-H.; Liao, H. YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information. arXiv 2024, arXiv:2402.13616. [Google Scholar]
  27. Wang, A.; Chen, H.; Liu, L.; Chen, K.; Lin, Z.; Han, J.; Ding, G. YOLOv10: Real-Time End-to-End Object Detection. arXiv 2024, arXiv:2405.14458. [Google Scholar]
  28. Rezatofighi, H.; Tsoi, N.; Gwak, J.; Sadeghian, A.; Reid, I.; Savarese, S. Generalized Intersection Over Union: A Metric and a Loss for Bounding Box Regression. In Proceedings of the 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 15–20 June 2019; pp. 658–666. [Google Scholar]
  29. Chen, J.; Ding, Q.A.; Yao, W.; Shen, M.X.; Liu, L.S. Fine-grained detection of caged-hen head states using adaptive Brightness Adjustment in combination with Convolutional Neural Networks. Int. J. Agric. Biol. Eng. 2023, 16, 208–216. [Google Scholar] [CrossRef]
  30. Cai, Z.; Cui, J.; Yuan, H.; Cheng, M. Application and research progress of infrared thermography in temperature measurement of livestock and poultry animals: A review. Comput. Electron. Agric. 2023, 205, 107586. [Google Scholar] [CrossRef]
  31. Souza-Junior, J.B.F.; El-Sabrout, K.; de Arruda, A.M.V.; Costa, L.L.d.M. Estimating sensible heat loss in laying hens through thermal imaging. Comput. Electron. Agric. 2019, 166, 105038. [Google Scholar] [CrossRef]
  32. Zhang, B.; Xiao, D.; Liu, J.; Huang, S.; Huang, Y.; Lin, T. Pig eye area temperature extraction algorithm based on registered images. Comput. Electron. Agric. 2024, 217, 108549. [Google Scholar] [CrossRef]
Figure 1. Data collection device—autonomous poultry house inspection robot. 1, Lifting device of the chicken inspection robot; 2, information collection and control device; 3, walking device [12]; 4, monitoring and image capture device; 5, image capture device—infrared thermal camera; 6, image capture device—visible light camera; 7, visualization interface.
Figure 1. Data collection device—autonomous poultry house inspection robot. 1, Lifting device of the chicken inspection robot; 2, information collection and control device; 3, walking device [12]; 4, monitoring and image capture device; 5, image capture device—infrared thermal camera; 6, image capture device—visible light camera; 7, visualization interface.
Sensors 24 06385 g001
Figure 2. Data collection process. Hardware selection: mobile phones, visible light cameras, infrared thermal imagers, and other peripheral hardware. Establishment of chicken inspection robot: assemble the chicken inspection robot and debug the image acquisition.
Figure 2. Data collection process. Hardware selection: mobile phones, visible light cameras, infrared thermal imagers, and other peripheral hardware. Establishment of chicken inspection robot: assemble the chicken inspection robot and debug the image acquisition.
Sensors 24 06385 g002
Figure 3. Chicken inspection robot. (a) The overall structure of the dead chicken detection robot; (b) Image acquisition device. 1, Lifting device of the chicken inspection robot; 2, information collection and control system; 3, locomotion device [12]; 4, monitoring and image capture device; 5, image capture device—infrared thermal camera; 6, image capture device—visible light camera.
Figure 3. Chicken inspection robot. (a) The overall structure of the dead chicken detection robot; (b) Image acquisition device. 1, Lifting device of the chicken inspection robot; 2, information collection and control system; 3, locomotion device [12]; 4, monitoring and image capture device; 5, image capture device—infrared thermal camera; 6, image capture device—visible light camera.
Sensors 24 06385 g003
Figure 4. Data collection process flowchart.
Figure 4. Data collection process flowchart.
Sensors 24 06385 g004
Figure 5. Data augmentation processing.
Figure 5. Data augmentation processing.
Sensors 24 06385 g005
Figure 6. The dataset contains various morphological variations of individual laying hens.
Figure 6. The dataset contains various morphological variations of individual laying hens.
Sensors 24 06385 g006
Figure 7. Diverse conditions of caged laying hens in the dataset.
Figure 7. Diverse conditions of caged laying hens in the dataset.
Sensors 24 06385 g007
Figure 8. Variability in RGB-TIR image pairings presented in the dataset.
Figure 8. Variability in RGB-TIR image pairings presented in the dataset.
Sensors 24 06385 g008
Figure 9. Data annotation process.
Figure 9. Data annotation process.
Sensors 24 06385 g009
Figure 10. Dataset structure 1.
Figure 10. Dataset structure 1.
Sensors 24 06385 g010
Figure 11. Dataset structure 2.
Figure 11. Dataset structure 2.
Sensors 24 06385 g011
Figure 12. File count of BClayinghens dataset 1.
Figure 12. File count of BClayinghens dataset 1.
Sensors 24 06385 g012
Figure 13. File count of BClayinghens dataset 2.
Figure 13. File count of BClayinghens dataset 2.
Sensors 24 06385 g013
Figure 14. Chicken head detection dataset quality assessment. (x, y) represents the center coordinates of the chicken head target box; width is the width of the chicken head target box; height is the height of the chicken head target box.
Figure 14. Chicken head detection dataset quality assessment. (x, y) represents the center coordinates of the chicken head target box; width is the width of the chicken head target box; height is the height of the chicken head target box.
Sensors 24 06385 g014
Figure 15. Loss and precision changes of RT-DETR and YOLOv5 chicken head detection models. (a) giou_loss; (b) cls_loss; (c) l1_loss; (d) box_loss; (e) obj_loss.
Figure 15. Loss and precision changes of RT-DETR and YOLOv5 chicken head detection models. (a) giou_loss; (b) cls_loss; (c) l1_loss; (d) box_loss; (e) obj_loss.
Sensors 24 06385 g015
Figure 16. Loss and precision changes of YOLOv8 and YOLOv9 chicken head detection models. (a) box_loss; (b) cls_loss; (c) dfl_loss; (d) box_loss; (e) cls_loss; (f) dfl_loss.
Figure 16. Loss and precision changes of YOLOv8 and YOLOv9 chicken head detection models. (a) box_loss; (b) cls_loss; (c) dfl_loss; (d) box_loss; (e) cls_loss; (f) dfl_loss.
Sensors 24 06385 g016
Figure 17. Loss and precision changes of YOLOv10 chicken head detection model. (a) box_om; (b) cls_om; (c) dfl_om; (d) box_oo; (e) cls_oo; (f) dfl_oo.
Figure 17. Loss and precision changes of YOLOv10 chicken head detection model. (a) box_om; (b) cls_om; (c) dfl_om; (d) box_oo; (e) cls_oo; (f) dfl_oo.
Sensors 24 06385 g017
Figure 18. Model Recall and mAP50 change curves.
Figure 18. Model Recall and mAP50 change curves.
Sensors 24 06385 g018
Figure 19. Recognition effect of the RT-DETR object detection algorithm.
Figure 19. Recognition effect of the RT-DETR object detection algorithm.
Sensors 24 06385 g019
Figure 20. Recognition effect of the YOLOv5 object detection algorithm.
Figure 20. Recognition effect of the YOLOv5 object detection algorithm.
Sensors 24 06385 g020
Figure 21. Recognition effect of the YOLOv8 object detection algorithm.
Figure 21. Recognition effect of the YOLOv8 object detection algorithm.
Sensors 24 06385 g021
Figure 22. Recognition effect of the YOLOv9 object detection algorithm.
Figure 22. Recognition effect of the YOLOv9 object detection algorithm.
Sensors 24 06385 g022
Figure 23. Recognition effect of the YOLOv10 object detection algorithm.
Figure 23. Recognition effect of the YOLOv10 object detection algorithm.
Sensors 24 06385 g023
Figure 24. Chicken head temperature recognition effect.
Figure 24. Chicken head temperature recognition effect.
Sensors 24 06385 g024
Table 1. Technical parameters of the autonomous poultry house inspection robot.
Table 1. Technical parameters of the autonomous poultry house inspection robot.
ModuleCategoryParameter
Walking DeviceNavigation MethodManual/Automatic Magnetic Navigation
Charging MethodSelf Charging
Cruise SpeedTen-speed Adjustment: 3–30 m/min
Turning RadiusZero-radius Turning
Control DeviceIndustrial PCK345, dual network and six serial ports (6 RS485), 8th generation i7 16 G + 256 G, win10–64 bit
Touchscreen11.6-inch (16:9), 1920 × 1080P
System InformationWindows 10 × 64, Intel(R) Core(TM) i7, 16RAM, Memory 256 G SSD + 1T HDD
Communication MethodWiFi + 4G
Sensing DeviceVisible Light CameraDetails are provided in Table 2
Thermal Infrared CameraDetails are provided in Table 2
Gas SensorPump-operated, CO2 measuring range [0~5000 ppm, ±5%], NH3 measuring range [0~50 ppm, ±0.5 ppm]
Temperature and Humidity SensorMeasurement Range [0~50 °C, ±0.2 °C], Measurement Range [0~100%, ±0.3% RH]
Lifting DeviceDimensions820 mm × 600 mm × [Height adjustable from 514 mm to 2519 mm]
Lifting Speed50 mm/s
Table 2. Parameters of experimental equipment.
Table 2. Parameters of experimental equipment.
EquipmentCategorySpecifications
SmartphoneCamera manufacturerHONOR (Shenzhen, China)
Camera modelANN-AN00
Resolution2592 × 1944
Visible light camera on the robotCamera modelLRCP20680_1080P
Resolution1920 × 1080
Infrared thermal camera on robotCamera manufacturerFLIR Systems
Camera modelFLIR A300 9 Hz
Resolution320 × 240
Table 3. Single experiment data collection plan.
Table 3. Single experiment data collection plan.
No.TimeGeneral State of HensCapturing ToolImage Type
1Day 1, 7 a.m.Looking aroundSmartphoneRGB
2Day 2, 1 p.m.Looking aroundRobotRGB + TIR
3Day 3, 7 p.m.RestingRobotRGB
4Day 4, 9 p.m.RestingRobotRGB + TIR
5Day 5, 11 a.m.FeedingSmartphoneRGB
6Day 6, 5 p.m.FeedingRobotRGB + TIR
7Day 7, 2 p.m.Manual handlingSmartphoneRGB
8Day 8, 11: 30 a.m.Large-scale movement of feed cartRobotRGB
9Day 9, 11 a.m.PeckingSmartphoneRGB
10Day 10, 04: 30 p.m.Egg collection device movementSmartphoneRGB
11Day 11, 9 a.m.ExcitedRobotRGB + TIR
12Day 12, 3 p.m.ExcitedRobotRGB
Table 4. Data selection criteria.
Table 4. Data selection criteria.
Serial NumberCriteriaContent
1Resolution2592 × 1944, 1920 × 1080, 320 × 240.
2ClarityDelete blurry or out-of-focus images.
3Environmental VariationThe henhouse has 4 levels, with samples from each level accounting for 25%.
4Sample QuantityMore than 6 images per cage.
5Image Format.jpg
6Number of Hens per ImageMore than 1 hen
7Action VariationLooking around, resting, eating, pecking, excitement; each accounting for 20%.
Table 5. Specifications table of BClayinghens.
Table 5. Specifications table of BClayinghens.
SubjectDataset of Visible Light and Thermal Infrared Images for Caged Laying Hens,
Precision Laying Hen Farming.
Specific Academic FieldDeep learning-based image recognition, counting, health monitoring, and behavioral analysis of caged laying hens.
Data FormatsRaw images, XML annotations, TXT annotations, JSON annotations.
Data TypesVisible light (RGB) images, thermal infrared (TIR) images.
Data AcquisitionA chicken inspection robot together with a smartphone, visible light camera, and infrared thermal imager was used to collect images of laying hens with various poses within a large-scale poultry farm. The collected images comprise RGB and TIR images with resolutions of 2592 × 1944, 1920 × 1080, and 320 × 240, totaling 61,133. The dataset, after compression, is 76.1 GB in size and is available for download in ZIP format.
Data Source LocationCountry: China; City: Shengzhou, Hebei;
Institution: Shengzhou Xinghuo Livestock and Poultry Professional Cooperative.
Data AccessibilityRepository Name: BClayinghens
Direct URL to the Data: https://github.com/maweihong/BClayinghens.git (accessed on 1 September 2024)
Table 6. Comparison test results of different models.
Table 6. Comparison test results of different models.
SubjectModel Size
(MB)
Parameters
(M)
Computation
(GFLOPs)
Precision
(%)
Recall
(%)
mAP50
(%)
RT-DETR-l66.232.0103.493.6993.3596.78
RT-DETR-ResNet5086.041.9125.694.4293.8496.54
RT-DETR-ResNet101124.260.9186.292.4192.1895.94
RT-DETR-x135.465.5222.593.2992.8896.93
YOLOv5n3.91.94.594.5294.9297.52
YOLOv5s14.47.216.595.9895.8297.54
YOLOv5m42.221.249.096.2795.1397.59
YOLOv5l92.846.5109.195.9294.8797.27
YOLOv5x173.186.7205.795.5995.2397.35
YOLOv8n6.33.28.795.0694.1697.51
YOLOv8s22.511.228.695.9794.8397.38
YOLOv8m52.125.978.996.4894.8997.71
YOLOv8l88.743.7165.295.9894.4297.55
YOLOv8x136.768.2257.896.2894.2997.43
YOLOv9t6.42.07.792.2492.1296.68
YOLOv9s20.37.126.494.0794.6997.21
YOLOv9m66.220.076.395.9795.0997.92
YOLOv9c102.825.3102.195.9695.5497.81
YOLOv9e140.057.3189.095.8595.7397.87
YOLOv10n5.82.36.791.8792.5495.94
YOLOv10s16.67.221.695.1894.0297.24
YOLOv10m33.515.459.194.6292.5496.81
YOLOv10b41.519.192.095.6293.8497.13
YOLOv10l52.224.4120.395.9494.0497.32
YOLOv10x64.129.5160.495.7493.6797.17
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Ma, W.; Wang, X.; Xue, X.; Li, M.; Yang, S.X.; Guo, Y.; Gao, R.; Song, L.; Li, Q. A Dataset of Visible Light and Thermal Infrared Images for Health Monitoring of Caged Laying Hens in Large-Scale Farming. Sensors 2024, 24, 6385. https://doi.org/10.3390/s24196385

AMA Style

Ma W, Wang X, Xue X, Li M, Yang SX, Guo Y, Gao R, Song L, Li Q. A Dataset of Visible Light and Thermal Infrared Images for Health Monitoring of Caged Laying Hens in Large-Scale Farming. Sensors. 2024; 24(19):6385. https://doi.org/10.3390/s24196385

Chicago/Turabian Style

Ma, Weihong, Xingmeng Wang, Xianglong Xue, Mingyu Li, Simon X. Yang, Yuhang Guo, Ronghua Gao, Lepeng Song, and Qifeng Li. 2024. "A Dataset of Visible Light and Thermal Infrared Images for Health Monitoring of Caged Laying Hens in Large-Scale Farming" Sensors 24, no. 19: 6385. https://doi.org/10.3390/s24196385

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop