Construction method and device of target identification data set, equipment and storage medium

By automatically constructing a target recognition data set for construction scenes and using data from surveillance videos, the problem of complexity and high cost of data set construction in the existing technology is solved, the comprehensive coverage of the data set is improved, and it is adapted to pumped storage construction. Scenario needs.

CN118552805AInactive Publication Date: 2024-08-27CHINA THREE GORGES CORPORATION

Patent Information

Application Number
CN202410515728.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-26
Publication Date
2024-08-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The construction process of existing multi-target recognition data sets in construction scenarios requires a lot of manual time and effort, resulting in increased complexity and cost. Moreover, the category coverage of the data set is not comprehensive enough to meet the target recognition needs in pumped storage construction scenarios.

Method used

By acquiring surveillance videos of construction scenes, automatically extract images, filter out blurry, similar or blurred images, mark the location and category of target objects, and use the data foundation of the video surveillance system to build an automated target recognition data set to improve the comprehensive coverage of the data set. .

Benefits of technology

It saves a lot of manual time and energy, reduces the complexity and cost of data set construction, improves the comprehensive coverage of the target recognition data set, and adapts to the needs of pumped storage construction scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118552805A
    Figure CN118552805A
Patent Text Reader

Abstract

The embodiment of the invention relates to a construction method and device of a target recognition data set, equipment and a storage medium, and the method comprises the steps: obtaining a monitoring video of a target construction scene, and extracting a plurality of frames of images from the monitoring video to obtain a first data set; for the first data set, filtering out blurred screen images, and / or reserving one frame of multi-frame images with similar image contents, and / or filtering out images not including the target object, and / or filtering out blurred images, so as to obtain a second data set; for the images in the second data set, labeling the position and category of the target object included in the images, and labeling the image acquisition time, and / or labeling the image acquisition place, and / or labeling the weather type during image acquisition to obtain a third data set; and for the third data set, reserving one frame of multiple frames of images with similar annotation information to obtain a target data set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the technical field of dataset construction, and in particular to a method, device, equipment and storage medium for constructing a target recognition dataset. Background Art

[0002] With the continued rapid growth of the scale of new energy construction, pumped storage, as an important energy storage method to ensure the efficient regulation and safe and stable operation of new power systems, has also reached a new high in total construction scale. In order to improve the level of on-site safety management, a construction video monitoring system is often built during the construction period of pumped storage projects. However, the construction safety risk warning method based on manual screen inspection is time-consuming and has a lag, which is not convenient for timely identification of possible dangerous events and taking action. By carrying out multi-target recognition based on deep learning, the image features of the construction scene can be automatically extracted, and the identification and positioning of multiple types of targets such as machinery, workers, and materials in the construction scene can be realized, providing a key foundation for automated and intelligent construction safety risk prevention.

[0003] At present, the process of constructing a multi-target recognition dataset for construction scenes is usually based on images collected by drones and handheld cameras, and is completed by manual screening and manual labeling. However, in the process of data collection, organization and labeling, a lot of time and effort are required, which greatly increases the complexity and cost of dataset construction. Summary of the invention

[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the embodiments of the present disclosure provide a method, an apparatus, a device and a storage medium for constructing a target recognition data set.

[0005] A first aspect of an embodiment of the present disclosure provides a method for constructing a target recognition dataset, the method comprising:

[0006] Acquire a surveillance video of a target construction scene, and extract multiple frames of images from the surveillance video to obtain a first data set;

[0007] For the first data set, filter out the distorted images, and / or retain one frame of multiple frames of images with similar image content, and / or filter out images that do not include the target object, and / or filter out blurred images, to obtain a second data set;

[0008] For the images in the second data set, mark the location and category of the target objects included therein, and mark the image acquisition time, and / or mark the image acquisition location, and / or mark the weather type when the image was acquired, to obtain a third data set;

[0009] For the third data set, one frame is retained from multiple frames of images with similar annotation information to obtain a target data set.

[0010] A second aspect of an embodiment of the present disclosure provides a device for constructing a target recognition data set, the device comprising:

[0011] A first acquisition module is used to acquire a surveillance video of a target construction scene, and extract multiple frames of images from the surveillance video to obtain a first data set;

[0012] A first screening module is used to filter out the distorted images, and / or retain one frame of multiple frames of images with similar image contents, and / or filter out images that do not include the target object, and / or filter out blurred images for the first data set, to obtain a second data set;

[0013] a first labeling module, for labeling the positions and categories of the target objects included in the images in the second data set, and labeling the image acquisition time, and / or the image acquisition location, and / or the weather type when the image was acquired, to obtain a third data set;

[0014] The second screening module is used to retain one frame of multiple frames of images with similar annotation information for the third data set to obtain a target data set.

[0015] A third aspect of an embodiment of the present disclosure provides an electronic device, the server comprising: a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the method of the first aspect above.

[0016] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method of the first aspect described above can be implemented.

[0017] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0018] The disclosed embodiment can automatically construct a target recognition data set based on the surveillance video of the target construction scene, so as to make full use of the huge data base provided by the video surveillance system and improve the comprehensiveness of the construction object (i.e., target object) categories covered by the target recognition data set. In addition, the automatic construction of the target recognition data set can save a lot of manual time and effort, and reduce the complexity and cost of data set construction. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0021] Figure 1 is a flow chart of a method for constructing a target recognition data set provided by an embodiment of the present disclosure;

[0022] Figure 2 It is a structural schematic diagram of a device for constructing a target recognition data set provided by an embodiment of the present disclosure;

[0023] Figure 3 It is a structural schematic diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0024] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0025] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0026] Through research, the applicant found that in terms of constructing large-scale target recognition datasets for construction scenes, An Xue Hui et al. proposed the "Moving Objects on Construction Sites" (MOCS) dataset for target recognition and image segmentation tasks, which consists of 42,000 on-site images and 13 construction object categories, including workers, backhoe excavators, tower cranes, dump trucks, truck cranes, loaders, hooks, pump trucks, smooth rollers, concrete mixer trucks, and pile drivers; Rui Duan et al. proposed a construction site dataset for target recognition tasks, which consists of 19,846 on-site images and 15 construction object categories, including workers, wooden boards, bricks, cutting machines, crane hooks, safety vests, wood, electrical boxes, scaffolding, guardrails, safety helmets, steel bars, wheelbarrows, slogans, and crane buckets. However, the above-mentioned large-scale construction scene target recognition dataset contains limited categories of construction objects and lacks comprehensiveness. Since the effect of the target recognition algorithm is highly dependent on the size of the target recognition dataset and the comprehensiveness of the construction object categories covered, the above-mentioned large-scale construction scene target recognition dataset directly affects the recognition effect and generalization of the target recognition model, and cannot meet the target recognition needs in the pumped storage construction scene. In addition, the above-mentioned target recognition dataset is based on images collected by drones and handheld cameras, and is constructed by manual screening and manual labeling. In the process of data collection, organization and labeling, a lot of time and effort are required, which greatly increases the complexity and cost of dataset construction.

[0027] In view of this, the applicant takes into account that a construction video surveillance system is often set up during the construction period of a pumped-storage project. Therefore, a large-scale target recognition data set for the pumped-storage construction scene can be automatically constructed based on the surveillance video to make full use of the huge data base provided by the video surveillance system and improve the comprehensiveness of the construction object categories covered by the target recognition data set. In addition, the automated construction of the target recognition data set can save a lot of manual time and effort, and reduce the complexity and cost of data set construction. Based on this, the embodiments of the present disclosure provide a method, device, equipment and storage medium for constructing a target recognition data set. Below, the method for constructing a target recognition data set is first described in detail.

[0028] Figure 1 1 is a flowchart of a method for constructing a target recognition data set provided by an embodiment of the present disclosure, and the method can be executed by an electronic device. The electronic device can be exemplarily understood as a device such as a mobile phone, a tablet computer, a laptop computer, a desktop computer, a smart TV, etc. Figure 1 As shown, the method provided in this embodiment includes the following steps:

[0029] S110: Acquire a surveillance video of a target construction scene, and extract multiple frames of images from the surveillance video to obtain a first data set.

[0030] In the disclosed embodiments, the video monitoring system can collect images of the target construction scene in real time, thereby obtaining a monitoring video of the target construction scene. In this way, in some examples, the electronic device can receive the monitoring video sent by the video monitoring system. Of course, in other examples, the video monitoring system can also store the monitoring video in a storage device such as a USB flash drive or a hard disk, and the electronic device obtains the monitoring video by reading the storage device. However, this is not limited to this.

[0031] Specifically, the target construction scenario may include a pumped storage construction scenario, etc., but is not limited thereto.

[0032] Specifically, the target construction scene usually includes multiple construction areas that require safety risk warnings, so the video surveillance system usually includes multiple image acquisition devices (such as cameras, etc.), so that at least one image acquisition device is deployed in each construction area that requires safety risk warnings for image acquisition, and the construction area for image acquisition is the image acquisition location. For example, when the target construction scene is a pumped storage construction scene, the image acquisition location may include: the dam filling area of ​​the upper reservoir, and / or the dam filling area of ​​the lower reservoir, and / or the reservoir basin excavation area, and / or the inlet and outlet construction area, and / or the construction branch tunnel, and / or the factory traffic tunnel, and / or the ventilation and safety tunnel, and / or the diversion and discharge tunnel, and / or the sand mixing system, and / or the mining material yard, and / or the transfer material yard, and / or the waste slag yard, and / or the main transformer tunnel area of ​​the plant, and / or the tail gate tunnel area, but is not limited to this.

[0033] Specifically, during the construction process, construction objects usually appear in the image acquisition location. In order to achieve safety risk warning, the target recognition model needs to be able to identify certain construction objects in the image acquisition location, and the construction objects that need to be identified are target objects. For example, when the target construction scene is a pumped storage construction scene, the target objects may include: heavy construction machinery, and / or small construction equipment, and / or construction personnel, and / or protective equipment, and / or construction safety slogans, and / or building materials, wherein heavy construction machinery includes excavators, and / or dump trucks, and / or loaders, and / or bulldozers, and / or rollers, and / or concrete mixers, and / or excavator drills, and / or crushing drills, and / or tank trucks, and / or water trucks, and / or material transport trucks, but are not limited to these.

[0034] In some embodiments, the monitoring video of the target construction scene may include videos obtained by capturing images of the target construction scene from different camera angles;

[0035] And / or, the surveillance video includes an image in which the area ratio of the target object in the image is less than a first preset threshold, an image in which the area ratio of the target object in the image is greater than or equal to the first preset threshold, an image in which the distance between the included target objects is less than a second preset threshold, an image in which the distance between the included target objects is greater than or equal to the second preset threshold, an image in which at least two of the included target objects occlude each other, an image in which none of the included target objects occlude each other, an image in which at least one of the included target objects is divided by an occlusion, and an image in which none of the included target objects is divided by an occlusion;

[0036] and / or, videos obtained by capturing images of a target construction scene under different weather types.

[0037] Specifically, the video surveillance system can include multiple camera perspectives to capture images of the target construction scene from different camera angles. In this way, the surveillance video can reflect the rich changes in the target construction scene, the different operations or behavioral postures of the target object, which is conducive to improving the intra-class diversity and richness of the data set, thereby avoiding overfitting of the target recognition model training.

[0038] It should be noted that “the distance between the target objects included is less than the second preset threshold” means that the image includes at least two target objects, and the distance between any two target objects is less than the second preset threshold. Similarly, “the distance between the target objects included is greater than or equal to the second preset threshold” means that the image includes at least two target objects, and the distance between any two target objects is greater than or equal to the second preset threshold.

[0039] Specifically, the on-site spatial scope of the target construction scene is usually large. In order to reflect the actual construction characteristics affected by the elevation of the construction surface, trees, telephone poles, etc., the monitoring video collected by the video surveillance system can cover the following situations: the target object accounts for a small area in the image screen, the target object accounts for a large area in the image screen, the target object is sparsely distributed in the image screen, multiple target objects are densely distributed in the image screen, multiple target objects do not occlude each other in the image screen, multiple target objects in the image screen occlude each other, the target objects in the image screen are segmented by occlusion, and the target objects in the image screen are not segmented by obstructions, so as to improve the richness of the data set.

[0040] Specifically, the construction period is usually long, and different weather conditions such as fog, cloudy, rainy, and snowy may be experienced during the construction period. The monitoring videos collected by the video surveillance system may include videos obtained by image acquisition of the target construction scene under different weather types (fog, cloudy, rainy, snowy, etc.) to enhance the richness of the data set. This is conducive to improving the target recognition effect of the target recognition model under different weather conditions.

[0041] In some embodiments, extracting multiple frames of images from a surveillance video to obtain a first data set includes: extracting frames of the surveillance video at a preset time interval to obtain the first data set.

[0042] Specifically, the specific value of the preset time interval can be set by those skilled in the art according to actual conditions, and is not limited here. For example, the preset time interval can be 5 seconds, 10 seconds, or 15 seconds, etc., but is not limited thereto.

[0043] Specifically, as mentioned above, a video surveillance system usually includes multiple image acquisition devices, and each image acquisition device can acquire images at a corresponding image acquisition location to obtain one or more surveillance videos. Therefore, there may be multiple surveillance videos used to make a data set. If there are multiple surveillance videos, for each surveillance video, the surveillance video is framed at a preset time interval, and the images extracted from all surveillance videos constitute the first data set.

[0044] Specifically, any possible method may be used to extract frames from the surveillance video, and the present disclosure does not limit this. For example, a frame extraction command is written based on the input requirements of FFmpeg to achieve batch capture and storage of surveillance video images to establish a first data set. However, this is not limited to this.

[0045] It can be understood that compared with the frame extraction method based on OpenCV, the frame extraction method based on FFmpeg has the advantages of fast calculation speed and stable frame extraction effect.

[0046] It can also be understood that by extracting frames from the surveillance video to obtain the first data set, the first data set can be automatically constructed, which is conducive to saving manual time and effort and reducing the complexity and cost of constructing the first data set.

[0047] Of course, in other embodiments, image frames in the surveillance video may also be randomly sampled to obtain the first data set.

[0048] S120. For the first data set, filter out the distorted images, and / or retain one frame of multiple frames of images with similar image contents, and / or filter out images that do not include the target object, and / or filter out blurred images to obtain a second data set.

[0049] In the disclosed embodiment, the electronic device can automatically identify the validity of images based on the first data set for actual situations such as image aliasing, image duplication, lack of target objects, and image blur, thereby implementing screening calculations for the first data set.

[0050] Specifically, there are many specific implementation methods of "filtering out the distorted screen image", and typical examples are described below, but they do not constitute a limitation of the present disclosure.

[0051] In some embodiments, filtering out flower screen images includes: for images to be subjected to flower screen judgment in the first data set, inputting them into a trained flower screen judgment model, obtaining flower screen judgment results output by the flower screen judgment model, and if the flower screen judgment result is a flower screen, removing it from the first data set.

[0052] Specifically, there are many specific implementation methods for obtaining a trained flower screen judgment model. The following is an explanation of typical examples, but it does not constitute a limitation of the present disclosure. For example, a flower screen judgment model (such as a ResNet model, etc.) is established, and a flower screen data set is established. The flower screen data set may include images marked with pure color flower screens, images marked with striped flower screens, images marked with local color flower screens, images marked with noise flower screens, images marked as not flower screens, etc. The flower screen judgment model is trained based on the flower screen data set. The trained flower screen judgment model can realize full-image classification based on the input image, and automatically determine whether there is a flower screen.

[0053] It is understandable that the video surveillance system is installed in multiple locations in an outdoor construction site. Affected by bandwidth, network transmission, environmental interference sources, unstable video frame rates, and video decoding formats, a distorted screen may appear in the first data set acquired based on the surveillance video. Filtering out the distorted screen images in the first data set can improve the effectiveness of the data set.

[0054] Of course, in other examples, the flower screen images in the first data set can also be identified through edge detection and structural analysis (flower screen images often show discontinuous or unnatural edge features in structure. These abnormal edges can be found and quantified through edge detection algorithms to determine whether the image has flower screen phenomenon), texture analysis (analyzing the texture features of the image, the texture of the flower screen image often shows irregularity and randomness), etc.

[0055] Specifically, there are many specific implementation methods of “retaining one frame among multiple frames of images with similar image contents”, which are described below with reference to typical examples, but do not constitute a limitation of the present disclosure.

[0056] In some embodiments, retaining one frame of multiple frames of images with similar image contents includes: calculating a first similarity of the image contents of an image pair to be subjected to similarity calculation in a first data set, and removing one frame of the image in the image pair from the first data set if the first similarity is greater than a preset third threshold.

[0057] Specifically, when "retaining one frame of multiple frames of images with similar image contents", for the images currently existing in the first data set, two images can be combined into an image pair, or two adjacent frames of images can be combined into an image pair, but it is not limited thereto.

[0058] Specifically, there are many specific implementations of "calculating the first similarity of the image content of the image pair", and typical examples are described below, but they do not constitute a limitation of the present disclosure. For example, the SSIM (Structural Similarity Index) index value (i.e., the first similarity) of the image pair is calculated. If the SSIM index value is greater than a preset third threshold, it is determined that the two frames of the image pair have a high similarity and there is a duplication, and only one image is retained in the data set.

[0059] Specifically, the specific value of the preset third threshold can be set by those skilled in the art according to actual conditions and is not limited here. For example, when the first similarity is the SSIM index value, since the SSIM index value evaluates the similarity by considering the brightness, contrast and structural information of the image, it is an indicator for measuring image quality. The closer the value is to 1, the higher the image similarity. Therefore, the preset third threshold can be 0.8, or 0.9, etc., but is not limited to this.

[0060] Of course, in other examples, the first similarity of image pairs can also be calculated by histogram comparison (converting the image into a color, texture or grayscale histogram, and then comparing the differences between the two histograms, such as Euclidean distance, KL divergence, cross-correlation coefficient, etc.), feature matching (using image feature extraction algorithms (such as SIFT, SURF, ORB, etc.) to extract key points and descriptors, and then evaluating the similarity of images by matching the number and quality of descriptors).

[0061] It is understandable that there may be a high degree of repetition between two adjacent images from the same surveillance video in the first image data set. By retaining one frame of multiple frames with similar image content, the risk of including multiple frames of repeated images in the data set can be reduced, thereby reducing the risk of overfitting of the target recognition model.

[0062] Specifically, there are many specific implementations of “filtering out images that do not include the target object”, and typical examples are described below, but do not constitute a limitation of the present disclosure.

[0063] In some embodiments, filtering out images that do not include the target object includes: for an image in the first data set to be determined whether it includes the target object, calculating a second similarity between the image content of the image and a reference image; if the second similarity is greater than a preset fourth threshold, determining that the image is an image that does not include the target object, and removing it from the first data set, wherein the reference image is obtained by capturing an image of the target construction scene when the target object does not exist in the target construction scene.

[0064] Specifically, when there are multiple image acquisition locations, for each image acquisition location, when there is no target object in the image acquisition location, image acquisition can be performed on the image acquisition location to obtain a corresponding reference image. Of course, for the same image acquisition location, reference images can be acquired at different acquisition times and under different weather conditions to improve the richness of the reference images.

[0065] Specifically, there are many specific implementations of "calculating the second similarity", and typical examples are described below, but they do not constitute a limitation of the present disclosure. For example, the SSIM index value (i.e., the second similarity) of the "image to be determined whether it includes the target object" and the reference image is calculated, and if the SSIM index value is greater than a preset fourth threshold, it is determined that the image does not include the target object.

[0066] Specifically, the specific value of the preset fourth threshold can be set by those skilled in the art according to actual conditions and is not limited here. For example, when the second similarity is the SSIM index value, the preset fourth threshold can be 0.8, or 0.9, etc., but is not limited thereto.

[0067] Of course, in other examples, the second similarity may also be calculated by histogram comparison, feature matching, etc.

[0068] It should be noted that, when there are multiple reference images, the “image to be determined whether it includes the target object” can be identified as an image that does not include the target object as long as its second similarity with a reference image is greater than a preset fourth threshold.

[0069] It is understandable that, depending on the construction time period and weather conditions, there may be a reality that construction is stopped for a certain period of time, and the corresponding collected images may not contain the target object. By specifying the image corresponding to the time when construction is stopped as the reference image under the conditions of fixed image collection location and image collection time, and repeatedly judging the "image to be judged whether it includes the target object" and the reference image based on the SSIM index, it is possible to simply and quickly realize the automatic judgment of the image that does not contain the target object.

[0070] In addition, the reference image can be defined as a negative sample and saved separately to improve the robustness of the multi-target recognition model.

[0071] Specifically, there are many specific implementation methods of “filtering out blurred images”, and typical examples are described below, but they do not constitute a limitation of the present disclosure.

[0072] In some embodiments, filtering out blurred images includes: calculating the blurriness of the image to be blurred in the first data set, and if the blurriness is greater than a preset fifth threshold, determining that it is a blurred image and removing it from the first data set.

[0073] Specifically, there are many specific implementations of "calculating blurriness", and typical examples are described below, but they do not constitute a limitation of the present disclosure. For example, based on a blurriness evaluation index, an overly blurry image is automatically identified, where the blurriness evaluation index may include local entropy, and / or image gradient and edge strength, etc., but is not limited thereto.

[0074] Of course, in other examples, the blurriness of the image can be calculated by referring to blur evaluation indicators, focus evaluation (by detecting the focus area of ​​the image, if the image as a whole or a key area is out of focus, it can be judged as blurry), etc.

[0075] It is understandable that image blur may cause loss of high-frequency information or reduced contrast, and the image may be blurry due to the outdoor installation environment of the video surveillance system, weather conditions, etc. By filtering out the blurred images in the first data set, the validity of the data set can be improved.

[0076] It should be noted that when at least two of the following items are executed on the first data set, the four filters of filtering out flowery images, retaining one frame of multiple frames of images with similar image content, filtering out images that do not include target objects, and filtering out blurred images, the specific execution order can be set by technical personnel in this field according to actual conditions and is not limited here.

[0077] It can be understood that by screening the first data set to obtain the second data set, the effectiveness of the second data set can be improved, the workload of manual screening can be reduced, the screening efficiency and accuracy can be improved, and the robustness and calculation accuracy of the target recognition model can be improved.

[0078] S130. For the images in the second data set, mark the location and category of the target objects included therein, and mark the image acquisition time, and / or mark the image acquisition location, and / or mark the weather type when the image was acquired, to obtain a third data set.

[0079] In the disclosed embodiment, the target object in the image is labeled based on the second data set obtained after a screening. In addition, at least one of the following items can also be labeled: the image acquisition location, the image acquisition time, the weather type when the image was acquired, etc.

[0080] Specifically, there are many specific implementation methods of "marking the location and category of the included target objects", and typical examples are described below, but they do not constitute a limitation of the present disclosure.

[0081] In some embodiments, the locations and categories of the included target objects are marked, including:

[0082] For the image to be annotated in the second data set, if it has no image overlap area with the annotated image, it is input into the pre-trained recognition model, the position and category of the target object output by the recognition model are obtained, and the target object is annotated;

[0083] For the image to be labeled in the second data set, if there is an image overlapping area between it and the labeled image, then the image overlapping area is labeled based on the annotation information about the position and category of the target object on the labeled image, and for the remaining area of ​​the image to be labeled, the remaining area is input into the recognition model, the position and category of the target object output by the recognition model are obtained, and then labeled.

[0084] Specifically, the image overlap region is the region in which the image content is the same in the two images. The remaining region is the region in the image to be labeled except the image overlap region.

[0085] Specifically, there are many ways to determine the image overlapping area, for example, based on pixel comparison calculation (for example, calculating the difference between corresponding pixels of two images (such as absolute difference, square difference), and the areas with smaller difference are considered to be the same), feature matching (using SIFT, SURF, ORB and other feature detection and descriptor extraction methods to find matching feature point pairs in the two images, and the areas where these point pairs are located are considered to have the same content), etc., but it is not limited to this.

[0086] Specifically, there are many specific implementation methods of "obtaining a trained recognition model". The typical examples are described below, but they do not constitute a limitation of the present disclosure. For example, a recognition model (such as a YoloV8 model, etc.) is trained based on a public data set of similar construction scenes (such as the MOCS data set mentioned above) to obtain a trained recognition model.

[0087] Specifically, based on the trained recognition model, the bounding box and category of the target object are predicted for the entire image to be labeled (the remaining area of ​​the image to be labeled) to obtain a prediction result (i.e., the position and category of the target object included in the image). In this way, the position and category of the target object included in the image to be labeled (the remaining area of ​​the image to be labeled) can be annotated based on the prediction result.

[0088] Specifically, since the image overlap area of ​​the image to be annotated is the same as the overlap area of ​​the corresponding annotated image, the same annotation information about the "position and category of the target object" can be performed according to the image overlap area of ​​the annotated image. It should be noted that the annotated image mentioned here refers to an image "where the position and category of the target object included are annotated".

[0089] It is understandable that there may be a designated area in the target construction scene that serves as a transfer or storage place for construction machinery during a designated period of time. The images extracted from the corresponding surveillance video show that only a small part of the image area has changed over time. In view of this reality, based on the calculation of image overlapping areas, the annotation copying of similar areas in two images can be realized to reduce the amount of repeated annotation calculations.

[0090] Specifically, there are many specific implementation methods of "marking the image acquisition time and marking the image acquisition location". Typical examples are described below, but they do not constitute a limitation of the present disclosure.

[0091] In some embodiments, marking the image acquisition time and marking the image acquisition location include:

[0092] Identify and extract the image acquisition time and image acquisition location from the image and mark them.

[0093] Specifically, the image acquisition time of a frame of image refers to the time when the video surveillance video acquires the frame of image. The image acquisition location of a frame of image refers to the image acquisition area of ​​the video surveillance video.

[0094] Specifically, there are many specific implementation methods for “identifying and extracting the image acquisition time and the image acquisition location from the image”, such as OCR recognition algorithm, but it is not limited thereto.

[0095] Specifically, each frame of the surveillance video usually has text of the image acquisition time and image acquisition location (such as the upper right corner, etc.), so the acquisition time and acquisition location in the image can be identified and extracted to improve the annotation.

[0096] Specifically, there are many specific implementation methods of "marking the weather type during image acquisition", and typical examples are described below, but they do not constitute a limitation of the present disclosure.

[0097] In some embodiments, the weather type when the image is collected is marked, including:

[0098] The image is input into a pre-trained weather type judgment model, the weather type at the time of image acquisition output by the weather type judgment model is obtained, and the image is labeled.

[0099] Specifically, there are many specific implementation methods of "obtaining a trained weather type judgment model". The typical examples are described below, but they do not constitute a limitation of the present disclosure. For example, a weather type judgment model (such as a ResNet model, etc.) is established, and a weather type judgment data set is established. The weather type judgment data set may include images with the weather type of sunny days when the image is collected, images with the weather type of cloudy days when the image is collected, images with the weather type of rainy days when the image is collected, images with the weather type of foggy days when the image is collected, and images with the weather type of snowy days when the image is collected. The weather type judgment model is trained based on the weather type judgment data set, and the trained weather type judgment model can realize automatic judgment of the weather type of the image.

[0100] Of course, in some other embodiments, S130 may also include: inputting the images in the second image data set into a trained annotation model, and obtaining images output by the annotation model (ie, a third data set).

[0101] It can be understood that by automatically annotating the images in the second data set, the workload of manual annotation is reduced and the annotation efficiency is improved.

[0102] Optionally, the method further includes: in response to a user's adjustment operation on the annotation information, updating the annotation information in the corresponding image.

[0103] Specifically, the adjustment operation may be any operation capable of adjusting the annotation information in the image, which is not specifically limited here.

[0104] The user may adjust the location and category of the target object, and / or the image acquisition time, and / or the image acquisition location, and / or the weather type when the image was acquired, etc. through adjustment operations, but is not limited thereto.

[0105] For example, the label information of "the location and category of the included target object" output by the recognition model is a label prediction file in Yolo label format, which can be converted and output into a label prediction file in XML format. Using the LabelImg labeling tool, with the principle of not cutting the target object in the image and keeping the margin within 5 pixels, manually fine-tune and calibrate multiple target object categories, bounding boxes, occlusion conditions, etc. in each image. But it is not limited to this.

[0106] It is understandable that there may be some errors in automatic labeling, such as missing the target object, a certain deviation in the position of the target object, etc. The labeling errors can be calibrated through manual calibration to improve the accuracy of labeling.

[0107] S140 . For the third data set, retain one frame of multiple frames of images with similar annotation information to obtain a target data set.

[0108] In the disclosed embodiments, during the construction process, for the needs of on-site construction safety management, the user may move the camera angle of the image acquisition device on the video monitoring system interface to review the real-time situation of a specific area of ​​interest. The adjacent frame images generated under this offset situation may have low overall similarity (for example, based on the SSIM indicator), but cover situations where the target object category and location are similar. In order to avoid overfitting of the target recognition model training, a secondary screening can be proposed based on the third data set that has been labeled.

[0109] Optionally, the method also includes: for each category of target objects, determining the images of the target objects of this category in the third data set, and counting the total number of images including the target objects of this category and the proportion of the number of images, and / or the size of the target objects in the images including the target objects of this category and the proportion of the size, and / or the image acquisition location of the images including the target objects of this category, and / or the image acquisition time of the images including the target objects of this category, and / or the weather type when the images including the target objects of this category are acquired, and / or the resolution of the images including the target objects of this category.

[0110] Specifically, the ratio of the number of images including the target object of this category refers to the ratio of “the total number of images including the target object of this category” to “the total number of all images in the third data set”.

[0111] Specifically, the size ratio of the target object in the image including the target object of this category refers to the ratio of “the area of ​​the bounding box of the target object” to “the area of ​​the image”.

[0112] It can be understood that by counting the images in the third data set, including the total number of images and the proportion of the number of images of the target objects of this category, the size of the target objects and the proportion of the size, the image acquisition location, the image acquisition time, the weather type when the image was acquired, the image resolution size, etc., and performing statistical analysis on the images in the annotated third data set, the balance of the third data set can be evaluated.

[0113] In some embodiments, images with similar annotation information meet the following requirements: the categories of the included target objects are the same. Further, optionally, at least one of the following requirements is also met: the image acquisition location is the same, the weather type when the images are acquired is the same, and the difference in the size of the included target objects is less than a fifth preset threshold.

[0114] For example, images with the same image acquisition location, weather type, target object category and target object size are removed, and only one frame is retained.

[0115] It is understandable that, in view of the actual situation of the camera angle of the mobile image acquisition equipment during the construction process, a method of screening images with similar annotation information is proposed, which can reduce the redundancy of the data set and reduce the overfitting during the training of the target recognition model, and help improve the calculation accuracy of the target recognition model.

[0116] The disclosed embodiment can automatically construct a target recognition data set based on the surveillance video of the target construction scene, so as to make full use of the huge data base provided by the video surveillance system and improve the comprehensiveness of the construction object (i.e., target object) categories covered by the target recognition data set. In addition, the automatic construction of the target recognition data set can save a lot of manual time and effort, and reduce the complexity and cost of data set construction.

[0117] In some embodiments, the method further includes: performing data enhancement processing on the images in the target data set, wherein the data enhancement processing includes: flipping, and / or rotating, and / or scaling, and / or random cropping, and / or adding noise pixels, and / or adjusting brightness.

[0118] It can be understood that by performing data enhancement calculations on the images based on the target data set obtained after the secondary screening, the sample size of the target data set can be expanded, and the image variability can be improved, so as to improve the generalization ability and robustness of the target recognition model.

[0119] In summary, the present disclosure improves the construction efficiency, overall richness, intra-class diversity, and effectiveness of image samples of target recognition datasets, and has practicality in target construction scenarios (such as pumped storage engineering scenarios, etc.) and a wide range of adaptability. While making full use of the surveillance video of the target construction scene, it helps to improve the accuracy and robustness of the target recognition model.

[0120] Figure 2 is a schematic diagram of a structure of a device for constructing a target recognition data set provided by an embodiment of the present disclosure. The device for constructing a target recognition data set can be understood as the above-mentioned electronic device or a part of the functional modules in the above-mentioned electronic device. Figure 2 As shown, the target recognition data set construction device 200 includes:

[0121] A first acquisition module 210 is used to acquire a surveillance video of a target construction scene, and extract multiple frames of images from the surveillance video to obtain a first data set;

[0122] A first screening module 220 is used to filter out the distorted images, and / or retain one frame of multiple frames of images with similar image contents, and / or filter out images that do not include the target object, and / or filter out blurred images for the first data set, to obtain a second data set;

[0123] A first labeling module 230 is used to label the location and category of the target object included in the image in the second data set, and to label the image acquisition time, and / or the image acquisition location, and / or the weather type when the image was acquired, to obtain a third data set;

[0124] The second screening module 240 is used to retain one frame of multiple frames of images with similar annotation information for the third data set to obtain a target data set.

[0125] In some embodiments, the monitoring video includes videos obtained by capturing images of the target construction scene from different camera angles;

[0126] And / or, the surveillance video includes an image in which the area ratio of the target object in the image is less than a first preset threshold, an image in which the area ratio of the target object in the image is greater than or equal to the first preset threshold, an image in which the distance between the target objects is less than a second preset threshold, an image in which the distance between the target objects is greater than or equal to the second preset threshold, an image in which at least two of the target objects occlude each other, an image in which none of the target objects occlude each other, an image in which at least one of the target objects is divided by an occlusion, and an image in which none of the target objects is divided by an occlusion;

[0127] and / or, videos obtained by collecting images of the target construction scene under different weather types;

[0128] The first acquisition module 210 includes a first extraction submodule for extracting multiple frames of images from the surveillance video to obtain a first data set. The first extraction submodule is specifically used to extract frames from the surveillance video at a preset time interval to obtain the first data set.

[0129] In some embodiments, the first screening module 220 includes a first screening submodule for filtering out flower screen images, and the first screening submodule is specifically used to, for the images to be subjected to flower screen judgment in the first data set, input them into a trained flower screen judgment model, obtain a flower screen judgment result output by the flower screen judgment model, and if the flower screen judgment result is a flower screen, remove it from the first data set;

[0130] In some embodiments, the first screening module 220 includes a second screening submodule for retaining one frame of multiple frames of images with similar image contents, and the second screening submodule is specifically used to, for an image pair to be subjected to similarity calculation in the first data set, calculate a first similarity of the image contents of the image pair, and if the first similarity is greater than a preset third threshold, remove one frame of the image in the image pair from the first data set;

[0131] In some embodiments, the first screening module 220 includes a third screening submodule for filtering out images that do not include the target object, and the third screening submodule is specifically used to, for the image to be determined whether to include the target object in the first data set, calculate the second similarity of the image content with the reference image, if the second similarity is greater than a preset fourth threshold, determine that it is an image that does not include the target object, and remove it from the first data set, wherein the reference image is obtained by performing image acquisition on the target construction scene when the target object does not exist in the target construction scene;

[0132] In some embodiments, the first filtering module 220 includes a fourth filtering submodule for filtering out blurred images. The fourth filtering submodule is specifically used to calculate the blurriness of the image to be blurred in the first data set. If the blurriness is greater than a preset fifth threshold, it is determined to be a blurred image and removed from the first data set.

[0133] In some embodiments, the first labeling module 230 includes: a first labeling submodule, which is used to label the position and category of the target object included, and the first labeling submodule is specifically used to input the image to be labeled in the second data set into a pre-trained recognition model if it has no image overlapping area with the labeled image, obtain the position and category of the target object output by the recognition model, and label it;

[0134] For the image to be labeled in the second data set, if there is an image overlapping area between it and the labeled image, the image overlapping area of ​​the image to be labeled is labeled based on the annotation information about the position and category of the target object on the labeled image, and for the remaining area of ​​the image to be labeled, the remaining area is input into the recognition model, the position and category of the target object output by the recognition model are obtained, and then labeled.

[0135] In some embodiments, the first labeling module 230 includes: a second labeling submodule, used to label the image acquisition time and the image acquisition location. The second labeling submodule is specifically used to use an OCR recognition algorithm to identify and extract the image acquisition time and image acquisition location from the image, and label them.

[0136] In some embodiments, the first labeling module 230 includes: a third labeling sub-module, used to label the weather type when the image is collected, and the third labeling sub-module is specifically used to input the image into a pre-trained weather type judgment model, obtain the weather type when the image is collected output by the weather type judgment model, and label it.

[0137] In some embodiments, the device further includes: a first updating module, configured to update the annotation information in the corresponding image in response to a user's adjustment operation on the annotation information.

[0138] In some embodiments, the device further includes: a first statistical module, which is used to determine, for each category of target objects, images of the target objects of the category in the third data set, and to count the total number of images of the target objects of the category and the proportion of the number of images, and / or the size of the target objects in the images of the target objects of the category and the proportion of the size, and / or the image acquisition location of the images of the target objects of the category, and / or the image acquisition time of the images of the target objects of the category, and / or the weather type when the images of the target objects of the category are acquired, and / or the resolution of the images of the target objects of the category;

[0139] Among them, images with similar annotation information meet the following requirements: the image acquisition location is the same, the weather type when the images are acquired is the same, the categories of the included target objects are the same, and the difference in the sizes of the included target objects is less than a fifth preset threshold.

[0140] In some embodiments, the device also includes: a first enhancement module, used to perform data enhancement processing on the images in the target data set, wherein the data enhancement processing includes: flipping, and / or rotating, and / or scaling, and / or random cropping, and / or adding noise pixels, and / or adjusting brightness.

[0141] In some embodiments, the target construction scene includes a pumped storage construction scene;

[0142] The image acquisition area includes: the dam filling area of ​​the upper reservoir, and / or the dam filling area of ​​the lower reservoir, and / or the reservoir basin excavation area, and / or the inlet and outlet construction area, and / or the construction branch tunnel, and / or the factory traffic tunnel, and / or the ventilation and safety tunnel, and / or the diversion and discharge tunnel, and / or the sand-mixing system, and / or the mining yard, and / or the transfer yard, and / or the waste dump, and / or the main transformer tunnel area of ​​the powerhouse, and / or the tail gate tunnel area;

[0143] The target objects include: heavy construction machinery, and / or small construction equipment, and / or construction personnel, and / or protective equipment, and / or construction safety slogans, and / or building materials, wherein the heavy construction machinery includes excavators, and / or dump trucks, and / or loaders, and / or bulldozers, and / or rollers, and / or concrete mixers, and / or excavator drills, and / or crushing drills, and / or tank trucks, and / or sprinkler trucks, and / or material transport trucks.

[0144] The device provided in this embodiment can execute the method of any of the above embodiments, and its execution method and beneficial effects are similar, which will not be repeated here.

[0145] An embodiment of the present disclosure further provides an electronic device, which includes: a memory, in which a computer program is stored; and a processor, for executing the computer program. When the computer program is executed by the processor, the method of any of the above embodiments can be implemented.

[0146] For example, Figure 3 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Figure 3 , which shows a schematic diagram of the structure of an electronic device 300 suitable for implementing the embodiment of the present disclosure. The electronic device 300 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0147] like Figure 3 As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0148] Typically, the following devices may be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 308 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 309. The communication devices 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0149] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0150] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0151] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0152] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0153] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a surveillance video of a target construction scene, and extracts multiple frames of images from the surveillance video to obtain a first data set; for the first data set, filters out flowery images, and / or retains one frame of multiple frames of images with similar image content, and / or filters out images that do not include target objects, and / or filters out blurred images to obtain a second data set; for the images in the second data set, marks the location and category of the target objects included, and marks the image acquisition time, and / or marks the image acquisition location, and / or marks the weather type when the image is acquired, to obtain a third data set; for the third data set, retains one frame of multiple frames of images with similar annotation information to obtain a target data set.

[0154] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0155] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0156] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.

[0157] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0158] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0159] The embodiments of the present disclosure also provide a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method of any of the above embodiments can be implemented. The execution method and beneficial effects are similar and will not be repeated here.

[0160] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, 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 "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0161] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for constructing a target recognition dataset. It is characterized in that include: Acquire a surveillance video of a target construction scene, and extract multiple frames of images from the surveillance video to obtain a first data set; For the first data set, filter out the distorted images, and / or retain one frame of multiple frames of images with similar image content, and / or filter out images that do not include the target object, and / or filter out blurred images, to obtain a second data set; For the images in the second data set, mark the location and category of the target objects included therein, and mark the image acquisition time, and / or mark the image acquisition location, and / or mark the weather type when the image was acquired, to obtain a third data set; For the third data set, one frame is retained from multiple frames of images with similar annotation information to obtain a target data set.

2. The method according to claim 1, It is characterized in that The monitoring video includes videos obtained by collecting images of the target construction scene from different camera angles; And / or, the surveillance video includes an image in which the area ratio of the target object in the image is less than a first preset threshold, an image in which the area ratio of the target object in the image is greater than or equal to the first preset threshold, an image in which the distance between the target objects is less than a second preset threshold, an image in which the distance between the target objects is greater than or equal to the second preset threshold, an image in which at least two of the target objects occlude each other, an image in which none of the target objects occlude each other, an image in which at least one of the target objects is divided by an occlusion, and an image in which none of the target objects is divided by an occlusion; and / or, videos obtained by collecting images of the target construction scene under different weather types; The step of extracting a plurality of frames of images from the surveillance video to obtain a first data set includes: extracting frames from the surveillance video at a preset time interval to obtain the first data set.

3. The method according to claim 1, It is characterized in that The filtering out the distorted screen image includes: For the image to be subjected to the flower screen judgment in the first data set, input it into the trained flower screen judgment model, obtain the flower screen judgment result output by the flower screen judgment model, and if the flower screen judgment result is a flower screen, remove it from the first data set; The step of retaining one frame of multiple frames of images with similar image contents comprises: For the image pair to be similarity calculated in the first data set, calculating a first similarity of image content of the image pair, and if the first similarity is greater than a preset third threshold, removing a frame of image in the image pair from the first data set; The filtering out of images that do not include the target object comprises: For an image in the first data set to be determined whether it includes a target object, a second similarity between the image content of the image and a reference image is calculated; if the second similarity is greater than a preset fourth threshold, the image is determined to be an image that does not include the target object, and the image is removed from the first data set, wherein the reference image is obtained by performing image acquisition on the target construction scene when the target object does not exist in the target construction scene; The filtering out the blurred image comprises: For the image to be blurred in the first data set, its blurriness is calculated. If the blurriness is greater than a preset fifth threshold, it is determined to be a blurred image and is removed from the first data set.

4. The method according to claim 1, It is characterized in that The marking of the location and category of the target object includes: For the image to be annotated in the second data set, if it has no image overlap area with the annotated image, input it into a pre-trained recognition model, obtain the position and category of the target object output by the recognition model, and annotate it; For an image to be annotated in the second data set, if there is an image overlap area between the image and the annotated image, annotate the image overlap area of ​​the image to be annotated based on the annotation information about the position and category of the target object on the annotated image, and for a remaining area of ​​the image to be annotated, input the remaining area into the recognition model, obtain the position and category of the target object output by the recognition model, and annotate; The marking of the image acquisition time and the marking of the image acquisition location include: Use OCR recognition algorithm to identify and extract the image acquisition time and image acquisition location from the image, and mark them; The marking of the weather type during image acquisition includes: Input the image into a pre-trained weather type judgment model, obtain the weather type when the image is collected, and mark it; The method further includes: in response to a user's adjustment operation on the annotation information, updating the annotation information in the corresponding image.

5. The method according to claim 1, It is characterized in that The method further includes: For each category of target objects, determine the images of the target objects of the category in the third data set, and count the total number of images of the target objects of the category and the proportion of the number of images, and / or the size of the target objects in the images of the target objects of the category and the proportion of the size, and / or the image acquisition location of the images of the target objects of the category, and / or the image acquisition time of the images of the target objects of the category, and / or the weather type when the images of the target objects of the category were acquired, and / or the resolution of the images of the target objects of the category; Among them, images with similar annotation information meet the following requirements: the image acquisition location is the same, the weather type when the images are acquired is the same, the categories of the included target objects are the same, and the difference in the sizes of the included target objects is less than a fifth preset threshold.

6. The method according to claim 1, It is characterized in that Also includes: Data enhancement processing is performed on the images in the target data set, wherein the data enhancement processing includes: flipping, and / or rotating, and / or scaling, and / or random cropping, and / or adding noise pixels, and / or adjusting brightness.

7. The method according to any one of claims 1 to 6, It is characterized in that The target construction scenario includes a pumped storage construction scenario; The image acquisition locations include: the dam filling area of ​​the upper reservoir, and / or the dam filling area of ​​the lower reservoir, and / or the reservoir basin excavation area, and / or the inlet and outlet construction area, and / or the construction branch tunnel, and / or the plant traffic tunnel, and / or the ventilation and safety tunnel, and / or the diversion and discharge tunnel, and / or the sand-mixing system, and / or the mining yard, and / or the transfer yard, and / or the waste dump, and / or the main transformer tunnel area of ​​the plant, and / or the tail gate tunnel area; The target objects include: heavy construction machinery, and / or small construction equipment, and / or construction personnel, and / or protective equipment, and / or construction safety slogans, and / or building materials, wherein the heavy construction machinery includes excavators, and / or dump trucks, and / or loaders, and / or bulldozers, and / or rollers, and / or concrete mixers, and / or excavator drills, and / or crushing drills, and / or tank trucks, and / or sprinkler trucks, and / or material transport trucks.

8. A device for constructing a target recognition data set, It is characterized in that include: A first acquisition module is used to acquire a surveillance video of a target construction scene, and extract multiple frames of images from the surveillance video to obtain a first data set; A first screening module is used to filter out the distorted images, and / or retain one frame of multiple frames of images with similar image contents, and / or filter out images that do not include the target object, and / or filter out blurred images for the first data set, to obtain a second data set; a first labeling module, for labeling the positions and categories of the target objects included in the images in the second data set, and labeling the image acquisition time, and / or the image acquisition location, and / or the weather type when the image was acquired, to obtain a third data set; The second screening module is used to retain one frame of multiple frames of images with similar annotation information for the third data set to obtain a target data set.

9. An electronic device, It is characterized in that include: A processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Image annotation method and device, computer equipment and storage medium

    CN110781859A

  • Category labeling method and device, electronic equipment and storage medium

    CN111274426A

  • Object recognition method and device, electronic equipment and medium

    CN112766118A

Cited By

  • Vehicle-mounted wireless data communication method for railway section construction protection

    CN120935531A

  • A vehicle-mounted wireless data communication method for railway section construction protection

    CN120935531B