A target detection method and device for occluded object recognition
By using pre-labeled target images and shading templates to train the target detection model, the problem that shading construction machinery cannot be accurately identified is solved, and the construction machinery identification is realized under shading situations is improved, and the safety of transmission lines and the safety guarantee of construction personnel is improved.
Patent Information
- Application Number
- CN202111273745.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2041-10-29
AI Technical Summary
The prior art is difficult to accurately identify construction machinery when construction machinery is blocked, which affects the maintenance of transmission lines and the life safety of construction personnel.
By acquiring pre-labeled target images and corresponding image tags, the occlusion templates are determined, and the templates and the images to be detected are input into the pre-trained target detection model to identify the type of construction machinery in the occlusion situation.
It realizes the accurate identification of the type of construction machinery under shading, reduces the error in identifying shading objects, improves the monitoring of hidden dangers in transmission lines, and ensures the life safety of construction personnel.
Smart Images

Figure CN114092787B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a target detection method and device for identifying occluded objects. Background Art
[0002] With the development of society and the progress of science and technology, people's daily life and factory production are mainly supported by electrical equipment. Without electricity, people's daily life and normal factory production will be affected to a certain extent. At present, power transmission is mainly completed through erected high-voltage towers and underground transmission lines.
[0003] The layout of transmission lines is complex, and they pass through many areas with complex environmental conditions, such as construction sites and mining areas. In these places, it is inevitable that construction workers will not pay attention to the transmission lines, damage the transmission equipment, cause power outages in the transmission area, and even threaten the lives of construction workers. At present, construction machinery in the construction area can be monitored by installing cameras, which can capture or identify construction machinery. However, if the construction machinery is blocked by obstacles on site, such as trees, walls and other obstacles, the camera equipment may not capture the construction machinery and cannot give advance warnings.
[0004] Based on this, there is an urgent need for a technical solution that can accurately identify construction machinery that threatens transmission lines when the construction machinery is blocked, so as to avoid damaging the transmission lines and protect the lives of construction workers. Summary of the invention
[0005] The embodiments of the present application provide a target detection method and device for identifying obstructed objects, which are used to solve the problem that obstructed construction machinery cannot be accurately identified, affecting the maintenance of power transmission lines and the life safety of construction personnel.
[0006] On the one hand, the present application provides a target detection method for occluded object recognition, the method comprising:
[0007] Acquire several first target images and corresponding image labels. The first target image is an image with a target area pre-marked. The image label is used to indicate the target type corresponding to the first target image. According to each first target image and the corresponding image label, determine the corresponding occlusion template of each first target image with the same image label. The occlusion template is a graphic area that matches the target area, and the occlusion template corresponding to each image label includes several occlusion sub-templates that divide the graphic area. Each occlusion template and each first target image are used as sample data and input into a preset target detection model to train the target detection model. Receive a second target image captured by an image acquisition device. The target type corresponding to the second target image is the same as the target type corresponding to each first target image. Determine the target type in the second target image through the trained target detection model.
[0008] In one implementation of the present application, a plurality of groups of images to be processed are divided according to the image labels of each first target image. The area of the pre-marked target region of each group of images to be processed is determined. The average value of the sum of the areas of each target region is calculated to determine the area of the corresponding target type occlusion template according to the average value of the sum of the areas of each target region. According to the area of the occlusion template of the target type, the corresponding occlusion template of each first target image with the same image label is determined.
[0009] In one implementation of the present application, a pre-marked target area in a first target image is determined. According to the area of the pre-marked target area, a corresponding mesh structure is generated to divide the pre-marked target area through the mesh structure. According to the number of grids in the mesh structure of the divided target area, a corresponding occlusion template of each first target image with the same image label is determined.
[0010] In one implementation of the present application, a pre-marked target area in a first target image is determined. The pre-marked target area includes: a mechanically visible area and a mechanically occluded area. According to the area graphs of the mechanically visible area and the mechanically occluded area, the pre-marked target area in the first target image is divided to determine the occlusion sub-template of each first target image. According to the image label and the occlusion sub-template, the corresponding occlusion template of each first target image with the same image label is determined.
[0011] In one implementation of the present application, a first matching threshold is generated based on a first degree of overlap between each occlusion template and a mechanically visible area of the image to be detected. A second matching threshold is generated based on a second degree of overlap between the mechanically visible area of each occlusion template and the mechanically visible area of the image to be detected. Based on the first matching threshold, the second matching threshold, and a preset corresponding relationship, the occlusion template corresponding to the image to be detected is determined.
[0012] In one implementation of the present application, after determining each first degree of overlap and each second degree of overlap, determine whether there is a second degree of overlap greater than a second matching threshold value among the second degrees of overlap corresponding to each occlusion template. If so, use the corresponding occlusion template as the occlusion template corresponding to the image to be detected. If not, determine whether there is a first degree of overlap greater than the first matching threshold value and a corresponding second degree of overlap less than the second matching threshold value among the first degrees of overlap and second degrees of overlap of each occlusion template. If so, use the corresponding occlusion template as the occlusion template corresponding to the image to be detected. If not, generate a prompt message.
[0013] In one implementation of the present application, the second target image is input into a target detection model to determine whether a target pixel exists based on the pixel value of each pixel in the second target image. The target pixel is a pixel of a construction machine. The target detection model determines the graphic outline formed by the target pixel to mark the visible mechanical area and predicted mechanical type in the second target image based on the graphic outline. The visible mechanical area, predicted mechanical type and corresponding occlusion template in the second target image are used as training labels, and the training labels are processed by the trained target detection model to output the target type and visible mechanical area in the second target image.
[0014] In one implementation of the present application, the distance between the construction machinery corresponding to the second target image and the prohibited area is determined according to the target type and the acquisition information of the second target image. The acquisition information includes: acquisition time and acquisition location. When the distance between the construction machinery corresponding to the second target image and the prohibited area is less than the preset safety distance, an alarm message is generated and sent to the monitoring terminal.
[0015] In one implementation of the present application, an image acquisition device is disposed within a preset range of a power transmission line to acquire images within the preset range of the power transmission line.
[0016] On the other hand, the present application also provides a target detection device for occluded object recognition, the device comprising:
[0017] At least one processor; and a memory in communication with the at least one processor. The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:
[0018] Acquire several first target images and corresponding image labels. The first target image is an image with a target area pre-marked. The image label is used to indicate the target type corresponding to the first target image. According to each first target image and the corresponding image label, determine the corresponding occlusion template of each first target image with the same image label. The occlusion template is a graphic area that matches the target area, and the occlusion template corresponding to each image label includes several occlusion sub-templates that divide the graphic area. Each occlusion template and each first target image are used as sample data and input into a preset target detection model to train the target detection model. Receive a second target image captured by an image acquisition device. The target type corresponding to the second target image is the same as the target type corresponding to each first target image. Determine the target type in the second target image through the trained target detection model.
[0019] Through the above scheme, the present application determines the construction machinery that poses a safety hazard to the transmission line in the power transmission scenario as the detection target. The target image containing the construction machinery is processed to determine the occlusion template of each target image under occlusion, and the occlusion template is classified according to the image label. The occlusion template is input into the target detection model to train the target detection model. When the target detection model recognizes the second target image, the target type in the second target image is determined by inputting the occlusion template of the target detection model. The present application can accurately identify the type of the object (construction machinery) when it is occluded, avoiding errors in object recognition due to the existence of occlusion areas when identifying the occluded object, resulting in the inability to accurately identify the type of the occluded object. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0021] Figure 1 A schematic diagram of a flow chart of a target detection method for identifying an occluded object in an embodiment of the present application;
[0022] Figure 2 A schematic diagram of a first target image in a target detection method for identifying an occluded object in an embodiment of the present application;
[0023] Figure 3 A schematic diagram of an occlusion template of a target detection method for identifying an occluded object in an embodiment of the present application;
[0024] Figure 4 Another flowchart of a target detection method for identifying an occluded object in an embodiment of the present application is shown;
[0025] Figure 5 A schematic diagram of another occlusion template of a target detection method for identifying occluded objects in an embodiment of the present application;
[0026] Figure 6 Another flowchart of a target detection method for identifying an occluded object in an embodiment of the present application is shown;
[0027] Figure 7 Schematic diagram of the structure of a target detection device for identifying occluded objects in an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0029] Construction machinery around the power transmission lines, such as excavators and cranes, may affect the power transmission lines during operation. Usually, it is necessary to arrange special personnel to supervise the construction machinery to prevent the construction machinery from damaging the power transmission lines during operation. If the transmission lines are damaged, the power outage may occur at the least, and the lives of construction workers may be endangered at the worst.
[0030] Currently, cameras and other image acquisition devices can be installed near power transmission lines to monitor construction machinery and prevent them from damaging power transmission lines. Due to the complex environment of the construction site, there may be many objects such as trees and walls that block the construction machinery, resulting in the camera being unable to accurately identify the construction machinery and unable to give warning information in time.
[0031] Based on this, the present application provides a target detection method and device for identifying obstructed objects, which can accurately identify obstructed construction machinery, prevent construction machinery from damaging power transmission lines and threatening the lives of personnel at the construction site.
[0032] The following describes in detail various embodiments of the present application in conjunction with the accompanying drawings.
[0033] The present application embodiment provides a target detection method for identifying an occluded object, such as Figure 1 As shown, the method may include steps S101-S103:
[0034] S101: The server obtains a number of first target images and corresponding image tags.
[0035] The first target image is an image with a target area pre-marked; and the image label is used to indicate the target type corresponding to the first target image.
[0036] The first target image may be an image containing construction machinery, such as a photo of an excavator or a photo of a crane. Taking an excavator as an example, the outer frame of the excavator (e.g. Figure 2 As shown in FIG. 2 , the machine visible frame 201 and the machine overall frame 202 are used to mark the outer frame of the excavator as the target area. The image label of the first target image, i.e., the excavator image, is given, and the image label indicates that the first target image is an excavator.
[0037] It should be noted that the server, as the executor of the target detection method for identifying occluded objects, exists only for exemplary purposes. The executor is not limited to the server, and this application does not make any specific limitations on this.
[0038] S102: The server determines, according to each first target image and the corresponding image label, a corresponding occlusion template for each first target image with the same image label.
[0039] The occlusion template is a graphic area that matches the target area, and the occlusion template corresponding to each image tag includes a plurality of occlusion sub-templates that divide the graphic area.
[0040] The occlusion template is Figure 3 As shown, 302 and 303 are two shielding sub-templates of the shielding template of the crane, and the black area is the shielding area.
[0041] In the embodiment of the present application, the occlusion template corresponding to each first target image of the same image label can be determined by executing the following method. Specifically:
[0042] First, the server divides the first target images into multiple groups of images to be processed according to the image labels of the first target images.
[0043] There are many types of construction machinery corresponding to the first target image, and the server can group several first target images according to the image label, that is, the first target image of one type of construction machinery is a group of images to be processed, such as a group of excavator images to be processed and a group of crane images to be processed.
[0044] Then, the server determines the area of the pre-marked target region of each group of images to be processed.
[0045] The server can calculate the area of the pre-marked target region of the image in the image group to be processed, such as Figure 2 As shown, the area of the pre-marked target region is the area of the mechanical overall frame 202. The server calculates the area of the target region of each image in the image group to be processed.
[0046] In addition, to avoid different proportions of each image in the image group to be processed, the server may reduce or enlarge each image by a certain proportion to make the size of each image in the image group to be processed the same, so as to avoid excessive errors when calculating the area of the pre-marked target area.
[0047] Next, the server calculates an average value of the sum of the areas of the target regions, so as to determine the area of the occlusion template of the corresponding target type according to the average value of the sum of the areas of the target regions.
[0048] The server can calculate the average value of the sum of the areas of each target area. For example, if the target area areas of each image in the image group to be processed are A1, A2, A3, A4, and A5, and the average value is (A1+A2+A3+A4+A5) / 5, the server uses the average value as the area of the occlusion template.
[0049] Finally, the server determines the corresponding occlusion templates of the first target images with the same image label according to the areas of the occlusion templates of the target types.
[0050] The server can generate an occlusion template based on the target type, such as a crane, and the area of the occlusion template of the crane, such as Figure 3 As shown, the crane shielding template includes a shielding sub-template 301 , a shielding sub-template 302 , and a shielding sub-template 303 .
[0051] Since the occlusion template includes several occlusion sub-templates, the occlusion sub-templates are generated according to different occlusion areas. The server can determine the occlusion template by the following method, such as Figure 4 As shown, steps S401-S403 are included:
[0052] S401: The server determines a pre-marked target area in a first target image.
[0053] Among them, the pre-marked target areas include: mechanically visible areas, mechanically blocked areas, such as Figure 2 shown.
[0054] S402: The server divides the pre-marked target area in the first target image according to the area graphs of the mechanical visible area and the mechanical occlusion area to determine the occlusion sub-template of each first target image.
[0055] Due to the different types of construction machinery and different obstructions, the area graphics of the machine visible area and the machine obstruction area in the first target image are different, for example: Figure 5 The area patterns formed by the mechanically visible area and the mechanically blocked area are different among the second sub-template 502, the third sub-template 503, the fourth sub-template 504, the fifth sub-template 505, the sixth sub-template 506, and the seventh sub-template 507.
[0056] Therefore, the server may divide the target area pre-marked in the first target image according to the area graph, and obtain occlusion sub-templates with different area graphs for the mechanically visible area and the mechanically occluded area.
[0057] S403: The server determines the occlusion template corresponding to each first target image with the same image label according to the image label and the occlusion sub-template.
[0058] For example, if the image label is excavator and the excavator has 7 occlusion sub-templates, the server can obtain the excavator occlusion template including the 7 occlusion sub-templates.
[0059] In one embodiment of the present application, the server may determine each occlusion sub-template by executing the following method:
[0060] First, the server calculates the area of the mechanically visible region and the area of the blocked region in the target area of each image in the image group to be processed.
[0061] Then, the server classifies each image in the to-be-processed image group according to the occlusion type, such as tree occlusion, fence occlusion, etc., that is, tree occlusion is one category, fence occlusion is another category, etc. The occlusion type can be pre-labeled manually or by machine.
[0062] Next, the server calculates the sum of the areas of the mechanically visible areas of the images of each occlusion type such as X1 in the image group to be processed, S1, and the sum of the areas of the occluded areas of each image, S2. The server calculates the average value of S1 and S2, that is, if there are N images, the average value of the sum of the areas of the mechanically visible areas is: S1 / N; the average value of the sum of the areas of the occluded areas is: S2 / N.
[0063] The server can generate the area of the mechanically visible area and the area of the occluded area in the occluded sub-template of X1 by using the average value of the sum of the areas of the mechanically visible area: S1 / N and the average value of the sum of the areas of the occluded area: S2 / N. Then, the server generates an occluded sub-template based on the area of the mechanically visible area and the area of the occluded area. The occluded sub-templates of other occlusion types are determined in a similar manner and will not be described in detail here.
[0064] In one embodiment of the present application, the server may also determine the occlusion template by the following method, the specific scheme is as follows:
[0065] First, the server determines a pre-marked object region in a first object image.
[0066] like Figure 2 As shown, the server determines that the pre-marked target area includes a mechanical visible frame 201 and a mechanical overall frame 202 .
[0067] Then, the server generates a corresponding mesh structure according to the area of the pre-marked target area, so as to divide the pre-marked target area through the mesh structure.
[0068] The server can calculate the area of the pre-marked target area. The area can be calculated by counting the sum of the areas of the target areas of the first target images with the same image label, then calculating the average of the sum of the areas, and using the average as the area of the pre-marked target area of the first target image with the image label.
[0069] The server generates a mesh structure based on the area of the pre-marked target area, such as Figure 5 As shown, the mesh structure belongs to the image mesh structure of the excavator. For example, the target area of the excavator in the photo has an area of 20, and its length is 5 and its height is 4. The target area can be divided into several equal parts, thereby generating the mesh structure of the excavator. Through the mesh structure, the server divides the target area (excavator) into several grids.
[0070] Finally, the server determines the corresponding occlusion templates of the first target images with the same image label according to the number of grids in the mesh structure of the divided target area.
[0071] The server can determine the occlusion templates of each first target image with the same image label (excavator) according to the number of grids, including the number of grids in the occlusion area and the number of grids in the machine visible area. That is, under different occlusion types of the first target image, an occlusion template containing several occlusion sub-templates is generated. Figure 5 As shown, the shielding template of the excavator includes: a first sub-template 501 (unshielded), a second sub-template 502, a third sub-template 503, a fourth sub-template 504, a fifth sub-template 505, a sixth sub-template 506, and a seventh sub-template 507.
[0072] After the server obtains several occlusion templates, the corresponding relationship between the image of the construction machinery to be detected and the occlusion template can be pre-set to accurately identify the type of construction machinery through the occlusion template. The present application can determine the occlusion template corresponding to the image to be detected by executing the following method, such as Figure 6 As shown, the specific steps include:
[0073] S601: The server generates a first matching threshold according to a first overlap degree between each occlusion template and a mechanically visible area of the image to be detected.
[0074] The server can calculate the overall area of the machine in the occlusion template (such as Figure 2 The first overlap between the image 202 and the machine visible area of the image to be detected is the overlap (Intersection over Union, IoU) of the two areas, and the calculation formula is the first overlap O k =(the intersection of the mechanical overall area in the occlusion template and the mechanical visible area of the image to be detected) / (the union of the mechanical overall area in the occlusion template and the mechanical visible area of the image to be detected).k represents the first overlap between the kth occlusion template and the image to be detected. The first matching threshold may be a threshold calculated in advance when matching the occlusion template with a number of sample data.
[0075] S602: The server generates a second matching threshold according to a second degree of overlap between the mechanically visible area of each occlusion template and the mechanically visible area of the image to be detected.
[0076] The second overlap O k =(the intersection of the mechanically visible area in the occlusion template and the mechanically visible area of the image to be detected) / (the union of the mechanical overall area in the occlusion template and the mechanically visible area of the image to be detected), where the mechanically visible area is Figure 2 No.201,O k The second matching threshold can be obtained in the same manner as the first matching threshold, or can be set in other ways, and the specific way is not limited.
[0077] S603: The server determines the occlusion template corresponding to the image to be detected according to the first matching threshold, the second matching threshold and the preset corresponding relationship.
[0078] The preset correspondence is shown in the following table:
[0079]
[0080] According to the first matching threshold, the second matching threshold and the preset corresponding relationship, the occlusion template corresponding to the image to be detected is determined as follows:
[0081] S604: After determining each first overlap degree and each second overlap degree, the server determines whether there is a second overlap degree greater than a second matching threshold among the second overlap degrees corresponding to each occlusion template.
[0082] S605: The server determines that among the second overlap degrees corresponding to the occlusion templates, there is a second overlap degree greater than the second matching threshold, and uses the corresponding occlusion template as the occlusion template corresponding to the image to be detected.
[0083] S606: If the server determines that there is no second overlap degree greater than the second matching threshold among the corresponding second overlap degrees of each occlusion template, it determines whether there is a first overlap degree greater than the first matching threshold and a corresponding second overlap degree less than the second matching threshold among the first overlap degrees and second overlap degrees of each occlusion template.
[0084] S607: The server determines that among the first overlap and the second overlap of each occlusion template, there is a first overlap greater than the first matching threshold and the corresponding second overlap less than the second matching threshold, and uses the corresponding occlusion template as the occlusion template corresponding to the image to be detected.
[0085] S608: If the server determines that among the first overlap degrees and the second overlap degrees of each occlusion template, there is no first overlap degree greater than the first matching threshold and the corresponding second overlap degree is less than the second matching threshold, a prompt message is generated.
[0086] The prompt information includes: text and sound.
[0087] Prompt information, for example: the image does not match the text or sound of the occlusion template.
[0088] S103: The server uses each occlusion template and each first target image as sample data and inputs them into a preset target detection model to train the target detection model.
[0089] In an embodiment of the present application, the target detection model may be a YOLO model, such as a YOLO v3 model based on the darknet53 network architecture. The server uses each occlusion template, the first target image, and the corresponding image label as training samples to train the target detection model. The type of occlusion template may be calculated in softmax form, and cross entropy is used as the loss function.
[0090] The target detection model of the present application is a multi-task learning model, which can use the overall area of the training machine, the visible area of the machine, the type of construction machinery, and the type corresponding to the occlusion template as tasks of the target detection model.
[0091] S104: The server receives the second target image captured by the image capture device.
[0092] The target type corresponding to the second target image is the same as the target type corresponding to each first target image.
[0093] In the embodiment of the present application, the image acquisition device may be a camera, a video camera, a mobile phone or other device, which is set within a preset range of the transmission line to acquire images within the preset range of the transmission line. The preset range may be set according to the actual image acquisition device acquisition distance. The image acquisition device may also be set on a transmission tower.
[0094] S105: The server determines the target type in the second target image through the trained target detection model.
[0095] In the embodiment of the present application, the target type in the second target image is determined by executing the following method, specifically:
[0096] First, the server inputs the second target image into the target detection model to determine whether there is a target pixel point according to the pixel value of each pixel point in the second target image.
[0097] Among them, the target pixel point is the pixel point of the construction machinery.
[0098] The server determines the pixel values of all pixels in the second target image through the target detection model, and determines whether there are pixels of construction machinery in the second target image according to the pixel values. The second target image may be a video, and the server needs to process the video by framing, determine the frame images of each frame or the preset interval frames, and process them to determine whether there are pixels of construction machinery.
[0099] Then, the server determines the graphic outline formed by the target pixel points through the target detection model, so as to mark the visible area of the machine in the second target image and predict the machine type according to the graphic outline.
[0100] The server forms a graphic outline based on the target pixel points. For example, the bucket of an excavator is the most prominent feature. When the graphic outline formed by the target pixel points of the second target image is a bucket, the server can mark the visible area of the machine in the second target image and predict the machine type as an excavator.
[0101] The above-mentioned method of determining the type of machinery through the graphic outline formed by pixel points has low accuracy and may cause misjudgment when the bucket is obstructed. In order to avoid the inaccuracy of identifying the type of construction machinery through pixel points, the present application adds an occlusion template to the target detection model to reduce the error of construction machinery identification.
[0102] Finally, the server uses the visible area of the machine in the second target image, the predicted machine type and the corresponding occlusion template as training labels, processes the training labels through the trained target detection model, and outputs the target type and the visible area of the machine in the second target image.
[0103] Through the above scheme, the present application can generate different occlusion templates according to different construction machinery and occlusion types, and identify the type of construction machinery in the image according to the occlusion template, which can improve the recognition accuracy of the type of construction machinery. In addition, for construction machinery under occlusion, the occluded construction machinery can be accurately identified through the occlusion template. Improving the recognition accuracy of construction machinery under occlusion can improve the monitoring of hidden dangers of transmission lines, thereby preventing transmission lines from being damaged by construction machinery, so as to protect the lives of construction personnel and people near construction machinery.
[0104] After determining the target type in the second target image, the next step of alarming and other processing can be performed according to the target type. Specifically:
[0105] The server determines the distance between the construction machinery corresponding to the second target image and the prohibited area according to the target type and the collected information of the second target image.
[0106] The collection information includes: collection time and collection location.
[0107] For example, the server pre-sets the correspondence between the prohibited areas and the types of construction machinery, where prohibited area A prohibits construction machinery a, prohibited area B prohibits construction machinery b, etc. After identifying the type of construction machinery, the server can determine whether the type of construction machinery is close to or enters the corresponding prohibited area.
[0108] Then, when the distance between the construction machinery corresponding to the second target image and the prohibited area is less than a preset safety distance, the server generates an alarm message and sends the alarm message to the supervision terminal.
[0109] The warning information can be sent to the monitoring terminal, which can be a mobile phone, computer, etc. Further, if a user corresponding to the monitoring terminal T is within the monitoring range (eg, 500 meters) of the collection location of the second target image, the server can send the warning information to the monitoring terminal T.
[0110] Figure 7 An object detection device for identifying an occluded object provided in an embodiment of the present application includes:
[0111] At least one processor; and a memory in communication with the at least one processor. The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:
[0112] Acquire several first target images and corresponding image labels. The first target image is an image with a target area pre-marked. The image label is used to indicate the target type corresponding to the first target image. According to each first target image and the corresponding image label, determine the corresponding occlusion template of each first target image with the same image label. The occlusion template is a graphic area that matches the target area, and the occlusion template corresponding to each image label includes several occlusion sub-templates that divide the graphic area. Each occlusion template and each first target image are used as sample data and input into a preset target detection model to train the target detection model. Receive a second target image captured by an image acquisition device. The target type corresponding to the second target image is the same as the target type corresponding to each first target image. Determine the target type in the second target image through the trained target detection model.
[0113] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0114] The device and method provided in the embodiments of the present application correspond one to one, and therefore, the device also has similar beneficial technical effects as the corresponding method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the device will not be repeated here.
[0115] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0116] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A target detection method for occluded object recognition, characterized in that: The method comprises: Acquire a plurality of first target images and corresponding image labels; wherein the first target image is an image with a target area pre-marked; and the image label is used to indicate the target type corresponding to the first target image; According to each of the first target images and the corresponding image labels, determining the occlusion template corresponding to each of the first target images with the same image label; wherein the occlusion template is a graphic area matching the target area, and the occlusion template corresponding to each of the image labels includes a plurality of occlusion sub-templates that divide the graphic area; Using each of the occlusion templates and each of the first target images as sample data, and inputting them into a preset target detection model to train the target detection model; Receiving a second target image captured by an image acquisition device; wherein the target type corresponding to the second target image is the same as the target type corresponding to each of the first target images; The target type in the second target image is determined by using the trained target detection model.
2. The method according to claim 1, characterized in that: Determining the occlusion template corresponding to each of the first target images having the same image label specifically includes: Dividing a plurality of image groups to be processed according to the image labels of the first target images; Determining the area of the pre-marked target region of each group of the to-be-processed images; Calculating an average value of the sum of the areas of the target regions, so as to determine the area of the corresponding occlusion template of the target type according to the average value of the sum of the areas of the target regions; According to the area of the occlusion template of the target type, the occlusion template corresponding to each of the first target images with the same image label is determined.
3. The method according to claim 1, characterized in that: Determining the occlusion template corresponding to each of the first target images having the same image label specifically includes: Determining the pre-marked target area in the first target image; generating a corresponding mesh structure according to the area of the pre-marked target area, so as to divide the pre-marked target area through the mesh structure; According to the number of grids in the mesh structure of the divided target area, the corresponding occlusion templates of the first target images with the same image label are determined.
4. The method according to claim 1, characterized in that: Determining the occlusion template corresponding to each of the first target images having the same image label specifically includes: Determine the pre-marked target area in the first target image; wherein the pre-marked target area includes: a mechanically visible area and a mechanically blocked area; Dividing the target area pre-marked in the first target image according to the area graphs of the mechanically visible area and the mechanically occluded area to determine the occluded sub-templates of each first target image; According to the image label and the occlusion sub-template, the occlusion template corresponding to each of the first target images with the same image label is determined.
5. The method according to claim 1, characterized in that: Before inputting each of the occlusion templates and each of the first target images as sample data into a preset target detection model, the method further includes: Generating a first matching threshold according to a first degree of overlap between each of the occlusion templates and the mechanically visible area of the image to be detected; generating a second matching threshold according to a second degree of overlap between the mechanically visible area of each of the occlusion templates and the mechanically visible area of the image to be detected; An occlusion template corresponding to the image to be detected is determined according to the first matching threshold, the second matching threshold and a preset corresponding relationship.
6. The method according to claim 5, characterized in that: Determine the occlusion template corresponding to the image to be detected, specifically including: After determining each of the first overlap degrees and each of the second overlap degrees, determining whether there is a second overlap degree greater than the second matching threshold among the second overlap degrees corresponding to each of the occlusion templates; If it exists, the corresponding occlusion template is used as the occlusion template corresponding to the image to be detected; If not, determining whether there is a first overlap degree greater than the first matching threshold and a corresponding second overlap degree less than the second matching threshold among the first overlap degrees and the second overlap degrees of each of the occlusion templates; If it exists, the corresponding occlusion template is used as the occlusion template corresponding to the image to be detected; If it does not exist, a prompt message is generated.
7. The method according to claim 1, characterized in that: Determining the target type in the second target image by using the trained target detection model specifically includes: The second target image is input into the target detection model to determine whether a target pixel point exists according to the pixel value of each pixel point in the second target image; wherein the target pixel point is a pixel point of the construction machinery; Determine the graphic outline formed by the target pixel points through the target detection model, so as to mark the visible area of the machine in the second target image and predict the machine type according to the graphic outline; The machine visible area in the second target image, the predicted machine type and the corresponding occlusion template are used as training labels, and the training labels are processed by the trained target detection model to output the target type and the machine visible area in the second target image.
8. The method according to claim 1, characterized in that: After determining the target type in the second target image, the method further includes: Determine the distance between the construction machinery corresponding to the second target image and the prohibited area according to the target type and the acquisition information of the second target image; wherein the acquisition information includes: acquisition time and acquisition location; When the distance between the construction machine corresponding to the second target image and the prohibited area is less than a preset safety distance, an alarm message is generated and sent to the supervision terminal.
9. The method according to claim 1, characterized in that: The image acquisition device is arranged within a preset range of the power transmission line to acquire images within the preset range of the power transmission line.
10. A target detection device for identifying occluded objects, characterized in that: The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Acquire a plurality of first target images and corresponding image labels; wherein the first target image is an image with a target area pre-marked; and the image label is used to indicate the target type corresponding to the first target image; According to each of the first target images and the corresponding image labels, determining the occlusion template corresponding to each of the first target images with the same image label; wherein the occlusion template is a graphic area matching the target area, and the occlusion template corresponding to each of the image labels includes a plurality of occlusion sub-templates that divide the graphic area; Using each of the occlusion templates and each of the first target images as sample data, and inputting them into a preset target detection model to train the target detection model; Receiving a second target image captured by an image acquisition device; wherein the target type corresponding to the second target image is the same as the target type corresponding to each of the first target images; The target type in the second target image is determined by using the trained target detection model.
Citation Information
Patent Citations
Photographing processing method and device, mobile terminal and storage medium
CN109951635A
Face shielding detection method and device, equipment and storage medium
CN111191616A