Species detection method, device, electronic device and computer readable storage medium

CN119313991BActive Publication Date: 2026-11-03ZHEJIANG DAHUA TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411865875.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2026-11-03
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

Existing technologies cannot identify the species type and status of wild animals; they can only perform rough image capture and body length classification.

Method used

By using well-trained species type recognition and state detection models, and based on deep learning technology, combined with feature extraction, data augmentation, and oversampling strategies, the species type and health status of animal species images can be identified.

Benefits of technology

It enables accurate identification of animal species and detection of their health status, generating alarm information to remind relevant personnel to provide treatment, and has a wider identification range.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119313991B_ABST
    Figure CN119313991B_ABST
Patent Text Reader

Abstract

The application relates to a species detection method and device, an electronic device and a computer readable storage medium, wherein the species detection method comprises the following steps: acquiring an animal species image to be identified; identifying the animal species image according to a trained species type identification model, and determining a target species type to which the animal species image belongs; the species type identification model is obtained based on a first data set labeled with different animal species types; in the case that a state detection is configured for the target species type, identifying the animal species image based on a trained species state detection model corresponding to the target species type, and determining a species state corresponding to the animal species image; wherein the species state detection model is obtained based on a second data set labeled with different health state degrees and with the species type being the target species type. The application can realize the identification of the species type to which an animal image belongs and the detection of the species state based on model training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image detection, and in particular to species detection methods, apparatus, electronic devices, and computer-readable storage media. Background Technology

[0002] Animals, as an important part of the Earth's ecological environment, are the foundation upon which human society develops. Today, protecting animals and the ecological environment are issues of increasing concern to human society. Currently, wildlife monitoring often involves placing wildlife monitoring cameras in areas where wild animals frequently appear. These cameras use infrared sensors to detect animals, generating images or videos, which are then uploaded to a platform via the network. The platform's backend classification method then groups wild animals of roughly the same size together based on their equivalent length.

[0003] Therefore, the aforementioned technologies can only capture images of wild animals and perform rough classification based on body length, but cannot identify animal species types or detect animal conditions.

[0004] There is currently no effective solution to the problem that related technologies cannot identify animal species or detect animal conditions. Summary of the Invention

[0005] This embodiment provides a species detection method, apparatus, electronic device, and computer-readable storage medium to solve the problem in related technologies that it is impossible to identify animal species types and detect animal states.

[0006] Firstly, this embodiment provides a species detection method, including: Acquire images of the animal species to be identified; The animal species image is identified based on the trained species type recognition model to determine the target species type to which the animal species image belongs; the species type recognition model is trained on a first dataset labeled with different animal species types; When the target species type is configured with state detection, the animal species image is identified based on the species state detection model trained according to the target species type to determine the species state corresponding to the animal species image; wherein, the species state detection model is trained based on a second dataset of species type that is the target species type and labeled with different health status levels.

[0007] In some embodiments, acquiring an image of the animal species to be identified includes: Acquire images of animal species captured by wildlife monitoring cameras, and / or images of animal species captured by smart monitoring cameras.

[0008] In some embodiments, the training process of the species type identification model includes: Obtain the original dataset used for model training, and the annotation information of the animal species types corresponding to the original dataset; Based on the annotation information, data augmentation processing is performed on the minority class samples and interest class samples in the original dataset using an oversampling strategy to obtain the first dataset; Based on the first dataset, the preset neural network model is iteratively trained until the preset iteration termination condition is reached, thereby obtaining the trained species type recognition model.

[0009] In some embodiments, based on the annotation information, data augmentation processing is performed on minority class samples and interest class samples in the original dataset to obtain the first dataset, including: Determine the K nearest neighbors of the minority class samples and the class of interest samples in the original dataset, respectively; Based on the K nearest neighbors, determine the boundary samples in the original dataset; The boundary samples are interpolated, and the first dataset is obtained based on the interpolation result.

[0010] In some embodiments, the species type identification model has the same algorithm structure as the species state detection model.

[0011] In some embodiments, the species type identification model includes a backbone network, a neck network, and a classification structure; the input data of the species type identification model passes sequentially through the backbone network, the neck network, and the classification structure; wherein: The backbone network includes: a feature extraction module, a network depth increase module, and a feature map space size adjustment module; The neck network includes: a feature extraction module, a sampling module, and a feature splicing module; The classification structure includes a classifier and a regressor.

[0012] In some embodiments, after determining the species status corresponding to the animal species image, the method further includes: Obtain the body temperature recognition result corresponding to the image of the animal species; Based on the body temperature recognition result and the species status, the health status information corresponding to the animal species image is determined.

[0013] Secondly, this embodiment provides a species detection device, including: an acquisition module, a species identification module, and a state detection module; wherein: The acquisition module is used to acquire images of the animal species to be identified; The species identification module is used to identify the animal species image based on the trained species type identification model, and determine the target species type to which the animal species image belongs; the species type identification model is trained based on a first dataset labeled with different animal species types; The state detection module is used to identify the animal species image based on a trained species state detection model corresponding to the target species type when the target species type is configured with state detection, and to determine the species state corresponding to the animal species image; wherein, the species state detection model is trained based on a second dataset of species type being the target species type and labeled with different health status levels.

[0014] Thirdly, this embodiment provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the species detection method described in the first aspect above.

[0015] Fourthly, this embodiment provides a storage medium storing a computer program that, when executed by a processor, implements the species detection method described in the first aspect above.

[0016] Compared with related technologies, this embodiment provides a species detection method, apparatus, electronic device, and computer-readable storage medium. The species detection method acquires an image of an animal species to be identified; identifies the animal species image based on a trained species type recognition model to determine the target species type to which the animal species image belongs; the species type recognition model is trained on a first dataset labeled with different animal species types; when the target species type is configured with state detection, the animal species image is identified based on a trained species state detection model corresponding to the target species type to determine the species state corresponding to the animal species image; wherein, the species state detection model is trained on a second dataset containing the target species type and labeled with different health state levels. It can achieve species type identification and species state detection of animal images based on model training.

[0017] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description

[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a hardware structure block diagram of the terminal of the species detection method in this embodiment; Figure 2 This is a flowchart of the species detection method in this embodiment; Figure 3 This is a schematic diagram illustrating the construction of a first dataset in one of some embodiments; Figure 4 This is a schematic diagram illustrating the construction of a second dataset in one of some embodiments; Figure 5 This is a schematic diagram of the backbone network structure in this embodiment; Figure 6 This is a schematic diagram of the structure of a CGS module in some embodiments; Figure 7 This is a schematic diagram of the structure of a CCRC module in some embodiments; Figure 8 These are schematic diagrams illustrating the specific structure of the Resx module in some embodiments; Figure 9 These are schematic diagrams of the CP module in some embodiments; Figure 10 These are schematic diagrams of the neck network structure in some embodiments; Figure 11 These are schematic diagrams illustrating the algorithmic structures of species state detection models and species type identification models in some embodiments; Figure 12 These are flowcharts of some of the species detection methods in the embodiments; Figure 13a This is a schematic diagram of the input and output of a training species type recognition model in this embodiment; Figure 13b This is a schematic diagram of the input and output of a training species state model in this embodiment; Figure 14 This is a structural block diagram of the species detection device in this embodiment. Detailed Implementation

[0019] To better understand the purpose, technical solution, and advantages of this application, the application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0020] Unless otherwise defined, the technical or scientific terms used in this application shall have the general meaning understood by one of ordinary skill in the art to which this application pertains. Words such as “a,” “an,” “an,” “the,” “the,” and “these” used in this application do not indicate quantitative limitation and may be singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include steps or modules (units) not listed, or may include other steps or modules (units) inherent to these processes, methods, products, or devices. Words such as “connected,” “linked,” and “coupled” used in this application are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. Normally, the character " / " indicates that the objects before and after it are in an "or" relationship. The terms "first," "second," "third," etc., used in this application are merely to distinguish similar objects and do not represent a specific order of objects.

[0021] The method embodiments provided in this example can be executed on a terminal, computer, or similar computing device. For example, it can run on a terminal. Figure 1 This is a hardware structure block diagram of the terminal for the species detection method in this embodiment. For example... Figure 1 As shown, a terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 and a memory 104 for storing data are also included. The processor 102 may be, but is not limited to, a microprocessor (MCU) or a programmable logic device (FPGA). The terminal may also include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that… Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the terminal described above. For example, the terminal may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown are illustrated.

[0022] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the species detection method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0023] The transmission device 106 is used to receive or send data via a network. This network includes a wireless network provided by the terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 can be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0024] This embodiment provides a species detection method. Figure 2 This is a flowchart of the species detection method in this embodiment, as shown below. Figure 2 As shown, the process includes the following steps: Step S210: Obtain an image of the animal species to be identified. This image can be obtained by capturing images or recording videos of wild animals using cameras deployed in nature reserves. The cameras can then upload the animal species image to a platform for species identification and status detection via a network.

[0025] Step S220: Based on the trained species type recognition model, identify the animal species image and determine the target species type to which the animal species image belongs; the species type recognition model is trained on a first dataset labeled with different animal species types.

[0026] After receiving the data from step S210, the platform will display information about the animal species image. At this time, the animal species image still lacks associated species information and health status information for identification. Based on pre-set business configuration information, it can be determined whether the currently reported animal species image requires species identification; if so, the species type of the animal species image will be identified based on the trained species type identification model, and the target species type corresponding to the identified animal species image will be updated in the information display. If species type identification is not required, the subsequent process ends.

[0027] Species type, or species classification, is a core concept in biology used to describe and distinguish different groups of organisms. The classification of species types primarily relies on biological classification systems, which hierarchically categorize organisms based on their similarity. The species type identification model in this step is pre-trained on a training set labeled with different animal species types. Therefore, this species type identification model has the ability to identify different animal species.

[0028] For example, when constructing the first dataset mentioned above, images or videos can be uploaded via a camera (after uploading, the videos can be divided into single-frame images by frame using video processing tools), the obtained images can be filtered to select all species data, and the corresponding species can be labeled to construct the first dataset. Figure 3 This is a schematic diagram illustrating the construction of a first dataset for one of some embodiments, such as... Figure 3 As shown, when constructing the first dataset, the raw reported data is first obtained. This raw reported data can be collected by cameras or retrieved online from the original data used to construct the first dataset. All species data are selected from the raw reported data to form the original species dataset. Species type labels are then applied to each species sample in the original species dataset, such as labeling them as "giant panda," "red panda," and "antelope." Afterward, the first dataset labeled with different animal species types is obtained. Through model training, the trained species type recognition model described above is obtained.

[0029] Step S230: When the target species type is configured with state detection, the animal species image is identified based on the species state detection model trained according to the target species type to determine the species state corresponding to the animal species image; wherein, the species state detection model is trained based on a second dataset with the species type being the target species type and labeled with different health status levels.

[0030] Species status can specifically refer to the degree of health status corresponding to a certain species type. During the construction of the second dataset, the degree of health status can be labeled based on image information such as animal gait, body size, fur color, and presence of wounds presented in the training samples. Corresponding state detection requirements can be configured for the species types that need state detection. When, based on step S220, it is determined that the target species type of the animal species image belongs to the species type requiring state detection, then the state detection of the animal species image is performed according to the trained species state detection model corresponding to that target species type. It can be understood that the first dataset mentioned above can be a training set containing multiple different animal species types. The second dataset mentioned above can be a training set constructed for a specific species type. That is, for different species types, the corresponding second dataset is different, and the corresponding trained species state detection model is also different. For example, when the target species type is a giant panda, it needs to be input into the trained species state detection model corresponding to the giant panda for state detection. The second dataset corresponding to this species state detection model is constructed from giant panda species samples containing different degrees of health status. Similarly, when the target species is an image of an antelope, it needs to be input into a trained species state detection model corresponding to the antelope for state detection. The second dataset corresponding to this species state detection model is constructed from antelope species samples containing different levels of health. Optionally, the annotation information in the second dataset can be divided into "healthy" and "unhealthy," allowing for the differentiation of healthy and unhealthy species images from various species samples of the target species type, thereby constructing a second dataset for identifying the degree of species health.

[0031] Figure 4 This is a schematic diagram illustrating the construction of a second dataset for one of some embodiments, such as... Figure 4 As shown, the initial reported data is obtained, and then a giant panda species sample (specifically, a sample of species of giant panda type) is selected to construct a giant panda health status dataset. For the giant panda species sample, based on information such as the animal's physique and fur color in the image, it can be labeled as "healthy" or "unhealthy" to construct a second dataset corresponding to the giant panda species type. Similarly, second datasets can be constructed for species types such as red panda and antelope.

[0032] In some embodiments, the core algorithms for identifying species type and identifying species health status can be the same, differing only in the datasets used for model training. This results in different recognition effects and different model outputs. Specifically, during the training phase, a first dataset labeled with species type is input to the model for identifying species type, and the model outputs classification information for the species type. A second dataset labeled with the health status of a specific species is input to the model for identifying species health status. For the same species type, the corresponding training set consists of the same species, and the output is the health status of that species. Before performing species status detection, it is necessary to first identify the species type to which the animal image belongs. Optionally, the above-mentioned species type identification and species status detection can be performed by an intelligent monitoring camera that has completed a general identification of whether an animal belongs to a bird, mammal, or reptile, etc., and then reports the species monitoring event based on the identification information. The associated algorithm server then performs the specific identification and detection of the species type and species status.

[0033] Current technologies often only enable the capture of wildlife images and rough classification based on body length, failing to identify animal species or detect animal conditions. Furthermore, significant differences in morphological characteristics exist between different species, and species at different health levels exhibit substantial variations in physical features. Therefore, the generalization ability of monitoring algorithms is crucial, and traditional image recognition is insufficient for current application scenarios.

[0034] This embodiment first identifies species types based on a trained model. After identifying the species type, it analyzes the species' condition. For unhealthy animals, it can generate alarm messages to remind relevant personnel to provide timely treatment. Therefore, compared with related technologies, this embodiment can identify specific species types and health statuses, and has a wider identification range.

[0035] Through steps S210 to S230, an image of the animal species to be identified is obtained. Based on the trained species type recognition model, the animal species image is identified to determine the target species type to which the image belongs. The species type recognition model is trained on a first dataset labeled with different animal species types. When the target species type is configured with state detection, the animal species image is identified based on a trained species state detection model corresponding to the target species type to determine the species state corresponding to the image. The species state detection model is trained on a second dataset containing the target species type and labeled with different health status levels. This model enables the identification of the species type and the detection of the species state of an animal image based on its training.

[0036] In one embodiment, obtaining an image of the animal species to be identified based on step S210 described above may include: Acquire images of animal species captured by wildlife monitoring cameras, and / or images of animal species captured by smart monitoring cameras.

[0037] The animal species images mentioned above can be captured by either intelligent monitoring cameras or wildlife monitoring cameras. Wildlife monitoring cameras, also known as wildlife protection cameras, are specialized cameras used to monitor and record the behavior of wild animals. They detect animal activity using infrared sensors or motion sensors. When an animal enters the camera's monitoring range, the camera automatically triggers a photo or video recording function, capturing image information of the animal in its natural environment. They are suitable for deployment in nature reserves, legal hunting areas, and other natural environments. Intelligent monitoring cameras, also known as intelligent cameras or intelligent surveillance cameras, are monitoring devices that integrate image acquisition, processing, analysis, and network communication functions. Intelligent monitoring cameras are a product of combining traditional cameras with modern artificial intelligence technologies (such as machine learning and computer vision). Intelligent monitoring cameras can not only capture images and videos but also analyze and process this data. In this embodiment, they can identify the approximate category of the target object in the image, such as birds or mammals. Intelligent monitoring cameras can be deployed in urban roads, commercial areas, or other outdoor locations with charging facilities. Therefore, wildlife monitoring cameras and / or intelligent monitoring cameras can be selected to collect animal species images based on the physical environmental conditions of the actual application scenario.

[0038] Specifically, when the intelligent monitoring camera detects an animal, it captures an image or video and uploads the identification information to the platform via the network. Similarly, the wildlife monitoring camera detects an animal passing by using infrared sensors, captures an image or video, and uploads it to the platform via the network. Thus, the platform can obtain images of the animal species to be identified. Understandably, when constructing the first and second datasets, data can also be collected based on wildlife monitoring cameras or intelligent monitoring cameras. This embodiment enables real-time image acquisition of wild animals, thereby achieving timely species identification and status monitoring.

[0039] Specifically, in some embodiments, when an image of an animal species requiring attention in the current monitoring scenario is identified based on species type recognition and species state detection, the training set can be supplemented based on the identified image. For example, by performing species type recognition and species state detection on a currently acquired animal species image, it may be determined that the image is of a red panda in an unhealthy state, and the current monitoring scenario requires the timely detection of unhealthy red pandas. In this case, the image of this animal species can be added to the training set as an image of interest that is significant for the current monitoring scenario, thereby enhancing the quality and quantity of images in the training set. By continuously expanding the training set based on the recognition results during the recognition process, and further upgrading and optimizing the aforementioned species type recognition model and species state detection model based on the training set, the recognition capabilities of the aforementioned species type recognition model and species state detection model can be further enhanced, thereby improving the accuracy of the final recognition result.

[0040] In another embodiment, the training process of the species type identification model may specifically include: Obtain the original dataset for model training and the annotation information of the animal species types corresponding to the original dataset; based on the annotation information, perform data augmentation processing on the minority class samples and interest class samples in the original dataset using an oversampling strategy to obtain the first dataset; based on the first dataset, iteratively train the preset neural network model until the preset iteration termination condition is reached to obtain the trained species type recognition model.

[0041] In constructing the first dataset, data augmentation can be performed on several minority class samples and interest class samples.

[0042] Minority samples can be those of a species type that are less numerous in the original reported data, while focus samples can be pre-determined samples of a species type that require special attention from the original reported data. For example, if the data uploaded by the protected area currently shows a focus on giant pandas, then samples of giant panda species would be focus samples; similarly, if the current reported data shows more monkey images than black bear images, then samples of black bear species would be minority samples. Therefore, data augmentation can be performed on giant panda and black bear image samples.

[0043] Specifically, the images from the selected raw reported data are randomly cropped, for example, to a size of 640×640. Then, the selected species datasets are labeled, specifically annotating the corresponding species information and their health status. Furthermore, data augmentation strategies can be adjusted based on business needs and the dataset's data. If the current reserve focuses on the health of giant pandas and needs to identify unhealthy pandas, then an oversampling strategy can be used to apply data augmentation to unhealthy pandas, enhancing the model's ability to identify them. Specifically, the Borderline-SMOTE oversampling strategy can be used to enhance the model's ability to identify classes of interest and minority classes.

[0044] In addition, after completing the data augmentation processing based on the oversampling strategy described above, a portion of the original dataset can be randomly flipped horizontally to enhance the model's ability to identify species in different orientations and improve model robustness. This embodiment preprocesses images in the above manner, enriching the dataset, improving model robustness, preventing model overfitting, and simulating real animal monitoring scenarios.

[0045] In one embodiment, based on annotation information, data augmentation processing is performed on minority class samples and interest class samples in the original dataset to obtain a first dataset, which may specifically include: Determine the K-nearest neighbors of the minority class samples and the class of interest samples in the original dataset; determine the boundary samples in the original dataset based on the K-nearest neighbors; perform interpolation on the boundary samples, and obtain the first dataset based on the interpolation results.

[0046] In this embodiment, the Border-line SMOTE algorithm can be used to classify minority class samples and interest class samples into three categories. Specifically, the K-nearest neighbors of each minority class sample or interest class sample are calculated. These K-nearest neighbors are the K nearest neighbors of a sample. If, for a given minority class sample or interest class sample, all K-nearest neighbors belong to the majority class, then the minority class sample or interest class sample is classified as a noise point and no further processing is performed. If, for a given minority class sample or interest class sample, more than half but less than all of the K-nearest neighbors belong to the majority class, then the minority class sample or interest class sample is classified as a danger point; danger points are boundary samples and require data augmentation. If, for a given minority class sample or interest class sample, less than half of the K-nearest neighbors belong to the majority class (or, in other words, more than half of the K-nearest neighbors belong to the minority class), then the minority class sample or interest class sample is classified as a safe point and no further processing is performed.

[0047] The following explanation uses species type as an example to illustrate the majority class. A single species type in the dataset can be considered the majority class, or multiple species types can be considered the majority class. In this embodiment, the majority class refers to the data category with a relatively large number of samples in the dataset (e.g., the species types in the first dataset). For example, in the first dataset, when one or more species types have similar or nearly equal numbers of samples, and all are significantly higher than other species types, they can be considered the majority class. For instance, the dataset contains species type A, species type B, and species type C. Species type A has 600 samples, species type B has 550 samples, and species type C has only 100 samples. Therefore, species type A and species type B can both be considered the majority class.

[0048] In other words, data augmentation is performed only on boundary samples identified as hazardous points. Specifically, new samples are generated by randomly selecting samples from all boundary samples and then interpolating them using the Synthetic Minority Oversampling Technique (SMOTE) algorithm. The specific process for generating new samples is as follows: (1) In equation (1), x n It is a newly generated sample. x i These are samples selected from the boundary samples. x zi represent x i Random K-nearest neighbor samples, β It is a random number between 0 and 1, used to control the sample variability.

[0049] Since all noise points are from the majority class, the generated samples will overlap with the majority class. More than half of the samples are from the minority class, which are considered safe points. Oversampling these safe points can easily lead to overfitting, and the newly synthesized samples will not provide much useful information. Therefore, this embodiment oversamples dangerous points (boundary samples) and generates new samples around them, which can improve the model's generalization ability and reduce the risk of overfitting. Thus, the Borderline-SMOTE oversampling strategy can enhance the model's ability to identify the class of interest and the minority class.

[0050] In another embodiment, the species type identification model and the species state detection model have the same algorithmic structure. The same algorithmic structure can be used to construct both the species type identification model and the species state detection model. However, the specific datasets used for training differ, resulting in different recognition capabilities and results for the two models.

[0051] In one embodiment, the species type identification model includes a backbone network, a neck network, and a classification structure. The input data of the species type identification model passes through the backbone network, the neck network, and the classification structure in sequence. The backbone network includes a feature extraction module, a network depth increase module, and a feature map space size adjustment module. The neck network includes a feature extraction module, a sampling module, and a feature splicing module. The classification structure includes a classifier and a regressor.

[0052] The species type identification model and the species state detection model have the same algorithm structure, and the following explanation will mainly focus on the algorithm structure of the species type identification model. The backbone network can be composed of a feature extraction module (CGS module), a network depth increase module (CCRC module), and a feature map space size adjustment module (CP module).

[0053] Figure 5 This is a schematic diagram of the backbone network structure in this embodiment, as shown below. Figure 5 As shown, the input image data with dimensions of 3×640×640 is first processed by the CGS module to extract feature information, resulting in a feature map with 32 channels and a size of 320×320. The CGS module then further extracts feature information, resulting in a feature map with 64 channels and a size of 160×160. Next, the CCRC module (output 64×160×160) increases the network depth, improving feature representation and increasing module diversity. Afterwards, the data passes through the CGS module (output 128×80×80), the CCRC module (output 128×80×80), the CGS module (output 256×40×40), and the CCRC module (output 256×40×40). Finally, the CP module (output 512×20×20) reduces the feature map space size, lowers computational complexity, and extracts important features.

[0054] in, Figure 6 This is a schematic diagram of the structure of a CGS module in some embodiments, such as... Figure 6 As shown, the GCS module can include a convolutional layer (Conv), a group normalization layer (GN), and a loss function (Silu). The input image data has a dimension of 640×640×3. Convolutional operations are performed through the convolutional layer to extract image features. The convolutional kernel size can be 6×6, with a stride of 2, padding of 2, and the number of channels being the same as the input data (3). The number of convolutional kernels is 32. After the convolutional operation of the convolutional layer, the size of the output feature map can be expressed as shown in equation (2): (2) In Equation (2), N represents the output size, W represents the input size, F represents the kernel size, P represents the padding size, and S represents the stride size. The final feature map size after the convolution operation is 320.

[0055] After the convolution operation is completed, the feature map is normalized using a group normalization layer, as follows: (3) In equation (3), x It is the input data. μ It is the mean of the input data. σ It is the variance of the input data. It is a constant set to prevent division by zero. γ and β These are learnable parameters that can be adjusted during training. Group normalization divides features into several groups and normalizes them within these groups.

[0056] After group normalization, a nonlinearity is introduced through the SiLu activation function to alleviate problems such as gradient vanishing. The activation function can guide network training and accelerate network convergence. The SiLu activation function is defined as follows: f(x) = x × sigmoid(x) (4) Wherein, sigmoid(x) is the standard sigmoid function, and the specific form of the sigmoid function is shown in equation (5): (5) In addition, Figure 7 This is a schematic diagram of the structure of a CCRC module in some embodiments, such as... Figure 7 As shown, the CCRC module includes a CGS module, a Resx module, and a concat module. The specific structure of the CGS module can be found in the above embodiments. Figure 6 This will not be elaborated upon further. The Resx module is a residual network. Figure 8 Here are some schematic diagrams illustrating the specific structure of the Resx module in some embodiments, such as Figure 8 As shown, the Resx module mainly includes convolutional layers and the ReLU activation function. The residual network directly superimposes the output F(x) of the (L-1)th layer onto the output of the Lth convolutional layer, outputting F(x) + x. The x-identity mapping means that when F(x) approaches 0, F(x) + x = x. At this time, the range of functions that the Lth convolutional layer can fit completely covers the range of functions that the L-1th convolutional layer can fit. The residual network can solve the problems of gradient vanishing and feature redundancy, enabling deep network models to achieve better results. The expression for the residual network can be: (6) For the first The input of each convolutional layer, For the first The input of each convolutional layer, For the first The output of the convolutional layer.

[0057] Additionally, the Concat module performs concatenation, combining the input feature maps to retain more feature information. The Concat module expression can be: (7) Figure 9 Here are some schematic diagrams of the CP module in some embodiments, such as Figure 9 As shown, the CP module includes pooling layers and 1×1 convolutional layers. Pooling layers reduce the spatial size of the feature map, lower computational complexity, extract important features, and prevent overfitting.

[0058] In addition, Figure 10 Here are schematic diagrams of the neck network structure in some embodiments, such as Figure 10 As shown, the neck network can include the aforementioned CGS module, the upsample module, and the aforementioned CCRC module. The upsample module can employ bilinear interpolation, as shown in equation (8):

[0059] In equation (8), f( x , y () represents the point to be interpolated. Q 11 For in ( x 1, y 1) is a known point. Q 21 For in ( x 2, y 1) is a known point. Q 12 For in ( x 1, y 2) The known point at that location. Q 22 For in ( x 2, y 2) is a known point.

[0060] The final classification structure receives feature information from the neck network input and performs target detection and recognition. In the species type recognition model, it identifies the species type; in the species state detection model, it identifies the species' health status. The classification structure can include a classifier and a bounding box regressor to predict the target category and location. The classifier predicts the category of objects within the bounding box and obtains feature output through convolution operations. The regressor is responsible for predicting the position and size of the bounding box. The final recognition result is obtained through the classification predictions of the classification structure.

[0061] It should be noted that the specific structures and input / output data dimensions of the different network modules in the above embodiments are merely examples. Those skilled in the art can make adaptive adjustments based on actual circumstances and requirements such as model training efficiency and accuracy. This embodiment does not impose specific limitations on these aspects. Specific components and the number of network layers in the corresponding network modules can be added, modified, deleted, or replaced according to the needs of the actual application scenario. Optionally, the normalization layer in the CGS module can be replaced with a group normalization layer (GN) or a batch normalization layer (BN). The structure of the convolutional and pooling layers in the CP module can be replaced with a structure of convolution, pooling, and feature fusion.

[0062] Figure 11 Here are schematic diagrams illustrating the algorithmic structures of some embodiments of the species state detection model and species type identification model, such as... Figure 11 As shown, the species state detection model and the species type identification model have the same structure, both of which can include: a backbone network 112, a neck network 114, and a classification structure 116. The specific structures of the backbone network 112, the neck network 114, and the classification structure 116 can be referred to the above embodiments, and will not be repeated here.

[0063] In this embodiment, the specific animal species are first identified using a species type identification model. Then, based on the specific animal species and business configuration, it is determined whether a species health status analysis is needed. If so, the species health status is further detected using a species state detection model. The core implementation method of the species state detection model is consistent with that of the species type identification model. The difference lies in the different training and testing sets and output information of the two models. The species state detection model includes various algorithm models, such as the giant panda algorithm model, the red panda algorithm model, and the Tibetan antelope algorithm model, mainly based on which species(s) require attention in the currently monitored area (e.g., a protected area). The output of the species state detection model is the species health status level, which can be a value between 0 and 1, with a higher value indicating a healthier species.

[0064] In this embodiment, considering the significant differences in body shape and characteristic information among different species of animals, traditional image recognition is insufficient to meet the needs of accurate species detection. This embodiment utilizes deep learning technology, employing techniques such as image preprocessing, convolution, group normalization, feature map stitching, residual networks, and upsampling to extract image feature information. Based on the extracted feature information, classification is performed to predict species type identification, thereby improving the accuracy of species type identification.

[0065] Furthermore, the same species often exhibits different physical characteristics and possesses different physical information depending on its health condition. Based on this difference, this embodiment processes the dataset and adjusts the training direction for species types where health status needs to be monitored, with one algorithm model corresponding to each species type. The specific species category is identified through a species type recognition model. Then, based on the identified species type, the corresponding species status detection model is selected to identify and predict the animal's health status.

[0066] In another embodiment, after determining the species status corresponding to the animal species image, the species detection method may further include: Obtain the body temperature recognition results corresponding to the animal species images; determine the health status information corresponding to the animal species images based on the body temperature recognition results and species status.

[0067] Specifically, the species requiring health status identification can be configured according to business needs. Based on the identified target species type, it is determined whether the target species type requires health status identification. If no target species type is identified, the detection process ends; if a target species type is identified but does not require health status detection, the detection process also ends.

[0068] If the target species requires health status detection, the species status is first determined based on the species status detection model, and then the species' health status is analyzed using animal body temperature. Animal body temperature can be reported by front-end cameras that support body temperature detection. Combining the body temperature recognition results and species status, the health status information corresponding to the animal species image is determined and the data display on the platform is updated. For unhealthy animals, alarm information can be generated and reported to remind relevant personnel to provide timely treatment.

[0069] Specifically, the body temperature recognition result can take one of three values: 0, -1, or 1. 0 indicates no recognition or no temperature information reported by the front-end device; -1 indicates the body temperature is outside the normal range; and 1 indicates the body temperature is within the normal range. Multiplying the body temperature recognition result by a preset coefficient and then adding it to the species status value yields the final species health status information. (9) f represents species health status information; 0.32 is the species status output by the species status detection model, which is an empirical value. Those skilled in the art can also set other values ​​according to the needs of actual application scenarios. p is the body temperature recognition result, which can be one of 0, -1, or 1.

[0070] Therefore, the species detection method in this embodiment has a high recognition rate, a wide recognition range, and can achieve real-time and accurate monitoring of species health status.

[0071] Figure 12 These are flowcharts of some embodiments of species detection methods, such as... Figure 12 As shown, the detection method for this species includes the following steps: Step S1201: Obtain images of animal species collected by the intelligent monitoring camera.

[0072] Step S1202: Acquire images of animal species captured by the wildlife monitoring camera. Steps S1201 and S1202 can be performed selectively, or both can be performed. The execution order of steps S1201 and S1202 is not fixed, and the two steps are independent of each other. The intelligent monitoring camera or wildlife monitoring camera uploads the data to the platform for data display via the network.

[0073] Step S1203: Determine whether the species identification function is configured; if yes, proceed to step S1204; otherwise, end the process.

[0074] Step S1204: Identify animal species images based on the trained species type recognition model.

[0075] Step S1205: Determine whether the species type has been successfully identified; if yes, proceed to step S1206 and then step S1209; otherwise, end the process.

[0076] Step S1206: Determine whether the identified target species type needs to be tested for health status; if yes, proceed to step S1207; otherwise, end the process.

[0077] Step S1207: Detect animal species images based on the trained species state detection model.

[0078] Step S1208: Determine whether the species status has been successfully identified; if yes, proceed to step S1209; otherwise, end the process.

[0079] Step S1209: Update the platform display information.

[0080] Steps S1201 to S1209 above, based on deep learning technology, perform algorithmic analysis on species images to identify specific species information. Compared to related technologies, the system is more intelligent and has a higher recognition rate, avoiding cumbersome manual operation processes and reducing labor costs. Furthermore, this embodiment can identify more species types and also determine the health status of species. Technically, it is more comprehensive and has richer detection functions, enabling better species protection conditions. It is suitable for protected areas with high species protection requirements and provides better monitoring and early warning effects. It reports species information and health status in a timely and efficient manner to remind relevant personnel to take action. In addition, this embodiment has high functional flexibility; whether species identification is needed and which species' health status needs to be detected can be configured in advance.

[0081] Figure 13a This is a schematic diagram illustrating the input and output of a training species type recognition model in this embodiment. Figure 13a As shown, the first dataset labeled with different species types is input into the preset algorithm structure for model training, and the output is the identified species types. Figure 13b This is a schematic diagram of the input and output of a training species state model in this embodiment. Figure 13b As shown, a second dataset labeled with the health status of different species is input into a pre-defined algorithm structure for model training, and the output is the identified species status. For example, a species status detection model that detects the status of giant pandas can be trained based on a second dataset labeled with the health status of red pandas; a species status detection model that detects the status of red pandas can be trained based on a second dataset labeled with the health status of antelopes; and a species status detection model that detects the status of antelopes can be trained based on a second dataset labeled with the health status of antelopes.

[0082] This embodiment also provides a species detection device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. The terms "module," "unit," "subunit," etc., used below refer to combinations of software and / or hardware that perform a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0083] Figure 14 This is a structural block diagram of the species detection device 14 in this embodiment, as shown below. Figure 14 As shown, the species detection device 14 includes: an acquisition module 142, a species identification module 144, and a status detection module 146; wherein: The acquisition module 142 is used to acquire images of the animal species to be identified; The species identification module 144 is used to identify animal species images based on the trained species type identification model and determine the target species type to which the animal species image belongs; the species type identification model is trained based on a first dataset labeled with different animal species types; The state detection module 146 is used to identify animal species images and determine the species state corresponding to the animal species images based on a species state detection model trained according to the target species type when state detection is configured for the target species type; wherein, the species state detection model is trained based on a second dataset with the species type being the target species type and labeled with different health status levels.

[0084] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.

[0085] This embodiment also provides an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0086] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0087] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program: S1, Obtain an image of the animal species to be identified; S2, Based on the trained species type recognition model, identify animal species images and determine the target species type to which the animal species image belongs; the species type recognition model is trained on a first dataset labeled with different animal species types; S3, when the target species type is configured with state detection, the animal species image is identified based on the species state detection model trained according to the target species type, and the species state corresponding to the animal species image is determined; wherein, the species state detection model is trained based on a second dataset with the species type being the target species type and labeled with different health status levels.

[0088] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated in this embodiment.

[0089] Furthermore, in conjunction with the species detection methods provided in the above embodiments, this embodiment can also provide a storage medium for implementation. This storage medium stores a computer program; when executed by a processor, the computer program implements any of the species detection methods described in the above embodiments.

[0090] It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. All other embodiments derived by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.

[0091] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0092] Obviously, the accompanying drawings are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar situations based on these drawings without any creative effort. Furthermore, it is understood that although the work done in this development process may be complex and lengthy, for those skilled in the art, certain design, manufacturing, or production modifications made based on the technical content disclosed in this application are merely conventional technical means and should not be considered as insufficient disclosure of this application.

[0093] The term "embodiment" in this application refers to a specific feature, structure, or characteristic described in connection with an embodiment that may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily imply the same embodiment, nor does it imply that it is mutually exclusive with or independent of other embodiments. It will be clearly or implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0094] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the appended claims.

Claims

1. A method for species detection, characterized in that, include: Acquire images of the animal species to be identified; The animal species image is identified based on the trained species type recognition model to determine the target species type to which the animal species image belongs; the species type recognition model is trained on a first dataset labeled with different animal species types; When the target species type is configured with state detection, the animal species image is identified based on the species state detection model trained according to the target species type to determine the species state corresponding to the animal species image; wherein, the species state detection model is trained based on a second dataset of species type that is the target species type and is labeled with different health status levels; different species types correspond to different second datasets, and the corresponding trained species state detection models are also different. When an image of an animal species that needs to be monitored in the current monitoring scenario is identified, the first dataset and the second dataset are supplemented based on the image of the animal species that needs to be monitored. The species type identification model is further upgraded and optimized based on the first dataset, and the species status detection model is further upgraded and optimized based on the second dataset. The species type identification model and the species state detection model have the same algorithm structure; The species type identification model includes a backbone network, a neck network, and a classification structure; the input data of the species type identification model passes sequentially through the backbone network, the neck network, and the classification structure; wherein: The backbone network includes a feature extraction module, a network depth increasing module, and a feature map space size adjustment module; the neck network includes a feature extraction module, a sampling module, and a feature concatenation module; the classification structure includes a classifier and a regressor; the data input to the backbone network is processed by the feature extraction module to extract feature information, then further processed by the feature extraction module to extract feature information, then the network depth is increased by the network depth increasing module, and then the data is processed again by the feature extraction module, the network depth increasing module, the feature extraction module, and the network depth increasing module, and finally the feature map space size is reduced by the feature map space size adjustment module; The feature extraction module includes a convolutional layer, a group normalization layer, and a loss function; the network depth increasing module includes the feature extraction module, a residual network, and a concatenation module; the feature map spatial size adjustment module includes a pooling layer and a 1×1 convolutional layer.

2. The species detection method according to claim 1, characterized in that, Obtain images of the animal species to be identified, including: Acquire images of animal species captured by wildlife monitoring cameras, and / or images of animal species captured by smart monitoring cameras.

3. The species detection method according to claim 1, characterized in that, The training process of the species type identification model includes: Obtain the original dataset used for model training, and the annotation information of the animal species types corresponding to the original dataset; Based on the annotation information, data augmentation processing is performed on the minority class samples and interest class samples in the original dataset using an oversampling strategy to obtain the first dataset; Based on the first dataset, the preset neural network model is iteratively trained until the preset iteration termination condition is reached, thereby obtaining the trained species type recognition model.

4. The species detection method according to claim 3, characterized in that, Based on the annotation information, data augmentation processing is performed on the minority class samples and the class of interest samples in the original dataset to obtain the first dataset, including: Determine the K nearest neighbors of the minority class samples and the class of interest samples in the original dataset, respectively; Based on the K nearest neighbors, determine the boundary samples in the original dataset; The boundary samples are interpolated, and the first dataset is obtained based on the interpolation result.

5. The species detection method according to any one of claims 1 to 4, characterized in that, After determining the species status corresponding to the animal species image, the method further includes: Obtain the body temperature recognition result corresponding to the image of the animal species; Based on the body temperature recognition result and the species status, the health status information corresponding to the animal species image is determined.

6. A species detection device, characterized in that, include: The module includes an acquisition module, a species identification module, and a state detection module; among which: The acquisition module is used to acquire images of the animal species to be identified; The species identification module is used to identify the animal species image based on the trained species type identification model, and determine the target species type to which the animal species image belongs; the species type identification model is trained based on a first dataset labeled with different animal species types; The state detection module is used to identify the animal species image based on a trained species state detection model corresponding to the target species type when state detection is configured for the target species type, and to determine the species state corresponding to the animal species image. The species state detection model is trained on a second dataset of the target species type, labeled with different health status levels. Different species types correspond to different second datasets, and the corresponding trained species state detection models are also different. When an animal species image of interest is identified in the current monitoring scenario, the first and second datasets are supplemented based on the image of the animal species of interest. The species type identification model is further upgraded and optimized based on the first dataset, and the species state detection model is further upgraded and optimized based on the second dataset. The species type identification model and the species state detection model have the same algorithm structure; The species type identification model includes a backbone network, a neck network, and a classification structure; the input data of the species type identification model passes sequentially through the backbone network, the neck network, and the classification structure; wherein: The backbone network includes a feature extraction module, a network depth increasing module, and a feature map space size adjustment module; the neck network includes a feature extraction module, a sampling module, and a feature concatenation module; the classification structure includes a classifier and a regressor; the data input to the backbone network is processed by the feature extraction module to extract feature information, then further processed by the feature extraction module to extract feature information, then the network depth is increased by the network depth increasing module, and then processed again by the feature extraction module, the network depth increasing module, the feature extraction module, and the network depth increasing module, and finally the feature map space size is reduced by the feature map space size adjustment module; wherein, the feature extraction module includes a convolutional layer, a group normalization layer, and a loss function; the network depth increasing module includes the feature extraction module, a residual network, and a concatenation module; the feature map space size adjustment module includes a pooling layer and a 1×1 convolutional layer.

7. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the species detection method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the species detection method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and device for intention recognition of fault, electronic equipment and storage medium

    CN114691870A

  • Deep learning-based leakage detection method and device, equipment and medium

    CN117710374A

  • Tobacco insect pest monitoring and early warning method and system based on Internet of Things, and storage medium

    CN118780594A

  • A method and system for the identification of animals

    EP4187505A1

  • Generating pet image training data based on source images

    US20220211008A1