CN-122024287-A - Cattle individual identity recognition method and system based on lightweight deep learning network
Abstract
The invention discloses a method and a system for identifying individual identity of a cow on the basis of a lightweight deep learning network. The method comprises the steps of 1, collecting face image data, preprocessing, 2, constructing an individual identification model of the cattle, 3, inputting the preprocessed face image data into the individual identification model of the cattle, training the individual identification model of the cattle, 4, identifying the identity of the cattle by using the trained individual identification model of the cattle, and outputting an identification result. The method has the advantages that the precision and the efficiency of cow identification are considered, the lightweight trunk greatly reduces model parameters and calculated amount, the method is suitable for pasture edge equipment, MSAD-Layer strengthens cow face fine granularity characteristic capture, IRB-TLayer relieves information transmission bottleneck, the two cooperate to ensure high identification precision, and intelligent management such as pasture feeding, health monitoring and tracing can be efficiently supported.
Inventors
- CAO PANPAN
- SUN WEI
- KONG FANTAO
- ZHANG RUIFENG
- WANG YI
- WEI PEIGANG
- MA NAN
- ZHANG SONGXUE
- FU ZHEN
Assignees
- 中国农业科学院农业信息研究所
Dates
- Publication Date
- 20260512
- Application Date
- 20260213
Claims (7)
- 1. A cattle individual identity recognition method based on a lightweight deep learning network is characterized by comprising the following steps of: step 1, acquiring cow face image data and preprocessing; Step 2, constructing an individual identity recognition model of the bovine; step 3, inputting the preprocessed cattle face image data into an individual identification model of the cattle, and training the individual identification model of the cattle; And 4, carrying out identity recognition on the cattle by using the trained individual identity recognition model of the cattle, and outputting a recognition result.
- 2. The method for identifying the identity of the individual bovine body based on the lightweight deep learning network according to claim 1, wherein the step 1 comprises the following steps: the multi-head cattle are subjected to multi-angle video acquisition, and an initial static image set is generated in a frame extraction mode; data cleaning is carried out on the initial static image set, and invalid samples are removed; cutting out a cattle face image by combining YOLOv s model and an automatic labeling method of LabelImg image labeling tool; and (3) performing de-duplication processing on the initial static image set before and after cutting through the structural similarity index, outputting the cut cow face image data, and finishing image preprocessing.
- 3. The method for identifying the identity of the individual bovine body based on the lightweight deep learning network according to claim 1, wherein the step 2 comprises the following steps: carrying out structural compression on the reference model DenseNet121 to construct a lightweight backbone network DenseNet _Lite; The backbone network DenseNet _Lite is improved, and MSAD-Layer and IRB-TLayer are added; And integrating the improved backbone network DenseNet _Lite to obtain the individual identity identification model of the bovine.
- 4. The method for identifying the identity of the individual bovine body based on the lightweight deep learning network according to claim 3, wherein the reference model DenseNet is subjected to deep compression and width compression to obtain the backbone network DenseNet _lite.
- 5. The method for identifying the individual identity of the cow based on the lightweight deep learning network according to claim 4, wherein in the backbone network DenseNet _Lite, all standard transition layers are replaced with an inverse residual bottleneck structure transition Layer IRB-TLayer in a unified mode and used for optimizing information flow and fidelity in a channel conversion process, a multi-scale attention-dense Layer MSAD-Layer is deployed in a deep dense block of the network, and an alternate integration strategy is adopted in each dense block where the MSAD-Layer is deployed, so that the individual identity identification model of the cow is obtained.
- 6. The method for identifying the individual identity of the bovine body based on the lightweight deep learning network according to claim 5, wherein the accuracy, the recall rate, the precision, the F1 score, the FPS, the FLPs and the model parameter are used as evaluation indexes to measure the performance of the individual identity identification model of the bovine body.
- 7. Cattle individual identity recognition system based on lightweight deep learning network, which is characterized by comprising: The data acquisition module is used for acquiring the cow face image data and preprocessing the cow face image data; the model building module is used for building an individual identity recognition model of the cow; the model training module is used for inputting the preprocessed cow face image data into the cow individual identity recognition model and training the cow individual identity recognition model; and the output module is used for carrying out identity recognition on the cattle by using the trained individual identity recognition model of the cattle and outputting a recognition result.
Description
Cattle individual identity recognition method and system based on lightweight deep learning network Technical Field The invention relates to the technical field of livestock breeding informatization, in particular to a cattle individual identity recognition method and system based on a light-weight deep learning network Background At present, accurate identification of individual identities is a basis for realizing accurate feeding, health monitoring and other applications in intelligent cultivation, and is important for improving cultivation efficiency and animal welfare. The traditional ear tag or RFID identification mode has the problems of contact stress, easy falling, high cost and the like. Non-contact recognition technology based on computer vision, especially utilizing unique biological features of cow face, has become a mainstream research direction. However, the existing deep learning model faces a core dilemma that the model (such as DenseNet, resNet) pursuing high precision is usually large in parameter quantity and complex in calculation and is difficult to be deployed on the edge computing equipment with limited pasture resources, and the existing lightweight model (such as MobileNet) usually does not perform well on the identification tasks with fine granularity and high similarity such as cow faces at the expense of precision and is difficult to meet actual production requirements. Therefore, a method and a system for identifying the individual identity of the cow on the basis of a lightweight deep learning network are provided, and the technical problem that the precision and the efficiency are difficult to be compatible is solved. Disclosure of Invention In view of the above, the invention provides a method and a system for identifying individual identity of a cow based on a lightweight deep learning network, which are capable of considering the recognition precision and efficiency of the cow, greatly reducing model parameters and calculation amount by a lightweight trunk and adapting to pasture edge equipment, wherein MSAD-Layer can strengthen cow face fine granularity feature capture, IRB-TLayer can relieve information transmission bottleneck, and the two cooperate to ensure high recognition precision and efficiently support intelligent management such as pasture feeding, health monitoring, tracing and the like. In order to achieve the purpose, the invention adopts the following technical scheme that the method for identifying the identity of the individual cattle based on the lightweight deep learning network comprises the following steps: step 1, acquiring cow face image data and preprocessing; Step 2, constructing an individual identity recognition model of the bovine; step 3, inputting the preprocessed cattle face image data into an individual identification model of the cattle, and training the individual identification model of the cattle; And 4, carrying out identity recognition on the cattle by using the trained individual identity recognition model of the cattle, and outputting a recognition result. Preferably, the step 1 includes: the multi-head cattle are subjected to multi-angle video acquisition, and an initial static image set is generated in a frame extraction mode; data cleaning is carried out on the initial static image set, and invalid samples are removed; cutting out a cattle face image by combining YOLOv s model and an automatic labeling method of LabelImg image labeling tool; and (3) performing de-duplication processing on the initial static image set before and after cutting through the structural similarity index, outputting the cut cow face image data, and finishing image preprocessing. Preferably, the step 2 includes: carrying out structural compression on the reference model DenseNet121 to construct a lightweight backbone network DenseNet _Lite; The backbone network DenseNet _Lite is improved, and MSAD-Layer and IRB-TLayer are added; And integrating the improved backbone network DenseNet _Lite to obtain the individual identity identification model of the bovine. Preferably, the reference model DenseNet121 is subjected to depth compression and width compression to obtain the backbone network DenseNet _lite. Preferably, in the backbone network DenseNet _Lite, all standard transition layers are uniformly replaced with an inverse residual bottleneck structure transition Layer IRB-TLayer for optimizing information flow and fidelity in a channel conversion process, a multi-scale attention-dense Layer MSAD-Layer is deployed in a deep dense block of the network, and an alternate integration strategy is adopted in each dense block where the MSAD-Layer is deployed, so that a cattle individual identity recognition model is obtained. Preferably, the performance of the individual identity recognition model of the bovine is measured by taking the accuracy, recall, precision, F1 score, FPS, FLPs and model parameter as evaluation indexes. Preferably, a cow individual identifica