Method for measuring shank length of live chicken based on infrared and visible light image fusion
Through the method based on infrared and visible light fusion, the tibia length of a live chicken is automatically calculated, which solves the subjectivity and stability of traditional manual measurements, and realizes efficient and stable tibia length measurement, supporting precise animal husbandry.
Patent Information
- Application Number
- CN202510035021.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-06-06
AI Technical Summary
The traditional method of measuring tib length of live chickens relies on manual operation, which has subjective factors, large measurement stability and error, high labor costs, and stress on chickens.
Using an infrared and visible light image fusion method, the chicken foot image collected by the camera is acquired and registered, and the fusion image is generated using the image information fusion algorithm, and preprocessing and measuring the trained tibial length measurement model is used to realize the automated calculation of tibial length value.
It improves measurement efficiency and stability, reduces damage to chickens, realizes standardized measurement of the length of live chickens, and supports the development of precise animal husbandry.
Smart Images

Figure CN120107334A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for measuring the shank length of a live chicken based on the fusion of infrared and visible light images, and belongs to the technical field of intelligent poultry breeding. Background Art
[0002] With the rapid development of the market demand for poultry products, poultry farmers have increasingly higher requirements for the quality and efficiency of poultry production. In the process of poultry farming, the tibia length of poultry, as one of its phenotypic parameters and important indicators of growth and development, is crucial to improving the production efficiency of breeding companies and optimizing breeding programs. However, the traditional tibia length measurement method mainly relies on manual operation and is affected by subjective factors. The stability and error of the measurement are often relatively large. At the same time, the measurement requires the cooperation of multiple people. The high labor cost consumption and the poultry stress caused during the measurement process may affect the health and production performance of poultry, which is not in line with the development trend of modern animal husbandry. Summary of the invention
[0003] In view of this, the present invention provides a method, system, computer equipment and storage medium for measuring the shank length of live chickens based on the fusion of visible light and infrared images, which can solve the problems of inconsistent manual measurement standards and subjective measurement errors, and is faster and more stable, which helps to accelerate the breeding process and improve farming practices, and promote the development of precision animal husbandry in the poultry industry.
[0004] The first object of the present invention is to provide a method for measuring the shank length of a live chicken based on the fusion of visible light and infrared images.
[0005] The second object of the present invention is to provide a live chicken foot image processing system based on the fusion of visible light and infrared images.
[0006] A third object of the present invention is to provide a computer device.
[0007] A fourth object of the present invention is to provide a storage medium.
[0008] The first object of the present invention can be achieved by adopting the following technical solutions:
[0009] A method for measuring the shank length of a live chicken based on infrared and visible light image fusion, the method comprising:
[0010] Acquire a live chicken foot image captured by a registered visible light camera and an infrared camera, wherein the live chicken foot image includes a registered first visible light image and a registered first infrared image;
[0011] Using an image information fusion algorithm to fuse the first visible light image with the first infrared image to obtain a fused image;
[0012] Perform image preprocessing on the generated fused image;
[0013] The preprocessed fusion image is input into the trained tibia length measurement model for tibia length measurement, and the tibia length value is obtained through regression inference of the tibia length measurement model.
[0014] Furthermore, before obtaining the live chicken feet image collected by the registered visible light camera and infrared camera, the method further includes:
[0015] Acquire a solid circle array calibration plate image captured by a visible light camera and an infrared camera, wherein the calibration plate image includes an unregistered second visible light image and a second infrared image, and the placement position of the calibration plate is consistent with the position of the chicken's feet during actual measurement;
[0016] Traverse the center of the second infrared image and the second visible light image respectively, and the obtained coordinates of the center of the circle are the coordinates of the matching point;
[0017] Calculate any point P in the second infrared image by using the coordinates of the same matching point in the two images 0 (x 0 ,y 0 ) to the midpoint P(x,y) of the second visible light image, as shown in the following formula:
[0018]
[0019] Among them, a 11 、a 12 、a 21 、a 22 is the transformation coefficient, which describes the rotation and scaling relationship between the two images, t x ,t y Indicates the translation between two images;
[0020] According to the obtained mapping relationship, the pixel coordinate system of the second visible light image is used as a reference, and the pixel coordinates of the second visible light image and the second infrared image are aligned through affine transformation to achieve registration of the second visible light image and the second infrared image.
[0021] Furthermore, the tibia length measurement model adopts an improved ResNet-50 model, which is based on the ResNet-50 network and adds an SE module and an SPP module. The ResNet-50 network includes sixteen residual blocks;
[0022] The SE module is placed after the last BN layer of each residual block, and the SE module is sequentially composed of an adaptive average pooling layer, a first linear layer, a first ReLU activation function, a second linear layer, and a second ReLU activation function;
[0023] The SPP module is placed after the last convolution layer of the ResNet-50 network. The SPP module is composed of the first convolution layer, the spatial pyramid pooling layer and the second convolution layer in sequence. The spatial pyramid pooling layer averages the features of the first convolution layer on 5*5, 9*9, and 13*13 grids, and then connects the results together.
[0024] Furthermore, the preprocessed fusion image is input into a trained shin length measurement model to measure the shin length, and the shin length value is obtained through regression inference of the shin length measurement model, specifically including:
[0025] The preprocessed fusion image is input into the trained tibia length measurement model, and the preliminary features are extracted through the pre-convolutional layer and pooling layer of the ResNet-50 network;
[0026] Through the SE module's adaptive average pooling and two-layer fully connected network, the weights of feature channels are learned and adjusted to enhance important features;
[0027] The feature map obtained after processing by all residual blocks enters the SPP module, and multi-scale feature extraction is performed using spatial pyramid pooling to capture spatial information of different scales;
[0028] The spatial information is passed through the fully connected layer of the ResNet-50 network to infer the tibia length value.
[0029] Furthermore, in the training of the tibia length measurement model, the number of training rounds is 500, the batch size of training is 32, and the initial learning rate is 1×10 -4 , using Adam optimizer.
[0030] Furthermore, the step of fusing the first visible light image with the first infrared image using an image information fusion algorithm to obtain a fused image specifically includes:
[0031] The Gabor filter is used to extract the texture feature g in the first visible light image, and the detail weight parameter w is calculated as follows:
[0032]
[0033] Among them, max g and min g are the maximum and minimum values of the obtained texture feature g, respectively. w and min w are the maximum and minimum values of the detail weight parameter w range respectively;
[0034] The Haar wavelet basis is applied to the three color channels of R, G, and B of the first infrared image and the first visible light image, respectively, to obtain the approximate coefficient, horizontal detail, vertical detail, and diagonal detail of each color channel, and the wavelet parameters are calculated as follows:
[0035]
[0036] Among them, w is the detail weight parameter, and the wavelet parameters of the visible light image are given by cA vis , cH vis ,cV vis 、cD vis Indicates that the wavelet parameters of the infrared image are cA inf , cH inf ,cV inf 、cD inf Indicates that the wavelet parameters of the fused image are cA m , cH m ,cV m 、cD m express;
[0037] After the wavelet parameters of each channel of the fused image are subjected to mean filtering for noise reduction and smoothing, the three color channels of R, G, and B of the fused image are reconstructed by inverse wavelet transform.
[0038] The three color channels of the fused image are normalized to obtain a fused image.
[0039] Furthermore, the generated fused image is subjected to image preprocessing, specifically comprising:
[0040] Use the transforms module to process the fused image, retaining only a single chicken foot, adjust the resolution to 224*224, and perform filtering to enhance the image.
[0041] The second object of the present invention can be achieved by adopting the following technical solutions:
[0042] A live chicken foot image processing system based on infrared and visible light image fusion, the system comprising:
[0043] An acquisition module is used to acquire a live chicken foot image captured by a registered visible light camera and an infrared camera, wherein the live chicken foot image includes a registered first visible light image and a registered first infrared image;
[0044] A fusion module, used to fuse the first visible light image with the first infrared image using an image information fusion algorithm to obtain a fused image;
[0045] A preprocessing module, used for performing image preprocessing on the generated fused image;
[0046] The measurement module is used to input the preprocessed fusion image into the trained tibia length measurement model to measure the tibia length, and obtain the tibia length value through regression inference of the tibia length measurement model.
[0047] The third object of the present invention can be achieved by adopting the following technical solutions:
[0048] A computer device comprises a processor and a memory for storing a program executable by the processor, wherein when the processor executes the program stored in the memory, the above-mentioned method for measuring the shank length of a live chicken is implemented.
[0049] The fourth object of the present invention can be achieved by adopting the following technical solutions:
[0050] A storage medium stores a program, and when the program is executed by a processor, the above-mentioned method for measuring the shank length of a live chicken is implemented.
[0051] The present invention has the following beneficial effects compared with the prior art:
[0052] The present invention measures the shank length of live chickens based on the fusion of infrared and visible light images, thereby improving the measurement efficiency and reducing the damage to the chickens, thereby achieving relatively stable and consistent standardized measurement of the shank length of live chickens. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] 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 the structures shown in these drawings without paying creative work.
[0054] Figure 1 This is a flow chart of a method for measuring the shank length of a live chicken based on the fusion of visible light and infrared images according to Example 1 of the present invention.
[0055] Figure 2 This is a flowchart of the registration operation of the chicken foot shank length measurement method based on visible light and infrared image fusion in Example 1 of the present invention.
[0056] Figure 3 This is an image fusion flow chart of the chicken leg shank length measurement method based on visible light and infrared image fusion according to Example 1 of the present invention.
[0057] Figure 4 This is a flowchart of shank length measurement of a chicken foot shank length measurement method based on visible light and infrared image fusion according to Example 1 of the present invention.
[0058] Figure 5This is a structural block diagram of a live chicken foot image processing system based on infrared and visible light image fusion according to Example 2 of the present invention.
[0059] Figure 6 This is a structural block diagram of a computer device according to Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0061] Embodiment 1:
[0062] like Figure 1 As shown, this embodiment provides a method for measuring the shank length of a live chicken based on infrared and visible light image fusion, the method comprising the following steps:
[0063] S101. Acquire a live chicken foot image captured by a registered visible light camera and an infrared camera, wherein the live chicken foot image includes a first registered visible light image and a first infrared image.
[0064] Before step S101, the infrared camera and the visible light camera need to be registered, such as Figure 2 As shown, specifically including:
[0065] S201, obtaining a solid circle array calibration plate image captured by a visible light camera and an infrared camera.
[0066] In this embodiment, the placement position of the calibration plate is consistent with the position of the chicken's feet during actual measurement, and the calibration plate is photographed using a visible light camera and an infrared camera to obtain an unregistered second infrared image and a second visible light image.
[0067] S202 , traverse the centers of the second infrared image and the second visible light image respectively, and the obtained coordinates of the centers of the circles are the coordinates of the matching points.
[0068] S203, calculating any point P of the second infrared image by using the coordinates of the same matching point in the two images 0 (x 0 ,y 0 ) to the midpoint P(x,y) of the second visible light image, as shown in the following formula:
[0069]
[0070] Among them, a 11 、a 12 、a 21 、a 22 is the transformation coefficient, which describes the rotation and scaling relationship between the two images, t x ,t y Indicates the translation between two images.
[0071] S204 , based on the obtained mapping relationship and taking the pixel coordinate system of the second visible light image as a reference, align the pixel coordinates of the second visible light image and the second infrared image through affine transformation to achieve registration of the second visible light image and the second infrared image.
[0072] In this embodiment, after the infrared camera and the visible light camera are aligned, the two are placed in parallel and the lenses are aimed at the chicken's foot area to capture the chicken's feet, metatarsals and tibia. The collected live chicken foot images include the aligned first infrared image and the first visible light image.
[0073] S102: Using an image information fusion algorithm to fuse the first visible light image with the first infrared image to obtain a fused image.
[0074] Furthermore, if Figure 3 As shown, step S102 specifically includes:
[0075] S1021, using a Gabor filter to extract texture features g in the first visible light image, and calculating a detail weight parameter w, wherein the Gabor filter kernel is (7, 7), and the detail weight parameter is calculated as follows:
[0076]
[0077] Among them, max g and min g are the maximum and minimum values of the obtained texture feature g, respectively. w and min w are the maximum and minimum values of the detail weight parameter w, respectively.
[0078] S1022, applying the Haar wavelet basis to the three color channels R, G, and B of the first infrared image and the first visible light image, respectively, obtaining the approximate coefficient, horizontal detail, vertical detail, and diagonal detail of each color channel, and calculating the wavelet parameters, as shown in the following formula:
[0079]
[0080] Among them, w is the detail weight parameter, and the wavelet parameters of the visible light image are given by cA vis , cH vis ,cV vis、cD vis Indicates that the wavelet parameters of the infrared image are cA inf , cH inf ,cV inf 、cD inf Indicates that the wavelet parameters of the fused image are cA m , cH m ,cV m 、cD m express.
[0081] S1023, after the wavelet parameters of each channel of the fused image are subjected to mean filtering for noise reduction and smoothing, the three color channels R, G, and B of the fused image are reconstructed by inverse wavelet transform.
[0082] S1024: Normalize the three color channels of the fused image to obtain a fused image.
[0083] S103: performing image preprocessing on the generated fused image.
[0084] In this embodiment, the transforms module is used to process the fused image, only a single chicken foot is retained, the resolution is adjusted to 224*224, and filtering is performed to enhance the image.
[0085] S104, inputting the preprocessed fusion image into a trained tibia length measurement model to measure the tibia length, and obtaining the tibia length value through regression inference of the tibia length measurement model.
[0086] In this embodiment, the tibia length measurement model adopts an improved ResNet-50 model. The improved ResNet-50 model is based on the ResNet-50 network, and an SE module and an SPP module are added. The ResNet-50 network includes sixteen residual blocks; the SE module is placed after the last BN layer of each residual block, and the SE module is sequentially composed of an adaptive average pooling layer, a first linear layer, a first ReLU activation function, a second linear layer, and a second ReLU activation function; the SPP module is placed after the last convolution layer of the ResNet-50 network, and the SPP module is sequentially composed of a first convolution layer, a spatial pyramid pooling layer, and a second convolution layer, wherein the spatial pyramid pooling layer averages the features of the first convolution layer on 5*5, 9*9, and 13*13 grids, respectively, and then connects the results together.
[0087] The training process of the shin length measurement model in this embodiment is as follows: after the infrared camera and the visible light camera are fixed, a large number of live chicken feet images are collected as a data set, and the shin lengths of all photographed chickens are manually measured, and data labels are made corresponding to the images. The shin length measurement model is trained using the above images and data labels; wherein, the number of training rounds is 500, the batch size of training is 32, and the initial learning rate is 1×10 -4 , using Adam optimizer.
[0088] Furthermore, if Figure 4 As shown, step S104 specifically includes:
[0089] S1041. Input the preprocessed fusion image into the trained tibia length measurement model, and extract preliminary features through the pre-convolutional layer and pooling layer of the ResNet-50 network.
[0090] S1042: Through the adaptive average pooling of the SE module and the two-layer fully connected network, the weights of the feature channels are learned and adjusted to enhance important features.
[0091] S1043: The feature map obtained after being processed by all residual blocks enters the SPP module, and multi-scale feature extraction is performed using spatial pyramid pooling to capture spatial information of different scales.
[0092] S1044. Pass the spatial information through the fully connected layer of the ResNet-50 network to infer the tibia length value.
[0093] It should be noted that although the method operations of the above embodiments are described in a specific order, this does not require or imply that these operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted can be performed in a different order. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.
[0094] Embodiment 2:
[0095] like Figure 5 As shown, this embodiment provides a live chicken foot image processing system based on infrared and visible light image fusion, the system includes an acquisition module 501, a fusion module 502, a pre-processing module 503 and a measurement module 504, and the specific functions of each module are as follows:
[0096] An acquisition module 501 is used to acquire a live chicken foot image captured by a registered visible light camera and an infrared camera, wherein the live chicken foot image includes a registered first visible light image and a registered first infrared image;
[0097] A fusion module 502 is used to fuse the first visible light image with the first infrared image using an image information fusion algorithm to obtain a fused image;
[0098] A preprocessing module 503 is used to perform image preprocessing on the generated fused image;
[0099] The measurement module 504 is used to input the pre-processed fusion image into the trained shin length measurement model to measure the shin length, and obtain the shin length value through regression reasoning of the shin length measurement model.
[0100] The live chicken feet image processing system of this embodiment supports obtaining the tibia length value and density distribution histogram of all measured chickens. The acquired infrared images, visible light images and fused images will be saved according to the preset naming rules, and an interface can be developed based on Qt, which supports real-time image display, measurement result display and data management functions. The interface design focuses on user experience to ensure that all functions are easy to access and use. The specific description of the interface is as follows:
[0101] The interface design is developed based on Qt, providing a set of user-friendly interfaces covering data input, result output and operation options;
[0102] The interface contains multiple modules, such as the tibia length data image selection area, measurement results and table display area;
[0103] Design simple operation buttons, such as "Real-time detection", "Detect local images", and "Batch detect local images", to simplify user operation processes and improve work efficiency;
[0104] The result display part uses tables and numerical values to intuitively display all measured tibia length values and the file names of the corresponding image data, and supports automatic saving and exporting of data.
[0105] The specific implementation of each of the above modules refers to the above-mentioned Example 1; it should be noted that the system provided in this embodiment is only illustrated by the division of the above-mentioned functional modules. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure can be divided into different functional modules to complete all or part of the functions described above.
[0106] Embodiment 3:
[0107] This embodiment provides a computer device, such as Figure 6As shown, it includes a processor 602, a memory, an input device 603, a display device 604 and a network interface 605 connected through a device bus 601, the processor is used to provide computing and control capabilities, the memory includes a non-volatile storage medium 606 and an internal memory 607, the non-volatile storage medium 606 stores an operating device, a computer program and a database, the internal memory 607 provides an environment for the operation of the operating device and the computer program in the non-volatile storage medium, when the processor 1102 executes the computer program stored in the memory, the method for measuring the shank length of live chickens in the above-mentioned embodiment 1 is implemented as follows:
[0108] Acquire a live chicken foot image captured by a registered visible light camera and an infrared camera, wherein the live chicken foot image includes a first visible light image and a first infrared image that have been registered; fuse the first visible light image with the first infrared image using an image information fusion algorithm to obtain a fused image; perform image preprocessing on the generated fused image; input the preprocessed fused image into a trained shank length measurement model to measure the shank length, and obtain the shank length value through regression inference of the shank length measurement model.
[0109] Embodiment 4:
[0110] This embodiment provides a storage medium, which is a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method for measuring the shank length of a live chicken in the above-mentioned embodiment 1 is implemented as follows:
[0111] Acquire a live chicken foot image captured by a registered visible light camera and an infrared camera, wherein the live chicken foot image includes a first visible light image and a first infrared image that have been registered; fuse the first visible light image with the first infrared image using an image information fusion algorithm to obtain a fused image; perform image preprocessing on the generated fused image; input the preprocessed fused image into a trained shank length measurement model to measure the shank length, and obtain the shank length value through regression inference of the shank length measurement model.
[0112] It should be noted that the computer-readable storage medium of the present embodiment may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor device, device or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0113] In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution device, device, or device. In this embodiment, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable storage medium other than a computer-readable storage medium, which may send, propagate, or transmit a program used by or in combination with an instruction execution device, device, or device. The computer program contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0114] The computer readable storage medium can be written in one or more programming languages or a combination thereof to execute the computer program of the present embodiment, and the programming language includes an object-oriented programming language, such as Java, Python, C++, and also includes a conventional procedural programming language, such as C language or a similar programming language. The program can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0115] In summary, the present invention uses a live chicken shank length measurement method based on the fusion of infrared and visible light images, which improves the measurement efficiency while effectively reducing the damage to the chickens. The live chicken shank length measurement algorithm based on the fused image has good measurement consistency and strong stability, and realizes the standardized measurement of the live chicken shank length.
[0116] The above is only a preferred embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical solution and invention concept of the present invention within the scope disclosed by the present invention, which shall fall within the protection scope of the present invention.
Claims
1. A method for measuring the shank length of live chickens based on infrared and visible light image fusion, characterized in that: The method comprises: Acquire a live chicken foot image captured by a registered visible light camera and an infrared camera, wherein the live chicken foot image includes a registered first visible light image and a registered first infrared image; Using an image information fusion algorithm to fuse the first visible light image with the first infrared image to obtain a fused image; Perform image preprocessing on the generated fused image; The preprocessed fusion image is input into the trained tibia length measurement model for tibia length measurement, and the tibia length value is obtained through regression inference of the tibia length measurement model.
2. The method for measuring the shank length of a live chicken according to claim 1, characterized in that: Before obtaining the live chicken feet images collected by the registered visible light camera and the infrared camera, the method further includes: Acquire a solid circle array calibration plate image captured by a visible light camera and an infrared camera, wherein the calibration plate image includes an unregistered second visible light image and a second infrared image, and the placement position of the calibration plate is consistent with the position of the chicken's feet during actual measurement; Traverse the center of the second infrared image and the second visible light image respectively, and the obtained coordinates of the center of the circle are the coordinates of the matching point; The mapping relationship from any point P0(x0, y0) in the second infrared image to the point P(x, y) in the second visible light image is calculated by the coordinates of the same matching point in the two images, as shown in the following formula: Among them, a 11 、a 12 、a 21 、a 22 is the transformation coefficient, which describes the rotation and scaling relationship between the two images, t x ,t y Represents the translation between two images; According to the obtained mapping relationship, the pixel coordinate system of the second visible light image is used as a reference, and the pixel coordinates of the second visible light image and the second infrared image are aligned through affine transformation to achieve registration of the second visible light image and the second infrared image.
3. The method for measuring the shank length of a live chicken according to claim 1, characterized in that: The tibia length measurement model adopts an improved ResNet-50 model, which is based on the ResNet-50 network and adds an SE module and an SPP module. The ResNet-50 network includes sixteen residual blocks; The SE module is placed after the last BN layer of each residual block, and the SE module is sequentially composed of an adaptive average pooling layer, a first linear layer, a first ReLU activation function, a second linear layer, and a second ReLU activation function; The SPP module is placed after the last convolution layer of the ResNet-50 network. The SPP module is composed of the first convolution layer, the spatial pyramid pooling layer and the second convolution layer in sequence. The spatial pyramid pooling layer averages the features of the first convolution layer on 5*5, 9*9, and 13*13 grids, and then connects the results together.
4. The method for measuring the shank length of a live chicken according to claim 3, characterized in that: The pre-processed fusion image is input into a trained shin length measurement model to measure the shin length, and the shin length value is obtained through regression inference of the shin length measurement model, specifically including: The preprocessed fusion image is input into the trained tibia length measurement model, and the preliminary features are extracted through the pre-convolutional layer and pooling layer of the ResNet-50 network; Through the SE module's adaptive average pooling and two-layer fully connected network, the weights of feature channels are learned and adjusted to enhance important features; The feature map obtained after processing by all residual blocks enters the SPP module, and multi-scale feature extraction is performed using spatial pyramid pooling to capture spatial information of different scales; The spatial information is passed through the fully connected layer of the ResNet-50 network to infer the tibia length value.
5. The method for measuring the shank length of a live chicken according to claim 3, characterized in that: In the training of the tibia length measurement model, the training rounds are 500, the training batch size is 32, and the initial learning rate is 1×10 -4 , using Adam optimizer.
6. The method for measuring the shank length of a live chicken according to any one of claims 1 to 5, characterized in that: The method of fusing the first visible light image with the first infrared image using an image information fusion algorithm to obtain a fused image specifically includes: The Gabor filter is used to extract the texture feature g in the first visible light image, and the detail weight parameter w is calculated as follows: Among them, max g and min g are the maximum and minimum values of the obtained texture feature g, respectively. w and min w are the maximum and minimum values of the detail weight parameter w range respectively; The Haar wavelet basis is applied to the three color channels of R, G, and B of the first infrared image and the first visible light image, respectively, to obtain the approximate coefficient, horizontal detail, vertical detail, and diagonal detail of each color channel, and the wavelet parameters are calculated as follows: Among them, w is the detail weight parameter, and the wavelet parameters of the visible light image are given by cA vis , cH vis ,cV vis 、cD vis Indicates that the wavelet parameters of the infrared image are cA inf , cH inf ,cV inf 、cD inf Indicates that the wavelet parameters of the fused image are cA m , cH m ,cV m 、cD m express; After the wavelet parameters of each channel of the fused image are subjected to mean filtering for noise reduction and smoothing, the three color channels of R, G, and B of the fused image are reconstructed by inverse wavelet transform. The three color channels of the fused image are normalized to obtain a fused image.
7. The method for measuring the shank length of a live chicken according to any one of claims 1 to 5, characterized in that: The image preprocessing of the generated fused image specifically includes: Use the transforms module to process the fused image, retaining only a single chicken foot, adjust the resolution to 224*224, and perform filtering to enhance the image.
8. A live chicken feet image processing system based on infrared and visible light image fusion, characterized in that: The system comprises: An acquisition module is used to acquire a live chicken foot image captured by a registered visible light camera and an infrared camera, wherein the live chicken foot image includes a registered first visible light image and a registered first infrared image; A fusion module, used to fuse the first visible light image with the first infrared image using an image information fusion algorithm to obtain a fused image; A preprocessing module, used for performing image preprocessing on the generated fused image; The measurement module is used to input the preprocessed fusion image into the trained tibia length measurement model to measure the tibia length, and obtain the tibia length value through regression inference of the tibia length measurement model.
9. A computer device comprising a processor and a memory for storing a program executable by the processor, characterized in that: When the processor executes the program stored in the memory, the method for measuring the shank length of a live chicken as described in any one of claims 1 to 7 is implemented.
10. A storage medium storing a program, characterized in that: When the program is executed by a processor, the method for measuring the shank length of a live chicken as described in any one of claims 1 to 7 is implemented.