Rod-shaped target recognition method and device, server and storage medium

By combining a pre-set target detection model, an anchor-frame-based deep learning model, and a segmentation extraction model, high-precision recognition of rod-shaped targets is achieved, solving the problem of low recognition accuracy of rod-shaped targets in existing technologies and meeting the needs of map navigation and autonomous driving.

CN113901935BActive Publication Date: 2025-12-05丰图科技(深圳)有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202111203325.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-15
Publication Date
2025-12-05
Estimated Expiration
2041-10-15

AI Technical Summary

Technical Problem

Existing technologies have low accuracy in recognizing rod-shaped targets, especially in video images where the recall rate for slender rod-shaped targets is less than 30%, which cannot meet the needs of map navigation and autonomous driving.

Method used

A pre-defined target detection model is used for coarse identification, while a deep learning model based on anchor boxes is used for precise identification. A segmentation extraction model is used to segment the rod-shaped target from the image, and multiple neural network models are used to achieve precise identification from the whole to the part.

Benefits of technology

It improves the recognition accuracy of pole-shaped targets, ensuring efficient detection and basic perception of pole facilities in map navigation and autonomous driving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113901935B_ABST
    Figure CN113901935B_ABST
Patent Text Reader

Abstract

The application provides a rod-shaped target recognition method and device, a server and a storage medium. The rod-shaped target is accurately recognized from the whole to the part through a plurality of neural network models with different recognition accuracies. Meanwhile, a first image obtained by using a preset target detection model includes a dynamic anchor box; a deep learning model based on the anchor box is used to directly recognize the image including the dynamic anchor box, without processing the first image including the dynamic anchor box. Since the dynamic anchor box corresponding to the first image is closer to the size of the real rod-shaped target than the boundary box generated in the original recognition process, the anchor box corresponding to the image recognized by the deep recognition method based on the anchor box is closer to the real target box, the target box obtained by the deep recognition method based on the anchor box is more accurate, that is, the rod-shaped target is more accurate, and the recognition accuracy of the rod-shaped target is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of target recognition, and particularly relates to a rod-shaped target recognition method and device, a server and a storage medium. BACKGROUND

[0002] Common rod facilities such as street lamps, electronic eyes, power poles and signboards are important traffic elements at present. Different rods bear different traffic tasks, such as restrictions, warning indications and the like. These rod facilities become indispensable elements in modern map navigation and are also important objects of attention in automatic driving. However, with the development of cities, rod facilities are still changing beside roads, so it is necessary to efficiently detect rod facilities to provide basic perception information of rod facilities for maps and automatic driving in time.

[0003] Current visual perception methods are usually only effective for larger regular rectangular targets, while rod targets in video images are extremely thin and long. Existing methods are prone to loss when detecting and segmenting rod targets, and the recall rate of rods is less than 30%, which cannot accurately identify thin and long rod targets. SUMMARY

[0004] The present application provides a rod-shaped target recognition method, device, server and storage medium, aiming to improve the problem of low rod-shaped target recognition accuracy in the prior art.

[0005] In a first aspect, an embodiment of the present application provides a rod-shaped target recognition method, which comprises:

[0006] performing target recognition on a to-be-recognized image by using a preset target detection model to obtain a first image comprising a rod-shaped target and an overall rod facility associated with the rod-shaped target, the first image further comprising a dynamic anchor box;

[0007] performing target recognition on the first image comprising the dynamic anchor box by using an anchor box-based deep learning model to obtain a second image comprising the rod-shaped target and the overall rod facility associated with the rod-shaped target;

[0008] extracting the rod-shaped target in the second image by using a preset segmentation extraction model to obtain a recognition result of the rod-shaped target.

[0009] In a possible embodiment, before performing target recognition on the to-be-recognized image by using the preset target detection model to obtain the first image comprising the rod-shaped target and the overall rod facility associated with the rod-shaped target, the method further comprises:

[0010] acquiring a dynamic continuous video collected by a video collector;

[0011] divide the dynamic continuous video into a plurality of initial images according to a preset frame rate, and sample the plurality of initial images to obtain the to-be-identified image;

[0012] The to-be-identified image includes a plurality of initial images.

[0013] In a possible embodiment, the target identification on the to-be-identified image by using the preset target detection model obtains a first image including the rod-shaped target and the overall rod-shaped facility associated with the rod-shaped target, which includes the following steps:

[0014] Each initial image in the initial to-be-identified image is taken as a target initial image, and the target detection model is used to determine whether the target initial image includes the rod-shaped target and the overall rod-shaped facility associated with the rod-shaped target;

[0015] If the target initial image includes the rod-shaped target and the overall rod-shaped facility associated with the rod-shaped target, a target local video stream in which the target initial image is located is determined according to the target initial image;

[0016] The target local video stream is decoded to obtain the to-be-identified image;

[0017] In the to-be-identified image, a first image containing a complete rod-shaped target and an overall rod-shaped facility associated with the rod-shaped target and having the largest size of the rod-shaped target is determined.

[0018] The first image includes a dynamic anchor box.

[0019] In a possible embodiment, the deep learning model based on the anchor box is a cascaded neural network model, and the deep learning model based on the anchor box includes a plurality of cascaded different identification modules.

[0020] The deep learning model based on the anchor box is used to directly perform target identification on the first image including the dynamic anchor box to obtain a second image including the rod-shaped target and the overall rod-shaped facility associated with the rod-shaped target, which includes the following steps:

[0021] The first image is input into the deep learning model based on the anchor box;

[0022] The plurality of cascaded different identification modules are used to sequentially perform classification identification on the first image including the dynamic anchor box to obtain the second image including the rod-shaped target and the overall rod-shaped facility associated with the rod-shaped target.

[0023] In a possible embodiment, before the first image including the dynamic anchor box is input into the deep learning model based on the anchor box, the method further includes:

[0024] Obtain an initial sample set consisting of multiple different images of different rod-shaped targets;

[0025] Multiple different images in the initial sample set are processed to obtain a training sample set, which includes multiple different images corresponding to different rod-shaped targets, and the number of images in the training sample set is greater than the number of images in the initial sample set.

[0026] The initial deep learning model based on anchor boxes is trained using the training sample set to obtain the trained deep learning model based on anchor boxes.

[0027] In one possible embodiment, the step of extracting the rod-shaped target from the second image using a preset segmentation extraction model to obtain the recognition result of the rod-shaped target includes:

[0028] Each pixel in the second image is classified into two categories to obtain the corresponding binary image of the second image;

[0029] The binary image is merged using a preset connected component algorithm to obtain multiple candidate regions;

[0030] The multiple candidate regions are filtered to remove non-rod-shaped targets from the multiple candidate regions, resulting in multiple target candidate regions;

[0031] The multiple target candidate regions are fitted to obtain the rod-shaped region corresponding to the rod-shaped target, thereby completing the identification of the rod-shaped target.

[0032] In one possible embodiment, fitting the plurality of target candidate regions to obtain the rod-shaped region corresponding to the rod-shaped target, thereby completing the identification of the rod-shaped target, includes:

[0033] The multiple target candidate regions are fitted, and the fitting error corresponding to each target candidate region is calculated to obtain multiple fitting errors;

[0034] Determine the minimum target fitting error among the plurality of fitting errors;

[0035] The target candidate region corresponding to the target fitting error is determined as the rod region corresponding to the rod-shaped target, so as to complete the identification of the rod-shaped target.

[0036] Secondly, embodiments of this application provide a rod-shaped target identification device, the device comprising:

[0037] The first identification module is configured to perform target identification on the to-be-identified image by using a preset target detection model to obtain a first image including a rod-shaped target and an overall rod-shaped facility associated with the rod-shaped target, the first image including a dynamic anchor box.

[0038] The second identification module is configured to perform target identification on the first image including the dynamic anchor box by using an anchor box-based deep learning model to obtain a second image including the rod-shaped target.

[0039] The third identification module is configured to extract the rod-shaped target in the second image by using a preset segmentation extraction model to complete identification of the rod-shaped target.

[0040] In a third aspect, the present application further provides a server, which comprises:

[0041] one or more processors;

[0042] a memory; and

[0043] one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the rod-shaped target identification method.

[0044] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, the computer program being loaded by a processor to execute the steps in the rod-shaped target identification method.

[0045] The above rod-shaped target identification method, device, server and storage medium first perform rough and rapid identification of a rod-shaped target by using a preset target detection model, then perform accurate identification of the rod-shaped target by using an anchor box-based deep learning model, and finally separate the rod-shaped target from an image by using a segmentation extraction model. The present application uses multiple neural network models with different identification accuracies to realize accurate identification of a rod-shaped target from a whole to a part. Meanwhile, the first image obtained by using the preset target detection model includes a dynamic anchor box, and the anchor box-based deep learning model directly identifies the image including the dynamic anchor box, without the need to process the first image including the dynamic anchor box. Since the dynamic anchor box corresponding to the first image is closer to the size of the real rod-shaped target than the boundary box generated in the original identification process, the anchor box-based deep learning model can obtain a more accurate target box and a more accurate rod-shaped target, thereby effectively improving the identification accuracy of the rod-shaped target. BRIEF DESCRIPTION OF DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of these drawings.

[0047] Figure 1 is a scene schematic diagram of the rod-shaped target recognition method in the embodiments of the present application;

[0048] Figure 2 is a flow schematic diagram of the rod-shaped target recognition method in the embodiments of the present application;

[0049] Figure 3 is an embodiment flow schematic diagram provided by the present application for identifying the to-be-identified image to obtain the first image;

[0050] Figure 4 is a depth separable convolution schematic diagram provided by the embodiments of the present application;

[0051] Figure 5 is an embodiment schematic diagram of the anchor box-based deep learning model provided by the embodiments of the present application;

[0052] Figure 6 is an embodiment flow schematic diagram provided by the present application for identifying the rod-shaped target by using the preset segmentation extraction method;

[0053] Figure 7 is an embodiment schematic diagram of the rod-shaped target segmentation extraction provided by the embodiments of the present application;

[0054] Figure 8 is an embodiment schematic diagram of the rod-shaped target recognition provided by the embodiments of the present application;

[0055] Figure 9 is an embodiment schematic diagram of the rod-shaped target recognition device provided by the embodiments of the present application;

[0056] Figure 10 It shows the structure schematic diagram of the computer device related to the embodiments of the present application. DETAILED DESCRIPTION

[0057] The technical solutions in the embodiments of the present application will be described clearly and completely in the following description with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0058] In the description of the application, it should be understood that the terms "first", "second" are used only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the application, the meaning of "a plurality of" is two or more, unless otherwise expressly specifically limited.

[0059] In the description of the application, the word "for example" is used to mean "serving as an example, instance, or illustration". Any embodiment described as "for example" in this application is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to make and use the application. In the following description, details are set forth for the purpose of explanation. It will be appreciated that one of ordinary skill in the art will realize that the application can be practiced without the use of these specific details. In other instances, well-known structures and processes have not been described in detail in order to avoid obscuring the description of the application. Therefore, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features presented herein. In the embodiments of the present application, the rod-shaped target recognition method mainly involves computer vision technology (CV) in artificial intelligence (AI). Artificial intelligence is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, which attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence.

[0060] Computer vision is a science of how to make the machine "see", further, it refers to using a camera and a computer to replace the human eye to identify, track and measure the target and other machine vision, and further do image processing, so that the computer processing becomes more suitable for the image observed by the human eye or transmitted to the instrument detection. As a scientific discipline, computer vision studies related theories and technologies, and tries to establish an artificial intelligence system that can obtain information from images or multidimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, optical character recognition (OCR), video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping, and other technologies. It also includes common face recognition, fingerprint recognition and other biometric identification technologies. In this application, for the image to be identified, CV mainly realizes target object recognition in image detection and image identification of image semantic understanding (ISU), identifies and predicts the target object in the image, and outputs the prediction result. It can be understood that the target object can be any object determined by actual business requirements, such as people, vehicles, express delivery, and other people or objects.

[0061] In the embodiments of the present application, it should be noted that the rod-shaped target recognition method provided by the present application is executed in a computer device, and the processing objects of each computer device exist in the form of data or information, such as time, which is essentially time information. It can be understood that if the size, quantity, position and the like are mentioned in subsequent embodiments, they all exist in the form of corresponding data for the computer device to process, and specific details are not described here.

[0062] In the embodiments of the present application, it should be noted that the rod-shaped target recognition method provided by the present application can be applied to, for example Figure 1The shown rod-shaped target recognition system. Wherein the rod-shaped target recognition system includes terminal 100 and server 200, terminal 100 can be a device that includes receiving and transmitting hardware, that is, a device with receiving and transmitting hardware capable of performing bidirectional communication on a bidirectional communication link. Such devices can include: cellular or other communication devices with single-line displays or multi-line displays or cellular or other communication devices without multi-line displays. Terminal 100 can be a desktop terminal or a mobile terminal, and terminal 100 can also be one of a mobile phone, a tablet computer, a notebook computer, etc., or a camera installed in a monitored site for information collection, storage, and transmission. Server 200 can be a standalone server, or a server network or server cluster composed of servers, including but not limited to computers, network hosts, single network servers, multiple network server sets, or cloud servers composed of multiple servers. Wherein the cloud server is composed of a large number of computers or network servers based on cloud computing (Cloud Computing).

[0063] Those skilled in the art can understand that Figure 1 The application environment shown in the above Figure 1 The application environment shown in the above Figure 1 Only 1 server 200 is shown in the above Figure 1 As shown in the above

[0064] It should be noted that Figure 1 The scene diagram of the rod-shaped target recognition system shown is only an example, and the rod-shaped target recognition system and the scene described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of the rod-shaped target recognition system and the appearance of new service scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0065] Referring to Figure 2 The embodiments of the present application provide a rod-shaped target recognition method, which is mainly applied to the server 200 in the above Figure 1 The specific embodiments are as follows:

[0066] 21. performing target recognition on the to-be-recognized image by using the preset target detection model to obtain a first image including the rod-shaped target and an overall rod-shaped facility associated with the rod-shaped target, the first image further including a dynamic anchor box.

[0067] The rod-shaped target recognition method provided in the embodiments of the present application is mainly used for recognizing slender rod-shaped targets such as street lamps and power poles, and these rod-shaped targets usually need to be quickly and accurately recognized in map navigation or automatic driving. The rod-shaped target can be a rod-shaped support part in an actual power pole or street lamp rod, and the overall rod-shaped rod facility associated with the rod-shaped target can be a street lamp or other structure connected with the actual street lamp rod. In the embodiments of the present application, a preset target detection model can be used to recognize these rod-shaped targets in an image.

[0068] In an actual rod-shaped target recognition scenario, a continuous video image is usually obtained instead of a single image, and therefore it is necessary to determine the image in which the rod-shaped target is located in the continuous video image, without detecting the entire video image. In this way, the calculation amount can be effectively reduced, and the rod-shaped target recognition efficiency can be improved.

[0069] That is, before performing target recognition on the to-be-recognized image by using the preset target detection model to obtain a first image including the rod-shaped target and an overall rod-shaped facility associated with the rod-shaped target, it is necessary to determine the to-be-recognized image in the continuous video image. Specifically, the method can include: acquiring a dynamic continuous video collected by a video collector; dividing the dynamic continuous video into a plurality of initial images according to a preset frame rate, and sampling the plurality of initial images to obtain an initial to-be-recognized image. The initial to-be-recognized image includes a plurality of initial images.

[0070] In the embodiments of the present application, the video collector can be a driving recorder or various monitoring cameras. The video collector can continuously collect video images, and the video images are usually constantly changing, that is, the content in the video images changes over time.

[0071] Since the video image is composed of a plurality of images, the dynamic continuous video can be divided into a plurality of different images. Specifically, the dynamic continuous video can be divided into a plurality of initial images according to a preset frame rate.

[0072] Since the to-be-recognized rod-shaped target can exist in adjacent images, it is not necessary to detect each image, and a large amount of manpower and resources will be wasted. Therefore, the plurality of initial images divided can be sampled and detected.

[0073] In an actual video collection scene, the video image collected by the video collector is usually 30 fps, that is, 30 frames of images are included in a second. Therefore, the preset frame rate for dividing the video can be 1 / 30, that is, a second of images is divided into 30 initial images. In other embodiments, the preset frame rate for dividing the video can also be other frame rates.

[0074] When the plurality of initial images are sampled and detected, the sampling frequency can be selected according to actual conditions, for example, 5 times per second, 10 times per second, etc. That is, the plurality of frames of images corresponding to each second are sampled and detected five times or ten times.

[0075] After the initial to-be-recognized images including the plurality of initial images are sampled, a preset target detection model can be used to recognize the plurality of initial images sampled to recognize the rod-shaped target and the overall rod member facility associated with the rod-shaped target.

[0076] The overall rod member facility associated with the rod-shaped target can be an actually existing physical facility, for example, a thin rod and a lamp physically connected to the thin rod. The overall rod member facility associated with the rod-shaped target can also be other physical facilities that are visually overlapped, for example, a rod member beside a subway and a subway entrance visually associated with the rod member.

[0077] 22. A deep learning model based on an anchor box is used to directly recognize the first image including the dynamic anchor box to obtain the second image including the rod-shaped target.

[0078] The preset target detection model is used to recognize the rod-shaped target with low accuracy, and a deep learning model based on an anchor box with high accuracy is further used to recognize the first image including the anchor box with high accuracy to further recognize the rod-shaped target.

[0079] In the embodiments of the present application, when the rod-shaped target is recognized with high accuracy, the recognition model used generates an anchor box (or a recognition box) in the recognition process. In the embodiments of the present application, the first image recognized by the preset target detection model includes a dynamic anchor box, and the anchor box corresponding to different to-be-recognized targets has different sizes.

[0080] The anchor box is a plurality of prior boxes with different aspect ratios defined by an algorithm in a target detection algorithm, and the aspect ratio (that is, the size of the anchor box) of the anchor box obtained in the process of target recognition by different target detection algorithms is different. In the embodiments of the present application, the dynamic anchor box included in the first image is an anchor box matched with the rod-shaped target to be recognized. Generally, the dynamic anchor box can completely include the rod-shaped target to be recognized, and the dynamic anchor box is the anchor box with the least structure affecting recognition among all the generated dynamic anchor boxes except the rod-shaped target to be recognized.

[0081] At this time, the first image including the dynamic anchor frame needs to be directly input into the anchor frame-based deep learning model for recognition without any processing of the first image. Or, the anchor frame-based deep learning model can correspond to a dynamic initial anchor frame, and the image input into the anchor frame-based deep learning model will be processed in size based on the initial anchor frame, and the image processed in size will be recognized subsequently. Since the initial anchor frame corresponding to the anchor frame-based deep learning model in the present application is dynamic, that is, the size of the initial anchor frame dynamically changes with the size of the input first image. And the size of the initial anchor frame is usually the same as the size of the first image.

[0082] In the prior art, the acquired image is usually directly input into the anchor frame-based deep learning model, and the anchor frame-based deep learning model processes the input image and then performs subsequent recognition. Specifically, the anchor frame-based deep learning model generates a bounding box including the rod-shaped target according to the position of the rod-shaped target to be recognized in the image; the bounding box includes the rod-shaped target, but usually does not completely include the complete rod-shaped target, and usually also includes other structures other than the rod-shaped target. This makes the recognition accuracy of the existing anchor frame-based deep learning model not high.

[0083] In the present application, the image is first roughly recognized to determine the position of the rod-shaped target to be recognized in the image; at the same time, the image is processed according to the specific position of the rod-shaped target to be recognized in the image to remove as much as possible the structures other than the rod-shaped target and to include as much as possible the complete rod-shaped target. That is, in the present application, a preset target detection model is used to recognize the rod-shaped target and the overall rod member facility associated with the rod-shaped target; and based on this, the image to be recognized is processed to obtain a first image. According to the different size of the actual rod-shaped target to be recognized, the size of the first image is also different; and the first image includes the complete rod-shaped target and the overall rod member facility associated with the rod-shaped target.

[0084] At the same time, the first image is directly input into the anchor frame-based deep learning model, and the anchor frame-based deep learning model does not need to generate a bounding box including the rod-shaped target. That is, the bounding box corresponding to the first image is the bounding box generated by the anchor frame-based deep learning model; the bounding box corresponding to the first image is more consistent with the size of the actual target to be recognized than the bounding box in the prior art, which makes the subsequent recognition more accurate.

[0085] 23. Extracting the rod-shaped target in the second image by using a preset segmentation extraction model to obtain a recognition result of the rod-shaped target.

[0086] It should be noted that in the embodiments of the present application, the rod-shaped target identified by using the preset target detection model and the deep learning model based on the anchor box generally includes the rod-shaped target itself and the overall rod facility associated with the rod-shaped target. Therefore, it is still necessary to further perform high-precision identification to identify the rod-shaped target alone. In the embodiments of the present application, it is finally necessary to extract the rod-shaped target in the second image by using the preset segmentation extraction model to obtain the final identification result of the rod-shaped target.

[0087] The rod-shaped target identification method provided in the embodiments of the present application first performs rough and rapid identification of the rod-shaped target by using the preset target detection model, then performs accurate identification of the rod-shaped target by using the deep learning model based on the anchor box, and finally separates the rod-shaped target from the image by using the segmentation extraction model. The present application uses multiple neural network models with different identification accuracies to realize accurate identification of the rod-shaped target from the whole to the part. Meanwhile, the first image obtained by using the preset target detection model includes the dynamic anchor box; the deep learning model based on the anchor box directly identifies the image including the dynamic anchor box without processing the first image including the dynamic anchor box. Since the dynamic anchor box corresponding to the first image is closer to the size of the real rod-shaped target than the boundary box generated in the original identification process, the anchor box corresponding to the image identified by the deep learning method based on the anchor box is closer to the real target box, and the deep learning method based on the anchor box can obtain a more accurate target box, i.e., a more accurate rod-shaped target, thereby effectively improving the identification accuracy of the rod-shaped target.

[0088] In the embodiments of the present application, after the image to be identified is determined, the preset target detection model is first used to perform low-precision initial identification on the image to be identified. As shown in Figure 3 , it is an embodiment flow diagram provided by the application for identifying the image to be identified to obtain the first image; which can include:

[0089] 31. Take each initial image in the initial image to be identified as a target initial image, and use the preset target detection model to determine whether the target initial image includes the rod-shaped target and the overall rod facility associated with the rod-shaped target.

[0090] In actual video acquisition scenarios, the video acquisition device is usually constantly moving, so that the video images collected may not include the rod-shaped target; that is, the initial images obtained by dividing the video may not all include the rod-shaped target to be identified.

[0091] Since the initial to-be-recognized image includes multiple initial images, the multiple initial images are sampled, and it cannot be guaranteed that each initial image in the initial to-be-recognized image includes the rod-shaped target. Therefore, it is necessary to recognize each initial image in the initial to-be-recognized image by using the target detection model capable of recognizing the rod-shaped target, and determine whether each initial image in the initial to-be-recognized image includes the rod-shaped target and the overall rod member facility associated with the rod-shaped target.

[0092] 32. If the target initial image includes the rod-shaped target and the overall rod member facility associated with the rod-shaped target, the target local video stream in which the target initial image is located is determined according to the target initial image.

[0093] Since the multiple initial images obtained after video division are arranged in time sequence, the multiple initial images in the to-be-recognized image sampled also can be arranged in time sequence. Since the to-be-recognized image is sampled, only part of the initial images are included; after the target initial image including the rod-shaped target and the overall rod member facility associated with the rod-shaped target is determined, the target local video stream in which the target initial image is located also needs to be determined to prevent missing the initial image in which the rod-shaped target exists.

[0094] In the embodiments of the present application, the length of the target local video stream can be changed according to actual conditions, and can be 5 seconds, 8 seconds, etc. Since the video is arranged in time sequence, the target initial image can be located at the middle position of the target local video stream; that is, the video stream located in the preset time period before and after the target initial image is determined as the target local video stream.

[0095] It should be noted that in the above embodiments, the target initial image in which the rod-shaped target exists can be multiple; that is, among the multiple initial images sampled, multiple initial images include the rod-shaped target.

[0096] 33. Decoding the target local video stream to obtain the to-be-recognized image.

[0097] 34. Determining the first image in which the complete rod-shaped target and the overall rod member facility associated with the rod-shaped target are included and the size of the rod-shaped target is the largest in the to-be-recognized image.

[0098] At this time, the target local video stream including the rod-shaped target is obtained, but since the video collector is usually constantly moving in the process of collecting the video (that is, collecting the multiple initial images), each frame image in the target local video stream includes the rod-shaped target, and the size and direction of the rod-shaped target in each frame image are different.

[0099] Since the larger the target size, the higher the probability of the target being detected. In the embodiments of this application, it is necessary to decode the target local video stream to obtain multiple different images to be identified, all of which include the rod-shaped target; and among the multiple images to be identified corresponding to the target local video stream, determine the initial image with the largest rod-shaped target size as the first image identified this time; and then perform subsequent recognition with higher accuracy on the first image.

[0100] In the embodiments of this application, it is necessary to first perform sampling detection on multiple initial images obtained from video segmentation to determine the initial images including the pole-shaped target and the overall pole-like facilities associated with the pole-shaped target. However, since sampling detection is performed, it cannot be guaranteed that all initial images will be detected. Therefore, the target local video stream containing the initial images including the pole-shaped target and the overall pole-like facilities associated with the pole-shaped target is also determined, and then multiple frames in the target local video stream are detected frame by frame to avoid omissions in detection.

[0101] Specifically, in the image to be identified, the first image with the largest rod-shaped target size can be determined by obtaining the area occupied by the rod-shaped target (including the overall rod-shaped facilities associated with the rod-shaped target) in the image; and the image corresponding to the rod-shaped target (including the overall rod-shaped facilities associated with the rod-shaped target) with the largest area is taken as the first image with the largest rod-shaped target size.

[0102] In the above embodiments, an initial target detection model needs to be trained to obtain a trained target detection model, and then the trained target detection model is used for target recognition. When training the initial target detection model, it is necessary to label the rod-shaped targets in the training set, as well as the surrounding targets connected to the rod-shaped targets. Simultaneously, the labeled rod-shaped targets and their surrounding targets are treated as a whole to extract image features; and after extracting the image features, a clustering algorithm can be used to cluster the features, obtaining multiple clustering results.

[0103] In one specific embodiment of this application, the preset object detection model can be YOLOv3. The YOLOv3 method generally consists of two main parts: a backbone network and a detection header. The object detection model used in this application can replace the standard convolutional network (Conv) with a depthwise separable convolutional network (DSR).

[0104] like Figure 4 The diagram shown is a schematic of depthwise separable convolution provided in an embodiment of this application. Figure 4In the depth separable convolution, the depth separable convolution can be divided into a depthwise convolution (Depthwise Conv) and a pointwise convolution (Pointwise Conv), which respectively play the roles of filtering and linear combination. The depth separable convolution can greatly reduce the parameter quantity and the calculation quantity.

[0105] In the depth separable convolution, the depth separable convolution can be divided into a depthwise convolution (Depthwise Conv) and a pointwise convolution (Pointwise Conv), which respectively play the roles of filtering and linear combination. The depth separable convolution can greatly reduce the parameter quantity and the calculation quantity. Figure 4 In the depth separable convolution, the depth separable convolution can be divided into a depthwise convolution (Depthwise Conv) and a pointwise convolution (Pointwise Conv), which respectively play the roles of filtering and linear combination. The depth separable convolution can greatly reduce the parameter quantity and the calculation quantity.

[0106] Since the depth separable convolution includes the depthwise convolution and the pointwise convolution, the depth separable convolution includes the 3X3 Depthwise Conv and the 1X1 Pointwise Conv. Figure 4 In the depth separable convolution, the depth separable convolution can be divided into a depthwise convolution (Depthwise Conv) and a pointwise convolution (Pointwise Conv), which respectively play the roles of filtering and linear combination. The depth separable convolution can greatly reduce the parameter quantity and the calculation quantity.

[0107] Figure 4 As shown in FIG. 1, an embodiment of a target detection model provided by the present application is shown; and in other embodiments, the target detection model can also be other models. The specific process of using the YOLOv3 target detection model for identification in the present application can refer to the prior art, and will not be repeated here.

[0108] In the above embodiment, the target detection model is used for target identification on the to-be-identified image, and the first image obtained includes a dynamic anchor frame. Different rod-shaped targets are identified, and the anchor frame in the first image obtained is different; generally, the size of different to-be-identified targets makes the size of the dynamic anchor frame corresponding to the first image different.

[0109] In a specific embodiment, the signboard commonly seen on the road usually includes a rod-shaped support structure and a prompt structure including prompt text; the rod-shaped target identification method provided in the embodiment of the present application is mainly to identify the rod-shaped support structure in the signboard. In actual identification scenarios, the size of different rod-shaped support structures (i.e. to-be-identified targets) will be different; or the size of the rod-shaped support structure in the signboard will be different from the size of the rod-shaped support structure in the street lamp. Therefore, the size of different to-be-identified targets is different, resulting in different sizes of the dynamic anchor frame corresponding to the first image.

[0110] After obtaining the first image, which includes the rod-shaped target and the overall rod-like structure associated with it, further identification of the first image is needed to obtain a more accurate location of the rod-shaped target. For example... Figure 5 The diagram shown is an embodiment of a deep learning model based on anchor boxes provided in this application. The deep learning model based on anchor boxes in this application can be a Cascade Faster RCNN model. The Cascade Faster RCNN model includes multiple cascaded different recognition modules, and the Cascade Faster RCNN model generates multiple different anchor boxes (or recognition boxes) during the recognition process.

[0111] In the embodiments of this application, a first image including a dynamic anchor frame needs to be input into a deep learning model based on the anchor frame; then, multiple cascaded different recognition modules are used to classify and recognize the first image including the dynamic anchor frame in sequence, and finally a second image including the rod-shaped target and the overall rod-shaped facility associated with the rod-shaped target is obtained.

[0112] exist Figure 5 In this diagram, I represents the input first image including dynamic anchor boxes; conv is the convolutional layer in the deep learning model; pool is the pooling layer in the deep learning model; Hi represents the i-th cascaded recognition module; Bi is the instance bounding box output by the i-th cascaded recognition module; and Ci is the instance category output by the i-th cascaded recognition model. Different recognition modules are responsible for the position regression of target samples of different quality, and different recognition modules have different IOU thresholds; the cascaded recognition modules can progressively optimize and correct the boundaries of rod-shaped targets.

[0113] Figure 5 The example shown is only one embodiment of an anchor-box-based deep learning model, which may include three cascaded recognition modules, namely H1, H2 and H3; in other embodiments, the anchor-box-based deep learning model may also include other numbers of recognition models, and multiple recognition models may be cascaded together.

[0114] In anchor-box-based detection models, the anchor box serves as the computational benchmark for the final detection box; therefore, the size of the anchor box affects image recognition. In the embodiments of this application, the quadruple (x, y, w, h) represents the coordinates of the top-left corner and the width and height of a recognition box generated during the recognition process, and (xa, ya, wa, ha) represents the anchor box coordinates corresponding to the first input image. Therefore, the coordinates (tx, ty, tw, th) corresponding to the rod-shaped target recognized by the anchor-box-based deep learning model can be:

[0115] t x =(xx) a ) / w a ,ty = (y - y a ) / h a ,

[0116] t w = log(w / w a ), t h = log(h / h a ),

[0117] It should be noted that in the embodiments of the present application, when the first image is subsequently identified with high precision, a deep learning model that generates a recognition frame (anchor frame) during recognition is used. In the present application, based on the actual rod-shaped target to be recognized, the first image including dynamic anchor frames of different sizes is input into the deep learning model based on anchor frames, and the first image is directly recognized without processing the first image. Compared with the fixed anchor frame in the prior art, the dynamic anchor frame is closer to the real area of the rod-shaped target to be recognized; the first image including the dynamic anchor frame is used as the input of the deep learning model, so that the input of the deep learning model is stabilized in a smaller range, i.e. the rod-shaped target recognized by the deep learning model is more accurate.

[0118] In the above embodiments, an initial deep learning model based on anchor frames also needs to be trained to obtain a deep learning model based on anchor frames that can recognize rod-shaped targets. Specifically, it can include:

[0119] An initial sample set including a plurality of different images of different rod-shaped targets is obtained; the plurality of different images in the initial sample set are processed to obtain a training sample set, the training sample set including a plurality of different images corresponding to different rod-shaped targets, and the number of images in the training sample set is greater than the number of images in the initial sample set; the initial deep learning model based on anchor frames is trained using the training sample set to obtain a deep learning model based on anchor frames after training.

[0120] Specifically, the images in the initial sample set include a plurality of different rod-shaped targets. After obtaining the initial sample set, a plurality of different image processing methods such as mosaic, color transformation, image erasing, etc. can be used to process the images in the initial sample set to increase the number of samples in the sample set, thereby improving the recognition accuracy of the deep learning model based on anchor frames after training.

[0121] In the above embodiments, the specific training method of the deep learning model based on anchor frames and the image recognition process can refer to the prior art, which is not limited here.

[0122] After the second image including the rod-shaped target is recognized by the deep learning model based on anchor frames, the rod-shaped target and the overall rod-shaped facility associated with the rod-shaped target are still recognized. The rod-shaped target still needs to be separated out. For example Figure 6As shown, an embodiment process schematic diagram of identifying a rod-shaped target by using a preset segmentation extraction method provided by the present application can include the following steps:

[0123] 61. Binary classifying each pixel point in the second image to obtain a binary image corresponding to the second image.

[0124] 62. Region merging the binary image by using a preset connected component algorithm to obtain a plurality of candidate regions.

[0125] 63. Filtering the plurality of candidate regions to remove non-rod-shaped targets in the plurality of candidate regions to obtain a plurality of target candidate regions.

[0126] 64. Fitting the plurality of target candidate regions to obtain a rod-shaped region corresponding to the rod-shaped target to complete the identification of the rod-shaped target.

[0127] Specifically, a binary image refers to two possible values or gray scale level states of each pixel on the image. A connected region generally refers to a region (Blob) of foreground pixels in the image that have the same pixel value and are adjacent to each other. Connected component analysis refers to finding and labeling each connected region in the image.

[0128] Since the object of connected component analysis processing is the binary image, the second image needs to be binary processed in the present application to convert the second image into a binary image, and then the subsequent connected component analysis is performed.

[0129] Since a connected region is a pixel set composed of adjacent pixels with the same pixel value, and each pixel point in the binary image corresponds to a pixel with only two cases, a plurality of different connected domain regions, i.e., regions composed of a plurality of the same pixels, can be obtained.

[0130] In the actual connected component analysis process, the plurality of connected domain regions obtained are usually independent and small in range; and the actual rod-shaped target usually includes a plurality of connected domain regions, so region merging needs to be performed on the plurality of connected domain regions to obtain a plurality of candidate regions. The candidate region is a region that the rod-shaped target can correspond to.

[0131] And because the pixel points in the binary image only include two kinds, that is, the pixel points that are actually different are divided into the same kind of pixels, which causes the part that is not the rod-shaped target to be divided into a part of the rod-shaped target, resulting in abnormal recognition. Therefore, it is also necessary to filter the candidate region to remove the part of the region that is not the rod-shaped target.

[0132] In some embodiments of the present application, filtering the candidate region can include: calculating the area of the candidate region and the length-width data of the outer rectangle corresponding to the candidate region; determining whether the area of the candidate region is greater than a preset area threshold and whether the length-width ratio of the outer rectangle of the candidate region is greater than a preset length-width ratio threshold. By filtering the non-rod-shaped target in the candidate region through the area and the length-width ratio, the recognition accuracy of the rod-shaped target is further improved.

[0133] In the above embodiments, after determining the target candidate region that the rod-shaped target may correspond to, the plurality of target candidate regions are independent of each other, and the plurality of target candidate regions need to be fitted to obtain the rod-shaped region that the rod-shaped target actually corresponds to, and the recognition of the rod-shaped target is completed.

[0134] In some embodiments, fitting the plurality of target candidate regions to obtain the rod-shaped region corresponding to the rod-shaped target to complete the recognition of the rod-shaped target can include:

[0135] Fitting the plurality of target candidate regions, calculating the fitting error corresponding to each target candidate region, obtaining a plurality of fitting errors; determining the smallest target fitting error in the plurality of fitting errors; determining the target candidate region corresponding to the target fitting error as the rod-shaped region corresponding to the rod-shaped target to complete the recognition of the rod-shaped target.

[0136] Specifically, fitting the plurality of target candidate regions is actually fitting the plurality of pixel points in the target candidate region to obtain a fitting line; and different target candidate regions correspond to different fitting lines after fitting.

[0137] And each target candidate region corresponds to a fitting error after fitting, and different target candidate regions correspond to different fitting errors; the greater the fitting error, the less accurate the fitting line obtained by fitting, and the smaller the fitting error, the closer the fitting line obtained by fitting to the actual rod-shaped target. Therefore, in the embodiments of the present application, the target candidate region corresponding to the smallest fitting error is selected as the rod-shaped region corresponding to the rod-shaped target, that is, the recognition of the rod-shaped target is completed.

[0138] In the embodiments of the present application, the process of performing connected component analysis on the binary image and performing straight line fitting on the target candidate region can refer to the prior art, which is not limited here.

[0139] For example, Figure 7The image shown is a schematic diagram of an embodiment of rod-shaped target segmentation and extraction provided in this application. Figure 7 In this process, the second image needs to be converted into a binary image first, and then connected component analysis needs to be performed on the binary image to obtain multiple different connected component regions; at the same time, multiple connected component regions need to be merged to obtain multiple candidate regions after merging.

[0140] Since non-rod-shaped targets may exist in multiple candidate regions, further filtering of these regions is necessary. This is primarily achieved by calculating the area of ​​each candidate region and the aspect ratio of its enclosing rectangle. Specifically, it can be determined whether the area of ​​the candidate region is greater than an area threshold T1, and whether the aspect ratio of its enclosing rectangle is greater than an aspect ratio threshold T2.

[0141] If the area of ​​a candidate region is greater than the area threshold T1, and the aspect ratio of the bounding rectangle of the candidate region is greater than the aspect ratio threshold T2, then the candidate region is selected as the target candidate region. If neither of the aforementioned conditions is met, the candidate region is removed.

[0142] After obtaining the target candidate regions, it is necessary to perform linear fitting on the target candidate region information and calculate the fitting error of the linear fitting corresponding to each target candidate region, resulting in multiple fitting errors. In this embodiment, the target candidate region corresponding to the smallest fitting error is selected as the rod-shaped region identified in this application; that is, as the rod-shaped target identified in this application.

[0143] like Figure 8 The image shown is a schematic diagram of an embodiment of rod-shaped target recognition provided in this application. Figure 8 In this process, high frame rate video images are captured using a video capture device. The video images need to be divided into multiple frames and sampled for detection. At the same time, a preset target detection model is used to detect the sampled images to quickly detect whether there are complete rod-shaped targets in the images.

[0144] If a complete rod-shaped target is detected in the sampled image, other frames before and after the current frame can be searched; at the same time, the image with the largest rod-shaped target size among multiple frames is determined as the image for subsequent accurate identification.

[0145] The aforementioned preset target recognition model only performs fast and coarse identification of rod-shaped targets, with low accuracy. A deep learning model based on anchor frames is needed for more precise image recognition and detection of rod-shaped targets. Accurate detection of rod-shaped targets using this deep learning model actually detects both the rod-shaped target itself and the associated structural members; therefore, the rod-shaped target itself needs to be separated from the second image.

[0146] At this time, the second image can be cropped and normalized according to the specific position of the identified rod-shaped target and the overall rod in the image, the cropped image is normalized to a fixed size, and finally the rod-shaped target is accurately segmented and extracted by using the preset segmentation and extraction model. The rod-shaped region segmented and extracted finally is mapped back to the original image to be recognized, and the rod-shaped target in the image can be identified.

[0147] In order to better implement the rod-shaped target identification method in the embodiments of the present application, on the basis of the rod-shaped target identification method, a rod-shaped target identification device is further provided in the embodiments of the present application, as shown in the figure. Figure 9 The rod-shaped target identification device 900 includes:

[0148] The first identification module 901 is configured to identify a target in the image to be recognized by using a preset target detection model to obtain a first image including a rod-shaped target and an overall rod facility associated with the rod-shaped target, and the first image further includes a dynamic anchor box.

[0149] The second identification module 902 is configured to directly identify the first image including the dynamic anchor box by using an anchor box-based deep learning model to obtain a second image including the rod-shaped target.

[0150] The third identification module 903 is configured to extract the rod-shaped target in the second image by using a preset segmentation and extraction model to complete the identification of the rod-shaped target.

[0151] The rod-shaped target identification device provided in the embodiments of the present application first coarsely and quickly identifies the rod-shaped target by using a preset target detection model, then accurately identifies the rod-shaped target by using an anchor box-based deep learning model, and finally separates the rod-shaped target from the image by using a segmentation and extraction model. The present application uses various neural network models to accurately identify the rod-shaped target from the whole to the part. Meanwhile, the image obtained by using the target detection model includes a dynamic anchor box; the first image including the dynamic anchor box is directly identified by using the anchor box-based deep learning model, without the need for processing the first image including the dynamic anchor box. Since the dynamic anchor box corresponding to the first image is closer to the size of the real rod-shaped target than the boundary box generated in the original identification process, the anchor box corresponding to the image identified by the anchor box-based deep learning method is closer to the real target box, the anchor box-based deep learning method can obtain a more accurate target box and a more accurate rod-shaped target, and the identification accuracy of the rod-shaped target is effectively improved.

[0152] In some embodiments, the first identification module 901 can be specifically configured to: identify the to-be-identified image by using the trained target detection model, respectively determine whether each initial image in the to-be-identified image includes a rod-shaped target, if the initial image includes the rod-shaped target, take the image including the rod-shaped target in the initial image as a target initial image, and determine a target local video stream in which the target initial image is located according to the target initial image, and determine a first image containing a complete rod-shaped target and having a largest size of the rod-shaped target in the target local video stream.

[0153] The first image includes a dynamic anchor box.

[0154] In some embodiments, the deep learning model based on the anchor box is a cascaded neural network model, and the deep learning model based on the anchor box includes a plurality of cascaded different identification modules. The second identification module 902 can be specifically configured to: input the first image including the dynamic anchor box into the deep learning model based on the anchor box, and sequentially perform classification and identification on the first image including the dynamic anchor box by using the plurality of cascaded different identification modules to obtain a second image including the rod-shaped target.

[0155] In some embodiments, the third identification module 903 can be specifically configured to: perform binary classification on each pixel point in the second image to obtain a binary image corresponding to the second image, perform region merging on the binary image by using a preset connected domain algorithm to obtain a plurality of candidate regions, filter the plurality of candidate regions to remove non-rod-shaped targets in the plurality of candidate regions to obtain a plurality of target candidate regions, and fit the plurality of target candidate regions to obtain a rod-shaped region corresponding to the rod-shaped target, so as to complete the identification of the rod-shaped target.

[0156] The third identification module fits the plurality of target candidate regions to obtain a rod-shaped region corresponding to the rod-shaped target to complete the identification of the rod-shaped target, which can include: fitting the plurality of target candidate regions, calculating a fitting error corresponding to each target candidate region to obtain a plurality of fitting errors, determining a minimum target fitting error in the plurality of fitting errors, and determining a target candidate region corresponding to the target fitting error as the rod-shaped region corresponding to the rod-shaped target to complete the identification of the rod-shaped target.

[0157] The present application also provides a computer device integrating any one of the building positioning devices provided in the embodiments of the present application, as shown in FIG. 1, which shows a structural schematic diagram of the computer device related to the embodiments of the present application, and specifically: Figure 10

[0158] The computer device can include a processor 1001 with one or more processing cores, a memory 1002 with one or more computer readable storage media, a power supply 1003, and an input unit 1004, and the like. Those skilled in the art can understand that, Figure 10 ​The computer device structure shown in the figure is not a limitation of the computer device, and can include more or fewer components than shown, or combine certain components, or arrange different components. Among them:

[0159] The processor 1001 is the control center of the computer device, connects various parts of the computer device through various interfaces and lines, executes various functions of the computer device and processes data by running or executing software programs and / or modules stored in the memory 1002 and calling data stored in the memory 1002, thereby overall monitoring the computer device. Optionally, the processor 1001 can include one or more processing cores; the processor 1001 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor or the like, preferably, the processor 1001 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 1001.

[0160] The memory 1002 can be used to store software programs and modules, and the processor 1001 executes various functions and data processing by running the software programs and modules stored in the memory 1002. The memory 1002 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc.; the data storage area can store data created according to the use of the computer device, etc. In addition, the memory 1002 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the memory 1002 can also include a memory controller to provide access for the processor 1001 to the memory 1002.

[0161] The computer device further includes a power supply 1003 for supplying power to each component. Preferably, the power supply 1003 is logically connected to the processor 1001 through a power management system, so that the power management system can realize functions such as management of charging, discharging, and power consumption management. The power supply 1003 can further include one or more than one direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power state indicator, and any other component.

[0162] The computer device can further include an input unit 1004, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.

[0163] Although not shown, the computer device can further include a display unit and the like, which will not be described here. In particular, in the embodiment, the processor 1001 in the computer device loads one or more than one executable file corresponding to a process of an application program into the memory 1002 according to the following instructions, and runs the application program stored in the memory 1002 by the processor 1001, so as to realize various functions, such as:

[0164] The target recognition model is used for target recognition on the to-be-recognized image, to obtain a first image including a rod-shaped target and an overall rod-shaped facility associated with the rod-shaped target, and the first image further includes a dynamic anchor box; the deep learning model based on the anchor box is used for directly performing target recognition on the first image including the dynamic anchor box, to obtain a second image including the rod-shaped target; and the preset segmentation extraction model is used for extracting the rod-shaped target in the second image, to complete the recognition of the rod-shaped target.

[0165] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by related hardware controlled by the instructions, which can be stored in a computer readable storage medium and loaded and executed by a processor.

[0166] The present application further provides a computer readable storage medium, which can include a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like. The storage medium stores a computer program, which is loaded by a processor to execute steps in any rod-shaped target recognition method provided by the embodiments of the present application. For example, the computer program loaded by the processor can execute the following steps:

[0167] The preset target detection model is used for target recognition on the to-be-recognized image, to obtain a first image including a rod-shaped target and an overall rod-shaped facility associated with the rod-shaped target, the first image further including a dynamic anchor box; a deep learning model based on the anchor box is used to directly perform target recognition on the first image including the dynamic anchor box, to obtain a second image including the rod-shaped target; and a preset segmentation extraction model is used to extract the rod-shaped target in the second image, to complete the recognition of the rod-shaped target.

[0168] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the detailed description of other embodiments above, which will not be repeated here.

[0169] In the implementation, each unit or structure above can be implemented as an independent entity, or can be combined as the same or several entities, and the specific implementation of each unit or structure can be referred to the method embodiments above, which will not be repeated here.

[0170] The rod-shaped target recognition method, device, computer device and storage medium provided by the embodiments of the present application are described in detail above, and the principle and implementation manner of the present application are described by applying specific examples; the above embodiment is only used to help understand the method and core idea of the present application; meanwhile, for those skilled in the art, the specific implementation manner and application range of the present application can be changed according to the idea of the present application, and the above description should not be understood as the limitation of the present application.

Claims

1. A rod-shaped object recognition method characterized by comprising: The method comprises: target recognition on the to-be-recognized image by using a preset target detection model to obtain a first image comprising a rod-shaped target and an overall rod member facility associated with the rod-shaped target, the first image further comprising a dynamic anchor box; the size of the dynamic anchor box matches the size of the rod-shaped target; direct target recognition on the first image comprising the dynamic anchor box by using an anchor box-based deep learning model to obtain a second image comprising the rod-shaped target and the overall rod member facility associated with the rod-shaped target; extraction of the rod-shaped target in the second image by using a preset segmentation extraction model to obtain a recognition result of the rod-shaped target; wherein the extraction of the rod-shaped target in the second image by using the preset segmentation extraction model to obtain the recognition result of the rod-shaped target comprises: binary classification on each pixel point in the second image to obtain a binary image corresponding to the second image; region merging on the binary image by using a preset connected domain algorithm to obtain a plurality of candidate regions; obtaining a rod-shaped region corresponding to the rod-shaped target according to the plurality of candidate regions to complete the recognition of the rod-shaped target.

2. The rod-shaped object recognition method according to claim 1, characterized by, Before the target recognition on the to-be-recognized image by using the preset target detection model to obtain the first image comprising the rod-shaped target and the overall rod member facility associated with the rod-shaped target, the method further comprises: acquiring a dynamic continuous video collected by a video collector; dividing the dynamic continuous video into a plurality of initial images according to a preset frame rate, and sampling the plurality of initial images to obtain initial to-be-recognized images; wherein the initial to-be-recognized images comprise a plurality of initial images.

3. The rod-shaped object recognition method according to claim 2, characterized by, The target recognition on the to-be-recognized image by using the preset target detection model to obtain the first image comprising the rod-shaped target and the overall rod member facility associated with the rod-shaped target comprises: respectively taking each initial image in the initial to-be-recognized images as a target initial image, and using the preset target detection model to determine whether the target initial image comprises the rod-shaped target and the overall rod member facility associated with the rod-shaped target; if the target initial image comprises the rod-shaped target and the overall rod member facility associated with the rod-shaped target, determining a target local video stream in which the target initial image is located according to the target initial image; decoding the target local video stream to obtain the to-be-recognized image; determining a first image in the to-be-recognized image that contains a complete rod-shaped target and an overall rod member facility associated with the rod-shaped target, and has the largest size of the rod-shaped target; wherein the first image comprises a dynamic anchor box.

4. The rod-shaped object recognition method according to claim 3, characterized by, The anchor box-based deep learning model is a cascaded neural network model, and the anchor box-based deep learning model comprises a plurality of cascaded different recognition modules; The direct target recognition on the first image comprising the dynamic anchor box by using the anchor box-based deep learning model to obtain the second image comprising the rod-shaped target and the overall rod member facility associated with the rod-shaped target comprises: inputting the first image into the anchor box-based deep learning model; The plurality of different identification modules are used to sequentially perform classification and identification on the first image including the dynamic anchor box, to obtain a second image including the rod-shaped target and the overall rod-shaped facility associated with the rod-shaped target.

5. The rod-shaped target recognition method according to claim 4, characterized by Before the first image including the dynamic anchor box is input into the anchor box-based deep learning model, the method further includes: obtaining an initial sample set composed of a plurality of different images including different rod-shaped targets; processing the plurality of different images in the initial sample set to obtain a training sample set, the training sample set including a plurality of different pictures corresponding to different rod-shaped targets, and the number of pictures in the training sample set being greater than the number of pictures in the initial sample set; training an initial anchor box-based deep learning model using the training sample set to obtain a trained anchor box-based deep learning model.

6. The rod-shaped object recognition method according to claim 1, wherein The rod-shaped region corresponding to the rod-shaped target is obtained according to the plurality of candidate regions to complete the identification of the rod-shaped target, including: filtering the plurality of candidate regions to remove non-rod-shaped targets in the plurality of candidate regions to obtain a plurality of target candidate regions; fitting the plurality of target candidate regions to obtain a rod-shaped region corresponding to the rod-shaped target to complete the identification of the rod-shaped target.

7. The rod-shaped target recognition method according to claim 6, characterized by The rod-shaped region corresponding to the rod-shaped target is obtained according to the plurality of candidate regions to complete the identification of the rod-shaped target, including: fitting the plurality of target candidate regions to calculate a fitting error corresponding to each target candidate region to obtain a plurality of fitting errors; determining a minimum target fitting error from the plurality of fitting errors; determining a target candidate region corresponding to the target fitting error as a rod-shaped region corresponding to the rod-shaped target to complete the identification of the rod-shaped target.

8. A rod-shaped target recognition device, characterized by The device includes: a first identification module configured to identify a to-be-identified image using a preset target detection model to obtain a first image including a rod-shaped target and an overall rod-shaped facility associated with the rod-shaped target, the first image further including a dynamic anchor box, and the size of the dynamic anchor box matching the size of the rod-shaped target; a second identification module configured to directly perform target identification on the first image including the dynamic anchor box using an anchor box-based deep learning model to obtain a second image including the rod-shaped target; a third identification module configured to extract the rod-shaped target in the second image using a preset segmentation and extraction model to obtain an identification result of the rod-shaped target; The third identification module is specifically configured to: perform binary classification on each pixel point in the second image to obtain a binary image corresponding to the second image; perform region merging on the binary image using a preset connected domain algorithm to obtain a plurality of candidate regions; obtain a rod-shaped region corresponding to the rod-shaped target according to the plurality of candidate regions to complete the identification of the rod-shaped target.

9. A server, characterized by The server includes: one or more processors; a memory; and One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the rod-shaped target recognition method of any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the rod-shaped target recognition method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for detecting specific identification image in predetermined area

    CN105303189A

  • Target detection method, target detection device and electronic equipment

    CN110084175A

  • Target identification method and device based on operation area, and computer equipment

    CN111222423A

  • Positioning method and device, electronic equipment and readable storage medium

    CN111383286A

  • Improved target detection method and system based on Grid R-CNN model

    CN113011415A