Automatic construction method of target detection dataset and related equipment
By using the target search tracking model to automatically label the images of preset videos, the problem of low efficiency in building object detection data sets is solved, and an efficient data set construction process is realized.
Patent Information
- Application Number
- CN202410154483.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-02
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-02-02
AI Technical Summary
The construction efficiency of object detection data sets is too low, mainly because the targets in each image need to be manually labeled.
By obtaining multiple images arranged in the timing of the preset video and their corresponding position information, the target search tracking model is used to automatically mark the position information of the target to be detected, and a target detection data set is constructed.
The automatic construction of object detection data sets is realized, which significantly improves the efficiency of data set construction and reduces the dependence of manual annotation.
Smart Images

Figure CN117975198B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method for automatically constructing a target detection data set and related equipment. Background Art
[0002] Currently, in the process of constructing target detection datasets, it is necessary to manually annotate the targets in each image, obtain the information of the targets in the image, and then construct a dataset based on the image and the target information.
[0003] However, based on the above-mentioned method of manually marking targets in images, the efficiency of constructing target detection datasets is too low. Summary of the invention
[0004] The main purpose of this application is to provide a method for automatically constructing a target detection dataset and related equipment, aiming to solve the technical problem of low efficiency in constructing target detection datasets.
[0005] To achieve the above objectives, the present application provides a method for constructing a target detection dataset, which comprises the following steps:
[0006] Acquire multiple images arranged in a time sequence corresponding to a preset video, and first position information of a first sub-image corresponding to a first image in the time sequence, wherein the target to be detected is located in the first sub-image;
[0007] Based on the first image and the first position information, searching and tracking other images except the first image through a target search and tracking model to obtain target position information of the target to be detected in the other images, wherein the target search and tracking model is used to characterize the association relationship between the first sub-image and the target position information of the target to be detected in the other images;
[0008] A first data set is constructed based on each of the images and the corresponding target position information.
[0009] Optionally, the step of searching and tracking other images except the first image through a target search and tracking model based on the first image and the first position information to obtain the target position information of the target to be detected in the other images includes:
[0010] Acquire a second sub-image of a previous image corresponding to the current image, wherein the previous image includes the first image, and the second sub-image is determined based on corresponding position information of the target to be detected in the previous image;
[0011] Based on the second sub-image and the position information of the target to be detected in the corresponding previous image, searching and tracking the current image through the target search and tracking model to obtain the second position information of the target to be detected in the current image;
[0012] Return to the step of obtaining the second sub-image of the previous image corresponding to the current image, until the target position information corresponding to the multiple images is obtained.
[0013] Optionally, the step of obtaining a plurality of images arranged in a time sequence corresponding to a preset video, and first position information of a first sub-image corresponding to a first image in the time sequence, includes:
[0014] Obtain multiple images arranged in time sequence corresponding to a preset video;
[0015] Based on a preset target detection model, target detection is performed on the first image in the time sequence to obtain preset position information of the target to be detected in the first image, wherein the preset target detection model is obtained by iterative training based on a preset data set;
[0016] Based on the preset position information, the first sub-image is determined.
[0017] Optionally, after the step of searching and tracking the current image based on the second sub-image and the position information of the target to be detected in the corresponding previous image through a target search and tracking model to obtain the second position information of the target to be detected in the current image, the step further includes:
[0018] Based on the second position information and the corresponding position information of the target to be detected in the preset image before the current image, updating the displacement change rate of the target to be detected;
[0019] Based on the displacement change rate, the model parameters of the target search and tracking model are updated, so as to perform target search and tracking processing on the next image corresponding to the current image based on the updated target search and tracking model.
[0020] Optionally, before the step of acquiring a plurality of images arranged in time sequence corresponding to a preset video, the method further includes:
[0021] Acquire a continuous image data set, a target sub-image of each image in the image data set, and third position information corresponding to the target sub-image;
[0022] Based on the continuous image data set, the target sub-image and the third position information, the search and tracking model to be trained is iteratively trained to obtain a target search and tracking model.
[0023] Optionally, the step of constructing a first data set based on each of the images and the corresponding target position information includes:
[0024] Based on a preset extraction method, extracting images that meet a preset similarity condition from the multiple images;
[0025] A first data set is constructed based on the images that meet the preset similarity condition and information corresponding to the images that meet the preset similarity condition, wherein the information corresponding to the images that meet the preset similarity condition includes preset position information and / or target position information.
[0026] Optionally, after the step of constructing the first data set based on each of the images and the corresponding target position information, the step further includes:
[0027] Based on the first data set, iteratively train the preset model to be trained to obtain a first object detection model;
[0028] Predicting the first data set by using the first target detection model to obtain a first detection result;
[0029] Determine a second detection result in the first detection result that is inconsistent with the information corresponding to the target to be detected, so that the user can correct the image corresponding to the second detection result to obtain a correct third detection result;
[0030] Based on the image corresponding to the third detection result, updating the first data set;
[0031] Return to the step of iteratively training the preset model to be trained based on the first data set to obtain a first target detection model, until the proportion of the second detection result in the first detection result is lower than a preset first ratio threshold, to obtain a second data set.
[0032] Optionally, the step of returning to the step of iteratively training a preset model to be trained based on the first data set to obtain a first target detection model, until the proportion of the second detection result in the first detection result is lower than a preset first proportion threshold, and after the step of obtaining the second data set, further includes:
[0033] Acquire the image to be detected collected in a real scene;
[0034] Based on the second target detection model, predict the image to be detected to obtain a fourth detection result, wherein the fourth detection result includes a target detection box and a confidence level thereof, wherein the second target detection model is obtained by training based on the second data set;
[0035] The images to be detected whose confidence levels of the target detection boxes meet preset conditions are added to the second data set to obtain a third data set.
[0036] Optionally, the step of adding the to-be-detected image whose confidence of the target detection box meets a preset condition to the second data set includes at least one of the following:
[0037] Displaying to the user a first image corresponding to a target detection frame having a confidence level lower than a first threshold and higher than a second threshold, so that the user can select from the first image a second image in which the target detection frame contains the target to be detected based on the type of the target in the target detection frame, remove the target detection frame corresponding to the wrong type in the second image, correct or add the real target to be detected, obtain a third image, and add the third image to the second data set;
[0038] The fourth image corresponding to the target detection frame having a confidence level higher than the first threshold is displayed to the user, so that the user can remove the target detection frame corresponding to the wrong type in the fourth image, correct or add the real target to be detected, obtain the fifth image, and add the fifth image to the second data set.
[0039] Optionally, after the step of adding the to-be-detected image whose confidence of the target detection box meets a preset condition to the second data set to obtain the third data set, the step further includes:
[0040] Based on the third data set, iteratively train the preset model to be trained to obtain a new second target detection model, and predict the image to be detected based on the new second target detection model to obtain a new fourth detection result;
[0041] Return to the step of acquiring the image to be detected captured in the real scene, until the ratio of the number of images corresponding to the wrong type of targets in the second image to the number of the second images is lower than a preset second ratio threshold, and the ratio of the number of images corresponding to the wrong type of targets in the fourth image to the number of the fourth images is lower than a preset third ratio threshold.
[0042] Optionally, the step of constructing a first data set based on each of the images and the corresponding target position information includes:
[0043] Based on a preset extraction method, extracting images that meet a preset similarity condition from the multiple images;
[0044] A first data set is constructed based on the images that meet the preset similarity condition and information corresponding to the images that meet the preset similarity condition, wherein the information corresponding to the images that meet the preset similarity condition includes preset position information and / or target position information.
[0045] In addition, to achieve the above purpose, the present application also provides a target detection data set construction device, the target detection data set construction device comprising:
[0046] An image acquisition module, used to acquire a plurality of images arranged in a time sequence corresponding to a preset video, and first position information of a first sub-image corresponding to a first image in the time sequence, wherein the target to be detected is located in the first sub-image;
[0047] a target search and tracking module, configured to search and track other images except the first image based on the first image and the first position information through a target search and tracking model, so as to obtain target position information of the target to be detected in the other images, wherein the target search and tracking model is used to characterize the association relationship between the first sub-image and the target position information of the target to be detected in the other images;
[0048] The data set construction module is used to construct a first data set based on each of the images and the target position information corresponding thereto.
[0049] Optionally, the target search and tracking module includes:
[0050] A first image acquisition submodule, used to acquire a second sub-image of a previous image corresponding to the current image, the previous image including the first image, and the second sub-image is determined based on the corresponding position information of the target to be detected in the previous image;
[0051] A target tracking submodule, configured to search and track the current image based on the second sub-image and the position information of the target to be detected in the corresponding previous image, through a target search and tracking model, to obtain second position information of the target to be detected in the current image;
[0052] The overlapping submodule is used to return to the step of obtaining the second sub-image of the previous image corresponding to the current image until the target position information corresponding to the multiple images is obtained.
[0053] Optionally, the image acquisition module includes:
[0054] The second image acquisition submodule is used to acquire multiple images arranged in time sequence corresponding to a preset video;
[0055] A target detection submodule, configured to perform target detection on the first image in the time sequence based on a preset target detection model, and obtain preset position information of the target to be detected in the first image, wherein the preset target detection model is obtained by iterative training based on a preset data set;
[0056] The sub-image determination submodule is used to determine the first sub-image based on the preset position information.
[0057] Optionally, after the step of searching and tracking the current image based on the second sub-image and the position information of the target to be detected in the corresponding previous image by using a target search and tracking model to obtain the second position information of the target to be detected in the current image, the device further includes:
[0058] The position information comparison module is used to compare the second position information with the corresponding position information of the target to be detected in the previous image to obtain a comparison result, and the comparison result is associated with the first data set.
[0059] Optionally, before the step of acquiring a plurality of images arranged in time sequence corresponding to a preset video, the device further includes:
[0060] A sample acquisition module, used to acquire continuous image data, a target sub-image of each image in the image data, and third position information corresponding to the target sub-image;
[0061] An iterative training module is used to iteratively train the search and tracking model to be trained based on the continuous image data, the target sub-image and the third position information to obtain a target search and tracking model.
[0062] Optionally, after the step of searching and tracking the current image based on the second sub-image and the position information of the target to be detected in the corresponding previous image by using a target search and tracking model to obtain the second position information of the target to be detected in the current image, the device further includes:
[0063] An information updating module, configured to update the displacement change rate of the target to be detected based on the second position information and the corresponding position information of the target to be detected in a preset image before the current image;
[0064] The calibration module is used to update the model parameters of the target search and tracking model based on the displacement change rate, so as to perform target search and tracking processing on the next image corresponding to the current image based on the updated target search and tracking model.
[0065] Optionally, after the step of constructing a first data set based on each of the images and the corresponding target position information, the device further includes:
[0066] A model training module, used for iteratively training a preset model to be trained based on the first data set to obtain a first target detection model;
[0067] A target detection module, configured to predict the first data set by using the first target detection model to obtain a first detection result;
[0068] A result determination module, used to determine a second detection result in the first detection result that is inconsistent with the information corresponding to the target to be detected, so that the user can correct the image corresponding to the second detection result to obtain a correct third detection result;
[0069] A data set updating module, configured to update the first data set based on the image corresponding to the third detection result;
[0070] A data set determination module is used to return to the step of iteratively training the preset model to be trained based on the first data set to obtain a first target detection model, until the proportion of the second detection result in the first detection result is lower than a preset first ratio threshold, thereby obtaining a second data set.
[0071] Optionally, after returning to the step of iteratively training a preset model to be trained based on the first data set to obtain a first target detection model, until the proportion of the second detection result in the first detection result is lower than a preset first ratio threshold, and obtaining the second data set, the device further includes:
[0072] The module for acquiring the image to be detected is used to acquire the image to be detected collected in the real scene;
[0073] A prediction module, configured to predict the image to be detected based on a second target detection model to obtain a fourth detection result, wherein the fourth detection result includes a target detection frame and a confidence level thereof, wherein the second target detection model is obtained by training based on a second data set;
[0074] The second data set determination module is used to add the to-be-detected images whose confidence of the target detection frame meets the preset conditions into the second data set to obtain a third data set.
[0075] In addition, to achieve the above-mentioned purpose, the present application also provides a device, which includes: a memory, a processor, and a target detection class dataset construction program stored in the memory and executable on the processor, wherein the target detection class dataset construction program is configured to implement the steps of the target detection class dataset construction method as described above.
[0076] In addition, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, on which a target detection class data set construction program is stored. When the target detection class data set construction program is executed by a processor, the steps of the target detection class data set construction method as described above are implemented.
[0077] The present application obtains a plurality of images arranged in a time sequence corresponding to a preset video, and a first position information of a first sub-image corresponding to the first image in the time sequence, wherein the target to be detected is located in the first sub-image; based on the first image and the first position information, the target search and tracking model used to characterize the association relationship between the first sub-image and the target position information of the target to be detected in the other images is used to search and track the other images except the first image, so as to obtain the target position information of the target to be detected in the other images; based on each of the images and their corresponding target position information, a first data set is constructed. It can be understood that the present embodiment only needs to obtain in advance a plurality of images arranged in a time sequence corresponding to the preset video, and the first position information of the first sub-image corresponding to the first image in the time sequence, so as to obtain the target position information of the target to be detected in other images through the target search and tracking model, and realize automatic labeling of the target to be detected in other images. Based on the plurality of images, the preset position information and the target position information, the first data set can be constructed. Compared with the method of manually labeling the target in each image in the related art, the present embodiment can improve the construction efficiency of the target detection data set.
[0078] The present application also obtains a first target detection model by repeatedly executing iterative training of a preset model to be trained based on the first data set; predicts the first data set through the first target detection model to obtain a first detection result; determines a second detection result in the first detection result that is inconsistent with the corresponding information of the target to be detected, so that the user can correct the image corresponding to the second detection result to obtain a correct third detection result; based on the image corresponding to the third detection result, updates the first data set until the proportion of the second detection result in the first detection result is lower than the preset first ratio threshold, thereby obtaining a second data set. That is, the first data set is continuously updated and optimized until the proportion of the second detection result in the first detection result is lower than the preset first ratio threshold, indicating that the model accuracy of the first target detection model meets the requirements, and also indicating that the quality of the second data set obtained after the update and optimization meets the requirements, that is, a data set with better quality is obtained.
[0079] The present application also repeatedly executes the steps of acquiring an image to be detected collected in a real scene; predicting the image to be detected based on a second target detection model to obtain a fourth detection result, wherein the fourth detection result includes a target detection box and its confidence, and the second target detection model is obtained by training based on a second data set; adding the image to be detected whose confidence of the target detection box meets a preset condition to the second data set to obtain a third data set, continuously optimizing the third data set, and finally obtaining a data set with better quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 This is a schematic diagram of the first process of the first embodiment of the method for constructing a target detection data set of the present application;
[0081] Figure 2 This is a second flow chart of the second embodiment of the method for constructing a target detection data set of the present application;
[0082] Figure 3 This is a schematic diagram of the third process of the second embodiment of the method for constructing a target detection data set of the present application;
[0083] Figure 4 A structural block diagram of an embodiment of a device for constructing a target detection data set of the present application;
[0084] Figure 5 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.
[0085] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0086] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0087] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0088] It should be noted that, in this article, "the step of returning to..." is used to indicate returning to a specific step before, and then re-executing the specific step and other steps after the specific step in succession; the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "include one..." do not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, the components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context of the specific embodiment.
[0089] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in this article, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this article, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination". Furthermore, as used in this article, the singular forms "one", "one" and "the" are intended to also include plural forms, unless there is an opposite indication in the context. It should be further understood that the terms "comprising" and "including" indicate that there are the described features, steps, operations, elements, components, projects, kinds, and / or groups, but do not exclude the existence, occurrence or addition of one or more other features, steps, operations, elements, components, projects, kinds, and / or groups. The terms "or", "and / or", "including at least one of the following" etc. used in this application can be interpreted as inclusive, or mean any one or any combination. For example, “comprising at least one of the following: A, B, C” means “any of the following: A; B; C; A and B; A and C; B and C; A and B and C”, and for another example, “A, B or C” or “A, B and / or C” means “any of the following: A; B; C; A and B; A and C; B and C; A and B and C”. An exception to this definition will only occur when a combination of elements, functions, steps or operations are inherently mutually exclusive in some manner.
[0090] It should be understood that, although the various steps in the flowchart in the embodiment of the present application are displayed in sequence according to the indication of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and it can be performed in other orders. Moreover, at least a portion of the steps in the figure may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and their execution order is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0091] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0092] It should be noted that in this article, step codes such as S10 and S20 are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the sequence. When implementing the step, those skilled in the art may execute S20 first and then S10, etc., but these should all be within the scope of protection of this application.
[0093] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0094] Reference Figure 1 , Figure 1 This is a flow chart of the first embodiment of the method for constructing a target detection dataset in this application.
[0095] In a first embodiment, the method for constructing a target detection dataset includes the following steps:
[0096] S10: Acquire a plurality of images arranged in a time sequence corresponding to a preset video, and first position information of a first sub-image corresponding to a first image in the time sequence, wherein the target to be detected is located in the first sub-image;
[0097] It should be noted that the execution subject of the target detection data set construction method of this embodiment is the target detection data set construction device, and the target detection data set construction device is subordinate to the target detection data set construction equipment.
[0098] It can be understood that the multiple images are time-sequentially arranged images extracted from the video, and the time-sequential arrangement order of the multiple images corresponds to the preset frame sequence number of the preset video.
[0099] Specifically, the multiple images may be each frame image of the video, or in order to reduce the repetition of adjacent frame images, the multiple images may be multiple frame images extracted from the preset video.
[0100] For example, if the frame numbers of the multiple frames of images in the video are the 2nd frame, the 5th frame, the 10th frame, etc., then the arrangement order of the images corresponding to the 2nd frame, the 5th frame and the 10th frame are first, second and third respectively.
[0101] In order to facilitate automatic labeling of target detection images, the multiple images acquired in this embodiment contain the same target to be detected, for example, the multiple images contain the same person and / or the same object.
[0102] This embodiment also needs to obtain the first position information of the first sub-image corresponding to the first image in the time sequence. The target to be detected is located in the first sub-image. It can be understood that the first sub-image is obtained by cropping the position of the target to be detected in the first image.
[0103] Specifically, the method for obtaining the first position information corresponding to the first sub-image in the first image can be manual annotation, or it can be achieved by obtaining multiple images arranged in time sequence corresponding to a preset video in order to improve the efficiency and automation of data set construction; based on a preset target detection model, target detection is performed on the first image in the time sequence to obtain the preset position information of the target to be detected in the first image; based on the preset position information, the first position information of the first sub-image corresponding to the first image is determined.
[0104] It should be noted that the preset target detection model is obtained by iterative training based on a preset data set; wherein the preset data set may be an open source data set.
[0105] Furthermore, since the detection accuracy of the preset target detection model obtained by iterative training based on the open source data set is not high enough, the present embodiment performs target detection on the first image in the time sequence based on the preset target detection model. After obtaining the preset position information of the target to be detected in the first image, the preset position information can be displayed to the user so that the user can control the correctness of the preset position information.
[0106] Further, based on the preset position information, first position information of a first sub-image corresponding to the first image is determined. Specifically, the first sub-image may be cut out from the first image.
[0107] S20: Based on the first image and the first position information, searching and tracking other images except the first image by using a target search and tracking model to obtain target position information of the target to be detected in the other images, wherein the target search and tracking model is used to characterize the association relationship between the first sub-image and the target position information of the target to be detected in the other images;
[0108] It can be understood that since the order of the multiple images corresponds to their frame numbers in the video, based on the continuous characteristics of each frame in the video, the people or objects appearing in each frame are also consistent over a period of time, which is beneficial for the target search and tracking model to search and track the target to be detected in multiple images, and obtain more accurate target position information of the target to be detected.
[0109] It should be noted that the target search and tracking model is used to characterize the association between the first sub-image and the target position information of the target to be detected in the other images. Through this target search and tracking model, it is only necessary to determine the first position information of the first sub-image of the first image in advance, and then automatically search for the target position information of the target to be detected in other images.
[0110] Specifically, the first image arranged first may be image 1, and the other images may be image 2, image 3, ..., image (n-1), image n, and the target position information includes information such as the position and size of the target detection box.
[0111] Specifically, based on the first image and the first position information, searching and tracking other images except the first image through a target search and tracking model to obtain the target position information of the target to be detected in the other images may be implemented as follows:
[0112] Acquire a second sub-image of a previous image corresponding to the current image, wherein the previous image includes the first image, and the second sub-image is determined based on corresponding position information of the target to be detected in the previous image;
[0113] Based on the second sub-image and the position information of the target to be detected in the corresponding previous image, searching and tracking the current image through the target search and tracking model to obtain the second position information of the target to be detected in the current image;
[0114] Return to the step of obtaining the second sub-image of the previous image corresponding to the current image, until the target position information corresponding to the multiple images is obtained.
[0115] For example, the first position information of the first sub-image corresponding to the first image is obtained, and based on the first image and the first position information, the second image is searched and tracked through the target search and tracking model to obtain the second position information of the target to be detected in the second image.
[0116] Alternatively, the position information of the second sub-image corresponding to the second image is obtained, and based on the position information of the second image and the second sub-image, the third image is searched and tracked through a target search and tracking model to obtain the second position information of the target to be detected in the third image.
[0117] Alternatively, the position information of the second sub-image corresponding to the (n-1)th image is obtained, and based on the position information of the (n-1)th image and the second sub-image, the nth image is searched and tracked through a target search and tracking model to obtain the second position information of the target to be detected in the nth image.
[0118] It can be understood that by repeating the above process, the second position information corresponding to the multiple images can be obtained.
[0119] In order to ensure the accuracy of the target position information, after the step of searching and tracking the current image based on the second sub-image and the position information of the target to be detected in the corresponding previous image through the target search and tracking model to obtain the second position information of the target to be detected in the current image, the following steps may be further performed:
[0120] Based on the second position information and the corresponding position information of the target to be detected in the preset image before the current image, updating the displacement change rate of the target to be detected;
[0121] Based on the displacement change rate, the model parameters of the target search and tracking model are updated, so as to perform target search and tracking processing on the next image corresponding to the current image based on the updated target search and tracking model.
[0122] Since the second position information is based on the first position information and is predicted by the target search and tracking module, if the displacement change rate is greater than the preset threshold, it is considered that the movement trend of the target has changed. This embodiment updates the model parameters of the target search and tracking model based on the displacement change rate, thereby ensuring that in the process of performing target tracking processing on the next image, prediction processing can be performed based on the updated target search and tracking model, thereby ensuring the accuracy of the target search and tracking model in performing target tracking processing on the next image.
[0123] After obtaining the second position information, the target position information of the target to be detected in the other images can be obtained by searching and tracking the other images except the one image through the target search and tracking model.
[0124] It should be noted that, in the process of searching and tracking other images except the first image based on the first image and the first position information through the target search and tracking model to obtain the target position information of the target to be detected in the other images, if it is detected that the number of detection frames in the target position information of one of the images is inconsistent with the number of detection frames detected by the target detection model, it is considered that the target position information obtained by continuing to search and track the next image through the target search and tracking model is inaccurate.
[0125] Therefore, when this happens, the search and tracking of the next image is stopped to allow the user to adjust the target position information of the image whose number of detection frames is inconsistent with the number of detection frames in the preset position information. After the adjustment, the search and tracking of the next image continues through the target search and tracking model.
[0126] Similarly, if the confidence of the detection box in the target position information is lower than the preset confidence threshold, it is considered that the target position information obtained by continuing to search and track the next image through the target search and tracking model is inaccurate.
[0127] In this case, it is necessary to stop searching and tracking the next image so that the user can adjust the target position information of the image whose confidence is lower than the preset confidence threshold, and then continue searching and tracking the next image through the target search and tracking model after the adjustment.
[0128] It should be noted that, before the step of obtaining a plurality of images arranged in time sequence corresponding to the preset video, the iterative training process of the target search and tracking model includes:
[0129] Acquire a continuous image data set, a target sub-image of each image in the image data set, and third position information corresponding to the target sub-image; based on the continuous image data set, the target sub-image and the third position information, iteratively train the search and tracking model to be trained to obtain a target search and tracking model.
[0130] S30: constructing a first data set based on each of the images and the corresponding target position information.
[0131] Based on the other images, the target position information corresponding to the other images, and the first image and its preset position information, a first data set is constructed.
[0132] Specifically, in order to avoid the similarity between the images in the first data set being too high, the implementation method of constructing the first data set based on the images and their corresponding target position information in this embodiment may be:
[0133] Based on a preset extraction method, images that meet a preset similarity condition are extracted from the multiple images; based on the images that meet the preset similarity condition and information corresponding to the images that meet the preset similarity condition, a first data set is constructed, and the information corresponding to the images that meet the preset similarity condition includes preset position information and / or target position information.
[0134] Specifically, the preset extraction method may be to convert the above-mentioned multiple images into feature vectors, calculate the similarity between the feature vectors corresponding to each image, extract images whose similarity is lower than a preset similarity threshold, and obtain images that meet the preset similarity conditions.
[0135] If the multiple images are obtained from a video, the preset extraction method can also be based on the extraction of the multiple images corresponding to the frame numbers in the video, for example, one image is extracted after every preset number of frames, or if the difference between the corresponding frame numbers of two adjacent images in the multiple images in the video is greater than a preset value, then the two adjacent images can be extracted, etc., which is not limited here.
[0136] In this embodiment, it is only necessary to obtain in advance a plurality of images arranged in a time sequence corresponding to a preset video, as well as the first position information of the first sub-image corresponding to the first image in the time sequence. If the target to be detected is located in the first sub-image, the target position information of the target to be detected in other images can be obtained through the target search and tracking model, thereby realizing automatic labeling of the target to be detected in other images.
[0137] Specifically, the target detection data set construction program of this embodiment can be run in open source software, and the target detection data set construction program can be used to automatically label the target. There is no need for the user to use open source software to label each image separately. The first data set can be constructed based on the multiple images, the preset position information and the target position information, thereby improving the construction efficiency of the target detection data set.
[0138] like Figure 2 As shown, a second embodiment of the method for constructing a target detection data set of the present application is proposed based on the first embodiment. In this embodiment, after step S30, the method further includes:
[0139] A1: Based on the first data set, iteratively train the preset model to be trained to obtain a first object detection model;
[0140] A2: predicting the first data set by using the first target detection model to obtain a first detection result;
[0141] In order to improve the quality of the first data set, this embodiment iteratively trains a preset model to be trained based on the first data set to obtain a first target detection model, and then detects the reliability of the first data set based on the first data set.
[0142] Among them, the iterative training process of the first target detection model includes: inputting the first data set into a preset model to be trained, and obtaining the first target detection model after iterative training.
[0143] Specifically, the preset model to be trained is an initial model that has the ability to preliminarily process the target to be detected in the detection image, wherein the preset model to be trained may not have a high target detection accuracy.
[0144] Specifically, multiple images in the first data set and their corresponding preset position information and / or target position information will be used during the iterative training process. The target position information includes a target detection frame and the type of the target framed in the target detection frame.
[0145] A3: Determine a second detection result in the first detection result that is inconsistent with the information corresponding to the target to be detected, so that the user can correct the image corresponding to the second detection result to obtain a correct third detection result;
[0146] It can be understood that the first target detection model has a certain target detection capability, but since the quality of the first data set is uncertain, it is necessary to compare the first detection result with the corresponding information of the target to be detected in the first data set, that is, to compare the first detection result with the label (preset position information or target position information).
[0147] Specifically, a second detection result that is inconsistent with the corresponding information of the target to be detected (preset position information or target position information) is screened out from the first detection result, indicating that the detection accuracy of the first target detection model for the image corresponding to the second detection result is low, and the first target detection model needs to be trained to improve the model accuracy of the first target detection model.
[0148] A4: updating the first data set based on the image corresponding to the third detection result;
[0149] That is to say, the image corresponding to the second detection result is data that helps improve the accuracy of the model, and can be added to the first data set. However, before adding it to the first data set, the user needs to correct the second detection result to obtain the correct label of the image corresponding to the third detection result, and add the image corresponding to the third detection result and its label to the first data set to obtain the optimized first data set.
[0150] A5: Return to the step of iteratively training the preset model to be trained based on the first data set to obtain the first target detection model, until the proportion of the second detection result in the first detection result is lower than the preset first ratio threshold, to obtain the second data set.
[0151] By adopting the above method, the first data set is continuously updated and optimized until the proportion of the second detection result in the first detection result is lower than the preset first ratio threshold, indicating that the model accuracy of the first target detection model meets the requirements, and also indicating that the quality of the second data set obtained after the update and optimization meets the requirements, that is, a data set with better quality is obtained.
[0152] Furthermore, if Figure 3As shown, in order to ensure that the second target detection model obtained by training based on the second data set can also accurately detect the target in the image during actual application, the step of returning to the step of iteratively training the preset model to be trained based on the first data set to obtain the first target detection model, until the proportion of the second detection result in the first detection result is lower than the preset first ratio threshold, after the step of obtaining the second data set, further includes:
[0153] B1: Obtain the image to be detected collected in the real scene;
[0154] B2: Based on the second target detection model, predict the image to be detected to obtain a fourth detection result, wherein the fourth detection result includes a target detection box and a confidence level thereof, wherein the second target detection model is obtained by training based on the second data set;
[0155] B3: adding the to-be-detected images whose confidences of the target detection boxes meet preset conditions to the second data set to obtain a third data set.
[0156] Specifically, the image to be detected collected in a real scene may be uploaded by a user, or may be any image that requires target detection in an actual application scene that is collected in real time.
[0157] In this embodiment, the image to be detected can be predicted by the second target detection model to obtain a fourth detection result, where the fourth detection result includes a target detection frame, a confidence level of the target detection frame, and a type of a target framed in the target detection frame.
[0158] If the confidence of the target detection box in the fourth detection result meets the preset conditions, it is considered that the image corresponding to the fourth detection result helps to improve the model accuracy of the second target detection model, and it needs to be added to the second data set to improve the quality of the second data set.
[0159] Specifically, the preset condition includes that the confidence level is lower than a first threshold and higher than a second threshold, and / or the confidence level is higher than the first threshold.
[0160] Specifically, the step of adding the to-be-detected image whose confidence of the target detection frame meets the preset condition to the second data set includes at least one of the following (preferably including the following two):
[0161] First, a first image corresponding to a target detection frame having a confidence level lower than a first threshold and higher than a second threshold is displayed to the user. The user can then filter out a second image (image data containing missed targets) containing targets to be detected in the target detection frame from the first image based on the type of the targets in the target detection frame, remove the detection frames corresponding to targets of the wrong type in the second image, correct or add the real targets to be detected, obtain a third image, and add the third image to the second data set.
[0162] Second, the fourth image (image data with misdetected targets) corresponding to the target detection frame with a confidence level higher than the first threshold is displayed to the user, so that the user can remove the detection frame corresponding to the target of the wrong type in the fourth image, correct or add the real target to be detected, obtain the fifth image, and add the fifth image to the second data set.
[0163] Furthermore, after the step of adding the to-be-detected images whose confidences of the target detection boxes meet preset conditions into the second data set to obtain the third data set, the following steps may be further performed:
[0164] Based on the third data set, the preset model to be trained is iteratively trained to obtain a new second target detection model, and the image to be detected is predicted based on the new second target detection model to obtain a new fourth detection result; return to the step of obtaining the image to be detected collected in the real scene, until the ratio of the number of images corresponding to the wrong type of targets in the second image to the number of the second images is lower than the preset second ratio threshold, and the ratio of the number of images corresponding to the wrong type of targets in the fourth image to the number of the fourth images is lower than the preset third ratio threshold.
[0165] It can be understood that if the ratio of the number of images corresponding to targets of the wrong type in the second image to the number of the second images is lower than the preset second ratio threshold, it is considered that the missed detection rate of the target by the second target detection model trained based on the third data set meets the requirement; if the ratio of the number of images corresponding to targets of the wrong type in the fourth image to the number of the fourth images is lower than the preset third ratio threshold, it is considered that the false alarm rate of the target by the second target detection model trained based on the third data set meets the requirement.
[0166] Therefore, this embodiment returns to the step of obtaining the image to be detected collected in the real scene, and repeatedly executes the step of obtaining the image to be detected collected in the real scene; based on the second target detection model, the image to be detected is predicted to obtain a fourth detection result, and the fourth detection result includes a target detection box and its confidence, and the second target detection model is obtained by training based on the second data set;
[0167] The image to be detected whose confidence of the target detection box meets the preset conditions is added to the second data set to obtain a third data set, and the third data set is continuously optimized to finally obtain a data set with better quality.
[0168] In this embodiment, offline data (first data set) and online data (images to be detected) are optimized through the first target detection model and / or the second target detection model, so that a data set with better quality can be obtained, thereby improving the accuracy of the target detection model trained based on the data set.
[0169] In addition, the present application also proposes a target detection data set construction device, referring to Figure 4 , the target detection data set construction device comprises:
[0170] An image acquisition module 10 is used to acquire a plurality of images arranged in a time sequence corresponding to a preset video, and first position information of a first sub-image corresponding to a first image in the time sequence, wherein the target to be detected is located in the first sub-image;
[0171] A target search and tracking module 20 is used to search and track other images except the first image based on the first image and the first position information through a target search and tracking model to obtain the target position information of the target to be detected in the other images, wherein the target search and tracking model is used to characterize the association relationship between the first sub-image and the target position information of the target to be detected in the other images;
[0172] The data set construction module 30 is used to construct a first data set based on each of the images and the corresponding target position information.
[0173] Optionally, the target search and tracking module includes:
[0174] A first image acquisition submodule, used to acquire a second sub-image of a previous image corresponding to the current image, the previous image including the first image, and the second sub-image is determined based on the corresponding position information of the target to be detected in the previous image;
[0175] A target tracking submodule, configured to search and track the current image based on the second sub-image and the position information of the target to be detected in the corresponding previous image, through a target search and tracking model, to obtain second position information of the target to be detected in the current image;
[0176] The overlapping submodule is used to return to the step of obtaining the second sub-image of the previous image corresponding to the current image until the target position information corresponding to the multiple images is obtained.
[0177] Optionally, the image acquisition module includes:
[0178] The second image acquisition submodule is used to acquire multiple images arranged in time sequence corresponding to a preset video;
[0179] A target detection submodule, configured to perform target detection on the first image in the time sequence based on a preset target detection model, and obtain preset position information of the target to be detected in the first image, wherein the preset target detection model is obtained by iterative training based on a preset data set;
[0180] The sub-image determination submodule is used to determine the first sub-image based on the preset position information.
[0181] Optionally, after the step of searching and tracking the current image based on the second sub-image and the position information of the target to be detected in the corresponding previous image by using a target search and tracking model to obtain the second position information of the target to be detected in the current image, the device further includes:
[0182] An information updating module, configured to update the displacement change rate of the target to be detected based on the second position information and the corresponding position information of the target to be detected in a preset image before the current image;
[0183] The calibration module is used to update the model parameters of the target search and tracking model based on the displacement change rate, so as to perform target search and tracking processing on the next image corresponding to the current image based on the updated target search and tracking model.
[0184] Optionally, before the step of acquiring a plurality of images arranged in time sequence corresponding to a preset video, the device further includes:
[0185] A sample acquisition module, used to acquire continuous image data, a target sub-image of each image in the image data, and third position information corresponding to the target sub-image;
[0186] An iterative training module is used to iteratively train the search and tracking model to be trained based on the continuous image data, the target sub-image and the third position information to obtain a target search and tracking model.
[0187] Optionally, the dataset construction module includes:
[0188] An image extraction submodule, used for extracting images satisfying a preset similarity condition from the plurality of images based on a preset extraction method;
[0189] The data set construction submodule is used to construct a first data set based on the images that meet the preset similarity conditions and the information corresponding to the images that meet the preset similarity conditions, wherein the information corresponding to the images that meet the preset similarity conditions includes preset position information and / or target position information.
[0190] Optionally, after the step of constructing a first data set based on each of the images and the corresponding target position information, the device further includes:
[0191] A first model training module, used for iteratively training a preset model to be trained based on the first data set to obtain a first target detection model;
[0192] A target detection module, configured to predict the first data set by using the first target detection model to obtain a first detection result;
[0193] A result determination module, used to determine a second detection result in the first detection result that is inconsistent with the information corresponding to the target to be detected, so that the user can correct the image corresponding to the second detection result to obtain a correct third detection result;
[0194] A data set updating module, configured to update the first data set based on the image corresponding to the third detection result;
[0195] The first data set determination module is used to return to the step of iteratively training the preset model to be trained based on the first data set to obtain the first target detection model, until the proportion of the second detection result in the first detection result is lower than the preset first proportion threshold, so as to obtain the second data set.
[0196] Optionally, after returning to the step of iteratively training a preset model to be trained based on the first data set to obtain a first target detection model, until the proportion of the second detection result in the first detection result is lower than a preset first ratio threshold, and obtaining the second data set, the device further includes:
[0197] The module for acquiring the image to be detected is used to acquire the image to be detected collected in the real scene;
[0198] A prediction module, configured to predict the image to be detected based on a second target detection model to obtain a fourth detection result, wherein the fourth detection result includes a target detection frame and a confidence level thereof, wherein the second target detection model is obtained by training based on a second data set;
[0199] The second data set determination module is used to add the to-be-detected images whose confidence of the target detection frame meets the preset conditions into the second data set to obtain a third data set.
[0200] Optionally, the second data set determination module includes at least one of the following:
[0201] A first data set determination submodule is used to display to a user a first image corresponding to a target detection frame having a confidence level lower than a first threshold and higher than a second threshold, so that the user can select from the first image a second image in which the target detection frame has a target to be detected based on the type of the target in the target detection frame, remove the target corresponding detection frame of the wrong type in the second image, obtain a third image, and add the third image to the second data set;
[0202] The second data set determines the submodule, which is used to display to the user the target detection box corresponding to the fourth image whose confidence level is higher than the first threshold, so that the user can remove the target corresponding detection box of the wrong type in the fourth image, obtain the fifth image, and add the fifth image to the second data set.
[0203] Optionally, after the step of adding the to-be-detected image whose confidence of the target detection box meets a preset condition to the second data set to obtain the third data set, the device further comprises:
[0204] A second model training module is used to iteratively train a preset model to be trained based on the third data set to obtain a second target detection model;
[0205] A model determination module is used to return to the step of predicting the first data set through the first target detection model to obtain a first detection result, until the ratio of the number of images corresponding to targets of the wrong type in the second image to the number of the second images is lower than a preset second ratio threshold, and the ratio of the number of images corresponding to targets of the wrong type in the fourth image to the number of the fourth images is lower than a preset third ratio threshold.
[0206] Optionally, the data set construction module includes:
[0207] An image extraction submodule, used for extracting images satisfying a preset similarity condition from the plurality of images based on a preset extraction method;
[0208] The data set construction submodule is used to construct a first data set based on the images that meet the preset similarity conditions and the information corresponding to the images that meet the preset similarity conditions, wherein the information corresponding to the images that meet the preset similarity conditions includes preset position information and / or target position information.
[0209] This embodiment only needs to obtain in advance a plurality of images arranged in a time sequence corresponding to a preset video, and the first position information of the first sub-image corresponding to the first image in the time sequence. If the target to be detected is located in the first sub-image, the target position information of the target to be detected in other images can be obtained through the target search and tracking model, so as to realize automatic labeling of the targets to be detected in other images. Based on the plurality of images, the preset position information and the target position information, a first data set can be constructed. Compared with the method of manually labeling the targets in each image in the related art, this embodiment can improve the construction efficiency of target detection data sets.
[0210] It should be noted that each module in the above-mentioned device can be used to implement each step in the above-mentioned method and achieve corresponding technical effects, which will not be described in detail in this embodiment.
[0211] Reference Figure 5 , Figure 5 A schematic diagram of the structure of the device of the hardware operating environment involved in the embodiment of the present application.
[0212] like Figure 5 As shown, the device may include: a processor 1001, such as a CPU, a communication bus 1002, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between these components. The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0213] Those skilled in the art will understand that Figure 5 The structure shown in the figure does not constitute a limitation of the device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0214] like Figure 5 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a target detection data set construction program.
[0215] exist Figure 5 In the device shown, the device calls the target detection data set construction program stored in the memory 1005 through the processor 1001, and performs the following operations:
[0216] Acquire multiple images arranged in a time sequence corresponding to a preset video, and first position information of a first sub-image corresponding to a first image in the time sequence, wherein the target to be detected is located in the first sub-image;
[0217] Based on the first image and the first position information, searching and tracking other images except the first image through a target search and tracking model to obtain target position information of the target to be detected in the other images, wherein the target search and tracking model is used to characterize the association relationship between the first sub-image and the target position information of the target to be detected in the other images;
[0218] A first data set is constructed based on each of the images and the corresponding target position information.
[0219] This embodiment only needs to obtain in advance a plurality of images arranged in a time sequence corresponding to a preset video, and the first position information of the first sub-image corresponding to the first image in the time sequence. If the target to be detected is located in the first sub-image, the target position information of the target to be detected in other images can be obtained through the target search and tracking model, so as to realize automatic labeling of the targets to be detected in other images. Based on the plurality of images, the preset position information and the target position information, a first data set can be constructed. Compared with the method of manually labeling the targets in each image in the related art, this embodiment can improve the construction efficiency of target detection data sets.
[0220] It should be noted that the above-mentioned target detection data set construction program can be used to implement each step in the above-mentioned method and achieve the corresponding technical effects, which will not be described in detail in this embodiment.
[0221] In addition, the embodiment of the present application further proposes a computer-readable storage medium, on which a target detection data set construction program is stored. When the target detection data set construction program is executed by a processor, the following operations are implemented:
[0222] Acquire multiple images arranged in a time sequence corresponding to a preset video, and first position information of a first sub-image corresponding to a first image in the time sequence, wherein the target to be detected is located in the first sub-image;
[0223] Based on the first image and the first position information, searching and tracking other images except the first image through a target search and tracking model to obtain target position information of the target to be detected in the other images, wherein the target search and tracking model is used to characterize the association relationship between the first sub-image and the target position information of the target to be detected in the other images;
[0224] A first data set is constructed based on each of the images and the corresponding target position information.
[0225] This embodiment only needs to obtain in advance a plurality of images arranged in a time sequence corresponding to a preset video, and the first position information of the first sub-image corresponding to the first image in the time sequence. If the target to be detected is located in the first sub-image, the target position information of the target to be detected in other images can be obtained through the target search and tracking model, so as to realize automatic labeling of the targets to be detected in other images. Based on the plurality of images, the preset position information and the target position information, a first data set can be constructed. Compared with the method of manually labeling the targets in each image in the related art, this embodiment can improve the construction efficiency of target detection data sets.
[0226] It should be noted that when the above-mentioned computer-readable storage medium is executed by a processor, it can also implement the various steps in the above-mentioned method and achieve the corresponding technical effects, which will not be described in detail in this embodiment.
[0227] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0228] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0229] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0230] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for constructing a target detection dataset, characterized in that: The method for constructing a target detection dataset comprises the following steps: Acquire multiple images arranged in a time sequence corresponding to a preset video, and first position information of a first sub-image corresponding to a first image in the time sequence, wherein the target to be detected is located in the first sub-image; Acquire a second sub-image of a previous image corresponding to the current image, the previous image including the first image, and the second sub-image is determined based on the corresponding position information of the target to be detected in the previous image; Based on the second sub-image and the position information of the target to be detected in the corresponding previous image, the current image is searched and tracked by a target search and tracking model to obtain the second position information of the target to be detected in the current image, wherein the target search and tracking model is used to characterize the association relationship between the first sub-image and the target position information of the target to be detected in the other images; Returning to the step of obtaining the second sub-image of the previous image corresponding to the current image, until the target position information corresponding to the multiple images is obtained; A first data set is constructed based on each of the images and the corresponding target position information.
2. The method for constructing a target detection dataset according to claim 1, wherein: The step of obtaining a plurality of images arranged in a time sequence corresponding to a preset video, and first position information of a first sub-image corresponding to a first image in the time sequence, comprises: Obtain multiple images arranged in time sequence corresponding to a preset video; Based on a preset target detection model, target detection is performed on the first image in the time sequence to obtain preset position information of the target to be detected in the first image, wherein the preset target detection model is obtained by iterative training based on a preset data set; Based on the preset position information, first position information of the first sub-image corresponding to the first image is determined.
3. The method for constructing a target detection dataset according to claim 1, wherein: After the step of searching and tracking the current image based on the second sub-image and the position information of the target to be detected in the corresponding previous image through the target search and tracking model to obtain the second position information of the target to be detected in the current image, the method further includes: Based on the second position information and the corresponding position information of the target to be detected in the preset image before the current image, updating the displacement change rate of the target to be detected; Based on the displacement change rate, the model parameters of the target search and tracking model are updated, so as to perform target search and tracking processing on the next image corresponding to the current image based on the updated target search and tracking model.
4. The method for constructing a target detection dataset according to claim 1, wherein: Before the step of obtaining a plurality of images arranged in time sequence corresponding to the preset video, the method further includes: Acquire a continuous image data set, a target sub-image of each image in the image data set, and third position information corresponding to the target sub-image; Based on the continuous image data set, the target sub-image and the third position information, the search and tracking model to be trained is iteratively trained to obtain a target search and tracking model.
5. The method for constructing a target detection dataset according to claim 1, wherein: The step of constructing a first data set based on each of the images and the corresponding target position information includes: Based on a preset extraction method, extracting images that meet a preset similarity condition from the multiple images; A first data set is constructed based on the images that meet the preset similarity condition and information corresponding to the images that meet the preset similarity condition, wherein the information corresponding to the images that meet the preset similarity condition includes preset position information and / or target position information.
6. The method for constructing a target detection dataset according to claim 1, wherein: After the step of constructing the first data set based on each of the images and the corresponding target position information, the method further includes: Based on the first data set, iteratively train the preset model to be trained to obtain a first object detection model; Predicting the first data set by using the first target detection model to obtain a first detection result; Determine a second detection result in the first detection result that is inconsistent with the information corresponding to the target to be detected, so that the user can correct the image corresponding to the second detection result to obtain a correct third detection result; Based on the image corresponding to the third detection result, updating the first data set; Return to the step of iteratively training the preset model to be trained based on the first data set to obtain a first target detection model, until the proportion of the second detection result in the first detection result is lower than a preset first ratio threshold, to obtain a second data set.
7. A device for constructing a target detection dataset, characterized in that: The target detection data set construction device comprises: An image acquisition module, used to acquire a plurality of images arranged in a time sequence corresponding to a preset video, and first position information of a first sub-image corresponding to a first image in the time sequence, wherein the target to be detected is located in the first sub-image; A first image acquisition submodule, used to acquire a second sub-image of a previous image corresponding to the current image, the previous image including the first image, and the second sub-image is determined based on the corresponding position information of the target to be detected in the previous image; a target tracking submodule, configured to search and track the current image based on the position information of the target to be detected in the second sub-image and the corresponding previous image, and obtain the second position information of the target to be detected in the current image through a target search and tracking model, wherein the target search and tracking model is used to characterize the association relationship between the target position information of the first sub-image and the target to be detected in the other images; An overlapping submodule, used for returning to the step of obtaining the second sub-image of the previous image corresponding to the current image, until the target position information corresponding to the multiple images is obtained; The data set construction module is used to construct a first data set based on each of the images and the target position information corresponding thereto.
8. A device, characterized in that The device includes: a memory, a processor, and a target detection class dataset construction program stored in the memory and executable on the processor, wherein the target detection class dataset construction program is configured to implement the steps of the target detection class dataset construction 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 stores a target detection data set construction program, and when the target detection data set construction program is executed by the processor, the steps of the target detection data set construction method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Video labeling method and system based on image clustering and electronic equipment
CN109829397A