A bird identification model training method, a bird identification method, a device and equipment
By identifying and tracking bird video samples, difficult samples were selected to train the initial model, which solved the problem of low recognition rate of existing bird recognition models and achieved a higher recognition accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BIRDS DATA
- Filing Date
- 2023-05-26
- Publication Date
- 2026-04-28
AI Technical Summary
The bird recognition models trained by existing technologies have a low recognition rate for bird images with less obvious features.
By acquiring bird video samples, target recognition and tracking are performed, target bird image frames are selected, and the initial model is trained based on these image frames to form a more comprehensive training set, thereby improving the model's recognition accuracy.
It improves the accuracy of bird recognition models in recognizing various bird images, especially in the recognition of bird images with less obvious features.
Smart Images

Figure CN116612498B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer science, and in particular relates to a method for training a bird recognition model, a bird recognition method, a device, and equipment. Background Technology
[0002] In order to study the survival and migration of bird species and take corresponding measures to protect endangered species, a large number of cameras will be set up in protected areas to obtain bird images. Bird identification models will be used to identify bird species from the images.
[0003] In the process of training the bird recognition model, bird image data is collected and manually labeled as training samples. This allows the bird recognition model to learn some important bird features from the existing data, including but not limited to outline, posture, key features, etc. Then, a classifier analyzes the image features to determine the specific species of bird.
[0004] However, existing bird recognition models trained with existing technologies do not have a high recognition rate for bird images with less obvious features. Summary of the Invention
[0005] The purpose of this application is to provide a method for training a bird recognition model, which aims to solve the problem that the bird recognition model trained by the prior art has a low recognition accuracy.
[0006] This application embodiment is implemented as follows: a method for training a bird recognition model, the method comprising:
[0007] Obtain bird video samples;
[0008] Target recognition and target tracking are performed on the bird video samples to obtain the bird recognition results and bird movement trajectories corresponding to each image frame in the bird video samples.
[0009] Based on the bird identification results and bird movement trajectories, target bird image frames are selected from the bird video samples;
[0010] The bird recognition model is obtained by training a preset initial model based on the target bird image frames.
[0011] Another objective of this application is a bird identification method, comprising:
[0012] Acquire images of the birds to be identified;
[0013] The bird identification result is determined based on the image of the bird to be identified and the bird identification model trained according to the above-described bird identification model training method.
[0014] Another objective of this application is to provide a bird recognition model training device, comprising:
[0015] The bird video sample acquisition unit is used to acquire bird video samples.
[0016] The target recognition and target tracking unit is used to perform target recognition and target tracking on the bird video samples to obtain the bird recognition results and bird movement trajectories corresponding to each image frame in the bird video samples.
[0017] A target bird image frame filtering unit is configured to filter target bird image frames from the bird video samples based on the bird identification results and bird movement trajectories; and,
[0018] The initial model training unit is used to train a preset initial model based on the target bird image frame to obtain a bird recognition model.
[0019] Another objective of this application is to provide a terminal device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the above-described bird recognition model training method.
[0020] Another objective of this application is to provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described bird recognition model training method.
[0021] This application acquires bird video samples, performs target recognition and tracking on the bird video samples, obtains the recognition results and movement trajectories of each bird, and selects difficult samples, i.e., target bird image frames, from the bird video samples based on the recognition results and movement trajectories. The difficult samples are added to the training set of the initial model, so that the training set includes images of various types of birds. The initial model is trained based on this training set, so that the trained bird recognition model can effectively recognize images of various types of birds, thereby improving the recognition accuracy of the bird recognition model. Attached Figure Description
[0022] Figure 1 This application provides an illustration of the application environment for a bird recognition model training method according to an embodiment of this application.
[0023] Figure 2 A flowchart illustrating a bird recognition model training method provided in this application embodiment;
[0024] Figure 3 A flowchart illustrating a bird identification and bird tracking method provided in this application embodiment;
[0025] Figure 4 A flowchart illustrating a bird tracking method provided in this application embodiment;
[0026] Figure 5 A flowchart illustrating a method for determining a target bird image frame provided in an embodiment of this application;
[0027] Figure 6 A flowchart illustrating a method for determining the correct identification result of bird movement trajectories provided in this application embodiment;
[0028] Figure 7 A flowchart illustrating another method for determining target bird image frames provided in this application embodiment;
[0029] Figure 8 This is a structural block diagram of the bird recognition model training device provided in the embodiments of this application;
[0030] Figure 9 This is a block diagram of the internal structure of a terminal device in one embodiment. Implementation
[0031] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0032] It is understood that the terms "first," "second," etc., used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are used only to distinguish one element from another. For example, without departing from the scope of this application, a first script may be referred to as a second script, and similarly, a second script may be referred to as a first script.
[0033] Before introducing the technical solution of this application, let's first introduce some related concepts:
[0034] Positive samples: Samples that correspond to the category we want to correctly classify. For example, if we need to classify an image to determine whether it belongs to a bird, then during training, images of birds are positive samples.
[0035] Negative samples: Based on the example above, not all other pictures of birds are negative samples.
[0036] Difficult-to-classify positive samples: Positive samples that are easily mistaken for negative samples, or positive samples that suffer the highest loss during training.
[0037] Difficult-to-classify negative samples: Negative samples that are easily mistaken for positive samples, or negative samples that suffer the highest loss during training.
[0038] Difficult samples: Difficult samples to distinguish positive samples and difficult samples to distinguish negative samples are collectively referred to as difficult samples.
[0039] Figure 1 An application environment diagram for the bird recognition model training method provided in the embodiments of this application is shown, such as... Figure 1 As shown, this application environment includes a terminal 110 and a computer device 120.
[0040] Computer device 120 can be an independent physical server or terminal, or a server cluster consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud servers, cloud databases, cloud storage, and CDN.
[0041] Terminal 110 may be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. Terminal 110 and computer device 120 can be connected via a network, which is not limited herein.
[0042] In one embodiment, such as Figure 2 The above describes a method for training a bird recognition model. This embodiment mainly applies this method to the above-mentioned... Figure 1 The example of terminal 110 is provided. A method for training a bird recognition model includes:
[0043] Step S202: Obtain bird video samples.
[0044] The bird video samples can be video images acquired online in real time or offline video images. This application does not impose specific restrictions on the specific form and acquisition method of the bird video samples. As long as birds appear in the video images, they can be used as bird video samples in this application.
[0045] Step S204: Perform target recognition and target tracking on the bird video samples to obtain the bird recognition results and bird movement trajectories corresponding to each image frame in the bird video samples.
[0046] Target recognition can be achieved using algorithms such as R-CNN (Region with CNN Feature), Faster R-CNN, and YOLO (You Only Look Once), and this application does not impose specific limitations on these algorithms. Target tracking can be achieved using algorithms such as SORT (Simple Online and Realtime Tracking), DeepSORT, and KCF (Kernel Correlation Filter), and this application does not impose specific limitations on these algorithms. The bird recognition model used for target recognition can be an initial model to be optimized or another pre-trained bird recognition model, and this application does not impose specific limitations on this model.
[0047] Preferably, the bird recognition model used for target recognition is an initial model that will be optimized. After training the neural network based on existing data, the initial model is obtained. Then, the initial model is used to identify bird images in bird video samples to obtain difficult samples relative to the initial model. This makes the difficult samples more targeted and the optimization training based on the difficult samples has a better effect.
[0048] Step S206: Based on the bird identification results and bird movement trajectories, select target bird image frames from the bird video samples.
[0049] Since a bird's movement trajectory consists of multiple image frames, and each frame contains a bird image, there will be multiple bird identification results along the trajectory. The correct identification result is determined based on these multiple results, and the image frames whose identification results differ from the correct result are considered hard samples of that bird's movement trajectory—the target bird image frames—thus obtaining hard samples for a single bird species. Because multiple bird trajectories exist, and each trajectory corresponds to a different correct identification result, hard samples for multiple bird species can be obtained.
[0050] Step S208: Train the preset initial model based on the target bird image frame to obtain a bird recognition model.
[0051] After obtaining difficult samples for each bird species, these difficult samples are added to the training set of the initial model, making the training samples more comprehensive. The bird recognition model obtained based on these training samples can effectively recognize various bird images, thus improving the recognition accuracy of the bird recognition model.
[0052] In one embodiment, such as Figure 3 As shown, step S204 includes:
[0053] Step S302: Based on the preset bird detection model, perform bird detection on each image frame in the bird video sample to obtain the detection results for each bird.
[0054] The bird detection model is used to detect the presence of birds in the current image frame. This model can employ algorithms such as R-CNN (Region with CNN Feature), Faster R-CNN, and YOLO (You Only LookOnce). It's important to note that while the bird detection model performs detection on every frame of the bird video samples, it doesn't require a detection result in every frame. That is, some image frames may not contain birds, while multiple detection results may exist in a single frame, meaning multiple birds may be present in some image frames. When the bird detection model detects a bird in the current image frame, it generates a bounding box to enclose the identified bird and assigns a unique bounding box ID for use in subsequent steps.
[0055] Preferably, before step S302, the method includes: dividing the bird video sample into multiple video segments based on a preset segmentation duration. Since bird video samples can be very long, each algorithm model requires significant system resources to record intermediate results during processing. Therefore, according to the preset segmentation duration, the bird video sample is divided into multiple short videos. Before processing each short video, the various algorithm models used in the processing are initialized to reduce the system resources required during processing. The preset segmentation duration can be determined by those skilled in the art according to actual needs, and this application does not impose any limitations on it.
[0056] Step S304: Based on the preset initial model, target recognition is performed on the detection results of each bird to obtain the recognition results of each bird.
[0057] The preset initial model can be trained on a neural network model based on existing bird image data. After obtaining each detection result, the initial model is used to identify each detection result, i.e., each detection box, to obtain the identification result of each detection box, i.e., the bird species. Using the initial model to identify the detection boxes and obtain each identification result makes the difficult samples obtained in the subsequent process more targeted, thereby improving the optimization effect of the initial model based on the difficult samples.
[0058] Bird detection and bird recognition can be performed simultaneously, i.e., within the same frame; or they can be performed sequentially, i.e., first performing bird detection on bird video samples or segmented short videos to obtain multiple detection boxes, and then using a bird recognition model to sequentially recognize these detection boxes. This application does not restrict the specific order of bird detection and bird recognition. Preferably, bird detection and bird recognition are performed simultaneously on a single frame, i.e., first using a bird detection model to obtain detection boxes, then using a bird recognition model to determine the bird species corresponding to the detection boxes, and then performing the above process on the next frame, thereby improving the algorithm's processing efficiency.
[0059] Step S306: Perform target tracking on the bird video samples to obtain the movement trajectories of each bird, and assign the identification results of each bird to the corresponding bird movement trajectory.
[0060] When tracking bird video samples, the tracking can be performed using only the motion information of each bird, such as the SORT algorithm, or it can use both the motion and appearance information of each bird, such as the DeepSORT algorithm. This application does not impose any restrictions on how the tracking is implemented. Preferably, the tracking is performed based on both the motion and appearance information of each bird, resulting in more accurate tracking. Since the target tracking requires the use of detection boxes provided by the bird detection model, and the recognition results of the bird recognition model are also based on the detection boxes, the bird recognition results are already assigned to the respective bird movement trajectories when the target tracking algorithm establishes a connection between the detection boxes of consecutive frames to obtain the bird's movement trajectory.
[0061] In one embodiment, such as Figure 4 As shown, step S306 includes:
[0062] Step S402: Determine the appearance information of each bird recognition result based on the bird images corresponding to each bird recognition result.
[0063] Since bird identification results are based on detection boxes provided by the bird detection model, and target tracking is also based on detection boxes provided by the bird detection model, the bird image corresponding to the bird identification result—that is, the image within the detection box corresponding to the bird identification result—is also the source of target appearance information used in target tracking. By referring to the appearance information of the target being tracked during target tracking, the tracking results become more accurate.
[0064] Step S404: Determine the motion information of each bird identification result based on the temporal and positional information of each bird identification result in the bird video sample.
[0065] The temporal information of the bird identification result in the bird video sample is the frame number of the detection box corresponding to the bird identification result in the bird video sample / short video, and the positional information of the bird identification result in the bird video sample is the position of the detection box corresponding to the bird identification result in the corresponding image frame. Since the video acquisition device samples based on a certain frame rate, the time interval between consecutive frames in the obtained video image is consistent. Therefore, the motion information of the tracked target can be obtained based on the positional changes of the detection boxes between consecutive frames.
[0066] Step S406: Based on the appearance and movement information of each bird identification result, determine the movement trajectory of each bird, and assign each bird identification result to its corresponding movement trajectory.
[0067] In this process, since target tracking relies on bounding boxes provided by the bird detection model, and the bird recognition model's results are also based on these bounding boxes, the target tracking algorithm, while establishing connections between bounding boxes from consecutive frames to obtain bird trajectories, has already assigned each bird's recognition result to its respective trajectory. In addition to the target's motion information, the algorithm also considers the target's appearance information during target tracking, resulting in more accurate trajectories. This facilitates determining the correct recognition result for each trajectory and identifying difficult samples within each trajectory.
[0068] In one embodiment, such as Figure 5 As shown, step S206 includes:
[0069] Step S502: For each bird movement trajectory whose length exceeds a preset length threshold, determine the correct identification result of the bird movement trajectory based on the identification results of each bird on the bird movement trajectory.
[0070] The preset length threshold can be determined by those skilled in the art based on actual circumstances, and this application does not impose a specific limitation here. Since shorter bird movement trajectories correspond to fewer image frames, meaning fewer recognition results on the bird movement trajectory, it is difficult to guarantee that the bird species with the most recognition results are the correct recognition results for that bird movement trajectory. Therefore, shorter bird movement trajectories are deleted to ensure the accuracy of the bird species in the difficult samples. After the length of a bird movement trajectory exceeds the preset length threshold, the recognition results of each bird on that trajectory are statistically analyzed to obtain the bird species with the most occurrences. Once the bird species with the most occurrences exceeds the preset threshold or its proportion reaches a certain level, the bird species with the most occurrences is determined as the correct recognition result for that bird movement trajectory.
[0071] Step S504: Based on the correct identification results of the bird movement trajectory and the identification results of each bird on the bird movement trajectory, select the target bird image frame from the bird video sample.
[0072] After correctly identifying the bird's movement trajectory, the system filters out incorrect identification results along that trajectory. From the bird video sample, the corresponding image frames are selected as difficult samples, i.e., the target bird image frames. Since all identification results within the same bird's movement trajectory should be identical, and these results are bound to detection boxes, the bird species and detection box positions of the difficult samples can be determined after obtaining them—that is, the annotation information of the difficult samples. This achieves automatic identification and annotation without the need for manual identification and annotation by staff.
[0073] In one embodiment, such as Figure 6 As shown, step S502 includes:
[0074] S602: Based on the bird identification results on the bird movement trajectory, determine the candidate correct identification results of the bird movement trajectory.
[0075] In this process, the identification results of each bird on the bird's movement trajectory are statistically analyzed, and the bird identification result with the largest number is identified as the bird species with the largest number of identification results. This species is then identified as the candidate correct identification result for the bird's movement trajectory.
[0076] S604: When it is determined that the ratio of the number of candidate correct recognition results to the length of the bird's movement trajectory is greater than a preset ratio threshold, the candidate correct recognition results are determined as the correct recognition results of the bird's movement trajectory.
[0077] Specifically, when the ratio of the number of candidate correct identification results to the length of the bird's movement trajectory (i.e., the ratio of the number of bird species with the largest number to the total number of frames in the bird's movement trajectory) is greater than a preset ratio threshold, the bird species corresponding to the bird's movement trajectory is considered to be the bird species with the largest number. The aforementioned ratio threshold can be determined by those skilled in the art based on actual circumstances, and this application does not impose any restrictions here. After determining which bird species the bird's movement trajectory should belong to, it can be determined that each identification result on the trajectory should be a correct identification result for that bird's movement trajectory. If the identification result differs from the correct identification result of the bird's movement trajectory, it indicates that for the bird identification model, i.e., the preset initial model, the image frames with incorrect identification results belong to hard samples, thus enabling the filtering out of hard samples from the bird video sample. Since the correct identification result of the bird's movement trajectory is known, the correct bird species of the hard samples can also be known, thus enabling the automatic labeling of the bird species of the hard samples.
[0078] In one embodiment, such as Figure 7 As shown, step S504 includes:
[0079] S702: Based on the correct identification result of the bird movement trajectory and the identification results of each bird on the bird movement trajectory, select each candidate difficult identification result that is not a correct identification result from the bird movement trajectory.
[0080] After determining the correct identification result of the bird's movement trajectory, each detection box on the bird's movement trajectory that is not the correct identification result is a difficult sample of the preset initial model. However, since the difficult samples will be screened in subsequent steps to remove the difficult samples with high similarity, there will be no training samples with high similarity in the training set. Therefore, each difficult sample obtained in this step is determined as a candidate difficult identification result.
[0081] S704: For each candidate difficult identification result, when it is determined that the difference between the position information of the candidate difficult identification result in the corresponding bird image frame and the position information of the last difficult identification result of the bird's movement trajectory in the corresponding bird image frame is greater than a preset displacement threshold, the candidate difficult identification result is determined as the difficult identification result of the bird's movement trajectory, and the bird image frame corresponding to the candidate difficult identification result is determined as the target bird image frame.
[0082] The system includes the position information of candidate difficult identification results within the corresponding bird image frame, i.e., the position of the detection box of the candidate identification result within the corresponding bird image frame. Similarly, it includes the position information of the last difficult identification result of the bird's movement trajectory within the corresponding bird image frame, i.e., the position of the detection box of the last difficult identification result within the corresponding bird image frame. When the displacement between the detection box of the candidate difficult identification result and the detection box of the last difficult identification result exceeds a preset displacement threshold, the candidate difficult identification result is determined as a difficult identification result, and the corresponding bird image frame is determined as the target bird image frame, which is the difficult sample to be added to the training set of the initial model. By comparing the detection box positions of the candidate difficult identification results and the last difficult identification result, the candidate difficult identification results are quickly filtered, and those with high similarity are removed, resulting in a lower similarity among the difficult samples. Furthermore, since the correct identification result of the bird's movement trajectory corresponding to the difficult sample is known, the bird species of the difficult sample can also be determined, thus enabling automatic annotation of the difficult sample, eliminating the need for manual annotation by staff, reducing their workload, and improving efficiency.
[0083] In one embodiment, a bird identification method is applied to... Figure 1 In terminal 110, the method includes:
[0084] Acquire images of the birds to be identified;
[0085] The bird identification result is determined based on the image of the bird to be identified and the bird identification model trained according to the above-described bird identification model training method.
[0086] Among them, the bird recognition model trained on difficult samples can effectively recognize various bird images and improve the recognition accuracy.
[0087] In one embodiment, such as Figure 8 As shown, a bird recognition model training device 8000 includes:
[0088] The bird video sample acquisition unit 8010 is used to acquire bird video samples;
[0089] The target recognition and target tracking unit 8020 is used to perform target recognition and target tracking on the bird video sample, and obtain the bird recognition result and bird movement trajectory corresponding to each image frame in the bird video sample.
[0090] The target bird image frame filtering unit 8030 is used to filter target bird image frames from the bird video samples based on the bird recognition results and bird movement trajectories; and,
[0091] The initial model training unit 8040 is used to train a preset initial model based on the target bird image frame to obtain a bird recognition model.
[0092] The specific execution steps of each unit in the device can be referred to the above embodiment, and will not be repeated here.
[0093] In one embodiment, such as Figure 9 As shown, a terminal device is proposed, the terminal 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 perform the following steps:
[0094] Obtain bird video samples;
[0095] Target recognition and target tracking are performed on the bird video samples to obtain the bird recognition results and bird movement trajectories corresponding to each image frame in the bird video samples.
[0096] Based on the bird identification results and bird movement trajectories, target bird image frames are selected from the bird video samples;
[0097] The bird recognition model is obtained by training a preset initial model based on the target bird image frames.
[0098] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, causes the processor to perform the following steps:
[0099] Obtain bird video samples;
[0100] Target recognition and target tracking are performed on the bird video samples to obtain the bird recognition results and bird movement trajectories corresponding to each image frame in the bird video samples.
[0101] Based on the bird identification results and bird movement trajectories, target bird image frames are selected from the bird video samples;
[0102] The bird recognition model is obtained by training a preset initial model based on the target bird image frames.
[0103] It should be understood that although the steps in the flowcharts of the various embodiments of this application are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in each embodiment may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0104] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0105] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0106] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. 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 protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
[0107] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for training a bird recognition model, characterized in that, The method includes: Obtain bird video samples; Target recognition and target tracking are performed on the bird video samples to obtain the bird recognition results and bird movement trajectories corresponding to each image frame in the bird video samples. Based on the bird identification results and bird movement trajectories, target bird image frames are selected from the bird video samples; The bird recognition model is trained based on the target bird image frames to obtain a bird recognition model. The step of selecting target bird image frames from the bird video samples based on the bird identification results and bird movement trajectories includes: For each bird movement trajectory whose length exceeds a preset length threshold, the correct identification result of the bird movement trajectory is determined based on the identification results of each bird on the bird movement trajectory; Based on the correct identification results of the bird movement trajectory and the identification results of each bird on the bird movement trajectory, the target bird image frames are selected from the bird video samples; The step of determining the correct identification result of the bird movement trajectory based on the identification results of each bird on the bird movement trajectory includes: Based on the bird identification results on the bird movement trajectory, candidate correct identification results for the bird movement trajectory are determined; When the ratio of the number of candidate correct recognition results to the length of the bird's movement trajectory is greater than a preset ratio threshold, the candidate correct recognition results are determined as the correct recognition results of the bird's movement trajectory. The step of selecting target bird image frames from the bird video samples based on the correct identification results of the bird movement trajectory and the identification results of each bird on the bird movement trajectory includes: Based on the correct identification results of the bird movement trajectory and the identification results of each bird on the bird movement trajectory, candidate difficult identification results that are not correct identification results are filtered out from the bird movement trajectory; For each candidate difficult identification result, when the difference between the position information of the candidate difficult identification result in the corresponding bird image frame and the position information of the last difficult identification result of the bird's movement trajectory in the corresponding bird image frame is greater than a preset displacement threshold, the candidate difficult identification result is determined as the difficult identification result of the bird's movement trajectory, and the bird image frame corresponding to the candidate difficult identification result is determined as the target bird image frame.
2. The bird recognition model training method according to claim 1, characterized in that, The step of performing target recognition and target tracking on the bird video samples to obtain the bird recognition results and bird movement trajectories corresponding to each image frame in the bird video samples includes: Based on a pre-set bird detection model, bird detection is performed on each image frame in the bird video sample to obtain the detection results for each bird. Based on the preset initial model, target recognition is performed on the detection results of each bird to obtain the recognition results of each bird; The bird video samples are tracked to obtain the movement trajectories of each bird, and the identification results of each bird are assigned to their respective movement trajectories.
3. The bird recognition model training method according to claim 2, characterized in that, The step of tracking the bird video samples to obtain the movement trajectories of each bird, and assigning the bird identification results to their respective movement trajectories, includes: Based on the bird images corresponding to each bird recognition result, determine the appearance information of each bird recognition result; Based on the temporal and positional information of each bird identification result in the bird video sample, the motion information of each bird identification result is determined; Based on the appearance and movement information of each bird identification result, the movement trajectory of each bird is determined, and each bird identification result is assigned to its corresponding movement trajectory.
4. A method for bird identification, characterized in that, include: Acquire images of the birds to be identified; The bird identification result is determined based on the image of the bird to be identified and the bird identification model trained according to any one of claims 1 to 3.
5. A bird recognition model training device, characterized in that, include: The bird video sample acquisition unit is used to acquire bird video samples. The target recognition and target tracking unit is used to perform target recognition and target tracking on the bird video samples to obtain the bird recognition results and bird movement trajectories corresponding to each image frame in the bird video samples. The target bird image frame filtering unit is used to filter out target bird image frames from the bird video samples based on the bird recognition results and bird movement trajectories. as well as, An initial model training unit is used to train a preset initial model based on the target bird image frame to obtain a bird recognition model; The step of selecting target bird image frames from the bird video samples based on the bird identification results and bird movement trajectories includes: For each bird movement trajectory whose length exceeds a preset length threshold, the correct identification result of the bird movement trajectory is determined based on the identification results of each bird on the bird movement trajectory; Based on the correct identification results of the bird movement trajectory and the identification results of each bird on the bird movement trajectory, the target bird image frames are selected from the bird video samples; The step of determining the correct identification result of the bird movement trajectory based on the identification results of each bird on the bird movement trajectory includes: Based on the bird identification results on the bird movement trajectory, candidate correct identification results for the bird movement trajectory are determined; When the ratio of the number of candidate correct recognition results to the length of the bird's movement trajectory is greater than a preset ratio threshold, the candidate correct recognition results are determined as the correct recognition results of the bird's movement trajectory. The step of selecting target bird image frames from the bird video samples based on the correct identification results of the bird movement trajectory and the identification results of each bird on the bird movement trajectory includes: Based on the correct identification results of the bird movement trajectory and the identification results of each bird on the bird movement trajectory, candidate difficult identification results that are not correct identification results are filtered out from the bird movement trajectory; For each candidate difficult identification result, when the difference between the position information of the candidate difficult identification result in the corresponding bird image frame and the position information of the last difficult identification result of the bird's movement trajectory in the corresponding bird image frame is greater than a preset displacement threshold, the candidate difficult identification result is determined as the difficult identification result of the bird's movement trajectory, and the bird image frame corresponding to the candidate difficult identification result is determined as the target bird image frame.
6. A terminal device, characterized in that it includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform the steps of a bird recognition model training method as described in any one of claims 1 to 3.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of a bird recognition model training method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Bird detection, identification and tracking method and device in beach monitoring
CN109033975A
Bird identification method and device, computer equipment and storage medium
CN111709421A