Camera recognition method, device, electronic device and storage medium
By combining the characteristics of the camera and the support pole, the recognition method reduces the misrecognition rate in complex traffic scenes, improves the accuracy of camera recognition, and solves the problem of high misrecognition rate in the existing technology.
Patent Information
- Application Number
- CN202010594655.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-28
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2040-06-28
AI Technical Summary
The misrecognition rate of camera recognition in the existing technology is high. Especially in complex traffic scenes, the detection model easily identifies telephone poles, leaves, etc. as cameras, resulting in low recognition accuracy.
By combining the characteristics of the support rod and the camera around the camera, the recognition method includes obtaining the detection image, determining the candidate areas of the camera and the support rod, and verifying whether there is a camera based on the positional relationship between the two to improve the accuracy of the recognition results.
It effectively reduces the false recognition rate and improves the accuracy of camera recognition. Especially in complex scenes, the reliability of recognition is enhanced through the obvious correlation of support rod features.
Smart Images

Figure CN111950345B
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, specifically to the fields of computer vision, artificial intelligence and deep learning technology, and in particular to a camera recognition method, device, electronic device and storage medium. Background Art
[0002] Camera recognition plays an important role in traffic map navigation, autonomous driving and traffic coordination. For example, by collecting pictures of traffic sections and identifying the type and location of cameras in the pictures, traffic map navigation and autonomous driving can provide traffic condition information.
[0003] In the related art, the camera category and location are identified by training a detection model.
[0004] However, this recognition method has a high misrecognition rate because traffic scenes are relatively complex, and the detection model often identifies foreign objects such as leaves on telephone poles, air conditioners or signs on buildings as cameras. Especially when taking pictures at a long distance, the features of the camera are not obvious and can be easily confused with other foreign objects. Summary of the invention
[0005] The present application aims to solve one of the technical problems in the related art at least to some extent.
[0006] The present application proposes a camera recognition method, device, electronic device and storage medium, so that when identifying the camera, the accuracy of the recognition result can be improved by combining the support rod features around the camera and the camera features.
[0007] The first embodiment of the present application provides a camera recognition method, including:
[0008] Acquire detection images;
[0009] Performing camera recognition on the detection image to determine a candidate area of the camera from the detection image;
[0010] Performing camera support rod recognition on the detection image to determine a candidate area of the support rod from the detection image;
[0011] According to the positional relationship between the candidate area of the camera and the candidate area of the support rod, it is checked whether the camera is displayed in the candidate area of the camera.
[0012] The second embodiment of the present application provides a camera recognition device, including:
[0013] An acquisition module, used for acquiring a detection image;
[0014] A camera recognition module, used to perform camera recognition on the detection image to determine a candidate area of the camera from the detection image;
[0015] A support rod recognition module, used for performing support rod recognition of the camera on the detection image to determine a candidate area of the support rod from the detection image;
[0016] The verification module is used to verify whether the camera is displayed in the candidate area of the camera according to the positional relationship between the candidate area of the camera and the candidate area of the support rod.
[0017] The third aspect of the present application provides an electronic device, including:
[0018] at least one processor; and
[0019] a memory communicatively connected to the at least one processor; wherein,
[0020] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the camera recognition method proposed in the embodiment of the first aspect of the present application.
[0021] The fourth aspect embodiment of the present application proposes a non-transitory computer-readable storage medium of computer instructions, wherein the computer instructions are used to enable the computer to execute the camera recognition method proposed in the first aspect embodiment of the present application.
[0022] The fifth aspect embodiment of the present application proposes a computer program product, including a computer program, which, when executed by a processor, implements the camera recognition method proposed in the first aspect embodiment of the present application.
[0023] One embodiment of the above application has the following advantages or beneficial effects:
[0024] In the embodiment of the present application, after performing camera recognition on the detection image and obtaining the candidate area of the camera, it is not possible to determine whether the candidate area displays a camera, but it is necessary to further perform camera support rod recognition on the detection image to obtain the candidate area of the support rod, and then verify whether the camera is displayed in the candidate area of the camera based on the positional relationship between the candidate area of the camera and the candidate area of the support rod. Therefore, considering this obvious feature of the association between the camera and the support rod, when identifying the camera, the accuracy of the recognition result can be improved by combining the support rod features and camera features around the camera.
[0025] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present disclosure. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.
[0027] Figure 1 A schematic diagram of the flow of the camera recognition method provided in the first embodiment of the present application;
[0028] Figure 2 A schematic diagram of the flow of the camera recognition method provided in the second embodiment of the present application;
[0029] Figure 3 A schematic diagram of the flow of the camera recognition method provided in the third embodiment of the present application;
[0030] Figure 4 A flowchart of a camera recognition method provided in Embodiment 4 of the present application;
[0031] Figure 5 A flowchart of a camera recognition method provided in Embodiment 5 of the present application;
[0032] Figure 6 A schematic diagram of the structure of a camera recognition device provided in Example 6 of the present application;
[0033] Figure 7 A schematic diagram of the structure of a camera recognition device provided in Embodiment 7 of the present application;
[0034] Figure 8 It is a block diagram of an electronic device used to implement the camera recognition method of an embodiment of the present application. DETAILED DESCRIPTION
[0035] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0036] In the existing technology, the detection model is used to identify the camera type and location, but the misidentification rate is high. The reason is that the traffic scene is relatively complex, and the detection model often identifies foreign objects or leaves on telephone poles, air conditioners or signs on buildings as cameras. Especially for processing a large number of road pictures, since there are relatively few positive samples during training, as the amount of data increases, the number of misidentified pictures will also increase significantly, and the error rate will also increase significantly.
[0037] Therefore, this application mainly proposes a camera recognition method to address the technical problem that the existing technology uses detection models to identify camera categories and positions, but has a low recognition accuracy.
[0038] The camera recognition method of the embodiment of the present application takes into account the obvious feature of the association between the camera and the support pole. After performing camera recognition on the detection image and obtaining the candidate area of the camera, it cannot be determined whether the camera is displayed in the candidate area, but it is necessary to further perform camera support pole recognition on the detection image to obtain the candidate area of the support pole, and then verify whether the camera is displayed in the candidate area of the camera based on the positional relationship between the candidate area of the camera and the candidate area of the support pole. In the present application, when recognizing the image, the accuracy of the recognition result can be improved by combining the support pole features and camera features around the camera.
[0039] The following describes the camera recognition method, device, electronic device and storage medium of the embodiments of the present application with reference to the accompanying drawings.
[0040] Figure 1 A flowchart of the camera recognition method provided in Example 1 of the present application.
[0041] The embodiment of the present application takes the camera recognition method being configured in a camera recognition device as an example. The camera recognition device can be applied to any electronic device so that the electronic device can perform the camera recognition function.
[0042] Among them, the electronic device can be any device with computing capabilities, such as a personal computer (PC), a mobile terminal, a server, etc. The mobile terminal can be, for example, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, a car-mounted device, and other hardware devices with various operating systems, touch screens and / or display screens.
[0043] like Figure 1 As shown, the camera recognition method may include the following steps:
[0044] Step 101, obtaining a detection image.
[0045] In an embodiment of the present application, the detection image may be an image stored locally in the electronic device, such as an image downloaded and captured in advance, or the detection image may also be an image collected by the electronic device, or the detection image may also be an image browsed online, and the present application does not impose any restrictions on this.
[0046] In the embodiments of the present application, a camera may be provided on the electronic device, and the number of cameras provided is not limited, for example, it may be one, or it may be multiple. The form in which the camera is provided on the electronic device is not limited, for example, it may be a camera built into the electronic device, or it may be a camera external to the electronic device, for example, it may be a front camera or a rear camera. Among them, the camera may be any type of camera, for example, the camera may be a color camera, a black and white camera, a depth camera, a telephoto camera, a wide-angle camera, etc., which are not limited here.
[0047] When the electronic device is provided with multiple cameras, the multiple cameras may be cameras of the same type or cameras of different types, and this application does not limit this. For example, they may all be color cameras or all be black and white cameras, or one of the cameras may be a telephoto camera and the other cameras may be wide-angle cameras, and so on.
[0048] In the embodiment of the present application, the user operation may be detected, and the detection image may be acquired in response to the user operation. Alternatively, the image acquisition may be performed continuously or intermittently to acquire the detection image.
[0049] Step 102: Perform camera recognition on the detection image to determine a candidate area of the camera from the detection image.
[0050] In the embodiment of the present application, a target detection algorithm may be used to perform camera recognition on the detection image to determine the candidate area of the camera. For example, based on target detection algorithms such as Single Shot MultiBox Detector (SSD), You Only Look Once (YOLO), and Faster-RCNN, camera recognition may be performed on the detection image to determine the candidate area of the camera.
[0051] Step 103 , performing support pole recognition of the camera on the detection image to determine a candidate region of the support pole from the detection image.
[0052] In the embodiment of the present application, the support rods may include all traffic-related horizontal rods and / or vertical rods.
[0053] In the embodiment of the present application, the support pole identification of the camera can also be performed on the detection image based on the target detection algorithm to determine the candidate area of the support pole.
[0054] Step 104 , based on the positional relationship between the candidate area of the camera and the candidate area of the support rod, verify whether there is a camera displayed in the candidate area of the camera.
[0055] Generally, when the support rod is a horizontal rod, the camera can be set above the support rod, or set in front of the support rod. Of course, it can also be set below the support rod. When the support rod is a vertical rod, the camera is set on the support rod. Therefore, in this application, it is possible to verify whether the camera is displayed in the candidate area of the camera based on the positional relationship between the candidate area of the camera and the candidate area of the support rod. Therefore, when identifying the camera, the accuracy of the recognition result can be improved by combining the support rod features and camera features around the camera.
[0056] The camera recognition method of the embodiment of the present application, after performing camera recognition on the detection image and obtaining the candidate area of the camera, cannot determine whether the candidate area displays a camera, but needs to further perform camera support rod recognition on the detection image to obtain the candidate area of the support rod, and then verify whether the camera is displayed in the candidate area of the camera based on the positional relationship between the candidate area of the camera and the candidate area of the support rod. In the present application, considering this obvious feature of the association between the camera and the support rod, when identifying the camera, the accuracy of the recognition result can be improved by combining the support rod features and camera features around the camera.
[0057] It should be understood that when the support rod is a horizontal rod and the camera is set in front of the support rod, or when the support rod is a vertical rod, if a camera is displayed in the image, the camera may be completely located in the candidate area of the support rod, or the candidate area of the camera and the candidate area of the support rod will have a large overlap area. Based on this, the present application can verify whether a camera is displayed in the candidate area of the camera. The above process is described in detail below in conjunction with Example 2.
[0058] Figure 2 A flowchart of the camera recognition method provided in Example 2 of the present application.
[0059] like Figure 2 As shown, the camera recognition method may include the following steps:
[0060] Step 201, obtaining a detection image.
[0061] Step 202: Perform camera recognition on the detection image to determine a candidate area of the camera from the detection image.
[0062] Step 203 , performing support pole recognition of the camera on the detection image to determine a candidate region of the support pole from the detection image.
[0063] The execution process of steps 201 to 203 may refer to the execution process of steps 101 to 103 in the above embodiment, and will not be described in detail here.
[0064] Step 204: Obtain the overlapping portion between the candidate area of the camera and the candidate area of the support rod.
[0065] In an embodiment of the present application, each pixel point in the candidate area of the camera can be compared with each pixel point in the candidate area of the support rod to determine the overlapping pixel points between the two candidate areas, and the overlapping part between the candidate area of the camera and the candidate area of the support rod can be determined based on the overlapping pixel points.
[0066] Step 205: If an overlapping portion is obtained, a check is performed based on the area ratio between the overlapping portion and the candidate area of the camera.
[0067] In the embodiment of the present application, since the overlapping portion and the candidate area of the camera are both geometric areas, the area ratio between the overlapping portion and the candidate area of the camera can be calculated based on the relevant algorithm in the relevant technology.
[0068] As an example, the number of pixels contained in the overlapping part and the number of pixels contained in the candidate area of the camera can be counted, and the number of pixels contained in the overlapping part is compared with the number of pixels contained in the candidate area of the camera to obtain the area ratio between the candidate areas of the camera.
[0069] It should be understood that when an overlapping portion is obtained and the above-mentioned area is relatively large, it indicates that the camera is located directly in front of the support pole, or the camera is set on the support pole. At this time, it can be determined that the camera is displayed in the candidate area of the camera. When an overlapping portion is obtained and the above-mentioned area is relatively small, it can be determined that the camera is not displayed in the candidate area of the camera.
[0070] As a possible implementation, the area ratio can be compared with a preset area ratio threshold. If the area ratio is greater than the area ratio threshold, it is verified that a camera is displayed in the candidate area of the camera. If the area ratio is less than or equal to the area ratio threshold, it is verified that no camera is displayed in the candidate area of the camera. For example, the area ratio threshold can be 75%, 80%, etc. In this way, the accuracy of the recognition result can be improved.
[0071] The camera recognition method of the embodiment of the present application verifies whether a camera is displayed in the candidate area of the camera based on the overlapping part between the candidate area of the camera and the candidate area of the support pole and the area ratio between the candidate areas of the camera. This can fully consider the installation position relationship between the camera and the support pole, thereby improving the accuracy of the recognition result.
[0072] It is understandable that when the support rod is a horizontal rod, and the camera is arranged above the support rod, or arranged below the support rod, there may be no overlapping part between the candidate area of the camera and the candidate area of the support rod. At this time, considering that the segmentation feature of the support rod is a straight line, in this application, the detection image can be identified by straight lines to determine the straight line corresponding to the support rod, and under normal circumstances, the distance between the center point of the camera and the support rod is short. Then, in this application, based on the distance between the camera and the straight line corresponding to the support rod, it can be verified whether the camera is displayed in the candidate area of the camera. The above process is described in detail in conjunction with Example 3.
[0073] Figure 3 A flowchart of the camera recognition method provided in Example 3 of the present application.
[0074] like Figure 3 As shown, the camera recognition method may include the following steps:
[0075] Step 301, obtaining a detection image.
[0076] Step 302: Perform camera recognition on the detection image to determine a candidate area of the camera from the detection image.
[0077] Step 303: Perform support pole recognition of the camera on the detection image to determine a candidate region of the support pole from the detection image.
[0078] Step 304: Obtain the overlapping portion between the candidate area of the camera and the candidate area of the support rod.
[0079] Step 305: If an overlapping portion is obtained, a check is performed based on the area ratio between the overlapping portion and the candidate area of the camera.
[0080] The execution process of steps 301 to 305 can refer to the execution process of the above embodiment, and will not be described in detail here.
[0081] Step 306: If no overlapping portion is obtained, a segmentation model is used to determine a plurality of target pixel points belonging to the support rod from the detection image.
[0082] The segmentation model is a trained model. For example, in order to improve the accuracy of the recognition result, the segmentation model can be trained by using deep learning technology. Specifically, a large number of sample images with support rods labeled can be used to train the segmentation model, so that the trained segmentation model has learned the corresponding relationship between the support rods and the images.
[0083] In the embodiment of the present application, when the overlapping portion is not obtained, a segmentation model can be used to determine multiple target pixel points belonging to the support rod from the detection image.
[0084] Step 307 , dividing the multiple target pixel points into at least one target pixel point set, wherein the target pixel points belonging to the same target pixel point set form a connected area, and the target pixel points belonging to different target pixel point sets are not adjacent to each other.
[0085] In the embodiment of the present application, multiple target pixel points may be clustered based on a clustering algorithm to obtain at least one target pixel point set.
[0086] As an example, the multiple target pixel points identified by the segmentation model can be clustered by a region growing algorithm to obtain at least one target pixel point set. The specific process is: randomly select a target pixel point as a seed point, and determine the adjacent pixel points with similar attributes to the seed point, such as intensity, grayscale, texture, color and other similar attributes, and use the determined adjacent pixel points and the seed point as a target pixel point set, and then re-traverse other target pixel points that have not been clustered, and select a seed point to continue the above iterative process until each target pixel point has been clustered to obtain a different target pixel point set.
[0087] Furthermore, it is also possible to determine whether the number of target pixels contained in each target pixel set is less than a preset threshold. If the number of target pixels contained in the target pixel set is less than the preset threshold, the target pixel set is used as noise data and the target pixel set is filtered out. For example, it is possible to determine whether the number of target pixels contained in each target pixel set is less than 30. If so, it indicates that the target pixel set is segmentation noise, and in this case, the target pixel set can be filtered out.
[0088] Step 308: Perform straight line detection on each target pixel point set to determine the straight line corresponding to each target pixel point set.
[0089] In the embodiment of the present application, considering that the segmentation features of the support rods are straight lines, each target pixel point set can be processed by Hough transform to obtain the slope of the straight line corresponding to each target pixel point set, and then determine the straight line corresponding to each target pixel point set.
[0090] The Hough transform is: for each pixel point (x, y), the angle theta is from -90 degrees to 180 degrees, and the formula p = xcos (theta) + ysin (theta) is used to calculate a total of 270 groups (p, theta), representing 270 straight lines in the Hough space, and these 270 groups of values are stored in H. If a group of points are collinear, each value in this group of points will increase H (p, theta) by 1. Therefore, the line with the largest H (p, theta) value can be found, which is the line with the most collinear points, and the line with the second largest H (p, theta) value is the line with the second most collinear points. All the more obvious lines can be found according to a certain threshold.
[0091] Therefore, in this application, for each target pixel point set, a discrete polar coordinate formula of a straight line can be used to express the discrete point geometric equation of the straight line as follows:
[0092] x*cos(theta)+y*sin(theta)=r; (1)
[0093] Among them, r refers to the geometric perpendicular distance from the target pixel point (x, y) to the straight line, that is, the distance from the target pixel point to the center of the polar coordinates; the angle theta refers to the angle between r and the x-axis.
[0094] Through formula (1), the coordinates of each target pixel in the target pixel set can be input, and a coordinate system can be formed with r and theta as independent variables. The r value corresponding to each theta target pixel coordinate point can be plotted. The coordinate points formed by all target pixels in the rectangular coordinate system will form a peak in the r and theta coordinate system. The peak point corresponding to r and theta corresponds to a straight line, and the slope k of the straight line can be calculated.
[0095] Afterwards, the center position (xc, yc) of the target pixel point set can be determined according to the coordinates of each target pixel point in the target pixel point set, and then the equation of the straight line corresponding to the target pixel point set can be calculated according to (xc, yc) and the slope k. For example, the equation of the marked straight line is: Ax+By+C=0.
[0096] Step 309: determine the center position of the candidate area of the camera.
[0097] In the embodiment of the present application, the center position can be determined based on the coordinates of each pixel point in the candidate area of the camera, for example, the coordinates of the center position of the candidate area of the camera are marked as (x0, y0).
[0098] Step 310, verifying based on the distance between the center position and the straight line corresponding to each target pixel point set.
[0099] Under normal circumstances, the distance between the center point of the camera and the support pole is relatively short. Then, in this application, it is possible to verify whether a camera is displayed in the candidate area of the camera based on the minimum distance between the center position of the candidate area of the camera and the straight line corresponding to each target pixel point set.
[0100] Specifically, for each straight line corresponding to a target pixel set, the distance between the center position and the straight line corresponding to the target pixel set can be calculated by the following formula:
[0101]
[0102] After the center position of the candidate area of the camera and the distance between the straight lines corresponding to each target pixel set are calculated according to formula (2), the minimum distance can be determined from the above distances, and then it can be checked whether there is a camera displayed in the candidate area of the camera based on the minimum distance.
[0103] As an example, it can be determined whether the above-mentioned minimum distance is less than a preset distance threshold. If the minimum distance is less than the above-mentioned distance threshold, it indicates that the distance between the center point of the camera and the support pole is short. At this time, it can be determined that a camera is displayed in the candidate area of the camera. If the minimum distance is greater than or equal to the above-mentioned distance threshold, it indicates that the distance between the center point of the camera and the support pole is far. At this time, it can be determined that no camera is displayed in the candidate area of the camera.
[0104] Therefore, when the camera is identified, the accuracy of the identification result can be improved by combining the support pole features around the camera and the camera features.
[0105] As a possible implementation, in order to further improve the accuracy of the recognition result, in this application, after calculating the center position of the candidate area of the camera and the distance between the straight line corresponding to each target pixel point set, it is possible to determine whether a camera is displayed in the candidate area of the camera based on the relative error of the minimum distance. The above process is described in detail below in conjunction with Example 4.
[0106] Figure 4 A flowchart of the camera recognition method provided in Example 4 of the present application.
[0107] like Figure 4 As shown, the camera recognition method may include the following steps:
[0108] Step 401, obtaining a detection image.
[0109] Step 402 : performing camera recognition on the detection image to determine a candidate area of the camera from the detection image.
[0110] Step 403 , performing support pole recognition of the camera on the detection image to determine a candidate region of the support pole from the detection image.
[0111] Step 404: Obtain the overlapping portion between the candidate area of the camera and the candidate area of the support rod.
[0112] Step 405: If an overlapping portion is obtained, a check is performed based on the area ratio between the overlapping portion and the candidate area of the camera.
[0113] Step 406: If no overlapping portion is obtained, a segmentation model is used to determine a plurality of target pixel points belonging to the support rod from the detection image.
[0114] Step 407 , dividing the multiple target pixel points into at least one target pixel point set, wherein the target pixel points belonging to the same target pixel point set form a connected area, and the target pixel points belonging to different target pixel point sets are not adjacent to each other.
[0115] Step 408 : Perform straight line detection on each target pixel point set to determine the straight line corresponding to each target pixel point set.
[0116] Step 409: determine the center position of the candidate area of the camera.
[0117] The execution process of steps 401 to 409 can refer to the execution process of the above embodiment, and will not be described in detail here.
[0118] Step 410, determining a target value according to the maximum value of the length and the width of the camera detection frame.
[0119] In the embodiment of the present application, the candidate area of the camera is the part within the camera detection frame. For example, in order to improve the accuracy of the recognition result, the camera recognition can be performed on the detection image based on the deep learning technology to determine the camera detection frame. For example, the camera recognition can be performed on the detection image based on the YOLOV3 (the third version of YOLO) model to obtain the camera detection frame.
[0120] In the embodiment of the present application, after determining the detection frame of the camera, the length and width of the detection frame can be determined according to the coordinates of each pixel point in the detection frame, and then the maximum value of the length and width can be used as the target value.
[0121] Step 411, determining the minimum distance from the distances between the center position and each straight line.
[0122] For example, the distances between the center position of the candidate area of the camera and each straight line can be calculated according to formula (2), so that the minimum distance can be determined from the above distances.
[0123] Step 412, determine whether the ratio of the minimum distance to the target value is less than the ratio threshold, if so, execute step 413, if not, execute step 414.
[0124] In the embodiment of the present application, the ratio threshold is preset, for example, the ratio threshold can be preset based on experience.
[0125] In an embodiment of the present application, the ratio of the minimum distance to the target value can be used as the relative error of the minimum distance. For example, the marking ratio threshold is thre, the minimum distance is Lmin, the length and width of the detection box are h and w respectively, and the relative error of the minimum distance is samLmin, then samLmin = Lmin / max(w, h). When samLmin is less than thre, it can be determined that a camera is displayed in the candidate area of the camera. When samLmin is greater than or equal to thre, it can be determined that no camera is displayed in the candidate area of the camera. Therefore, judging whether a camera is displayed in the candidate area of the camera based on the relative error of the minimum distance can further improve the accuracy of the recognition result.
[0126] Step 413: Verify that there is a camera displayed in the candidate area of the camera.
[0127] Step 414: Verify that no camera is displayed in the candidate area of the camera.
[0128] As a possible implementation, in order to further improve the accuracy of the recognition result, camera recognition can be performed on the detection image based on deep learning technology to determine the candidate area of the camera from the detection image. The above process is described in detail below in conjunction with Example 5.
[0129] Figure 5 This is a flow chart of the camera recognition method provided in Example 5 of the present application.
[0130] like Figure 5 As shown, the camera recognition method may include the following steps:
[0131] Step 501, obtaining a detection image.
[0132] The execution process of step 501 may refer to the execution process of step 101 in the above embodiment, and will not be described in detail here.
[0133] Step 502, using the object recognition model to perform camera recognition on the detection image to obtain a detection frame output by the object recognition model and a corresponding first score, wherein the first score is used to indicate the probability that the detection frame contains a camera.
[0134] In the embodiment of the present application, a large number of sample images with camera labels can be used in advance to train the object recognition model, so that the trained object recognition model has learned the corresponding relationship between the camera and the image. For example, the object recognition model can be a YOLOV3 model.
[0135] In an embodiment of the present application, after the object recognition model performs camera recognition on the detection image, the output is a series of candidate camera detection frames and the scores corresponding to each detection frame, where the score is used to indicate the probability that the corresponding detection frame contains a camera.
[0136] Step 503: The detection image within the detection frame and within a set range outside the detection frame are used as input images.
[0137] In the embodiment of the present application, in order to fully surround the surrounding features of the camera, the detection frame of each candidate camera can be expanded. Specifically, the detection image within the detection frame and the detection image within the set range of the periphery of the detection frame can be used as the input image. For example, the detection frame of each candidate camera can be expanded by 1.5 to 2.5 times.
[0138] Step 504: Use the classification model to perform camera recognition on the input image to obtain the camera category output by the classification model and the corresponding second score, wherein the second score is used to indicate the probability of belonging to the camera category.
[0139] In the embodiment of the present application, a large number of sample images with camera categories labeled can be used in advance to train the classification model, so that the trained classification model has learned the corresponding relationship between the camera category and the image. For example, the backbone network of the classification model can adopt the deep residual network Resnet-101. Among them, the camera categories can include square cameras, round cameras, box cameras and other categories.
[0140] In an embodiment of the present application, after the classification model performs camera recognition on the input image, the output is the classification category of the camera and the corresponding classification score, which is recorded as the second score in this application, where the second score is used to indicate the probability of belonging to the camera category.
[0141] Step 505: If both the first score and the second score belong to the target interval, the detection image in the detection frame is used as a candidate area of the camera.
[0142] In the embodiment of the present application, the target interval is pre-set, for example, the target area may be [0.3, 0.9].
[0143] It should be understood that when both the first score and the second score are very low, the reliability of the presence of a camera in the detection frame is low, so it can be determined that there is no camera in the detection frame, and when both the first score and the second score are very high, the reliability of the presence of a camera in the detection frame is high, so it can be determined that there is a camera in the detection frame. When the first score and the second score are in the middle, the detection image in the detection frame can be used as a candidate area of the camera for further determination. In this way, while saving the amount of calculation, the accuracy of the recognition result can also be improved.
[0144] Specifically, when the first score and the second score both belong to the target interval, the detection image in the detection frame can be used as a candidate area for the camera. When the first score and the second score are both smaller than the lower limit of the target interval, it can be determined that there is no camera displayed in the detection frame. When the first score and the second score are both greater than the upper limit of the target interval, it can be determined that there is a camera displayed in the detection frame.
[0145] Step 506 , performing support pole recognition of the camera on the detection image to determine a candidate region of the support pole from the detection image.
[0146] As a possible implementation method, in order to improve the accuracy of subsequent recognition results, in this application, deep learning technology can be used to identify the detection image and determine the candidate area of the support rod.
[0147] Specifically, a segmentation model, such as a semantic segmentation network DeepLabV3 model, can be used to perform camera support pole recognition on the detection image to obtain a recognition frame output by the segmentation model and a corresponding third score, and retain the recognition frame with a third score higher than a preset score, such as retaining a recognition frame with a third score higher than 0.7, and use the detection image in the retained recognition frame as a candidate region for the support pole. The third score is used to indicate the probability that the recognition frame contains a support pole.
[0148] Step 507 : Check whether there is a camera displayed in the candidate area of the camera according to the positional relationship between the candidate area of the camera and the candidate area of the support rod.
[0149] For steps 506 to 507, reference may be made to the execution process of the above embodiment, and no further details will be given here.
[0150] As an example, the following steps may be used to determine whether a camera is displayed in the detected image:
[0151] Based on the YOLOV3 model, the detection image can be recognized to obtain a series of candidate camera detection frames and the detection score Camera-Det-Score corresponding to each detection frame.
[0152] The candidate camera detection frame is expanded by 1.5 to 2.5 times to fully surround the features around the camera to obtain the input image, and the input image is used as input to pass through the classification model to obtain the classification category of the camera and the corresponding classification score Camera-Clf-Score. The backbone network of the classification model uses Resnet-101.
[0153] If both the detection score and the classification score are very low, such as Camera-Det-Score is less than 0.3 and Camera-Clf-Score is less than 0.1, it is determined that there is no camera in the detection frame. If both the detection score and the classification score are very high, such as Camera-Det-Score and Camera-Clf-Score are both greater than 0.9, it is determined that there is a camera in the detection frame. The remaining middle score part is an uncertain result, and the next step can be made, that is, the detection image in the detection frame of the middle score part can be used as the candidate area detbox1 of the camera for subsequent judgment process.
[0154] Based on the DeepLabV3 model, the detection image is recognized to obtain the recognition box output by the segmentation model and the corresponding third score. The recognition box with the third score higher than 0.7 is retained, and the detection image in the retained recognition box is used as the candidate area detbox2 of the support rod.
[0155] If there is an overlapping part detbox1∩detbox2 between the candidate area detbox1 of the camera and the candidate area detbox2 of the support rod, the area ratio between the overlapping part detbox1∩detbox2 and the candidate area detbox1 of the camera is calculated, that is, the marked area ratio is det_iou, then det_iou = (detbox1∩detbox2) / (detbox1).
[0156] If det_iou is greater than 0.75, it is determined that a camera is displayed in the candidate area of the camera. If det_iou is less than or equal to 0.75, it is determined that no camera is displayed in the candidate area of the camera.
[0157] If there is no overlapping portion between the candidate area detbox1 of the camera and the candidate area detbox2 of the support rod, the results of the segmentation model can be fused.
[0158] A segmentation model is used to determine multiple target pixel points belonging to the support rod from the detection image, and the multiple target pixel points are clustered through a region growing algorithm to obtain at least one target pixel point set.
[0159] Through Hough transform, straight line detection is performed on each target pixel point set to determine the slope of the straight line corresponding to each target pixel point set. Then, based on all the target pixel points of each target pixel point set, the center point (xc, yc) corresponding to each target pixel point set can be calculated. According to the slope of the straight line and the center point, the straight line Ax+By+C=0 corresponding to each target pixel point set can be calculated.
[0160] Traverse the candidate area detbox1 of each camera that has not been determined, that is, the detection box of the camera, calculate the coordinates of the center point (x0, y0) of detbox1, and calculate the straight-line distance between (x0, y0) and each target pixel set using formula (2).
[0161] Determine the minimum distance Lmin and calculate the minimum relative error samLmin=Lmin / max(w,h). If samLmin is less than a fixed ratio threshold, it is determined that a camera is displayed in detbox1. If samLmin is greater than or equal to the fixed ratio threshold, it is determined that no camera is displayed in detbox1.
[0162] In order to improve the accuracy of model recognition results, sample images can be obtained from public data sets and business data sets.
[0163] In order to implement the above embodiment, the present application also proposes a camera recognition device.
[0164] Figure 6 This is a structural diagram of the camera recognition device provided in Example 6 of the present application.
[0165] like Figure 6 As shown, the camera recognition device 600 includes: an acquisition module 610, a camera recognition module 620, a support rod recognition module 630 and a verification module 640.
[0166] The acquisition module 610 is used to acquire the detection image.
[0167] The camera recognition module 620 is used to perform camera recognition on the detection image to determine the candidate area of the camera from the detection image.
[0168] The support pole recognition module 630 is used to perform support pole recognition of the camera on the detection image to determine the candidate area of the support pole from the detection image.
[0169] The verification module 640 is used to verify whether there is a camera displayed in the candidate area of the camera according to the positional relationship between the candidate area of the camera and the candidate area of the support rod.
[0170] Further, in a possible implementation of the embodiment of the present application, see Figure 7 ,exist Figure 6 Based on the illustrated embodiment, the camera recognition device 600 may further include:
[0171] The verification module 640 includes:
[0172] The acquisition unit 641 is used to acquire the overlapping portion between the candidate area of the camera and the candidate area of the support rod.
[0173] The first verification unit 642 is used to verify, if an overlapping portion is obtained, based on the area ratio between the overlapping portion and the candidate area of the camera.
[0174] Furthermore, the verification module 640 further includes:
[0175] The identification unit 643 is used to determine a plurality of target pixel points belonging to the support rod from the detection image using a segmentation model if no overlapping portion is obtained.
[0176] The division unit 644 is used to divide the multiple target pixel points into at least one target pixel point set, wherein the target pixel points belonging to the same target pixel point set form a connected area, and the target pixel points belonging to different target pixel point sets are not adjacent.
[0177] The detection unit 645 is used to perform straight line detection on each target pixel point set to determine the straight line corresponding to each target pixel point set.
[0178] The determination unit 646 is used to determine the center position of the candidate area of the camera.
[0179] The second verification unit 647 is used to perform verification according to the distance between the center position and the straight line corresponding to each target pixel point set.
[0180] As a possible implementation method, the candidate area of the camera is the part within the camera detection frame, and the second verification unit 647 is specifically used to: determine the target value according to the maximum value of the length and the width of the camera detection frame; determine the minimum distance from the distance between the center position and each straight line; if the ratio of the minimum distance to the target value is less than the ratio threshold, it is verified that a camera is displayed in the candidate area of the camera; if the ratio of the minimum distance to the target value is greater than or equal to the ratio threshold, it is verified that no camera is displayed in the candidate area of the camera.
[0181] As a possible implementation method, the first verification unit 642 is specifically used to: if the area ratio is greater than the area ratio threshold, then verify that a camera is displayed in the candidate area of the camera; if the area ratio is less than or equal to the area ratio threshold, then verify that no camera is displayed in the candidate area of the camera.
[0182] As a possible implementation method, the camera recognition module 620 is specifically used to: use an object recognition model to perform camera recognition on the detection image to obtain a detection frame output by the object recognition model, and a corresponding first score, wherein the first score is used to indicate the probability that the detection frame contains a camera; use the detection image within the detection frame and within a set range outside the detection frame as the input image; use a classification model to perform camera recognition on the input image to obtain a camera category output by the classification model, and a corresponding second score, wherein the second score is used to indicate the probability of belonging to the camera category; if both the first score and the second score belong to the target interval, the detection image within the detection frame is used as a candidate area for the camera.
[0183] Furthermore, the camera recognition device 600 also includes:
[0184] The determination module 650 is used to determine that there is no camera displayed in the detection frame if both the first score and the second score are less than the lower limit of the target interval, and to determine that there is a camera displayed in the detection frame if both the first score and the second score are greater than the upper limit of the target interval.
[0185] It should be noted that the above Figures 1 to 5 The explanation of the camera recognition method in the embodiment is also applicable to the camera recognition device in this embodiment, and will not be repeated here.
[0186] The camera recognition device of the embodiment of the present application, after performing camera recognition on the detection image and obtaining the candidate area of the camera, cannot determine whether the candidate area displays a camera, but needs to further perform camera support rod recognition on the detection image to obtain the candidate area of the support rod, and then verify whether the camera is displayed in the candidate area of the camera based on the positional relationship between the candidate area of the camera and the candidate area of the support rod. In the present application, considering this obvious feature of the association between the camera and the support rod, when identifying the camera, the accuracy of the recognition result can be improved by combining the support rod features and camera features around the camera.
[0187] According to an embodiment of the present application, the present application also provides an electronic device, a readable storage medium and a computer program product.
[0188] like Figure 8, is a block diagram of an electronic device according to a camera recognition method according to an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0189] like Figure 8 As shown, the electronic device includes: one or more processors 801, memory 802, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 801 is taken as an example.
[0190] The memory 802 is a non-transitory computer-readable storage medium provided in the present application. The memory stores instructions executable by at least one processor to enable the at least one processor to perform the camera recognition method provided in the present application. The non-transitory computer-readable storage medium of the present application stores computer instructions, which are used to enable a computer to perform the camera recognition method provided in the present application.
[0191] The memory 802 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the camera recognition method in the embodiment of the present application (for example, the attached Figure 6 The processor 801 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 802, that is, the camera recognition method in the above method embodiment is implemented.
[0192] The memory 802 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of an electronic device according to the camera recognition method, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 802 may optionally include a memory remotely arranged relative to the processor 801, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0193] The electronic device may further include: an input device 803 and an output device 804. The processor 801, the memory 802, the input device 803 and the output device 804 may be connected via a bus or other means. Figure 8 The example of connecting through bus is taken in the following.
[0194] The input device 803 can receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick and other input devices. The output device 804 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display and a plasma display. In some embodiments, the display device may be a touch screen.
[0195] Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0196] These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or means (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0197] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0198] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0199] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0200] The computer program product proposed in the embodiments of the present application includes a computer program, which, when executed by a processor, implements the camera recognition method proposed in any of the aforementioned embodiments of the present application.
[0201] According to the technical solution of the embodiment of the present application, after performing camera recognition on the detection image and obtaining the candidate area of the camera, it is not possible to determine whether the candidate area displays a camera, but it is necessary to further perform camera support rod recognition on the detection image to obtain the candidate area of the support rod, and then verify whether the camera is displayed in the candidate area of the camera based on the positional relationship between the candidate area of the camera and the candidate area of the support rod. In the present application, considering this obvious feature of the association between the camera and the support rod, when recognizing the camera, the accuracy of the recognition result can be improved by combining the support rod features and camera features around the camera.
[0202] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.
[0203] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A camera recognition method, comprising: Acquire detection images; Performing camera recognition on the detection image to determine a candidate area of the camera from the detection image; Performing camera support rod recognition on the detection image to determine a candidate area of the support rod from the detection image; According to the positional relationship between the candidate area of the camera and the candidate area of the support rod, it is checked whether the camera is displayed in the candidate area of the camera.
2. The camera recognition method according to claim 1, wherein: The step of verifying whether the camera is displayed in the candidate area of the camera according to the positional relationship between the candidate area of the camera and the candidate area of the support rod comprises: Acquire an overlapping portion between the candidate area of the camera and the candidate area of the support rod; If the overlapping portion is obtained, verification is performed based on the area ratio between the overlapping portion and the candidate area of the camera.
3. The camera recognition method according to claim 2, wherein: After obtaining the overlapping portion between the candidate area of the camera and the candidate area of the support rod, the method further includes: If the overlapping portion is not obtained, a segmentation model is used to determine a plurality of target pixel points belonging to the support rod from the detection image; Dividing the multiple target pixel points into at least one target pixel point set, wherein the target pixel points belonging to the same target pixel point set form a connected area, and the target pixel points belonging to different target pixel point sets are not adjacent to each other; Performing straight line detection on each of the target pixel point sets to determine a straight line corresponding to each of the target pixel point sets; Determine the center position of the candidate area of the camera; Verification is performed based on the distance between the center position and the straight lines corresponding to each set of target pixel points.
4. The camera recognition method according to claim 3, wherein: The candidate area of the camera is the part within the camera detection frame; The checking according to the distance between the center position and the straight lines corresponding to each set of target pixel points includes: Determining a target value according to a maximum value of a length and a width of the camera detection frame; Determining a minimum distance from the distances between the center position and each of the straight lines; If the ratio of the minimum distance to the target value is less than a ratio threshold, verifying that the camera is displayed in the candidate area of the camera; If the ratio of the minimum distance to the target value is greater than or equal to the ratio threshold, it is verified that the camera is not displayed in the candidate area of the camera.
5. The camera recognition method according to claim 2, wherein: The checking according to the area ratio between the overlapping portion and the candidate area of the camera comprises: If the area ratio is greater than the area ratio threshold, verifying that the camera is displayed in the candidate area of the camera; If the area ratio is less than or equal to the area ratio threshold, it is verified that the camera is not displayed in the candidate area of the camera.
6. The camera recognition method according to any one of claims 1 to 5, wherein: The performing camera recognition on the detection image to determine a candidate area of the camera from the detection image includes: Using an object recognition model to perform camera recognition on the detection image, so as to obtain a detection frame output by the object recognition model and a corresponding first score, wherein the first score is used to indicate the probability that the camera is included in the detection frame; Using the detection image within the detection frame and the detection image within the set range of the periphery of the detection frame as the input image; Using a classification model to perform camera recognition on the input image to obtain a camera category output by the classification model and a corresponding second score, wherein the second score is used to indicate a probability of belonging to the camera category; If both the first score and the second score belong to the target interval, the detection image in the detection frame is used as the candidate area of the camera.
7. The camera recognition method according to claim 6, wherein: After the classification model is used to perform camera recognition on the input image to obtain the camera category output by the classification model and the corresponding second score, the method further includes: If both the first score and the second score are smaller than the lower limit of the target interval, determining that the camera is not displayed in the detection frame; If both the first score and the second score are greater than the upper limit of the target interval, it is determined that the camera is displayed in the detection frame.
8. A camera recognition device, comprising: An acquisition module, used for acquiring a detection image; A camera recognition module, used to perform camera recognition on the detection image to determine a candidate area of the camera from the detection image; A support rod recognition module, used for performing support rod recognition of the camera on the detection image to determine a candidate area of the support rod from the detection image; The verification module is used to verify whether the camera is displayed in the candidate area of the camera according to the positional relationship between the candidate area of the camera and the candidate area of the support rod.
9. The camera recognition device according to claim 8, wherein: The verification module comprises: An acquisition unit, used for acquiring an overlapping portion between the candidate area of the camera and the candidate area of the support rod; The first verification unit is used to perform verification according to the area ratio between the overlapping part and the candidate area of the camera if the overlapping part is obtained.
10. The camera recognition device according to claim 9, wherein: The verification module further includes: an identification unit, configured to determine a plurality of target pixel points belonging to the support rod from the detection image using a segmentation model if the overlapping portion is not acquired; a dividing unit, configured to divide the plurality of target pixel points into at least one target pixel point set, wherein target pixel points belonging to the same target pixel point set form a connected region, and target pixel points belonging to different target pixel point sets are not adjacent to each other; A detection unit, used to perform straight line detection on each of the target pixel point sets to determine a straight line corresponding to each of the target pixel point sets; A determination unit, used to determine the center position of the candidate area of the camera; The second verification unit is used to perform verification according to the distance between the center position and the straight lines corresponding to each of the target pixel point sets.
11. The camera recognition device according to claim 10, wherein: The candidate area of the camera is a part within the camera detection frame; the second verification unit is specifically used to: Determining a target value according to a maximum value of a length and a width of the camera detection frame; Determining a minimum distance from the distances between the center position and each of the straight lines; If the ratio of the minimum distance to the target value is less than a ratio threshold, verifying that the camera is displayed in the candidate area of the camera; If the ratio of the minimum distance to the target value is greater than or equal to the ratio threshold, it is verified that the camera is not displayed in the candidate area of the camera.
12. The camera recognition device according to claim 9, wherein: The first verification unit is specifically used to: If the area ratio is greater than the area ratio threshold, verifying that the camera is displayed in the candidate area of the camera; If the area ratio is less than or equal to the area ratio threshold, it is verified that the camera is not displayed in the candidate area of the camera.
13. The camera recognition device according to any one of claims 8 to 12, wherein: The camera recognition module is specifically used for: Using an object recognition model to perform camera recognition on the detection image, so as to obtain a detection frame output by the object recognition model and a corresponding first score, wherein the first score is used to indicate the probability that the camera is included in the detection frame; Using the detection image within the detection frame and the detection image within the set range of the periphery of the detection frame as the input image; Using a classification model to perform camera recognition on the input image to obtain a camera category output by the classification model and a corresponding second score, wherein the second score is used to indicate a probability of belonging to the camera category; If both the first score and the second score belong to the target interval, the detection image in the detection frame is used as the candidate area of the camera.
14. The camera recognition device according to claim 13, wherein: The device also includes: A determination module is used to determine that the camera is not displayed in the detection frame if the first score and the second score are both less than the lower limit of the target interval, and to determine that the camera is displayed in the detection frame if the first score and the second score are both greater than the upper limit of the target interval.
15. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the camera recognition method according to any one of claims 1 to 7.
16. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable the computer to execute the camera recognition method according to any one of claims 1 to 7.
17. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the camera recognition method according to any one of claims 1 to 7.
