Lightweight broiler individual identification method based on improved YOLOv10

By improving the YOLOv10 network structure and using SPPELANF and FWConv modules, the problems of difficult and high cost of individual identification of broilers are solved, efficient and low-cost identification on resource-limited equipment are achieved, and the accuracy and management efficiency of identification are improved.

CN119479014APending Publication Date: 2025-02-18TIANJIN AGRICULTURE COLLEGE
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411653911.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In the prior art, broiler individual identification is difficult, workload and costly, and it is difficult to achieve efficient identification in farm equipment with limited available resources.

Method used

A lightweight broiler individual recognition method based on improved YOLOv10 is adopted, and a new YOLOv10 network structure YOLOv10_SEF_FWC is formed through the improved feature extraction unit SPPELANF and the convolution unit FWConv, and a deep learning model is obtained through training to achieve high-precision recognition of broiler individuals.

Benefits of technology

Efficient and low-cost individual identification of broiler chickens is achieved on equipment with limited resources, which improves the accuracy and sensitivity of identification, reduces the equipment costs of the breeding farm, and improves management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119479014A_ABST
    Figure CN119479014A_ABST
Patent Text Reader

Abstract

The invention provides a lightweight broiler individual identification method based on improved YOLOv10, and the method comprises the steps: obtaining to-be-detected data, taking a YOLOv10 network structure as a basic network, replacing a feature extraction unit in a YOLO with an improved feature extraction unit, replacing a convolution unit in the YOLO with an improved convolution unit, and forming a new network structure. A deep learning model for broiler individual recognition is obtained through training, to-be-detected data is input into the deep learning model, an initial data set is output to a server, and the server adjusts the deep learning model according to the initial data set and outputs a recognition result; and driving the deep learning model to automatically generate a training sample according to the to-be-tested data through a dynamic updating mechanism. By improving the feature extraction unit and the convolution unit, the accuracy and sensitivity of model recognition are improved, and the precision and efficiency of chicken face recognition are improved; a dynamic updating mechanism is constructed in combination with the cloud server, so that the system can run on equipment with limited available resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of deep learning target recognition, and in particular relates to a lightweight small target recognition method based on improved YOLOv10. Background Art

[0002] With the continuous development of the breeding industry and the increase in the density of livestock and poultry breeding, the number of caged chickens raised in a single cage is also increasing rapidly. Under such circumstances, the difficulty and workload of individual broiler identification have increased sharply. Although the traditional RFID electronic tag method is effective, its high cost and strong dependence on manpower have limited its widespread application.

[0003] With the rapid development of target recognition algorithms based on deep learning, more and more target recognition models have been proposed. The target recognition algorithm under deep learning can directly extract features of the input image through convolutional neural networks, and directly regress the output results through the learning of deep network models, realizing target recognition from input to output. However, it has high requirements for equipment, especially for farm equipment with limited available resources. There is an increasing demand for efficient broiler individual recognition at low cost.

[0004] Therefore, it is necessary to design a high-precision and high-efficiency chicken face recognition method that can run on devices with limited available resources, thereby reducing the equipment cost of the farm and improving the management efficiency of the farm. Summary of the invention

[0005] The present invention provides a lightweight broiler individual identification method based on improved YOLOv10, so as to at least solve the problems of difficulty, large workload and high cost in broiler individual identification in the related art.

[0006] In order to achieve the above objectives, the present invention provides the following technical solutions: A lightweight broiler individual recognition method based on improved YOLOv10 includes the following steps: S01. Obtain the data to be tested; S02. Taking the YOLOv10 network structure as the basic network, the improved feature extraction unit SPPELANF is used to replace C2F in BackBone as the feature extraction unit, and the improved FWConv unit is used to replace Conv in neck as the convolution unit to form a new YOLOv10 network structure YOLOv10_SEF_FWC, and a deep learning model for broiler individual recognition is obtained through training; S03, input the test data into the initial deep learning model for broiler individual identification, output the identification results, and divide the identification results into one type of image, two types of image and three types of image, wherein the precision and recall rate of the one type of image are both greater than or equal to 85%, the precision and recall rate of the two types of images are only one greater than or equal to 85%, and the precision and recall rate of the three types of images are both less than 85%, Add a class of images directly to the initial dataset, The second-category images are recognized for the second time. If the precision and recall of the second-category images are greater than or equal to 85% after the second recognition, the second-category images are added to the initial data set. If any value of the precision and recall of the second-category images is less than 85% after the second recognition, the second-category images are added to the backup data set. Add the three categories of images directly to the backup dataset, Output the initial data set; S04. Input the initial data set into the server. The server initializes and adjusts the initial deep learning model according to the initial data set, and outputs the recognition result of the adjusted deep learning model.

[0007] Furthermore, the improved feature extraction unit SPPELANF includes rotational convolution, spatial pooling and weighted feature pyramid network, which enhances the model's perception ability of targets of different scales through multi-scale feature extraction and weighted fusion; The application method of the rotational convolution includes: inputting the original data into the rotational convolution module, rotating the original data at multiple angles through the rotational convolution module, outputting feature maps at different angles after the rotational convolution, and inputting the splicing results of the feature maps at different angles into the rotational convolution module to obtain the data after the rotational convolution; The feature extraction includes inputting the data after rotational convolution into the pooling layer and the weighted feature pyramid network respectively to obtain the data processed by the pooling layer, inputting the data processed by the pooling layer into the weighted feature pyramid network, and performing weighted processing on the data after rotational convolution and the data processed by the pooling layer in the weighted feature pyramid network to obtain a feature output result; The feature output results are compressed through a channel bottleneck connected to a weighted feature pyramid network.

[0008] Furthermore, the pooling layer includes a maximum pooling module, which is divided into three levels, each level is provided with a two-dimensional maximum pooling unit, and after the rotational convolution, the data enters the maximum pooling module, and then sequentially enters the three-level two-dimensional maximum pooling units, and two-dimensional maximum pooling is performed in the two-dimensional maximum pooling units. After each two-dimensional maximum pooling is completed, the result of the two-dimensional maximum pooling is output to the next level of two-dimensional maximum pooling unit until three two-dimensional maximum poolings are completed, and after each two-dimensional maximum pooling is completed, the result of the two-dimensional maximum pooling is output to the weighted feature pyramid network.

[0009] Furthermore, the improved convolution unit FWConv performs convolution processing on the input data by using different convolution modes, each convolution mode is a separate path, each path processes the input data in parallel, and uses a learnable weighted allocation method to perform weighted fusion on the output results of each path to achieve more flexible feature extraction; The convolution processing method includes: setting five paths, the five paths are divided into three convolution paths and two multi-angle pooling paths, and the three convolution paths are respectively: The first convolution path, which includes a 1×1 convolution layer, a 3×3 depth-wise separable convolution layer, and a dilated convolution layer, strengthens feature processing by combining depth-wise separable convolution with dilated convolution. The second convolution path includes a 1×1 convolution layer, a 5×5 depth-separable convolution layer, and an expansion convolution layer. It performs multi-scale feature processing by defining convolution kernels of separable convolutions of different depths. The third convolution path includes a 1×1 convolution layer and a 3×3 dilated convolution layer, which performs feature processing by combining standard convolution and dilated convolution. The two multi-angle pooling paths are: The first pooling path is the maximum pooling path, which includes a maximum pooling layer and a 1×1 convolution layer. The texture features are processed by first pooling and then convolution. The second pooling path is the average pooling path, which includes an average pooling layer and a 1×1 convolution layer. The background features are processed by first pooling and then convolution. The features processed by the five paths are input into the dynamic trade-off mechanism, and the size is adjusted by interpolation to ensure the consistency of the shape of the feature map. The obtained feature map is weighted fused and output, and the result is then subjected to 1×1 convolution and batch normalization to output the final feature map.

[0010] Furthermore, a dynamic update mechanism is provided, wherein the dynamic update mechanism includes adaptive model update and automated training process; The adaptive model update includes: the system receives the data to be tested and determines the growth cycle of the data to be tested, the server inputs the training parameters corresponding to the growth cycle of the data to be tested into the deep learning model, and the deep learning model recognizes the data to be tested according to the training parameters and outputs the recognition result; The automated training process includes: the deep learning model can automatically generate pseudo labels for unlabeled data in the test data, which are used to update the feature map in the deep learning model; the deep learning model automatically generates training samples and performs training based on the feature map in the deep learning model; the training parameters obtained from the training are saved to the server and can be called by the deep learning model, thereby achieving the effect of adapting to changes in the appearance of broilers and realizing dynamic identification of individual broilers throughout the entire cycle.

[0011] Furthermore, the method for generating pseudo labels in the automated training process includes: Set precision and recall thresholds as the basis for classification; Images with precision and recall rates higher than or equal to 90% are classified as one type of data, and the pseudo labels of this part of data are directly introduced into the training; When the precision and recall rates are higher than or equal to 90%, the images are classified as Class II data. The pseudo labels of this part of data are introduced into the training with a higher weight. Images with precision and recall rates lower than 90% are classified as Class III data. The pseudo labels of this part of data are introduced into the training with a lower weight. The weights are obtained by normalization.

[0012] Furthermore, the step of obtaining the data to be tested includes: S11, collecting the required images, the image collection is performed by an image collection device, such as a camera, monitoring and obtaining a low-light image of the recognition target; S12, using cosine similarity to screen the collected images. When the cosine similarity of two images exceeds a preset threshold of 0.85, they are considered too similar and are regarded as redundant data. S13, using the Labelimg tool to manually annotate the collected broiler chicken facial images, and the generated XML file contains the size of each image, the coordinates of the upper left corner and the lower right corner of the annotation box, and the category information; S14, performing data cleaning and preprocessing on the annotated images to establish a data set; S15. The training set and test set are divided into a ratio of 7:2:1. Data enhancement techniques are used for the samples in the training set, including random cropping, horizontal flipping, and lighting adjustment, to improve the generalization ability of the model.

[0013] Furthermore, a lightweight broiler chicken individual identification device based on improved YOLOv10 includes: A real-time data acquisition module is used to obtain image and video data of individual broiler chickens, including obtaining image and video data of individual broiler chickens and obtaining relevant information about the broiler chicken growth environment; A model building module is used to use the YOLOv10 network structure as a basic network, including replacing the feature extraction unit in BackBone with an improved feature extraction unit, replacing the convolution unit in neck with an improved convolution unit, forming a new YOLOv10 network structure, using the improved network structure to establish an initial deep learning model for initial broiler individual recognition, and evaluating the precision and recall rate of the model training results, and outputting images with precision and recall rates greater than or equal to 85% in the first and second category images to the image processing module; The model processing module is used to process the model, including inputting the first-class image and the second-class image obtained from the model building module as the initial data set into the server, the server initializes and adjusts the initial deep learning model according to the initial data set, and outputs the recognition result of the adjusted deep learning model as the final recognition result; The dynamic update module is used to update the model in real time according to the growth cycle of broilers, including obtaining the data to be tested, transmitting the data to be tested to the system, the system receiving the data to be tested and determining the growth cycle of the data to be tested, the server inputting the training parameters corresponding to the growth cycle of the data to be tested into the deep learning model, the deep learning model identifies the data to be tested according to the training parameters and outputs the identification results; the dynamic update mechanism drives the deep learning model to automatically generate training samples according to the data to be tested, and updates the parameters in real time to adapt to the changes in the appearance of broilers, so as to realize the dynamic identification of broiler individuals throughout the whole cycle.

[0014] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps: S01, obtaining the data to be tested; S02. Taking the YOLOv10 network structure as the basic network, the improved feature extraction unit SPPELANF is used to replace the C2F in BackBone as the feature extraction unit, and the improved FWConv unit is used to replace the Conv in neck as the convolution unit to form a new YOLOv10 network structure YOLOv10_SEF_FWC. The new network structure is used to establish the initial deep learning model for broiler individual identification.

[0015] S03, input the test data into the initial deep learning model for broiler individual identification, output the identification results, and divide the identification results into one type of image, two types of image and three types of image, wherein the precision and recall rate of the one type of image are both greater than or equal to 85%, the precision and recall rate of the two types of images are only one greater than or equal to 85%, and the precision and recall rate of the three types of images are both less than 85%, Add a class of images directly to the initial dataset, The second-category images are recognized for the second time. If the precision and recall of the second-category images are greater than or equal to 85% after the second recognition, the second-category images are added to the initial data set. If any value of the precision and recall of the second-category images is less than 85% after the second recognition, the second-category images are added to the backup data set. Add the three categories of images directly to the backup dataset, Output the initial data set; S04. Input the initial data set into the server. The server initializes and adjusts the initial deep learning model according to the initial data set, and outputs the recognition result of the adjusted deep learning model as the final recognition result.

[0016] A computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to perform the following steps: S01, obtaining the data to be tested; S02. Taking the YOLOv10 network structure as the basic network, the improved feature extraction unit SPPELANF is used to replace the C2F in BackBone as the feature extraction unit, and the improved FWConv unit is used to replace the Conv in neck as the convolution unit to form a new YOLOv10 network structure YOLOv10_SEF_FWC. The new network structure is used to establish the initial deep learning model for broiler individual identification.

[0017] S03, input the test data into the initial deep learning model for broiler individual identification, output the identification results, and divide the identification results into one type of image, two types of image and three types of image, wherein the precision and recall rate of the one type of image are both greater than or equal to 85%, the precision and recall rate of the two types of images are only one greater than or equal to 85%, and the precision and recall rate of the three types of images are both less than 85%, Add a class of images directly to the initial dataset, The second-category images are recognized for the second time. If the precision and recall of the second-category images are greater than or equal to 85% after the second recognition, the second-category images are added to the initial data set. If any value of the precision and recall of the second-category images is less than 85% after the second recognition, the second-category images are added to the backup data set. Add the three categories of images directly to the backup dataset, Output the initial data set; S04. Input the initial data set into the server. The server initializes and adjusts the initial deep learning model according to the initial data set, and outputs the recognition result of the adjusted deep learning model as the final recognition result.

[0018] The beneficial effect is that by improving the feature extraction unit, performing rotational convolution and spatial pooling on the test data, sequentially transmitting data in the three-layer spatial pooling layer and outputting the single-layer results and the final results, the accuracy and sensitivity of model recognition are improved, and the accuracy and efficiency of chicken face recognition are improved; By combining cloud servers to build a dynamic update mechanism, an efficient feature update framework is formed through self-supervised learning, online learning and transfer learning. Under this framework, the model can automatically generate training samples based on new data, update parameters in real time, and quickly transfer learning between different growth cycles without taking up too many local resources. This enables the system to run on devices with limited available resources, reducing equipment costs for farms and improving management efficiency of farms. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] in: Figure 1 A flowchart of a lightweight broiler individual identification method based on improved YOLOv10 provided by the present invention; Figure 2 A deep learning model training flow chart provided by the present invention; Figure 3 A schematic diagram of the SPPELANF structure provided by the present invention; Figure 4 A schematic diagram of the FWConv structure provided by the present invention; Figure 5 The network structure diagram of yolov10_SEF_FWC provided by the present invention; Figure 6 A module diagram of a lightweight broiler individual identification device based on improved YOLOv10 provided by the present invention; Figure 7 This is a schematic diagram comparing the test results of yolov10 and yolov10_SEF_FWC models on multiple broiler chicken samples; Figure 8 It is a structural block diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of this application.

[0022] In order to facilitate the management of broiler chickens in the farm, each broiler chicken needs to be individually identified first. Based on this, the embodiment of the present disclosure provides a lightweight broiler chicken individual identification method based on improved YOLOv10. Figure 1 to Figure 2 , the method comprising, S01, obtaining the data to be tested; S02. Taking the YOLOv10 network structure as the basic network, the improved feature extraction unit SPPELANF is used to replace the C2F in BackBone as the feature extraction unit, and the improved FWConv unit is used to replace the Conv in neck as the convolution unit to form a new YOLOv10 network structure YOLOv10_SEF_FWC. The new network structure is used to establish the initial deep learning model for broiler individual identification.

[0023] S03, input the test data into the initial deep learning model for broiler individual identification, output the identification results, and divide the identification results into one type of image, two types of image and three types of image, wherein the precision and recall rate of the one type of image are both greater than or equal to 85%, the precision and recall rate of the two types of images are only one greater than or equal to 85%, and the precision and recall rate of the three types of images are both less than 85%, Add a class of images directly to the initial dataset, The second-category images are recognized for the second time. If the precision and recall of the second-category images are greater than or equal to 85% after the second recognition, the second-category images are added to the initial data set. If any value of the precision and recall of the second-category images is less than 85% after the second recognition, the second-category images are added to the backup data set. Add the three categories of images directly to the backup dataset, Output the initial data set; S04. Input the initial data set into the server. The server initializes and adjusts the initial deep learning model according to the initial data set, and outputs the recognition result of the adjusted deep learning model as the final recognition result.

[0024] The present invention uses the YOLOv10 network structure as the basic network, uses the improved feature extraction unit SPPELANF to replace the C2F in BackBone as the feature extraction unit, uses the improved FWConv unit to replace the Conv in neck as the convolution unit, forms a new YOLOv10 network structure YOLOv10_SEF_FWC, and obtains a deep learning model for broiler individual recognition through training; Image acquisition is performed through an image acquisition device, such as a camera, to monitor and obtain low-light images of the identified target; The cosine similarity was used to perform data screening on the initial images. Specifically, the feature vectors of each image were first extracted through a pre-trained convolutional neural network. These feature vectors represent the high-dimensional semantic information of the image. Next, the cosine similarity between each image and other images was calculated. In order to ensure that the retained images have sufficient diversity, a similarity threshold was set. When the cosine similarity of two images exceeds the preset threshold of 0.85, they are considered too similar and are regarded as redundant data. The collected broiler chicken face images were manually annotated using the Labelimg tool. The annotation box mainly surrounds the broiler chicken's face to ensure that the characteristics of each individual can be accurately identified. The generated XML file contains the size of each image, the coordinates of the upper left and lower right corners of the annotation box, and the category information; The training set and test set are divided in a ratio of 7:2:1. The samples in the training set use data enhancement techniques, including random cropping, horizontal flipping, and lighting adjustment, to improve the generalization ability of the model.

[0025] like Figure 3 As shown in the figure, the SPPELANF module combines spatial pyramid pooling (SPP), spatial pooling (SP) and feature pyramid network (FPN) to achieve multi-scale feature extraction and fusion, greatly enhancing the model's perception of targets of different scales. Among them, the pooling layer includes a maximum pooling module, which is divided into three levels, each level is provided with a two-dimensional maximum pooling unit, and after the rotational convolution, the data enters the maximum pooling module and then sequentially enters the three-level two-dimensional maximum pooling unit, and performs two-dimensional maximum pooling in the two-dimensional maximum pooling unit. After each two-dimensional maximum pooling is completed, the result of the two-dimensional maximum pooling is output to the next level of two-dimensional maximum pooling unit until the three two-dimensional maximum poolings are completed, and after each two-dimensional maximum pooling is completed, the result of the two-dimensional maximum pooling is output to the weighted feature pyramid network.

[0026] Spatial pyramid pooling (SPP) extracts multi-scale features through pooling operations at different scales. The formula is expressed as: ; Spatial pooling (SP) uses maximum pooling and average pooling operations to ensure the robustness of features in the spatial dimension.

[0027] Feature Pyramid Network (FPN) enhances the fusion capability of multi-layer features by introducing feature pyramid network. The formula is: ; Rotational Conv: By rotating the input feature map, convolution operations are performed in the directions of 0°, 90°, 180°, and 270° respectively. The formula is: ; in, Indicates the rotation operation of the input feature map, and k is the rotation angle.

[0028] Standard convolution (Conv): used for feature extraction and mapping, using depth-separable convolution and dilated convolution, the formula is: ; Dynamic weight mechanism: In the feature fusion process, the outputs of different convolution paths are weighted and fused through the dynamic weight mechanism. The formula is: ; Among them, w and j are the learned weights.

[0029] like Figure 4 The convolution processing method shown includes: each convolution mode is a separate path, each path processes input data in parallel, and a learnable weighted allocation method is used to perform weighted fusion on the output results of each path to achieve more flexible feature extraction; The convolution processing method includes: setting five paths, the five paths are divided into three convolution paths and two multi-angle pooling paths, and the three convolution paths are respectively: The first convolution path, which includes a 1×1 convolution layer, a 3×3 depth-wise separable convolution layer, and a dilated convolution layer, strengthens feature processing by combining depth-wise separable convolution with dilated convolution. The second convolution path includes a 1×1 convolution layer, a 5×5 depth-separable convolution layer, and an expansion convolution layer. It performs multi-scale feature processing by defining convolution kernels of separable convolutions of different depths. The third convolution path includes a 1×1 convolution layer and a 3×3 dilated convolution layer, which performs feature processing by combining standard convolution and dilated convolution. The two multi-angle pooling paths are: The first pooling path is the maximum pooling path, which includes a maximum pooling layer and a 1×1 convolution layer. The texture features are processed by first pooling and then convolution. The second pooling path is the average pooling path, which includes an average pooling layer and a 1×1 convolution layer. The background features are processed by first pooling and then convolution. The features processed by the above five paths are input into the dynamic trade-off mechanism, and the size is adjusted by interpolation to ensure the consistency of the shape of the feature map. The obtained feature map is weighted fused and output, and the result is then subjected to 1×1 convolution and batch normalization to output the final feature map.

[0030] The structure of the FWConv module includes the following main components: The first convolution path: contains 3×3 depth-wise separable convolution and 1×1 convolution, using dilated convolution, the formula is as follows: ;

[0031] The second convolution path: consists of a 5×5 depth-wise separable convolution and a 1×1 convolution, and the formula is: ; The third convolution path: contains 1×1 convolution and 3×3 dilated convolution, and the formula is expressed as: ; Multi-scale pooling path: Combine maximum pooling and average pooling to integrate different features. The formula is: ; ; During the forward propagation process, the outputs of all paths are resized by interpolation to ensure that their shapes are consistent. Dynamic weights are applied to each path output for weighted fusion, and the fusion formula is: ; Finally, the weighted fusion result is processed by 1×1 convolution and batch normalization to improve the stability of the model output and the detection accuracy, and finally the feature map is output.

[0032] The above convolution design not only improves the model's ability to capture different features, but also improves the computational efficiency in resource-constrained environments. Through the above technical solutions, the SPPELANF and FWConv modules can effectively improve the performance of small target detection and ensure that efficient recognition capabilities can be maintained under different environmental conditions.

[0033] The improved convolution unit FWConv performs convolution processing on input data by using different convolution modes, each convolution mode is a separate path, each path processes input data in parallel, and uses learnable weights to perform weighted fusion on the output results of each path to achieve more flexible feature extraction.

[0034] The data to be tested is input into the initial deep learning model for broiler individual identification, and the identification results are output. The identification results are divided into one category of images, two categories of images, and three categories of images. The precision and recall rates of the one category of images are both greater than or equal to 85%, the precision and recall rates of the two category of images are only one greater than or equal to 85%, and the precision and recall rates of the three category of images are both less than 85%. Add a class of images directly to the initial dataset, The second-category images are recognized for the second time. If the precision and recall of the second-category images are greater than or equal to 85% after the second recognition, the second-category images are added to the initial data set. If any value of the precision and recall of the second-category images is less than 85% after the second recognition, the second-category images are added to the backup data set. Add the three categories of images directly to the backup dataset, Output the initial data set; During the recognition process, judgment labels are set for the output results of the model. Label 1 is set for data images with both precision and recall greater than or equal to 85%, label 2 is set for data images with only one of the precision and recall greater than or equal to 85%, and label 3 is set for data images with label 2 with only one of the precision and recall greater than or equal to 85%. A judgment mechanism is set after the model output results. If the data image has label 1, the data image is added to the initial data set; if the data image has label 2, the data image is re-added to the deep learning model for a second recognition; if the data image has label 0 or 3, the data image is added to the backup data set.

[0035] Through multi-scale feature extraction and convolution path fusion, the model shows faster convergence speed and higher detection accuracy during training.

[0036] like Figure 5The YOLOv10_SPF_FWC model shown is somewhat different from the traditional YOLOv10 model. In the comparison of recognition results, the YOLOv10_SPF_FWC model is compared with the traditional YOLOv10 model. The results show that the YOLOv10_SPF_FWC model is significantly higher than the YOLOv10 in terms of mAP value, especially when multiple chickens are in the same frame. The improved model of the present invention can better identify chicken face samples with long distances and more occlusions. The model parameter quantity and model computational complexity of the two models in the chicken face detection task are compared. The results show that the YOLOv10_SPF_FWC model is superior to YOLOv10 in both parameter quantity and computational complexity. This shows that the model achieves higher lightweight while maintaining high performance, is suitable for resource-constrained edge devices, and ensures more efficient real-time processing capabilities.

[0037] In terms of performance, the YOLOv10_SPF_FWC model is compared with the traditional YOLOv10 model in terms of performance indicators including precision, recall, and accuracy. The results show that the YOLOv10_SPF_FWC model outperforms the unimproved YOLOv10 in all these indicators, especially in samples with multiple chickens in the same frame. This further verifies the effectiveness of the SPPELANF and FWConv modules, indicating that the improved model has significant advantages in precision, recall, and accuracy. The specific results are shown in the following table: ; The performance indicators of the YOLOv10_SPF_FWC model and the traditional YOLOv10 model, including GFLOPS and parameter count, are compared. The results show that the YOLOv10_SPF_FWC model outperforms the unimproved YOLOv10 in both indicators, showing higher computational efficiency and lower storage requirements. This further verifies the effectiveness of the SPPELANF and FWConv modules, indicating that the improved model has significant advantages in computational performance and lightweight. The specific results are shown in the following table: ; Through the above results and Figure 6 It can be seen from the comparison that the lightweight and efficient small target detection method based on YOLOv10 proposed in this embodiment has higher accuracy in the broiler chicken face recognition task, especially in long-distance and occlusion scenarios, showing more stable recognition ability and recognition efficiency, and has lower storage requirements.

[0038] In order to meet the identification requirements of broiler chickens in the whole growth cycle of the farm and improve the recognition accuracy of the system, a dynamic update mechanism is set up, which includes adaptive model update and automated training process; The adaptive model update includes: the system receives the data to be tested and determines the growth cycle of the data to be tested, the server inputs the training parameters corresponding to the growth cycle of the data to be tested into the deep learning model, and the deep learning model recognizes the data to be tested according to the training parameters and outputs the recognition result; The automated training process includes: the deep learning model can automatically generate pseudo labels for unlabeled data in the test data, which are used to update the feature map in the deep learning model; the deep learning model automatically generates training samples according to the feature map in the deep learning model and performs training; the training parameters obtained by the training are saved to the server, which can be called by the deep learning model, so as to achieve the effect of adapting to the changes in the appearance of broilers and realize the dynamic identification of broiler individuals throughout the whole cycle; By introducing a dynamic update mechanism, the detection system can maintain high accuracy throughout the entire growth cycle, significantly reducing the system's equipment requirements. In addition to the core adaptive model update and automated training process, the dynamic update mechanism also includes: Real-time data collection: Edge computing devices are used to collect images and video data of broilers in real time on the farm. These devices capture the facial features of broilers through cameras and sensors to obtain relevant information about the growth environment. Edge computing capability module: Edge devices are not only responsible for data collection, but also for preliminary data processing and model reasoning. This localized computing power reduces dependence on the cloud, improves response speed, and ensures effective facial recognition even when the network is unstable.

[0039] Cloud data synchronization: The collected data is uploaded to the cloud server in real time through a secure network channel. The cloud will store, process and analyze the data to ensure the timeliness and integrity of all information. Cloud reinforcement learning module: A collaborative working mechanism is formed between edge devices and the cloud. When the edge device collects new data in a specific scenario, it will upload the results and related data to the cloud. The cloud server can conduct in-depth analysis of the data through more powerful computing resources and extract more complex features and patterns.

[0040] Full-cycle monitoring: The entire system allows farm managers to monitor the growth status of broilers in real time and adjust breeding strategies based on real-time data. Through the visual interface, users can easily access the results of broiler facial recognition and dynamically updated model performance.

[0041] The steps of the method for generating pseudo labels in the dynamic update mechanism are as follows: Set precision and recall thresholds as the basis for classification; Images with precision and recall rates higher than or equal to 90% are classified as one type of data, and the pseudo labels of this part of data are directly introduced into the training; When the precision and recall rates are higher than or equal to 90%, the images are classified as Class II data. The pseudo labels of this part of data are introduced into the training with a higher weight. Images with precision and recall rates lower than 90% are classified as Class III data. The pseudo labels of this part of data are introduced into the training with a lower weight. The weights are obtained by normalization.

[0042] The following is the process of system identification and model training using a dynamic update mechanism: The server stores pre-trained model training parameters arranged according to the growth cycle. When the image and video data of broiler chickens are collected through the edge computing device, the edge computing device determines the growth cycle of the data to be tested, and then uploads the data to be tested and its corresponding growth cycle to the server, and inputs the data to be tested into the deep learning model. The server sends the model training parameters of the corresponding growth cycle to the deep learning model. The deep learning model receives the model training parameters of the corresponding growth cycle, and identifies the data to be tested based on the model training parameters and outputs the identification results. After the identification is completed, pseudo labels are automatically generated for the unlabeled data in the data to be tested, which are used to update the feature map in the deep learning model; the deep learning model automatically generates training samples according to the feature map in the deep learning model and performs training, and saves the training parameters obtained from the training to the server for the deep learning model to call.

[0043] The dynamic update mechanism integrates cloud-based monitoring and cloud-based reinforcement learning, which not only improves the accuracy of individual broiler identification, but also enables farm managers to make more accurate decisions, improve breeding efficiency, and reduce production costs.

[0044] Embodiment 2: Based on the lightweight broiler individual identification method based on improved YOLOv10 in Example 1, this embodiment provides a lightweight broiler individual identification device based on improved YOLOv10, including: A real-time data acquisition module is used to obtain image and video data of individual broiler chickens, including obtaining image and video data of individual broiler chickens and obtaining relevant information about the broiler chicken growth environment; A model building module is used to use the YOLOv10 network structure as a basic network, including replacing the feature extraction unit in BackBone with an improved feature extraction unit, replacing the convolution unit in neck with an improved convolution unit, forming a new YOLOv10 network structure, using the improved network structure to establish an initial deep learning model for initial broiler individual recognition, and evaluating the precision and recall rate of the model training results, and outputting images with precision and recall rates greater than or equal to 85% in the first and second category images to the image processing module; The model processing module is used to process the model, including inputting the first-class image and the second-class image obtained from the model building module as the initial data set into the server, the server initializes and adjusts the initial deep learning model according to the initial data set, and outputs the recognition result of the adjusted deep learning model as the final recognition result; The dynamic update module is used to update the model in real time according to the growth cycle of broilers, including obtaining the data to be tested, transmitting the data to be tested to the system, the system receiving the data to be tested and determining the growth cycle of the data to be tested, the server inputting the training parameters corresponding to the growth cycle of the data to be tested into the deep learning model, the deep learning model identifies the data to be tested according to the training parameters and outputs the identification results; the dynamic update mechanism drives the deep learning model to automatically generate training samples according to the data to be tested, and updates the parameters in real time to adapt to the changes in the appearance of broilers, so as to realize the dynamic identification of broiler individuals throughout the whole cycle.

[0045] Embodiment three: Figure 7 FIG. 1 shows an internal structure diagram of a computer device in an embodiment. The computer device may be a terminal or a server. Figure 7 As shown, the computer device includes a processor, a memory and a network interface connected via a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor may implement a lightweight broiler individual identification method based on the improved YOLOv10. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor may execute a lightweight broiler individual identification method based on the improved YOLOv10. Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0046] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0047] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0048] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A lightweight broiler chicken individual recognition method based on improved YOLOv10, characterized in that: The steps include, S01, obtaining the data to be tested; S02. Using the YOLOv10 network structure as the basic network, the improved feature extraction unit SPPELANF is used to replace C2F in BackBone as the feature extraction unit, and the improved FWConv unit is used to replace Conv in neck as the convolution unit to form a new YOLOv10 network structure YOLOv10_SEF_FWC. The new network structure is used to establish the initial deep learning model for broiler individual recognition. S03, input the test data into the initial deep learning model for broiler individual identification, output the identification results, and divide the identification results into one type of image, two types of image and three types of image, wherein the precision and recall rate of the one type of image are both greater than or equal to 85%, the precision and recall rate of the two types of images are only one greater than or equal to 85%, and the precision and recall rate of the three types of images are both less than 85%, Add a class of images directly to the initial dataset, The second-category images are recognized for the second time. If the precision and recall of the second-category images are greater than or equal to 85% after the second recognition, the second-category images are added to the initial data set. If any value of the precision and recall of the second-category images is less than 85% after the second recognition, the second-category images are added to the backup data set. Add the three categories of images directly to the backup dataset, Output the initial data set; S04. Input the initial data set into the server. The server initializes and adjusts the initial deep learning model according to the initial data set, and outputs the recognition result of the adjusted deep learning model as the final output recognition result.

2. The lightweight broiler individual identification method based on improved YOLOv10 according to claim 1 is characterized in that: The improved feature extraction unit SPPELANF includes rotational convolution, spatial pooling and weighted feature pyramid network, which enhances the model's perception ability of targets of different scales through multi-scale feature extraction and weighted fusion; The rotational convolution includes inputting the original data into the rotational convolution module, rotating the original data at multiple angles through the rotational convolution module, outputting feature maps at different angles after the rotational convolution, and inputting the splicing results of the feature maps at different angles into the rotational convolution module to obtain the data after the rotational convolution; The feature extraction includes inputting the data after rotational convolution into the pooling layer and the weighted feature pyramid network respectively to obtain the data processed by the pooling layer, inputting the data processed by the pooling layer into the weighted feature pyramid network, and performing weighted processing on the data after rotational convolution and the data processed by the pooling layer in the weighted feature pyramid network to obtain a feature output result; The feature output results are compressed through a channel bottleneck connected to a weighted feature pyramid network.

3. The lightweight broiler individual identification method based on improved YOLOv10 according to claim 2 is characterized in that: The pooling layer includes a maximum pooling module, which is divided into three levels. Each level is provided with a two-dimensional maximum pooling unit. After the data after the rotational convolution enters the maximum pooling module, it sequentially enters the three-level two-dimensional maximum pooling units, and two-dimensional maximum pooling is performed in the two-dimensional maximum pooling units. After each two-dimensional maximum pooling is completed, the result of the two-dimensional maximum pooling is output to the next level of two-dimensional maximum pooling unit until three two-dimensional maximum poolings are completed, and after each two-dimensional maximum pooling is completed, the result of the two-dimensional maximum pooling is output to the weighted feature pyramid network.

4. The lightweight broiler individual identification method based on improved YOLOv10 according to claim 2 is characterized in that: The improved convolution unit FWConv performs convolution processing on the input data by using different convolution modes, each convolution mode is a separate path, each path processes the input data in parallel, and uses a learnable weighted allocation method to perform weighted fusion on the output results of each path to achieve more flexible feature extraction; The convolution processing method includes: setting five paths, the five paths are divided into three convolution paths and two multi-angle pooling paths, and the three convolution paths are respectively: The first convolution path, which includes a 1×1 convolution layer, a 3×3 depth-wise separable convolution layer, and a dilated convolution layer, strengthens feature processing by combining depth-wise separable convolution with dilated convolution. The second convolution path includes a 1×1 convolution layer, a 5×5 depth-separable convolution layer, and an expansion convolution layer. It performs multi-scale feature processing by defining convolution kernels of separable convolutions of different depths. The third convolution path includes a 1×1 convolution layer and a 3×3 dilated convolution layer, which performs feature processing by combining standard convolution and dilated convolution. The two multi-angle pooling paths are: The first pooling path is the maximum pooling path, which includes a maximum pooling layer and a 1×1 convolution layer. The texture features are processed by first pooling and then convolution. The second pooling path is the average pooling path, which includes an average pooling layer and a 1×1 convolution layer. The background features are processed by first pooling and then convolution. The features processed by the five paths are input into the dynamic trade-off mechanism, and the size is adjusted by interpolation to ensure the consistency of the shape of the feature map. The obtained feature map is weighted fused and output, and the result is then subjected to 1×1 convolution and batch normalization to output the final feature map.

5. The lightweight broiler individual identification method based on improved YOLOv10 according to claim 1 is characterized in that: Setting a dynamic update mechanism, the dynamic update mechanism including adaptive model update and automated training process; The adaptive model update includes: the system receives the data to be tested and determines the growth cycle of the data to be tested, the server inputs the training parameters corresponding to the growth cycle of the data to be tested into the deep learning model, and the deep learning model recognizes the data to be tested according to the training parameters and outputs the recognition result; The automated training process includes: the deep learning model can automatically generate pseudo labels for unlabeled data in the test data, which are used to update the feature map in the deep learning model; the deep learning model automatically generates training samples and performs training based on the feature map in the deep learning model; the training parameters obtained from the training are saved to the server and can be called by the deep learning model, thereby achieving the effect of adapting to changes in the appearance of broilers and realizing dynamic identification of individual broilers throughout the entire cycle.

6. The lightweight broiler individual identification method based on improved YOLOv10 according to claim 5 is characterized in that: The method for generating pseudo labels in the automated training process includes: Set precision and recall thresholds as the basis for classification; Images with precision and recall rates higher than or equal to 90% are classified as one type of data, and the pseudo labels of this part of data are directly introduced into the training; When the precision and recall rates are higher than or equal to 90%, the images are classified as Class II data. The pseudo labels of this part of data are introduced into the training with a higher weight. Images with precision and recall rates lower than 90% are classified as Class III data. The pseudo labels of this part of data are introduced into the training with a lower weight. The weights are obtained by normalization.

7. The lightweight broiler individual identification method based on improved YOLOv10 according to claim 6 is characterized in that: The step of obtaining the data to be tested includes: S11. Capturing the required image, the image is acquired by an image acquisition device, such as a camera, to monitor and obtain a low-light image of the target for identification; S12. Using cosine similarity to filter the collected images, when the cosine similarity of two images exceeds a preset threshold of 0.85, one of the images is retained; S13. Use the Labelimg tool to manually annotate the collected broiler chicken facial images. The generated XML file contains the size of each image, the coordinates of the upper left and lower right corners of the annotation box, and the category information; S14. Perform data cleaning and preprocessing on the annotated images to establish a data set; S15. The training set and test set are divided into a ratio of 7:2:

1. Data enhancement techniques are used in the samples of the training set, including random cropping, horizontal flipping, and lighting adjustment, to improve the generalization ability of the model.

8. A lightweight broiler chicken individual identification device based on improved YOLOv10, characterized in that: include, A real-time data acquisition module is used to obtain image and video data of individual broiler chickens, including obtaining image and video data of individual broiler chickens and obtaining relevant information about the broiler chicken growth environment; A model building module is used to use the YOLOv10 network structure as a basic network, including replacing the feature extraction unit in BackBone with an improved feature extraction unit, replacing the convolution unit in neck with an improved convolution unit, forming a new YOLOv10 network structure, using the improved network structure to establish an initial deep learning model for initial broiler individual recognition, and evaluating the precision and recall rate of the model training results, and outputting images with precision and recall rates greater than or equal to 85% in the first and second category images to the image processing module; The model processing module is used to process the model, including inputting the first-class image and the second-class image obtained from the model building module as the initial data set into the server, the server initializes and adjusts the initial deep learning model according to the initial data set, and outputs the recognition result of the adjusted deep learning model as the final recognition result; A dynamic update module is used to update the model in real time according to the growth cycle of broiler chickens, including obtaining the data to be tested, transmitting the data to be tested to the system, the system receiving the data to be tested and determining the growth cycle of the data to be tested, the server inputting the training parameters corresponding to the growth cycle of the data to be tested into the deep learning model, and the deep learning model identifying the data to be tested according to the training parameters and outputting the identification results; Through the dynamic update mechanism, the deep learning model is driven to automatically generate training samples based on the data to be tested, and update parameters in real time to adapt to changes in the appearance of broilers, thereby achieving dynamic identification of individual broilers throughout the entire cycle.

9. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 8.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Automatic live chicken state recognition system and method based on chicken face image analysis

    CN120581211A

  • An automatic live chicken state recognition system and method based on chicken face image analysis

    CN120581211B