Bird recognition model training method and device and related equipment
The method addresses the inefficiencies and inaccuracies of manual labeling in bird recognition models by clustering image features and using pseudo-labels for a two-stage training process, resulting in improved efficiency and accuracy.
Patent Information
- Application Number
- CN202411222558.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2024-12-27
AI Technical Summary
Existing neural network models for bird recognition in smart bird feeders require manual labeling of training images, which is time-consuming, labor-intensive, and prone to errors, leading to low training efficiency and recognition accuracy.
A method involving clustering of bird image features to form image sets, using pseudo-labels for initial training, followed by a two-stage training process to enhance recognition accuracy, including a first stage with pseudo-labels and a second stage with refined labels based on feature similarity.
Automatically annotates training images, improving labeling efficiency and reducing manual errors, thereby enhancing the training efficiency and recognition accuracy of the bird recognition model.
Smart Images

Figure CN119206775A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of bird identification, and in particular to a training method, device and related equipment for a bird identification model. Background Art
[0002] In the application of smart bird feeders, you can first take an image of the target bird to be identified that is close to the smart bird feeder, and then use the neural network model to identify and classify the image to obtain the type of the target bird. Subsequently, you can provide personalized feeding for the target bird based on the type of the target bird.
[0003] The training process of the neural network model requires manual labeling of training images containing birds. Since there are many types of existing birds and a large number of training images are required for the training process of the neural network model, manual labeling is time-consuming and labor-intensive and prone to human errors, which further affects the recognition accuracy of the trained neural network model.
[0004] In summary, since the existing neural network model for bird recognition requires manual labeling during the training process, there are problems such as low training efficiency and low recognition accuracy of the trained neural network model. Summary of the invention
[0005] In view of this, the purpose of the present application is to provide a training method, device and related equipment for a bird recognition model to solve the problem that the existing neural network model for bird recognition requires manual labeling during the training process, resulting in low training efficiency and low recognition accuracy of the trained neural network model.
[0006] In a first aspect, the present application provides a method for training a bird recognition model, the method comprising:
[0007] Clustering is performed on the image features of multiple bird images to obtain clustering results;
[0008] Dividing the plurality of bird images into a plurality of image sets according to the clustering result;
[0009] Determine the bird name with the greatest feature similarity between the multiple bird names included in the bird name set and the multiple bird images included in each of the image sets as the label of all the bird images in the corresponding image set;
[0010] Wherein, the feature similarity indicates the similarity between the text feature of the bird name and the image feature of the bird image feature;
[0011] The bird recognition model is trained using a plurality of the bird images and the corresponding labels.
[0012] Preferably, dividing the plurality of bird images into a plurality of image sets according to the clustering result comprises:
[0013] Dividing the M bird images into N first image sets according to the clustering result N;
[0014] Wherein, M and N are both positive integers;
[0015] Constructing N pseudo labels for N sets of the first images;
[0016] Among them, there is a one-to-one correspondence between the N first image sets and the N pseudo labels; the pseudo labels are reference labels used to annotate the bird images in the first image set, and the pseudo labels do not indicate the names of the birds corresponding to the bird images in the first image set.
[0017] Preferably, after constructing N pseudo labels for the N first image sets, the method further comprises:
[0018] Performing a first-stage training on the bird recognition model using the N first image sets and the N pseudo labels to obtain a basic recognition model;
[0019] Performing recognition and classification on the M bird images by using the basic recognition model and dividing the M bird images into N second image sets according to the recognition and classification results;
[0020] Among them, different second image sets correspond to different recognition and classification results.
[0021] Preferably, determining the bird name having the greatest feature similarity between the multiple bird names included in the bird name set and the multiple bird images included in each of the image sets as the label of all the bird images in the corresponding image set includes:
[0022] Combining each of the N second image sets with the bird name set as input data to obtain N groups of input data;
[0023] Inputting N groups of input data into the Bioclip model respectively, and determining the p included in the second image set in each group of input data by the Bioclip model n image features corresponding to the q bird images and text features corresponding to the q bird names included in the bird name set;
[0024] Determine the p corresponding to the second image set in each group of the input data according to the image features and the text features. n The feature similarity between the image features and the q text features corresponding to the bird name set is obtained corresponding to each group of the input data (p n ×q) similarities of the features;
[0025] According to the (p n ×q) feature similarities, and the similarities between each group of input data and at least p n The bird name with the largest feature similarity among the bird images is determined as p n said labels for said bird images;
[0026] Among them, p n 'According to p n The quantity threshold, p n ≥p n '.
[0027] Preferably, the step of combining each set of the input data with at least p n The bird name with the largest feature similarity among the bird images is determined as p n After the label of the bird image, the method further comprises:
[0028] The p included in each of the N second image sets n The feature similarity between the bird images and the corresponding labels is less than the similarity threshold r n The bird images are discarded to obtain N third image sets.
[0029] Preferably, the training of the bird recognition model using the plurality of bird images and the corresponding labels includes:
[0030] The second stage of training is performed on the basic recognition model according to the N third image sets and the corresponding labels to obtain an enhanced recognition model.
[0031] In a second aspect, the present application provides a training device for a bird recognition model, the device comprising: a clustering module, an image set determination module, a label determination module and a training module;
[0032] The clustering module is used to perform clustering processing on the image features of multiple bird images to obtain clustering results;
[0033] The image set determination module is used to divide the plurality of bird images into a plurality of image sets according to the clustering result;
[0034] The label determination module is used to determine the bird name with the greatest feature similarity between the multiple bird names included in the bird name set and the multiple bird images included in each image set as the label of all the bird images in the corresponding image set;
[0035] Wherein, the feature similarity indicates the similarity between the text feature of the bird name and the image feature of the bird image feature;
[0036] The training module is used to train a bird recognition model using a plurality of the bird images and the corresponding labels.
[0037] In a third aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the memory is used to store a software program, and the processor runs or executes the software program stored in the memory so that the electronic device implements the above-mentioned bird recognition model training method.
[0038] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program codes executed by a processor, wherein the program codes include a training method for implementing the above-mentioned bird recognition model.
[0039] In a fifth aspect, the present application provides a computer program product, including a program code, which enables a computer to execute the above-mentioned bird recognition model training method when the computer runs the computer program product.
[0040] Beneficial effects:
[0041] The present application provides a training method for a bird recognition model, the method comprising: performing clustering processing on image features of multiple bird images to obtain clustering results; dividing the multiple bird images into multiple image sets according to the clustering results; determining the bird name with the largest feature similarity between multiple bird names included in the bird name set and multiple bird images included in each image set as the label of all bird images in the corresponding image set; wherein the feature similarity indicates the similarity between the text feature of the bird name and the image feature of the bird image feature; training the bird recognition model through multiple bird images and corresponding labels;
[0042] In summary, the present application divides multiple bird images into multiple image sets according to clustering processing of their image features, and then determines the bird name for each image set according to the similarity between the image features of the bird images included in each image set and the text features of the multiple bird names included in the bird name set, and subsequently clearly identifies the bird as a label. Therefore, the present application can realize automatic annotation of training images, thereby effectively improving the annotation efficiency and effectively reducing the manual errors in annotation, further improving the training efficiency of the model and the recognition accuracy of the trained model. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. The following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 A flowchart of a method for training a bird identification model provided in an embodiment of the present application;
[0045] Figure 2 A logical schematic diagram of determining image features and text features corresponding to input data through the Bioclip model provided in an embodiment of the present application;
[0046] Figure 3 A logical schematic diagram of determining an image set provided in an embodiment of the present application;
[0047] Figure 4 A schematic diagram of the structure of a training device for a bird identification model provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] In bird nature reserves, school research institutions and other places, the use of smart bird feeders can facilitate the collection of bird data and provide personalized feeding for different types of birds.
[0049] In actual applications, you can first take an image of the target bird to be identified that is close to the smart bird feeder, and then use the neural network model to identify and classify the image to be identified to obtain the type of the target bird. Subsequently, you can provide personalized feeding for the target bird based on the type of the target bird.
[0050] The training process of the neural network model requires manual labeling of training images containing birds. Since there are many species of birds, the staff who do the manual labeling need to have professional knowledge of birds. In addition, since the training process of the neural network model requires the use of a large number of training images, the manual labeling method is time-consuming, labor-intensive and prone to human errors, which further affects the recognition accuracy of the trained neural network model.
[0051] In summary, since the existing neural network model for bird recognition requires manual labeling during the training process, there are problems such as low training efficiency and low recognition accuracy of the trained neural network model.
[0052] In order to solve the above technical problems, the present application proposes a technical solution for training a bird recognition model. This technical solution can effectively improve the labeling efficiency and reduce the manual errors in labeling by realizing automatic labeling of training images, thereby further improving the training efficiency of the model and the recognition accuracy of the trained model.
[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0054] First, this application proposes a training method for a bird recognition model, such as Figure 1 As shown, Figure 1 The flowchart of the training method of the bird recognition model provided in the embodiment of the present application includes: S110 to S140, and the details are as follows:
[0055] S110: performing clustering processing on the image features of the plurality of bird images to obtain a clustering result.
[0056] Specifically, in the prior art, workers who work on bird images usually manually annotate a large number of mixed bird images one by one according to the morphology of the birds in the bird images, resulting in very low annotation efficiency; the embodiment of the present application first performs "piling processing" on multiple bird images according to the image features of the bird images, so that "each pile of bird images" belongs to the same category, and then uniformly annotates "each pile of bird images", wherein the "piling process" is the "clustering process".
[0057] In one implementation, S110 includes: step (1), details of which are as follows:
[0058] Step (1): clustering the M bird images to obtain N clustering results;
[0059] Wherein, M and N are both positive integers.
[0060] Specifically, the bird images are determined based on on-site images of various birds captured by existing bird feeders.
[0061] After obtaining live images of various birds taken by an existing bird feeder, the live images can be cropped by an image cropping model or device to obtain bird images that meet a preset size; wherein the setting of the preset size is helpful for processing the bird images in subsequent steps;
[0062] After determining the M bird images, feature extraction processing can be performed on the M bird images to obtain M image features that correspond one-to-one to the M bird images, and the data form of the image features is in vector form; clustering processing is performed on the M image features to obtain a clustering result N, that is, N clusters are obtained.
[0063] In actual implementation, the model used to perform feature extraction processing on M bird images can be implemented using ResNet-50 (Residual Network-50).
[0064] In practical applications, the clustering method used for clustering the M image features is DBSCAN (Density-Based Spatial Clustering of Applications with Noise). S120: Divide the multiple bird images into multiple image sets according to the clustering results.
[0065] Specifically, after determining the clustering results of the image features, multiple bird images can be divided into multiple image sets corresponding to the clustering results according to the clustering results. For example, if the clustering result is 5, the multiple bird images are divided into 5 image sets accordingly. The bird images included in each image set correspond to the image features included in one of the 5 clusters obtained by clustering.
[0066] In one implementation, S120 includes: Step (2) to Step (3), the details of which are as follows:
[0067] Step (2): Divide the M bird images into N first image sets according to the clustering result N.
[0068] Specifically, after N clusters are obtained through clustering processing, multiple bird images corresponding to multiple image features included in each cluster are combined into a first image set, and finally N first image sets are obtained.
[0069] Step (3): construct N pseudo labels for the N first image sets;
[0070] Among them, there is a one-to-one correspondence between the N first image sets and the N pseudo labels; the pseudo labels are reference labels used to annotate the bird images in the first image set, and the pseudo labels do not indicate the names of the birds corresponding to the bird images in the first image set.
[0071] Specifically, for example, the set of pseudo-labels may be {1, ..., N}, where "1" and "N" are used as pseudo-labels for bird images in different first image sets. However, common sense tells us that "1" and "N" are not bird names, nor can they indicate the bird names of birds in bird images. They can only be used to distinguish different first image sets.
[0072] Step (4): Perform the first stage of training on the bird recognition model using N first image sets and N pseudo labels to obtain a basic recognition model.
[0073] Specifically, during the training process, the bird images in the N first image sets are shuffled, and each bird image is input into the bird recognition model as a sample and a corresponding pseudo label.
[0074] The bird recognition model is the basic neural network model selected for training. In practical applications, ResNet-50 (Residual Network-50) can be used as the basic neural network model; in an embodiment of the present application, the loss function used in the training process of ResNet-50 is the cross entropy loss function.
[0075] In an embodiment of the present application, the training of the bird recognition model includes two stages. The first stage is to train the bird recognition model into a basic recognition model, and the second stage is to train the basic recognition model into an enhanced recognition model. The enhanced recognition model is a model that can be used to provide bird recognition results for the smart bird feeder. Among them, the training purpose of the first stage is to enable the basic recognition model to have the ability to distinguish bird images corresponding to different pseudo-labels.
[0076] Step (5): performing recognition and classification on the M bird images using the basic recognition model and dividing the M bird images into N second image sets according to the recognition and classification results;
[0077] Among them, different second image sets correspond to different recognition and classification results.
[0078] Specifically, after determining the basic recognition model, M bird images can be recognized through the basic recognition model, so that the M bird images have recognition and classification results corresponding to different pseudo labels; according to different recognition and classification results, the M bird images are divided into N second image sets.
[0079] S120: Determine the bird name with the greatest feature similarity between the multiple bird names included in the bird name set and the multiple bird images included in each image set as the label of all the bird images in the corresponding image set;
[0080] Among them, the feature similarity indicates the similarity between the text features of the bird name and the image features of the bird image features.
[0081] Specifically, after M bird images are divided into N second image sets according to the recognition and classification results of the basic recognition model, the accuracy of the bird images included in the second image set being the same bird (assuming that the bird is bird A) will be improved compared to the first image set. At this time, it can be considered that the image features of the bird images included in the second image set can represent the image features that the bird images of bird A should have. Therefore, the feature similarity of the image features of the bird images included in the second set and the text features of the bird names can be determined.
[0082] In one implementation, S120 includes: Step (6) to Step (10), the details of which are as follows:
[0083] Step (6): Combine each of the N second image sets with the bird name set as input data to obtain N groups of input data.
[0084] Specifically, when confirming the feature similarity between the image features of the bird images and the text features of the bird names in the N second image sets, it is performed one by one using the second image sets as units.
[0085] Step (7): Input N groups of input data into the Bioclip model respectively, and determine the p included in the second image set in each group of input data through the Bioclip model. n The image features corresponding to the q bird images and the text features corresponding to the q bird names included in the bird name set.
[0086] Specifically, Figure 2 As shown, Figure 2 A logical schematic diagram of determining image features and text features corresponding to input data through a Bioclip model provided in an embodiment of the present application, when the nth group of input data is input into the Bioclip model, the Bioclip model determines the p corresponding to the nth second image set included in the image encodern The Bioclip model determines the image features of the q bird images through the text encoder, and the text features corresponding to the q bird names included in the bird name set.
[0087] Step (8): According to the image features and text features, determine the p corresponding to the second image set in each set of input data n The feature similarity between the image features and the q text features corresponding to the bird name set is obtained for each set of input data (p n ×q) feature similarities.
[0088] Specifically, the image features and text features corresponding to each set of input data can be confirmed by the Bioclip model, and then the corresponding (p n ×q) feature similarities.
[0089] Step (9): According to the corresponding (p n ×q) feature similarities, and divide each set of input data into those with at least p n The name of the bird with the largest feature similarity among the bird images is determined as p n labels for bird images;
[0090] Among them, p n 'According to p n The quantity threshold, p n ≥p n '.
[0091] Specifically, according to the corresponding (p n ×q) feature similarities, it is necessary to compare the feature similarities corresponding to at least p n The text feature with the largest feature similarity between the image features of the bird images is determined, and the bird name corresponding to the text feature is the label corresponding to all the bird images in the second image set.
[0092] p n The setting of ' can ensure the accuracy of label determination. For example, if a second image set includes 200 bird images (i.e., p n 200), now among the 200 bird images, 50 bird images have the largest feature similarity with a certain text feature, but the number of 50 images is obviously less than 150 (i.e., p n ' is 150), indicating that the bird images included in the second image set include multiple bird species, so S110 and subsequent steps should be repeatedly executed;
[0093] pn The number of ' can be determined according to actual needs, and this application does not make any specific limitation on this.
[0094] Step (10): The p included in each of the N second image sets is n The feature similarity between the bird images and the corresponding labels is less than the similarity threshold r n Bird images are discarded to obtain N third image sets.
[0095] Specifically, in addition to being used to determine the label of the second image set, feature similarity can also be used to remove noise images in the second image set; wherein, bird images with significantly smaller feature similarity in the second image set can be discarded to obtain the corresponding third image set, because the smaller feature similarity indicates that the bird image does not belong to the same species as other birds in the second image set.
[0096] r n The number can be determined according to actual needs, and this application does not make any specific limitation on this.
[0097] It should be emphasized that in the embodiments of the present application, multiple image sets appear, such as Figure 3 As shown, Figure 3 A logical schematic diagram for determining an image set provided in an embodiment of the present application, wherein the first image set is obtained by clustering M bird images, the second image set is determined by recognition and classification results of the M bird images based on a basic recognition model, and the third image set is obtained by discarding some bird images in the second image set based on feature similarity, wherein the feature similarity is determined based on image features and text features determined by the Bioclip model.
[0098] S130: Training a bird recognition model using multiple bird images and corresponding labels.
[0099] Specifically, after the above steps, the label of each third image set has been determined, that is, the labels of all bird images included in each third image set have been determined.
[0100] In one implementation, S130 includes: step (11), the details of which are as follows:
[0101] Step (11): Perform the second stage of training on the basic recognition model according to the N third image sets and the corresponding labels to obtain an enhanced recognition model.
[0102] Specifically, the N third image sets are split separately, and the bird images included in the N third image sets exist in the form of single images; each bird image is used as a training sample, and the training sample and the corresponding label are input into the basic recognition model for performing the second stage of training on the basic recognition model to obtain an enhanced recognition model.
[0103] In a second aspect, the present application provides a training device for a bird recognition model, such as Figure 4 As shown, Figure 4 A schematic diagram of the structure of a training device for a bird recognition model provided in an embodiment of the present application, wherein the method comprises: a clustering module 310, an image set determination module, a label determination module 330 and a training module 340;
[0104] A clustering module 310, for performing clustering processing on the image features of multiple bird images to obtain clustering results;
[0105] An image set determination module 320, for dividing the plurality of bird images into a plurality of image sets according to the clustering result;
[0106] The label determination module 330 is used to determine the bird name with the greatest feature similarity between the multiple bird names included in the bird name set and the multiple bird images included in each image set as the label of all the bird images in the corresponding image set;
[0107] Among them, the feature similarity indicates the similarity between the text features of the bird name and the image features of the bird image features;
[0108] The training module 340 is used to train the bird recognition model using a plurality of bird images and corresponding labels.
[0109] In one implementation, the image set determination module 320 is further configured to divide the M bird images into N first image sets according to the clustering result N;
[0110] The image set determination module 320 is also used to construct N pseudo-labels for the N first image sets; wherein there is a one-to-one correspondence between the N first image sets and the N pseudo-labels; the pseudo-labels are reference labels used to annotate the bird images in the first image set, and the pseudo-labels do not indicate the names of the birds corresponding to the bird images in the first image set.
[0111] In one implementation, the clustering module 310 is further used to perform a first-stage training on the bird recognition model using the N first image sets and the N pseudo labels to obtain a basic recognition model;
[0112] The image set determination module 320 is further configured to perform recognition and classification on the M bird images through a basic recognition model and divide the M bird images into N second image sets according to the recognition and classification results;
[0113] Among them, different second image sets correspond to different recognition and classification results.
[0114] In one implementation, the label determination module 330 is further configured to combine each second image set in the N second image sets with a bird name set as input data to obtain N sets of input data;
[0115] The label determination module 330 is further used to input the N groups of input data into the Bioclip model respectively, and determine the p included in the second image set in each group of input data through the Bioclip model. n The image features corresponding to the q bird images and the text features corresponding to the q bird names included in the bird name set;
[0116] The label determination module 330 is further used to determine the p corresponding to the second image set in each set of input data according to the image features and the text features. n The feature similarity between the image features and the q text features corresponding to the bird name set is obtained for each set of input data (p n ×q) feature similarities;
[0117] The label determination module 330 is further configured to determine the label of each group of input data according to the (p n ×q) feature similarities, and divide each set of input data into those with at least p n The name of the bird with the largest feature similarity among the bird images is determined as p n The labels of bird images; where p n 'According to p n The quantity threshold, p n ≥p n '.
[0118] In one implementation, the image set determination module 320 is further configured to: n The feature similarity between the bird images and the corresponding labels is less than the similarity threshold r n Bird images are discarded to obtain N third image sets.
[0119] In one implementation, the training module 340 is further configured to perform a second stage of training on the basic recognition model according to the N third image sets and corresponding labels to obtain an enhanced recognition model.
[0120] Third, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, steps S110 to S140 provided in the above embodiment are implemented.
[0121] Fourth, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, steps S110 to S140 of the above embodiment are executed.
[0122] Fifth, the computer program product provided in the present application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method in the previous method embodiment. The specific implementation can refer to steps S110 to S140 of the method embodiment, which will not be repeated here.
[0123] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0124] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0125] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0126] It should be noted that if the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM) random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0127] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0128] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for training a bird recognition model, characterized in that: The method comprises: Clustering is performed on the image features of multiple bird images to obtain clustering results; Dividing the plurality of bird images into a plurality of image sets according to the clustering result; Determine the bird name with the greatest feature similarity between the multiple bird names included in the bird name set and the multiple bird images included in each of the image sets as the label of all the bird images in the corresponding image set; Wherein, the feature similarity indicates the similarity between the text feature of the bird name and the image feature of the bird image feature; The bird recognition model is trained using a plurality of the bird images and the corresponding labels.
2. The method according to claim 1, characterized in that: The step of dividing the plurality of bird images into a plurality of image sets according to the clustering result comprises: Dividing the M bird images into N first image sets according to the clustering result N; Wherein, M and N are both positive integers; Constructing N pseudo labels for N sets of the first images; Among them, there is a one-to-one correspondence between the N first image sets and the N pseudo labels; the pseudo labels are reference labels used to annotate the bird images in the first image set, and the pseudo labels do not indicate the names of the birds corresponding to the bird images in the first image set.
3. The method according to claim 2, characterized in that After constructing N pseudo labels for the N first image sets, the method further includes: Performing a first-stage training on the bird recognition model using the N first image sets and the N pseudo labels to obtain a basic recognition model; Performing recognition and classification on the M bird images by using the basic recognition model and dividing the M bird images into N second image sets according to the recognition and classification results; Among them, different second image sets correspond to different recognition and classification results.
4. The method according to claim 3, characterized in that The step of determining the bird name having the greatest feature similarity with the multiple bird images included in each of the image sets as the label of all the bird images in the corresponding image set includes: Combining each of the N second image sets with the bird name set as input data to obtain N groups of input data; Inputting N groups of input data into the Bioclip model respectively, and determining the p included in the second image set in each group of input data by the Bioclip model n image features corresponding to the q bird images and text features corresponding to the q bird names included in the bird name set; Determine the p corresponding to the second image set in each group of the input data according to the image features and the text features. n The feature similarity between the image features and the q text features corresponding to the bird name set is obtained corresponding to each group of the input data (p n ×q) similarities of the features; According to the (p n ×q) feature similarities, and the similarities between each group of input data and at least p n The bird name with the largest feature similarity among the bird images is determined as p n said labels for said bird images; Among them, p n 'According to p n The quantity threshold, p n ≥p n '.
5. The method according to claim 4, characterized in that The step of combining each set of the input data with at least p n The bird name with the largest feature similarity among the bird images is determined as p n After the label of the bird image, the method further comprises: The p included in each of the N second image sets n The feature similarity between the bird images and the corresponding label is less than the similarity threshold r n The bird images are discarded to obtain N third image sets.
6. The method according to claim 5, characterized in that The step of training a bird recognition model using a plurality of bird images and corresponding labels includes: The second stage of training is performed on the basic recognition model according to the N third image sets and the corresponding labels to obtain an enhanced recognition model.
7. A training device for a bird identification model, characterized in that: The device comprises: a clustering module, an image set determination module, a label determination module and a training module; The clustering module is used to perform clustering processing on the image features of multiple bird images to obtain clustering results; The image set determination module is used to divide the plurality of bird images into a plurality of image sets according to the clustering result; The label determination module is used to determine the bird name with the greatest feature similarity between the multiple bird names included in the bird name set and the multiple bird images included in each image set as the label of all the bird images in the corresponding image set; Wherein, the feature similarity indicates the similarity between the text feature of the bird name and the image feature of the bird image feature; The training module is used to train a bird recognition model using a plurality of the bird images and the corresponding labels.
8. An electronic device, characterized in that: The electronic device includes a processor and a memory, the memory is used to store a software program, and the processor runs or executes the software program stored in the memory so that the electronic device implements the bird recognition model training method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes executed by a processor, wherein the program codes include a training method for implementing the bird recognition model according to any one of claims 1 to 6.
10. A computer program product, characterized in that The computer program product comprises program codes, and when a computer runs the computer program product, the computer executes the bird recognition model training method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Entity marking model training method and device and electronic equipment
CN113971183A
Unsupervised pedestrian re-identification method
CN114299543A
Animal identification method and device, equipment, storage medium and program product
CN114818971A
Model training method, object re-identification method, device, equipment and medium
CN114821243A
Object recognition model training method, object recognition method and electronic equipment
CN115393673A
