A method and system for estimating broiler weight based on two-view images

By using a two-view image-based method for estimating broiler weight, and combining an image classification and segmentation network with a RepVGGVan network, the problems of accuracy and efficiency in broiler weight estimation are solved, achieving efficient and accurate weight prediction.

CN120279547BActive Publication Date: 2026-11-10CHINA AGRI UNIV +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510405580.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-02
Publication Date
2026-11-10
Estimated Expiration
2045-04-02

Smart Images

  • Figure CN120279547B_ABST
    Figure CN120279547B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for estimating broiler weight based on two-view images, belonging to the field of computer vision technology. The method includes: in response to a sensor detecting that a broiler has entered a shooting location, a shooting device acquires a set of two-view images of the broiler; constructing an image classification network to filter the two-view image set to obtain two-view images that meet the shooting conditions; constructing an image segmentation network to perform semantic segmentation processing on the two-view images that meet the shooting conditions to obtain segmented two-view images; and inputting the segmented two-view images into a RepVGGVan network to estimate the broiler weight. The system includes a broiler image acquisition device and a computing module. Using a consumer-grade camera to acquire 2D images enables efficient and stable broiler weight estimation, which is of great significance to the broiler farming industry and assists in breeding work.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision technology, and specifically relates to a method and system for estimating the weight of broilers based on two-view images. Background Technology

[0002] With the continuous development of the poultry farming industry, body weight, as an important indicator of broiler growth, plays a crucial role in production management and genetic breeding. Body weight data not only reflects the health status and nutritional level of broilers but also provides a scientific basis for individual selection in genetic breeding. Furthermore, it plays a key role in farm production management, helping to determine the optimal slaughter time and avoid economic losses caused by overfeeding. Therefore, accurately and quickly obtaining broiler body weight information is of great significance for efficient farm management and breeding selection.

[0003] In existing technologies, broiler weight measurement mainly relies on two types of methods: contact and non-contact. Contact measurement typically uses equipment such as electronic scales and measuring rulers, with weight or body size data collected manually. While this method offers a certain level of measurement accuracy, it has several limitations in practical applications. First, manual operation is time-consuming and labor-intensive, making it difficult to meet the production needs of large-scale farms. Second, contact measurement can easily cause stress reactions in animals, affecting their normal growth and health. Furthermore, the accuracy of measurement data is easily influenced by the operator's experience and subjective judgment, resulting in poor data consistency and impacting the accuracy of subsequent decision-making and breeding. Finally, weighing equipment may introduce measurement errors under the influence of animal behavior, further affecting the reliability of the data.

[0004] To address these issues, in recent years, with the rapid development of machine vision technology, non-contact measurement methods based on 2D images have been increasingly applied to livestock weight estimation. Compared to contact measurement, non-contact measurement offers several advantages, including reduced animal disturbance, decreased stress response, and compliance with animal welfare requirements. Furthermore, non-contact measurement technology enables automated operation, reduces human intervention, and improves data acquisition efficiency and accuracy. In addition, non-contact measurement can estimate the weight of multiple animals in a shorter time, significantly improving production efficiency. However, the application of existing non-contact measurement technologies in broiler weight estimation still faces many challenges. Due to the light weight and high mobility of broilers, wing movements can easily obscure key body parts, making the accuracy of traditional 2D images in capturing full-body features insufficient, thus affecting the accuracy of weight estimation.

[0005] Currently, numerous machine vision-based weight estimation technologies have been applied to large livestock such as pigs, cattle, and sheep. These technologies typically rely on 2D or 3D cameras to capture side or top images of the animal, using image processing algorithms to extract body shape features, and combining these with regression algorithms for weight estimation. These methods have achieved good results in large livestock. However, for broilers, due to their smaller size and more active nature, existing technologies are not yet ideal for weight estimation.

[0006] Chinese patent application No. 202411483188.X, entitled "A Method and System for Estimating Poultry Weight Based on 2D Images," discloses a method and system for estimating poultry weight based on three-view images, which requires three image acquisition devices. Furthermore, subsequent research by the inventors revealed room for optimization in the image segmentation network and convolutional neural network. Therefore, there is an urgent need to develop a method and system for estimating broiler weight based on two-view images, optimized for broiler characteristics, utilizing fewer consumer-grade cameras to acquire broiler images, and combining more advanced image processing and deep learning algorithms to achieve efficient and stable weight estimation. Summary of the Invention

[0007] The purpose of this invention is to provide a method for estimating the weight of broilers based on two-view images, characterized by the following steps:

[0008] Step S1: In response to the sensor detecting that the broiler has entered the shooting location, the shooting device acquires a set of two-view images of the broiler;

[0009] Step S2: Construct an image classification network to filter the set of two-view images and obtain two-view images that meet the conditions for being photographable;

[0010] Step S3: Construct an image segmentation network to perform semantic segmentation on two-view images that meet the conditions for being photographable, and obtain segmented two-view images;

[0011] Step S4: Based on the segmented two-view images, input the RepVGGVan network to estimate the weight of the broilers.

[0012] The two view images in step S1 include a top view and a side-rear view; the shooting equipment includes a top view shooting equipment and a side-rear view shooting equipment.

[0013] In step S1, the sensor is a radio frequency identification (RFID) sensor. The broiler chicken wears an RFID tag to detect when the broiler chicken enters and leaves the shooting location and to detect the broiler chicken's identification information.

[0014] The image classification network in step S2 is the DeformAttn-ShuffleNetV2 network. The DeformAttn-ShuffleNetV2 network builds a deformable attention module on top of ShuffleNetV2 to incorporate the SKNet attention mechanism and deformable convolution. The input to the DeformAttn-ShuffleNetV2 network is the side-rear view image from the two-view images. The output of the DeformAttn-ShuffleNetV2 network is the classification result for the broiler state. The classification result includes zhanli and qita. When the classification result is zhanli, it is determined that the two-view image corresponding to the input side-rear view image meets the conditions for being photographed.

[0015] The network structure of the deformable attention module is as follows: the input feature channels are divided into a first branch and a second branch; the first branch includes, in sequence: 3×3 convolution, batch normalization, 1×1 convolution, batch normalization, and linear rectified function; the second branch includes, in sequence: 1×1 convolution, batch normalization, linear rectified function, 3×3 convolution, batch normalization, 1×1 convolution, batch normalization, linear rectified function, 1×1 convolution, batch normalization, linear rectified function, DA convolution, batch normalization, 1×1 convolution, batch normalization, and linear rectified function; the first branch and the second branch are merged and then subjected to channel shuffling; the DA convolution includes: depthwise separable convolution with both input and output channels c, batch normalization, linear rectified function, deformable convolution with both input and output channels c, batch normalization, linear rectified function, a first fully connected layer, a second fully connected layer, and a Softmax function.

[0016] The conditions for taking photos in step S2 are: the broiler enters the cage, puts its head through the partition and begins to eat; the broiler is in a standing position; and the broiler's wings are tucked in.

[0017] In step S3, the image segmentation network is the CoRSeaFormer segmentation model. The CoRSeaFormer network is built on the basis of SeaFormer, with a compression-enhanced axial attention module under coordinate convolution and a receptive field attention convolution fusion module. The compression-enhanced axial attention module under coordinate convolution is used to introduce coordinate convolution, and the receptive field attention convolution fusion module is used to introduce receptive field attention convolution. The input of the CoRSeaFormer network is two-view images. The output of the CoRSeaFormer network is the segmentation result of the two-view images of broiler chickens.

[0018] The network structure of the compressed and enhanced axial attention module is as follows: the input feature channels are processed by coordinate convolution to calculate the query, key, and value; the query, key, and value are divided into a detail enhancement kernel branch and an axial attention compression branch; the detail enhancement kernel branch includes, in sequence: concatenating the query, key, and value channels, 3×3 depthwise separable convolution, batch normalization, linear rectified function, 1×1 convolution, and batch normalization; the axial attention compression branch is divided into horizontal sub-branches and vertical sub-branches; the horizontal sub-branches include, in sequence: horizontal compression of the query, key, and value, and multi-head attention; the vertical sub-branches include, in sequence: vertical compression of the query, key, and value, and multi-head attention; the horizontal and vertical sub-branches are added point-by-point using tensor broadcasting and then subjected to 1×1 convolution; the detail enhancement kernel branch and the axial attention compression branch are merged by multiplication; the coordinate convolution includes: coordinate generation, normalization, and adding coordinate channels.

[0019] The network structure of the receptive field attention convolutional fusion module is as follows: the input feature channels consist of a third branch and a fourth branch; the third branch includes, in sequence, a receptive field attention convolutional module; the fourth branch includes, in sequence, a 3×3 convolution, batch normalization, a sigmoid activation function, and an upsampling operation; the third branch and the fourth branch are multiplied and then merged; the receptive field attention convolutional module includes a region attention mechanism, a convolutional layer, and residual connections.

[0020] In step S4, the RepVGGVan network receives a synthesized image composed of segmented two-view images and outputs an estimated broiler weight. The synthesized image sequentially passes through a first 3×3 convolutional layer, a first 1×1 convolutional layer, a first downsampling layer, a second 3×3 convolutional layer, a second 1×1 convolutional layer, a first residual connection layer, a third 3×3 convolutional layer, a third 1×1 convolutional layer, a second residual connection layer, a fourth 3×3 convolutional layer, a fourth 1×1 convolutional layer, a third residual connection layer, and a visual attention module to obtain the estimated broiler weight. The first 3×3 convolutional layer has a stride of 2 and padding of 1. The other 3×3 convolutional layers have a stride of 1 and padding of 1. The 1×1 convolutional layer has a stride of 1 and no padding. The first downsampling layer is a convolution function with a stride of 2. The residual connection layer is a residual operation in ResNet. The visual attention module includes channel attention, spatial attention, and a weighted fusion of the two.

[0021] The parameter adjustment process of the RepVGGVan network is as follows:

[0022] First, adjust the learning rate, decreasing it from 0.1 to 0.0001.

[0023] Secondly, adjust the batch size according to the size of the dataset and the available computing resources;

[0024] The optimizer is then retuned; the optimizer is either SGD or Adam.

[0025] Finally, adjust the regularization parameters, including L1 regularization, L2 regularization, and Dropout.

[0026] Another objective of this invention is to disclose a broiler weight estimation system based on a two-view image estimation method according to the present invention, characterized in that it includes: a broiler image acquisition device and a weight estimation device.

[0027] The broiler image acquisition device includes: a cage, a top-view camera, a side-rear-view camera, and an acquisition triggering device. The cage has an opening on one side, through which the broiler to be tested enters the cage. Inside the cage, a partition divides the interior into a feed storage area and a broiler standing area. The feed storage area contains a feed container. The broiler standing area can accommodate a single broiler to be tested standing upright. A feeding hole is located on the partition, restricting the broiler to only allow its head to pass through the hole to feed. The top-view camera is fixed to the top of the cage to acquire top-view images of the broiler feeding. The side-rear-view camera is fixed to the outside of the cage, near the cage opening, to acquire side-rear-view images of the broiler feeding. The acquisition triggering device is used to trigger image acquisition and perform weight estimation.

[0028] The two-view images include: a top view image and a side-rear view image of the broiler chickens being fed.

[0029] The weight estimation device includes: an image classification network module, an image segmentation network module, and a RepVGGVan network module. The image classification network module is used to filter the set of two-view images, inputting the side-rear images from the two-view images into the DeformAttn-ShuffleNetV2 network, and outputting the classification result of the broiler state to obtain the filtered two-view images. The image segmentation network module is used to perform semantic segmentation processing on the two-view images that meet the shooting conditions to obtain the segmented two-view images. The RepVGGVan network module is used to estimate the weight of the broilers using the segmented two-view images.

[0030] The beneficial effects of this invention are as follows:

[0031] This invention discloses a method for estimating broiler weight based on two-view images. Using existing intelligent weighing equipment or intelligent poultry breeding equipment, two consumer-grade infrared cameras are installed on the side and top of the breeding cage, respectively, to collect two-view images of a single broiler in its natural feeding state from both side-rear and top-down perspectives. By reusing existing breeding equipment, it can collect complete body images of broilers at different ages throughout their growth cycle. By integrating image information from both perspectives, it better adapts to the active nature of broilers. Taking advantage of the broilers' natural feeding instinct—they are highly likely to actively feed after entering the shooting area—the system automatically sets up standby mode after collecting multiple sets of two-view images within 1-3 seconds of sensing the broiler's entry into the shooting area, significantly reducing camera power consumption.

[0032] Existing technologies for weight estimation based on computer vision require detailed identification of key features, such as chest width and body length, leading to high computational and power consumption. This limitation is particularly pronounced for broiler animals, which are naturally active, whose wings significantly influence body contour recognition, and which are numerous. This invention, through extensive observation and experimentation, reveals that broiler animals are highly likely to feed immediately upon entering the collection area. Furthermore, considering the position of the partition and feeding trough, broilers are likely to briefly maintain a standing posture with folded wings while feeding, extending their necks to allow their heads to pass through the partition openings. In this state, multiple sets of two-view images can be captured within 1-3 seconds of sensing a broiler entering the collection area, eliminating the need for detailed identification of specific body parts, especially for side-rear views. This also avoids variations in the degree of neck extension among different broilers during feeding. This invention constructs an image classification network and defines the photographic conditions for two-view images, automatically identifying images that meet these conditions, effectively reducing the computational requirements during the recognition process.

[0033] The image classification network described is the DeformAttn-ShuffleNetV2 network, which builds deformable attention modules (DeformAttn Blocks) on top of ShuffleNetV2 to implement the SKNet attention mechanism and deformable convolution. By constructing deformable attention modules, it can better dynamically adjust to adapt to various environmental changes within the "chicken coop," such as changes in light intensity and random clutter. Therefore, the DeformAttn-ShuffleNetV2 network disclosed in this invention achieves good performance in terms of accuracy, parameter count, and FLOPs.

[0034] Based on the accurate identification of two-view images that meet the conditions for photography by the DeformAttn-ShuffleNetV2 network, the CoRSeaFormer segmentation model is used as the image segmentation network. This can obtain images with high segmentation accuracy in complex environments. Moreover, only a small amount of data annotation is required to obtain segmented two-view images with high segmentation accuracy under the premise of low computational cost and low memory requirements.

[0035] Based on the segmented two-view images, the RepVGGVan network predicts the weight of broilers. By adjusting the parameters of the RepVGGVan network, a relatively accurate prediction result is obtained. Experiments verify that the predicted value obtained by applying the broiler weight estimation method based on two-view images disclosed in this invention has a high degree of fit with the actual value and can achieve good prediction results. Attached Figure Description

[0036] Figure 1 This is a flowchart illustrating a method for estimating broiler weight based on two-view images according to the present invention.

[0037] Figure 2 These are two-view segmented images in an embodiment of the present invention, wherein (a) is a side-rear view - RGB image; (b) is a side-rear view - segmented image; (c) is a top view - RGB image; and (d) is a top view - segmented image.

[0038] Figure 3 These are schematic diagrams of the camera installation position in the side rear view and top view of an embodiment of the present invention;

[0039] Figure 4 This is a schematic diagram of a set of RGB images of the object to be estimated under a natural feeding state in an embodiment of the present invention;

[0040] Figure 5 This is a schematic diagram of the DeformAttn-ShuffleNetV2 network provided by the present invention;

[0041] Figure 6 for Figure 5 Enlarged view of the network structure of the deformable attention module;

[0042] Figure 7 for Figure 6 Enlarged view of the network structure of the DA convolutional part;

[0043] Figure 8 This is a schematic diagram of the structure of CoRSeaFormer provided by the present invention;

[0044] Figure 9 A schematic diagram of the structure of the compressed enhanced axial attention module under coordinate convolution provided by the present invention;

[0045] Figure 10 for Figure 8 Enlarged view of the receptive field attention convolutional fusion module structure;

[0046] Figure 11 for Figure 9 Enlarged view of the structure of coordinate convolution;

[0047] Figure 12 This is a schematic diagram of the RepVGGVan network provided by the present invention.

[0048] Figure 13 for Figure 12 Enlarged view of the structure of the visual attention module

[0049] Figure 14 This is a top view schematic diagram of the structure of a broiler chicken image acquisition device according to the present invention;

[0050] Figure 15 This is a rear view schematic diagram of the structure of a broiler chicken image acquisition device according to the present invention;

[0051] Figure 16 This is a schematic diagram of the structure of a broiler weight estimation system based on two-view images according to the present invention;

[0052] Among them, there are broiler image acquisition device-100, weight estimation device-200, cage-101, partition-102, feed storage area-103, broiler standing area-104, feed container-105, feeding hole-106, top view camera-107, side and rear view camera-108, and cage opening-109. Detailed Implementation

[0053] This invention provides a method and system for estimating the weight of broilers based on two-view images. The invention will be further described in detail below with reference to the accompanying drawings.

[0054] like Figure 1 The embodiment of the present invention shown discloses a method for estimating the weight of broilers based on two-view images, including the following steps:

[0055] Step S1: In response to the sensor detecting that the broiler has entered the shooting location, the shooting device acquires a set of two-view images of the broiler;

[0056] Step S2: Construct an image classification network to filter the set of two-view images and obtain two-view images that meet the conditions for being photographable;

[0057] Step S3: Construct an image segmentation network to perform semantic segmentation on two-view images that meet the conditions for being photographable, and obtain segmented two-view images;

[0058] Step S4: Based on the segmented two-view images, input the RepVGGVan network to estimate the weight of the broilers.

[0059] In this embodiment, the broiler weight estimation method based on two-view images disclosed in this invention is applicable to scenarios involving weight estimation of the object to be estimated, such as weight estimation in broiler breeding. This embodiment uses broiler weight estimation as an example. The specific implementation methods of each step are described below with reference to specific embodiments.

[0060] Step S1: In response to the sensor detecting that the broiler has entered the shooting location, the shooting device acquires a set of two-view images of the broiler;

[0061] The two view images in step S1 include a top view and a side-rear view; the shooting equipment includes a top view shooting equipment and a side-rear view shooting equipment.

[0062] In this embodiment, the imaging device consists of two consumer-grade infrared cameras, which are respectively mounted on the side and top of the weight estimation device to capture two-view images of a single broiler chicken in a natural feeding state from both side-rear and top-down perspectives. The imaging time is from the moment the broiler chicken stands on the weight estimation device until it finishes feeding and leaves the device, resulting in multiple sets of two-view images in the natural feeding state, as shown below. Figure 4 As shown, a set of two-view images of broiler chickens is formed.

[0063] Those skilled in the art should understand that, in response to the sensor detecting that the broiler chicken meets the conditions for being filmable, the camera is triggered to begin filming. The conditions for being filmable are:

[0064] The broiler chickens enter the cage, put their heads through the partition, and begin to eat; the broiler chickens are in an upright position; and the broiler chickens' wings are tucked in.

[0065] The sensors include, but are not limited to, infrared sensors, optical sensors, bioelectric sensors, and weighing scales, etc., and are not specifically limited in this embodiment.

[0066] Based on extensive experimental observations by the inventors, it was found that in most cases, driven by their natural instincts, broilers will immediately rush towards food upon entering the cage. This causes them to stretch their necks, allowing their heads to pass through the cage partitions, maintaining an upright posture, and keeping their wings tucked in. Therefore, in most cases, when the sensor detects that the broiler has been in the cage for 1 to 3 seconds, it is highly likely that the broiler is in a condition suitable for being photographed. At this time, triggering the shooting opportunity allows the camera to capture 3 to 5 sets of two-view images. In this embodiment, even if the broiler is not in a condition suitable for being photographed within 1 to 3 seconds, unqualified images can be manually rejected during the model training phase. In actual production environments, unqualified images can be rejected by using an image classification network in subsequent steps. Therefore, in this embodiment, the timing for capturing multiple sets of two-view images is within 1 to 3 seconds of the sensor detecting that the broiler has entered the cage. Thus, the method for sensing the shooting opportunity used in this embodiment has the advantages of simple structure, rapid judgment, and low cost.

[0067] In step S1, the sensor is a radio frequency identification (RFID) sensor. The broiler chicken wears an RFID tag to detect when the broiler chicken enters and leaves the shooting location and to detect the broiler chicken's identification information.

[0068] In a preferred embodiment, the broiler chickens are equipped with electronic tags, and the sensor is an electronic tag sensor. By using the electronic tag sensor in conjunction with the electronic tag, it is possible not only to detect when the broiler chickens enter a designated area within the cage, but also to obtain the chicken's identity information, facilitating weight tracking throughout the broiler's growth cycle. The electronic tag includes, but is not limited to, RFID tags, NFC tags, Bluetooth tags, and ZigBee tags, etc., and is not specifically limited in this embodiment.

[0069] In this embodiment, multiple sets of two-view images of broilers in a natural feeding state are captured, and then the multiple sets of images in a natural feeding state are selected to obtain multiple sets of images in a natural feeding state that meet the shooting conditions, and the camera is controlled to enter standby state.

[0070] In an optional embodiment, the camera enters a standby state in response to a sensor detecting that a broiler has left the shooting location.

[0071] In this embodiment, the camera is installed in the following position: Figure 3 As shown, the green rectangle indicates the installation location of the top-view imaging device, and the red rectangle indicates the installation location of the side-rear view imaging device. Consumer-grade 2D cameras were installed to the side and above the weight estimation device, and images of broiler chickens feeding in their natural state were captured manually. A total of 1122 broiler chickens were collected, and images were taken from both views. Figure 1 Approximately 74,932 images were used as the dataset for subsequent model training.

[0072] In an optional embodiment, multiple sets of two-view images of broilers under natural feeding conditions are captured, and then the acquired multiple sets of images under natural feeding conditions are selected to obtain multiple sets of images under natural feeding conditions that meet the shooting conditions. When the sensor detects that the broilers have left the breeding cage, the actual weight value of the broilers is measured using a scale. The actual weight value and the multiple sets of images under natural feeding conditions that meet the shooting conditions are added to the dataset for model training and testing.

[0073] Those skilled in the art should understand that, considering the significant weight fluctuations of broilers throughout their growth process, the camera's installation position must ensure that it can capture a complete image of the older broilers' bodies. Those skilled in the art can make corresponding adjustments based on the performance parameters of the selected camera, the size of the rearing cage, and other factors; specific limitations are not imposed in this embodiment.

[0074] Step S2: Construct an image classification network to filter the set of two-view images and obtain two-view images that meet the conditions for being photographable;

[0075] The image classification network in step S2 is the DeformAttn-ShuffleNetV2 network. The DeformAttn-ShuffleNetV2 network builds a deformable attention module on the basis of ShuffleNetV2 to introduce the SKnet attention mechanism and deformable convolution. The input of the DeformAttn-ShuffleNetV2 network is the side-back image in the two-view image. The output of the DeformAttn-ShuffleNetV2 network is the classification result of the broiler state. The classification result includes: zhanli and qita. When the classification result is zhanli, it is determined that the two-view image corresponding to the input side-back image meets the shooting conditions.

[0076] like Figure 6 As shown, the network structure of the deformable attention module is as follows: the input feature channels are divided into a first branch and a second branch; the first branch includes, in sequence: 3×3 convolution, batch normalization, 1×1 convolution, batch normalization, and linear rectified function; the second branch includes, in sequence: 1×1 convolution, batch normalization, linear rectified function, 3×3 convolution, batch normalization, 1×1 convolution, batch normalization, linear rectified function, 1×1 convolution, batch normalization, linear rectified function, DA convolution, batch normalization, 1×1 convolution, batch normalization, and linear rectified function; the first branch and the second branch are merged to perform channel shuffling. Figure 7As shown, the DA convolution includes: a depthwise separable convolution with both input and output channels c, batch normalization, a linear rectified function, a deformable convolution with both input and output channels c, batch normalization, a linear rectified function, a first fully connected layer, a second fully connected layer, and a Softmax function.

[0077] In this embodiment, replacing the second depthwise separable convolution in the DA convolution with a deformable convolution improves adaptability to geometric deformation. The deformable convolution can dynamically adjust the position of the convolution kernel according to the content of the input feature map, thereby better capturing changes in the geometric shape and pose of the object. In contrast, the traditional depthwise separable convolution has a fixed sampling position and cannot handle spatial deformation well. It also enhances feature representation capabilities. By introducing additional offset learning, the deformable convolution can adaptively adjust the sampling point position, better capturing detailed information of the target object and complex backgrounds. Furthermore, it improves the detection and segmentation performance of the model. The deformable convolution can enhance the model's ability to detect edges and shapes, thereby improving the overall detection and segmentation performance. At the same time, it can combine the advantages of multi-scale features and spatial deformation, enabling the model to not only better utilize multi-scale information but also better adapt to the deformation characteristics of the target object.

[0078] The conditions for taking photos in step S2 are: the broiler enters the cage, puts its head through the partition and begins to eat; the broiler is in a standing position; and the broiler's wings are tucked in.

[0079] Considering that broiler chickens exhibit various foraging postures in their natural state, such as fully extended legs, semi-crouched legs, and reclining positions, observations of posture changes during feeding revealed a significant difference in neck extension length compared to a natural standing posture. During natural feeding, the broiler's naturally spread wings obscured approximately half of its body outline. Furthermore, it was found that broilers are highly likely to transition from a standing to a lying position a few seconds after starting to eat. Therefore, the broiler's posture significantly impacts the accuracy of subsequent weight estimation models. Image classification techniques were employed to identify and extract the most suitable posture images for weight estimation. An image classification network model was introduced to automatically filter images, selecting broiler images that met the aforementioned photographic conditions.

[0080] In this embodiment, multiple sets of two-view images of natural feeding states are selected and classified to obtain a set of two-view images that meet the photographable conditions. The selected multiple sets of natural feeding state images are classified. From the side-rear view, images of natural feeding states with legs fully upright, wings fully folded, and heads down while feeding are classified into the "zhanli" category; other feeding postures are classified into the "qita" category, which includes, but is not limited to, lying down while feeding and squatting while feeding.

[0081] In this embodiment, the DeformAttn-ShuffleNetV2 network performs image classification based on the side-back view of the two-view image as input, dividing the side-back view into two categories: standing posture and other postures. Other postures include situations such as squatting and lying down while eating. Based on the ShuffleNetV2 network, the SKNet attention mechanism is introduced, named SK-ShuffleNetV2. Furthermore, deformable convolution is introduced on the basis of the SK-ShuffleNetV2 network, named DeformAttn-ShuffleNetV2, which serves as the classification network actually used in this embodiment. As shown in Table 1, the DeformAttn-ShuffleNetV2 network achieves good performance in terms of accuracy, parameter count, and FLOPs.

[0082] Table 1 Image Classification Results

[0083] Model Top-1 (%) Params(M) FLOPs(G) ShuffleNetV2 97.20 1.26 1.45 SK-ShuffleNetV2 97.66 1.6 1.46 CoRSeaFormer 98.13 6.15 6.87

[0084] ShuffleNetV2 is a novel neural network architecture that aims to improve computational efficiency by effectively reducing parameters and computational complexity through channel-wise group convolution and channel shuffling operations. This model introduces a channel-wise group convolution method, dividing the input channels into multiple groups and applying convolution operations independently to each group. The results of these operations are then merged along the channel dimension, effectively increasing network capacity and information flow, thereby optimizing performance. By effectively reducing the number of parameters and computational load, ShuffleNetV2 achieves high classification accuracy while minimizing resource requirements. To further improve performance, ShuffleNetV2 employs repeated modules. Each module consists of three operations: channel-wise group convolution, channel blending, and another channel-wise group convolution. By stacking multiple modules, the overall depth and width of the network are increased, thereby enhancing the model's expressive power.

[0085] In this embodiment, in order to improve the accuracy of detecting broiler chicken images in complex environments and select image data with the best pose, two techniques are introduced on the basis of ShuffleNetV2: SKnet attention mechanism (Selective Kernel Networks) and Deformable Convolution.

[0086] SKNet's attention mechanism enables each neuron to adaptively adjust the size of its receptive field (i.e., convolutional kernel) according to different scales of the input information, effectively capturing multi-scale features in complex image spaces without consuming excessive computational resources like traditional CNNs. Furthermore, SKNet's attention mechanism can integrate deep features, thereby improving the interpretability and understandability of the captured features.

[0087] Deformable convolutions enable non-uniform and adaptive sampling and perception of input features. By learning offsets, deformable convolutions adaptively adjust the size and shape of the receptive field based on contextual information, thus more effectively capturing the spatial structure and details of the target. Incorporating learnable offsets into deformable convolutions enhances the adaptability of traditional convolution operations, allowing for better adjustment of spatial relationships and deformations between features, thereby improving the model's expressive power.

[0088] The structure of the DeformAttn-ShuffleNetV2 network is as follows: Figure 5 As shown.

[0089] The DeformAttn-ShuffleNetV2 network takes a side-rear view of a botnet from two-view images as input and outputs a classification result of the botnet's state. Based on the standard ShuffleNetV2 network structure, Stages 2, 3, and 4 are constructed using deformable attention modules to integrate the SKnet attention mechanism (Selective Kernel Networks) and deformable convolution. The network structure of the deformable attention module is as follows: Figure 6 As shown.

[0090] In this embodiment, for the 74,932 RGB two-view images of 1,122 broilers, each broiler corresponds to multiple sets of natural feeding state images. The multiple sets of natural feeding state images corresponding to each broiler are filtered, and the filtered multiple sets of natural feeding state images are classified. 7,036 side-back RGB images of the "zhanli" category and 4,615 side-back RGB images of the "qita" category are classified, resulting in 11,651 sample natural feeding state images.

[0091] In this embodiment, after using 1122 broiler chicken side and rear images, the images are divided into two categories: standing posture and other postures, and the image classification model DeformAttn-ShuffleNetV2 is trained.

[0092] The model classification results and related data are as follows. ShuffleNetV2 is the base model, SK-ShuffleNetV2 and DeformAttn-ShuffleNetV2 are the improved models, and DeformAttn-ShuffleNetV2 is finally selected for practical use.

[0093] Step S3: Construct an image segmentation network to perform semantic segmentation on two-view images that meet the conditions for being photographable, and obtain segmented two-view images;

[0094] In step S3, the image segmentation network is the CoRSeaFormer segmentation model. The CoRSeaFormer network, based on the SeaFormer model, constructs a compression-enhanced axial attention module under coordinate convolution and a receptive field attention convolution fusion module. The compression-enhanced axial attention module under coordinate convolution is used to introduce coordinate convolution, and the receptive field attention convolution fusion module is used to introduce receptive field attention convolution. The input of the CoRSeaFormer network is two-view images; the output of the CoRSeaFormer network is the segmentation result of the two-view images of the broiler chicken, resulting in the recognition result output by the initial image segmentation model as follows: Figure 2 As shown, (a) is a side-back view - RGB image; (b) is a side-back view - segmented image; (c) is a top view - RGB image; and (d) is a top view - segmented image.

[0095] like Figure 9 As shown, the network structure of the compressed and enhanced axial attention module is as follows: the input feature channels are processed by coordinate convolution to calculate the query, key, and value; the query, key, and value are divided into a detail enhancement kernel branch and an axial attention compression branch; the detail enhancement kernel branch includes, in sequence: concatenating the query, key, and value channels, 3×3 depthwise separable convolution, batch normalization, linear rectified function, 1×1 convolution, and batch normalization; the axial attention compression branch is divided into horizontal sub-branches and vertical sub-branches; the horizontal sub-branches include, in sequence: horizontal compression of the query, key, and value, and multi-head attention; the vertical sub-branches include, in sequence: vertical compression of the query, key, and value, and multi-head attention; the horizontal and vertical sub-branches are added point-by-point using tensor broadcasting and then subjected to 1×1 convolution; the detail enhancement kernel branch and the axial attention compression branch are merged by multiplication; the coordinate convolution includes: coordinate generation, normalization, and adding coordinate channels.

[0096] In this embodiment, coordinate convolution is introduced before calculating the query, key, and value, directly inputting location information (coordinates) into the convolutional layer. This makes it easier for the network to learn features related to spatial location, improving spatial awareness. Coordinate convolution explicitly provides location information, allowing the network to directly understand the spatial structure in the image. Since the network no longer needs to implicitly learn spatial information through complex structures, CoordConv can accelerate the network's convergence speed and improve the model's learning efficiency. By introducing coordinate channels, the network can achieve stronger expressive power without increasing too many parameters. With explicit location information, the network can exhibit better robustness and generalization ability when dealing with objects of different scenes, locations, or scales.

[0097] like Figure 10As shown, the network structure of the receptive field attention convolutional fusion module is as follows: the input feature channels consist of a third branch and a fourth branch; the third branch includes, in sequence, a receptive field attention convolutional module; the fourth branch includes, in sequence, a 3×3 convolution, batch normalization, a sigmoid activation function, and an upsampling operation; the third branch and the fourth branch are multiplied and then merged; the receptive field attention convolutional module includes a region attention mechanism, a convolutional layer, and residual connections.

[0098] In this embodiment, replacing the convolution in the receptive field attention convolutional fusion module with a receptive field attention convolutional module can improve the feature extraction capability of the convolutional neural network in specific regions. Because the receptive field of RFAConv can be dynamically adjusted, it can better process both global contextual information and local detail information simultaneously. Compared to traditional convolution, it can extract features more effectively at multiple scales. RFAConv can automatically adjust the size of the receptive field according to the content of the input image, thereby improving the adaptability of the convolutional layer to different types of images. The dynamic adjustment of the receptive field can help the model more accurately identify details in the image.

[0099] In this embodiment, the CoRSeaFormer network performs image segmentation based on the side-rear view and top view as input. The SeaFormer network incorporates coordinate convolution and receptive field attention, and is named CoRSeaFormer. As the segmentation network actually used in this embodiment, as shown in Table 2, the CoRSeaFormer network achieves good performance in terms of mIoU, number of parameters, and FLOPs.

[0100] Table 2 Image segmentation results

[0101]

[0102] SeaFormer is a high-efficiency Transformer network designed to optimize computational complexity. By introducing a sparse attention mechanism, SeaFormer significantly reduces the global computational requirements of traditional self-attention mechanisms, limiting the attention scope to a local window, thereby reducing the computational complexity from O(n²) to O(n). This sparsity strategy not only improves the model's efficiency in handling large-scale image tasks but also preserves its ability to capture global contextual information. Furthermore, SeaFormer incorporates multi-scale feature fusion techniques, enabling it to effectively handle image details at different scales while maintaining efficient global information extraction. The network also features a lightweight design, significantly reducing the number of parameters and computational requirements, making it particularly suitable for deployment on resource-constrained devices such as mobile devices or embedded systems.

[0103] In this embodiment, the image segmentation network in step S3 is the CoRSeaFormer segmentation model. The CoRSeaFormer network, based on the SeaFormer model, constructs a compression-enhanced axial attention module under coordinate convolution and a receptive field attention convolution fusion module. The compression-enhanced axial attention module under coordinate convolution is used to introduce coordinate convolution, and the receptive field attention convolution fusion module is used to introduce receptive field attention convolution. The structure of the CoRSeaFormer network is as follows: Figure 8 As shown, compared with the SeaFormer network in the prior art, the CoRSeaFormer network disclosed in this invention uses CoSeaFormer instead of SeaFormer in the SeaFormer network in CoSeaFormerLayer; and uses RFAConv instead of Conv+BN in the SeaFormer network.

[0104] In this embodiment, in order to improve the segmentation accuracy of broiler images in complex environments and obtain the best image data, two techniques are introduced on the basis of SeaFormer: coordinate convolution and receptive field attention convolution.

[0105] Coordinate convolution is a convolutional method that enhances the spatial awareness of convolutional neural networks. It directly incorporates the input coordinate information (such as the x and y coordinates of each pixel) into the convolution operation, enabling the network to better understand spatial relationships.

[0106] Receptive Field Attention Convolution is a convolutional operation that enhances the capabilities of convolutional neural networks by dynamically adjusting the receptive field. RFAConv introduces the receptive field attention mechanism, enabling the network to adaptively adjust the size of the receptive field based on the content of the input image, thereby improving the network's feature extraction capabilities.

[0107] The CoRSeaFormer network takes two-view images of a botnet as input and outputs the two-view segmentation result of the botnet. Based on the standard SeaFormer network structure, it integrates coordinate convolution and receptive field attention convolution. The network structure of the coordinate convolution module is as follows: Figure 11 As shown, the structure of the receptive field attention convolutional fusion module is as follows: Figure 10 As shown.

[0108] In this embodiment, for the 45,258 RGB two-view segmented images of 1,122 broilers obtained after passing through the image classification network, each broiler corresponds to multiple sets of natural feeding state images. The multiple sets of natural feeding state images corresponding to each broiler are filtered, and the filtered multiple sets of natural feeding state images are labeled. 893 side-rear view RGB images and 536 top view RGB images are labeled respectively, resulting in 1,429 sample natural feeding state images.

[0109] In this embodiment, the image segmentation model CoRSeaFormer was trained using 1122 broiler chicken side-rear and top-view images.

[0110] The model segmentation results and related data are as follows, where SeaFormer is the basic model and CoRSeaFormer is the improved model. CoRSeaFormer was ultimately selected for practical use.

[0111] Step S4: Based on the segmented two-view images, input the RepVGGVan network to estimate the weight of the broilers.

[0112] In step S4, the weight estimation network is the RepVGGVan segmentation model, which builds a visual attention module on the basis of RepVGG. The input of the RepVGGVan network is a two-view segmentation image, and the output of the RepVGGVan network is the weight value of the broiler.

[0113] like Figure 12 As shown, the synthesized image sequentially passes through a first 3×3 convolutional layer, a first 1×1 convolutional layer, a first downsampling layer, a second 3×3 convolutional layer, a second 1×1 convolutional layer, a first residual connection layer, a third 3×3 convolutional layer, a third 1×1 convolutional layer, a second residual connection layer, a fourth 3×3 convolutional layer, a fourth 1×1 convolutional layer, a third residual connection layer, and a visual attention module to obtain the estimated weight of the broiler chickens. The first 3×3 convolutional layer has a stride of 2 and padding of 1; the other 3×3 convolutional layers have a stride of 1 and padding of 1; the 1×1 convolutional layer has a stride of 1 and no padding; the first downsampling layer is a convolution function with a stride of 2; the residual connection layer is a residual operation in ResNet; the visual attention module includes channel attention, spatial attention, and a weighted fusion of the two.

[0114] In this embodiment, a visual attention module is introduced on the basis of the RepVGG network. Utilizing its efficient visual attention mechanism, it can adaptively focus on key regions in the image, achieve accurate feature extraction, and perform well in the fusion of global and local information. Through lightweight design, VAN significantly reduces computational complexity and the number of parameters, making it suitable for resource-constrained devices and real-time applications. At the same time, VAN's sparse attention mechanism can greatly reduce unnecessary computation and improve overall performance.

[0115] RepVGG is an innovative convolutional neural network architecture designed to enhance model expressive power while maintaining inference efficiency. During training, the network employs a multi-branch design, including complex structures such as 3×3 convolutions, 1×1 convolutions, and skip connections, which enhances the model's feature extraction capabilities. However, during inference, RepVGG uses structural reparameterization to merge all branches into a simple VGG-like structure, retaining only single-path convolution operations. This design significantly simplifies the model's inference process, dramatically improving computational efficiency while maintaining high performance during training. RepVGG not only offers a significant advantage in inference speed but also, due to its structural simplicity, is well-suited for large-scale deployment, especially in resource-constrained environments (such as mobile devices or edge computing scenarios).

[0116] In this embodiment, in order to improve the accuracy of broiler weight estimation in complex environments and obtain the best weight estimation value, a visual attention network is introduced on the basis of RepVGG.

[0117] Visual Attention Network (VAN) is a neural network architecture based on visual attention mechanisms, designed to improve feature extraction efficiency in image processing tasks. Unlike traditional convolutional neural networks, VAN introduces a visual attention module, enabling it to adaptively focus on important local regions while ignoring irrelevant information when processing images.

[0118] The structure of the RepVGGVan network is as follows: Figure 12 As shown, Figure 12 In the middle, VAN stands for Visual Attention Network;

[0119] The input to the RepVGGVan network is two-view images of broiler chickens, and the output is the estimated weight of the broiler chickens. Based on the standard RepVGG network structure, visual attention is fused. The network structure of the visual attention module (VAN) is as follows: Figure 13 As shown.

[0120] In this embodiment, the process of obtaining the dataset required to train the RepVGGVan network is as follows:

[0121] Two cameras were installed on a weight estimation device in the broiler feeding area. By capturing two-view images of the broilers feeding naturally, a comprehensive dataset containing both perspectives of the feeding process was obtained. To facilitate accurate weight estimation, the two-view images were processed by the CoRSeaFormer segmentation model to obtain segmented images that meet the unified input requirements of the weight estimation model. Immediately after the broiler images were taken, staff weighed the chickens and recorded the weight values ​​as the true values. It is worth noting that the input of this model is a synthetic image stitched together from the segmented two-view images obtained from the two perspectives mentioned above.

[0122] In this embodiment, a total of 1122 broiler chickens were collected, and two views were taken. Figure 1 A total of approximately 45,258 images were used as the dataset for subsequent model training, with a training set to test set ratio of 8:2.

[0123] The segmented two-view images from the training set are input into the RepVGGVan network to obtain the estimated broiler weight. The estimated broiler weight is compared with the actual weight value, and the parameters in the RepVGGVan network are continuously changed until the training stopping condition is met, thus obtaining the trained RepVGGVan network.

[0124] In this embodiment, the specific process of changing the parameters in the RepVGGVan network is as follows:

[0125] First, adjust the learning rate, decreasing it from 0.1 to 0.0001.

[0126] In an optional embodiment, cosine annealing and adaptive learning rate are used to adjust the learning rate;

[0127] Secondly, adjust the batch size according to the size of the dataset and the available computing resources;

[0128] The optimizer is then retuned; the optimizer is either SGD or Adam.

[0129] Finally, adjust the regularization parameters, including L1 regularization, L2 regularization, and Dropout.

[0130] In this embodiment, L1 and L2 regularization help prevent overfitting when training data is limited. Dropout reduces model complexity by randomly dropping a subset of neurons.

[0131] In this embodiment, after obtaining the image segmentation results, the corresponding two-view images are used as input to the RepVGGVan network to train a live broiler weight estimation model. The weight estimation results and related data are shown in Table 3:

[0132] Table 3. Weight estimation results

[0133] Model MAE Params FLOPs CNN 17.180g 3.27M 5.15G RepVGG 15.335g 7.83M 62.95G RepVGGVan 14.675g 12.85M 73.09G

[0134] Table 3 shows the MAE (Mean Absolute Error).

[0135] Definition: MAE is the average of the absolute differences between predicted and actual values. The formula is:

[0136]

[0137] Among them, y i This is the actual value. is the predicted value, and n is the number of samples.

[0138] Function: MAE is used to measure the average absolute difference between the model's predicted values ​​and the actual values.

[0139] Traditional image segmentation models rely on data annotation and label fixed regions. However, in broiler weight assessment scenarios, broilers are highly mobile, making it difficult for existing technologies to accurately predict fixed regions. The CoRSeaFormer image segmentation model disclosed in this embodiment eliminates the need for fixed region labels, enabling more accurate image segmentation.

[0140] The RepVGGVan network disclosed in this embodiment differs from existing technologies that rely on 2D or 3D cameras to capture animal images. It extracts key parameters such as animal body shape through image processing techniques and uses machine learning or deep learning regression methods to predict broiler weight based on the extracted features. This invention discloses a broiler weight estimation method based on two-view images, which eliminates the need for high-definition 2D or 3D cameras to capture animal images. It uses consumer-grade cameras to acquire 2D images, achieving efficient and stable broiler weight estimation.

[0141] In one specific embodiment, the broiler weight estimation method based on two-view images disclosed in this invention is applied. Based on the trained RepVGGVan network, the broiler weight is automatically estimated. The specific process is as follows:

[0142] A set of 2D two-view images of several broiler chickens was formed. An image classification network was used to filter the set of broiler chicken two-view images to obtain the filtered two-view images that meet the preset broiler chicken posture requirements. An image segmentation network was used to perform semantic segmentation on the two-view images that meet the shooting conditions to obtain the segmented two-view images. The segmented two-view images were then used as the input of the RepVGGVan network to estimate the weight of the broiler chickens.

[0143] In this embodiment, a consumer-grade 2D camera is installed on the side and above the weight estimation device. Images of broilers in their natural feeding state are automatically acquired using the DeformAttn-ShuffleNetV2 image classification model. The Segment Anything Model segments the two view images after classification. Then, the set of images with the best segmentation effect of the chicken is used as the input of the weight estimation model to automatically estimate the weight of the broiler.

[0144] like Figure 16 As shown, another embodiment of the present invention discloses a broiler weight estimation system based on the two-view image estimation method of the present invention, comprising: a broiler image acquisition device 100 and a weight estimation device 200.

[0145] like Figure 14 and Figure 15 As shown, the broiler image acquisition device 100 includes: a cage 101, a top-view camera 107, a side-rear-view camera 108, and an acquisition triggering device; the cage 101 has an opening 109 on one side, through which the broiler to be tested enters the cage 101; the cage 101 has a partition 102 inside, which divides the interior of the cage 101 into a feed storage area 103 and a broiler standing area 104; the feed storage area 103 has a feed container 105; the broiler standing area 104 can... The cage is large enough to accommodate a single broiler chicken standing upright; a feeding hole 106 is provided on the partition 102; the feeding hole 106 restricts the broiler chicken to only be able to pass its head through the feeding hole 106 to complete feeding; a top view camera 107 is fixed to the top of the cage 101 to collect top view images of the broiler chicken feeding; a side and rear view camera 107 is fixed to the outside of the cage 101, near the cage opening 109, to collect side and rear view images of the broiler chicken feeding; a triggering device is used to trigger the acquisition of images and perform weight estimation.

[0146] The two-view images include: a top view image and a side-rear view image of the broiler chicken being fed.

[0147] The input to the DeformAttn-ShuffleNetV2 network is the side-rear view of the two-view image; the output of the DeformAttn-ShuffleNetV2 network is the classification result of the broiler state; the classification result includes: zhanli and qita; when the classification result is zhanli, it is determined that the two-view image corresponding to the input side-rear view meets the shooting conditions.

[0148] The weight estimation device 200 includes: an image classification network module, an image segmentation network module, and a RepVGGVan network module; the image classification network module is used to filter the set of two-view images, input the side-rear images of the two-view images into the CoRSeaFormer network, and output the classification result of the broiler state to obtain the filtered two-view images; the image segmentation network module is used to perform semantic segmentation processing on the two-view images that meet the shooting conditions to obtain the segmented two-view images; the RepVGGVan network module is used to estimate the weight of the broilers using the segmented two-view images.

[0149] Considering that the pose of the top view is relatively stable under the shooting standard, in this embodiment, the image classification network module filters the side and rear images and takes the corresponding results for the top view.

[0150] For example, if the object to be estimated is broiler chickens, two consumer-grade 2D infrared cameras can be installed on the side, rear, and top of a weight estimation device to capture two-view images of the broiler chickens in a natural feeding state while standing on the device. Using a Python program to parse the RTSP protocol stream, the two-view images of the broiler chickens can be obtained, thus producing at least one first image of the object to be estimated. The 2D infrared cameras comply with the RTSP protocol. Figure 16 As shown, the system structure of the broiler weight estimation system based on two-view images enables data interaction between the broiler image acquisition device 100 and the weight estimation device 200.

[0151] In this embodiment, images of broiler chickens in their natural feeding state are accurately obtained by establishing a spatial rectangular coordinate system, such as... Figure 2 As shown, (a) is a side-back view - RGB image; (b) is a side-back view - segmented image; (c) is a top view - RGB image; and (d) is a top view - segmented image. Figure 3 This is a diagram showing the installation positions of the two cameras in the weight estimation device provided by the present invention. The green rectangular area represents the installation position of the top-view shooting device, and the red rectangular area represents the installation position of the side-rear view shooting device. The specific coordinates of the cameras are as follows: the top-view camera is 8.7 cm away from the left pivot of the iron plate, the side-rear iron plate is 18.8 cm away from the top of the iron door, and the camera is 15.3 cm away from the edge of the iron plate.

[0152] In this embodiment, those skilled in the art should know that, considering the significant weight fluctuations of broilers throughout their growth process, the camera's installation position must ensure that it can capture a complete image of the broiler's body at an advanced age. Those skilled in the art can make corresponding adjustments based on the performance parameters of the selected camera, the size of the rearing cage, and other factors; no specific limitations are made in this embodiment. Compared to existing technologies that mostly acquire 2D images from only one or two perspectives for weight estimation, this invention acquires images from both a side-rear view and a top-down view. This fully considers the characteristics of broilers compared to animals like pigs, cattle, and sheep, such as increased activity, significant body size fluctuations during the rearing cycle, and the significant impact of standing posture and wing position on weight prediction. The model is trained using image data from both perspectives to obtain a more accurate prediction result. The weight estimation results and related data are shown in Table 3. For example, the MAE is 14.675g, demonstrating that the predicted value obtained using the two-view image-based broiler weight estimation method disclosed in this invention has a high degree of fit with the actual value, achieving good prediction results.

Claims

1. A method for estimating broiler weight based on two-view images, characterized in that, Includes the following steps: Step S1: In response to the sensor detecting that the broiler has entered the shooting location, the shooting device acquires a set of two-view images of the broiler; Step S2: Construct an image classification network to filter the set of two-view images and obtain two-view images that meet the conditions for being photographable; Step S3: Construct an image segmentation network to perform semantic segmentation on two-view images that meet the conditions for being photographable, and obtain segmented two-view images; In step S3, the image segmentation network is the CoRSeaFormer segmentation model. The CoRSeaFormer network builds a compression-enhanced axial attention module under coordinate convolution and a receptive field attention convolution fusion module on the basis of SeaFormer. The compression-enhanced axial attention module under coordinate convolution is used to introduce coordinate convolution, and the receptive field attention convolution fusion module is used to introduce receptive field attention convolution. The input of the CoRSeaFormer network is two-view images; the output of the CoRSeaFormer network is the segmentation result of the two-view images of the broiler chicken. The network structure of the compressed enhanced axial attention module is as follows: the input feature channels are processed by coordinate convolution to calculate the query, key, and value. The queries, keys, and values ​​are divided into detail-enhanced kernel branches and axial attention compression branches; The detail enhancement kernel branch sequentially includes: concatenating query, key, and value channels, 3×3 depthwise separable convolution, batch normalization, linear rectified function, 1×1 convolution, and batch normalization; the axial attention compression branch is divided into horizontal and vertical sub-branches. The horizontal sub-branch sequentially includes: horizontal query compression, key and value, and multi-head attention; the vertical sub-branch sequentially includes: vertical query compression, key and value, and multi-head attention; the horizontal and vertical sub-branches are added point-by-point using tensor broadcasting and then subjected to 1×1 convolution; the detail enhancement kernel branch and the axial attention compression branch are merged after multiplication; the coordinate convolution includes: coordinate generation, normalization, and adding coordinate channels; Step S4: Based on the segmented two-view images, input the RepVGGVan network to estimate the weight of the broilers.

2. The method for estimating broiler weight based on two-view images according to claim 1, characterized in that, The two view images in step S1 include: a top view and a side-rear view; the capturing device includes: a top view capturing device and a side-rear view capturing device. In step S1, the sensor is a radio frequency identification (RFID) sensor. The broiler chicken wears an RFID tag to detect when the broiler chicken enters and leaves the shooting location and to detect the broiler chicken's identification information.

3. The method for estimating broiler weight based on two-view images according to claim 1, characterized in that, The image classification network in step S2 is the DeformAttn-ShuffleNetV2 network. The DeformAttn-ShuffleNetV2 network builds a deformable attention module on top of ShuffleNetV2, incorporating the SKNet attention mechanism and deformable convolution. The input to the DeformAttn-ShuffleNetV2 network is the side-rear view image from the two-view images. The output of the DeformAttn-ShuffleNetV2 network is the classification result for the broiler state. The classification result includes zhanli and qita. When the classification result is zhanli, it is determined that the two-view image corresponding to the input side-rear view image meets the photographic conditions. The network structure of the deformable attention module is as follows: the input feature channels are divided into a first branch and a second branch; the first branch includes, in sequence: 3×3 convolution, batch normalization, 1×1 convolution, batch normalization, and linear rectified function; the second branch includes, in sequence: 1×1 convolution, batch normalization, linear rectified function, 3×3 convolution, batch normalization, 1×1 convolution, batch normalization, linear rectified function, 1×1 convolution, batch normalization, linear rectified function, DA convolution, batch normalization, 1×1 convolution, batch normalization, and linear rectified function; the first branch and the second branch are merged and then subjected to channel shuffling; the DA convolution includes: depthwise separable convolution with both input and output channels c, batch normalization, linear rectified function, deformable convolution with both input and output channels c, batch normalization, linear rectified function, a first fully connected layer, a second fully connected layer, and a Softmax function.

4. The method for estimating broiler weight based on two-view images according to claim 1, characterized in that, The conditions for taking photos in step S2 are: the broiler enters the cage, puts its head through the partition and begins to eat; the broiler is in a standing position; and the broiler's wings are tucked in.

5. The method for estimating broiler weight based on two-view images according to claim 1, characterized in that, The network structure of the receptive field attention convolutional fusion module is as follows: the input feature channels consist of a third branch and a fourth branch; the third branch includes, in sequence, a receptive field attention convolutional module; the fourth branch includes, in sequence, a 3×3 convolution, batch normalization, a sigmoid activation function, and an upsampling operation; the third branch and the fourth branch are multiplied and then merged; the receptive field attention convolutional module includes a region attention mechanism, convolutional layers, and residual connections.

6. The method for estimating broiler weight based on two-view images according to claim 1, characterized in that, In step S4, the RepVGGVan network receives a synthesized image composed of the segmented two-view images and outputs an estimated broiler weight. The synthesized image sequentially passes through a first 3×3 convolutional layer, a first 1×1 convolutional layer, a first downsampling layer, a second 3×3 convolutional layer, a second 1×1 convolutional layer, a first residual connection layer, a third 3×3 convolutional layer, a third 1×1 convolutional layer, a second residual connection layer, a fourth 3×3 convolutional layer, a fourth 1×1 convolutional layer, a third residual connection layer, and a visual attention module to obtain the estimated broiler weight. The first 3×3 convolutional layer has a stride of 2 and padding of 1. The other 3×3 convolutional layers have a stride of 1 and padding of 1; the 1×1 convolutional layers have a stride of 1 and no padding; the first downsampling layer is a convolutional function with a stride of 2. The residual connection layer is a residual operation in ResNet; The visual attention module includes: channel attention, spatial attention, and a weighted fusion of the two.

7. The method for estimating broiler weight based on two-view images according to claim 6, characterized in that, The parameter adjustment process of the RepVGGVan network is as follows: First, adjust the learning rate, decreasing it from 0.1 to 0.0001. Secondly, adjust the batch size according to the size of the dataset and the available computing resources; The optimizer is then retuned; the optimizer is either SGD or Adam. Finally, adjust the regularization parameters, including L1 regularization, L2 regularization, and Dropout.

8. A broiler weight estimation system based on a two-view image estimation method according to any one of claims 1-7, characterized in that, include: Broiler image acquisition device (100) and weight estimation device (200); The broiler image acquisition device (100) includes: a cage (101), a top view camera (107), a side and rear view camera (108), and an acquisition triggering device; the cage (101) has an opening (109) on one side, and the broiler to be tested enters the cage (101) through the opening (109); the cage (101) has a partition (102) inside, which divides the cage (101) into a feed storage area (103) and a broiler standing area (104); the feed storage area (103) has a feed container (105); the broiler standing area (104) can accommodate a single broiler to be tested standing; the partition (102) has a feeding hole (106). The feeding hole (106) restricts the broiler chickens to only be able to pass their heads through the feeding hole (106) to complete feeding; the top view camera (107) is fixed to the top of the cage (101) to collect top view images of the broiler chickens feeding; the side and rear view camera (108) is fixed to the outside of the cage (101), near the cage opening (109), to collect side and rear view images of the broiler chickens feeding; the acquisition trigger device is used to trigger the acquisition of images and perform weight estimation; The two-view images include: a top view image and a side-rear view image of the broiler chicken being fed; The weight estimation device (200) includes: an image classification network module, an image segmentation network module, and a RepVGGVan network module; the image classification network module is used to filter the set of two-view images, input the side-rear images of the two-view images into the image classification network, and output the classification result of the broiler state to obtain the filtered two-view images; the image segmentation network module is used to perform semantic segmentation processing on the two-view images that meet the shooting conditions to obtain the segmented two-view images; the RepVGGVan network module is used to estimate the weight of the broiler using the segmented two-view images.

Citation Information

Patent Citations

  • Method and system for estimating weight of meat poultry based on 2D image

    CN119380375A

  • Image segmentation method and device, electronic equipment and medium

    CN112184714A

  • Method for training image processing model

    US20240005509A1