{"id":139,"date":"2023-04-12T17:51:49","date_gmt":"2023-04-12T21:51:49","guid":{"rendered":"https:\/\/site.caes.uga.edu\/precisionpoultry\/?p=139"},"modified":"2023-04-12T17:51:52","modified_gmt":"2023-04-12T21:51:52","slug":"monitoring-spatial-distribution-of-laying-hens-with-deep-learning","status":"publish","type":"post","link":"https:\/\/site.caes.uga.edu\/precisionpoultry\/2023\/04\/monitoring-spatial-distribution-of-laying-hens-with-deep-learning\/","title":{"rendered":"Monitoring Spatial Distribution of Laying Hens with Deep Learning"},"content":{"rendered":"\n<div data-wp-interactive=\"core\/file\" class=\"wp-block-file\"><object data-wp-bind--hidden=\"!state.hasPdfPreview\" hidden class=\"wp-block-file__embed\" data=\"https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/PDF.pdf\" type=\"application\/pdf\" style=\"width:100%;height:600px\" aria-label=\"Embed of PDF.\"><\/object><a id=\"wp-block-file--media-463f0122-1de1-4bee-b817-29c2c779719f\" href=\"https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/PDF.pdf\">PDF<\/a><a href=\"https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/PDF.pdf\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-463f0122-1de1-4bee-b817-29c2c779719f\">Download<\/a><\/div>\n\n\n\n<p><strong>Introduction<\/strong><\/p>\n\n\n\n<p>The spatial distribution of laying hens in cage-free houses is an indicator of flock\u2019s health and welfare. While larger space allows chickens to perform more natural behaviors such as dustbathing, foraging, and perching in cage-free houses, an inherent challenge is evaluating chickens\u2019 spatial distribution (e.g., real-time birds\u2019 number on perches or in nesting boxes). Manual inspection of hen\u2019s spatial distribution requires closer observation, which is labor intensive, time consuming, subject to human errors, and stress causing on birds. Therefore, an automated monitoring system is required to track the spatial distribution of hens for early detection of animal welfare and health concerns.<\/p>\n\n\n\n<p><strong>Methods<\/strong><\/p>\n\n\n\n<p>About 800 of day-old chicks (Hy-Line W-36) were raised in four research chamber rooms (each was measured as 7.3 m long \u00d7 6.1 m wide \u00d7 3 m high) at the Poultry Science Center at the University of Georgia (UGA). Cameras (Swann Communications, Santa Fe Spring, CA) were installed with two different angles (i.e., vertically and horizontally) to record the spatial distribution of birds (Figure 1). The recorded videos were transferred to massive hard devices for analyzing video quality and converting to JPG format in the Department of Poultry Science at UGA. &nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"684\" height=\"513\" src=\"https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/Picture1.jpg\" alt=\"\" class=\"wp-image-140\" srcset=\"https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/Picture1.jpg 684w, https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/Picture1-300x225.jpg 300w\" sizes=\"auto, (max-width: 684px) 100vw, 684px\" \/><\/figure>\n\n\n\n<p><em>Figure 1.Experimental setup for collecting laying hens\u2019 spatial distribution dataset.<\/em><\/p>\n\n\n\n<p>In this study, an improved YOLOv5 model was developed for chicken detection. The architecture consisted of three parts, i.e., backbone, neck, and head. The improved YOLOv5 model is based on CNN network that can take in an input image and capture its spatial characters (learnable weights) to train the network to detect object. In this study, the Ghost was adopted to process hen\u2019s feature maps (Figure 2). The original hen\u2019s feature map is blurry after YOLOv5 neck network. However, with the Ghost module, the channel number of hen\u2019s feature maps improved, and an enhanced hen\u2019s feature pyramid developed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"869\" height=\"315\" src=\"https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/Picture2.jpg\" alt=\"\" class=\"wp-image-141\" srcset=\"https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/Picture2.jpg 869w, https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/Picture2-300x109.jpg 300w, https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/Picture2-768x278.jpg 768w\" sizes=\"auto, (max-width: 869px) 100vw, 869px\" \/><\/figure>\n\n\n\n<p><em>Figure 2. Module for processing poultry images.<\/em><\/p>\n\n\n\n<p><strong>Results<\/strong><\/p>\n\n\n\n<p>To evaluate the model performance and explore optimal setting parameters, the YOLOv5 \u2013 x method and several training parameters were applied. These parameters include image size (e.g., 640 and 320) and datasets (e.g., individual type dataset and mixed type dataset). Figure 3 shows the birds detected by improved YOLOv5 model. In the perching zone (Figure 3A), the model monitored perched chickens from 0 to 2.4 m and summed up them to three different levels (the number of hens in three levels were 7, 61, and 17 from bottom to top of the perch frame, respectively). For baby chicks\u2019 perching (Figure 3B), there were 8 hardwood perching boards. The number of detected chicks in each perching board was 2, 3, 1, 5, 4, 1, 6 and 4, respectively, from far to close in the Figure 3B. <strong><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"965\" height=\"362\" src=\"https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/Picture3.jpg\" alt=\"\" class=\"wp-image-142\" srcset=\"https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/Picture3.jpg 965w, https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/Picture3-300x113.jpg 300w, https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/Picture3-768x288.jpg 768w\" sizes=\"auto, (max-width: 965px) 100vw, 965px\" \/><\/figure>\n\n\n\n<p><em>Figure 3. Chickens\u2019 distribution in perching zones detected by improved YOLOv5. (A) adult hens (133 days of old) detected; (B) baby chicks detected (8 days of old). The letter b in blue means older birds (&gt; 10 days old) and the letter s in blue represents baby chicks (\u2264 10 days old).<\/em><\/p>\n\n\n\n<p>Figure 4 demonstrates the distribution of detected birds in feeding zones. For each picture, the number of chickens in targeted areas were analyzed. From Figure 4, we can identify the distribution of baby chicks (i.e., 10 days old) in feeding zone in 100% accuracy.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"929\" height=\"261\" src=\"https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/Picture4.jpg\" alt=\"\" class=\"wp-image-143\" srcset=\"https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/Picture4.jpg 929w, https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/Picture4-300x84.jpg 300w, https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/Picture4-768x216.jpg 768w\" sizes=\"auto, (max-width: 929px) 100vw, 929px\" \/><\/figure>\n\n\n\n<p><em>Figure 4. Chickens\u2019 distribution in the feeding zone at different ages (A \u2013 chickens were 10 days old; B and C \u2013 chickens were 122 days old (b means birds were &gt; 10 days; s means birds were \u226410 day).<\/em><\/p>\n\n\n\n<p>In this study, most hens started to lay their first eggs at around 18 weeks of age. Hens\u2019 nesting was analyzed with our newly developed model because it\u2019s important to identify if there are floor eggs or not. Monitoring hens\u2019 distribution in nesting zones helps to minimize losses from laying eggs on the floor. Figure 5 shows the distribution of detected hens in nesting zones with our improved YOLOv5 model. Figure 5A is the original image of nesting area. Figure 5B demonstrates the detected hens in nesting zone. The model performed with over 90% accuracy in detecting hens in nesting zones.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"852\" height=\"426\" src=\"https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/Picture5.jpg\" alt=\"\" class=\"wp-image-144\" srcset=\"https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/Picture5.jpg 852w, https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/Picture5-300x150.jpg 300w, https:\/\/site.caes.uga.edu\/precisionpoultry\/files\/2023\/04\/Picture5-768x384.jpg 768w\" sizes=\"auto, (max-width: 852px) 100vw, 852px\" \/><\/figure>\n\n\n\n<p><em>Figure 5. Chicken distribution in nesting zone: (A) original image of nesting area and (B) detected nesting area.<\/em><\/p>\n\n\n\n<p><strong>Summary<\/strong><\/p>\n\n\n\n<p>In this study, an improved deep learning model was developed to monitor cage \u2013 free hens\u2019 spatial and floor distributions, including the real-time number of birds in perching zone, feeding zone, drinking zone, and nesting zone. The accuracies of the new model were 87 \u2013 94% for all ages of chickens across zones. Birds\u2019 age affected the performance of the model as younger birds had smaller body size and were hard to be detected due to blackness or occultation by equipment. The performance of the model was 0.891 and 0.942 for baby chicks (\u226410 days old) and older birds (&gt; 10 days) in detecting perching behaviors; 0.874 and 0.932 in detecting feeding\/drinking behaviors. The current findings provide references for automatically monitoring cage \u2013 free laying hens\u2019 spatial distribution in all age level (from baby chicks to hens). More future chicken behavior identification works could be combined with the model to reach an automatic detection system.<\/p>\n\n\n\n<p>Further reading:<\/p>\n\n\n\n<p><em>Yang, X., Bist, R.B., Subedi, S.,&nbsp;Chai, L&nbsp;(2023). A deep learning method for monitoring spatial distribution of cage-free hens.&nbsp; Artificial Intelligence in Agriculture, 8, 20-29.<\/em><\/p>\n\n\n\n<p><a href=\"https:\/\/doi.org\/10.1016\/j.aiia.2023.03.003\">https:\/\/doi.org\/10.1016\/j.aiia.2023.03.003<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction The spatial distribution of laying hens in cage-free houses is an indicator of flock\u2019s health and welfare. While larger space allows chickens to perform more natural behaviors such as dustbathing, foraging, and perching in cage-free houses, an inherent challenge is evaluating chickens\u2019 spatial distribution (e.g., real-time birds\u2019 number on perches or in nesting boxes). [&hellip;]<\/p>\n","protected":false},"author":837,"featured_media":140,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[],"class_list":["post-139","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-poultry-monitoring","category-precision-animal-production"],"_links":{"self":[{"href":"https:\/\/site.caes.uga.edu\/precisionpoultry\/wp-json\/wp\/v2\/posts\/139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/site.caes.uga.edu\/precisionpoultry\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/site.caes.uga.edu\/precisionpoultry\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/site.caes.uga.edu\/precisionpoultry\/wp-json\/wp\/v2\/users\/837"}],"replies":[{"embeddable":true,"href":"https:\/\/site.caes.uga.edu\/precisionpoultry\/wp-json\/wp\/v2\/comments?post=139"}],"version-history":[{"count":1,"href":"https:\/\/site.caes.uga.edu\/precisionpoultry\/wp-json\/wp\/v2\/posts\/139\/revisions"}],"predecessor-version":[{"id":146,"href":"https:\/\/site.caes.uga.edu\/precisionpoultry\/wp-json\/wp\/v2\/posts\/139\/revisions\/146"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/site.caes.uga.edu\/precisionpoultry\/wp-json\/wp\/v2\/media\/140"}],"wp:attachment":[{"href":"https:\/\/site.caes.uga.edu\/precisionpoultry\/wp-json\/wp\/v2\/media?parent=139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/site.caes.uga.edu\/precisionpoultry\/wp-json\/wp\/v2\/categories?post=139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/site.caes.uga.edu\/precisionpoultry\/wp-json\/wp\/v2\/tags?post=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}