An animal multi-task joint detection method, system, device and medium based on infrared camera images

By preprocessing and multi-task detection of infrared camera images, the problem of insufficient accuracy in identifying animal sex and age in infrared images has been solved, achieving efficient multi-task joint detection of animals and meeting the monitoring needs of ecological parks.

CN121281102BActive Publication Date: 2026-05-01INST OF FOREST ECOLOGY ENVIRONMENT & PROTECTION CHINESE ACAD OF FORESTRY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511843276.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-09
Publication Date
2026-05-01
Estimated Expiration
2045-12-09

AI Technical Summary

Technical Problem

Existing infrared camera image animal detection algorithms are inefficient at identifying animal sex, age, and location, and their accuracy is low, failing to meet the species monitoring needs of ecological parks.

Method used

A multi-task joint detection method based on infrared camera images is adopted. After preprocessing the infrared images, they are input into a trained target animal information detection model. Multi-scale feature map groups and multi-task detection channels are used to accurately identify animal species, sex and age.

Benefits of technology

It enables efficient and accurate identification of animal species, sex, and age, providing an automated solution for species monitoring in ecological parks and improving detection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121281102B_ABST
    Figure CN121281102B_ABST
Patent Text Reader

Abstract

The application provides an animal multi-task joint detection method, system, device and medium based on infrared camera images, which comprises the following steps: acquiring an infrared image containing a target animal; preprocessing the infrared image to obtain a preprocessed infrared image; inputting the preprocessed infrared image into a trained target animal information detection model for feature extraction to obtain a multi-scale feature map group; the target animal information detection model is obtained by training a preset neural network with a target loss function according to a disturbed infrared image training set; and the multi-scale feature map group is detected and processed by multiple parallel task detection channels of the target animal information detection model to obtain detection information of the target animal in the infrared image, so that the species, gender and age category of the animal are accurately identified.
Need to check novelty before this filing date? Find Prior Art

Description

A method, system, device, and medium for multi-task joint detection of animals based on infrared camera images. Technical Field

[0001] This invention relates to the field of computer information processing technology, and in particular to a method, system, device and medium for multi-task joint detection of animals based on infrared camera images. Background Technology

[0002] With increasing awareness of ecological conservation, ecoparks around the world play a vital role in biodiversity conservation and management. Regular monitoring of animal species distribution, population size, sex ratio, and age structure within ecoparks is a crucial foundation for assessing ecosystem health and developing conservation strategies. However, in complex natural environments, wildlife activity is often random and nocturnal. Therefore, infrared cameras, with their advantages of high concealment, all-weather operation, and large-scale deployment, have become a core tool for wildlife monitoring.

[0003] Furthermore, with the development of deep learning technology, object detection algorithms have made significant progress in the field of image recognition. However, existing object detection algorithms are mainly designed for natural light images and lack optimization support for infrared images. At the same time, most existing algorithms can only complete species classification tasks and struggle to further distinguish animal sex, age, and location information, resulting in low accuracy in animal identification. Summary of the Invention

[0004] The technical problem this invention aims to solve is to provide a method, system, device, and medium for multi-task joint detection of animals based on infrared camera images. This improves the efficiency and accuracy of animal detection and identification, providing an efficient and automated solution for species monitoring in ecological parks.

[0005] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:

[0006] In a first aspect, embodiments of the present invention provide a multi-task joint detection method for animals based on infrared camera images, including:

[0007] Acquire infrared images containing the target animal for processing;

[0008] The infrared image to be processed is preprocessed to obtain a preprocessed infrared image;

[0009] The preprocessed infrared images are input into a trained target animal information detection model for feature extraction to obtain a multi-scale feature map set; the target animal information detection model is obtained by training a preset neural network with a target loss function based on a perturbed infrared image training set;

[0010] The multi-scale feature map group is processed by multiple parallel task detection channels of the target animal information detection model to obtain the detection information of the target animal in the infrared image to be processed.

[0011] Optionally, the infrared image to be processed is preprocessed to obtain a preprocessed infrared image, including:

[0012] The infrared image to be processed is scaled to obtain a first image;

[0013] The first image is enhanced to obtain the second image;

[0014] The second image is normalized to obtain a preprocessed infrared image.

[0015] Optionally, the training process of the target animal information detection model includes:

[0016] Acquire infrared image training set;

[0017] The infrared image training set is perturbed and enhanced to obtain an enhanced training infrared image set.

[0018] The enhanced training infrared image set is input into the shared backbone network of the preset neural network model for multi-level feature extraction to obtain a training multi-scale feature map;

[0019] The trained multi-scale feature map is input into the multi-task detection channel of the preset neural network model, and detection processing is performed according to the target loss function to obtain the target animal information detection model.

[0020] Optionally, the enhanced training infrared image set is input into the shared backbone network of the preset neural network model for multi-level feature extraction to obtain a training multi-scale feature map, including:

[0021] Initial feature extraction and downsampling are performed on each frame of the enhanced training infrared image set to obtain an initial medium-resolution feature map;

[0022] The initial medium-resolution feature map is subjected to multi-stage progressive downsampling and feature transformation to obtain an intermediate feature map set containing different scales;

[0023] Based on the top-down semantic information propagation path and the bottom-up detail information enhancement path, the intermediate feature maps of different scales in the intermediate feature map group are fused according to multiple preset scales to obtain a training multi-scale feature map group containing semantic information and spatial detail information.

[0024] Optionally, the trained multi-scale feature map is input into the multi-task detection channel of the preset neural network model, and detection processing is performed according to the target loss function to obtain the target animal information detection model, including:

[0025] The trained multi-scale feature map is input into the species category detection channel of the preset neural network model for detection processing to obtain the probability distribution of species categories;

[0026] The trained multi-scale feature map is input into the gender category prediction channel of the preset neural network model for detection processing to obtain the probability distribution of gender category;

[0027] The trained multi-scale feature map is input into the age category prediction channel of the preset neural network model for detection processing to obtain the probability distribution of age stages; the loss of the probability distribution of species category, sex category, and age stage is adjusted according to the target loss function to obtain the target animal information detection model.

[0028] Optionally, the target loss function is:

[0029] ;

[0030] in, Cross-entropy loss for species classification; Cross-entropy loss for gender classification; For age classification, cross-entropy loss, For bounding box regression loss, For target confidence loss, These are the weights.

[0031] Optionally, the multi-scale feature map group is processed by multiple parallel task detection channels of the target animal information detection model to obtain the detection information of the target animal in the infrared image to be processed, including:

[0032] The multi-scale feature map group is input into the species category detection channel of the target animal information detection model for detection processing to obtain the probability value of the species category;

[0033] The multi-scale feature map group is input into the sex category prediction channel of the target animal information detection model for detection processing to obtain the probability value of the sex category;

[0034] The multi-scale feature map group is input into the age category prediction channel of the target animal information detection model for detection processing to obtain the probability value of the age stage;

[0035] The detection information of the target animal is obtained based on the probability values ​​of the species category, the sex category, and the age group.

[0036] Secondly, embodiments of the present invention also provide an animal multi-task joint detection system based on infrared camera images, comprising:

[0037] The acquisition module is used to acquire infrared images of the target animal that are to be processed.

[0038] The processing module is used to preprocess the infrared image to be processed to obtain a preprocessed infrared image; input the preprocessed infrared image into a trained target animal information detection model for feature extraction to obtain a multi-scale feature map set; the target animal information detection model is trained on a preset neural network with a target loss function based on a perturbed infrared image training set; the multi-scale feature map set is detected and processed by multiple parallel task detection channels of the target animal information detection model to obtain the detection information of the target animal in the infrared image to be processed.

[0039] Thirdly, embodiments of the present invention also provide a computing device, including: a processor, a memory, and a communication bus, wherein the processor and the memory communicate with each other through the communication bus; the memory stores program instructions that can be executed by the processor, and the processor can execute the steps of the animal multi-task joint detection method based on infrared camera images as described in the first aspect by calling the program instructions.

[0040] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the animal multi-task joint detection method based on infrared camera images as described in the first aspect.

[0041] The above-described solution of the present invention has at least the following beneficial effects:

[0042] The above-described solution of the present invention preprocesses an infrared image containing a target animal to obtain a preprocessed infrared image; the preprocessed infrared image is then input into a trained target animal information detection model for feature extraction to obtain a multi-scale feature map set; the target animal information detection model is trained on a preset neural network with a target loss function based on a perturbed infrared image training set; the multi-scale feature map set is then detected and processed by multiple parallel task detection channels of the target animal information detection model to obtain the detection information of the target animal in the infrared image to be processed, thereby achieving accurate identification of the animal's species, sex, and age category, solving the pain points of low efficiency and insufficient accuracy of traditional methods, and providing an efficient and automated solution for species monitoring in ecological parks. Attached Figure Description

[0043] Figure 1 is a flowchart of an embodiment of the animal multi-task joint detection method based on infrared camera images of the present invention;

[0044] Figure 2 is a schematic diagram of an embodiment of the animal detection system based on infrared imaging of the present invention;

[0045] Figure 3 is a schematic diagram of the structure of a physical embodiment of the electronic device of the present invention. Detailed Implementation

[0046] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.

[0047] As shown in Figure 1, an embodiment of the present invention proposes a multi-task joint detection method for animals based on infrared camera images, including:

[0048] Step 11: Acquire an infrared image containing the target animal to be processed; here, the infrared image to be processed can be an infrared image containing one or more target animals over a period of time acquired by an infrared image acquisition device.

[0049] Step 12: Preprocess the infrared image to be processed to obtain a preprocessed infrared image;

[0050] Step 13: Input the preprocessed infrared image into the trained target animal information detection model for feature extraction to obtain a multi-scale feature map set; the target animal information detection model is obtained by training a preset neural network with a target loss function based on the perturbed infrared image training set;

[0051] Step 14: The multi-scale feature map group is processed by multiple parallel task detection channels of the target animal information detection model to obtain the detection information of the target animal in the infrared image to be processed.

[0052] In this embodiment of the invention, the animal species, sex, age category and other detection information are accurately identified through multiple parallel task detection channels of the target animal information detection model. Furthermore, the detection performance and generalization ability of the model are improved through multi-task learning and data quality control.

[0053] In an optional embodiment of the present invention, step 12, which involves preprocessing the infrared image to be processed to obtain a preprocessed infrared image, may include:

[0054] Step 121: Scaling the infrared image to be processed to obtain a first image;

[0055] Step 122: Enhance the first image to obtain the second image;

[0056] Step 123: Normalize the second image to obtain a preprocessed infrared image.

[0057] In this embodiment, scaling each frame of the infrared image to be processed in step 121 is to unify input images of different resolutions to the fixed size required by the model, ensuring consistent input dimensions. Simultaneously, scaling reduces computational load and improves processing speed.

[0058] The specific steps of the scaling process in step 121 may include:

[0059] (1) Determine the target size: Set the width (target_width) and height (target_height) of the scaled image. This is usually determined by the input layer of the subsequent model.

[0060] (2) Perform scaling calculation: For each frame of the infrared image to be processed, the original coordinates of each pixel in the image are (i, j), and they are mapped back to a floating-point coordinate (x, y) in the original image.

[0061] x = (i / target_height) original_height;

[0062] y=(j / target_width) original_width;

[0063] Wherein, original_height refers to the original, unchanging height of the image to be processed before any scaling operation is performed, and original_width refers to the original, unchanging width of the image to be processed before any scaling operation is performed.

[0064] (3) Calculate the new pixel value: Calculate the value of the new pixel based on the known original pixels around (x,y).

[0065] Find the four nearest pixels that enclose (x,y): Q11, Q12, Q21, Q22.

[0066] Here, Q11 represents the bottom left pixel at (x, y). Its coordinates are (x1, y1), i.e., (floor(x), floor(y)). floor(x) represents rounding down the floating-point x. For example, floor(3.7) = 3. Its pixel value is known and is denoted as f(Q11).

[0067] Here, Q21 represents the bottom right pixel at (x, y). Its coordinates are (x2, y1), i.e., (ceil(x), floor(y)). ceil(x) represents rounding up the floating-point number x. For example, ceil(3.2) = 4. Its pixel value is known and is denoted as f(Q21).

[0068] Here, Q12 represents the top-left pixel at (x, y). Its coordinates are (x1, y2), i.e., (floor(x), ceil(y)). Its pixel value is known and denoted as f(Q12).

[0069] Here, Q22 represents the top-right pixel at (x, y). Its coordinates are (x2, y2), (ceil(x), ceil(y)). Its pixel value is known and denoted as f(Q22).

[0070] First, perform two linear interpolations in the x-direction, and then perform one linear interpolation in the y-direction to obtain the pixel value f(x,y) at the scaled coordinates (x,y):

[0071] f(x,y)=[f(Q11) (x2-x) (y2-y)+f(Q21) (x-x1) (y2-y)+f(Q12) (x2-x) (y-y1)+f(Q22) (x-x1) [(y-y1)] / [(x2-x1)] (y2-y1)];

[0072] Where f(Q11) represents the bottom left pixel of (x,y), f(Q21) represents the bottom right pixel of (x,y), f(Q12) represents the top left pixel of (x,y), f(Q22) represents the top right pixel of (x,y), x1=floor(x) represents rounding down the floating-point x to the x-coordinate, x2=ceil(x) represents rounding up the floating-point x to the x-coordinate, y1=floor(y) represents rounding down the floating-point y to the y-coordinate, y2=ceil(y) represents rounding up the floating-point y to the y-coordinate, x represents the x-coordinate of the pixel in the scaled image, and y represents the y-coordinate of the pixel in the scaled image.

[0073] (4) Output: A first image with dimensions (target_height, target_width) is obtained. The pixel value range is the same as that of the original image.

[0074] In step 122, the first image is enhanced. Since infrared images typically have low contrast and low signal-to-noise ratio, enhancement processing can highlight details, improve contrast, and make target features more prominent, facilitating the model's extraction of effective information.

[0075] Step 122, which involves enhancing the first image, may include the following steps:

[0076] (1) Divide the image into blocks: Divide the first image into several consecutive small regions of equal size (called “Tile”, for example, 8x8 blocks).

[0077] (2) Calculate the histogram for each block: For each image block, calculate its pixel intensity histogram. This represents the pixel distribution of different gray levels within the block.

[0078] (3) Histogram cropping: To avoid excessive amplification of noise, a cropping threshold is set for the histogram of each block. The portion of the histogram that exceeds the threshold is cropped out, and the cropped portion is evenly redistributed to all gray levels.

[0079] (4) According to the mapping function _k Perform equalization on each cropped histogram;

[0080] in, It is the mapped grayscale value. The original grayscale value of _k, and the mapping function T(). It is the total number of gray levels (e.g., for a 16-bit image). =65536), This represents the number of pixels for each gray level from 0 to k. It is the total number of pixels in the image block.

[0081] In step 123, normalizing the second image is performed to scale the pixel values ​​of the second image to a fixed, small range (such as [0,1] or [-1,1]) to obtain a preprocessed infrared image. This can accelerate the convergence process of model training, improve numerical stability, and make the model robust to images with different absolute brightness values.

[0082] The specific steps of normalizing the second image in step 123 may include:

[0083] (1) Determine the current pixel value range: Find the minimum pixel value min_val and the maximum pixel value max_val in the second image.

[0084] (2) Select the target range: Usually [0,1].

[0085] (3) Apply the normalization formula I_normalized(x,y)=(I(x,y)-min_val) / (max_val-min_val) to each pixel value I(x,y) in the image, map min_val to 0 and max_val to 1 in the original image, and linearly map the intermediate values ​​to the range between 0 and 1. Apply the following linear transformation: where I_normalized(x,y) represents the pixel value after normalization, I(x,y) represents the original pixel value, (x,y) represents the coordinates of the pixel, min_val represents the minimum pixel value in the second image, and max_val represents the maximum pixel value in the second image.

[0086] (4) Standardization: Scale the data to a mean of 0 and a standard deviation of 1. Standardize the second image after linear transformation using I_standardized(x,y)=(I_normalized(x,y)-mean) / std.

[0087] Where I_standardized(x,y) represents the pixel value after standardization, mean represents the pixel mean of the second image after linear transformation, and std represents the pixel standard deviation of the second image after linear transformation. Usually, mean and std are fixed values ​​pre-calculated on a large infrared dataset.

[0088] (5) Output: A preprocessed infrared image (e.g., a Float32 type tensor with shape [H,W,C]) with all pixel values ​​in a fixed range is obtained, which can be directly input into the neural network model.

[0089] In an optional embodiment of the present invention, step 13, the training process of the target animal information detection model includes:

[0090] Step 131: Obtain the infrared image training set;

[0091] Step 132: Perturb and enhance the infrared image training set to obtain an enhanced training infrared image set; here, by perturb and enhance the infrared image training set, the model's adaptability to different environments (such as low light and high dynamic range scenes) is improved.

[0092] Step 133: Input the enhanced training infrared image set into the shared backbone network of the preset neural network model to perform multi-level feature extraction and obtain training multi-scale feature maps;

[0093] Step 134: Input the trained multi-scale feature map into the multi-task detection channel of the preset neural network model, perform detection processing according to the target loss function, and obtain the target animal information detection model.

[0094] For step 131, all-weather infrared image acquisition equipment is used to acquire animal image data under different time periods and environments, and the raw image data is backed up locally to ensure data integrity. Then, the acquired raw image data is labeled with animal information, including the location, species, sex, and age. The labeled data is verified using a pre-defined labeling standard and application domain knowledge. A combination of automated verification and manual review is used to improve the accuracy and consistency of the labeled data, resulting in an infrared image training set.

[0095] For step 132, before performing enhancement processing on the infrared image training set, preprocessing operations such as normalization can be performed to ensure that the image size, resolution, etc. in the infrared image training set are the same, forming a training dataset suitable for deep learning models, and dividing it into training set, validation set and test set according to proportion to ensure the scientific nature of model training.

[0096] Step 132, performing perturbation enhancement processing on the infrared image training set, may include:

[0097] (1) Noise perturbation is applied to the images in the infrared image training set, such as adding non-uniform / fixed pattern noise to the images in the infrared image training set to obtain a first image set; multiplicative gain fluctuation and stripe bias (i.e., additive bias row by row / column by column) are applied to the input image. The amplitude of the multiplicative gain fluctuation is set to 0.5% to 2% of the dynamic range, and its spatial correlation scale is 8 to 32 pixels; the stripe bias is injected row by row or column by column (with the same probability), and the bias amplitude is set to 0.2% to 1% of the dynamic range.

[0098] Furthermore, the parameters of this enhancement are recorded, including: gain fluctuation amplitude, correlation scale, fringe type (row / column) and offset amplitude.

[0099] Let the images in the infrared image training set be Image with added noise It can be obtained through the following formula:

[0100] ;

[0101] ;

[0102] W ;

[0103] ;

[0104] ;

[0105] ;

[0106] in: Indicates the fluctuation of multiplicative gain. Indicates stripe offset. Images from the infrared image training set. Represents the Gaussian blur function. Indicates the spatial correlation of an image. This indicates the size of the filter kernel, with a spatial correlation scale of 8–32 pixels. Let (H, W) represent the random noise field, and (H, W) represent the length and width of the image in the infrared image training set. This indicates that the amplitude of the multiplicative gain fluctuation is set to 0.5% to 2% of the dynamic range. This indicates that the bias amplitude is set to 0.2% to 1% of the dynamic range. This indicates that a value is assigned to each row i. This indicates that a value is assigned to each column i.

[0107] (2) Images in the first image set after noise perturbation Temperature drift and gain jitter processing are performed to obtain a second image set. To simulate the changes in black level and response coefficient caused by ambient temperature and electronic link fluctuations, temperature drift and overall gain and bias adjustments are performed on the images. The gain coefficient is set to 0.95–1.05, and the additive bias is set to ±5 / 255. For video or continuous shooting sequences, the gain can be slowly varied with the frame number to reflect the temperature drift characteristics.

[0108] The image after perturbation is as follows:

[0109] ;

[0110] in, This represents the second image. This represents the t-th image in the first image set to be disturbed. This represents the perturbation gain range of the t-th image. 0.95~1.05, Denotes the perturbation bias of the t-th image in the first image set. .

[0111] (3) Images in the second image set Perform hot pixel / dark current processing to obtain the third image. To simulate abnormal bright spots caused by dark current, the image was... The brightness of random pixels is increased until it approaches saturation, resulting in multiple pixels. A mild diffusion kernel with a standard deviation of 0.2–0.6 pixels is used to simulate the thermal diffusion effect. Furthermore, clusters of 3–7 pixels are generated with a 5% probability. To avoid damaging the main structure, the number of bad pixels, whether clusters form, and the diffusion intensity are recorded simultaneously. The specific operation is as follows:

[0112] First, in the second image Randomly select 50-200 pixels as bad pixels to obtain a bad pixel set P. Preferably, the overall coverage of bad pixels does not exceed that of the second image. 0.1% of the pixel;

[0113] Then, according to Increase the brightness of each bad pixel value, where, This represents the pixel value of the bad pixel in the third image. This indicates a saturation value (e.g., 255). Indicates random perturbation value, exist between, This represents the coordinates of the bad pixels in the third image.

[0114] After increasing the brightness of each defective pixel, a random diffusion kernel standard deviation is generated. ;

[0115] according to A diffusion effect is applied to each defect. Among these, Represented as:

[0116] ;

[0117] in, This is the strength coefficient (e.g., 0.5). This represents the value of each pixel within the neighborhood of the bad pixel in the third image. Represents a Gaussian spreading nucleus. This indicates a saturation value (e.g., 255). This represents the value of each pixel within the neighborhood of the bad pixel (i, j) in the second image. This represents the row coordinates of each pixel within the neighborhood of the defective pixel in the third image. This represents the ordinate of each pixel within the neighborhood of the defective pixel in the third image. The row coordinates of the bad pixels. The ordinate of the defective pixel is represented by its vertical axis. This represents the final, third image.

[0118] Gaussian diffusion nucleus pass Calculated.

[0119] in, , , This represents the x-coordinate of each pixel within the neighborhood of the defective pixel in the third image. This represents the ordinate of each pixel within the neighborhood of the defective pixel in the third image. This represents the x-coordinate of the bad pixels in the third image. This represents the ordinate of the bad pixels in the third image. This represents a function for calculating Euclidean distance. The value between 0.2 and 0.6 represents the pixel standard deviation.

[0120] (4) Images in the third image set The fourth image is obtained by performing point diffusion and motion blur processing. To simulate imaging blur caused by optical defocusing / diffraction and relative motion, an isotropic Gaussian blur or anisotropic motion blur is applied to the image. The standard deviation σ of the Gaussian blur is 0.6–1.8; the length of the motion blur is 3–9 pixels, and the angle is random or biased towards the horizontal or vertical direction according to device characteristics. To avoid excessive degradation, one of the two is usually chosen. Record the blur type, intensity parameter (σ or length), and angle, as follows:

[0121] Step 1: Fuzzy type selection, generating random variables ,in, For the selection probability (usually 0.5), if If Gaussian blur is selected, then... Select motion blur;

[0122] Step 2: Gaussian blur processing (if...) );

[0123] ;

[0124] ;

[0125] in, , , It follows a Gaussian distribution. express and Convolution operation, This represents the third image that has not undergone Gaussian blur processing. This represents the fourth image after Gaussian blurring. This represents a function for calculating Euclidean distance;

[0126] Step 3: Motion blurring processing (if) );

[0127] ;

[0128] when and , ,otherwise, ,in, This represents the length of the motion fuzzy matrix. Indicates the direction and angle of relative motion, ( The position of each parameter within the motion blur matrix.

[0129] (5) Images in the fourth image set Quality gating and annotation were performed to obtain an enhanced training infrared image set. By setting a quality gating threshold, when the sharpness or contrast of the enhanced image is lower than the preset quality gating threshold, the intensity of the most recent perturbation is automatically reduced or resampled to avoid extremely degraded samples from entering the training.

[0130] ;

[0131] ;

[0132] ;

[0133] in, This represents an image from the infrared image set used for augmented training. This represents the images in the fourth image set. This indicates the sharpness of the images in the fourth image set. This represents the contrast of the images in the fourth image set. This indicates the preset quality threshold. This indicates the intensity of the sharpness perturbation in the images of the fourth image set. This indicates the intensity of contrast perturbation in the images of the fourth image set.

[0134] The above perturbations only involve changes in the grayscale / brightness domain and do not alter the geometric position and shape of the target. Therefore, no adjustments are needed to the detection annotations (boundary boxes and attribute annotations). The trigger probabilities of each perturbation are set as follows: PRNU / stripes 40%–60%, temperature drift and gain jitter 40%–60%, hot pixels 20%–30%, Gaussian or motion blur 30%–50% (one of the two blur options), and fine-tuned according to the device family or scene type.

[0135] This embodiment injects perturbations consistent with the imaging mechanism into infrared images during the training phase to simulate imaging characteristics under different device and environmental conditions, thereby improving the robustness and generalization ability of the model. The perturbations are sampled independently according to a preset probability and can be superimposed; preferably, the enhancement sequence is as follows: multiplicative / gain processing → additive bias processing → hot pixel generation → blurred convolution → dynamic range clipping. Furthermore, the parameters of each enhancement are recorded for experimental reproducibility and quality traceability.

[0136] In this embodiment, adaptive image enhancement technology is introduced to improve the model's adaptability to different environments (such as low light and high dynamic range scenes).

[0137] In an optional embodiment of the present invention, step 133 involves inputting the enhanced training infrared image set into the shared backbone network of the preset neural network model for multi-level feature extraction to obtain a training multi-scale feature map, including:

[0138] Step 1331: Perform initial feature extraction and downsampling on each frame of the enhanced training infrared image set to obtain an initial medium-resolution feature map;

[0139] Step 1332: Perform multi-stage progressive downsampling and feature transformation on the initial medium-resolution feature map to obtain an intermediate feature map group containing different scales;

[0140] Step 1333: Based on the top-down semantic information propagation path and the bottom-up detail information enhancement path, the intermediate feature maps of different scales in the intermediate feature map group are fused according to multiple preset scales to obtain a training multi-scale feature map group containing semantic information and spatial detail information.

[0141] In this embodiment, step 133 employs a shared backbone network to extract multi-level features from the input infrared image using a convolutional neural network, generating rich multi-scale feature maps to support the joint detection task of species, sex, and age.

[0142] For step 1331, use Initial feature extraction and downsampling are performed on each frame of the enhanced training infrared image set, wherein, This represents the initial medium-resolution feature map set. This indicates a downsampling operation. Indicates initial feature extraction, Let represent the s-th image in the infrared image set used for augmented training, where s is greater than 0.

[0143] As an example, the network structure for initial feature extraction and downsampling of each frame (denoted as P1) in the enhanced training infrared image set includes: a downsampling module, which performs a downsampling convolution operation through a convolution kernel. The size of the convolution kernel determines the resolution of the feature map, and the resulting initial medium-resolution feature map is denoted as P2.

[0144] For step 1332, the specific process of performing multi-stage progressive downsampling and feature transformation on the initial medium-resolution feature map to obtain an intermediate feature map group containing different scales is as follows:

[0145] ;

[0146] in, This represents the downsampling operation in the k-th stage. Represents feature transformation, The intermediate feature maps represent different scales, k=1,2,3...

[0147] As an example, k=2, the initial medium-resolution feature map P2 is subjected to a downsampling operation to obtain a first-size feature map (1 / 8 scale, size 80x80, number of channels 256).

[0148] As an example, k=3, the first size feature map is downsampled to obtain the second size feature map (1 / 16 scale, size 40x40, number of channels 512).

[0149] As an example, with k=4, the second-size feature map is downsampled to obtain the third-size feature map (1 / 32 scale, size 20x20, number of channels 1024).

[0150] The first-size feature map (denoted as P3), the second-size feature map (denoted as P4), and the third-size feature map (denoted as P5) are obtained, which is the intermediate feature map group containing different scales.

[0151] For step 1333, based on the top-down semantic information propagation path and the bottom-up detail information enhancement path, the intermediate feature maps of different scales in the intermediate feature map group are fused according to multiple preset scales to obtain a training multi-scale feature map group containing semantic information and spatial detail information. (See the following for reference:)

[0152] (1) Top-down path (semantic information propagation): This involves transmitting semantic information from higher to lower levels, using nearest-neighbor upsampling to preserve edge information (suitable for small infrared targets). The number of channels can be adjusted using 1x1 convolutions to avoid dimensional conflicts from direct addition. The steps include:

[0153] Upsample the third-size feature map P5 to obtain the first upsampled feature map P5_up;

[0154] After aligning the second-size feature map P4 with the first upsampled feature map P5_up through channels, add them element by element to obtain the first channel aligned feature map P4_top;

[0155] Upsample the first channel aligned feature map P4_top to obtain the second upsampled feature map P4_up;

[0156] After aligning the first-size feature map P3 with the second-upsampled feature map P4_up through channels, add them element by element to obtain the second-channel aligned feature map P3_top.

[0157] The second channel alignment feature map P3_top, the first channel alignment feature map P4_top, and the third size feature map P5 are obtained.

[0158] (2) Bottom-up path (detail enhancement): This involves supplementing spatial details from the bottom up using 3x3 convolution downsampling with a stride of 2 (non-pooling) to preserve more texture details. The SiLU activation function can be used to enhance nonlinearity and adapt to the continuous radiation intensity of infrared data. The steps include:

[0159] The first size feature map P3 is downsampled to obtain the first downsampled feature map P3_ds;

[0160] After aligning the second-size feature map P4 with the first downsampled feature map P3_ds channels, add them element by element to obtain the third-channel aligned feature map P4_bottom;

[0161] The third channel aligned feature map P4_bottom is downsampled to obtain the second downsampled feature map P4_ds;

[0162] After aligning the third-size feature map P5 with the second downsampled feature map P4_ds channels, add them element by element to obtain the fourth-channel aligned feature map P5_bottom;

[0163] The third channel alignment feature map P4_bottom, the fourth channel alignment feature map P5_bottom, and the first size feature map P3 are obtained. (3) Bidirectional weighted feature fusion (YOLOv11 improvement), that is, dynamic weighted fusion of bidirectional path features, the weight initialization can be set to 1. The steps include:

[0164] Preset the weights w1 for the top-down path and w2 for the bottom-up path;

[0165] The second channel aligned feature map P3_top and the first size feature map P3 are fused according to P3=(w1*P3_top+w2*P3) / (w1+w2+1e-4) to obtain a feature map in the multi-scale feature map group. This feature map is usually used to detect small targets (such as pedestrians and small drones).

[0166] The first channel aligned feature map P4_top and the third channel aligned feature map P4_bottom are fused according to P4=(w1*P4_top+w2*P4_bottom) / (w1+w2+1e-4) to obtain one feature map in the multi-scale feature map group. This feature map is usually used to detect medium-scale targets (such as vehicles).

[0167] The third-size feature map P5 and the fourth-channel aligned feature map P5_bottom are fused according to P5=(w1*P5+w2*P5_bottom) / (w1+w2+1e-4) to obtain one feature map in the multi-scale feature map group. This feature map is usually used to detect large targets or background heat sources.

[0168] In an optional embodiment of the present invention, step 134 involves inputting the trained multi-scale feature map into the multi-task detection channel of the preset neural network model, performing detection processing according to the target loss function, and obtaining a target animal information detection model, including:

[0169] Step 1341: Input the trained multi-scale feature map into the species category detection channel of the preset neural network model for detection processing to obtain the probability distribution of species categories;

[0170] Step 1342: Input the trained multi-scale feature map into the gender category prediction channel of the preset neural network model for detection processing to obtain the probability distribution of gender category;

[0171] Step 1343: Input the trained multi-scale feature map into the age category prediction channel of the preset neural network model for detection processing to obtain the probability distribution of age stages;

[0172] Step 1344: Adjust the loss of the probability distribution of species category, sex category, and age group according to the target loss function to obtain the target animal information detection model.

[0173] In this embodiment, step 134 involves designing three sets of prediction channels to process multi-scale feature maps, with each set of prediction channels including three convolutional structures. Specifically:

[0174] The species category prediction channel (C1) is designed with three convolutional structures: each convolutional structure processes feature maps at different scales. That is, a convolutional structure is connected in parallel at each scale, and the convolutional structure consists of multiple convolutional layers. The kernel size of the last convolutional layer is 1×1, and the last convolutional layer outputs the probability distribution of the species category.

[0175] The gender category prediction channel (C2) is designed with three convolutional structures: each convolutional structure processes feature maps at different scales. That is, a convolutional structure is connected in parallel at each scale, and the convolutional structure consists of multiple convolutional layers. The kernel size of the last convolutional layer is 1×1, and the last convolutional layer outputs the probability distribution of the gender category (male, female, indistinguishable).

[0176] The age category prediction channel (C3) is designed with three convolutional structures: each convolutional structure processes feature maps at different scales. That is, a convolutional structure is connected in parallel at each scale, and the convolutional structure consists of multiple convolutional layers. The kernel size of the last convolutional layer is 1×1, and the last convolutional layer outputs the probability distribution of age stage (juvenile, adult, sub-adult).

[0177] Among them, the network structure of each convolutional structure of the species category prediction channel (C1), the sex category prediction channel (C2), and the age category prediction channel (C3) is the same, but the weights in each convolutional structure are different.

[0178] Considering that gender (C2) and age (C3) semantically belong to species (C1), a hierarchical consistency constraint and masking mechanism are introduced into the attribute branches during training. The C1 / C2 / C3 loss is calculated only for positive samples. When the species prediction distribution entropy is higher than a threshold, the loss weights of C2 / C3 are reduced.

[0179] For unlabeled or undeterminable attributes, an ignore mask is set so that they do not participate in the loss calculation of the corresponding branch; for "indistinguishable" categories, they are used as the effective third class of C2 for training, thereby improving the robustness of inference to weakly textured targets.

[0180] As an example, each prediction channel may include three decoupling heads. When training the model, the training multi-scale feature maps P3, P4, and P5 are respectively input into three decoupling heads with identical structures for depthwise separable convolution. Each decoupling head independently processes the detection task at its corresponding scale. Finally, the prediction results of the three decoupling heads are fused to obtain the probability distribution of species categories.

[0181] Similarly, the trained multi-scale feature maps P3, P4, and P5 are respectively input into three other decoupling heads with identical structures for depthwise separable convolution. Each decoupling head independently processes the detection task of its corresponding scale. Finally, the prediction results of the three decoupling heads are fused to obtain the probability distribution of the gender category.

[0182] Similarly, the trained multi-scale feature maps P3, P4, and P5 are input into three other decoupling heads with identical structures for depthwise separable convolution. Each decoupling head independently processes the detection task at its corresponding scale. Finally, the prediction results of the three decoupling heads are fused to obtain the probability distribution of the age group.

[0183] That is, the probability distributions of species category, sex category, and age group are each handled by three decoupling heads that process images at different scales (i.e., each channel includes three decoupling heads).

[0184] Then, the parameters of each decoupling head are adjusted using the target loss function and the probability distributions of species category, sex category, and age group.

[0185] The decoupling head's network structure includes convolutional layers with 1x1 kernels, 3x3 kernels, 1x1 kernels, and a sigmoid activation function. The 1x1 kernel layers are used to adjust and compress features. The 3x3 kernel layers extract spatial features and details strongly correlated with bounding box coordinate predictions. The 1x1 kernel layers adjust the number of channels to 4. These four values ​​typically represent the center coordinate offset (tx, ty) and width / height scaling (tw, th) of the predicted bounding box.

[0186] In an optional embodiment of the present invention, the target loss function is:

[0187] ;

[0188] in, Cross-entropy loss for species classification; Cross-entropy loss for gender classification; For age classification, cross-entropy loss, For bounding box regression loss, For target confidence loss, These are the weights.

[0189] in, It is a weight combination obtained by performing a local grid search on the validation set. Objective loss function. It consists of the loss functions of each task and is used to adjust the weights of the feature extraction layers in the shared backbone network through backpropagation.

[0190] This embodiment dynamically adjusts the weights of the loss function for multiple tasks, enabling the model to achieve a balance across different tasks and improving overall detection performance.

[0191] In this embodiment, based on the principle of multi-task learning, species classification (classification task), sex classification (classification task), and age classification (classification task) are modeled as relatively independent tasks. Taking the species category prediction channel (C1) as an example, during model training, the species category prediction channel (C1) outputs predicted labels based on the input data, and determines the cross-entropy loss of species classification based on the predicted labels and the true labels. (That is, calculate the Euclidean distance between the predicted label and the true label), if If the value is less than the preset threshold, it means that the predicted label and the true label are not significantly different. If the predicted label is equal to or greater than the preset threshold, it indicates a significant difference between the predicted label and the true label. Adjust the weights of the convolutional layers in the species category prediction channel (C1).

[0192] Similarly, during model training, the gender category prediction channel (C2) outputs predicted labels based on the input data, and determines the cross-entropy loss for gender classification based on the predicted labels and the true labels. (That is, calculate the Euclidean distance between the predicted label and the true label), if If the value is less than the preset threshold, it means that the predicted label and the true label are not significantly different. If the predicted label is equal to or greater than the preset threshold, it indicates a significant difference between the predicted label and the true label. Adjust the weights of the convolutional layer in the gender category prediction channel (C2).

[0193] Similarly, during model training, the age category prediction channel (C3) outputs predicted labels based on the input data, and determines the cross-entropy loss for age classification based on the predicted labels and the true labels. (That is, calculate the Euclidean distance between the predicted label and the true label), if If the value is less than the preset threshold, it means that the predicted label and the true label are not significantly different. If the predicted label is equal to or greater than the preset threshold, it indicates a significant difference between the predicted label and the true label. Adjust the weights of the convolutional layer in the age category prediction channel (C3).

[0194] The bounding box and the target confidence are also two independent channels. The weights of the convolutional layers in the bounding box network structure are based on the bounding box regression loss. Adjust the weights of the convolutional layers in the network structure to match the target confidence level, based on the target confidence loss. Adjustment.

[0195] Furthermore, considering that C2 / C3 are semantically subordinate to C1, uncertainty suppression weights can be added to the target loss during training. Suppress weights The calculation process is as follows:

[0196] 1. Define smooth labels:

[0197] ;

[0198] Where K is the total number of species classifications, and y is the true category. The smoothing coefficient is set to 0.05. For category index, i.e., the number of the candidate category. This is for smooth labeling. When c=y, it means the current category is the correct category; when c≠y, it means the category is not true.

[0199] This method reduces the impact of noisy annotations and blurred appearances on training stability.

[0200] 2. Uneven weighting of product types:

[0201] ;

[0202] in, For the sample count of species of category c, Weights for different types of objects.

[0203] 3. Loss correction to suppress the dominance effect of easy samples:

[0204] ;

[0205] in For the above-mentioned category weights, This refers to the predicted probability, specifically the probability that the model predicts that a sample belongs to class c. This is an adjustment factor that controls the weights of easy and difficult samples.

[0206] 4. Hierarchical consistency gating (attribute dependency on species):

[0207] ;

[0208] ;

[0209] Where K is the total number of species categories, To predict the entropy of the probability distribution of species, To predict probabilities, for The logarithm of [the logarithm] is used as a measure of information content. To suppress weights.

[0210] When species prediction is uncertain (high entropy), the learning pressure on the attribute branches of the objective loss function is automatically reduced. This is achieved by adjusting the attribute branches of the objective loss function. and The parameters are adjusted as follows:

[0211] ;

[0212] ;

[0213] In an optional embodiment of the present invention, in step 14, the multi-scale feature map group is processed by multiple parallel task detection channels of the target animal information detection model to obtain the detection information of the target animal in the infrared image to be processed, including:

[0214] Step 141: Input the multi-scale feature map group into the species category detection channel of the target animal information detection model for detection processing to obtain the probability value of the species category;

[0215] Step 142: Input the multi-scale feature map group into the sex category prediction channel of the target animal information detection model for detection processing to obtain the probability value of the sex category;

[0216] Step 143: Input the multi-scale feature map group into the age category prediction channel of the target animal information detection model for detection processing to obtain the probability value of the age stage;

[0217] Step 144: Based on the probability values ​​of the species category, the sex category, and the age group, obtain the detection information of the target animal.

[0218] This embodiment describes the detection process of the model. The multi-scale feature map set is input into three decoupled heads (e.g., species category channels) with identical structures and non-shared parameters, and then subjected to depthwise separable convolution. Each decoupled head independently processes the detection task at its corresponding scale to obtain the classification branch output. For example, the output is an (80,80,80) tensor, where 80x80 represents the number of feature map grids, and the last 80 indicates the probability of predicting 80 species categories for each grid.

[0219] For step 141, according to Detecting multi-scale feature map sets, among which, This indicates that the output is a probability vector for each species category. () represents a function for detecting species categories. This represents the input multi-scale feature map set. If the detection target is "dog, cat, deer", the output might be... =[0.8,0.15,0.05] means the probability of finding a dog is 80%.

[0220] For step 142, according to Detecting multi-scale feature map sets, among which, This represents the probability vector of the output being the gender category. () indicates a function for the gender category detection channel. This represents the input multi-scale feature map set. For a male animal, the output might be: =[0.1,0.9], probability of male is 90%.

[0221] For step 143, according to Detecting multi-scale feature map sets, among which, This represents the probability vector of the output being the age category. () indicates that it is a function for the age category detection channel. This represents the input multi-scale feature map set. If the predicted age stage is juvenile, adult, or old, the prediction probability for an adult animal is... =[0.05,0.9,0.05], meaning the probability of an adult animal is 90%.

[0222] For step 144, the detection information of the target animal is as follows:

[0223] Species categories: 80% dogs, 15% cats, 5% deer;

[0224] Sex classification: 10% female, 90% male;

[0225] Age groups: 5% children, 90% adults, and 5% elderly.

[0226] In one application scenario, an animal infrared image detection and recognition system is designed based on the above method, comprising the following modules:

[0227] Data acquisition module: Collects and uploads data in real time using infrared imaging equipment.

[0228] Image data processing module: performs data preprocessing and enhancement operations.

[0229] Detection module: Using a trained target animal information detection model, the module detects the species, sex, and age category of the target image and outputs the corresponding target category and location information.

[0230] Visualization results display module: The detection results are presented intuitively through image overlay, including the detection frame, species name, and gender and age labels.

[0231] It supports saving the detection results in multiple formats (such as JSON and XML) for easy subsequent analysis or integration into other systems.

[0232] The above embodiments are optimized for the characteristics of infrared imagery, proposing a method that integrates infrared animal species, sex, and age identification. This method aims to provide an efficient and automated solution for species monitoring in ecological parks. It enhances the multi-task joint detection capability for species, sex, and age, significantly improving the classification accuracy of species, sex, and age, and greatly increasing the inference speed of the multi-task model.

[0233] Figure 2 is a schematic diagram of an embodiment of an animal multi-task joint detection system based on infrared camera images according to the present invention. The system 200 includes:

[0234] The acquisition module 201 is used to acquire an infrared image of the target animal to be processed.

[0235] The processing module 202 is used to preprocess the infrared image to be processed to obtain a preprocessed infrared image; input the preprocessed infrared image into a trained target animal information detection model for feature extraction to obtain a multi-scale feature map set; the target animal information detection model is trained on a preset neural network with a target loss function based on a perturbed infrared image training set; the multi-scale feature map set is detected and processed by multiple parallel task detection channels of the target animal information detection model to obtain the detection information of the target animal in the infrared image to be processed.

[0236] Optionally, the infrared image to be processed is preprocessed to obtain a preprocessed infrared image, including:

[0237] The infrared image to be processed is scaled to obtain a first image;

[0238] The first image is enhanced to obtain the second image;

[0239] The second image is normalized to obtain a preprocessed infrared image.

[0240] Optionally, the training process of the target animal information detection model includes:

[0241] Acquire infrared image training set;

[0242] The infrared image training set is perturbed and enhanced to obtain an enhanced training infrared image set.

[0243] The enhanced training infrared image set is input into the shared backbone network of the preset neural network model for multi-level feature extraction to obtain a training multi-scale feature map;

[0244] The trained multi-scale feature map is input into the multi-task detection channel of the preset neural network model, and detection processing is performed according to the target loss function to obtain the target animal information detection model.

[0245] Optionally, the enhanced training infrared image set is input into the shared backbone network of the preset neural network model for multi-level feature extraction to obtain a training multi-scale feature map, including:

[0246] Initial feature extraction and downsampling are performed on each frame of the enhanced training infrared image set to obtain an initial medium-resolution feature map;

[0247] The initial medium-resolution feature map is subjected to multi-stage progressive downsampling and feature transformation to obtain an intermediate feature map set containing different scales;

[0248] Based on the top-down semantic information propagation path and the bottom-up detail information enhancement path, the intermediate feature maps of different scales in the intermediate feature map group are fused according to multiple preset scales to obtain a training multi-scale feature map group containing semantic information and spatial detail information.

[0249] Optionally, the trained multi-scale feature map is input into the multi-task detection channel of the preset neural network model, and detection processing is performed according to the target loss function to obtain the target animal information detection model, including:

[0250] The trained multi-scale feature map is input into the species category detection channel of the preset neural network model for detection processing to obtain the probability distribution of species categories;

[0251] The trained multi-scale feature map is input into the gender category prediction channel of the preset neural network model for detection processing to obtain the probability distribution of gender category;

[0252] The trained multi-scale feature map is input into the age category prediction channel of the preset neural network model for detection processing to obtain the probability distribution of age stages; the loss of the probability distribution of species category, sex category, and age stage is adjusted according to the target loss function to obtain the target animal information detection model.

[0253] Optionally, the target loss function is:

[0254] ;

[0255] in, Cross-entropy loss for species classification; Cross-entropy loss for gender classification; For age classification, cross-entropy loss, For bounding box regression loss, For target confidence loss, These are the weights.

[0256] Optionally, the multi-scale feature map group is processed by multiple parallel task detection channels of the target animal information detection model to obtain the detection information of the target animal in the infrared image to be processed, including:

[0257] The multi-scale feature map group is input into the species category detection channel of the target animal information detection model for detection processing to obtain the probability value of the species category;

[0258] The multi-scale feature map group is input into the sex category prediction channel of the target animal information detection model for detection processing to obtain the probability value of the sex category;

[0259] The multi-scale feature map group is input into the age category prediction channel of the target animal information detection model for detection processing to obtain the probability value of the age stage;

[0260] The detection information of the target animal is obtained based on the probability values ​​of the species category, the sex category, and the age group.

[0261] It should be noted that this system is the system corresponding to the above method. All implementation methods in the above method embodiments are applicable to the embodiments of this system and can achieve the same technical effect.

[0262] Figure 3 illustrates a schematic diagram of the physical structure of a computing device. As shown in Figure 3, the electronic device may include: a processor 310, a communication interface 320, a memory 330, and a communication bus 340. The processor 310, communication interface 320, and memory 330 communicate with each other via the communication bus 340. The processor 310 can call logical instructions from the memory 330 to execute methods such as multi-task joint detection of animals based on infrared camera images.

[0263] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0264] In another aspect, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, is implemented to perform the multi-task joint detection method for animals based on infrared camera images provided in the above embodiments.

[0265] The system embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0266] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.

[0267] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A multi-task joint detection method for animals based on infrared camera images, characterized in that, include: The process involves: acquiring an infrared image containing the target animal; preprocessing the infrared image to obtain a preprocessed infrared image; inputting the preprocessed infrared image into a trained target animal information detection model for feature extraction to obtain a multi-scale feature map set; the target animal information detection model is trained on a pre-defined neural network with a target loss function based on a perturbed infrared image training set; and performing detection processing on the multi-scale feature map set through multiple parallel task detection channels of the target animal information detection model to obtain the detection information of the target animal in the infrared image to be processed. Specifically, the trained multi-scale feature map is input into the multi-task detection channel of the pre-defined neural network model, and the target loss function is used for processing. The detection process, resulting in a target animal information detection model, includes: inputting the trained multi-scale feature map into the species category detection channel of the preset neural network model for detection processing to obtain the probability distribution of species categories; inputting the trained multi-scale feature map into the sex category prediction channel of the preset neural network model for detection processing to obtain the probability distribution of sex categories; inputting the trained multi-scale feature map into the age category prediction channel of the preset neural network model for detection processing to obtain the probability distribution of age groups; and adjusting the losses of the probability distributions of species categories, sex categories, and age groups according to a target loss function to obtain the target animal information detection model; wherein, the target loss function is: in, Cross-entropy loss for species classification; Cross-entropy loss for gender classification; For age classification, cross-entropy loss, For bounding box regression loss, For target confidence loss, These are the weights; when the probability distribution entropy of the species category is higher than the threshold, the loss weights of the gender category prediction channel and the age category prediction channel are reduced, and the target loss function is adjusted accordingly. In and Adjust the parameters as follows: ;make ;in, Indicates the suppression weight. This represents the cross-entropy loss for the updated gender classification. Represents the cross-entropy loss for the updated age classification; where the suppression weights are... The determination process is as follows: According to Determine the suppression weights, where, Where K is the total number of species categories. To predict the entropy of the probability distribution of species, Let c be the predicted probability of species category c. for The logarithm of is used as a measure of information content; where the cross-entropy loss determines the updated species classification. The process is as follows: According to Define smooth labels, where K is the total number of species classifications and y is the true category. The smoothing coefficient is set to 0.

05. For category indexing, To smooth the labels, when c = y, it means the current category is the correct category; when c ≠ y, it means a non-true category. According to... Determine the category weights, where, , For the sample count of species of category c, Weights for different types of items; based on Determine the cross-entropy loss for the updated species classification to suppress sample dominance effects, where, This represents the cross-entropy loss after updating the species classification. For the weight of the species, This refers to the predicted probability, specifically the probability that the model predicts that a sample belongs to class c. The adjustment factor controls the weight of easy and difficult samples; for species attributes that are not labeled or cannot be determined, an ignore mask is set.

2. The method for multi-task joint detection of animals based on infrared camera images according to claim 1, characterized in that, The infrared image to be processed is preprocessed to obtain a preprocessed infrared image, including: scaling the infrared image to be processed to obtain a first image; enhancing the first image to obtain a second image; and normalizing the second image to obtain a preprocessed infrared image.

3. The method for multi-task joint detection of animals based on infrared camera images according to claim 2, characterized in that, The training process of the target animal information detection model includes: acquiring an infrared image training set; performing perturbation enhancement processing on the infrared image training set to obtain an enhanced training infrared image set; inputting the enhanced training infrared image set into the shared backbone network of the preset neural network model for multi-level feature extraction to obtain a training multi-scale feature map; inputting the training multi-scale feature map into the multi-task detection channel of the preset neural network model, and performing detection processing according to the target loss function to obtain the target animal information detection model.

4. The animal multi-task joint detection method based on infrared camera images according to claim 3, characterized in that, The enhanced training infrared image set is input into the shared backbone network of the preset neural network model for multi-level feature extraction to obtain a training multi-scale feature map. This includes: performing initial feature extraction and downsampling on each frame of the enhanced training infrared image set to obtain an initial medium-resolution feature map; performing multi-stage progressive downsampling and feature transformation on the initial medium-resolution feature map to obtain an intermediate feature map set containing different scales; and fusing the intermediate feature maps of different scales in the intermediate feature map set according to multiple preset scales based on the top-down semantic information propagation path and the bottom-up detail information enhancement path to obtain a training multi-scale feature map set containing semantic information and spatial detail information.

5. The method for multi-task joint detection of animals based on infrared camera images according to claim 1, characterized in that, The multi-scale feature map group is processed by multiple parallel task detection channels of the target animal information detection model to obtain the detection information of the target animal in the infrared image to be processed. This includes: inputting the multi-scale feature map group into the species category detection channel of the target animal information detection model for detection processing to obtain the probability value of the species category; inputting the multi-scale feature map group into the sex category prediction channel of the target animal information detection model for detection processing to obtain the probability value of the sex category; inputting the multi-scale feature map group into the age category prediction channel of the target animal information detection model for detection processing to obtain the probability value of the age group; and obtaining the detection information of the target animal based on the probability values ​​of the species category, sex category, and age group.

6. A multi-task joint detection system for animals based on infrared camera images, characterized in that, include: The system includes an acquisition module for acquiring infrared images containing the target animal; a processing module for preprocessing the infrared images to obtain preprocessed infrared images; inputting the preprocessed infrared images into a trained target animal information detection model for feature extraction to obtain a multi-scale feature map set; the target animal information detection model is trained on a pre-defined neural network with a target loss function based on a perturbed infrared image training set; the multi-scale feature map set is processed by multiple parallel task detection channels of the target animal information detection model to obtain the detection information of the target animal in the infrared images to be processed; wherein, the trained multi-scale feature map is input into the multi-task detection channel of the pre-defined neural network model, and the target animal is detected based on the target loss function. The target animal information detection model is obtained by performing detection processing using a target loss function, including: inputting the trained multi-scale feature map into the species category detection channel of the preset neural network model for detection processing to obtain the probability distribution of species categories; inputting the trained multi-scale feature map into the sex category prediction channel of the preset neural network model for detection processing to obtain the probability distribution of sex categories; inputting the trained multi-scale feature map into the age category prediction channel of the preset neural network model for detection processing to obtain the probability distribution of age groups; and adjusting the losses of the probability distributions of species categories, sex categories, and age groups according to the target loss function to obtain the target animal information detection model; wherein, the target loss function is: in, Cross-entropy loss for species classification; Cross-entropy loss for gender classification; For age classification, cross-entropy loss, For bounding box regression loss, For target confidence loss, These are the weights; when the probability distribution entropy of the species category is higher than the threshold, the loss weights of the gender category prediction channel and the age category prediction channel are reduced, and the target loss function is adjusted accordingly. In and Adjust the parameters as follows: ;make ;in, Indicates the suppression weight. This represents the cross-entropy loss for the updated gender classification. Represents the cross-entropy loss for the updated age classification; where the suppression weights are... The determination process is as follows: According to Determine the suppression weights, where, Where K is the total number of species categories. To predict the entropy of the probability distribution of species, Let c be the predicted probability of species category c. for The logarithm of is used as a measure of information content; where the cross-entropy loss determines the updated species classification. The process is as follows: According to Define smooth labels, where K is the total number of species classifications and y is the true category. The smoothing coefficient is set to 0.

05. For category indexing, To smooth the labels, when c = y, it means the current category is the correct category; when c ≠ y, it means a non-true category. According to... Determine the category weights, where, , For the sample count of species of category c, Weights for different types of items; based on The updated cross-entropy loss for corrected species classification is determined to suppress sample dominance effects, whereby... This represents the cross-entropy loss after updating the species classification. For the weight of the species, This refers to the predicted probability, specifically the probability that the model predicts that a sample belongs to class c. The adjustment factor controls the weight of easy and difficult samples; for species attributes that are not labeled or cannot be determined, an ignore mask is set.

7. A computing device, characterized in that, include: A processor, a memory, and a communication bus, wherein the processor and the memory communicate with each other via the communication bus; The memory stores program instructions that can be executed by the processor, which can invoke the program instructions to perform the steps of the animal multi-task joint detection method based on infrared camera images as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The device contains a computer program that, when executed by a processor, is implemented to perform the steps of the animal multi-task joint detection method based on infrared camera images as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Infrared target detection method and device, computer equipment and storage medium

    CN118229961A

  • Wild animal target detection method based on improved YOLO11

    CN120894800A